• 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 fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Hack Tutorials: Trainer Editing

Status
Not open for further replies.

foullump

Rom Hacking Guru
221
Posts
17
Years
Trainer Editing

This is basicly just teach people how to edit trainers.
For this tutorial, you will need:
PET
RS BALL (Unless you already have the pics folder)
A ROM

If you are missing any of these, or all of these tools, visit http://www.freewebs.com/birminstudios/hacktools.htm and download the complete hack package.

Now then, let's begin.

Step One: Using RS Ball

(RS Ball is intended solely for geting the pictures of certain people or pokemon.)

Open RS Ball. (Can be found in elite map)

Go to pokemon in the pictures box.

Click Dump GFX BANK.

Then click trainers on the pictures box.

Dump the gfx bank.

Now, you are done.

Next:
Step Two: Using Pet
(For doing the actual editing)


First, open your rom in Pet. [You should see a bunch of names, numbers, and other stuff.]

Now, for the editing:
For now, we will just use the fist trainer. On a fire red rom, it should have a blank name, the class of aqua leader, and some random sprite. It really doesn't matter what the heck it has or shows, as long as you see something!

First, let's give it a name. How about Joe? So, let's go up to the trainer name box, and type in a name. When you click there, you may see a large indent before you type. It is important to get rid of this, so that when you play, it won't look like this:
Code:
PKMN TRAINER            JOE
would like to battle.

Then, let's say you don't like his class. Say you want it to be......Retard?
Go to options>edit trainer class, and then type your new one.

Then it comes to editing their sprite. All you need to do is click on the little arrows below the trainer's sprite's picture. Same thing goes with pokemon editing.
Make sure that you save all of your work ;)

But then, when you try to edit their moves, it might not work. But don't worry, their moves come standard depending on what pokemon and what level it is.

Oh yeah, next thing:
Giving a trainer more than one, or less than six pokemon.
Really, I suggest not changing the amounts, but if you must, beware: It may run into the offsets of other trainers!

And now,
Putting Your Trainer Into A Script
Really, just a plain trainer script in pokescript would look something like:
Code:
#org $trainer
checkflag 0x200
if B_true goto $done
trainerbattle 0x001 0x00 $allo $goodbye
setflag 0x200
end

#org $allo
$allo 1 = Hello.

#org $goodbye
$goodbye 1 = Good-Bye!

#org $done
end
0x00 for normal battles, 0x04 for 2-on-2 and 0x05 for rematches.
I don't know what the offset for an elite four battle is.
If anyone does, please tell me.

And that's about it. Hope this helped. Be on the lookout for my upcomming threads on scripting, special mapping, and many other things. I will try to cover everything I know about hacking!

See-ya!
 

foullump

Rom Hacking Guru
221
Posts
17
Years
Step Four: Using UNLZ.GBA (Optional)
This part is for tranfering trainers from one game to another. It's only necessary if there's a sprite you want that's in another game.

To do this, you must first open your rom in UNLZ.GBA, or PokePic, but I like UNLZ better. Go to the "Go to" box, and type in the graphic number of your trainer. In emerald, the fist trainer is at 1868, and the rest continue from there.
In Fire Red, they start at I believe 1500, maybe like 1498 or something, but it's very close.

Once you find the trainer you want, click "Save As" and save it as whatever name.
The next part you have two options, you can either edit the trainer you just exported, or keep it as it is. If you wanted to edit it, open it in paint and make whatever changes.

Now, when you're done with that, open the desired rom in UNLZ, and find the trainers. Right here it's a little complicated. Or at least, it can be. Find a trainer to overrite, and click "import". Find your picture that you dumped earlier, and select it. The next thing is to click "Write to rom." However, if the size is too big, you can do one of two things.
One (NOT RECOMMENDED): Uncheck the auto abort when you press write to rom.
HOWEVER, this may cause many flaws or glitches in your hack!
Or Two: Look for a different picture to overrite. (if you tried 1500, try 1501)
 
150
Posts
17
Years
Wow, thanks! This'll really help me!

Do you know how to edit a trainer with a hex editor too? If yes, can you make a tutorial of that too?
 

shadowboy166

Gues who's internet is working
92
Posts
16
Years
  • Age 29
  • hell
  • Seen Dec 7, 2023
