{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "description": "Editor hint: where mod.schema.json is (ignored)",
      "type": "string"
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)*$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+(-[\\w.]+)?$"
    },
    "gameVersion": {
      "default": "*",
      "description": "Semver range of game versions, e.g. \">=0.5.0 <2.0.0\"",
      "type": "string"
    },
    "authors": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "description": {
      "default": "",
      "type": "string"
    },
    "dependencies": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)*$"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "loadAfter": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)*$"
      }
    },
    "provides": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "entry": {
      "description": "Script run in the sandbox ([Scripts](scripting.md)), e.g. \"scripts/main.js\" (used by default when present)",
      "type": "string"
    },
    "tags": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "replaces": {
      "default": [],
      "description": "Kinds of the base game’s data this pack takes out before adding its own, e.g. [\"players\"]: only the base game’s records go, never another pack’s, so packs for different countries add up. An entry can be { \"kind\": \"players\", \"nations\": [\"ENG\", \"SCO\"] } to take out only those nations’ records",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "minLength": 1
              },
              "nations": {
                "description": "Nation codes: only the base game’s records from these nations are taken out (players, roster and venues)",
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 3
                }
              }
            },
            "required": [
              "kind"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "icon": {
      "description": "Square image shown on the Mods screen: an asset path relative to the mod, e.g. \"assets/icon.png\" (png, jpg, webp, gif, avif or svg; 1 MB at most; 256×256 looks best)",
      "type": "string"
    },
    "banner": {
      "description": "Wide image across the top of the mod’s card and details: an asset path, e.g. \"assets/banner.webp\" (about 3:1, e.g. 1200×400; 4 MB at most)",
      "type": "string"
    },
    "screenshots": {
      "default": [],
      "description": "Up to 8 images shown in the mod’s details (asset paths; 4 MB each at most)",
      "maxItems": 8,
      "type": "array",
      "items": {
        "type": "string",
        "description": "Asset path, relative to the mod"
      }
    },
    "scriptBudgetMs": {
      "description": "No longer read: a script has no time limit, only a step limit for a stuck call ([Scripts](scripting.md)). A mod that still sets it loads with a warning",
      "type": "number"
    }
  },
  "required": [
    "id",
    "name",
    "version"
  ],
  "additionalProperties": false
}
