summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Add-a-new-trainer-class.md125
1 files changed, 62 insertions, 63 deletions
diff --git a/Add-a-new-trainer-class.md b/Add-a-new-trainer-class.md
index e52a019..6c768da 100644
--- a/Add-a-new-trainer-class.md
+++ b/Add-a-new-trainer-class.md
@@ -8,8 +8,8 @@ This tutorial is for how to add a new trainer class. As an example, we'll add th
3. [Define their attributes](#3-define-their-attributes)
4. [Define their DVs](#4-define-their-dvs)
5. [Define their encounter music](#5-define-their-encounter-music)
-6. [Define their individual parties](#6-define-their-individual-parties)
-7. [Design their sprite](#7-design-their-sprite)
+6. [Design their sprite](#6-design-their-sprite)
+7. [Define their individual parties](#7-define-their-individual-parties)
8. [Define their Battle Tower sprite and gender](#8-define-their-battle-tower-sprite-and-gender)
9. [Fix bank overflow errors](#9-fix-bank-overflow-errors)
@@ -150,7 +150,9 @@ Edit [data/trainers/dvs.asm](../blob/master/data/trainers/dvs.asm):
The four digits define, in order, the Attack, Defense, Speed, and Special DVs for all the trainer class's Pokémon. (Remember, in Gen 2 there was one DV for both Special Attack and Special Defense; and bits from all four DVs were combined to calculate HP.)
-So that trainers' genders would correspond with those of their Pokémon, female trainer classes tend to have low Attack DVs (since gender in Gen 2 was determined by the Attack and Speed DVs, primarily Attack). Gym Leaders are mostly an exception to this rule.
+Female trainer classes tend to have low Attack DVs so that their Pokémon will usually be female (since gender in Gen 2 was determined by the Attack and Speed DVs, primarily Attack). Gym Leaders are mostly an exception to this rule.
+
+You may also want to choose DVs that give some important Parasol Lady the right Hidden Power type, if that's relevant.
## 5. Define their encounter music
@@ -163,7 +165,7 @@ Edit [data/trainers/encounter_music.asm](../blob/master/data/trainers/encounter_
db MUSIC_HIKER_ENCOUNTER ; none
...
db MUSIC_HIKER_ENCOUNTER ; mysticalman
- db MUSIC_BEAUTY_ENCOUNTER ; parasol lady
++ db MUSIC_BEAUTY_ENCOUNTER ; parasol lady
- db MUSIC_HIKER_ENCOUNTER
- db MUSIC_HIKER_ENCOUNTER
- db MUSIC_HIKER_ENCOUNTER
@@ -176,65 +178,7 @@ Notice that we removed three extra `MUSIC_HIKER_ENCOUNTER`s at the end without a
If you want different music to play *during* battle, you'll need to edit `PlayBattleMusic` in [engine/battle/start_battle.asm](../blob/master/engine/battle/start_battle.asm). It's a series of [hard-coded logic](Hard-coded-logic#trainer-classes-with-different-battle-music) checks for various conditions under which to play special battle music. Decide carefully where to place a check for your new condition—like whether `[wOtherTrainerClass]` is `PARASOL_LADY`, or whether `[wOtherTrainerClass]` is `PARASOL_LADY` *and* `[wOtherTrainerID]` is `SUE`—so that you don't break assumptions made by the other checks.
-## 6. Define their individual parties
-
-Edit [data/trainers/party_pointers.asm](../blob/master/data/trainers/party_pointers.asm):
-
-```diff
- TrainerGroups: ; 0x39999
- ; entries correspond to trainer classes (see constants/trainer_constants.asm)
- dw FalknerGroup
- ...
- dw MysticalmanGroup
-+ dw ParasolLadyGroup
-```
-
-Then edit [data/trainers/parties.asm](../blob/master/data/trainers/parties.asm):
-
-```diff
- FalknerGroup:
- ; FALKNER (1)
- db "FALKNER@", TRAINERTYPE_MOVES
- db 7, PIDGEY, TACKLE, MUD_SLAP, NO_MOVE, NO_MOVE
- db 9, PIDGEOTTO, TACKLE, MUD_SLAP, GUST, NO_MOVE
- db -1 ; end
-
-
- ...
-
-
- MysticalmanGroup:
- ; MYSTICALMAN (1)
- db "EUSINE@", TRAINERTYPE_MOVES
- db 23, DROWZEE, DREAM_EATER, HYPNOSIS, DISABLE, CONFUSION
- db 23, HAUNTER, LICK, HYPNOSIS, MEAN_LOOK, CURSE
- db 25, ELECTRODE, SCREECH, SONICBOOM, THUNDER, ROLLOUT
- db -1 ; end
-+
-+
-+ParasolLadyGroup:
-+ ; PARASOL_LADY (1)
-+ db "SUE@", TRAINERTYPE_NORMAL
-+ db 28, GOLDEEN
-+ db 30, GOLDUCK
-+ db -1 ; end
-```
-
-The comment at the top of parties.asm explains the data structure:
-
-```
-; Trainer data structure:
-; - db "NAME@", TRAINERTYPE_* constant
-; - 1 to 6 Pokémon:
-; * for TRAINERTYPE_NORMAL: db level, species
-; * for TRAINERTYPE_ITEM: db level, species, item
-; * for TRAINERTYPE_MOVES: db level, species, 4 moves
-; * for TRAINERTYPE_ITEM_MOVES: db level, species, item, 4 moves
-; - db -1 ; end
-```
-
-
-## 7. Design their sprite
+## 6. Design their sprite
Create **gfx/trainers/parasol_lady.png**:
@@ -289,6 +233,61 @@ Anyway, edit [data/trainers/palettes.asm](../blob/master/data/trainers/palettes.
parasol_lady.2bpp.lz and parasol_lady.pal will be automatically generated from parasol_lady.png when you run `make`.
+## 7. Define their individual parties
+
+Edit [data/trainers/party_pointers.asm](../blob/master/data/trainers/party_pointers.asm):
+
+```diff
+ TrainerGroups: ; 0x39999
+ ; entries correspond to trainer classes (see constants/trainer_constants.asm)
+ dw FalknerGroup
+ ...
+ dw MysticalmanGroup
++ dw ParasolLadyGroup
+```
+
+Then edit [data/trainers/parties.asm](../blob/master/data/trainers/parties.asm):
+
+```diff
+ FalknerGroup:
+ ; FALKNER (1)
+ db "FALKNER@", TRAINERTYPE_MOVES
+ db 7, PIDGEY, TACKLE, MUD_SLAP, NO_MOVE, NO_MOVE
+ db 9, PIDGEOTTO, TACKLE, MUD_SLAP, GUST, NO_MOVE
+ db -1 ; end
+
+ ...
+
+ MysticalmanGroup:
+ ; MYSTICALMAN (1)
+ db "EUSINE@", TRAINERTYPE_MOVES
+ db 23, DROWZEE, DREAM_EATER, HYPNOSIS, DISABLE, CONFUSION
+ db 23, HAUNTER, LICK, HYPNOSIS, MEAN_LOOK, CURSE
+ db 25, ELECTRODE, SCREECH, SONICBOOM, THUNDER, ROLLOUT
+ db -1 ; end
++
++ParasolLadyGroup:
++ ; PARASOL_LADY (1)
++ db "SUE@", TRAINERTYPE_NORMAL
++ db 28, GOLDEEN
++ db 30, GOLDUCK
++ db -1 ; end
+```
+
+The comment at the top of parties.asm explains the data structure:
+
+```
+; Trainer data structure:
+; - db "NAME@", TRAINERTYPE_* constant
+; - 1 to 6 Pokémon:
+; * for TRAINERTYPE_NORMAL: db level, species
+; * for TRAINERTYPE_ITEM: db level, species, item
+; * for TRAINERTYPE_MOVES: db level, species, 4 moves
+; * for TRAINERTYPE_ITEM_MOVES: db level, species, item, 4 moves
+; - db -1 ; end
+```
+
+
## 8. Define their Battle Tower sprite and gender
If a trainer class is used in Battle Tower, as defined in [data/battle_tower/classes.asm](../blob/master/data/battle_tower/classes.asm), it will need a defined sprite and gender. The sprite is used when the trainer walks into the room, and their gender determines what they say. Even if you don't add a Parasol Lady to the Battle Tower roster, it's helpful to keep the data tables up-to-date.