PROGRESS JOURNAL: MESSAGES AND INPUTS

Compatibility's getting a lot better

When last we saw our heroine Lutine, she was able to enter battle, but not able to actually participate in it, because the custom battle system requited global events, which I hadn’t gotten around to adding support for in the script engine yet. So I added the code to ensure that global events that were supposed to fire automatically (ie. not the ones that got invoked by the Call Event command) would actually begin as expected.

Now, pressing the Menu key was supposed to open a box on-screen for you to select various options. But it didn’t show up when I pressed it. Turns out there was a problem in the code that shows Images, so I fixed that.

Then I could pull up the menu, but trying to navigate it did bizarre things with the cursor. Another script interpreter problem. Fixed that. Next!

Now I could navigate the menu, but the options spun by incredibly fast. The Key Scan command in RPG Maker has two modes of operation, one where it waits for the user to press a valid key and one where it doesn’t. What it doesn’t say anywhere is that if you’re in Wait mode and it gets called twice in a row, it will also wait for you to release any keys you were holding down before reading new ones. (If you’re not in Wait mode, it doesn’t wait for you to release the key, which is how Zero Base is able to build a smooth-scrolling space shooter on top of the RPG Maker engine.) So I implemented the Wait correctly and tried again.

Next up, Lutine has to select a plate and place it on the grid. The Frozen World uses the Choice box to confirm your selection, asking a Yes/No question. So I had to implement that, but it didn’t quite come out as clean as it does in RPG Maker. In RM, if you put a Message Box immediately before an input box of some sort, and there are enough lines available, it will magically merge them into a single box that shows the message and then displays the input at the same time. It’s able to do that by looking at the script at a very high level, which isn’t possible in the TURBU script engine. So instead, I changed the project importer code to do the merging when such a high-level view is still available, before building the script code.

Once I got the Choice box working, I went to work on the Input Number box, which The Frozen World uses instead of the normal inventory system, to select items to use. It took some time to get all the details worked out there, but I’ve got it working now.

The last thing that was broken with the custom battle system was that the background image didn’t show up. I fixed that this morning, and it’s all checked in to source control. Now Lutine is able to fight the enemies around her, and I’m able to progress further in the storyline.

Once I’ve got things to the point where I’m able to complete The Frozen World, I’ll build a new TURBU release. For now, though, compatibility’s getting a lot better, and we’re getting closer and closer to a fully-functional game engine.