Hi great tutorial just so you know this is the same shadowboy166 on youtube =) I should be posting a video of my hack eventauly... Probaly not soon though lol
 
145
Posts
16
Years
Hi foullump. Thank u for the tutorial. I have juste another question : is it possible to add a new trainer? I want to keep the already existing trainers and to add others, that's what I mean.
 

Youji

Game Designer
602
Posts
16
Years
Yes its possible. All you have to do is create a new person with advance map or elitemap.
Write a trainerscript like this:
#org 0x76ECF0
#raw 0x5C
trainerbattle 0x0 0x1 0x0 0x76ED30 0x76ED60
checkflag 0x10B
if 1 jump 0x76EE20
setflag 0x10B
release
end

#org 0x76ED30
= I'll defeat you!

#org 0x76ED60
= Mhhh? Maybe you're as good\nas I thought.\pYou should try to become the champ!


#org 0x76EE20
message 0x76EEF0
boxset 0x2
end

#org 0x76EEF0
= Jop you are very good.

Now Recognice that the 0x1 part is the trainer id of The Aqua leader. In FR this Trainer isn'T used so Change the picture change the pokémon and give your new person the script offset.

You've created your first Trainer.
 

Antwhan

setting up for the big beta
208
Posts
16
Years
this is really helpful for my hack, but now i get everything but one thing, how do u set up where the trainer's going to be after u compile the script and add it to the rom?

I've been searching for days and no luck on finding that out...
 

Youji

Game Designer
602
Posts
16
Years
this is really helpful for my hack, but now i get everything but one thing, how do u set up where the trainer's going to be after u compile the script and add it to the rom?

I've been searching for days and no luck on finding that out...

What do you mean? A Normal Trainer is standing there and do not walk. And if you mean the Trainer is ereasing than you're wrong.

Or what do you mean with your question?
 

Antwhan

setting up for the big beta
208
Posts
16
Years
What do you mean? A Normal Trainer is standing there and do not walk. And if you mean the Trainer is ereasing than you're wrong.

Or what do you mean with your question?

no, let me try and be clearer, i guess i was too vague.

I'm working on editing firered, and i want to add new trainers to it. Since there are the free places already in the rom for trainers i was trying to use those, like team aqua leader for example.

I was wondering how u determine where the trainer will be in the game so i could use advance map to copy the script and put the trainer where i wanted him in the game.
 

Youji

Game Designer
602
Posts
16
Years
Answer

I was wondering how u determine where the trainer will be in the game so i could use advance map to copy the script and put the trainer where i wanted him in the game.

Oh. Maybe I had help?:laugh:
No I figured it out by myself. I wondered what this free HOENN Trainers (I used PET) do there. And so I thoght I can use them in my game. All I have to do is to find free Space and insert a script like this. After that I can change the pic and the battlesound and the pokémon that's all. Do you meant this?;)
 
1
Posts
16
Years
  • Seen Jun 27, 2007
Hi, I only wanted to know something about the trainers. I can't put the trainer I want into a battle, i'm able to do the script ( finnaly loll ) Put when a get the chance to fight the trainer, it isn't the good trainer...can you help me????
 

Antwhan

setting up for the big beta
208
Posts
16
Years
Well it took me a while to figure out how the heck to set this up, now i have hit a small roadblock in this process, whenever i runinto the trainer, a red screen comes up, meaning the rom crashed >.< so now i have to figure out why.

it might have to do with trying to use pet's create script option however so i better just try to do it manually again.

I was so happy that i got the compliers to finally work. it took like a hundred trys to figure it out. lol
 

Youji

Game Designer
602
Posts
16
Years
Well it took me a while to figure out how the heck to set this up, now i have hit a small roadblock in this process, whenever i runinto the trainer, a red screen comes up, meaning the rom crashed >.< so now i have to figure out why.

it might have to do with trying to use pet's create script option however so i better just try to do it manually again.

I was so happy that i got the compliers to finally work. it took like a hundred trys to figure it out. lol

Just send me the script and we will figure it out together.
 

Antwhan

setting up for the big beta
208
Posts
16
Years
What do u use to script, Charmander07?

I was using Pokescript to set it up. Since That had the largest tutorial i could find on scripting.

I'll send you the script in the morning since i'm out of time online tonight, and i have ot try and organize my many copies of the roms and files now.
 
Status
Not open for further replies.
Back
Top