Quote originally posted by metapod23:
It's something I'm willing to do, but how? How would I find that original routine? Is it in the party Pokemon data? And if it's not the "Sanity Byte," what is it?
View original post
Well, I surely trust Kawa's research. Which means that the "Sanity Byte" means exactly this:
The sanity byte determines if the individual is an egg. Zero and 2 are a regular monster, 1, 3-5 are Bad EGGs but can be changed back, 6 makes the game write "EGG" instead of the monster's nickname but doesn't actually make it an egg and 7 is the actual Bad EGG. When you break the checksum, the sanity byte is set to 7. This persists! Several actions in the game (see below) make it check for Bad EGGs and keep resetting the byte to 7, for example stepping into tall grass and opening the party screen. Good luck turning the Bad EGG back into a real monster. Note that only the first few bits matter so the pattern repeats after 7.
(Sure there is the possibility he made a mistake.)
Anyway, how I would try to find this routine you need to expand is, well..
The game displays a message when the Pokémon isn't willing to obey you, right?
I would try to find out when that message is loaded and like so work my way back and find the actual routine that does the 'check'.
Also, if indeed the "Sanity Byte's" pattern repeats after 7, you could easily use a bit from that byte for the new 'flag'. At least I think you could.