Trainer Files

From Pokémon 3D Wiki
Jump to navigation Jump to search

Trainer files are used to set up each battle.

Each trainer file has is put in the /Scripts/Trainer/ folder or one of its sub folders and has the extension .trainer .

These files can be made in 2 formats; the 'New' and 'Old' formats

New Trainer File Format

The new trainer file format was introduced in version 0.28. This format is very descriptive about what each line does. You can also use Version 2 Script Constructs to determine any of the values dynamically.

[TRAINER FORMAT]
Name|
TrainerClass|
Money|
IntroMessage|
OutroMessage|
DefeatMessage|
TextureID|
Region|
IniMusic|
DefeatMusic|
BattleMusic|
Pokemon1|
Pokemon2|
Pokemon3|
Pokemon4|
Pokemon5|
Pokemon6|
Items|
Gender|
AI|
IntroSequence|
IntroType|
Line Description
Name| Trainer's Name.
TrainerClass| Trainer's Class. Displays before the Name.
Money| How much money is earned after being defeated.
IntroMessage| Message that displays before battle starts. '...' means no message.
OutroMessage| Message that displays after the battle ends. '...' means no message.
DefeatMessage| Message that displays when interacting with the trainer after the battle has ended. '...' means no message.
TextureID| The name of a sprite in /Content/Textures/NPC/
Region| The name of the region the trainer is in. If the battle music is not defined, the game will look for the default music files starting with the Region value: Region_Trainer, Region_Trainer_Intro & Region_Trainer_Defeat.
InSightMusic| Music used while the IntroMessage is being displayed. Does not need to be defined.
IniMusic| Music used to start the battle. The duration of the intro animation is based on the length of this.
DefeatMusic| Music used after the trainer has been defeated.
BattleMusic| Music used during the battle.
Pokemon1| The first Pokemon. The only Pokemon that needs to be defined. Can be made by defining only the Pokemon and the level(Pokemondex#,Level) or by defining the whole Pokemon(Pokemon Code).
Pokemon2| The second Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
Pokemon3| The third Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
Pokemon4| The fourth Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
Pokemon5| The fifth Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
Pokemon6| The sixth Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
Items| List of Items to be used by their Item Code. Used once for each listing of the code.
Gender| Decides the genders of any of the trainer's randomly generated Pokemon. If the Pokemon code is given for a Pokemon the gender used there will be used.
  • -1 - Random
  • 0 - Male
  • 1 - Female
  • 2 - Genderless

If not given Random(-1) is assumed.

AI| Defines the abilities of the trainer's AI.

With a value between 0 and 20 there's a bigger chance that the trainer picks a random move on lower difficulties. Anything value above that skips that chance.

If not given Normal(2) is used.

IntroSequence| Calls the specified color of VS icon and bar, respectively, separated by a comma.

You can use color names, or if you plan on expanding the amount of VS icons, use numbers.
When using the default graphics, there are 4 colors of VS icons (and a Battle Frontier icon) and 11 colors of bars.
The ones without vs icons in the default GameMode are written in bold:

  • VS
    • Blue (0)
    • Orange (1)
    • LightGreen (2)
    • Gray (3)
    • Violet (4)
    • Green (5)
    • Yellow (6)
    • Brown (7)
    • LightBlue (8)
    • LightGray (9)
    • Red (10)
    • Empty (11)
    • BattleFrontier
  • Bar
    • Blue (0)
    • Orange (1)
    • LightGreen (2)
    • Gray (3)
    • Violet (4)
    • Green (5)
    • Yellow (6)
    • Brown (7)
    • LightBlue (8)
    • LightGray (9)
    • Red (10)
    • Empty (11)

If an improper color name is given they default to Blue.
If you want more icons and bars you can extend the image downwards and use numbers for any bar and icon above 11.

IntroType| Calls the type of intro transition before the battle starts.
  • 0 = Black checker boxes
  • 1 = Black horizontal lines
  • 2 = Black vertical lines
  • 3 = Black box expand out
  • 4 = Black box expand in
  • 5 = White checker boxes
  • 6 = White horizontal lines
  • 7 = White vertical lines
  • 8 = White box expand out
  • 9 = White box expand in
  • 10 = Default trainer intro
  • 11 = Special trainer intro
  • 12 = Blurred zoom-in effect

Old Trainer file Format

The Old Trainer File Format was not very descriptive and required a lot of knowledge about which line was which.

$$
Class
Name
Start Battle Speech
Defeat message
Post Battle Speech
Sprite
Music1|Music2
1|Pokemon
2|Pokemon
3|Pokemon
4|Pokemon
5|Pokemon
6|Pokemon
Items
AI code
Gender code

The file would look exactly like that.

Line Description
$$ The prize you receive after beating this trainer.
Class Displays before the name of the trainer.
Name The name of the trainer.
Start Battle Speech The speech given before the battle is started.
Defeat Message The message displayed after defeating the opponent while still in the battle.
Post Battle Speech Displays when interacting with the trainer after defeating them.
Sprite The name of a sprite located in the /Content/Textures/NPC folder.
Music Searches for the music files:
  • Music1_Music2_intro
  • Music2_defeat
  • Music1_Music2
Pokemon Only one Pokemon needs to be defined. Can be defined 2 ways:
  • #1,#2 where #1 is the Pokemon's dex number and #2 is its level.
  • Using the full Pokemon Code.
Items List of the item codes of the items a trainer can use. Will use each item once however items can be listed multiple times and will be used once for each listing.
AI Code Defines the abilities of the trainer's AI. there are 5 settings:
  • 0 - Aggressive.
  • 1 - Defensive.
  • 2 - Normal.
  • 3 - Special.
  • 4 - Simple.

If not given Normal is used.

Gender Code Decides the genders of any of the trainer's randomly generated Pokemon. If the Pokemon code is given for a Pokemon the gender used there will be used.
  • -1 - Random
  • 0 - Male
  • 1 - Female
  • 2 - Genderless

If not given Random genders are given.

Game Folder
Content ContentPacks GameModes Saves Screenshots Game Executable
Pokemon Data ContentPack Folder GameMode folder Savegame folder Version History
Data Maps Moves Scripts Control Files Content GameMode.dat Party.dat Player.dat Options.dat
poke battle structures V1 V2 trainer worldmap