3 content dependency graph and scenario playtests
forgejo-actions edited this page 2026-07-14 17:23:30 +00:00

Content Dependency Graph And Scenario Playtests

What This System Is

The semantic content dependency graph lets a designer validate a quest, world event, dialogue sequence, or named encounter as one reachable chain. It complements the asset dependency graph: the asset graph answers which files invalidate each other, while this graph answers which authored gameplay IDs and runtime facts cause the next piece of content to run.

The viewport Simulation surface exposes a Validate Scenario Chain action. Enter a quest, world-event, dialogue-sequence, or encounter ID as the content-chain root and run the action. Leaving the field empty selects the first authored world event, falling back to the first quest. The result banner and Event Console report reachable node and edge counts plus the first actionable failures.

Indexed Content

The graph indexes all loaded scenes and the current quest, dialogue, NPC, mob, enemy-content, and world-event catalogs. Nodes include:

  • quests, quest steps, follow-ups, offer/turn-in NPCs, and map-marker scenes;
  • dialogue sequences, dialogue lines, choices, branches, and state effects;
  • world events, phases, transitions, markers, dialogue actions, and encounter actions;
  • encounters, waves, enemy archetypes, mobs, and tagged scene spawners;
  • causal runtime facts such as quest flags, events, unlocks, party tags, scene variables, and inventory items.

Producer-to-consumer edges connect otherwise separate catalogs. For example, a quest reward that adds a world-event start flag connects that quest to the event; a final encounter wave produces its completion event, which connects back to the waiting event phase.

Runner Semantics

The runner resolves the root ID, traverses the reachable graph deterministically, and evaluates every reachable node. It does not mutate editor or gameplay state and does not need a running server.

Hard missing references are errors, including missing follow-up quests, dialogue targets, NPCs, scenes, encounters, archetypes, mobs, or per-wave spawners. A required runtime fact with no producer is a warning because it may be an intentional external scenario seed. Warnings do not fail the chain; errors do.

Encounter wave validation requires one scene spawner tagged with:

  • encounter:<encounter id>
  • wave:<zero-based wave index>

The report is intentionally bounded in the result banner. The full in-memory report retains every visited step and issue. Dependency-Aware Content Health consumes that report to select scenario, combat, and journey fixtures and export a unified CI report.

How Authors Use It

  1. Open the viewport Simulation controls.
  2. Enter the root content ID, such as world_event.slime_infestation.
  3. Select Validate Scenario Chain.
  4. Fix any reported missing edge and run the same action again.

The runner refreshes the authored-content workspace before building the graph, so it validates the complete saved workspace rather than only the currently open scene.

Rules And Invariants

  • Node IDs and lookups are normalized case-insensitively.
  • Graph output and traversal order are deterministic.
  • The runner never writes gameplay state or content assets.
  • Only issues reachable from the chosen root affect its report.
  • External seed facts remain warnings; missing concrete content IDs are errors.
  • Scene encounter bindings are validated for every authored wave.

Validation And Debugging

Run the same root after every fix until the reachable graph has no errors. Missing concrete IDs are authoring errors; missing producers for external seed facts are warnings that should be either documented in the fixture seed or connected through authored content.

Examples

Validating world_event.slime_infestation should reach the event phases, warning dialogue, road defense encounter, core encounter, spawner tags, and completion facts. A missing wave:1 spawner tag should be fixed in the scene, not suppressed in the graph.