Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

16.5 KB
Raw Blame
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "content/events/*.yaml",
  "description": "One event per file. Field names follow the GameEvent type in sim/Statecraft.Sim/Content.cs; a test keeps them equal. See docs/WRITING_EVENTS.md.",
  "type": "object",
  "additionalProperties": false,
  "required": ["id", "title", "text", "from", "options", "sources"],
  "definitions": {
    "date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "A day, YYYY-MM-DD." },
    "id": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "Lowercase letters, digits and underscores, starting with a letter." },
    "alternative": {
      "type": "object",
      "additionalProperties": false,
      "required": ["basis"],
      "description": "Who put forward a non-historical option (R-ALT-003). proposed or debated: by (a body or office in words, never a person), date and sources; design: nobody is recorded proposing it, so no by and no date.",
      "properties": {
        "basis": { "enum": ["proposed", "debated", "design"] },
        "by": { "type": "string" },
        "date": { "$ref": "#/definitions/date" },
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["url", "checked"],
            "properties": {
              "url": { "type": "string", "pattern": "^https://" },
              "checked": { "$ref": "#/definitions/date" }
            }
          }
        }
      },
      "oneOf": [
        {
          "properties": {
            "basis": { "enum": ["proposed", "debated"] },
            "by": { "type": "string", "pattern": "^[^{}]*\\S[^{}]*$" },
            "sources": { "minItems": 1 }
          },
          "required": ["by", "date", "sources"]
        },
        {
          "properties": {
            "basis": { "const": "design" },
            "by": { "const": "" }
          },
          "not": { "required": ["date"] }
        }
      ]
    },
    "requirement": {
      "type": "object",
      "additionalProperties": false,
      "required": ["event"],
      "description": "One precondition (R-ALT-001): the event was resolved with this option, or, with diverged: true, with any option but its historical one (R-ALT-002). Give option or diverged, not both.",
      "properties": {
        "event": { "$ref": "#/definitions/id" },
        "option": { "$ref": "#/definitions/id" },
        "diverged": { "type": "boolean" }
      },
      "oneOf": [
        {
          "required": ["option"],
          "properties": { "diverged": { "const": false } }
        },
        {
          "required": ["diverged"],
          "properties": { "diverged": { "const": true } },
          "not": { "required": ["option"] }
        }
      ]
    },
    "variant": {
      "type": "object",
      "additionalProperties": false,
      "required": ["when", "text", "sources"],
      "description": "Alternative title and text for a reconvergence event on a road not taken (R-ALT-010). Options and effects do not vary.",
      "properties": {
        "when": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/requirement" } },
        "title": { "type": "string", "description": "Optional; when absent, use the event's title." },
        "text": { "type": "string", "minLength": 1 },
        "sources": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["url", "checked"],
            "properties": {
              "url": { "type": "string", "pattern": "^https://" },
              "checked": { "$ref": "#/definitions/date" }
            }
          }
        }
      }
    }
  },
  "properties": {
    "id": { "$ref": "#/definitions/id", "description": "Unique across all events." },
    "kind": { "enum": ["historical", "consequence", "reconvergence"], "description": "Default historical. consequence: a soft card that exists only on a road not taken (R-ALT-005 to R-ALT-008). reconvergence: a real outside event that may carry variants (R-ALT-010)." },
    "title": { "type": "string", "minLength": 1, "description": "May contain office placeholders such as {prime_minister}." },
    "text": { "type": "string", "minLength": 1, "description": "May contain office placeholders. No invented quotes." },
    "title_he": { "type": "string", "minLength": 1, "description": "The title in Hebrew (#1064). An event with Hebrew text has title_he, text_he and every option's text_he, or none of them (the UI keeps the English). Same placeholders as the English." },
    "text_he": { "type": "string", "minLength": 1, "description": "The text in Hebrew (#1064): the English meaning, no added facts. Same placeholders as the English." },
    "text_he_review": { "type": "string", "enum": ["agent-checked"], "description": "Review flag of the event's Hebrew text (title_he, text_he and the options' text_he). agent-checked: an AI agent wrote or checked the text and no person has read it yet (CONTENT_POLICY section 2, rule 6). Leave out once a native speaker, or an AI-assisted contributor who discloses it, has reviewed it (#564; owner, 4 November 2026: \"AI-assisted can clear it\")." },
    "tags": { "type": "array", "items": { "type": "string" }, "description": "holocaust, terror, massacre, war-casualties and displacement are sensitive. A displacement option cannot raise Money, Food, Arms, Social cohesion, International Support or score (R-EFX-007), and the event must be sensitivity-reviewed before release (R-GATE-001)." },
    "anchor": { "enum": ["hard", "soft"], "description": "Default soft. A hard anchor needs a historical option." },
    "office": { "$ref": "#/definitions/id", "description": "The office the event goes to when the player does not answer." },
    "objective": { "$ref": "#/definitions/id", "description": "The objective (objectives.yaml) whose completion card this is. It fires only once that objective is completed, and has exactly one option." },
    "site": { "$ref": "#/definitions/id", "description": "A swamp site (sites.yaml) whose works this event is about. In the GDD loop it fires only while that site is being worked; the legacy loop ignores it." },
    "prisoners": { "enum": ["egypt", "jordan", "lebanon", "syria"], "description": "The front whose prisoners this exchange card returns (R-POW-004). It fires only while that front holds prisoners or the player's soldiers, and has exactly one option. Jordan's card also returns the Iraqi prisoners." },
    "deported": { "$ref": "#/definitions/id", "description": "A settlement target (settlement_targets.yaml) whose residents stayed. This Deport follow-up card fires only once the player's Deport has depopulated that place, carries the displacement tag and has exactly one option (R-EVT-007)." },
    "front_quiet": { "enum": ["egypt", "jordan", "lebanon", "syria"], "description": "The front of this armistice_<front> card, on that card only. Under gdd-0.3 the card may also come before its from, and again after a refusal, once that front is quiet (Armistice.MayOfferEarly), and then it takes the first soft slot (R-WAR-008, R-EVT-002). Shown before its from, it shows its early_text when it has one." },
    "armistice_front": { "enum": ["egypt", "jordan", "lebanon", "syria"], "description": "On an operation card or a following card only: the front whose signed armistice ends the card. A pending operation lapses once it is signed, and the card never first fires after it (R-ENEMY-007)." },
    "follows": { "type": "boolean", "description": "Under the GDD loop: the card follows the decision its requires waits for, and fires on the turn after that decision even when its own window has closed, so a late operation still brings it (R-ENEMY-007). Needs requires." },
    "late_text": { "type": "string", "description": "On a following card or an operation card only: the text shown when the card is shown after its own window has closed (a late follow-up, or an operation shown again while it waits), with no dates that would mislead (R-ENEMY-007)." },
    "late_text_he": { "type": "string", "description": "late_text in Hebrew; required exactly when the card has Hebrew text (R-ENEMY-007)." },
    "early_text": { "type": "string", "description": "On a front_quiet armistice card only: the text shown when the card is shown before its from (the early path), saying the talks came sooner than in history. The card is then marked as an alternative course, and a shareable build needs the card's reviewed_by (R-WAR-008, R-ALT-011). Its office placeholders need a holder from 15 December 1948, the first early offer." },
    "early_text_he": { "type": "string", "description": "early_text in Hebrew; required exactly when the card has Hebrew text (R-WAR-008)." },
    "order": { "type": "integer", "description": "Default 0. Among the cards that fire on the same turn with the same from, a lower order comes first, then the id (R-EVT-006). Set it only to put one card after another on purpose." },
    "from": { "$ref": "#/definitions/date", "description": "First day of the window." },
    "to": { "$ref": "#/definitions/date", "description": "End of the window (exclusive). Leave out for an open window." },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["indicator"],
        "properties": {
          "indicator": { "$ref": "#/definitions/id" },
          "min": { "type": "number" },
          "max": { "type": "number" }
        }
      }
    },
    "requires": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/requirement" }, "description": "Every entry must hold (R-ALT-001)." },
    "variants": { "type": "array", "items": { "$ref": "#/definitions/variant" } },
    "options": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "text"],
        "properties": {
          "id": { "$ref": "#/definitions/id" },
          "text": { "type": "string", "minLength": 1 },
          "text_he": { "type": "string", "minLength": 1, "description": "The option's text in Hebrew (#1064), under the event's text_he_review." },
          "historical": { "type": "boolean" },
          "recommended": { "type": "boolean" },
          "rejoin": { "$ref": "#/definitions/id", "description": "A consequence card's option that returns the course to the record of this event (R-ALT-009)." },
          "effects": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["target", "delta"],
              "properties": {
                "target": { "type": "string", "minLength": 1, "description": "An indicator id from model.yaml, or a special target: treasury or fx_reserves (game money), food (the national Food stock, whole units) or arms (the national Arms stock, whole units; #781)." },
                "delta": { "type": "number" }
              }
            }
          },
          "set_rung": { "type": "integer", "minimum": 1, "maximum": 5 },
          "set_policy": { "type": "object", "additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 }, "description": "Policy id to a level in [0, 1]." },
          "grant_units": {
            "type": "array",
            "description": "R-EFX-003 (GDD loop only): free units of a unit_types.yaml type of kind unit, at a cities.yaml id, or with no at at the city that has the military camp (a site is refused until sites carry a date, R-EFX-006). Not on a sensitive event (R-EFX-005).",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["type", "n"],
              "properties": {
                "type": { "type": "string", "minLength": 1 },
                "n": { "type": "integer", "minimum": 1 },
                "at": { "type": "string" }
              }
            }
          },
          "city_effects": {
            "type": "array",
            "description": "R-EFX-004 (GDD loop only): a whole-unit change to one city's housing_capacity or job_slots, or a change from -1 to 1 to its housing condition. A sensitive event may only cut (R-EFX-005).",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["city", "field", "delta"],
              "properties": {
                "city": { "type": "string", "minLength": 1 },
                "field": { "enum": ["housing_capacity", "job_slots", "condition"] },
                "delta": { "type": "number", "not": { "const": 0 } }
              },
              "if": { "properties": { "field": { "const": "condition" } } },
              "then": { "properties": { "delta": { "minimum": -1, "maximum": 1 } } },
              "else": { "properties": { "delta": { "type": "integer", "minimum": -2147483647, "maximum": 2147483647 } } }
            }
          },
          "unit_orders": {
            "type": "array",
            "description": "R-ENEMY-005, R-ENEMY-008 (GDD loop, both gdd-0.1 and gdd-0.3): go-to or attack orders for the unit of a map/units_1948.yaml row, toward or on one of that row's anchor or order target hexes in map/unit_anchor_hexes.yaml, through the player's own go-to or attack.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["unit", "q", "r"],
              "properties": {
                "unit": { "type": "string", "minLength": 1 },
                "order": { "enum": ["go_to", "attack"], "description": "go_to when left out (R-ENEMY-008)." },
                "q": { "type": "integer" },
                "r": { "type": "integer" }
              }
            }
          },
          "requires_unit_regions": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "description": "R-ENEMY-007: player-region ids. Every unit_orders row's starting unit must be in any one listed region before this military-operation option can resolve.",
            "items": { "type": "string", "minLength": 1 }
          },
          "unlock_projects": {
            "type": "array",
            "description": "R-EFX-008 (GDD loop only): projects.yaml ids of locked kinds this option makes available to StartProject. A sensitive event may not unlock (R-EFX-005).",
            "items": { "type": "string", "minLength": 1 }
          },
          "debt_dollars": { "type": "number", "exclusiveMinimum": 0, "description": "R-EFX-009 (applied under gdd-0.3 only): US$ millions, more than 0, this option also adds to Debt, in IL millions at the mvp.il_per_dollar rate in force on the event's date." },
          "alternative": { "$ref": "#/definitions/alternative" }
        }
      }
    },
    "sources": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["url", "checked"],
        "properties": {
          "url": { "type": "string", "pattern": "^https://", "description": "An https:// address (RealContentTests checks this)." },
          "checked": { "$ref": "#/definitions/date", "description": "The day you opened the source." }
        }
      }
    },
    "status": { "enum": ["draft", "fact-checked", "historian-reviewed", "sensitivity-reviewed"], "description": "The review status. Default draft." },
    "reviewed_by": { "type": "string", "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$", "description": "The GitHub handle of the person who signed this row off (#375): written only by that person, never by an AI agent on its own; an AI-assisted contributor's source check counts when the pull request discloses the AI help and says what was checked; an AI-co-authored commit never removes it (owner, 4 November 2026: \"Yes, it counts\", #2481 comment 6623108295; scripts/oss/reviewed_by_guard.py); never an email. Needs reviewed_on." },
    "reviewed_on": { "$ref": "#/definitions/date", "description": "The day of that sign-off. Needs reviewed_by." }
  },
  "oneOf": [
    {
      "required": ["title_he", "text_he"],
      "properties": {
        "options": {
          "items": { "required": ["text_he"] }
        }
      }
    },
    {
      "allOf": [
        { "not": { "required": ["title_he"] } },
        { "not": { "required": ["text_he"] } },
        { "not": { "required": ["text_he_review"] } },
        { "not": { "required": ["early_text_he"] } },
        {
          "properties": {
            "options": {
              "items": { "not": { "required": ["text_he"] } }
            }
          }
        }
      ]
    }
  ]
}