MZ VisuStella Message Core: Using both line break (<br>) and wait for button input (/!) during auto wrap?

Hi everybody,

I'm using the auto wrap feature of VisuStella Message Core and the ODW Multi-Language System.
I also make extensive use of line breaks (<br>) and wait for button input (/!), sometimes together, to structure and pace dialogues. Usually it works and I like it that way!

But sometimes, when these two tags interact with auto wrap, there can be a problem because auto wrap does its automatic line break (at the end of a line) or automatic button input (at the end of a message window), and I end up with a free line, a double button input, an empty space at the beginning of the line or some weirder stuff. Most of that is obvious to me, but in some cases the interactions behave REALLY weirdly.
Essentially, I have to "micromanage" a lot, with A LOT of trial and error. And more often than I would like, these interactions even force me to seriously change the content of the text in favour of a visually alright text window.

Now, I thought about bringing specific examples ...
But honestly, it would be a pain because it's a big collection of very specific situations, and in general, I'm more interested in how other people approach this tension.
How do you deal with this? Do you have experiences or tips?

Thanks!
line breaks (/!) and wait for button input (<br>)
Do you mistake <br> for the wait control code?
Yeah, I just mixed it up in the post, it's of course the other way around. It's edited now, thanks!
I assume you're also typing the wait for input escape code correctly, not with a forward slash 😉

Honestly,
Now, I thought about bringing specific examples ...
This seems like it's necessary. While I don't use these specific plugins, I do use Yanfly's Message Core with word wrapping, and I've never encountered the issue.

The method that parses escape codes and determines where to break lines should not be registering \! as characters that take up space on the line. So, if anything, if you can reproduce this issue it seems like it ought to be a bug report to VisuStella.
Hi @LaCipolla.

Another suggestion is to test your original text in a message without using the ${} for translating it, to see if it's a bug of the VS plugin only, or a bug when using the combo of the two plugins.

But sometimes, when these two tags interact with auto wrap, there can be a problem because auto wrap does its automatic line break (at the end of a line) or automatic button input (at the end of a message window), and I end up with a free line, a double button input, an empty space at the beginning of the line or some weirder stuff.

On the other hand, as you describe it, if the autowrap function creates its own line breaks and wait button, and at the same time you force these actions with your manual line breaks <br> and wait button \!, the behavior you get seems consistent to me. In other words, I'd only use the autowrap function for raw messages, i.e. without manually adding <br> and \!... just my two cent about this.
Thanks for the answers! =)

Let me use one example ...

Please read the whole post, I'm being so long-winded because I'm aware that some of it works as intended!

dial1a.jpg


Now, in the following two versions of code, this could be understandable because <br> and the auto wrap "double down" ...

dial1b.jpg


dial1c.jpg


(Both lead to the screenshot above.)

But, on the other hand, this is what happens without <br>:

dial1d.jpg


dial1e.jpg


So my idea is that auto wrap "counts" something in the code. And while in this example, it's not even that bad and easily circumventable, there have been other situations in which the effect "swallowed up" long words or whole phrases.

For troubleshooting I tried typing in the text directly in the RPG maker window (without using the language plugin, and consequently with \! instead of \\!), but it had the same effects.
This is just a guess (it's impossible to know how VS designed the autowrap function), but it's based on what I've seen in other plugins with autowrap.

To create the line break, the plugin creates the line of text word by word and checks at each iteration whether or not the length in pixels of the line exceeds the width of the window. If it does, the line break is added before the last word added... and so on for each line. That's why, in your example, the line break occurs after the word "There" => the width of the line is always less than the width of the window at that point.
1735688453507.png

I can also reproduce the OP's problem in the sample project.
sfsfsd sfsdfsd sfs s sfsdffffffffsffff fsfsdfsfds fsfsd sds <br>fdsfdsfs sfsdf sfds

It makes little difference if I put a space before or after <br> so <br>fdsfdsfs is not the culprit.
This did not happen in YEP_MessageCore by the way.

Edit* For some reason, this fixed the problem.
1735690131184.png
WOAH!

That does it. o_o Wild!

Thanks a lot! 😀 I'll reply again if something else comes up ...

Original thread: https://forums.rpgmakerweb.com/threads/visustella-message-core-using-both-line-break-br-and-wait-for-button-input-during-auto-wrap.174277/