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 'Old' and 'New' formats
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.
|$$||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.
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.
[TRAINER FORMAT] Name| TrainerClass| Money| IntroMessage| OutroMessage| DefeatMessage| TextureID| Region| IniMusic| DefeatMusic| BattleMusic| Pokemon1| Pokemon2| Pokemon3| Pokemon4| Pokemon5| Pokemon6| Items| Gender| AI| IntroSequence|
|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. Use is unknown.|
|insightmusic|||Music used while the IntroMessage is being displayed. Does not need to be defined.|
|IniMusic|||Music used to start the battle.|
|DefeatMusic|||Music used after the battle.|
|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. there are 5 settings:
If not given Normal(2) is used.
|IntroSequence|||Calls specified colored VS sign and bar, respectively. There are 4 colors of VS and 11 colors of bar they are:
If an improper color is given they default to blue.