
Dungeon Engine
Dungeon Engine (DE) is a self-contained, rules-agnostic package that governs play inside dungeons. It exists so the GM stays consistent with a dungeon's layout and locations, remembers what has been visited and what loot was taken, and never has to reconstruct a room from memory mid-session. Build once with the Builder, run with the Runner, and let the tracker be the memory — the node files are the map, the tracker is the truth. Features: Building — one-line contract (premise / weight / the place's horizon); graph-first design with loops and junctions; lettered node names as pure table notation (never in-world vocabulary); bidirectional connections enforced, secret connections noted on both sides; a map-drawing recipe that verifies the map edge-for-edge against the node files. Running — node-to-node micro-scenes with navigation-legibility standards; tracker memory (currentRoom, visited/explored/cleared/looted, discoveredConnections, loot with carriers); consistency rules with no retcons, no invented topology, no one-sided edges; dungeon ecology, alarm/response, resting with costs, wandering encounters, honest retreat. Knowledge separation — GM spoiler map vs player map, regenerated only at entry, rests, and exit (never live-synced); the player map shows visited nodes, discovered connections, and stubs into the unseen — no traps, no secrets; clear <Name> - GM Spoiler / <Name> - Player Map labeling. The AP/AQS bridge — when a scene resolves to a locationType: "Dungeon" location, the scene brain hands room-level play to DE: the whole dungeon is one AQS scene while DE runs the inside, and on conclusion the outcome reports up (entryStatus, knownFacts, locationStates) through the normal scene boundary — DE never writes campaign state directly. Boundaries — DE owns node-level play only; quests, NPC agendas, fronts, and campaign Memory stay with AQS/AP and the host rules. Rules-agnostic. Installation: The Dungeon Engine folder goes in the project root — /Dungeon Engine/. The package installer places it there automatically; nothing needs to be wired by hand. The optional AQS–AP Bridge file goes in the AQS scene-rules folder — /Advanced Quest System/GM Brain/Rules/AQS–AP Bridge.lore-2.md. Note this is the AQS "Rules" folder, not the host /Rules/ folder — the project has two different folders named "Rules." The Bridge is only needed if you also run the Advanced Quest System / Adventure Path; DE should work standalone without it.