# Configuration

All configs auto-merge on load (missing keys are filled), so you typically do not need to delete the folder between updates.

### Files

* `config/CobbleTournaments/config.json` - main settings (formats, timers, locations, storage, debug, language)
* `config/CobbleTournaments/messages.json` - all player-facing text (supports `{prefix}` and placeholders)
* `config/CobbleTournaments/clauses.json` - clause toggles (Smogon-style)
* `config/CobbleTournaments/guis.json` - GUI layouts, items, and slot positions
* `config/CobbleTournaments/data/cobbletournaments.db` - SQLite DB (stats, saved parties, history, etc.)
* `config/CobbleTournaments/data/exports/` - optional JSON exports (if enabled)

## Example Config:

```jsonc
// CobbleTournaments config 
// Notes:
// - IDs for species/items/abilities/moves should generally be Pokémon Showdown IDs (lowercase, underscores).
// - `levelCap` is a STRING, so you can write values like "50" or comparators like "<=50".
// - Most changes can be applied with: /cobbletourney reload
{
  // Minimum players required to start the tournament.
  "minimumPlayers": 2,

  // If true, tournament auto-starts when enough players are registered and ready.
  "autoStartEnabled": true,

  // If true, matches require check-in before starting (GUI + timer).
  "checkInEnabled": true,

  // Tournament formats available for creation (key = formatId used in /create).
  "formats": {
    "pu": {
      // Display name shown in GUIs and messages.
      "displayName": "Smogon PU",

      // Battle type: "SINGLES", "DOUBLES", or "RANDOMS".
      "battleType": "SINGLES",

      // Team size required for this format.
      "pokemonPerTeam": 6,

      // Level cap rule. Examples:
      // - "50"   (exact)
      // - "<=50" (at-or-below)
      // - "<50"  (below)
      // - ">=50" (at-or-above)
      // - ">50"  (above)
      "levelCap": "50",

      // Gimmicks allowed in this format.
      "allowMega": false,
      "allowTera": true,
      "allowZMove": false,
      "allowDynamax": false,

      // Bans are checked at registration time (and can be rechecked at match start).
      // Each list uses Showdown IDs.
      "bannedSpecies": [
        "venomoth"
      ],
      "bannedItems": [
        "kings_rock",
        "razor_fang",
        "quick_claw"
      ],
      "bannedAbilities": [
        "moody"
      ],
      "bannedMoves": [
        "baton_pass"
      ]
    },
    "singles_6v6": {
      "displayName": "Singles 6v6",
      "battleType": "SINGLES",
      "pokemonPerTeam": 6,
      "levelCap": "50",
      "allowMega": false,
      "allowTera": false,
      "allowZMove": false,
      "allowDynamax": false,
      "bannedSpecies": [
        "mewtwo",
        "lugia",
        "ho_oh",
        "groudon",
        "kyogre",
        "rayquaza",
        "dialga",
        "palkia",
        "giratina",
        "reshiram",
        "zekrom",
        "kyurem_white",
        "xerneas",
        "yveltal",
        "zygarde_complete",
        "solgaleo",
        "lunala",
        "necrozma_dawn_wings",
        "necrozma_dusk_mane",
        "zacian",
        "zamazenta",
        "eternatus",
        "calyrex_ice",
        "calyrex_shadow",
        "koraidon",
        "miraidon"
      ],
      "bannedItems": [
        "kings_rock",
        "razor_fang",
        "quick_claw"
      ],
      "bannedAbilities": [
        "moody"
      ],
      // Some moves may appear as "batonpass" vs "baton_pass" depending on source;
      // use the Showdown ID you're using in your imports.
      "bannedMoves": [
        "batonpass"
      ]
    },
    "ubers": {
      "displayName": "Smogon Ubers",
      "battleType": "SINGLES",
      "pokemonPerTeam": 6,
      "levelCap": "50",
      "allowMega": true,
      "allowTera": true,
      "allowZMove": false,
      "allowDynamax": false,
      "bannedSpecies": [],
      "bannedItems": [
        "kings_rock",
        "razor_fang",
        "quick_claw"
      ],
      "bannedAbilities": [
        "moody"
      ],
      "bannedMoves": [
        "baton_pass"
      ]
    },
    "nu": {
      "displayName": "Smogon NU",
      "battleType": "SINGLES",
      "pokemonPerTeam": 6,
      "levelCap": "50",
      "allowMega": false,
      "allowTera": true,
      "allowZMove": false,
      "allowDynamax": false,
      "bannedSpecies": [
        "slowking",
        "blastoise_mega"
      ],
      "bannedItems": [
        "kings_rock",
        "razor_fang",
        "quick_claw"
      ],
      "bannedAbilities": [
        "moody"
      ],
      "bannedMoves": [
        "baton_pass"
      ]
    },
    "uu": {
      "displayName": "Smogon UU",
      "battleType": "SINGLES",
      "pokemonPerTeam": 6,
      "levelCap": "50",
      "allowMega": false,
      "allowTera": true,
      "allowZMove": false,
      "allowDynamax": false,
      "bannedSpecies": [
        "zapdos",
        "latias",
        "kyurem",
        "zeraora",
        "moltres_galar"
      ],
      "bannedItems": [
        "kings_rock",
        "razor_fang",
        "quick_claw"
      ],
      "bannedAbilities": [
        "moody"
      ],
      "bannedMoves": [
        "baton_pass"
      ]
    },
    "randoms": {
      // Randoms generates teams server-side instead of using player parties/imports.
      "displayName": "Randoms",
      "battleType": "RANDOMS",
      "pokemonPerTeam": 6,
      "levelCap": "50",
      "allowMega": true,
      "allowTera": true,
      "allowZMove": false,
      "allowDynamax": false,
      "bannedSpecies": [],
      "bannedItems": [],
      "bannedAbilities": [],
      "bannedMoves": []
    },
    "doubles_vgc": {
      "displayName": "Doubles VGC",
      "battleType": "DOUBLES",
      "pokemonPerTeam": 6,
      "levelCap": "50",
      "allowMega": true,
      "allowTera": true,
      "allowZMove": false,
      "allowDynamax": false,
      "bannedSpecies": [
        "mewtwo",
        "rayquaza"
      ],
      "bannedItems": [],
      "bannedAbilities": [],
      "bannedMoves": []
    },
    "ru": {
      "displayName": "Smogon RU",
      "battleType": "SINGLES",
      "pokemonPerTeam": 6,
      "levelCap": "50",
      "allowMega": false,
      "allowTera": true,
      "allowZMove": false,
      "allowDynamax": false,
      "bannedSpecies": [
        "latias",
        "zeraora",
        "zapdos",
        "rotom_wash"
      ],
      "bannedItems": [
        "kings_rock",
        "razor_fang",
        "quick_claw"
      ],
      "bannedAbilities": [
        "moody"
      ],
      "bannedMoves": [
        "baton_pass"
      ]
    },
    "ou": {
      "displayName": "Singles 6v6 OU",
      "battleType": "SINGLES",
      "pokemonPerTeam": 6,
      "levelCap": "50",
      "allowMega": false,
      "allowTera": true,
      "allowZMove": false,
      "allowDynamax": false,
      "bannedSpecies": [
        "mewtwo",
        "lugia",
        "ho_oh",
        "groudon",
        "kyogre",
        "rayquaza",
        "dialga",
        "palkia",
        "giratina",
        "reshiram",
        "zekrom",
        "kyurem_white",
        "xerneas",
        "yveltal",
        "zygarde_complete",
        "solgaleo",
        "lunala",
        "necrozma_dawn_wings",
        "necrozma_dusk_mane",
        "zacian",
        "zamazenta",
        "eternatus",
        "calyrex_ice",
        "calyrex_shadow",
        "koraidon",
        "miraidon"
      ],
      "bannedItems": [
        "kings_rock",
        "razor_fang",
        "quick_claw"
      ],
      "bannedAbilities": [
        "moody"
      ],
      "bannedMoves": [
        "baton_pass"
      ]
    }
  },

  // Reward execution settings.
  "rewards": {
    // Commands run for specific finishing positions. Keys are ranks (1,2,3,...).
    // Supports placeholders like {player}.
    "rankCommands": {
      "2": [
        "say {player} takes second place."
      ],
      "1": [
        "say {player} wins the tournament!"
      ],
      "3": [
        "say {player} finishes third."
      ]
    },

    // If true, announces winners to the server/global broadcast.
    "broadcastWinners": true,

    // Commands run for everyone who participated (optional).
    "participationCommands": []
  },

  // Persistence/export settings.
  "storage": {
    // SQLite DB filename (stored under config/CobbleTournaments/data/).
    "sqliteFileName": "cobbletournaments.db",

    // If true, writes a JSON export per match/tournament (useful for logs/stats).
    "exportJson": true,

    // Folder name under config/CobbleTournaments/data/ for exports.
    "exportFolder": "exports"
  },

  // Language / localization settings.
  "language": {
    // Default locale used for messages/lang lookups (e.g., en_us, fr_fr).
    "defaultLocale": "en_us"
  },

  // Anti-alt: max distinct IPs allowed per player per tournament.
  "maxIpsPerPlayer": 2,

  // If false, level cap checks are skipped.
  "levelCapsEnabled": true,

  // Teleport locations used for matches and lobbies.
  "arenaLocation1": {
    "world": "minecraft:overworld",
    "x": -3.454242097663168,
    "y": 121.0,
    "z": 98.52432722514226,
    "yaw": 0.6001245,
    "pitch": 5.249955
  },
  "arenaLocation2": {
    "world": "minecraft:overworld",
    "x": -3.453186022362336,
    "y": 121.0,
    "z": 105.49648448918968,
    "yaw": 179.70024,
    "pitch": 3.599982
  },
  "lobbyLocation": {
    "world": "minecraft:overworld",
    "x": -14.439168575148742,
    "y": 121.0,
    "z": 102.39884970385347,
    "yaw": -89.39975,
    "pitch": 2.250024
  },
  "spectatorLocation": {
    "world": "minecraft:overworld",
    "x": 10.238490535922214,
    "y": 140.0,
    "z": 102.51053577717268,
    "yaw": 90.60031,
    "pitch": 53.400024
  },

  // Pre-match countdown before teleport/battle start.
  "matchCountdownSeconds": 10,

  // Check-in timeout. If a player does not check in, they can forfeit.
  "checkInSeconds": 20,

  // Enables the per-turn move timer (forfeit on timeout).
  "moveTimerEnabled": true,

  // Seconds allowed for the active player to choose a move.
  "moveTimerSeconds": 10,

  // Delay between consecutive bracket matches.
  "betweenBattlesSeconds": 10,

  // If true, prints extra debugging logs to console.
  "debugMode": false
}

```

### Formats

Formats live inside `config.json` and define what is allowed (battle type, team size, level cap, banned species/items/moves/abilities, and which clauses are enabled).

Notes:

* Bans/clauses validate the team being used in the tournament; they do not alter learnsets outside the tournament.
* “Randoms” formats generate teams server-side.

### Locations

Locations are set by commands:

* Arena position 1
* Arena position 2
* Lobby
* Spectator

These are used for teleports and spectating.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dawnshade.gitbook.io/dawnshade-docs/docs/dawn-tournaments/summary/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
