PDA

View Full Version : Hex Editing Trainers


Glitchfinder
February 13th, 2007, 10:50 AM
Hi! I decided to post another tutorial that I had translated from the tutorials at the German site Rom Hackers World. This one is on hex-editing trainers.


The examples are taken out of Sapphire, which should be the same as ruby.
You should be able to find the data by loading a text editing table, searching the
trainer name, and using the pointer that is with the trainer's name when you find it
with a bunch of other trainers.
WARNING: Do not change the two bytes before the data.
The format is as follows for normal trainers:
< 0000 > < 1A00 > < 4A01 > < 0000 > | < 0000 > < 1A00 > < 4A01 > < 0000 >
This is the data for a fisherman.
This is what each number means with normal trainers:
< 0000 > < level > < 00 > < POKÉMON 1 > < carried Item (0000 for no Item) > | < 0000 > < level > < 00 > < POKÉMON 2 > < carried Item > etc..
Here is an example:
< 0000 > < level 1A = 26 > < 00 > < Carvanha = 4A01 > < 0000 > |
< 0000 > < level 1A = 26 > < 00 > < Carvanha = 4A01 > < 0000 >
Gym leaders have the attacks too!
< C800 > < 1600 > < 5100 > < 3000 > < 3100 > < 5400 > < 5600 > < 0000 >
< C800 > < 1400 > < 6400 > < CD00 > < 7800 > < D100 > < 3100 > < 0000 >
< FA00 > < 1700 > < 5200 > < 3000 > < 3100 > < 5F00 > < 5600 > < 0000 >
This is the data for Watson, who has the Electric gym.
This is the structure:
< C800 > < level > < 00 > < POKÉMON 1 > < attack 1 > < attack 2 > < attack 3 > < attack 4 > < 0000 >
< C800 > etc..
Pay attention:
The first byte, C8, is untested and may not not be safe!

skaterseba
February 13th, 2007, 04:08 PM
i would like to know that if with this i can create my own battle i mean i choose the scene
and all that if it can be make can you tell me how=?

Glitchfinder
February 14th, 2007, 01:13 PM
All you have to do is change the pointer of the battle you want to edit. (Or add, if you're editing FR/LG. In FR/LG, there's a whole bunch of blank or semiblank battles you can use) The pointer will be found where you see a bunch of trainer names together. (Just use a table file, and search the name of a trainer you know [in caps], I just search BROCK) Then, scroll to the blank spaces where names could be, add a name, and change the offset to that of a blank area within the ROM. Then, you can use this tutorial to edit the data of the trainer by changing the values in the blank area where the new offset points to. If you figure out how to make it a gym leader, please tell me, because I'll put it into the tutorial. The Gym Leaders and Elite Four members all have preprogrammed moves for their Pokemon, while normal trainers don't. Finally, I would use PET to change the type of trainer that appears, as well as which trainer sprite the trainer uses.

skaterseba
February 14th, 2007, 01:31 PM
what i mean is that if i can create a battle from zero with a hex editor i mean like adding a battle to the game?

Glitchfinder
February 14th, 2007, 03:58 PM
I'm not sure about that. If you edit FR/LG, then there is no need, because half of the battles aren't used. I have no idea about inserting new ones. (I've never tried it) If anyone figures out how, please PM me, and I'll add it to the tutorial.

userpr
February 14th, 2007, 05:31 PM
This is kind of confusing but I'll try it out before anything else


P.S. Thanks for this much needed tutorial.

Wil06
March 28th, 2007, 08:13 PM
sorry if this is off topic but does PET work with emerald? i have tried it and the trainer names are like not coming out and i get an error while searching for a trainer

skaterseba
March 29th, 2007, 04:46 PM
it doesn`t work with emerald
just with ruby/ safire

Irish Witch
March 29th, 2007, 08:44 PM
And even then it doesn't work properly....

skaterseba
March 30th, 2007, 04:37 PM
yeah it`s not the best programs of all xD not even battle ... is good(?)

tImE
March 31st, 2007, 03:04 AM
Where can I find a table file for ruby?

Black Charizard.
March 31st, 2007, 06:53 AM
can someone give me the batle sprite of the boy of pokemon daimond

chordleburger
May 27th, 2007, 10:16 AM
All you have to do is change the pointer of the battle you want to edit. (Or add, if you're editing FR/LG. In FR/LG, there's a whole bunch of blank or semiblank battles you can use) The pointer will be found where you see a bunch of trainer names together. (Just use a table file, and search the name of a trainer you know [in caps], I just search BROCK) Then, scroll to the blank spaces where names could be, add a name, and change the offset to that of a blank area within the ROM. Then, you can use this tutorial to edit the data of the trainer by changing the values in the blank area where the new offset points to. If you figure out how to make it a gym leader, please tell me, because I'll put it into the tutorial. The Gym Leaders and Elite Four members all have preprogrammed moves for their Pokemon, while normal trainers don't. Finally, I would use PET to change the type of trainer that appears, as well as which trainer sprite the trainer uses.

Could you rephrase this some? It doesn't help me at all. What exactly do I do with the table file? Where exactly do I search for Brock? What programs should I be using to do this? I gave this a try but I didn't get anywhere...

Elementologist
September 7th, 2007, 08:14 AM
Where can I Get A Table File for FR/LG and EMERALD

Supreme Dirt
September 16th, 2007, 07:13 AM
Alrighty...
How do I change the music played in battle? For example, changing the champion battle to the Deoxys battle music.

Ineffable~
August 30th, 2008, 09:58 AM
When I go to the offset, how do I know when the text ends and the battle begins
in the hexes?

roywillow
August 30th, 2008, 07:33 PM
I think there are at least four type of PKMN info structure, the structure is decided by the first byte of the basic trainer infomation: 00, 01, 02, 03. 00 maybe no item, no attack, and 03 maybe have item and attacks.
The first byte of PKMN infomation may means AI? I heard this word once. The PKMN of elite four have the highest: FF