-
Notifications
You must be signed in to change notification settings - Fork 989
Edit the trainer movesets
Pokémon Red and Blue have some really awkward methods for changing the trainer Pokémon's moves. To avoid dealing with that, we're going to steal the method used in Pokémon Yellow.
First, let's make backups of your old files, just in case we make a mistake and need to copy them back.
We are replacing the following files:
So, go ahead and make a copy of them, and save them somewhere nice and safe.
Now, download the equivalent files from pokeyellow.
- pokeyellow-master/data/trainers/special_moves.asm
- pokeyellow-master/engine/battle/read_trainer_party.asm
Replace the files in your pokered-master with those files. The game will run the same, but behind the scenes, we're now using Pokémon Yellow's trainer moveset code.
Note that this will change the movesets of some trainers to their Pokémon Yellow movesets. The methods outlined below can be used to change them back. Affected trainers are the Rival, the Gym Leaders, the Elite Four, a single Youngster and a single Bug Catcher.
We will be using the following files:
- data/trainers/special_moves.asm - This is the only file we will be editing. It contains a list of trainers and their Pokémon's moves. It only lists Pokémon with moves that aren't the default moveset, and only lists trainers with these special non-default-moveset Pokémon.
- data/trainers/parties.asm - We will use this file as a reference, to find the trainers we want.
Let's crack open the special-moves file. You'll find a bunch of entries already there, looking something like this:
db BUG_CATCHER, 15
db 2, 3, TACKLE
db 2, 4, STRING_SHOT
db 0
The first line, db BUG_CATCHER, 15
, tells us which trainer we're changing. The trainer type is first, then the trainer ID is second. IDs show exactly which trainer of a particular type you're referring to. BUG_CATCHER, 15
is totally different from YOUNGSTER, 15
, for example.
The ID number can be found in parties.asm. They aren't defined; just count through the list of the appropriate trainer type to figure them out.
Example: db YOUNGSTER, 4
- The fourth Youngster in parties.asm. By default, this is a Youngster on Route 24, with a Rattata, an Ekans and a Zubat.
The subsequent lines edit the team's moves. The first number is which Pokémon you're editing. The second number is the move's position in that Pokémon's moveset. Finally, the line finishes with the name of the move to place in that moveslot.
Example: db 2, 3, TACKLE
- Second Pokémon on the team; third move replaced with Tackle.
The last line, db 0
, terminates this section. It is added at the end of every team, once all the move changes have been implemented.
Now that we know what's in the files, making changes to the movesets is simple.
- Step 1: Identify the trainer you want to edit.
- Open parties.asm
- Search for the trainer type your trainer belongs to
- Find the exact trainer you want (most likely by matching up the Pokémon team they have)
- Count up the previous trainers of this trainer type to find this trainer's ID.
- Step 2: Add an entry for that trainer in special_moves.asm
- Open special_moves.asm
- Check to make sure your trainer doesn't already have an entry. If they do, skip to step 3.
- Add a new trainer entry, following the formatting of the other entries:
db <trainertype>, <trainerID>
- Step 3: Change the team's moves
- Find the position of the Pokémon whose move you want to change by checking their team in parties.asm
- Choose which move to replace by checking the Pokémon's current moveset (it will know the four most recent moves it can learn on its basic moveset, in order from lowest-level to highest-level)
- Add a line to replace this move;
db <Pokémonnumber>, <movenumber>, <move>
- Add more lines to replace more moves in the same block. You can change more moves of the same Pokémon, and moves of different Pokémon on the same team, all in the same block.
- Step 4: Terminate
- Add a line after your last move, which contains
db 0
. This finishes up the code block for that trainer. - You're done! You should have a codeblock that looks like all the others.
- Add a line after your last move, which contains
-
The movelist can be found in data/moves/names.asm
-
In theory, this table might get too big. You'd have to move it to its own bank in that case. I don't know what this entails, but at least it seems to have a solution.