Replace flat content/districts/ with hierarchical campaign/system/ station/district structure. Path mirrors canonical IDs, enables glob-based discovery, and is multi-campaign/DLC ready. - git mv 46 files preserving history - New metadata: campaign.yaml, system.yaml, station.yaml - Rewrite content.yaml with glob-based district discovery - Add campaign, system, station JSON schemas - Update district schema: hierarchy fields derived from path - Update npc-profile schema: accept district-scoped IDs - Add TODO to 17 dialogue/monologue pool files for generator revision - Update _meta/README.md with new hierarchy documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
51 lines
1.8 KiB
Markdown
51 lines
1.8 KiB
Markdown
# Content Infrastructure
|
|
|
|
Directories prefixed with `_` are infrastructure, not game content. The server content loader skips directories starting with `_` when scanning for content files.
|
|
|
|
- `_meta/` — Infrastructure metadata (this directory)
|
|
- `_schema/` — JSON Schema validation files (draft 2020-12)
|
|
|
|
## Directory Hierarchy
|
|
|
|
Content is organized hierarchically to match the game universe:
|
|
|
|
```
|
|
content/
|
|
content.yaml # Manifest: campaign list, glob discovery patterns
|
|
global/ # Cross-campaign shared content (factions, enums, knowledge)
|
|
campaigns/
|
|
{campaign}/ # e.g., "main"
|
|
campaign.yaml
|
|
systems/
|
|
{system}/ # e.g., "krenn"
|
|
system.yaml
|
|
stations/
|
|
{station}/ # e.g., "sova"
|
|
station.yaml
|
|
districts/
|
|
{district}/ # e.g., "transit"
|
|
district.yaml
|
|
npcs/
|
|
locations/
|
|
triangles/
|
|
dialogue/
|
|
monologue/
|
|
routines/
|
|
templates/
|
|
```
|
|
|
|
## Canonical ID Derivation
|
|
|
|
Identity is derived from directory path at load time — no redundant ID fields in YAML.
|
|
|
|
- **District:** `{system}.{station}.{district}` (e.g., `krenn.sova.transit`)
|
|
- **NPC (within district):** `npc:{slug}` (e.g., `npc:kael-davan`)
|
|
- **NPC (cross-district):** `npc:{district}.{slug}` (e.g., `npc:transit.kael-davan`)
|
|
- **Location:** `{system}.{station}.{district}.location.{slug}`
|
|
|
|
## Content Discovery
|
|
|
|
The loader reads `content.yaml` for enabled campaigns and their glob patterns.
|
|
District discovery uses `systems/**/districts/*/district.yaml` — no per-district
|
|
manifest entry needed. Adding a district = creating a directory with district.yaml.
|