Skip to content

Installation & Setup

This guide covers installing Smart Trainers on your server and understanding the datapack structure for AI configurations.

DependencyVersion
Minecraft1.21.1
Fabric Loader or NeoForgeLatest stable
Cobblemon1.6.0+
  1. Download the Smart Trainers mod JAR for your platform (Fabric or NeoForge)
  2. Place the JAR file in your server’s mods/ folder
  3. Start the server — Smart Trainers will load its built-in presets automatically

No additional configuration files are generated on first launch. Smart Trainers is entirely datapack-driven — all customization happens through datapacks, not config files.

Smart Trainers loads three types of resources from datapacks. All files are JSON and follow standard Minecraft datapack conventions.

data/
└── <namespace>/
├── battle_ai/
│ ├── my_trainer.json
│ ├── fire_gym.json
│ └── elite_four_dragon.json
├── battle_bags/
│ ├── gym_leader.json
│ └── elite.json
└── move_categories/
└── custom_heal.json

AI Configs — data/\{namespace\}/battle_ai/

Section titled “AI Configs — data/\{namespace\}/battle_ai/”

The core behavior files. Each JSON file defines how a trainer fights — skill level, move preferences, switch logic, gimmick activation, personality traits, and more.

The file path determines the resource ID:

File PathResource ID
data/mypack/battle_ai/fire_gym.jsonmypack:fire_gym
data/smart_trainers/battle_ai/expert.jsonsmart_trainers:expert
data/mypack/battle_ai/trainers/route1.jsonmypack:trainers/route1

You assign this resource ID to an NPC to control its battle behavior.

Battle Bags — data/\{namespace\}/battle_bags/

Section titled “Battle Bags — data/\{namespace\}/battle_bags/”

Define which items a trainer can use during battle and the rules for when to use them. Potions, Full Restores, Revives, X items — all configurable with Molang conditions.

File PathResource ID
data/mypack/battle_bags/gym_leader.jsonmypack:gym_leader
data/smart_trainers/battle_bags/elite.jsonsmart_trainers:elite

Move Categories — data/\{namespace\}/move_categories/

Section titled “Move Categories — data/\{namespace\}/move_categories/”

Map move names to strategic categories that the AI uses for filtering. Smart Trainers includes built-in categories (damage, heal, buff, hazard, pivot, etc.), and you can extend or override them with your own files.

CategoryDescriptionExample Moves
damageDirect damage-dealingMost attacking moves
healHP recoveryrecover, roost, softboiled
buffSelf/ally stat boostingswordsdance, calmmind
hazardEntry hazardsstealthrock, spikes
hazard_controlHazard removalrapidspin, defog
pivotDamage + switchuturn, voltswitch
priorityIncreased priorityquickattack, extremespeed
statusStatus-inflictingthunderwave, willowisp
protectionProtect/Detect familyprotect, detect
weatherWeather-settingraindance, sunnyday
terrainTerrain-settingelectricterrain, grassyterrain
speed_controlSpeed manipulationtailwind, trickroom

All Smart Trainers resources reload when you run the standard Minecraft /reload command. You do not need to restart the server to apply changes.

This makes iteration fast:

  1. Edit a JSON config file in your datapack
  2. Run /reload in-game
  3. Start a new battle to test the updated behavior

After installing, you can verify Smart Trainers is loaded correctly:

  1. Start your server and check the log for Smart Trainers initialization messages
  2. Confirm the built-in presets are available by assigning smart_trainers:medium to an NPC
  3. Battle the NPC — it should demonstrate type-aware play, STAB preference, and occasional switching

With Smart Trainers installed, you are ready to create your first custom AI config:

  • Quick Start — Create a custom trainer AI in five minutes
  • Introduction — Understand how the AI decision system works