Script Help Thread (DO NOT REQUEST SCRIPTS)
View Single Post
October 3rd, 2011 (11:32 AM).
Join Date: Jul 2010
Quote originally posted by
I have some questions about trainerbattle.
For trainerbattle 0x1, it can be used for both rival and GYM leader? What about the music during the battle? How can I change it?
For trainerbattle 0x3, it seems that it's for elite four, but some said that for 0x3, the script will continue even if you've lost in the battle. So what is the exact function for 0x3?
And for other kinds of trainerbattle, what are their functions?
View original post
Type 0 is an ordinary battle. Script execution stops after the battle, regardless of its outcome.
1 and 2 are identical, and run scripts after the battle ends (but only if the player won). They except one extra argument: the offset of the script to run. (The script with "trainerbattle" stops running, and the offset you specify starts running.)
3 is a continue-battle. The script that calls "trainerbattle" keeps running after the battle (but only if the player won).
4 is a double battle. It accepts one extra argument: the offset of some text to display if the player does not have two or more usable Pokemon (and hence can't start the battle).
5 is a rematch battle. It's
identical to 0, but it will actually check the trainer number and do a lookup, to see if you're supposed to battle one of their rematch battles instead. To use this to its fullest potential, you would need to learn more about the rematch functionality.
6 is a special kind of double battle that accepts
extra arguments. I have no idea what the second extra argument is.
7 is a double rematch battle.
8 is a clone of 6.
9 is a tutorial battle. So far as I know, it functions identically to 0 except that the player will not whiteout if they lose the battle. Passing in 0x0003 instead of 0x0000 (as the unknown halfword argument) enables Oak's mid-battle narration.
All other values are treated as type-0 battles.
Note that if the trainer you specify has already been defeated, "trainerbattle" does nothing and the script that calls it will keep running
you used a rematch battle type. And I think you need an ASM hack to change the music.
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