Posts: 81
Threads: 4
Joined: Nov 2009
Reputation:
14
The Music Box was hand crafted by Lenophis himself, and so that would be his call. 24-bit HP was my doing, and it was rather hackish due to trying NOT to greatly disrupt existing function locations (translation from Imzogelmo-ese: It's a ton of JSRs to small functions that each check whether HP is looking at a monster and then if so it checks the third byte where appropriate). For instance, if you're reducing HP by 50%, you would shift the top byte right, putting that last bit into the carry, and rotate the bottom 2 bytes. For Scan, you can simply observe that there are general purpose bytes that any display function can use, and stick the 3rd byte in there and then read it out in the Scan routine. For the (FB, I think?) monster AI commands that bring back a monster at full HP, you simply look at whether it had a non-zero byte in the new expanded HP area, and copy it to your new RAM location if so (I used the bottom of the stack space for that, after many observations that the stack never grows all the way to it's limit). The actual function that adds/subtracts HP to targets had to be modified; for that I used the overflow bit (not as the processor designers intended, but merely to check if execution passed a certain point). The Elixir special effect had to be coded to see if it were being used on a monster, and to fill up that upper byte if so. Near-fatal status had to be aware of the 3rd byte... On and on it goes; just Ctrl+F for the variables that affect HP (either current or max) within C2, and you'll see every place that had to be hooked.
TLDR; 24-bit HP touches too many things to "easily" make a standalone patch. It would either take a re-write of the whole bank, or it would eat up so much free space that no other bug fixes could go in. I'm not sure if optimizing alone could resolve this, but I seriously doubt it.
I appreciate the prayers and good wishes. Those who don't know, I was diagnosed with stage 4 melanoma in 2019, and I have done well with the treatment, but eventually treatments stop working and you change. I recently had a seizure at work, now I am healing but not able to work or really do much at all. The focus is just to get better. Again, thanks for the support and if I can help you I will. I've forgotten more about this game than most people should ever learn, lol.
Posts: 763
Threads: 83
Joined: Apr 2015
Reputation:
22
Yeah, I did a little work on cleaning up an existing 24-bit monster HP patch (the one I got said it was by cklein0001)... and there were quite a few things not taken into account... things as simple as healing on the 3rd byte. I cant remember everything i did on it, I think there was a death bug too... i think if the bottom 2 bytes hit 00 it would trigger death, also drains wouldn't take the 3rd byte into account (i think this is how i found the death bug)... so yeah. I'm sure there's a bunch of other stuff i never got around to also.