{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PlotModule", "type": "object", "properties": { "events": { "type": "array", "items": { "$ref": "#/$defs/PlotEvent" } }, "header": { "$ref": "#/$defs/ResourceHeader" }, "name": { "type": "string" }, "opening_event": { "type": "string" } }, "required": [ "header", "name", "opening_event", "events" ], "$defs": { "AcquisitionMode": { "type": "string", "enum": [ "initial", "found", "given", "borrowed", "stolen", "returned" ] }, "CheckDifficulty": { "type": "string", "enum": [ "regular", "hard", "extreme" ] }, "CheckRecord": { "type": "object", "properties": { "action_id": { "type": "string" }, "actor": { "type": "string" }, "bonus_dice": { "type": "integer", "format": "int8", "maximum": 127, "minimum": -128 }, "difficulty": { "$ref": "#/$defs/CheckDifficulty" }, "id": { "type": "string" }, "node_id": { "type": "string" }, "pushed_from": { "type": [ "string", "null" ] }, "result": { "$ref": "#/$defs/CheckResult" }, "roll": { "type": "integer", "format": "uint8", "maximum": 255, "minimum": 0 }, "skill": { "type": "string" }, "target": { "type": "integer", "format": "uint8", "maximum": 255, "minimum": 0 } }, "required": [ "id", "action_id", "actor", "skill", "target", "difficulty", "bonus_dice", "roll", "result", "node_id" ] }, "CheckResult": { "type": "string", "enum": [ "critical_success", "extreme_success", "hard_success", "success", "failure", "fumble" ] }, "ItemAcquisition": { "type": "object", "properties": { "at_node": { "type": "string" }, "from": { "type": [ "string", "null" ] }, "mode": { "$ref": "#/$defs/AcquisitionMode" } }, "required": [ "mode", "at_node" ] }, "ItemInstance": { "type": "object", "properties": { "acquisition": { "$ref": "#/$defs/ItemAcquisition" }, "condition": { "type": "string" }, "holder": { "type": "string" }, "id": { "type": "string" }, "owner": { "type": "string" }, "placement": { "$ref": "#/$defs/ItemPlacement" }, "quantity": { "type": "integer", "format": "uint32", "minimum": 0 }, "spec_ref": { "type": "string" }, "state_tags": { "type": "array", "default": [], "items": { "type": "string" } } }, "required": [ "id", "spec_ref", "owner", "holder", "placement", "quantity", "condition", "acquisition" ] }, "ItemPlacement": { "type": "string", "enum": [ "bag", "worn", "hand", "scene", "hidden" ] }, "KnowledgeCertainty": { "type": "string", "enum": [ "suspected", "reported", "confirmed" ] }, "KnowledgeRecord": { "type": "object", "properties": { "certainty": { "$ref": "#/$defs/KnowledgeCertainty" }, "fact": { "type": "string" }, "id": { "type": "string" }, "last_verified_at": { "type": [ "string", "null" ] }, "learned_at": { "type": "string" }, "observer": { "type": "string" }, "source": { "type": "string" }, "subject": { "type": [ "string", "null" ] } }, "required": [ "id", "observer", "fact", "certainty", "source", "learned_at" ] }, "PlotEvent": { "type": "object", "properties": { "id": { "type": "string" }, "outcomes": { "type": "array", "items": { "$ref": "#/$defs/PlotOutcome" } }, "pressures": { "type": "array", "default": [], "items": { "$ref": "#/$defs/PlotPressure" } }, "required_flags": { "type": "array", "default": [], "items": { "type": "string" } }, "situation": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "title": { "type": "string" } }, "required": [ "id", "title", "tags", "situation", "outcomes" ] }, "PlotOutcome": { "type": "object", "properties": { "description": { "type": "string" }, "effects": { "type": "array", "default": [], "items": { "$ref": "#/$defs/StateOp" } }, "id": { "type": "string" } }, "required": [ "id", "description" ] }, "PlotPressure": { "type": "object", "properties": { "clock_delta": { "type": [ "integer", "null" ], "format": "uint16", "maximum": 65535, "minimum": 0 }, "clock_id": { "type": [ "string", "null" ] }, "description": { "type": "string" }, "id": { "type": "string" } }, "required": [ "id", "description" ] }, "Promise": { "type": "object", "properties": { "accepted_at": { "type": [ "string", "null" ] }, "content": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "promisee": { "type": "string" }, "promiser": { "type": "string" }, "resolved_at": { "type": [ "string", "null" ] }, "status": { "$ref": "#/$defs/PromiseStatus" }, "weight": { "$ref": "#/$defs/PromiseWeight" } }, "required": [ "id", "promiser", "promisee", "content", "status", "weight", "created_at" ] }, "PromiseStatus": { "type": "string", "enum": [ "proposed", "accepted", "fulfilled", "broken", "released", "impossible" ] }, "PromiseWeight": { "type": "string", "enum": [ "minor", "major" ] }, "RelationshipAdjustment": { "type": "object", "properties": { "cause": { "type": "string" }, "delta": { "type": "integer", "format": "int16", "maximum": 32767, "minimum": -32768 }, "dimension": { "$ref": "#/$defs/RelationshipDimension" }, "judgment_rule": { "type": [ "string", "null" ] } }, "required": [ "dimension", "delta", "cause" ] }, "RelationshipDimension": { "type": "string", "enum": [ "affinity", "trust", "hope", "respect", "intimacy", "attachment" ] }, "ResourceHeader": { "type": "object", "properties": { "content_hash": { "type": "string" }, "dependencies": { "type": "array", "default": [], "items": { "$ref": "#/$defs/ResourceRef" } }, "id": { "type": "string" }, "kind": { "$ref": "#/$defs/ResourceKind" }, "revision": { "type": "string" }, "schema_version": { "type": "integer", "format": "uint32", "minimum": 0 } }, "required": [ "id", "kind", "schema_version", "revision", "content_hash" ] }, "ResourceKind": { "type": "string", "enum": [ "character", "world_book", "persona", "plot_module", "item_spec" ] }, "ResourceRef": { "type": "object", "properties": { "content_hash": { "type": "string" }, "id": { "type": "string" }, "kind": { "$ref": "#/$defs/ResourceKind" }, "revision": { "type": "string" } }, "required": [ "id", "kind", "revision", "content_hash" ] }, "StateOp": { "oneOf": [ { "type": "object", "properties": { "key": { "type": "string" }, "op": { "type": "string", "const": "set_world_flag" }, "value": { "type": "boolean" } }, "required": [ "op", "key", "value" ] }, { "type": "object", "properties": { "adjustment": { "$ref": "#/$defs/RelationshipAdjustment" }, "from": { "type": "string" }, "op": { "type": "string", "const": "adjust_relationship" }, "to": { "type": "string" } }, "required": [ "op", "from", "to", "adjustment" ] }, { "type": "object", "properties": { "op": { "type": "string", "const": "create_promise" }, "promise": { "$ref": "#/$defs/Promise" } }, "required": [ "op", "promise" ] }, { "type": "object", "properties": { "op": { "type": "string", "const": "update_promise" }, "promise_id": { "type": "string" }, "resolved_at": { "type": [ "string", "null" ] }, "status": { "$ref": "#/$defs/PromiseStatus" } }, "required": [ "op", "promise_id", "status" ] }, { "type": "object", "properties": { "op": { "type": "string", "const": "add_knowledge" }, "record": { "$ref": "#/$defs/KnowledgeRecord" } }, "required": [ "op", "record" ] }, { "type": "object", "properties": { "item": { "$ref": "#/$defs/ItemInstance" }, "op": { "type": "string", "const": "add_item" } }, "required": [ "op", "item" ] }, { "type": "object", "properties": { "from": { "type": "string" }, "item_id": { "type": "string" }, "mode": { "$ref": "#/$defs/AcquisitionMode" }, "op": { "type": "string", "const": "transfer_item" }, "placement": { "$ref": "#/$defs/ItemPlacement" }, "to": { "type": "string" } }, "required": [ "op", "item_id", "from", "to", "placement", "mode" ] }, { "type": "object", "properties": { "check": { "$ref": "#/$defs/CheckRecord" }, "op": { "type": "string", "const": "record_check" } }, "required": [ "op", "check" ] }, { "type": "object", "properties": { "clock_id": { "type": "string" }, "delta": { "type": "integer", "format": "uint16", "maximum": 65535, "minimum": 0 }, "op": { "type": "string", "const": "advance_clock" } }, "required": [ "op", "clock_id", "delta" ] } ] } } }