FF6 Hacking
Event fail... - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Event fail... (/thread-4226.html)



Event fail... - Catone - 07-23-2022

Well, not a full 24 back to playing with event code and already trying to see if my head or desk will dent first. 

As for the code itself, it plays through just fine. Just relocated a bit, however, when it comes to getting out of it...
The new code completes, pauses for a moment, then displays "Great people here!" Message. Press button, unwanted message box goes away, so do all controls. Music/background goes along fine, so not a crash per say. Somehow the return didn't return but took a hike through left field and decided not to come back.

I seem to remember hitting that message box before in a similar situation, but I couldn't say why or how to fix it. Is there a way to debug event code? Or send it back to where it should be with a functioning return command?


RE: Event fail... - C-Dude - 07-23-2022

Can I see the event block you changed?
I debug event code by opening a copy of the changed ROM in Zone Doctor and then exporting an event dump. That works as long as you don't save the ROM, since Zone Doctor likes to change all pointers to point to the CA bank for some bizarre reason (it will break the game bad).
Once I have the text dump of the events, I use Notepad++ to scroll to the spot I was editing and I look for weird stuff like 97-byte long action commands, indicating I forgot something. That approach really only works if you're working within vanilla command codes, though, because if you have a single original event command in the lot then Zone Doctor will crash.
The other option is to look at the event display by opening the ROM in FF6Tools (https://everything8215.github.io/ff6tools/ff6tools.html). I find that a little harder to navigate, though, and I don't know how to get an event dump text file out of it. It does handle custom event commands a little better than Zone Doctor does, though, and if you save and modify the JSON definitions you can tell it exactly what you want it to show for custom stuff.


RE: Event fail... - Catone - 07-23-2022

Yeah.... I've already got most of the first 5 battle in Narshe moved out to 3F/ED00, and started at CA/5E33 (show title screen). Not to mention more sprite sheets than I care to recount out in 41/A000, several portraits (including the one for the fish... Just in case it joins the party for some strange reason) and all their palettes over in 52/0000. As well as all the small changes to more than I remember everywhere else. Yeah, bit of a remembering curve after not being touched for a few years.

Point being, most programs won't touch this thing.

BUT, this problem isn't tied to any of that, somehow. It's the pretty simple event where you first enter the Narshe mines with Vicks and Wedge(originally CC/9DB2). Matter of fact it was to simple to even add to, but it needed to move. Already moved it all back to CC/ completely just moved up about 700-800 bytes... Same exact problem (so running most of it from 3F/ wasn't causing it). It activates and executes fine, then runs off and gets lost. Used A version of FF6LE to change the event tile (still in CC/ btw) but all that worked fine regardless if half the code was ended up in 3F/ or not.

On THAT note, it seems there are two unable to be actived events on either side of this event tile (Map: Narshe, Outside, North, Begining) tied to... About 10-12 bytes of code that just event code the PC to the center tile, however, both side tiles are outside the physical walking space... Nothing important, didn't even notice until after I rewrote both codes, and hit this problem. Didn't chamge anything with them gone either, for better or worse so guess they're not needed?

Well, nothing like hex to inform you that your still an idiot. I can tell you however that E5 definitly does not function as 5E in the address after a bit check. Apparently, the script would run fine, but since it ended on the event square, after the bit was set to skip, and instead of skipping to return it skips out to the great beyond and runs rampant...

Knew I had seen that exact issue before. Alright, off to redo the work I spent today undoing... It foes beat trying to recreate the same problem in a new ROM zonedoctor would work with though.