Description

Cobblemon Trainers introduces a trainer battle system to Cobblemon, designed to seamlessly integrate with interactable NPC mods.\
These trainers feature a custom AI inspired by Generation 5's trainer AI, ensuring engaging and challenging battles.
- Customize trainer teams extensively, including Moves, IVs, EVs, Abilities, Level, and Nature, offering diverse and challenging battles.
- Access any Pokémon available on your server, including those from datapacks.
- Efficiently organize trainers into groups for streamlined navigation within the setup interface.
- Define win commands for trainers, enabling post-battle rewards such as economy-based incentives.
**Commands Overview:**
- **/trainers add \ [\]**: Establish a new trainer with an empty team, optionally assigning them to a specific group.
- **/trainers setup**: Access the GUI to configure trainers' teams.
- **/trainers setwincommand \ \**: Specify the command executed upon defeating a trainer, with automatic player name substitution (%player%).
- **/trainers setlosscommand \ \**: Define the command executed when a player is defeated by a trainer, with automatic player name substitution (%player%).
- **/trainers setgroup \ \**: Group trainers under specified names in the setup GUI for organizational purposes.
- **/trainers remove \**: Delete a trainer from the system.
- **/trainers rename \ \**: Modify a trainer's name (reflects in battle logs).
- **/trainers setcanonlybeatonce \ true/false**: Toggle whether a trainer can only be defeated once.
- **/trainers addpokemon \ \**: Add a Pokémon to a trainer's team via command similar to /pokegive.
- **/trainers addfromparty \ \**: Add a Pokémon from the player's party to a trainer's team.
- **/trainers setcooldownseconds \ \**: Set the cooldown duration for battling the trainer.
- **/trainers setpartymaximumlevel \ \**: Set a maximum level for the player's party to battle a trainer.
- **/trainers adddefeatrequirement \ \**: Makes it so the given trainer cannot be battled unless the player has defeated a certain trainer.
- **/trainers removedefeatrequirement \ \**: Removes a defeat requirement.
- **/trainers resetwintracker \ \**: Clears whether the given player has defeated the given trainer in the past.
- **/trainers usegen5ai**: Set trainer battle AI to Generation 5 AI.
- **/trainers usestrongai \**: Set trainer battle AI to Strong AI currently under development for official trainers in Cobblemon.
- **/trainers battle [\]**: Initiate a battle with a trainer. Omitting the trainer argument will open a trainer select menu.
- **/trainers makebattle \ \ [\]**: Commence a battle between a player and a trainer.
- **/trainers reload**: Refresh the trainer data file; caution advised for manual edits.
Utilize single quotes for trainer names or commands with spaces. For instance: /trainers add 'Ash Ketchum'\
To include single quotes within a string, utilize \': 'say \'hello\'' becomes say 'hello'
All commands require permission level 2 or their corresponding permission nodes:
- "selfdot.trainers.reload" - /trainers reload
- "selfdot.trainers.battle" - /trainers battle \
- "selfdot.trainers.makebattle" - /trainers makebattle \ \
- "selfdot.trainers.edit" - All other commands.
**Config Options:**
- **xpEnabled**: Controls whether player Pokémon will gain XP from battling trainers.
Graphics by twsparklecat
[](https://discord.gg/y8K2HYDBuX)