D&D Module Structure
Fifty years of iterated adventure design encoded a set of structural principles that no AI narrative system can afford to ignore · particularly around NPCs, player agency, and the quiet architecture of how information reaches a player.
Why This Research
Before designing any schema, before writing any prompt, the engine needed an answer to a deceptively simple question: what does a well-made story structure actually look like? Not in the abstract · not as literary theory · but in the practical, field-tested form that has been refined in tens of thousands of gaming sessions since 1974. The Narrative Engine is, at its core, a system for producing the kind of experiences that dungeon masters have been crafting by hand for half a century. The logical first step was to understand how the best of them did it.
D&D adventure modules are an underappreciated form of applied narrative engineering. They are not novels, not screenplays, not game levels. They are instructions for generating experiences · documents written for a DM who will transform them, live, into something a group of players encounters and interacts with. That constraint makes them uniquely relevant to what we're building. We are not writing stories. We are writing instructions that an AI will use to generate stories, which a player will then encounter through a specific channel. The lineage from boxed text to beat brief is more direct than it might first appear.
We studied three flagship modules in depth: Curse of Strahd, Lost Mine of Phandelver, and Waterdeep: Dragon Heist. These were chosen deliberately. Lost Mine is lauded as the best introduction to structured adventure design ever written. Curse of Strahd represents the pinnacle of atmospheric, NPC-driven gothic horror in module form. Dragon Heist is an experiment in faction-driven, player-shaped narrative · the closest official D&D has come to what we would call sandbox-adjacent design. Together they represent a spectrum, and the structural elements they share are the ones worth keeping.
The Architecture of a D&D Module
A well-constructed D&D module is not a linear document. It is a reference system · a set of interlocking components that a DM can navigate non-linearly while running a session, each component answering a specific question: What is happening? Who is involved? What can the players do? What changes as a result? The brilliance of the format is that it encodes these answers in a predictable hierarchy, so a DM can find what they need mid-session without losing the room.
The top-level structure almost always opens with an Adventure Background · not a history lesson, but a compressed statement of the situation as it exists before the players arrive. This is crucially distinct from the story the players will experience. The background explains what actually happened and who is actually responsible, which the players may or may not discover. It gives the DM the full picture so they can play every NPC honestly. Immediately following this is what good module design calls a passive timeline: the events that will unfold if the players do nothing. The cult will complete the ritual on day seven. The merchant will be found dead on day three. The ship will leave port by midnight. The world has momentum that exists independent of player involvement.
This passive timeline is one of the most important structural concepts in module design, and it is almost entirely absent from how most AI narrative systems think about story generation. It is not a series of story events. It is a clock. A commitment that the world is not waiting.
Introduction Layer
Adventure background, the full ground truth the DM holds. Villain motivation and real timeline of events. The synopsis · one or two pages of expected flow that orient the DM before any session begins. This layer is entirely invisible to players, but it is the most important layer in the document. It is what allows the DM to improvise consistently: any question a player asks about the world has an honest answer because the DM knows the complete picture.
Hook Layer
Two to four distinct entry points into the story · each connecting to the characters through a different motivational lever. One hook works through greed, another through loyalty, a third through survival, a fourth through curiosity or honor. The hooks are not the story. They are the reasons characters show up. They exist because the DM cannot predict which motivational lever will resonate with a given group, so the module hedges by providing several. Good hooks make the problem personal and immediate: something is happening to the players, not somewhere they heard about.
Chapter Layer
Five to twelve chapters, each representing a major location, a narrative phase, or a milestone in the arc. Each chapter opens with its own overview · what the DM needs to accomplish here, what the players should learn, what the stakes are at this point in the story. Chapters contain key NPCs, keyed locations, encounters with branching outcomes, and explicit advancement triggers. They answer: where are we, what matters here, and what are the possible ways this plays out.
Appendix Layer
NPC stat blocks and personality summaries. Maps. Handouts designed to be passed directly to players · letters, wanted posters, maps with annotations, journal pages. Random encounter tables for the spaces between structured beats. This layer serves the rendering problem directly: handouts are content that has been pre-formatted for a specific delivery context. A wanted poster does not read like a narrator's description of a wanted poster. It reads like a wanted poster. The appendix encodes delivery-channel awareness in physical form.
Inside each chapter, the encounter structure follows a consistent pattern even when unstated: an overview explaining the purpose of this location or scene, read-aloud text specifying exactly what players perceive when they arrive, DM-only notes explaining what's hidden or available below the surface, and branching outcomes that explicitly map player actions to consequences. The branching outcomes deserve attention because they demonstrate an important structural commitment: the module does not assume the players will do the expected thing. It anticipates failure, detours, and left-field decisions. "If the players kill the merchant here, they lose access to the shop in Act Three." The consequence is named. The downstream cost is documented. This is what makes a module feel like a world with stakes rather than a script with a happy path.
The read-aloud text, known colloquially as boxed text for the thin line that encloses it in the printed module, deserves its own treatment. Introduced in competitive tournament play in 1979 precisely because standardized descriptions were needed when a story was being run at multiple tables simultaneously, boxed text evolved into something more philosophically interesting: a recognition that the DM's voice and the author's text are different things, and that certain content needs to be delivered verbatim while other content should be improvised. Boxed text answers questions the players need answered right now. It describes what you see, what you hear, what you smell. It is exactly as long as it needs to be · most effective examples are two to three sentences · and it is written for a specific perceptual register: physical sensation, not narrative interpretation.
What boxed text does not do is tell the player how to feel about what they see. It does not say "you feel an ominous presence." It says "the temperature drops ten degrees as you cross the threshold, and the candles in the hallway flicker out one by one." The difference is the difference between a narrator and a camera. The best boxed text is a camera. The player's character · and the player themselves · supplies the emotional response. This discipline of description over interpretation is a rule that every Haiku rendering prompt in our engine will need to enforce.
The NPC Model: Trait, Ideal, Bond, Flaw
The single most valuable thing D&D Fifth Edition contributed to game design · more valuable than any mechanic, any monster, any spell · is a four-element model for defining the internal life of any character in four fields. It appears in the character creation rules for player characters, but its real power shows up in how module designers use it for NPCs. The model is simple enough to fill out in thirty seconds and rich enough to generate a character who will surprise the designer.
Trait · a behavioral habit or observable quality: how this character acts in the world. Not an adjective. A behavior. "I always speak more loudly than the situation requires." "I make a joke when things get tense." "I inventory everything I own every morning."
Ideal · the moral or philosophical principle that this character actually lives by. Not what they claim to believe · what their decisions reveal they believe. "Power should flow to those willing to use it." "A deal made is a debt owed, no exceptions." "The only thing that matters is that the people I love are safe."
Bond · the specific person, place, or thing that this character cannot be rational about. The lever another character can use to move them. Not "I care about my family" · "I would burn this city to the ground before I let them take my sister." Bonds make characters exploitable, which makes them interesting.
Flaw · the weakness that will cost them something, eventually. Not a quirk. A structural problem in the way they move through the world. "I trust people who flatter me, even when I know they're lying." "I cannot back down from a confrontation once I've started one." "I steal small things from everyone I meet. I don't know why. I can't stop."
The psychological elegance of this model is that each of the four elements operates on a different axis of a character's interiority. The trait is how they appear · it's what you'd observe watching them from across the room. The ideal is what they serve · the invisible organizing principle behind their choices. The bond is what they would sacrifice the ideal for · the exception that reveals what they actually value more than what they claim to value. The flaw is what will eventually betray the bond · the structural weakness that makes tragedy possible.
What the model does not include is also instructive. It does not include backstory. It does not include a list of skills or competencies. It does not include emotional state or history. These are deliberately absent because they are either derivable from the four elements or irrelevant to how the character will behave in play. The model produces behavior, not biography.
When we add agenda · what this character is actively trying to accomplish during this arc, and why · the model becomes complete for our purposes. Agenda is not a static trait. It is directional. The blacksmith's agenda during this arc is not the same as their agenda in the next arc. They may have the same trait (meticulous, methodical), the same ideal (loyalty to the guild above all), the same bond (their apprentice, whose father they killed), and the same flaw (they cannot delegate, so they are always overextended). But their agenda · what they want from the world right now, what they are doing about it · is what makes them a narrative actor rather than a character prop.
Commander Vael
Trait: Speaks in clipped, tactical language regardless of context. Never uses two words when one will do.
Ideal: The mission is the only thing. Individuals · including herself · are resources to be allocated.
Bond: The unit she lost on Kepler Station. She has their service tags. She touches them when she lies.
Flaw: She respects competence so much that a sufficiently skilled enemy can earn her hesitation at the wrong moment.
Agenda: Quietly investigating whether the station disaster was engineered · and who gave the order.
Dressmaker Arwen
Trait: Always appears to be measuring something · a room, a person, a silence. Tilts her head when listening.
Ideal: Appearances are truth. What you project is what you are. Authenticity is a luxury for people who have nothing to protect.
Bond: Her daughter, who does not know who her father is. Every wealthy client Arwen cultivates is one more barrier between her daughter and that truth.
Flaw: She finds people who need nothing from her faintly threatening and becomes aggressive with them.
Agenda: Currently fencing stolen goods through her clientele · the only way to afford the debts she cannot explain.
These two characters are built from the same five-field model, yet they are completely distinct. More importantly, they are generative: any interaction a player has with either of them can be played consistently by a DM · or generated consistently by an AI · because the model defines not just what these characters say but what they will and will not do under pressure. Vael can be pushed around but not lied to. Arwen can be flattered into almost anything as long as you never imply she has no choice. These are emergent behaviors from the model's structure, not separately authored rules.
The contrast with a "background NPC" is stark. A background NPC is defined by their role: the blacksmith, the innkeeper, the guard captain. They exist to answer questions and hand out information. They have no agenda, no flaw, no bond · and therefore no behavior that surprises anyone. They are query-response systems dressed in flavor text. The trait/ideal/bond/flaw/agenda model exists specifically to prevent this, because a character without interiority is not a character · it is a search function.
Player Agency Without Chaos
The most persistent tension in tabletop RPG design · and the one most directly relevant to the Narrative Engine · is the conflict between authorial structure and player freedom. Call it the railroad versus sandbox problem. A railroad experience is one where the story proceeds on a fixed track regardless of player decisions: choices are offered but none of them actually change the outcome. The players are passengers. A pure sandbox experience is the opposite extreme: the world exists and the players can do anything in it, but there is no story because there is no structure. Choices matter enormously, but nothing is shaping those choices toward any meaningful configuration. The players are adrift.
Both extremes fail for the same underlying reason: they require the player to do something the player does not want to do. The railroad asks the player to pretend their decisions matter when they do not. The sandbox asks the player to want something, to generate their own stakes and direction, when most players showed up wanting a story to engage with. Neither respects what a player actually is: someone who wants agency that matters within a structure that gives it meaning.
The solution that D&D modules arrived at · not through theory, but through playtesting failures at thousands of tables · is what we might call the structured agency model. The destination is fixed, or at least constrained. The conspiracy will unfold; the threat is real; the climax will occur. But the path to that destination is genuinely variable, and the player's choices shape what resources, knowledge, and relationships they carry into the climax. A party that charmed the guards will have a different fight than a party that murdered them. A party that befriended the informant will know which door to open. The ending arrives, but the journey to it · and what the players feel they understand and have earned when it does · is different every time.
This is precisely the architecture we call Fixed Spine, Variable Flesh. The spine carries the narrative necessity. The flesh is the space of genuine player agency. What makes this work is that the flesh is not random variation or cosmetic difference · it is mechanically consequential, emotionally resonant variation. The choices that shape the flesh are real choices with real costs and real rewards. Players feel the agency because the agency produces outcomes they can trace back to their decisions.
The multiple-approach principle: Every problem in a well-designed D&D module has at least three valid approaches · typically combat, stealth, and social negotiation, with a fourth option available to characters with specific abilities or knowledge. This is not about balance. It is about honesty. The module is committing to the premise that player agency is real · that when you say "you can try anything," you mean it. If there is only one solution, the appearance of choice is a lie.
The adventure hook system is where this philosophy is most immediately expressed. A module that begins with "you are all hired by a mysterious stranger" has committed a railroad at the entrance. It has assumed a single motivation (money or obligation) and a single entry point (the stranger), and any player whose character would not respond to that hook is stranded. Good module design offers multiple hooks because it understands that different players have different reasons for engaging · and that the most memorable sessions are ones where the players chose to be there rather than were forced there by narrative gravity.
The passive timeline connects to player agency in a way that is not immediately obvious. At first it might seem like the passive timeline is the enemy of agency · the story is going to happen whether players act or not, so what do their choices actually determine? But the opposite is true. Because the world has momentum, player inaction is itself a meaningful choice with consequences. A party that takes three days to find the cult hideout arrives to find the ritual has already begun. They have to fight through a summoning in progress rather than preventing it. Their decision to rest and resupply · or their failure to prioritize · has changed the encounter they face. Agency requires stakes, and the passive timeline is what creates stakes. Without it, urgency is theater.
What We Discovered
The passive timeline predates our concept of it by fifty years
We came into this research intending to design a "passive timeline" feature for the engine · the behavior of the world when no player is interacting. We expected to have to invent the concept. Instead, we found it codified and taken for granted in the very first pages of every well-reviewed module. "Adventure Background: If the players do nothing..." Every serious module author treats this as obvious. The world must have momentum or it is a diorama, not a world. This was both validating and humbling · we are rediscovering an insight that tabletop designers formalized before most of our team was born. It is now a non-negotiable structural element, not a feature.
The rendering problem was identified and named in 1979
Boxed text was invented for tournament play, when consistency of presentation across tables was operationally necessary. But the design principle it encoded · that certain content must be rendered in a specific voice, for a specific delivery context, verbatim · is exactly the problem we are solving in the Narrative Engine. The module authors understood that a description that works when a DM improvises it at their home table will not work when a stranger reads it cold in a convention setting. They built a format to solve it. We are building a system to solve a version of the same problem at AI scale. The lineage is direct.
The hook count is a reliability mechanism, not a creativity exercise
We initially read the "two to four adventure hooks" convention as a player experience feature · more entry points, more engagement. The real reason, discovered through close reading of DM commentary and playtesting retrospectives, is more defensive. Any single hook will fail to resonate with some percentage of players. Two hooks cuts that percentage. Three cuts it again. Four hooks means almost any player at any table can find a reason to engage that feels personal rather than obligatory. The hook count is redundancy engineering. This reframes how we think about entry points in the Narrative Engine: bounty hooks, NPC invitations, environmental triggers, and broadcast clues are not alternate flavors · they are reliability coverage for a critical moment of player engagement.
Chapter structure is content modularization, not narrative chapters
The chapters in a D&D module do not correspond to narrative chapters in the literary sense. They are modular content units · each self-contained enough to be run independently, loosely coupled enough to sequence differently without breaking the story. A party that skips Chapter 3 because they found an alternate path still arrives at Chapter 4 with enough context to proceed. This modularity is not accidental. It is what makes modules resilient to the thing that always happens in tabletop: players doing the unexpected. For the Narrative Engine, this maps directly to the beat dependency model. Beats should have prerequisites, but the prerequisites should be informational rather than sequential. The player needs to know X before beat N makes sense · they do not need to have experienced the specific sequence of events that revealed X.
How This Shapes the Engine
Each of the following decisions is a direct consequence of this research. They are not inspired by D&D module design · they are derived from it, with the specific mechanism named.
The NPC trait/ideal/bond/flaw/agenda model is required for all Entity definitions
The five-field character model is not optional scaffolding. It is the minimum specification for any named entity that the engine is expected to generate dialogue for, play as an interactive character, or involve in consequential narrative decisions. An entity without all five fields is not a character and cannot be treated as one by the rendering layer. Entities that exist purely as environmental flavor · a crowd of dockworkers, a passing ship · do not require the model. Any entity that has a name and can speak does.
Every arc must define a passive timeline at generation time
The arc schema requires a passive_timeline field: a sequence of timed events that occur whether or not any player interacts with the story. This field is not optional and cannot be left empty. A Sonnet prompt that produces an arc without a passive timeline has failed its output requirements. The passive timeline is what makes fronts and clocks meaningful: the steps on a clock correspond to passive timeline events, so the player can observe the world advancing toward a bad outcome and choose when to intervene.
Every arc must offer at least two entry hooks targeting different motivational levers
Single-hook arcs are structurally unreliable. The engine will require arc definitions to include at minimum two hooks · ideally three · each appealing to a different player motivation: financial reward, personal connection, survival pressure, curiosity, or reputation. The hook must make the problem feel immediate and personal, not distant and abstract. A broadcast arc that begins "there's trouble somewhere in the sector" is not a hook. "Your shipment was aboard the vessel that just went silent" is a hook. The engine prompt framework must enforce this distinction.
Beat dependencies are informational, not sequential
A beat's prerequisite list should express what the player needs to know before the beat is accessible, not which specific earlier beat delivered that knowledge. This mirrors the chapter modularity of D&D modules and is what enables the Three-Clue Rule to function: there are three paths to the critical information, so the beat that requires that information can be accessed via any of them. Sequential dependencies create brittle stories; informational dependencies create resilient ones.
The rendering layer inherits the discipline of boxed text
Every Haiku rendering prompt will be evaluated against a standard derived from boxed text: does this content describe what a character perceives, or does it tell the player how to interpret what they perceive? The former is correct. The latter is the failure mode. A feed broadcast should describe events as an institutional voice reports them. A board notice should render as a physical object being read. Neither should narrate the significance of what the player is learning. Significance is the player's business. Perception is the engine's.
Multiple valid approaches per beat are a quality metric
Any beat that can only be resolved one way is a railroad event, not a story beat. The engine's quality evaluation · both automated and human · should flag single-resolution beats as structural problems. This does not mean every beat requires three explicit options. It means that the NPC the player talks to should respond meaningfully to charm, threat, bribery, and honest appeal · not just to the "correct" approach. The beat brief given to Haiku should include the NPC's agenda and flaw precisely so that the rendering layer can play them honestly in response to unexpected player approaches.
Connections to Other Research
D&D module structure is the foundational layer of the entire research corpus. It is where the core vocabulary was established · arc, beat, hook, passive timeline, branching outcome · and where the philosophy of player agency was tested over the longest period of iteration. Everything that follows in the research builds on or reacts to concepts that the module format introduced.
The Warhammer: Enemy Within research takes the D&D module structure and asks: what does this look like at campaign scale, with a fixed conspiracy spine, where the full experience spans months of play? TEW answers the question of how you make a fixed story feel alive across a long arc without the DM needing to improvise the entire thing. The fixed spine / variable flesh distinction · the core design concept of Book Mode · emerges from that comparison. D&D modules gave us the chapter, the hook, and the NPC model. TEW gave us the spine.
Beat Theory research takes the D&D encounter · the discrete unit of play · and examines it through a more granular lens. What makes one encounter feel meaningful and the next feel like a speed bump? The answer is the beat classification system: story, character, interaction, atmosphere, decision. Every encounter in a D&D module implicitly belongs to one of these categories, but naming them allows the engine to reason about sequence and pacing in a way that the module format never had to, because human DMs do that reasoning intuitively.
Improv DM Techniques is in some ways a direct response to the limitations of the module format. When D&D modules fail, they fail because they assume the players will cooperate with the intended structure. The improv techniques research · particularly the Three-Clue Rule and the Fronts/Clocks system from Apocalypse World · provides the failsafes and adaptive mechanisms that allow the engine to maintain coherence when players do the unexpected. These are not alternatives to module structure. They are the safety net beneath it.
The EV2090 code analysis is where we discovered how many of these principles were already partially implemented and where the gaps were. The existing system has hooks (one per arc, not multiple), has beats (via the choreography phase), has NPC voices (for bounty informants only), but has no passive timeline, no informational beat dependencies, and NPCs defined by role rather than by the trait/ideal/bond/flaw/agenda model. The D&D research gave us the vocabulary to name precisely what is missing.
From Module to Campaign Spine
TEW takes D&D module structure and scales it to a full conspiracy arc. The fixed spine / variable flesh model · the core concept for Book Mode · emerges from that comparison. D&D gave us the chapter, the hook, and the NPC model. TEW gave us the spine.
The Safety Net Beneath the Module
The Three-Clue Rule and Fronts/Clocks from Apocalypse World are the adaptive mechanisms that keep module structure coherent when players deviate. These are not alternatives to the module format · they are the failsafes that make it survivable in a real play session.