summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIIMarckus <iimarckus@gmail.com>2012-10-21 17:56:57 -0600
committerIIMarckus <iimarckus@gmail.com>2012-10-21 17:56:57 -0600
commit7d2fc1c7cc6c7e28a7f3a535b245af764817f1c4 (patch)
treed8fad1bb827d731554bbadb77b135174be693c82
parentdc5065b0fc4ba636f75bb4d09b02c46eb81e55e1 (diff)
downloadhaxwiki-7d2fc1c7cc6c7e28a7f3a535b245af764817f1c4.tar.gz
haxwiki-7d2fc1c7cc6c7e28a7f3a535b245af764817f1c4.zip
Add trainer editing tutorial.
-rw-r--r--GSC/Trainers.mdwn120
-rw-r--r--index.mdwn2
2 files changed, 122 insertions, 0 deletions
diff --git a/GSC/Trainers.mdwn b/GSC/Trainers.mdwn
new file mode 100644
index 0000000..231ce6e
--- /dev/null
+++ b/GSC/Trainers.mdwn
@@ -0,0 +1,120 @@
+Editing trainer data is extremely simple. First, let's find the trainer we wish to edit.
+
+Trainers are sorted by class: all Fishers are in a group, all Youngsters are in another group, and so on. A list of the classes is below:
+
+ * 01 Leader [Falkner]
+ * 02 Leader [Whitney]
+ * 03 Leader [Bugsy]
+ * 04 Leader [Morty]
+ * 05 Leader [Pryce]
+ * 06 Leader [Jasmine]
+ * 07 Leader [Chuck]
+ * 08 Leader [Clair]
+ * 09 Silver [1]
+ * 0A Pokémon Prof.
+ * 0B Elite Four [Will]
+ * 0C PKMN Trainer [Cal]
+ * 0D Elite Four [Bruno]
+ * 0E Elite Four [Karen]
+ * 0F Elite Four [Koga]
+ * 10 Champion
+ * 11 Leader [Brock]
+ * 12 Leader [Misty]
+ * 13 Leader [Lt.Surge]
+ * 14 Scientist
+ * 15 Leader [Erika]
+ * 16 Youngster
+ * 17 Schoolboy
+ * 18 Bird Keeper
+ * 19 Lass
+ * 1A Leader [Janine]
+ * 1B Cooltrainer♂
+ * 1C Cooltrainer♀
+ * 1D Beauty
+ * 1E Pokémaniac
+ * 1F Rocket [Male Grunt]
+ * 20 Gentleman
+ * 21 Skier
+ * 22 Teacher
+ * 23 Leader [Sabrina]
+ * 24 Bug Catcher
+ * 25 Fisher
+ * 26 Swimmer♂
+ * 27 Swimmer♀
+ * 28 Sailor
+ * 29 Super Nerd
+ * 2A Silver [2]
+ * 2B Guitarist
+ * 2C Hiker
+ * 2D Biker
+ * 2E Leader [Blaine]
+ * 2F Burglar
+ * 30 Firebreather
+ * 31 Juggler
+ * 32 Blackbelt
+ * 33 Rocket [Male Executive]
+ * 34 Psychic
+ * 35 Picnicker
+ * 36 Camper
+ * 37 Rocket [Female Executive]
+ * 38 Sage
+ * 39 Medium
+ * 3A Boarder
+ * 3B Pokéfan [Male]
+ * 3C Kimono Girl
+ * 3D Twins
+ * 3E Pokéfan [Female]
+ * 3F PKMN Trainer [Red]
+ * 40 Leader [Blue]
+ * 41 Officer
+ * 42 Rocket [Female Grunt]
+ * 43 Mysticalman [Eusine] (Crystal only)
+
+To find where each group is stored, follow its two‐byte pointer from the array at offset 0x3993E (Gold/Silver) or 0x39999 (Crystal).
+
+Next, load the table file in your hex editor and search for the trainer’s name. You should be taken immediately to the trainer data, which is stored like this:
+
+ <Trainer Name> <0x50> <Data type> <Pokémon Data>+ <0xFF>
+
+The Pokémon data format varies based on the Data Type.
+
+ * Data type <0x00>: Pokémon Data is <Level> <Species>. Used by most trainers.
+ * Data type <0x01>: Pokémon Data is <Level> <Pokémon> <Move1> <Move2> <Move3> <Move4>. Used often for Gym Leaders.
+ * Data type <0x02>: Pokémon Data is <Level> <Pokémon> <Held Item>. Used mainly by Pokéfans.
+ * Data type <0x03>: Pokémon Data is <Level> <Pokémon> <Held Item> <Move1> <Move2> <Move3> <Move4>. Used by a few Cooltrainers.
+
+# Example 1
+
+I want to replace Youngster Mikey’s Rattata with a Pikachu. I see the bytes 0xA4 0x5D at [0x3993E + (0x16 − 1) × 2 = 0x39968], so Youngsters are kept at offset 0x39DA4. I go there and search for “MIKEY”, winding up at 0x39DAD.
+
+The bytes there are:
+
+ 8c 88 8a 84 98 50 00 02 10 04 13 ff
+
+Which translate to:
+
+ * MIKEY
+ * 0x50
+ * Data type 0x00
+ * Level 2 Pidgey
+ * Level 4 Rattata
+
+So I replace the 0x13 representing Rattata with 0x19 for Pikachu.
+
+# Example 2
+
+I want to give Falkner a Hoothoot. Falkner’s class is the first, so I follow the pointer at 0x3993E to 0x399C2. Since there is only one Falkner, the data here are what I want to change:
+
+ 85 80 8b 8a 8d 84 91 50 01 07 10 21 bd 00 00 09 11 21 bd 10 00 ff
+
+ * FALKNER
+ * 0x50
+ * Data type 0x01
+ * Level 7 Pidgey: Tackle, Sand‐Attack
+ * Level 9 Pidgeotto: Tackle, Sand‐Attack, Mud Slap
+
+I just need to add some Hoothoot data near the end:
+
+ 85 80 8b 8a 8d 84 91 50 01 07 10 21 bd 00 00 09 11 21 bd 10 00 0a a3 21 2d c1 00 ff
+
+But wait! This is longer than the original, so just adding those bytes will make the data clash with Whitney’s data at 0x399D8. Instead, I put Falkner’s new trainer data in some free space in the same bank: offset 0x3B800. Then I change the pointer at 0x3993E to 00 78 in order to point to it.
diff --git a/index.mdwn b/index.mdwn
index 3384ccb..dffd627 100644
--- a/index.mdwn
+++ b/index.mdwn
@@ -39,6 +39,8 @@ Now "git push" should work without debilitating complaint.
* [[GSC/Flags]]
+* [[GSC/Trainers]]
+
# Community
* [Message board](http://hax.iimarck.us/)