Ccoa Universal Message System - width issues.

Started by Kise, June 21, 2017, 05:00:23 pm

Previous topic - Next topic

Kise

I switched from AMS to CCoa UMS and noticed one, really annoying bug - when using FIT_WINDOW_TO_TEXT it's clearly visible that width of invisible commends like \p[10] is added to the overall window width, which makes it look really werid, especially when using few commends. Could someone please look into it? here is a bit modified version of script -> https://pastebin.com/raw/FUTqBTFw

There's also original demo - http://www.ultimateam.pl/files/UMS_180.zip

KK20

https://pastebin.com/Qrj2N9zW

I also noticed a small bug as well. I had to reset the Font in the window's contents before every draw to ensure that they wouldn't affect calculating the correct size for the window. For example, I had an event use bold in the first message and none in the second. The bold flag was still on when it was calculating the text width for the second message, so the resulting window width was larger than expected.

However, this bug is still present if you abuse any of the commands that affect the shape of the text (bold, italics, changing the font name, maybe shadows?). The resulting window size might be too small. Basically just avoid using those :P

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Kise

Thank you. One more problem, the instructions say to use command \e[-1] to display message 'over no event', but it's not working and message is stuck with the last x event - \e[ x ]

KK20

Surprised that -1 even did something for you. I would just see \e[-1] in the message window.

In the script, there are two instances of this line:
text.gsub!(/\\[Ee]\[([0-9]+)\]/) do

Change both of them to
text.gsub!(/\\[Ee]\[(-?[0-9]+)\]/) do


After that, the only thing that would prevent moving the message box is the use of train_actor (\ta[N]). You have to make sure that it is also set to -1 in order for \e[-1] to work, as the script shows:

if $game_system.message_event == -1 and $game_system.train_actor == -1
      if $game_system.window_justification == RIGHT
        self.x = 640 - $game_system.window_width
      elsif $game_system.window_justification == LEFT
        self.x = 0
      else # center
        self.x = (640 - self.width) / 2
      end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!