Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 8/3,578

Trainer Editing Tutorial

Moved to wiki

Last edited by Mateo (2011-11-12 09:41:28)

Offline

#2 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 6/53

Re: Trainer Editing Tutorial

Yeah I found this again!
Whew I thought it was gone forever...
I didn't know there was an "03" type.

At least I know now.

I started a Trainer Editor and it's working so far.

Can you please post on how to change the money you get when you win and changing which trainer image is shown if you know how?

I'm more of a GBA hacker so I don't know everything in GSC  :P

Offline

#3 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 119/3,578

Re: Trainer Editing Tutorial

Okay, which image is shown is not determined in this list.

When you encounter a trainer, the game loads a trainer group and a trainer number within that group.

It takes the group, and then picks which trainer's data from that group. There is a pointer table saying where each trainer group's data starts.

This tutorial deals with editing individual trainers within that group. To change the type of trainer, you will have to edit the event's script to call a different trainer group, and then edit a trainer in that group.

Hopefully that made sense.

Offline

#4 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 7/53

Re: Trainer Editing Tutorial

Nope I'm a bit confluzzed =/
Can you give me an example please?

Offline

#5 1970-01-01 00:33:30

Miksy91
Member
Registered: 2010-10-16
Post 36/2,339

Re: Trainer Editing Tutorial

I don't think this will help but I believe in G/S + C the data of the trainers are mostly the same.
The editor I've can also change the moves of cooltrainers and that could help when checking which trainers have this feature.

Offline

#6 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 13/53

Re: Trainer Editing Tutorial


I don't think this will help but I believe in G/S + C the data of the trainers are mostly the same.
The editor I've can also change the moves of cooltrainers and that could help when checking which trainers have this feature.

Um what?

Well actually my editor is already handling all of the data.
It reads the data byte and loads what it needs to load.

I only need to know about the other stuff.

Offline

#7 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 121/3,578

Re: Trainer Editing Tutorial

Okay, let me see if I can explain my earlier post better.
What is described here is how to edit the individual trainer instances in any given trainer group. This data does not contain a way to change what type of trainer it is.

The event's script that calls the trainer determines that. For example.

We'll say you have someone call trainer group 1 trainer 1.
The game then looks at the pointer tables to see where trainer group 1's trainers start, and loads the first trainer in the list.

What this tutorial describes is just how to change the trainers in that list, but not what list they are in. That make more sense?

Offline

#8 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 15/53

Re: Trainer Editing Tutorial

Yeah kinda...

Well look what I got so far...

zx1k60.png

Note:Levels are in hex I forgot to add "cint"

Can you please post like an example script of a trainer battle?

I tried decompiling the script of a trainer in PKSVUI but it came out weird.

Offline

#9 1970-01-01 00:33:30

Miksy91
Member
Registered: 2010-10-16
Post 38/2,339

Re: Trainer Editing Tutorial

Your editor can't add more pokemon to the trainers, right?
Anyway it's awesome you're making a trainer editor  :D

If you can find data for these trainers in crystal that would be great (I can edit others with trnpkmn).

1) A person in Ilex Forest
2) The female rocket grunt in Mahogany who's one of the passwords
3) The female rocket executive in Mahogany
4) Two people in Mt. Mortar (excluding Karate King)

EDIT:
By the way I tried to do what Mateo pointed in the first post but I didn't really found pokemon data for trainers (at least I thought I didn't since in the place where the names of people were stored was not enough space for their pokemon data to be there)

Offline

#10 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 17/53

Re: Trainer Editing Tutorial

Um those trainers should be there. Give me the names and I'll Load the ROM and take a look.

To add Pokemon one in theory would have to shorten a name and stuff. I am thinking about adding support for that but at the moment it won't allow for adding more pokemon.

If you think you can do a better job then do so -_-

Offline

#11 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 124/3,578

Re: Trainer Editing Tutorial

Okay, lets see. For your standard trainers, the script pointer doesn't point to a normal script, so pksv won't load it right. Gym Leaders will load a normal script that calls a battle, but typical trainers have their color/function byte set to declare them as a trainer, and their script pointer points to this format:

[Bit no. (2byte)][Trainer group][Trainer][2byte pointer to Text when seen][2byte pointer to text when trainer beaten][2byte pointer to script when lost (0000=Blackout)][2byte pointer to script if won/talked to again]


Basically, this does not lend itself well to being changed in a separate editor, but would be best included in a map editor, so that if the person is a trainer it can load their data from there. It will be really annoying for you to go through and find every single trainer's script just to make it so you can change which type of trainer they are. It would be easier to just have it like it is, so you can pick which group you are editing and each trainer in those groups, and then just call those trainers when you make a script.

