Enhancing Word-wrap on Nathan Hoad's Dialogue Manager in Godot

alMoo Games
alMoo Games
80 بار بازدید - 6 ماه پیش - Nathan Hoad has built an
Nathan Hoad has built an absolutely excellent Dialogue Manager plugin for Godot (https://github.com/nathanhoad/godot_d..., which I have recently added to my cozy/adventure RPG set in a Renaissance Festival, called Faire Hollow.

I LOVE Nathan's plugin -- it does more than my old dialogue system would have ever been able to do. However, there was one feature that my own dialogue system had that I think Nathan's was lacking, and it has to do with word-wrap.

When letters are displayed one-by-one on the screen, if a word nears the edge of the dialogue box it may start on one line, and then as the word fades in it may wrap in the middle of the word.

I wrote a script that prevents this: right before it displays a line on the screen my script looks ahead and runs the dialogue line while hidden. It identifies where the line breaks would be and adds a "\n" line break character. It all happens in just a couple of frames, so the user does not notice the delay. This way the word-wrap can be anticipated and no word breaks midway through being displayed on the screen.

The code can be found on this reddit post: Reddit: i_made_a_modification_to_nathan_hoads_dialogue
6 ماه پیش در تاریخ 1402/11/04 منتشر شده است.
80 بـار بازدید شده
... بیشتر