It didn't happen in my hand-patched build because I hadn't moved any dialog boxes that called this function into expanded ROM space, and my code that handled AI dialogue used the original dialog box definition.
This is so frustrating...
Oh no... I isolated what is wrong here, and I am not happy at all...
It's another instance of this game always expecting its text to be in a very specific bank. It never, ever updates what bank it searches for dialog boxes in, only what address within that bank is being currently used.
That causes problems like this, where another function is looking for where it should draw (or, in this case, clear) a dialog box, but it runs off into who-knows-where and trashes memory...
Nothing I added recently directly caused this; it is either a byproduct of something I added in my very first patcher build, or something related to how my patcher itself builds everything into the ROM.
My hand-patched build from months ago doesn't exhibit this bug, so I have no idea what is wrong...
Well, I fixed what caused everything to break yesterday, and ran into a different, very annoying and also very strange bug:
When playing any game with an AI opponent, after that AI player says anything, the game clears completely wrong memory addresses when removing their dialogue box. This causes all sorts of problems, like corrupt tiles overwriting the map, the HUD disappearing, or the game soft-locking after displaying that dialogue box...
mh, -
Oh hey, it's me.
(taken from @Yamayii@twitter.com; https://twitter.com/Yamayii/status/1001388245567946752)
And that flashy, glitch mess at the end... is probably caused by a bank value being wrong, and incorrectly-formatted, unterminated text being drawn, which overflows the tilemap into other parts of RAM, and eventually consumes the entire game...
I don't know exactly how I'll tackle that yet. .-.;;; It's part of a few lines that required extra work, so I left them out when formatting the rest of the menu text...
I've already fixed one of those bugs (extra spaces in names), which was caused because I didn't bugtest my code when I originally wrote my variable-width font code, and a register got clobbered. ^^;;;
The dialog boxes that I didn't recognize are actually character-specific dialogue that is in a different format from what the game expects there, so that's why they are completely broken. I'll look for those code references later, I guess...
flashing, glitchy graphics
And some other things, well... ... ... >.>;;;;;;;;
I still have lots of work left, I guess...
Well... I have some things working that weren't before, now! ^w^ Almost all menu dialogue has been formatted and inserted, and things look pretty good!
Did you know that it’s a good day to hug your fox? It’s true!
One hundred and seventy-two percent of foxes surveyed* indicated that they are fond of hugs and affection! Also scratching behind their ears!
*Please note that touching a fox without permission is not advised. Survey results may have been skewed by over-exuberant foxes who answered multiple times. We are not responsible for any unintended side effects such as being loved forever, nibbling, inability to remove fur from clothes...
I'm not even in gamedev and even *I* know Game Development Is Hard.
Any dumb speedrun trick is not the fault of "lazy developers," stop saying that for the love of god, speedrunners.
Poly trans cuddlefloof programmer and gamedev(?). I love poking around in and reverse engineering old games. I'm also super shy and have horrible anxiety, so ... please be nice...
I don't mind if you follow request, but if I don't know or recognize you, please send me a message so I know who you are. #nobot