View Single Post
September 19th, 2011, 01:41 PM
Join Date: Jul 2010
Originally Posted by
Besides, the battle ram data might turn "empty" after the battle ends (happens with G/S/C at least)
I don't know about the actual data for enemy Pokemon, but if it's a trainer battle, the arguments passed to the trainerbattle command remains in RAM after the battle.
trainer battles go through that command. The effect where a trainer spots and walks to you is actually a "secret" script.)
So OP would need to copy the data for the enemy team -- six 100-byte (0x64) structures, the first of which is located at 0x0202402C. These structures store the full Pokemon data, including stat, health, and status information (with the possible exceptions of confusion and attraction).
The trainerbattle arguments should still be saved in RAM, so OP need only call a (heavily-modified) version of repeattrainerbattle. Modifications would need to be made to ensure that the Trainer sends out the Pokemon they were actually battling with earlier (since Trainers can switch out). (You'll also need to keep track of how many of their four items the Trainer has used, and restore that information upon initiating the battle.)
EDIT: Just in case anyone plans on analyzing battle ASM by looking at the trainer battle commands... Know that "trainerbattle" only
a battle -- and then it runs a script that calls "repeattrainerbattle". "Repeattrainerbattle" actually starts the battle (better name woulda been "dotrainerbattle").
PokeMart as debug input
script compilation at runtime
music: a dreadful tutorial
I'm not active and don't do this kind of stuff anymore. I'm now trying to create my own game engine.
two message boxes at once
[WIP] firered RAM map
list of all known flags/vars in firered
script command ref: 114 complete / 175 documented / 214
View Public Profile
Send a private message to DavidJCobb
Find all posts by DavidJCobb
Find threads started by DavidJCobb
Ignore Posts by DavidJCobb