Description: Official subforum for LunaLua - an extension framework for SMBX Engine Version 1.3 (which a core of SMBX 2.0). Share your creations that require the use of LunaLUA. You may also share info/tutorials on how to use LunaLUA.
Moderators: Moderators, Semi-moderatos
Textblox is giving me the following error when I talk to an NPC:
What I really don't understand is that I never loaded Textblox, so why is it even running? I checked all the APIs I have loaded, and none of them load Textblox.
I have LunaLua v. 0.7.3.1, which is the same as the LunaLua for SMBX 2.0, as I understand. Does SMBX 2.0 always load the Textblox API?
Mhh weird. This should not happen.
First of all: LunaLua with SMBX 2.0 and LunaLua without SMBX 2.0 do behave a bit different. SMBX 2.0 does preload some additional APIs.
Textblox should not preload for LunaLua without SMBX 2.0.
Please check if you have the following file: "LuaScriptsLib/basegame/lunabase.lua" (This is the file where SMBX 2.0 loads those additional APIs).
EDIT: I found out that warn.lua tries to preload textblox. warn.lua is a core API which preloads when LunaLua loads.
EDIT 2: It seems that there are conflicts with versions of APIs. I recommend updating textblox or removing it if nothing helps.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Ｓｉｇｎａｔｕｒｅ．ｓｔａｒｔ（） ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
Wohlstand in interview:
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Ｓｉｇｎａｔｕｒｅ．ｅｎｄ（） ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬
Creator of textblox here. That's most likely textblox's message box override functionality acting up.
I don't recommend removing the library because some other APIs do make use of it. What I do suggest is loading it in your episode or level code to create a local reference to the already-loaded API and then using that reference to disable override mode.
Code: Select all
Please let me know where you got your copy of textblox from, Sambo, because having that on by default was a mistake on my part. Apologies for the trouble!
I just remembered a better solution.
Code: Select all
I just downloaded the newest version from your GitHub repo, and it works now. It seems that the message box override is enabled by default in this version.
Also, it isn't displaying message boxes quite right:
The text is overlapping the borders. It looks kinda funky.
Edit: How do I get a newline? The "enter" key just displays 2 spaces, and "\n" just displays "\n"
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.)
oh jeez oh jeez I really need to start checking this forum more frequently
I 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 (textplus) 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.
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.
The <br> tag.
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.
Who is online (over the past 5 minutes)
Users browsing this forum: 2 guests