Installation & Setup
Installation & Setup
Section titled “Installation & Setup”This guide covers installing Smart Trainers on your server and understanding the datapack structure for AI configurations.
Requirements
Section titled “Requirements”| Dependency | Version |
|---|---|
| Minecraft | 1.21.1 |
| Fabric Loader or NeoForge | Latest stable |
| Cobblemon | 1.6.0+ |
Mod Installation
Section titled “Mod Installation”- Download the Smart Trainers mod JAR for your platform (Fabric or NeoForge)
- Place the JAR file in your server’s
mods/folder - 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.
Datapack Structure
Section titled “Datapack Structure”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.jsonAI 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 Path | Resource ID |
|---|---|
data/mypack/battle_ai/fire_gym.json | mypack:fire_gym |
data/smart_trainers/battle_ai/expert.json | smart_trainers:expert |
data/mypack/battle_ai/trainers/route1.json | mypack: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 Path | Resource ID |
|---|---|
data/mypack/battle_bags/gym_leader.json | mypack:gym_leader |
data/smart_trainers/battle_bags/elite.json | smart_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.
| Category | Description | Example Moves |
|---|---|---|
damage | Direct damage-dealing | Most attacking moves |
heal | HP recovery | recover, roost, softboiled |
buff | Self/ally stat boosting | swordsdance, calmmind |
hazard | Entry hazards | stealthrock, spikes |
hazard_control | Hazard removal | rapidspin, defog |
pivot | Damage + switch | uturn, voltswitch |
priority | Increased priority | quickattack, extremespeed |
status | Status-inflicting | thunderwave, willowisp |
protection | Protect/Detect family | protect, detect |
weather | Weather-setting | raindance, sunnyday |
terrain | Terrain-setting | electricterrain, grassyterrain |
speed_control | Speed manipulation | tailwind, trickroom |
Backwards Compatibility
Section titled “Backwards Compatibility”Hot Reloading
Section titled “Hot Reloading”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:
- Edit a JSON config file in your datapack
- Run
/reloadin-game - Start a new battle to test the updated behavior
Verifying Installation
Section titled “Verifying Installation”After installing, you can verify Smart Trainers is loaded correctly:
- Start your server and check the log for Smart Trainers initialization messages
- Confirm the built-in presets are available by assigning
smart_trainers:mediumto an NPC - Battle the NPC — it should demonstrate type-aware play, STAB preference, and occasional switching
Next Steps
Section titled “Next Steps”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