• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Hex Editing Trainers

Glitchfinder

Let's all get along, please?
477
Posts
17
Years
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!
 
18
Posts
17
Years
  • Seen Dec 20, 2010
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

Let's all get along, please?
477
Posts
17
Years
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.
 
18
Posts
17
Years
  • Seen Dec 20, 2010
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

Let's all get along, please?
477
Posts
17
Years
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

Quilava Trainer
51
Posts
17
Years
  • Age 32
  • Seen Aug 11, 2014
This is kind of confusing but I'll try it out before anything else


P.S. Thanks for this much needed tutorial.
 
6
Posts
16
Years
  • Seen Mar 11, 2009
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
 
695
Posts
17
Years
  • Age 31
  • Seen Aug 20, 2017
can someone

can someone give me the batle sprite of the boy of pokemon daimond
 
1
Posts
16
Years
  • Seen May 31, 2007
er...

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...
 

Supreme Dirt

used Petal Dance
430
Posts
16
Years
  • Age 32
  • o3o
  • Seen Dec 4, 2014
Alrighty...
How do I change the music played in battle? For example, changing the champion battle to the Deoxys battle music.
 
39
Posts
16
Years
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
 
Back
Top