Skip to content

Datapacks gym_trainers

Norevex edited this page Jul 29, 2026 · 1 revision

Datapacks-gym_trainers

Gym trainer definitions control trainer dialogue and Pokemon teams.

Datapack Location

Gym trainer files are defined under:

data/cobblebash/gym_trainers/

Each normal gym has three files:

data/cobblebash/gym_trainers/<gym_type>/trainer_1.json
data/cobblebash/gym_trainers/<gym_type>/trainer_2.json
data/cobblebash/gym_trainers/<gym_type>/boss.json

Example:

data/cobblebash/gym_trainers/bug/boss.json

Elite Four Trainer Files

Elite Four files use separate folders:

data/cobblebash/gym_trainers/elite4_electric_ground/boss.json
data/cobblebash/gym_trainers/elite4_fire_fairy/boss.json
data/cobblebash/gym_trainers/elite4_grass_ghost/boss.json
data/cobblebash/gym_trainers/elite4_water_steel/boss.json
data/cobblebash/gym_trainers/elite4_champion/boss.json

Basic Trainer File

{
    "display_name": "The Hive Queen",
    "dialogue": {
        "lines": [
            "Every tiny opening becomes a swarm. Show me you can survive one."
        ],
        "battle_text": "Battle",
        "cancel_text": "Cancel"
    },
    "builds": [
        {
            "id": "build_a",
            "name": "Balanced Bug Leader",
            "pokemon": [
                {
                    "species": "Volcarona",
                    "ability": "Flame Body",
                    "held_item": "Heavy-Duty Boots",
                    "moves": [
                        "Quiver Dance",
                        "Fiery Dance",
                        "Bug Buzz",
                        "Roost"
                    ]
                }
            ]
        }
    ]
}

Fields

display_name is the name shown above the trainer and in battle dialogue.

dialogue.lines is the text shown when the player interacts with the trainer.

dialogue.battle_text is the confirm button text.

dialogue.cancel_text is the cancel button text.

builds is a list of possible trainer teams.

builds[].id is a unique id for that build inside the file.

builds[].name is a readable name for that build.

builds[].pokemon is the Pokemon team used by that build.

Pokemon Fields

Each Pokemon entry can define:

  • species
  • ability
  • held_item
  • moves

species should be the Pokemon species name.

ability should be a valid Cobblemon ability name.

held_item should be a valid item name. Use None for no held item.

moves should contain the moves that Pokemon can use.

Multiple Builds

Trainer files can include more than one build.

When a trainer is generated, CobbleBash can choose from the available builds and shuffle Pokemon order. This lets a trainer feel less identical between runs while still staying data-pack controlled.

Clone this wiki locally