{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.shardsofstone.com/schemas/v1/mod-package.json",
  "$comment": "GENERATED by tools/generate_modding_reference.ts. Do not edit by hand.",
  "title": "ModPackage",
  "description": "A Shards of Stone mod package (.sosmod): data overrides, a trigger script, custom sounds and external models, with compatibility metadata.",
  "type": "object",
  "required": [
    "id",
    "name",
    "version",
    "author"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "formatVersion": {
      "description": "Package format version; absent = 1.",
      "type": "integer",
      "minimum": 1,
      "maximum": 2,
      "default": 1
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
    },
    "name": {
      "type": "string",
      "pattern": "\\S"
    },
    "version": {
      "type": "string",
      "pattern": "\\S"
    },
    "author": {
      "type": "string",
      "pattern": "\\S"
    },
    "description": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "category": {
      "type": "string"
    },
    "homepage": {
      "type": "string"
    },
    "minEngineVersion": {
      "description": "Minimum game release (package.json semver) this package needs.",
      "type": "string",
      "pattern": "^\\s*v?\\d+\\.\\d+\\.\\d+"
    },
    "dependencies": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ModDependency"
      }
    },
    "defOverrides": {
      "$ref": "def-overrides.json"
    },
    "triggers": {
      "$ref": "trigger-script.json"
    },
    "sounds": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "pattern": "^(data:[^,]+,.|https://)",
        "description": "An https:// URL or a data URI for the sound."
      },
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_-]+$"
      }
    },
    "models": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "pattern": "^(data:[^,]+,.|https://)",
        "description": "An https:// URL or a data URI for the model."
      },
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_-]+$"
      }
    },
    "created": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "definitions": {
    "ModDependency": {
      "type": "object",
      "required": [
        "id",
        "version"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
        },
        "version": {
          "description": "`1.2.3` (exact), `^1.2.0`, `~1.2.0`, `>=1.2.0` or `*`.",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}
