Skip to content

Trainer Data

santacrab2 edited this page Nov 14, 2024 · 28 revisions

Once you have completed the Basic Installation, you can optionally choose to set custom Trainer Data. This data is used when Auto-Legality Mod legalizes or imports sets and does not affect base PKHeX behavior.

Please read the ENTIRE page. You should not have a single pkm file in the trainers folder.

YOU NEED TRAINER DATA FOR EVERY GAME THAT CAN TRANSFER POKEMON INTO YOUR CURRENT GAME.
YOU NEED TRAINER DATA FOR EVERY GAME THAT CAN TRANSFER POKEMON INTO YOUR CURRENT GAME.
YOU NEED TRAINER DATA FOR EVERY GAME THAT CAN TRANSFER POKEMON INTO YOUR CURRENT GAME.

For example:
If you are generating in Pokémon Ultra Sun, then you need to have Trainer Data for every game from gen 1 to gen 7. Pokémon from all of these games can be transferred to Ultra Sun, so if the mod picks any of these games, it will use "PKHeX" if you did not provide any trainer data.

Overview and Setup

Trainer data (TID, SID, OT, Gender) can be customized with the following steps:

  1. Create a trainers folder in the same folder as PKHeX.exe.
  2. Either create a Pokémon in PKHeX or use existing Pokémon files from every game of interest.
    • If you are editing a Pokémon from scratch, change the Origin Game on the Met tab to the game you want custom Trainer Data for and edit in your desired trainer details. The Pokémon does not need to be legal. It does not need to be from the original generation.
    • If you want to match console region data for 3DS games in Gen 6 or Gen 7, you should set this up as a pk6 or pk7. Console region data must be legal (correct country/subregion in a matching 3DS Region).
  3. Save the Pokémon file in the trainers folder. It should end in an extension like .pk8, .pk7, .xk3, etc.
  4. You can continue to add Pokémon for each game version where you want custom trainer data.
  5. Ensure that Tools > Auto Legality Mod > Plugin Settings > UseTrainerData is enabled.
  6. Restart PKHeX.exe.
  7. The mod will now use the trainer data from trainers folder. See the Further Notes section below for how the mod selects trainer data to use.

Further Notes

Trainer data is game version specific. You must add Pokémon from every game where you want custom trainer data. This is the order that trainer data is selected:

  • If trainer data exists for the same game version that the Pokémon is generated from, it will be used. If multiple trainer details exist for the same game, the mod will randomly choose one of the available details.
  • If there is no trainer data for the same game version, it will attempt to use the trainer data from a game in the same generation.
  • If none of the above apply, no trainer data will be used, and you will get default PKHeX trainer data!

Your trainers folder should only contain Pokemon files. An example trainers folder is shown here! trainers folder

I am still getting the default PKHeX OT!

If you did not add a trainer file for every single game, this is likely because Auto-Legality Mod has chosen a game where you didn't provide any trainer information.

  1. Look at the Met tab for the Origin Game to see which game is missing a trainer.
    image
  2. Go back to Step 2 to add a trainer for that game.
    • Alternatively, use Settings > PrioritizeGame to target the game for which you have trainer data. This can still fail if the Pokémon you are legalizing does not have a valid encounter in the game you targeted and the plugin has to choose another game.
  3. Add trainer files for other games to avoid having to do this again.