Trainer Files
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.
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.
If an improper color name is given they default to Blue. |
| IntroType| | Calls the type of intro transition before the battle starts.
|
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:
|
| Pokemon | Only one Pokemon needs to be defined. Can be defined 2 ways:
|
| 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:
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.
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 | |||||||||||