PDA

View Full Version : [Tutorial] Trainer editing in G/S/C


miksy91
September 8th, 2010, 10:57 PM
Hex editing is rather easy, and I helped one of my friends in Youtube for learning it, and wrote this tutorial for him so I don't see a point why not to post it here too.


This applies somewhat for R/B/Y too although the hex codes for pokemon in R/B/Y don't really make any sense as they do in G/S/C (trainer data in R/B/Y doesn't begin after the name though - you've to search straight for the pokemon the trainer has).


Anyway, what you need to edit the pokemon trainers have are:
1) A hex editor (Translhextion, GoldFinger...)
2) A ROM of either Gold, Silver or Crystal
3) A table file of Pokemon Gold which is made for Crystal as well (Giegue's Hacking Guide has some strange table file for Crystal which probably works with the Japanese version but not USA)

Table file isn't really needed to do this but can help you out a lot in the beginning so that you won't get confused


TUTORIAL


1. Search in Google for Giegue's Master Hacking Guide.
2. Open the ROM in a hex editor.

The bytes for big letters are here:

A, 80
B, 81
C, 82
D, 83 etc.


Here is a simple example of editing pokemon that KENJI uses.
Now that you've the ROM opened, open the "Pokemon Gold" table file, and search for the name, KENJI (so basicly search for bytes 8A 84 8D 89 88).


You should see this:
8A 84 8D 89 88 50...
Byte 50 starts the pokemon data of the trainer.
It's usually like 00 [xx] [yy]...[xx] [yy], and ends with FF. Byte [xx] determines the level of the pokemon, and [yy] the number of the pokemon in pokedex (both written in hexadecimal system).


You can also change the amount of pokemon he uses by adding/taking letters to/off his name.
For example rename KENJI to KEN and make the data like this: 8A 84 8D 50 00... (so practically you replace 89 88 with 50 00, and change the following two bytes (50 00) to something else).
By taking two bytes off his name, you can enlarge his pokemon data by two bytes.

Also, the pokemon data of some trainers is like this:
[Name] 50 01 [6 bytes for each pokemon he has] FF

01 tells the game that the pokemon of that trainer, has special moves. The byte for every move is listed in Giegue's Master Hacking Guide.


Now, let's pretend that we want to create a random trainer that has one pokemon which knows special moves.

80 A1 A2 50 01 90 0E 25 39 7E ED FF

80 A1 A2 - Name (Abc)
50 - Pokemon data starts after this byte
01 - Pokemon of this trainer has/have special moves
90 - Level in hex (level 144 in the game which is 90 in decimal system)
0E - Kakuna
25 39 7E ED - Moves (Thrash, Surf, Fire Blast, Hidden Power)

Now this was one odd example but I hope you get the idea :D

Gamer2020
September 13th, 2010, 06:57 AM
Sorry dude but you really need to improve this tutorial. You could at least explain the different trainer types and maybe give some offsets :P

miksy91
September 13th, 2010, 10:57 AM
Sorry dude but you really need to improve this tutorial. You could at least explain the different trainer types and maybe give some offsets :P
I'll think about it but each trainer can easily be found anyway.
But yeah, I guess I could add information about trainer type byte being 02 and give some more examples.

Also, I'm quite certain it's possible add lot of new trainers to the game and make you battle them. So if that works as I believe, I'll write how to do it as well (more of a scripting job though).

EDIT:
Trainer data begins at 399c2 (Falkner) & ends at 3b684 (Female Grunt).
After that, there is empty space between 3b685 and 3bfff.

NinjaBoy1
October 30th, 2011, 09:17 AM
Im having trouble with the the big letters hexidecimals, what would ALBERT be in hex?

d4rk
November 8th, 2011, 04:01 AM
Hello there!

ALBERT would be written 80 8B 84 91 93 in hex.

I succeeded in changing some trainers, but some offsets are very well hidden.
For example do you know were I can edit the red haired trainer's Pokemon? or the rocket's grunts?

Sephiroth2009
November 11th, 2011, 07:18 PM
There's a program for that now.

Gamer2020 released it.

Besides look up his data by imputting "???" or "RIVAL" into the hex editor with the table file.

com3tiin
April 11th, 2014, 03:33 PM
A tutorial from the old school!

It is always good to know the manual method if some fault ocacionan tools.