taloria/game/data/_schema.json
torsten 18479d8d27 game: Regeln von der Darstellung getrennt — Karte entscheidet, Game bewegt
Begehbarkeit stand als Präfixliste in stadt.gd, die Position als Konstante,
und das Gespräch schrieb direkt in Widgets. Jetzt:

- Die Karte trägt die Begehbarkeit selbst: legend.<zeichen>.boden, start,
  exits in data/maps/garana.json; _schema.json und validate_data.py prüfen
  Start auf Boden und Ausgänge als Durchgang.
- scripts/core/karte.gd beantwortet Start, Boden, Ausgang und NSC in
  Rufweite — ohne Knoten, Textur oder Dateinamen.
- Game (game_state.gd) hält Position, Belegung und Gespräch und entscheidet
  den Schritt; platz_geaendert, dialog_geaendert und ausgang_erreicht sind
  die einzigen Wege zur Szene. stadt.gd zeichnet und sendet Absichten.
- Selbstprüfung: neun Punkte für die Regeln ohne Szene (23 statt 12);
  Probes fragen Game.position statt Szenenfelder.

docs/engine.md §6.1 hält die drei Grenzen fest und nennt, was noch offen ist
(MapView-Schnitt, Kampf erbt keine Regel aus der Stadt).
2026-11-15 22:26:08 +01:00

590 lines
11 KiB
JSON