Offline

#12 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 18/53

Re: Trainer Editing Tutorial

seems a little similar to the GBA trainer battles in a way.

[Trainer group][Trainer]

How many bytes each?

Offline

#13 1970-01-01 00:33:30

Miksy91
Member
Registered: 2010-10-16
Post 40/2,339

Re: Trainer Editing Tutorial

I tried to edit them but when I went here:
[Trainer Name +&h50][Data Type][Pokémon Data]

I saw the trainer name but I don't think there was other data for their pokemon after that  :o

Also I'll check the names as they come up (including the ones in Dragon's Den I forgot to mention)
Thanks  ☺

Offline

#14 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 20/53

Re: Trainer Editing Tutorial


seems a little similar to the GBA trainer battles in a way.

[Trainer group][Trainer]

How many bytes each?

I took a look at a trainer in a ROM.
1 Byte each?



I tried to edit them but when I went here:
[Trainer Name +&h50][Data Type][Pokémon Data]

I saw the trainer name but I don't think there was other data for their pokemon after that  :o

Also I'll check the names as they come up (including the ones in Dragon's Den I forgot to mention)
Thanks  ☺

That can't be right =/

Well as long as they are in the list (They should be) The editor can edit them.

Offline

#15 1970-01-01 00:33:30

Miksy91
Member
Registered: 2010-10-16
Post 41/2,339

Re: Trainer Editing Tutorial

Actually by trying I was able to edit the two trainers in Mt. Mortar  :D

Offline

#16 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 125/3,578

Re: Trainer Editing Tutorial

Ah, sorry to not specify. Yes, trainer group and trainer number are 1 byte each.

Offline

#17 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 21/53

Re: Trainer Editing Tutorial

It's cool.
I should have just looked at the script in the ROM.

hmm I wonder how on would edit it to change which trainers are in which group and stuff.

Offline

#18 1970-01-01 00:33:30

Miksy91
Member
Registered: 2010-10-16
Post 42/2,339

Re: Trainer Editing Tutorial

I don't think this will work but for example in my hack I edited Morty's name to be Cid.
Then there would be two new bytes to spare if I move the other data to appear two bytes earlier than before but that would probabaly mess up the game, right?

Offline

#19 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 22/53

Re: Trainer Editing Tutorial

Um just put 0x25 (I think thats the value) in the unused letter slots.
My editor does it for you ^^

Just wait a few days for me to release it.

Offline

#20 1970-01-01 00:33:30

Miksy91
Member
Registered: 2010-10-16
Post 43/2,339

Re: Trainer Editing Tutorial


Um just put 0x25 (I think thats the value) in the unused letter slots.
My editor does it for you ^^

Just wait a few days for me to release it.

Actually I replaced Morty's name with "Cid+7F7F".
7F is an emply area in the text box.

But I meant if it's possible to make him have more pokemon if the name is shortened?

Offline

#21 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 23/53

Re: Trainer Editing Tutorial

umm hmm. You may have to change the data type. It's a little hard to make it fit.

Actually...

In theory if you make it data type 00 you can make the name a bit longer. Not sure though =/

Offline

#22 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 126/3,578

Re: Trainer Editing Tutorial

YOu could. See with gym leaders, its not a big deal because there is only one entry in that trainer group. With other trainers, if you leave blank space after that entry you will mess up the other trainers after them.

To change which trainers are in which trainer group, you will have to copy and paste them into the list for the other group, which would mean you will pretty much have to repoint that group's data.

Offline

#23 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 127/3,578

Re: Trainer Editing Tutorial

Actually, it is 0x25 for blank. The game skips the 0x25 character completely. To use Hyper Hacker's example, if you type the word "T_OAS_T" where "_" is the character 0x25, the game will display "TOAST" perfectly.

Offline

#24 1970-01-01 00:33:30

Gamer2020
Member
Registered: 2010-10-16
Post 25/53

Re: Trainer Editing Tutorial


Actually, it is 0x25 for blank. The game skips the 0x25 character completely. To use Hyper Hacker's example, if you type the word "T_OAS_T" where "_" is the character 0x25, the game will display "TOAST" perfectly.

Yeah I knew that was the value!
The editor adds it automatically if you give the trainer a shorter name then the original.

Although you should know that there is an other value that will do the same I just forgot which one.

Offline

#25 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 129/3,578

Re: Trainer Editing Tutorial

Ah. I was not aware of that, but it does not surprise me. I'll have to research some of the text codes more fully

Offline

Board footer

Powered by FluxBB