oh jeez oh jeez I really need to start checking this forum more frequentlyI forget if we've since discussed this on discodehaus or some other platform. If so, apologies for forgetting and repeating myself! If not, apologies for the extremely delayed response.
textblox is getting a successor. There's a bug with the Text Block class (and thus with the override modes) that causes the game to lock up for several minutes under certain circumstances and it can't be fixed without optimizing the auto-wrapping, and
that, frustratingly enough, requires completely overhauling the way the library parses and manages text. And since I'll be redoing a big portion of the API I figured I might as well rebuild it from the ground up, leave out features that could be handled by other APIs to keep the scope more focused and manageable and address some limitations of the original Font class.
That being said, progress on the new library (text
plus) is slow so I have been going back to fix up some issues with blox in the meantime. They're limited to the SMBX 2.0 source for the time being, though.
Sambo wrote:Also, it isn't displaying message boxes quite right:
2016-12-26_11_13_12.png
The text is overlapping the borders. It looks kinda funky.
That's something I've been trying to fix but it's a stubborn bug; every time I think I've got it the margins break in other cases.
Edit: How do I get a newline? The "enter" key just displays 2 spaces, and "\n" just displays "\n"
The <br> tag.
Also, can I make a suggestion for this API? You should make it so different message box settings can be used depending on the NPC you're talking to. (for example, making signs display a different style of message box from the other NPCs. Maybe this could be set depending on the NPC's ID or with npcParse tags.)
It actually already is set up to do that with an advanced override mode -- events trigger the vanilla-style messages of the basic override mode, signs have their own style and all other NPCs default to word bubbles, though you can change the preset for each NPC ID or, yes, specify one for a given NPC through an npcParse tag. I even implemented a <page> tag to split text up into multiple pages of the same message box so folks wouldn't have to use events for additional dialogue. Unfortunately, the NPC detection for the advanced override mode is still wonky and I can't do much better without the LunaLua core devs implementing a version of the onMessageBox event that passes in an NPC/event reference... and it's on the wishlist, but they have much bigger priorities. And again, there's the freezing bug with the Text Block class.
So overall, I really don't recommend using the override functionality... you can
technically use it without any freezing or odd behavior but it'd require working around the limits of the NPC detection and manually wrapping every bit of text with <br>, and if your episode has a lot of text the latter will probably get incredibly tedious.