Files
code_of_conquest_dnd/docs/schemas/canon-log.schema.json
2026-07-09 12:31:10 -05:00

84 lines
2.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://coc-rpg/schemas/canon-log.schema.json",
"title": "Canon Log",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version", "player", "location", "party",
"recent_events", "established_facts", "active_quests", "humiliations"
],
"properties": {
"schema_version": { "type": "integer", "const": 1 },
"player": {
"type": "object",
"additionalProperties": false,
"required": ["name", "class_id", "luck_descriptor"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"class_id": { "enum": ["sellsword", "assassin", "priest"] },
"luck_descriptor": { "type": "string", "minLength": 1 }
}
},
"location": {
"type": "object",
"additionalProperties": false,
"required": ["id", "name"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9_]+$" },
"name": { "type": "string", "minLength": 1 }
}
},
"party": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "name", "disposition"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9_]+$" },
"name": { "type": "string", "minLength": 1 },
"disposition": { "type": "integer", "minimum": -100, "maximum": 100 }
}
}
},
"recent_events": {
"type": "array",
"maxItems": 5,
"items": { "type": "string", "minLength": 1 }
},
"established_facts": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"active_quests": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "name", "status", "objective"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9_]+$" },
"name": { "type": "string", "minLength": 1 },
"status": { "enum": ["active", "complete", "failed"] },
"objective": { "type": "string", "minLength": 1 }
}
}
},
"humiliations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id", "text", "weight", "turn"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"text": { "type": "string", "minLength": 1 },
"weight": { "type": "integer", "minimum": 1, "maximum": 10 },
"turn": { "type": "integer", "minimum": 0 }
}
}
}
}
}