Campaign Design¶
This document defines how Tavern campaigns are created, structured, and played. It is a reference for prompt engineering, system prompt development, and feature implementation — not an architecture decision record. Changes to this document are normal PRs, not ADR-level events.
For the underlying data model and session lifecycle, see ADR-0004.
Campaign Creation¶
When a player starts a new campaign, two things happen: the player selects a set of startup parameters, and Claude generates a Campaign Brief based on those parameters.
Startup Parameters¶
The player configures the campaign through a small set of choices at creation time. The parameters are split into required and optional — optional parameters are filled by Claude if the player skips them.
Required:
| Parameter | Options |
|---|---|
| Tone | Preset or freeform (see Tone section below) |
| Campaign length | One-Shot (1 session) · Short (3-5 sessions) · Full Campaign (10+) |
Optional (Claude chooses if left blank):
| Parameter | Options |
|---|---|
| Setting type | Coastal City · Underground · Wilderness · Political Court · Planar · Surprise me |
| Play focus | Combat-heavy · Roleplay-heavy · Exploration-heavy · Balanced |
| Difficulty | Forgiving · Balanced · Deadly |
These parameters are stored in the Campaign entity and injected into the system prompt. They do not change after campaign creation — they are the DNA of the campaign.
The parameter list is deliberately short. Tabletop RPG players want to play, not fill out forms. Five parameters with sensible defaults are enough to produce distinct campaigns without decision paralysis.
Campaign Brief¶
Based on the startup parameters, Claude generates an internal Campaign Brief — a structured outline of the campaign that the player never sees. The brief is stored in the world_seed field of the Campaign entity (ADR-0004).
The brief contains:
- Setting: Geography, political situation, recent history, atmosphere. Generated by Claude, consistent with the selected setting type and tone.
- Central conflict: The main narrative thread that gives the campaign direction. A problem, a mystery, a threat — something that creates momentum.
- Antagonist: Name, motivation, resources, location. The force behind the central conflict. Not necessarily a villain — could be a natural disaster, a political movement, or an unknowable entity, depending on tone.
- Act structure: 3-5 milestones that sketch the narrative arc from introduction to climax. These are waypoints, not checkpoints — the campaign does not require the players to hit them in order or at all.
- Key NPCs: 3-5 characters with name, role, disposition, and a secret. These are authored as predefined NPC records (ADR-0013) at campaign creation — not generated dynamically at runtime. They are injected into the Narrator's snapshot before the first session so the Narrator can reference them consistently from turn one.
- World rules: Any setting-specific constraints (e.g., "magic is feared and persecuted," "the sea is impassable," "the gods are silent"). These shape Claude's narrative decisions throughout the campaign.
The brief is generated once at campaign start and updated by Claude as the campaign evolves. If the players' actions invalidate a milestone or the antagonist is defeated early, Claude revises the brief — the brief serves the story, not the other way around.
One-Shots vs. Full Campaigns¶
The campaign length parameter changes the brief's structure:
One-Shot: The brief contains a single self-contained scenario — a dungeon, a heist, a mystery. The act structure has 3 beats (setup, confrontation, resolution) designed to complete in one session. NPCs are minimal, the central conflict is immediate, and there is no long-term world-building.
Short Campaign (3-5 sessions): A focused narrative arc with a clear beginning, middle, and end. The act structure has 3 milestones. World-building is light — enough to sustain a few sessions, not enough to overwhelm.
Full Campaign (10+): A rich world with multiple factions, subplots, and a multi-act arc. The brief is more detailed, with 5 milestones, more NPCs, and deeper world-building. Claude generates additional world detail as the campaign progresses — new regions, new factions, new conflicts that emerge from player actions.
NPC Management¶
Tavern maintains a persistent NPC roster per campaign. Every named NPC that appears in a campaign — whether authored before the first session or introduced spontaneously by the Narrator mid-campaign — is stored as a record with fixed core attributes and mutable state. This is the mechanism that prevents the Narrator from reinventing NPC names, appearances, and personalities across turns.
Predefined NPCs¶
Predefined NPCs are created by the player via the campaign management API before or during campaign setup. They are the campaign's named cast: the quest-giving merchant, the recurring antagonist, the dragon at the centre of the narrative.
A predefined NPC carries: - Fixed attributes (set at creation, immutable thereafter): name, species, appearance, stat block reference (optional) - Mutable attributes (updated by gameplay): HP, disposition, status (alive/dead/fled), current location - Narrative attributes (readable by the Narrator): role, motivation
Predefined NPCs with plot_significant = true remain in the Narrator's snapshot even
after death or flight — they are too important to the story to disappear silently.
Narrator-Spawned NPCs¶
When the Narrator introduces a new character not already in the roster, it emits an
NPC spawn signal via the GMSignals envelope. The server creates a persistent record
immediately, before processing any other signals from that turn. Once created, a
spawned NPC is treated identically to a predefined NPC.
The Narrator's system prompt instructs it to emit a spawn signal only on a character's first appearance — never for NPCs already present in the snapshot. Duplicate spawn signals are discarded by the server.
NPC Consistency Guarantee¶
Once an NPC exists in the roster, its name, species, and appearance are locked. The Narrator cannot modify these fields via spawn signals — it can only read them from the snapshot. A player who wants to rename or re-describe an NPC can do so via the campaign management API; this action is logged as a campaign event.
The Narrator snapshot for a scene includes all NPCs whose current location matches the scene, plus any NPCs seen recently (within the last N turns). Mechanical attributes (HP, AC) are included only when the session is in combat mode.
Stat Blocks and Custom Creatures¶
An NPC can reference a stat block via stat_block_ref — an index resolved through the
three-tier lookup (Campaign Override → Instance Library → SRD Baseline). This means:
- Standard SRD creatures (goblin, bandit, veteran) resolve from the 5e-database.
- Licensed non-SRD creatures (imported by the player via the Instance Library) resolve from the instance's custom data.
- Campaign-specific variants resolve from campaign overrides.
Stat block values populate mechanical attributes at spawn. Narrator-provided overrides (e.g. an elite goblin with higher HP) apply selectively on top of the stat block.
For the campaign management API endpoints, see ADR-0013 §6.
World Generation¶
Tavern does not ship with a pre-built world. Every campaign generates its own world based on the startup parameters. This is a deliberate design choice with a licensing implication: Tavern uses no WotC-protected intellectual property. No Forgotten Realms, no Baldur's Gate, no Waterdeep, no Beholder, no Mind Flayer. All world content is either Claude-generated or community-provided.
Claude-Generated Worlds¶
This is the default path. Claude creates the setting, geography, factions, and history as part of the Campaign Brief. The world is unique to each campaign — two campaigns with the same parameters will produce different worlds because Claude's generation is non-deterministic.
Claude must follow these constraints when generating worlds: - No WotC-protected terms. Use "Game Master" not "Dungeon Master." Invent original creature names for anything not in the SRD. No named settings, deities, or characters from WotC publications. - SRD-conformant mechanics. Creatures use SRD stat blocks. Spells, classes, and items are SRD-compatible. The world is mechanically standard even if narratively original. - Internal consistency. A world's rules, established at creation, remain stable. If magic is rare in session 1, it does not become common in session 5 without narrative justification.
Community World Presets¶
World presets are an extension mechanism — not a launch feature, but architecturally supported from day one. A preset is a structured document (Markdown or JSON) that pre-fills the world_seed field with a setting description, key NPCs, factions, and world rules.
The preset format is intentionally simple:
# [World Name]
## Setting
[Description of the world — geography, politics, atmosphere]
## Factions
- [Faction name]: [Description, goals, disposition toward players]
## Key NPCs
- [Name]: [Role, personality, secret]
## World Rules
- [Constraint 1]
- [Constraint 2]
## Attribution
[License, author, source]
Community presets live outside the Tavern repository. Players download them and import them at campaign creation. Tavern provides the mechanism — the community provides the content. If someone creates a Forgotten Realms preset, that is their licensing decision, not Tavern's.
This is the same model that Foundry VTT uses successfully: the platform is clean, the community modules are user-responsibility.
Narrative Guidance¶
Soft Guidance as Default¶
Tavern uses soft guidance — Claude has a plan (the Campaign Brief), but the players have full agency. When players deviate from the planned arc, Claude adapts rather than blocks.
The principle: The world reacts, it does not redirect.
If the players ignore the questgiver and decide to open a tavern instead, Claude does not invent reasons to force them back on track. Instead: - The central conflict continues to evolve in the background. The plague spreads, the antagonist gains power, NPCs the players care about are affected. - Consequences of the players' choices create natural hooks back to the main plot. The tavern is in a city where the plague is worsening. A customer mentions rumours. An NPC friend falls ill. - The players can still choose to ignore these hooks. The campaign becomes their story, not the brief's story.
This is what good human DMs do. The brief exists to prevent narrative drift over long campaigns — without it, Claude's improvisation would produce increasingly disconnected scenes. With it, there is always a background thread that can re-emerge when the players are ready.
What Claude Must Not Do¶
- Block player actions to protect the plot. If the players want to kill the questgiver, they kill the questgiver. Claude adapts.
- Invalidate player decisions retroactively. If the players chose to ally with a faction, that alliance holds unless the fiction provides a reason for it to break.
- Railroad through NPCs. NPCs do not exist to deliver plot exposition on command. They have their own motivations, and they may refuse, lie, or act against the players' interests.
- Break the fourth wall about the campaign structure. Claude never says "you should probably go to the dungeon" or "the plot requires you to..." The Campaign Brief is invisible to the players, always.
Sandbox Mode¶
For players who want full sandbox play, the play focus parameter "Exploration-heavy" combined with a full campaign length produces a brief with a minimal central conflict and a richly detailed world. Claude generates geography, factions, and NPCs but does not push a narrative arc. The players create their own story.
This is not a separate mode — it is the same soft guidance system with the guidance dial turned almost to zero. Architecturally identical, narratively different.
Tone¶
Tone is configured at campaign creation and remains consistent throughout the campaign. It is stored in the dm_persona field of the Campaign entity and injected into the system prompt.
Presets¶
Each preset is a named system prompt fragment that defines Claude's narrative voice, vocabulary, and boundaries:
Heroic Fantasy — Optimistic, epic, clear moral lines. Heroes are heroic, villains are villainous, sacrifices are meaningful. Think Tolkien's tone, not his density. Combat is dramatic. NPCs admire the players. The world rewards courage.
Dark & Gritty — Moral ambiguity, scarce resources, realistic consequences. Good people do bad things for understandable reasons. Death is common and not always meaningful. The world is indifferent. Think Joe Abercrombie, not torture porn — the darkness serves the story, it is not the story.
Lighthearted & Humorous — The fourth wall is thin. Absurd situations are welcome. NPCs are eccentric. Puns are allowed. Failure is funny, not punishing. Think Terry Pratchett — sharp underneath the humor, but the surface is always fun.
Mystery & Intrigue — Slow pacing, clues over combat, layered secrets. NPCs have hidden agendas. The truth is always one layer deeper than it appears. Combat is rare but meaningful. Think noir in a fantasy setting.
Eldritch Horror — Cosmic dread, the unknowable, sanity as a resource. The enemy is not evil, it is incomprehensible. Victory means survival, not triumph. Knowledge is dangerous. Think Lovecraft's atmosphere without his worldview.
Freeform Tone¶
Players can write their own tone description instead of selecting a preset. The freeform text is stored in dm_persona verbatim and injected into the system prompt. Examples:
- "Like a Tarantino movie but in a fantasy setting"
- "Studio Ghibli — magical, gentle, bittersweet, with moments of wonder"
- "Hard-boiled detective fiction. The protagonist is tired and the world is broken."
Freeform tone is powerful but unpredictable — Claude interprets the description, and two sessions with the same freeform text may feel different. Presets are tested and tuned for consistency. The UI should make this trade-off clear without discouraging freeform use.
Tone Consistency¶
The system prompt instructs Claude to maintain tonal consistency across the entire campaign. A Heroic Fantasy campaign does not suddenly become grimdark because a player encountered a dark dungeon. Tonal shifts are gradual and narratively motivated — a campaign can darken over time if the story calls for it, but the shift must be earned, not accidental.
The tone does not change mid-campaign through player configuration. If a player wants a different tone, they start a new campaign. This is a simplification — mid-campaign tone shifts are narratively valid but technically complex (the rolling summary was written in the old tone, NPCs were characterised in the old tone). The simplification avoids inconsistency.
Campaign Conclusion¶
Claude Suggests, Player Decides¶
When Claude determines that the central conflict is resolved — the antagonist is defeated, the mystery is solved, the quest is complete — it narrates a moment of closure and then asks the player whether they want to conclude the campaign or continue playing.
Claude does not force an ending. Post-climax play is a legitimate and common pattern in tabletop RPGs — the heroes explore the aftermath, tie up loose ends, enjoy their fame, or discover that the defeated antagonist was only a lieutenant.
If the player chooses to continue, Claude generates new narrative threads from the campaign's existing world state — consequences of the climax, new threats that emerge from the power vacuum, NPCs with unfinished business. The Campaign Brief is updated to reflect the new direction.
If the player chooses to conclude, the campaign transitions to Concluded status (ADR-0004) and becomes read-only.
One-Shot Conclusion¶
One-shots have a natural endpoint — the scenario resolves. Claude narrates the conclusion and the campaign transitions to Concluded automatically after the final scene. The player can still choose to extend into a second session, which effectively converts the one-shot into a short campaign.
Abandonment vs. Conclusion¶
A campaign that is never explicitly concluded is not concluded — it is paused indefinitely and eventually transitions to Abandoned status per ADR-0004. Abandoned campaigns can be resumed at any time. The distinction matters for the player's campaign list: concluded campaigns are finished stories, abandoned campaigns are unfinished business.
SRD Compliance Reference¶
For prompt development and system prompt authoring, these terms must be avoided in all Claude-generated content:
Protected terms (WotC trademarks, not in SRD): - Dungeon Master (use: Game Master, DM, Narrator) - Forgotten Realms, Faerûn, Waterdeep, Baldur's Gate (and all other setting-specific place names) - Beholder, Mind Flayer, Illithid, Yuan-ti (and other creatures not in the SRD) - Any named NPC from WotC publications (Strahd, Tiamat, Acererak, Elminster, Drizzt)
Allowed (in SRD under CC-BY-4.0): - All core mechanics (ability scores, classes, spells, conditions) - SRD creatures (Goblin, Dragon, Skeleton, Lich, etc.) - Generic terms (dungeon, adventure, quest, campaign) - The phrase "5E compatible"
This list is not exhaustive. When in doubt, check the SRD 5.2 document. If a term does not appear in the SRD, do not use it in generated content.