Creating a Trainer


In this I will explain how to create a trainer for your game using the Pokemon Battle System script. Assuming that you either have the starter kit or the scripts required for the battle system to work let’s get started.

Step 1: Creating a Trainer Class

Trainer Classes are very important. They are defined in the Trainers script. The most important part is the name.

First locate the Trainers script in the script editor.

Now let’s add the Leader trainer class:


Next is the name:


Now let’s add the gender extensions. These are added to the name depending on the gender of the trainer. This is only displayed if you have Bubs Gender Function. For Leaders this is left blank.


Now were are going to add the image files for default. These don’t do anything outside of battle facilities. We will leave all of these blank.


Finally we will add the notes and close the hash. The notes can be what every you’d like them to be they do nothing by default.


Now that the trainer class it is now time to make the trainer itself.

Step 2: Making the trainer

The only things important here  are the sprite Gold, and Notes. Trainers don’t usually drop items but is is there if your want to.

We will make Brock. In the name box put Brock.

Make his sprite to that of Brock. If using the ones in Pokemon for ace use the static one.

Change his Gold to 200. This makes it so his payout rate is 200 (payout = rate * level of last Pokemon in party)

Add the following notetags to the notebox

<gender: male>
<intro pose>
<class: 2>

Now time to make the Pokemon.
His Pokemon are:

  • Geodude Level 12
  • Onix Level 14

Lets make Geodude with the moves Tackle, Defense Curl, Rock Polish, and Rock Throw. The ability is Rock Head.

Type in the note box

<trainer data>
class: 74
level: 12
ability: 69
moves: 40, 118, 404, 95
[new pokemon]

Next is Onix
His moves are Tackle, Harden, Bind, and Smack Down
Use [new pokemon] to signify that what is being typed is a new Pokemon not overwriting Geodude’s data.
Type in the notebox

class: 95
level: 14
ability: 69
moves: 40, 113, 27, 479
<\trainer data>
After all that it should look like this.
finished productIf you have any question about this process please feel free to ask me.

29 thoughts on “Creating a Trainer

  1. When the trainer sends out a pokemon, a copy of the trainer comes out. What do I do?

  2. ok, so I did everything you’ve done, I set the enemy of the trainer in the enemies tab, and the pokemon in a seperate name( Trainer ??? id 1, chimchar, id 3) I put in the troops comment notes:, . when my opponent (trainer)sends out a pokemon, the pokemon turns into the battler of the trainer that I set up in the enemy tab(Trainer Red, ID 1.) Also I have this error when I

    Script ‘Crystal PBS System’ line 1238: NoMethodError occured
    undefined method ‘priority’ for nil: NilClass

    My notes for the enemies:

    class: 4
    level: 5
    moves: 3,4


  3. GRRR! Hate this! Chimchar

  4. Ughhh…I just want to know what to do…

    • blu1

      just wait for the demo..
      i think noel is relying on his baseproject where some options are set, which are also of importance (and which we don’t know) for setting up a trainer and the battle system..
      shouldn’t be long..
      if its taking a little longer, maybe noel could make a raw demo project just for the bs (?)
      the light version so to say..

      • Yeah, true. I give up on this working with just the battle system. I’ll wait.

  5. I figured out the first problem,(The trainer being reproduced) but the other problem is attacking still.
    Sorry If I feel like i’m being annoying…

  6. the problem was I was putting another trainer enemy below my trainer enemy I set up. I was supposed to put my pokemon underneath the trainer that had the notes. Meaning Phoenix Wright was underneath ???(my main trainer.) One more thing is that when I finish the battle, the message box ‘player was victorious’ keeps popping up. What do I do?

  7. bowie

    I dont get it work, When is the demo done 😦

  8. Raphael

    hey, the pokemon’s sprites are not showing, instead, the trainer’s sprite stays there and battle animations don’t appear. I tried taking out some Mog’s scripts i was using like battler motion and clean battle layout but it still happens. In common battles against wild pokémon, everything runs fine.

  9. I’m using your current demo and I’m wondering how to set up a bgm that happens when the trainer has one last pokemon. I’ve seen the sample in the hugh fight in your demo but I’m confused what to do. Any help?

    • Of your confused took at “Troop BGM” in the script list. It’s by Tsukihime if that helps you to find it. There should be full instructions in the header.

      • yes, that’s right. But it doesn’t show how to do the coding in the troops area.
        I’ve seen this:
        after battle: BW1, 7 I can tell this is the face
        /after battle
        how can I code this for the last pokemon?

  10. Also how do you make text in between battles? The Troop BGM doesn’t show very many instructions to doing codes like this:
    after battle: blah blah
    /after battle.
    Is this a default thing in rpg maker? Or is there a script in the demo that has something for that like victors basic module?

  11. Text in between has to be evented.
    Using a condition like “When at the end of the turn”. Then set a conditional branch with statements like.
    $game_troop.trainer[0].reserve_members.all_dead? for the last Pokemon.
    Tsuki’s scripts run it without Victor’s scripts. However mine do.
    <after battle: BW1, 7>
    I lost, but how?
    </after battle>
    Sets Hugh to say I lost after battle.
    <troop bgm: Hugh Battle> (or whatever the notetag is for that) sets Hugh’s battle theme to play during the battle.

  12. I have your kit and was wondering about the animated trainers. I’ve seen that you use Victors animated battle system and I was wondering how the frames each image has (like If I wanted just 3 frames) to make an animation intro. Does your settings automatcily set it, or will I have to make more than 3 frames?

  13. kizzo

    I’ve made a trainer but how do I put him into the game. When I try Battle Processing, I get: Script “Region Battlebacks v1.00” line 263: NoMethodError occured. I also tried doing as you have done with the rival. with “call_vs_battle(2, 0, 2, name, rival, troop)”, but I dont know what to put as the number for the name. Leaving it at 2 causes another error.

  14. For some reason, when my trainer sends out his Gastly, the only move it uses is Tackle.

  15. I’m having a problem of learning how to evolve your Pokémon, is there supposed to be some kind of script or is it just a common event that you have to create?

  16. Jay

    Ok so Ive noticed that the graphics include walking sprites of all the pokemon and their shiny versions. However, I cant get them to work correctly. it’s a sizing problem.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: