Thread: Development: In-Battle Evolutions
View Single Post
Old September 19th, 2011 (11:46 PM).
DavidJCobb DavidJCobb is offline
Join Date: Jul 2010
Gender: Male
Nature: Lonely
Posts: 275
Originally Posted by Jambo51 View Post
Obviously, we would need to find the stat recalculation routines and make them update the stats, then finally update the stats in the battle ram. As you have no doubt gathered, this will not be a simple process, and indeed, may be improbable as it might make the game lag very badly.
I suspect that the battle ASM just acts directly on the player's Pokemon data -- the six 100-byte data structures stored at 0x02024284. That's the persistent storage area for the player's party, and immediately preceding it is the storage area used by battle ASM to hold up to six enemy Pokemon.

(My reasoning here is that... If you use "setwildbattle", it prepares the six enemy slots appropriately but doesn't start the battle. You can then modify the Pokemon it loads to the first enemy slot and then call "dowildbattle", and your modifications will remain intact (assuming either that you edited the non-protected stat data, or that you repaired the checksum after editing). The game doesn't back up loaded enemy Pokemon to some special location when it processes a battle, so why would the player's Pokemon be any different?)

So you could just modify the Pokemon; no need to move the data elsewhere, though. The stats in "the battle RAM" are the stats. Now, showing the updated data on-screen is another matter.
Reply With Quote