{
"schema": 1,
"hinweis": "Prüfgrundlage für game/data/**. Gelesen von tools/validate_data.py (Python) und von ContentDB (GDScript). Beschreibt Felder und die Effekt-Vokabel; Spielmechanik steht hier nicht.",
"enums": {
"attribute": [
"str",
"dex",
"con",
"int",
"wis",
"cha"
],
"save": [
"fort",
"ref",
"will"
],
"school": [
"arcane",
"divine"
],
"ability_type": [
"passive",
"active",
"passive_skill_check",
"active_skill_check"
],
"targets": [
"self",
"single",
"ally",
"area",
"object",
"ground"
],
"item_type": [
"weapon",
"armor",
"shield",
"misc"
],
"terrain": [
"strasse",
"gras",
"wald",
"huegel",
"gebirge",
"dungeon",
"stadt"
],
"map_kind": [
"overland",
"town",
"dungeon"
],
"bonus_target": [
"ac",
"attack",
"save",
"skill",
"initiative",
"damage",
"sight"
]
},
"ops": {
"damage": {
"pflicht": [
"amount"
],
"optional": [
"type",
"auto_hit",
"save",
"save_effect",
"dc",
"on"
]
},
"heal": {
"pflicht": [
"amount"
],
"optional": [
"affects"
]
},
"condition": {
"pflicht": [],
"eines_von": [
"add",
"remove"
],
"optional": [
"save",
"dc",
"duration",
"only",
"hit_dice_total",
"on"
]
},
"bonus": {
"pflicht": [
"target"
],
"eines_von": [
"value",
"multiplier"
],
"optional": [
"save",
"skill",
"when",
"per",
"max",
"per_round",
"affects"
]
},
"move": {
"pflicht": [
"mode"
],
"optional": [
"tiles"
]
},
"summon": {
"pflicht": [
"monster",
"count"
],
"verweis": {
"monster": "monsters"
}
},
"light": {
"pflicht": [
"radius"
],
"optional": [
"duration"
]
},
"grant_spells": {
"pflicht": [
"school"
]
},
"extra_attack": {
"pflicht": [
"count"
]
},
"resource": {
"pflicht": [
"pool",
"delta"
]
},
"message": {
"pflicht": [
"text_id"
]
},
"turn_undead": {
"pflicht": [
"duration"
],
"optional": [
"only"
]
},
"immunity": {
"pflicht": [
"against"
]
}
},
"typen": {
"races": {
"datei": "races.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"choice_bonus": {
"typ": "dict"
},
"attribute_mods": {
"typ": "dict",
"schluessel": "attribute",
"werte": "int"
},
"abilities": {
"typ": "list",
"verweis": "abilities"
}
}
},
"classes": {
"datei": "classes.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"hit_die": {
"typ": "int",
"pflicht": true,
"min": 4,
"max": 12
},
"hp_per_level": {
"typ": "list",
"pflicht": true,
"laenge": 5,
"werte": "int"
},
"attack_per_level": {
"typ": "list",
"pflicht": true,
"laenge": 5,
"werte": "int"
},
"save_bonus": {
"typ": "dict",
"pflicht": true,
"schluessel": "save",
"werte": "int"
},
"skill_points": {
"typ": "int",
"pflicht": true
},
"trained_skills": {
"typ": "list",
"verweis": "skills"
},
"weapons": {
"typ": "list",
"verweis": "items"
},
"armor": {
"typ": "list",
"verweis": "items"
},
"spell_slots": {
"typ": "dict",
"nullable": true
},
"features": {
"typ": "list",
"element": {
"id": {
"typ": "string",
"verweis": "abilities"
},
"level": {
"typ": "int",
"pflicht": true
}
}
}
}
},
"skills": {
"datei": "skills.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"attribute": {
"typ": "string",
"pflicht": true,
"enum": "attribute"
},
"trained_bonus": {
"typ": "int",
"pflicht": true
}
}
},
"abilities": {
"datei": "abilities.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"type": {
"typ": "string",
"pflicht": true,
"enum": "ability_type"
},
"cost": {
"typ": "dict"
},
"targets": {
"typ": "string",
"enum": "targets"
},
"range": {
"typ": "int"
},
"effects": {
"typ": "list",
"pflicht": true,
"effekte": true
}
}
},
"spells": {
"datei": "spells.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"level": {
"typ": "int",
"pflicht": true,
"min": 1,
"max": 3
},
"school": {
"typ": "string",
"pflicht": true,
"enum": "school"
},
"range": {
"typ": "int",
"pflicht": true
},
"targets": {
"typ": "string",
"pflicht": true,
"enum": "targets"
},
"area": {
"typ": "dict"
},
"duration": {
"typ": "dict"
},
"effects": {
"typ": "list",
"pflicht": true,
"effekte": true
}
}
},
"items": {
"datei": "items.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"type": {
"typ": "string",
"pflicht": true,
"enum": "item_type"
},
"damage": {
"typ": "string"
},
"ac_bonus": {
"typ": "int"
},
"value": {
"typ": "int",
"pflicht": true
},
"weight": {
"typ": "int",
"pflicht": true
},
"effects": {
"typ": "list",
"effekte": true
}
}
},
"monsters": {
"datei": "monsters.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"ac": {
"typ": "int",
"pflicht": true
},
"hp": {
"typ": "int",
"pflicht": true,
"min": 1
},
"attack_bonus": {
"typ": "int",
"pflicht": true
},
"damage": {
"typ": "string",
"pflicht": true
},
"move": {
"typ": "int",
"pflicht": true
},
"size": {
"typ": "list",
"werte": "int",
"laenge": 2
},
"tags": {
"typ": "list"
},
"sprite": {
"typ": "asset",
"pflicht": true,
"asset": "creatures"
},
"abilities": {
"typ": "list",
"verweis": "abilities"
}
}
},
"encounters": {
"datei": "encounters.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"terrain": {
"typ": "string",
"pflicht": true,
"enum": "terrain"
},
"monsters": {
"typ": "list",
"pflicht": true,
"element": {
"id": {
"typ": "string",
"verweis": "monsters"
},
"count": {
"typ": "int",
"pflicht": true,
"min": 1
}
}
},
"reward": {
"typ": "dict"
}
}
},
"npcs": {
"datei": "npcs.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"sprite": {
"typ": "asset",
"pflicht": true,
"asset": "npcs"
},
"greeting": {
"typ": "string",
"pflicht": true
},
"topics": {
"typ": "list"
},
"shop": {
"typ": "list",
"verweis": "items"
}
}
},
"maps": {
"glob": "maps/*.json",
"felder": {
"name": {
"typ": "string",
"pflicht": true
},
"kind": {
"typ": "string",
"pflicht": true,
"enum": "map_kind"
},
"width": {
"typ": "int",
"pflicht": true,
"min": 1
},
"height": {
"typ": "int",
"pflicht": true,
"min": 1
},
"legend": {
"typ": "dict",
"pflicht": true,
"element": {
"boden": {
"typ": "bool"
},
"tile": {
"typ": "asset",
"asset": "terrain",
"pflicht": true
}
}
},
"start": {
"typ": "dict",
"pflicht": true,
"felder": {
"x": {
"typ": "int",
"pflicht": true,
"min": 0
},
"y": {
"typ": "int",
"pflicht": true,
"min": 0
}
}
},
"tiles": {
"typ": "list",
"pflicht": true,
"laenge": "height",
"zeilen": "width"
},
"objects": {
"typ": "list",
"element": {
"id": {
"typ": "asset",
"asset": "objects"
},
"x": {
"typ": "int",
"pflicht": true
},
"y": {
"typ": "int",
"pflicht": true
}
}
},
"npcs": {
"typ": "list",
"element": {
"id": {
"typ": "string",
"verweis": "npcs"
},
"x": {
"typ": "int",
"pflicht": true
},
"y": {
"typ": "int",
"pflicht": true
}
}
},
"exits": {
"typ": "list"
}
}
}
}
}