JSON Schema (draft 2020-12) for content validation: district, location, npc-profile, dialogue-pool, monologue-pool, triangle, routine, and fact-catalog. NPC schema uses if/then conditional for FRIEND pattern validation. Implements ticket #386. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
55 lines
1.6 KiB
JSON
55 lines
1.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "location.schema.json",
|
|
"title": "Location Definition",
|
|
"description": "Location metadata — one file per location (D-025, D-036).",
|
|
"type": "object",
|
|
"required": ["canonical_id", "display_name"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"canonical_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z]+\\.[a-z]+\\.[a-z-]+\\.location\\.[a-z][a-z0-9-]*$",
|
|
"description": "Full canonical ID: {system}.{station}.{district}.location.{slug}"
|
|
},
|
|
"display_name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"tile_bounds": {
|
|
"type": "object",
|
|
"description": "Rectangular tile bounds for this location",
|
|
"properties": {
|
|
"x_min": { "type": "integer" },
|
|
"y_min": { "type": "integer" },
|
|
"x_max": { "type": "integer" },
|
|
"y_max": { "type": "integer" },
|
|
"z": { "type": "integer" }
|
|
},
|
|
"required": ["x_min", "y_min", "x_max", "y_max", "z"]
|
|
},
|
|
"sightlines": {
|
|
"type": "object",
|
|
"description": "Sightline properties for LOS computation",
|
|
"properties": {
|
|
"open": {
|
|
"type": "boolean",
|
|
"description": "True if the location is open-plan (no internal walls)"
|
|
},
|
|
"notes": { "type": "string" }
|
|
}
|
|
},
|
|
"ambient_sound": {
|
|
"type": "string",
|
|
"description": "Reference to ambient sound asset"
|
|
},
|
|
"social_site": {
|
|
"type": "string",
|
|
"description": "Social site template this location belongs to"
|
|
}
|
|
}
|
|
}
|