The Binding

Enter the books you love.

Incorrect code. Try again.

The Binding  -  Enter the books you love

The Binding

Enter the books you love.

The Binding - Project Status Report

Updated: July 19, 2026 06:00 UTC • Phase 2 95% complete (274 tests passing); 16 campaign modules built (5,197 lines); 334 SRD monsters live; Lost Mine of Phandelver manifest ready; sessions data grown to 829KB

82%
Phase 1 Core Engine
70%
Infrastructure
62%
Beta Readiness
HELD
Telegram Deploy

Phase 1 - Core Engine

Delivery ItemStatusCompletionNotes
AI DM Service (LLM orchestration + streaming) βœ… Built
90%
4 modules (1,319 lines): context-manager (251), dm-service (579), llm-provider (298), prompts (191). Mock/dev error handling improved (commit 1f35464).
Rule Engine (D&D 5e core) βœ… Built
90%
7 modules: combat, dice, stats, classes, races, character-sheet. Full 5e SRD coverage. Has test suite.
Dice Service βœ… Built
90%
4 modules (899 lines): types, random, service, index. Test suite (207 tests, commit 73f04b1). Live 3D physics roller (diceroller2.js, 1005 lines - Three.js + Cannon.js with Godot-style settling). Replaced pre-recorded video approach. All 6 die types verified (327/327 logic tests passed).
Character Creation & Management βœ… Built
85%
Model, service, portrait gen. Narrative onboarding flow. Portrait gen needs image API wired up.
Scene Engine + Continuity Validator βœ… Built
80%
Exit pressure ramps, completion tracking, 4-action system per spec.
Web App (PWA) ⚠️ Partial
65%
Vanilla HTML frontend (index.html 70.9KB + create.html 22KB). Dice roller UI + 3D physics (dice-roller.js 18.5KB). PWA manifest + service worker done. Not React/framework.
Adventure Content (3 books) βœ… Built
90%
Dracula (25 scenes), Frankenstein (25 scenes), Sherlock Holmes (25 scenes). Full narrative bug hunt completed - 101 bugs found, 75+ fixed across all 75 scenes. 4 review files on file. Commit ffacd7d.
TTS Voice Service πŸ”¨ Building
55%
tts-service.js (408 lines) + index.js (40 lines). TTS service code built. Needs API key and end-to-end test.
Session Management + Message Router βœ… Built
90%
Persistence + message routing working.
Auth + API Server βœ… Built
92%
Fastify server (1,017 lines), token auth, SSE streaming, WebSocket support. Error responses improved for dev/mock mode (commit 1f35464).
Phase 1 + Phase 2 Test Suites βœ… Built
85%
3 test suites (50KB total): phase1.test.js (19KB), phase2.test.js (12KB), dice.test.js (19KB, 207 tests). Commit 73f04b1.
Coin/XP Scoring Engine πŸ”¨ Building
40%
coin-engine module (428 lines). Core scoring logic built. Needs AI DM creativity assessment integration.
Combat Manager βœ… Built
70%
combat-manager.js (438 lines). Initiative, multi-foe encounters, action economy. Integrated with rule engine.
Dynamic Difficulty πŸ”¨ Building
50%
dynamic-difficulty.js (370 lines). Rubber-band scaling logic built. Needs tuning with playtest data.
Inventory System πŸ”¨ Building
50%
inventory.js (598 lines). Item tracking, equipment slots, combat effects. Needs Shoppe marketplace integration.

Infrastructure & Deployment

Delivery ItemStatusCompletionNotes
Hosting - Render.com βœ… Configured
90%
render.yaml + Dockerfile ready. Deploy pending.
Telegram Bot ⏸️ HELD
100%
Bot built (9KB). READY to deploy. HELD - Lawman to greenlight beta roll-out.
GitHub Repository βœ… Ready
95%
PAT configured. Code ready to push.
Image Generation Pipeline πŸ”¨ Building
30%
image-service.js (324), prompt-builder.js (203), index.js (47) - 574 lines total. Scaffold built. Needs provider API key and end-to-end test.
Voice / TTS Infrastructure πŸ”¨ Building
45%
TTS service code built (tts-service.js 408, stt-service.js 218, index.js 43 β€” 669 lines total). Needs provider API key and end-to-end integration test.

Beta Readiness

Delivery ItemStatusCompletionNotes
End-to-End Smoke Test πŸ”¨ In Progress
35%
Partial: signup β†’ NDA β†’ questionnaire β†’ character creation β†’ Dracula Scene 1 all functional. Inventory init fixed (commit 475bc20). Error handling improved (commit 1f35464). Remaining: full adventure playthroughs, session rejoin, spectator mode.
Narrative Bug Hunting βœ… Complete
100%
Full audit of all 3 adventures (75 scenes, 15 acts). 101 bugs found: 29 HIGH, 31 MEDIUM fixed. Exit labels, NPC tracking, item tracking, discovery texts, banned keywords all reviewed. 4 review files (787 lines). Commit ffacd7d.
Beta Signup + Token System βœ… Built
90%
beta-tokens.json + auth/token-store.js all in place. Sessions data active (829KB).
Telegram Beta Deployment ⏸️ HELD
-
Waiting for Lawman's go-ahead. Ask him when ready.

What's NOT Built Yet

Three empty directories remain between "code exists" and "playable beta":

  • src/image/ - Scaffold built (574 lines: image-service, prompt-builder, index). Needs provider API key to activate.
  • src/frontend/ - Empty. Current web app is vanilla HTML, not the spec'd React framework.
  • src/blockchain/ - Empty placeholder. Phase 3 blockchain integration (NFTs, $BINDING token).
  • data/sessions.json - Active (829KB). Session data tracks live game sessions.

Note: src/voice/ is no longer empty — voice services built (669 lines: TTS, STT, index). Needs API key to activate.

Recommended Next Steps (Priority Order)

  1. Smoke test the full flow - Walk through signup β†’ character creation β†’ play through an adventure as one continuous journey. Fix breaks.
  2. Narrative bug hunt - Play through Dracula/Frankenstein/Holmes scenes proactively to flush out logic, continuity, and pacing bugs. βœ… Done - 101 bugs found, 75+ fixed. Commit ffacd7d.
  3. Wire up TTS API key - Voice service code is built. Add provider API key (ElevenLabs or OpenAI TTS) and test end-to-end.
  4. Deploy Telegram beta - Once steps 1–3 are solid, greenlight the Telegram bot deployment.

Phase 2 - Game Modes: Storyline, Campaign & Digital DM (Planned)

Three distinct play modes, all powered by the same engine. The mode is selected at session creation and determines DM prompts, content source, and player experience.

Delivery ItemStatusCompletionNotes
Campaign Session Manager βœ… Code Complete
95%
src/campaign/index.js (480 lines). Mode field (adventure/campaign/digital_dm), lobby state, turnOrder, worldState, party state, campaign log. 274 tests passing.
World Builder (procedural generation) βœ… Code Complete
95%
src/campaign/world-builder.js (308 lines). Locations, NPCs, connections, quest hooks. Theme presets (gothic horror, sword coast, noir, wilderness). Weather/time system.
Campaign DM Prompts βœ… Code Complete
95%
src/campaign/campaign-prompts.js (162 lines). Open-ended DM prompts, structured response parsing for dice rolls, quest updates, NPC attitudes.
Quest Engine βœ… Code Complete
95%
src/campaign/quest-engine.js (168 lines). Quest creation, tracking, completion. Integrates with world builder and DM prompts.
Monster Manual + Encounter Builder βœ… Code Complete
90%
Monster manual (364 lines) + encounter builder (260 lines). 334 SRD5.1 creature stat blocks. CR-balanced encounter generation. Live on Monsters tab.
Turn Manager (multiplayer) βœ… Code Complete
90%
src/campaign/turn-manager.js (260 lines). Initiative + narrative-based turn order. Host/spectator roles. AFK auto-skip. Mode switching.
NPC Engine + Loot Engine βœ… Code Complete
90%
NPC engine (300 lines) + loot engine (350 lines). NPC personality/dialogue/memory/relationships. Treasure tables, magic items, shop inventories.
Campaign Persistence + UI πŸ”¨ Partial
60%
Session persistence (280 lines): auto-save, manual save, campaign journal, CRUD. Lobby manager (391 lines) + whisper system (371 lines) + leveling (526 lines) + dungeon generator (622 lines). UI not started.

Executive Summary

The Binding is an AI-powered platform that transforms any book into a live, playable role-playing experience. Users select a book (Dracula, Treasure Island, Gone with the Wind — anything), create a character, and play through the story with an AI Dungeon Master that narrates, adjudicates rules, generates scene images, and speaks in character.

The platform runs cross-platform (mobile, tablet, desktop) and integrates deeply with the Paxeer blockchain for character ownership, a marketplace economy, and community-driven content creation.

The core insight: Every book ever written is an unplayed adventure. The Binding makes them playable.

What Makes The Binding Different

Why This Matters for Paxeer

The Binding is designed to be a flagship consumer application on the Paxeer network — the kind of product that brings mainstream users onto the chain without them needing to understand blockchain mechanics.

BenefitDetails
New wallet creationEvery player who earns $BINDING needs a Paxeer wallet. Projected: 10,000–50,000 new wallets in Year 1.
On-chain activityCharacter NFTs, $BINDING token, achievement badges, Shoppe marketplace trades, seasonal items — all on Paxeer. Consistent daily on-chain volume.
Gas fee revenueNFT minting, $BINDING conversions, marketplace trades, metadata updates generate gas. Batched transactions keep it efficient.
USDC/PAX liquidityUsers purchase with PAX or swap to USDC for marketplace transactions. Drives DEX volume.
Ecosystem credibilityA polished, mainstream consumer app proves Paxeer can host production applications — not just DeFi.

Market Opportunity

SegmentSizeWhy They Care
Tabletop RPG players50M+ globallyAI DM available 24/7, no scheduling, infinite content, real coin rewards
Book readers / BookTok200M+ active“Play through your favorite book” — earn coins while you do it
Interactive fiction fans30M+ (growing 15% YoY)AI-driven, every choice matters, replayable, competitive leaderboards
Casual mobile gamers2B+ globallyLow barrier, narrative-driven, session-based, earn real value
Crypto/Web3 curious50M+ active walletsEarn $BINDING by playing, not buying. Meme coin with a real use case.

Competitive Landscape

ProductWhat They DoThe Binding’s Advantage
AI DungeonText-based AI adventureNo book content, no visuals, no voice, no rules engine, no blockchain, no coin economy, no replayability system
D&D BeyondDigital D&D toolsRequires a human DM and a group. No AI narrative. No coin rewards. No adaptive difficulty.
Choice of GamesInteractive fictionScripted, not AI-driven. No replayability. No real value earned from play.
Replika / Character.aiAI conversationNot gameified. No rules, no dice, no progression, no coins, no competition.

The Binding sits in white space — no existing product combines AI narration + game rules + visual generation + voice + book content + blockchain ownership + intelligence-rewarded coin economy + adaptive replayability + seasonal competition.

Revenue Model

Revenue StreamDescriptionModel
Adventurer’s LicenseOne-time unlock after 5-hour free trial$1.99
Guild Pass SubscriptionFull library, all voices, exclusive cosmetics$9.99/mo
Shoppe MarketplaceNFT item trading between playersPlatform fee on each trade
Seasonal CosmeticsLimited-edition items, dice sets, portraitsDirect purchase
Adventure Module SalesCreator-authored adventuresPurchase + creator royalties on resale
$BINDING Economy0.01% of all revenue feeds the $BINDING liquidity poolDrives token value for holders

Revenue Projections (Conservative)

MetricYear 1Year 2Year 3
Registered users50,000200,000750,000
Paid users (Adventurer’s License)20,00080,000300,000
Guild Pass subscribers5,00025,000100,000
Monthly recurring revenue$50,000$300,000$1,200,000
Shoppe marketplace + cosmetics$20K/mo$100K/mo$400K/mo
$BINDING pool contribution$1K/mo$5K/mo$20K/mo
Total annual revenue$840,000$4,800,000$19,200,000

Product Architecture

The User Experience

  1. User opens the app — a voice speaks: “You’re about to enter a world of monsters, magic, and choices that matter. But first… tell me your name.”
  2. Character creation through narrative dialogue — no forms. The AI DM asks personality questions and builds the character.
  3. User picks an adventure. The game calibrates difficulty to their level (invisible, narrative-driven).
  4. Every turn: AI narrates → 4 suggested actions + open text/voice field → user chooses → dice rolled → consequences → scene image → subtle coin notification if earned.
  5. Each chapter ends with a coin breakdown: “You earned 340/500 coins this chapter. Creative Problem Solving (+120), Investigation (+90)...”
  6. Adventure ends. Tier awarded: Bronze / Silver / Gold / Platinum. Play style summary shown.
  7. Coins can be converted to $BINDING at tier-weighted rates and sent to player’s Paxeer wallet.
  8. 5-hour free trial. Then $1.99 to continue. Subscription and marketplace layered on top.

Paxeer Integration

AssetContract TypeDetails
$BINDING TokenERC-20Platform meme coin. Only mintable through gameplay. Tier-weighted conversion from in-game coins.
Character NFTsERC-721 (dynamic)Stats, level, equipment, portrait, achievements, tier badges. Updates as character evolves.
Guild Pass NFTERC-721 (dynamic)Subscription token. Tiered: Adventurer → Hero → Legend → Mythic.
Shoppe MarketplaceCustomListings, purchases, royalties, escrow. NFT item trading between players.
Tier Badge NFTsERC-1155 (soulbound)Non-transferable. Earned per adventure per season. Displayed on profile.
Achievement BadgesERC-1155 (soulbound)Non-transferable. Earned through gameplay milestones.
Seasonal LeaderboardOn-chain + off-chain6-month seasons. Top performers earn bonus $BINDING + exclusive badges.
Adventure Module NFTsERC-1155Purchasable content. Creator royalties on resale (5%).
Dice Set NFTsERC-1155Collectible cosmetic dice. Limited seasonal drops.
Shoppe Item NFTsERC-721Found treasures. Cosmetic + gameplay bonus + tradeable. Seasonal scarcity.

Key Technical Decisions

  1. LLM is NOT the rule engine. AI generates narration. A separate deterministic system handles dice math, combat, stats, coin scoring.
  2. Coin scoring is deterministic + AI-judged. Base coins from game math (combat, exploration). Bonus coins from AI assessment of creativity and intelligence.
  3. Gameplay never blocked by blockchain. All on-chain operations are async via event queue.
  4. Context window management. Tiered context (hot/warm/cold/reference) for 50+ hour adventures.
  5. Voice and text parallel streams. Text sub-500ms. Voice sub-2s. Images load in background.
  6. Replayability is architectural. Three-layer model (curated backbone + procedural connective tissue + surface variation) with adaptive sub-plot generation that learns player style.

Why Now

  1. LLM technology is mature enough (GPT-4o, Claude 3.5)
  2. Voice synthesis is production-ready (ElevenLabs, OpenAI TTS)
  3. Image generation is fast and affordable at consumer scale
  4. Paxeer blockchain infrastructure is ready
  5. The market is hungry — AI Dungeon proved the concept but failed on quality
  6. Meme coins with real utility are the next wave — $BINDING earns its value through gameplay, not hype

Monetization Philosophy

The platform is designed around a “generous free, irresistible premium” philosophy. No paywalls. Players sign up free, get a 5-hour full-featured trial, then pay $1.99 to unlock permanently. A $9.99/mo Guild Pass subscription provides the full library, all voices, and exclusive cosmetics.

The coin and $BINDING economy creates a play-to-earn layer that doesn’t feel like crypto — players earn coins for playing well, convert them to $BINDING at tier-weighted rates, and spend them in The Shoppe. The only way to get $BINDING is to play. No ICO. No presale. No VC allocation. Just play.

Seasonal leaderboards, limited-edition Shoppe items, and tier badges create engagement loops that drive retention without predatory mechanics. All monetization layers are designed to feel like value, not gates.

Development Phases Summary

PhaseGoalTimelineTeam Size
Phase 1 — Core EngineOne playable adventure end-to-end with coin scoring4–5 months2–3 engineers
Phase 2 — Full Experience + All Three Game ModesMulti-adventure, voice, monetization, Shoppe, Storyline + Campaign + Digital DM3–4 months3–5 people
Phase 3 — Blockchain & Competition$BINDING token, NFTs, marketplace, leaderboards, seasonal economy3–4 months4–5 people
Phase 4 — ScaleCreator tools, licensed IPs, advanced featuresOngoing (month 11+)5+
TOTAL TO FULL LAUNCH10–13 months2–6 people

Phase 1 — Core Engine (Months 1–4)

DeliverableEffortDetails
AI DM service (LLM orchestration + streaming)4–6 weeksContext management, 4-suggestion generation, scene narration, NPC dialogue, creative score assessment
Rule engine (D&D 5e core)3–4 weeksStandard + Story Mode. Combat, skill checks, saving throws, leveling. Rubber-band difficulty scaling.
Coin/XP scoring engine2–3 weeksIntelligence-weighted scoring, theoretical max per adventure, bell curve distribution, hybrid real-time + chapter-breakdown rewards
Dice service with animations2–3 weeks7 die types, 30+ videos, shake detection, fair random
Character creation & management2 weeksNarrative onboarding, stats, inventory, portrait, player profile tracking (play style)
Adventure engine (scene graph)3–4 weeksScene navigation, quest tracking, journal, save/load, curated backbone structure
Web app (PWA)3–4 weeksReact frontend, responsive, WebSocket real-time sync, coin/tier display
3 adventures: Dracula, Frankenstein, Holmes6–8 weeks75 curated scenes (25 each), NPC pools, encounters, Layer 1 backbone. Full narrative bug hunt - 101 bugs found, 75+ fixed. Commit ffacd7d.
Basic voice (1 DM voice)1 weekSingle TTS voice, text NPCs
PHASE 1 TOTAL18–24 weeks~4–6 months

Phase 1 Deliverable: Working PWA. User signs up, creates a character, plays through Dracula, Frankenstein, or Sherlock Holmes with AI DM, dice rolls, coin scoring, tier award, basic voice, and scene images. All 3 adventures have been narrative-audited end-to-end (101 bugs found and fixed). Player can see their coin breakdown and tier after each chapter.

Phase 2 — Full Experience + All Three Game Modes (Months 5–8)

DeliverableEffortDetails
All 6 DM voices + NPC voice differentiation2–3 weeks8–10 preset voice profiles, persistent NPC assignments
Player voice input (STT)1 weekWeb Speech API + Whisper fallback
Image pipeline (pre-gen + real-time)3–4 weeksAdventure art, real-time scene images, caching
Replayability engine (Layer 2 + 3)3–4 weeksProcedural sub-plot generation, surface variation, adaptive player profiling
Storyline Mode — Quest + Explorer sub-modes3–4 weeksSolo curated adventures. Story rails vs. sandbox with narrative gravity. Player chooses guided or open exploration within each adventure.
The Shoppe (basic)2–3 weeksItem display, treasure drops, in-game coin purchasing, inventory management
Adventure journal + session recap2 weeksAuto-generated journal, cinematic recap, play style summary
5-hour trial + $1.99 payment2 weeksClock mechanics, crypto/fiat payment
3 additional adventures (6 total)3–4 weeksTreasure Island, Odyssey, Time Machine (Sherlock Holmes already built in Phase 1)
Mobile wrappers (Capacitor)2 weeksiOS + Android, App Store prep
Campaign Mode — Multi-player session management2–3 weeksJoin codes, lobby, session rooms, player arrays. Sandbox in the book’s world. Extends Phase 1 abstractions.
Digital DM Mode — General-purpose AI DM3–4 weeksOpen-ended improvisation, on-the-fly encounters, world-building. No curated adventure required — the AI DM creates everything live. Extends adventure-mode AI DM from Phase 1.
Monster stat blocks + initiative2 weeksData layer for monster stats, initiative tracker, multi-foe combat (extends rule engine)
DM whisper system1 weekPrivate messages to individual players (message router already supports targets)
Theater of the mind1–2 weeksVerbal spatial descriptions, no grid. Prompt engineering on existing AI DM.
Session persistence2 weeksSave/resume across sessions. World state already at session level from Phase 1.
PHASE 2 TOTAL12–18 weeks~3–5 months

Phase 3 — Blockchain & Competition (Months 8–11)

DeliverableEffortDetails
$BINDING ERC-20 token3–4 weeksToken contract, minting logic (gameplay-only mint source), tier-weighted conversion service, wallet integration
Seasonal leaderboard system3–4 weeks6-month seasons, leaderboard resets, seasonal coin budgets, top-performer bonus $BINDING distribution
Shoppe marketplace (full)4–5 weeksNFT item listings, purchases, royalties, escrow, seasonal item rotation, lifetime tier discounts
$BINDING liquidity pool1–2 weeksDEX integration on Paxeer, revenue-to-pool drip mechanism, deflationary curve implementation
Guild Pass subscription + NFT minting3–4 weeksDynamic NFT contract, tier progression
Character NFTs on Paxeer2–3 weeksERC-721, dynamic metadata, coin/tier data embedded
Tier badge + Achievement NFTs2 weeksERC-1155 soulbound. Per-adventure per-season tier badges.
Friend list + party multiplayer4–6 weeksReal-time shared sessions, party chat
15+ adventures totalOngoingContent pipeline scaling
PHASE 3 TOTAL16–22 weeks~4–5 months

Infrastructure Costs by Phase

PhaseMonthly CostNotes
Phase 1 (development)$200–500API calls for testing, dev hosting
Phase 2 (beta, ~1K users)$1,000–3,000LLM + image gen + TTS scaling
Phase 3 (launch, ~5K users)$4,000–9,000Full infrastructure + blockchain deployment + $BINDING liquidity seeding
Phase 4 (growth, 50K+ users)$15,000–40,000Auto-scaling, CDN, DEX liquidity
Total infrastructure to launch~$30K–$80KOver 9–12 months

Team Requirements

RolePhase 1Phase 2Phase 3
Full-stack engineer (lead)111
Full-stack engineer0–111
AI/ML engineer0–111
Blockchain engineer0–11
Designercontract11
Content/game designer0–10–11
TOTAL2–33–54–6

Paxeer On-Chain Requirements

ComponentContract TypePhase
$BINDING TokenERC-20 (gameplay-only mint)Phase 3
Character NFTsERC-721 (dynamic metadata)Phase 3
Guild Pass NFTERC-721 (dynamic, tiered)Phase 3
Shoppe MarketplaceCustom (listings, escrow, royalties, seasonal rotation)Phase 3
Tier Badge NFTsERC-1155 (soulbound, per-adventure per-season)Phase 3
Achievement BadgesERC-1155 (soulbound)Phase 3
Shoppe Item NFTsERC-721 (cosmetic + gameplay bonus + tradeable)Phase 3
Adventure Module NFTsERC-1155Phase 3
Dice Set NFTsERC-1155Phase 3
$BINDING Liquidity PoolDEX pair on PaxeerPhase 3
All gameplay + coin scoringOff-chain (events queue to blockchain async)Phase 1+

Summary

Time to full launch9–12 months
Infrastructure cost to launch~$30K–$80K
Team size at launch2–6 people
Year 1 projected revenue$840,000
Year 3 projected revenue$19,200,000
New Paxeer wallets (Year 1)10,000–50,000
$BINDING mint sourceGameplay only (no ICO, no presale, no airdrop)
Season length6 months with leaderboard reset
Adventures at launch15+

Game Design Decisions

Confirmed design decisions for The Binding's core gameplay systems. These represent the product vision as agreed between the founding team.

1. Coin & XP System

Every adventure has a theoretical maximum coin pool — a fixed number based on story length and difficulty. Coins are awarded based on how intelligently you play, not just whether you win.

Design ElementDecision
Scoring methodHybrid — real-time subtle notifications during play + full breakdown at end of each chapter
What earns coinsIntelligence-weighted: creativity, problem-solving, investigation, roleplay, combat efficiency
DistributionStandard bell curve — only 0.01% of players ever max out a single adventure
Theoretical maxFixed per adventure, based on story length + difficulty level
Post-chapter summary“You earned 340/500 coins. Creative Problem Solving (+120), Investigation (+90), Combat (+80), Roleplay (+50)”
The scoring rubric must be generous rather than stingy — better to reward too often than too rarely at launch. Players should understand what gets rewarded and learn to play better over time.

2. Tier System

TierRequirementExpected Rarity
BronzeComplete the adventure~95% of players
SilverEarn 60%+ of max coins~60% of players
GoldEarn 85%+ of max coins~15% of players
PlatinumEarn 95%+ of max coins AND finish in top 10% of completion time~1% of players

Key design note: Speed requirement applies ONLY to Platinum tier. Platinum means you played near-perfectly AND efficiently. That’s mastery — the screenshot people share, the badge that makes someone say “how did you do that?”

3. Universal Cross-Book Currency

Coins earned in any adventure are fungible — 1 Dracula coin = 1 Frankenstein coin = 1 Sherlock Holmes coin. Your lifetime balance carries across all adventures, The Shoppe, the meme coin exchange, and your player profile.

Tier-Weighted Conversion to $BINDING

Tier EarnedConversion RateExample: 1,000 coins becomes
Bronze1x1.00 $BINDING
Silver1.5x1.50 $BINDING
Gold2.5x2.50 $BINDING
Platinum5x5.00 $BINDING

Lifetime Tier Discounts at The Shoppe

Lifetime Average TierShoppe Discount
Bronze averageFull price
Silver average10% off
Gold average25% off
Platinum average40% off + access to exclusive items
The tier-weighted conversion kills the exploit where someone creates 50 accounts and farms the easiest adventure on the lowest difficulty. Bronze conversion at 1x means that strategy generates almost nothing. The system rewards quality over quantity.

4. $BINDING Meme Coin & Seasonal Economy

$BINDING is the platform’s meme coin. The only way to earn $BINDING is to play well in The Binding. No ICO. No presale. No airdrop farming. No VC allocation.

Season Structure (6-Month Seasons)

ComponentWhat Happens
New Adventures2–3 new books drop per season. New stories = new coin pools = fresh leaderboard
Season LeaderboardResets every 6 months. Top performers get bonus $BINDING + exclusive NFT badges
Coin Pool BudgetEach season has a defined minting budget. Controls inflation.
The ShoppeSeasonal items rotate in and out. Creates scarcity and urgency.
Legacy BonusPlayers from earlier seasons get a permanent +% on all future conversions. Loyalty rewarded.

Era Structure

EraSeasonsThemeEconomy
Era 1: FoundersS1–S5Build core community, 5 adventures, prove the modelSmall coin pool, high value per coin. Best Legacy Bonus for early players
Era 2: GrowthS6–S15Scale to thousands of players, 20+ adventures, marketplace opensGrowing pool, $BINDING becomes tradeable, Shoppe revenue kicks in
Era 3: MaturityS16–S30Peak player count, competitive seasons, multiplayer adventuresStable pool, inflation managed by seasonal caps
Era 4: LegacyS31–S40The game is a classic, community-driven content, potential DAO governancePool stabilizes, long-term holders rewarded

Deflationary Revenue Curve

EraRevenue to $BINDING PoolWhy
Era 10.05%Higher % to bootstrap value. Early coins need to feel worth earning.
Era 20.03%More players = more total revenue, so % can drop while absolute $ grows.
Era 30.01%Stable, predictable, sustainable.
Era 40.005%Pool is self-sustaining, revenue goes to operations + community.

Control Mechanisms: The season structure gives three powerful levers to prevent the coin economy from spiraling: (1) Seasonal coin budgets cap $BINDING minting per season. (2) Leaderboard resets every 6 months prevent permanent accumulation spirals. (3) Era transitions every ~2.5 years are built-in checkpoints to adjust conversion rates, revenue %, and minting caps.

5. Replayability Engine

The same adventure should feel different every time you play it. The story beats stay fixed, but everything between the beats gets reshuffled.

Three-Layer Model

LayerWhat ChangesQuality Control
Layer 1: Curated Backbone20–30 hand-crafted scenes per adventure. Dependency graph. Tested.Guaranteed quality — the skeleton never breaks.
Layer 2: Procedural Connective TissueAI-generated transitions, side encounters, sub-plots, NPC moments.Starts with curated templates, learns player style, shifts toward free generation over time.
Layer 3: Surface VariationNPC personality, dialogue flavor, item descriptions, environmental details.Easy for LLMs to do well. Always different, never changes structure.

Adaptive Sub-Plot Generation

The AI DM builds a Player Profile as you play — tracking combat affinity, diplomacy, investigation, creativity, risk tolerance, and compassion. It uses this profile to:

The adaptation is invisible. Players should think “this adventure is really varied,” not “the game is testing me.”

Play Style Transparency

At the end of each adventure, players see a summary: “Your play style: Investigator. The game noticed you prefer exploring before fighting.” An optional deep profile view shows full style breakdown for hardcore players.

6. The Shoppe

Players find treasures during adventures — items, artifacts, relics. These items have three properties:

PropertyDetails
CosmeticDisplays on your player profile. Shows off your collection.
Gameplay BonusSmall cross-adventure utility. Found Dracula’s Signet Ring? Small bonus in vampire-themed adventures. Meaningful but not game-breaking.
Tradeable NFTReal on-chain asset. Sell to other players in The Shoppe marketplace. The Binding takes a small fee on each trade.

Anti-pay-to-win guardrail: No item should be powerful enough that buying it replaces playing well. The Shoppe rewards collection and curation, not spending power.

Seasonal scarcity: Items rotate in and out each season. If you were there, you got it. If not, there’s next season.

7. Dynamic Difficulty — Rubber-Band Scaling

The difficulty rubber-bands around the player’s level with deliberate power windows — periods where you’re overpowered followed by a challenge spike.

Fight TypeFrequencyPurpose
Standard challenge70% of fightsScales closely to your level. Constant engagement.
Power window20% of fightsBelow your level. You feel like a badass. Satisfying.
Challenge spike10% of fightsAbove your level. You need to think creatively. Humbling.

The AI DM controls the pacing — it knows when to let you feel powerful and when to humble you. This is narrative difficulty design, not just math.

8. Pre-Adventure Difficulty

Your character level determines the adventure’s baseline difficulty before you start. A Level 1 player gets an easier Dracula than a Level 10 player — same story, same beats, but enemies scaled, puzzles harder, DCs higher.

The difficulty is invisible. No numbers, no sliders. The AI DM narratively explains why this version is harder: “Word has reached you that this particular incarnation of the Count has grown more cunning. His servants are more numerous, his traps more elaborate.”

Difficulty is story, not a number. A player who thinks “this Dracula is really hard this time” is more engaged than one who thinks “the game scaled enemies to my level.”

9. Game Modes (Phase II)

The Binding will expand from book-based single-player adventures into a full AI Dungeon Master replacement for standard D&D 5e play. The same engine powers all three modes.

Three Modes, One App

ModeDescriptionPlayersContent
πŸ“– Storyline ModeFollow the book (Dracula, Frankenstein, Holmes). Curated scenes with exit pressure ramps keep you in the canonical narrative.1 (single player)Pre-written scene graph + adaptive replayability
βš”οΈ Campaign ModeSandbox in the book’s world. Explore freely, pursue side quests, build NPC relationships. The AI DM improvises within the book’s setting.1–6Book world state (characters, locations, lore) + AI-generated content
🎲 Digital DM ModeFull Dungeon Master. Completely open-ended. The AI creates the world, NPCs, quests, and combat encounters from scratch.1–6AI-generated from theme preset (gothic horror, sword coast, noir, wilderness, custom)

All Three Game Modes - Shared Features

The multi-player D&D mode is essentially The Binding without the book constraint. Same engine, same AI DM, same rules — just open-ended instead of curated. This doubles the addressable market: “play through books” becomes “your personal D&D DM that’s always available.”

10. Phase 1 Architecture — Future-Proof Abstractions

Five architectural patterns are baked into Phase 1 so that Phase 2 (all three game modes) is purely additive — no rewrites. Two weeks of architectural discipline in Phase 1 saves 3–4 months of rewriting in Phase 2.

PatternPhase 1 (Now)Phase 2 (All Three Modes)Savings
Session as containerSession holds a player array (length 1)Add players to the array (length 2–6)3–4 weeks saved
Player-tagged actionsEvery action includes playerIdAI DM processes actions from multiple player IDs4–6 weeks saved
Shared + private stateWorld state + private state exist (all visible to 1 player)Router filters private state per player2–3 weeks saved
Message routerDmMessage has targets array (length 1)Router broadcasts shared, whispers private2–3 weeks saved
Player-agnostic rulesRule engine accepts arrays of actorsWorks for 1 player or 6, zero changes0 (already done)

Net result: Phase 1 takes ~2 extra weeks to build with these abstractions. Phase 2 saves 11–16 weeks of rewriting. The ROI is 5:1 — the best investment in the entire project.

11. Scene System Design

Decided with Lawman: 2026-07-11

Core Principle: The DM never advances a scene unless the player chooses to move on OR the story forces it. Scenes have real weight — the player should feel like they’re in a place, not scrolling past it.

Scene Manifest

Every scene has a manifest — a checklist of discoverable content:

Scene: Golden Krone Inn Content: - talk_to_innkeeper → "Learn about Castle Dracula and its mysterious owner" - examine_crucifix → "Discover why the locals are so afraid" - find_old_woman → "The woman in the corner knows something about the castle" - check_stables → "The coach is ready. The horses are restless." - read_journal → "Jonathan Harker’s journal, left behind on a bench" Exit: - board_coach → "Leave for Castle Dracula" Hard_exit: - trigger: 4 turns after 75% completion → story forces transition

Completion Tracking

Exit Pressure Ramps (Narrative, Not Mechanical)

CompletionPressure LevelWhat the Player Experiences
0–25%BackgroundExit is one of 4 actions, not highlighted. Rich scene descriptions.
25–50%Gentle nudgeDM weaves in environmental cues. “The coachman coughs outside.”
50–75%Strong pushWorld closes in. “The candles burn lower. The coachman calls — he won’t wait.”
75–100%Story-drivenHard exit after 4 turns. “The innkeeper locks the door. Time to go.”

Suggested Actions (4 Total Each Turn)

Hard Exit Mechanism

What the Player NEVER Sees

This replaces the old approach where the DM just cycled through canned responses and forced scene transitions.

12. Multiplayer Roadmap

Decided: 2026-07-11. Phase 2 next, Phase 3 after testing Phase 2 with users.

Phase 1 (Current): Shared Controller

Phase 2 (Next): Host + Spectators

~2 hours of work. Natural fit for the product.

ComponentDetails
Session modelAlready supports players array (built from Day 1)
Player rolesNeed: role field on player (host vs spectator)
Spectator UINeed: spectator suggestion panel (visible only to spectators)
Host UIHost sees suggestions as a “community hints” overlay
MessagingSpectators get their own SSE stream with spectator-only messages
Why this first: Books have one protagonist. This respects the source material and makes the experience feel intentional rather than chaotic.

Phase 3 (Later): Full Co-op

Needs more design work. Rule engine already supports this.

ComponentDetails
Character creationNeed: flow for each player joining
Turn managementNeed: whose turn is it?
Information sharingNeed: shared vs private info (whisper system already in MessageRouter)
Multi-participant combatNeed: combat encounters with multiple participants
Co-op adventuresNeed: content written for 2–6 players
Why later: More complex, more engaging, but needs significant design work on how turns work in a narrative context.

13. Logo & Key Art Brief

What We Need

A single high-quality illustration to serve as the logo/key art for "The Binding" β€” an AI-powered RPG platform where players play through classic books.

The Scene

Setting

An old wooden desk. Dark, warm, candlelit atmosphere β€” like a scholar's study at night. Everything has an aged, literary, slightly worn feel. Think antique wood grain, warm shadows, rich amber tones.

Center of the Desk

A thick, ornate leather-bound book lying flat on its back (cover facing up, spine away from viewer). The book's binding is prominently visible β€” the spine, the stitching, the leather texture of the binding running along the edge should be a focal point. This is a heavy, old, well-made book β€” the kind that pulls you in.

On the book's cover, in elegant but clearly legible script/calligraphy: "The Binding"

Right Side of the Desk

A tall, lit candle. This is the primary light source. Warm golden light spilling across the book and the desk surface, casting soft shadows. The candle should feel old β€” maybe a brass or iron candleholder, partially melted wax.

Left Side of the Book

A paper human figure in a Japanese origami/kirigami paper-fold style. This figure represents the player β€” a person made of folded paper, standing beside the desk, facing the book's binding. They're looking at it, about to open it. The character should feel like a paper craft creation with visible folds, creases, and geometric cuts β€” NOT a flat silhouette, but a three-dimensional paper-fold figure. Think Japanese kirigami meets paper doll.

Above the Book (Floating Upward)

Four paper-craft objects rising from the pages of the open book, like the imagination inside the book is coming to life. All four should be in the same origami/paper-fold style as the human figure. They should be staggered at different heights, drifting upward:

1. A paper castle β€” medieval towers, battlements, all made of folded paper

2. A paper pirate ship β€” sails, hull, rigging, all in paper folds

3. A paper dragon β€” wings outstretched, tail curled, made of geometric paper folds

4. A paper spaceship β€” a sleek hybrid design combining swept-back fighter wings with elongated engine nacelles and a central fuselage. Should evoke "fast starfighter meets deep-space explorer" β€” distinctly original, not any recognizable franchise ship. All in paper-fold style.

Style Guide

Text

Technical Requirements

Reference Mood

What NOT To Do

Budget Context

This is for a startup game platform. Looking for quality concept art / illustration work. Happy to pay fair rates for good work. Expected range: $100-300 depending on artist experience and revision rounds.

14. Adventure Catalog

Available Adventures with Character Level Estimates

Last Updated: July 17, 2026

Status: Catalog β€” Content Pending Integration

How to Use

Each adventure has a Level Range that indicates what character levels it's designed for.

Players will see this in the adventure selection dropdown so they can pick content appropriate for their character.

Adventure List

Official / WotC Adventures

#AdventureSourceLevel RangeStatusURL
1**Lost Mine of Phandelver**WotC Starter SetLevels 1–5πŸ“‹ Manifest Ready[Starter Set]
2**Death House**Curse of Strahd IntroLevels 1–3βšͺ Pendinghttps://media.wizards.com/2016/downloads/DND/Curse%20of%20Strahd%20Introductory%20Adventure.pdf
3**Frozen Sick**Explorer's Guide to WildemountLevel 1βšͺ Pending[WotC]
4**Prisoner 13**Keys from the Golden VaultLevel 4βšͺ Pending[WotC]
5**Dues for the Dead**DDEX14 (Adventurers League)Levels 1–4βšͺ Pendinghttps://media.wizards.com/2014/downloads/dnd/DDEX14_DuesfortheDead.pdf

Third-Party / Homebrew Adventures

#AdventureSourceLevel RangeStatusURL
6**A Most Potent Brew**Winghorn PressLevel 1βšͺ Pendinghttps://winghornpress.com/adventures/a-most-potent-brew/
7**A Wild Sheep Chase**Winghorn PressLevels 4–5βšͺ Pendinghttps://winghornpress.com/adventures/a-wild-sheep-chase
8**Moon Over Graymoor**DMs GuildLevels 1–3βšͺ Pendinghttps://www.dmsguild.com/en/product/235521/moon-over-graymoor
9**Secrets of the Sunken Temple**KassoonLevels 1–4βšͺ Pendinghttps://www.kassoon.com/dnd/5e/free-modules/
10**Army of the Damned**Google DriveLevels 1–3βšͺ Pendinghttps://drive.google.com/drive/folders/1MyAVOpmtQsTEZbhckQKcOIjuOMUg2SzV
11**Challenge of the Frog Idol**Dyson LogosLevels 1–2βšͺ Pendinghttps://rpgcharacters.files.wordpress.com/2011/06/dyson-logos-challenge-of-the-frog-idol.pdf
12**Clam Island**HomebreweryLevels 1–4βšͺ Pendinghttps://homebrewery.naturalcrit.com/share/By3s5Uqqf

Status Legend

Integration Priority

PriorityAdventureReason
1Lost Mine of PhandelverFull manifest ready, iconic intro adventure, levels 1–5
2Death HouseFree WotC PDF, gothic horror (matches game theme), levels 1–3
3A Most Potent BrewFree, simple one-shot, great for onboarding, level 1
4Frozen SickFree, mystery-focused, level 1
5Dues for the DeadFree WotC PDF, dungeon crawl, levels 1–4

Notes

15. Lost Mine of Phandelver β€” Scene Manifest

Scene Graph Reference for The Binding Engine

1. OVERVIEW

2. CHAPTER / ACT STRUCTURE

ACT I: Goblin Arrows (Level 1)

Type: Linear dungeon crawl / tutorial

Goal: Rescue Sildar Hallwinter and Gundren Rockseyer from goblin captivity

Scene IDLocationSummaryEncounters
`1.0`**Triboar Trail (Ambush)**Party finds two dead horses on the road β€” a goblin ambush.4 Goblins (CR 1/4 each)
`1.1`**Cragmaw Hideout β€” Cave Mouth**Goblin lair entrance in a cliff face along the Triboar Trail. Stream flows out.2 Goblin sentries
`1.2`**Cragmaw Hideout β€” Kennel**Wolves kept chained as guard animals. Can be befriended (DC 15 Animal Handling).3 Wolves
`1.3`**Cragmaw Hideout β€” Goblin Blind**Elevated ledge with goblins who attack from above, flooding the passage below.4 Goblins, 1 Goblin Boss
`1.4`**Twin Pools Cave**Water-filled chamber. Hidden passage leads deeper.Environmental (drowning risk)
`1.5`**Cragmaw Hideout β€” Klarg's Lair**Bugbear boss chamber. Contains Sildar's gear and a map to Cragmaw Castle.Klarg (Bugbear, CR 1), 1 Wolf, 2 Goblins, 1 Goblin Boss
`1.6`**Cragmaw Hideout β€” Prisoner Area**Sildar Hallwinter is held here (if not rescued earlier). Gundren has been taken to Cragmaw Castle.1-2 Goblins

Key Items Found: Gundren's map to Wave Echo Cave, Sildar's equipment, Klarg's stash

Quest Trigger: Sildar asks party to find Gundren at Cragmaw Castle; mentions he was heading to Phandalin

Level Up: Characters reach Level 2 after this act

ACT II: Phandalin (Level 2) β€” The Sandbox Hub

Type: Town hub / social / quest-gathering

Goal: Explore Phandalin, learn about the region's problems, gather quests

Scene IDLocationSummaryNPCs
`2.0`**Phandalin β€” Town Square**Small frontier town. ~50 buildings, pop ~100. Mining settlement rebuilding after dragon cult raids.Various townsfolk
`2.1`**Barthen's Provisions**General store. Deliver Gundren's supplies for 50gp reward.Elmar Barthen
`2.2`**Lionshield Coster**Trading post with a stolen goods subplot.Linene Liadon
`2.3`**Stonehill Inn**Town tavern and social hub. Rumors, gossip, quest hooks.Toblen Stonehill, Trilena, Pip
`2.4`**Townmaster's Hall**Town leadership. Harbin Wester is cowardly and corrupt-leaning.Harbin Wester (Townmaster)
`2.5`**Shrine of Luck**Temple of Tymora. Healing services available.Sister Garaele
`2.6`**Alderleaf Farm**Halfling farm on town edge. Key ally location.Qelline Alderleaf, Carp Alderleaf
`2.7`**The Sleeping Giant**Rough tavern, Redbrand hangout. Potential combat trigger.Redbrand Ruffians (3-4)
`2.8`**Tresendar Manor (Ruins)**Ruined manor on hill above town. Secret entrance to Redbrand Hideout.β€”
`2.9`**Redbrand Hideout β€” Cellar Entrance**Secret entrance through manor ruins or via Tressendar crypts.β€”

Quests GATHERED in Phandalin (all feed into Act III and beyond):

QuestGiverTargetReward
Find Gundren RockseyerSildar HallwinterCragmaw Castle500gp
Clear the RedbrandsSildar Hallwinter / multipleRedbrand HideoutTown safety
Sister Garaele's QuestSister GaraeleAgatha's Lair (ask a banshee a question)Potion of Healing + future favor
The Banshee's QuestionSister GaraeleFind Bowgentle's spellbook locationβ€”
Qelline's RequestQelline AlderleafRecon Redbrand Hideout via her son Carp's knowledgeSafe passage
Townmaster's QuestHarbin WesterOrclands β€” clear orcs from Wyvern Tor100gp
Halia's RequestHalia ThorntonCapture Glasstaff alive100gp + Zhentarim favor
Reidoth's LocationVariousFind the druid Reidoth in ThundertreeInformation on Cragmaw Castle

ACT II-B: Redbrand Hideout (Level 2–3)

Type: Dungeon crawl

Goal: Defeat the Redbrand ruffians and their leader Glasstaff (Iarno Albrek)

Scene IDLocationSummaryEncounters
`2.10`**Redbrand Hideout β€” Cellar**Dark cellar beneath Tresendar Manor. Storage and guard post.3 Redbrand Ruffians
`2.11`**Redbrand Hideout β€” Common Room**Main gathering area for Redbrands.3 Redbrand Ruffians, 1 Bugbear (Droop β€” enslaved, potential ally)
`2.12`**Redbrand Hideout β€” Crevasse**Natural chasm with bridge. Trap: pit with spikes below.Environmental trap (DC 10 Dex save, 2d6 piercing)
`2.13`**Redbrand Hideout β€” Slave Pens**Prisoner cells. Mirna Dendrar and her children are held here.1 Redbrand Ruffian
`2.14`**Redbrand Hideout β€” Barracks**Redbrand sleeping quarters.3 Redbrand Ruffians (possibly sleeping)
`2.15`**Redbrand Hideout β€” Nothic's Lair**Crevasse area inhabited by a Nothic β€” a corrupted aberration. Can be bargained with.Nothic (CR 2)
`2.16`**Redbrand Hideout β€” Glasstaff's Quarters**Iarno Albrek's study. Contains evidence of Black Spider correspondence, staff of defense, and a map.Glasstaff / Iarno Albrek (Evil Mage, CR 2) + Familiar
`2.17`**Redbrand Hideout β€” Secret Tunnel Exit**Escape route to the woods outside town. Glasstaff may flee here.β€”

Key Items: Staff of Defense, Black Spider's letters (reveals Nezznar's involvement), Tresendar Manor map

Critical Intel: Letters reveal the Black Spider is looking for Wave Echo Cave and has agents in the region

Level Up: Characters reach Level 3 after clearing the hideout

ACT III: The Wilderness Sandbox (Level 3–4)

Type: Open-world exploration β€” multiple locations, player-driven order

Goal: Find Cragmaw Castle (to rescue Gundren) and/or find Wave Echo Cave

The party has multiple leads pointing to different wilderness locations. They can tackle these in any order.

#### Location A: Triboar Trail Encounters

Random and scripted wilderness encounters while traveling. Bandits, orcs, owlbears, etc.

#### Location B: Old Owl Road / Conyberry β€” Agatha's Lair

Scene IDLocationSummaryEncounters
`3.0`**Conyberry Ruins**Abandoned village. Path to Agatha's Lair.β€”
`3.1`**Agatha's Lair**Ghost of a banshee. Sister Garaele wants the party to ask her a question about Bowgentle's spellbook. Must offer a gift (comb).Agatha (Banshee, CR 4 β€” social encounter, not combat unless provoked)

#### Location C: Thundertree (Dragon Cult / Druid)

Scene IDLocationSummaryEncounters
`3.2`**Thundertree β€” Ruined Village**Ash-ravaged village destroyed by Mt. Hotenow eruption. Now infested with blights and a dragon.Twig Blights, Ash Zombies
`3.3`**Thundertree β€” Dragon's Tower**Ruined tower occupied by a young green dragon.**Venomfang** (Young Green Dragon, CR 8 β€” potentially lethal, can be negotiated with or fled from)
`3.4`**Thundertree β€” Druid's Cottage**Reidoth the druid lives here, hiding from the dragon. Knows Cragmaw Castle's location.Reidoth (Druid NPC)
`3.5`**Thundertree β€” Cult of the Dragon Hideout**Dragon cultists who worship Venomfang.4 Cultists, Dragonclaw (CR 1)
`3.6`**Thundertree β€” Ruined Manor**Contains ash zombies and a trapped chest.3 Ash Zombies

Quest Resolution: Reidoth tells the party exactly where Cragmaw Castle is.

#### Location D: Wyvern Tor (Orc Quest)

Scene IDLocationSummaryEncounters
`3.7`**Wyvern Tor β€” Orc Camp**Mountain outpost occupied by orcs raiding the region. Harbin Wester's quest target.1 Ogre, 6 Orcs (CR 1/2 each)

#### Location E: Cragmaw Castle (CRITICAL PATH)

Scene IDLocationSummaryEncounters
`3.8`**Cragmaw Castle β€” Approach**Ruined castle in Neverwinter Wood. Goblin lair. Multiple entry points.Goblin sentries
`3.9`**Cragmaw Castle β€” Main Entry / Great Hall**Collapsed main hall. Goblin guards.1 Goblin, 1 Hobgoblin
`3.10`**Cragmaw Castle β€” Barracks**Hobgoblin and goblin quarters.1 Hobgoblin, 3 Goblins
`3.11`**Cragmaw Castle β€” Dining Hall**Bugbear feast hall.1 Bugbear, 1 Wolf, 2 Goblins
`3.12`**Cragmaw Castle β€” Priest's Chamber**Evil priest of Lloth.**Yegg** (Goblin priest) or Doppleganger in disguise
`3.13`**Cragmaw Castle β€” King Grol's Chamber**The bugbear king's throne room. Gundren is here, badly beaten. The doppelganger Vyerith may be present.**King Grol** (Bugbear Chief, CR 3), **Vyerith** (Doppelganger, CR 3), 1 Wolf
`3.14`**Cragmaw Castle β€” Treasure Room**Hidden stash of the Cragmaw tribe.Loot: gold, gems, + Gundren's map to Wave Echo Cave

Critical Resolution: Rescue Gundren Rockseyer alive. Recover the map to Wave Echo Cave.

Level Up: Characters reach Level 4 after Cragmaw Castle

ACT IV: Wave Echo Cave (Level 4–5)

Type: Mega-dungeon crawl β€” the climax

Goal: Find the Forge of Spells, defeat the Black Spider, and claim (or destroy) the Forge

Scene IDLocationSummaryEncounters
`4.0`**Wave Echo Cave β€” Entrance**Hidden cave entrance in the Sword Mountains. Sound of crashing waves echoes within (ancient magic).Environmental: darkness, echoing sounds
`4.1`**Wave Echo Cave β€” Mine Tunnels**Old dwarven mine shafts. Partially flooded.6 Giant Bats
`4.2`**Wave Echo Cave β€” Fungi Cavern**Cave filled with strange glowing fungi.10 Stirges, poisonous gas (DC 12 Con save)
`4.3`**Wave Echo Cave β€” Old Entrance**Secondary cave entrance. Overgrown.1 Ochre Jelly
`4.4`**Wave Echo Cave β€” South Passages**Winding tunnels with undead.8 Zombie (dwarven miners, risen)
`4.5`**Wave Echo Cave β€” Great Cavern**Massive underground lake. The "wave echo" β€” magical resonance fills the air.2 Ochre Jellies, environmental hazard
`4.6`**Wave Echo Cave β€” North Passages**Tunnels leading toward the Forge.12 Skeletons (dwarven warriors)
`4.7`**Wave Echo Cave β€” Black Spider's Camp**Nezznar's forward operating base. His drow followers and bugbear guards.2 Giant Spiders, 4 Bugbears
`4.8`**Wave Echo Cave β€” The Forge of Spells**The legendary magical forge. Still radiates powerful enchantment magic. Weapons/armor touched by its light gain +1.**Spectator** (CR 3 β€” a beholder-kin bound to guard the Forge, can be negotiated with)
`4.9`**Wave Echo Cave β€” The Black Spider's Lair**Final boss chamber. Nezznar has been trying to breach the Forge's guardian.**Nezznar the Black Spider** (Drow Wizard, CR 2 β€” but with tactical play, lair advantage, and Giant Spider allies he's more dangerous), 2 Giant Spiders, potentially 4 Giant Spiders as reinforcements

Key Items: Forge of Spells (can enchant weapons/armor permanently), Wave Echo Cave treasure hoard (7,000+ gp in gems and art objects)

Resolution: Defeat the Black Spider. The Forge of Spells can be claimed, sealed, or destroyed β€” major narrative branch.

3. LEVEL PROGRESSION

LevelReached AfterMilestone
**1**Adventure startCharacters begin at Level 1
**2**Act I completeClearing Cragmaw Hideout
**3**Act II-B completeClearing Redbrand Hideout
**4**Act III completeRescuing Gundren at Cragmaw Castle
**5**Act IV completeClearing Wave Echo Cave / defeating Black Spider

4. KEY NPCs β€” COMPLETE ROSTER

Allies & Quest Givers

NPCRoleLocationQuestNotes
**Gundren Rockseyer**Dwarf merchant, employerCaptured β†’ Cragmaw Castle β†’ rescuedMain quest hookHas the map to Wave Echo Cave
**Sildar Hallwinter**Human warrior, Lord's Alliance agentCragmaw Hideout β†’ PhandalinFind Gundren, clear RedbrandsGruff but honorable; rewards party
**Qelline Alderleaf**Halfling farmerAlderleaf Farm, PhandalinRecon Redbrand HideoutKnows secret entrance; her son Carp saw it
**Sister Garaele**Elf cleric of TymoraShrine of Luck, PhandalinFind Agatha, ask about spellbookProvides healing services
**Reidoth**Human druidThundertreeNone (information source)Knows Cragmaw Castle location; can also help with Wave Echo Cave
**Halia Thornton**Human, Zhentarim agentPhandalin Townmaster's HallCapture Glasstaff aliveZhentarim faction; morally grey quest giver
**Elmar Barthen**Human shopkeeperBarthen's ProvisionsDeliver suppliesSimple merchant; pays 50gp
**Nundro Rockseyer**Dwarf, Gundren's brotherWave Echo Cave (prisoner)β€”Found alive in the cave; can share lore about the Forge
**Droop**Goblin slaveRedbrand Hideoutβ€”Enslaved by Redbrands; can become party's guide/ally

Antagonists

NPCRoleLocationCRNotes
**Nezznar the Black Spider**Drow wizard, main villainWave Echo Cave2 (but tactically dangerous)Seeks Forge of Spells; commands drow, spiders, bugbears
**Glasstaff / Iarno Albrek**Human mage, Redbrand leaderRedbrand Hideout2Sildar's missing companion; defected to Black Spider; has Staff of Defense
**King Grol**Bugbear chiefCragmaw Castle3Holds Gundren hostage; commands the Cragmaw tribe
**Klarg**BugbearCragmaw Hideout1Sub-boss; runs the goblin raiding party
**Venomfang**Young green dragonThundertree8Optional but memorable; territorial, not directly tied to Black Spider
**Agatha**BansheeConyberry4Social encounter; ancient elf spirit; knows secrets
**Vyerith**DoppelgangerCragmaw Castle3Shapechanger working for the Black Spider; can impersonate NPCs
**Halia Thornton**Zhentarim agentPhandalinβ€”Potential antagonist depending on player choices

Faction Representatives

FactionRepresentativeGoal
**Lords' Alliance**Sildar HallwinterRestore order to Phandalin region
**Zhentarim**Halia ThorntonGain influence in Phandalin; control the Forge
**Harpers**Sister Garaele (loosely)Gather intelligence; find lost magical knowledge
**Cult of the Dragon**Dragon cultists at ThundertreeRecruit Venomfang; tangential to main plot

5. MAIN QUEST LINE & SIDE QUESTS

Main Quest Line (Critical Path)

`

START β†’ Ambush on Triboar Trail

β†’ Cragmaw Hideout (rescue Sildar, learn Gundren taken to Cragmaw Castle)

β†’ Travel to Phandalin (gather information and quests)

β†’ Redbrand Hideout (defeat Glasstaff, learn about Black Spider)

β†’ Find Cragmaw Castle (via Reidoth in Thundertree, or other leads)

β†’ Cragmaw Castle (rescue Gundren, recover map)

β†’ Wave Echo Cave (defeat Black Spider, claim Forge of Spells)

β†’ END

`

Side Quests

QuestGiverLocationRewardXP
**Sister Garaele's Errand**Sister GaraeleAgatha's LairPotion of Healing + future favor300 XP
**Orc Trouble**Harbin WesterWyvern Tor100 gp350 XP
**The Dragon of Thundertree**Self-discovery / ReidothThundertreeLoot from dragon hoard (if killed); Reidoth's info3,900 XP (if dragon killed)
**Halia's Offer**Halia ThorntonPhandalin β†’ Redbrand Hideout100 gp + Zhentarim favor300 XP
**Droop the Goblin**Self-discoveryRedbrand HideoutGuide/allyβ€”
**The Dendrar Family**Self-discoveryRedbrand HideoutTown gratitudeβ€”
**Lionshield Coster Stolen Goods**Linene LiadonPhandalinReward + trade discountβ€”

Faction Quests (Long-term hooks for post-module play)

6. SCENE GRAPH CONNECTIONS (for engine implementation)

Entry Points (how players reach each scene)

`

1.0 (Ambush) β†’ 1.1 (Cave Mouth) [follow goblin tracks]

1.1 β†’ 1.2, 1.3, 1.4 [branching paths in cave]

1.2/1.3/1.4 β†’ 1.5 (Klarg) [converge on boss]

1.5/1.3 β†’ 1.6 (Prisoner) [find Sildar]

1.6 β†’ 2.0 (Phandalin) [travel to town]

2.0 β†’ 2.1-2.9 [explore town freely]

2.7 (Sleeping Giant fight) β†’ 2.8/2.9 [Redbrand hideout hook]

2.9 β†’ 2.10-2.17 [dungeon crawl]

2.0 β†’ 3.0-3.7 [wilderness locations, any order]

3.4 (Reidoth) β†’ 3.8 (Cragmaw Castle) [critical path]

3.8-3.14 β†’ 4.0 [Wave Echo Cave]

4.0 β†’ 4.1-4.9 [linear dungeon with branches]

4.9 (Black Spider) β†’ FINALE

`

Branching Decision Points

1. Cragmaw Hideout: Kill Klarg or negotiate? β†’ affects later reputation

2. Redbrand Hideout: Kill or capture Glasstaff? β†’ affects Zhentarim quest

3. Thundertree: Fight or negotiate with Venomfang? β†’ massive risk/reward

4. Agatha: What question to ask? β†’ affects information gathered

5. Forge of Spells: Claim, seal, or destroy? β†’ major narrative branch

6. Nezznar: Kill or capture? β†’ affects faction outcomes

7. ENCOUNTER DIFFICULTY REFERENCE

EncounterParty LevelDifficultyNotes
Goblin Ambush (1.0)1EasyTutorial fight
Klarg (1.5)1Hard/DeadlyFirst boss; can TPK if unprepared
Redbrand Ruffians (2.7)2MediumSocial trigger possible
Nothic (2.15)2MediumSocial encounter option
Glasstaff (2.16)2-3Medium-HardMay flee
Venomfang (3.3)3-4**Deadly**Green dragon breath weapon is devastating
Wyvern Tor Orcs (3.7)3MediumStraightforward combat
King Grol (3.13)4HardMultiple enemies
Forge Spectator (4.8)4MediumCan be negotiated with
Nezznar Final (4.9)4-5HardTactical wizard + spider allies

Generated for The Binding Engine scene graph implementation.

Adventure: Lost Mine of Phandelver (Wizards of the Coast, 2014)

16. Campaign Mode Plan

Drafted: July 17, 2026

Status: SPEC β€” Not Started

Executive Summary

Campaign Mode is The Binding's Phase II: a full AI Dungeon Master that runs open-ended D&D 5e sessions for 1-6 players. Unlike Adventure Mode (curated book-based scenes), Campaign Mode is sandbox β€” the AI DM creates worlds, NPCs, quests, and combat encounters on the fly, responding to player actions in real time.

The Phase 1 architecture was designed for this from Day 1. The session model, message router, rule engine, and combat manager all accept multi-player inputs already. Campaign Mode is purely additive β€” no rewrites to existing code.

Architecture Overview

What Already Exists (Build On These)

ModuleFile(s)What It DoesCampaign Mode Reuse
**Session Model**`src/session/index.js` (330 lines)Session container with `mode` field (`adventure`/`campaign`), players array, hostId, turnOrder, worldState, suggestionsβœ… Already has campaign mode enum, lobby state, turn management fields
**Message Router**`src/session/message-router.js` (271 lines)DmMessage with targets[], types: narration/dice_result/combat_update/whisper/systemβœ… Whisper type exists, spectator_suggestion type exists
**Rule Engine**`src/rule-engine/` (7 modules, ~108KB)D&D 5e: 12 classes, full SRD races, combat, stats, character sheetsβœ… Player-count agnostic β€” works for 1-6 already
**Combat Manager**`src/combat/combat-manager.js` (438 lines)Initiative, multi-foe encounters, action economy, ENEMY_TEMPLATESβœ… Needs monster stat block expansion
**Dynamic Difficulty**`src/difficulty/dynamic-difficulty.js` (370 lines)Rubber-band scaling: 70% fair, 20% power window, 10% challengeβœ… Works as-is
**Coin Engine**`src/coin-engine/index.js` (428 lines)Categories: creativity/investigation/roleplay/combat/exploration, tier systemβœ… Needs per-player tracking
**Inventory**`src/inventory/inventory.js` (598 lines)Item definitions with combat effects, equipment slotsβœ… Needs per-player isolation
**AI DM Service**`src/ai-dm/` (4 modules, 1,319 lines)LLM orchestration, context management, DM prompts⚠️ Needs campaign-specific prompts + world state management
**Character**`src/character/` (4 modules, 1,505 lines)Character model, service, portrait gen⚠️ Needs multi-character support per session
**Dice Service**`src/dice/` (4 modules, 899 lines)All die types, 207 tests passingβœ… Works as-is
**Auth**`src/auth/token-store.js` (262 lines)Beta token validationβœ… Works as-is
**TTS Voice**`src/voice/tts-service.js` (408 lines)Text-to-speech serviceβœ… Works as-is

What Needs to Be Built

New ModulePurposePriority
`src/campaign/`Campaign session manager, world generator, quest engineP0 β€” Core
`src/campaign/world-builder.js`Procedural world generation (locations, NPCs, hooks)P0 β€” Core
`src/campaign/quest-engine.js`Quest creation, tracking, completionP0 β€” Core
`src/campaign/encounter-builder.js`Combat encounter generation from monster stat blocksP1 β€” Combat
`src/campaign/monster-manual.js`Monster stat block database (SRD creatures)βœ… DONE
`src/campaign/turn-manager.js`Turn order, initiative, action resolution for partiesP1 β€” Combat
`src/campaign/loot-engine.js`Treasure generation, magic item dropsP2 β€” Progression
`src/campaign/npc-engine.js`NPC personality, dialogue, memory, relationshipsP1 β€” Roleplay
`src/campaign/campaign-prompts.js`DM system prompts for open-ended playP0 β€” Core
`src/campaign/session-persistence.js`Save/resume campaign state to diskP1 β€” Persistence
`src/api/campaign-routes.js`Campaign-specific API endpointsP0 β€” Core

Implementation Phases

Phase 2A: Campaign Foundation (Weeks 1-3)

Goal: A single player can start a campaign, the AI DM generates a world, and the player can explore and interact.

#### 2A.1 Campaign Session Manager (src/campaign/index.js)

`

CampaignSession extends Session:

- mode: 'campaign'

- world: WorldState (generated locations, NPCs, quests)

- party: PartyState (characters, positions, shared inventory)

- campaignLog: CampaignEvent[] (full history for context)

- dmContext: DMContext (current situation, active threads)

`

Key functions:

#### 2A.2 World Builder (src/campaign/world-builder.js)

Generates a sandbox world from a theme seed:

`javascript

WorldState = {

locations: {

'loc_tavern': {

id: 'loc_tavern',

name: 'The Rusty Flagon',

type: 'settlement',

description: 'A weathered tavern at the crossroads...',

npcs: ['npc_innkeeper', 'npc_mysterious_stranger'],

connections: ['loc_forest', 'loc_castle_ruins'],

discovered: true,

events: [] // things that happened here

}

},

npcs: {

'npc_innkeeper': {

id: 'npc_innkeeper',

name: 'Elara Thornwick',

race: 'Human',

role: 'innkeeper',

personality: ['warm', 'gossipy', 'secretly afraid'],

attitude: 0.5, // -1 to 1, affects info sharing

knownInfo: ['rumors_about_castle', 'local_politics'],

secrets: ['saw_the_creature_last_night'],

dialogueHistory: []

}

},

quests: { active: [], completed: [], available: [] },

globalFlags: {},

timeOfDay: 'evening',

dayCount: 1,

currentLocation: 'loc_tavern'

}

`

Themes (preset starting points):

#### 2A.3 Campaign DM Prompts (src/campaign/campaign-prompts.js)

The core difference from Adventure Mode: the DM has no pre-written scenes. It must:

1. Describe the world β€” Rich sensory descriptions of locations and NPCs

2. React to player actions β€” Resolve open-ended actions with consequences

3. Drive narrative β€” Create tension, stakes, and story arcs organically

4. Manage NPCs β€” Distinct personalities, memory of past interactions

5. Track consequences β€” Actions have lasting effects on the world

System prompt structure:

`

You are the Dungeon Master for a D&D 5e campaign.

WORLD STATE:

{serialized world state}

ACTIVE QUESTS:

{quest list with status}

PARTY STATUS:

{character sheets for all players}

CURRENT SITUATION:

{what's happening right now, recent events}

YOUR ROLE:

RESPONSE FORMAT:

[Your narration here]

[DICE_ROLL: ability_check, DC 15, Wisdom (Perception)]

β€”orβ€”

[SUGGESTED_ACTIONS: action1, action2, action3, action4]

`

#### 2A.4 Campaign API Routes (src/api/campaign-routes.js)

`

POST /api/campaigns β€” Create new campaign

GET /api/campaigns/:id β€” Get campaign state

POST /api/campaigns/:id/actions β€” Submit player action

GET /api/campaigns/:id/events β€” SSE stream for campaign events

POST /api/campaigns/:id/join β€” Join existing campaign (Phase 2B)

GET /api/campaigns/:id/character β€” Get character sheet

POST /api/campaigns/:id/character β€” Create/update character

GET /api/campaigns/:id/map β€” Get discovered locations (theater of mind)

POST /api/campaigns/:id/save β€” Save campaign state

GET /api/campaigns β€” List active campaigns

`

Phase 2B: Multiplayer (Weeks 4-6)

Goal: 1-6 players can join a campaign, with host/spectator roles and turn management.

#### 2B.1 Session Lobby System

The session model already has SessionState.LOBBY. Build out:

#### 2B.2 Turn Manager (src/campaign/turn-manager.js)

`

TurnManager:

- turnOrder: Player[] (determined by initiative or narrative)

- currentPlayer: Player (whose turn it is)

- turnPhase: 'action' | 'bonus_action' | 'movement' | 'reaction' | 'free'

- turnTimer: optional (for pacing)

- calculateTurnOrder(characters) β€” Initiative-based or narrative-based

- advanceTurn() β€” Move to next player

- isPlayerTurn(playerId) β€” Check if it's this player's turn

- forceAdvance() β€” Skip AFK player after timeout

`

Turn modes:

#### 2B.3 DM Whisper System

The message router already supports whisper type. Build out:

#### 2B.4 Per-Player State Isolation

Phase 2C: Combat & Progression (Weeks 7-9)

Goal: Full D&D 5e combat with initiative, spell slots, abilities, and loot.

#### 2C.1 Monster Manual (src/campaign/monster-manual.js)

SRD creatures as stat blocks:

`javascript

MONSTERS = {

goblin: {

name: 'Goblin', cr: 0.25, type: 'humanoid',

ac: 15, hp: 7, speed: '30ft',

str: 8, dex: 14, con: 10, int: 10, wis: 8, cha: 8,

skills: ['Stealth +6'],

traits: ['Nimble Escape'],

actions: ['Scimitar +4 (1d6+2)', 'Shortbow +4 (1d6+2)'],

xp: 50

},

// ... 50+ SRD monsters

}

`

#### 2C.2 Encounter Builder (src/campaign/encounter-builder.js)

#### 2C.3 Loot Engine (src/campaign/loot-engine.js)

#### 2C.4 Leveling System

Phase 2D: Polish & Advanced Features (Weeks 10-12)

#### 2D.1 Session Persistence (src/campaign/session-persistence.js)

#### 2D.2 Advanced DM Features

#### 2D.3 Campaign UI

Technical Design Decisions

1. World State as JSON (Not Database)

Campaign state serializes to JSON, stored in data/campaigns/{id}.json. Same pattern as adventure sessions. Reasons:

2. LLM Context Window Management

Campaign Mode generates much more context than Adventure Mode. Strategy:

3. DM Response Parsing

The AI DM must output structured data alongside narration. Parse tags:

`

[DICE_ROOL: ability_check, DC 15, Wisdom (Perception)]

[COMBAT_START: goblin x4, difficulty: medium]

[NPC_ATTITUDE: npc_innkeeper, +0.1, "shared rumors"]

[QUEST_UPDATE: quest_find_sword, status: completed]

[LOCATION_DISCOVERED: loc_hidden_cave, "A narrow opening in the cliff face"]

[ITEM_GRANTED: potion_of_healing, to: player_1]

[EXPLORED: talk_to_innkeeper]

`

4. Multiplayer Message Routing

`

All messages β†’ MessageRouter

β”œβ”€β”€ narration β†’ targets: [] (broadcast to all)

β”œβ”€β”€ whisper β†’ targets: [specific_player_id]

β”œβ”€β”€ dice_result β†’ targets: [roller_id] + broadcast summary

β”œβ”€β”€ combat_update β†’ targets: [] (all need to see)

β”œβ”€β”€ system β†’ targets: [] (player joined, etc.)

└── suggested_actions β†’ targets: [current_player_id]

`

5. Coin/XP in Campaign Mode

File Structure

`

src/campaign/

β”œβ”€β”€ index.js β€” Campaign session manager (main entry)

β”œβ”€β”€ world-builder.js β€” Procedural world generation

β”œβ”€β”€ quest-engine.js β€” Quest creation/tracking/completion

β”œβ”€β”€ encounter-builder.js β€” Combat encounter generation

β”œβ”€β”€ monster-manual.js β€” SRD monster stat blocks

β”œβ”€β”€ turn-manager.js β€” Turn order and initiative

β”œβ”€β”€ loot-engine.js β€” Treasure/magic item generation

β”œβ”€β”€ npc-engine.js β€” NPC personality/dialogue/memory

β”œβ”€β”€ campaign-prompts.js β€” DM system prompts for campaigns

β”œβ”€β”€ session-persistence.js β€” Save/resume functionality

β”œβ”€β”€ dungeon-generator.js β€” Procedural dungeon rooms (Phase 2D)

└── themes/

β”œβ”€β”€ gothic-horror.js β€” Gothic horror world template

β”œβ”€β”€ sword-coast.js β€” Classic D&D frontier template

β”œβ”€β”€ noir-mystery.js β€” Urban intrigue template

β”œβ”€β”€ wilderness.js β€” Exploration template

└── index.js β€” Theme registry

src/api/

└── campaign-routes.js β€” Campaign API endpoints

data/

└── campaigns/ β€” Saved campaign state files

└── .gitkeep

public/

└── campaign.html β€” Campaign Mode frontend

`

Dependencies (No New Packages Required)

Everything Campaign Mode needs is already in the dependency tree:

The only external dependency is the LLM API (OpenAI or equivalent), which is already configured.

Testing Strategy

Unit Tests (`tests/campaign.test.js`)

Integration Tests

E2E Smoke Test

Effort Estimate

PhaseScopeEffortDependencies
**2A: Foundation**Campaign session, world builder, DM prompts, API2-3 weeksNone β€” builds on existing
**2B: Multiplayer**Lobby, turn manager, whispers, per-player state2-3 weeksPhase 2A complete
**2C: Combat**Monster manual, encounters, loot, leveling2-3 weeksPhase 2A complete (can parallel with 2B)
**2D: Polish**Persistence, advanced DM, UI2-3 weeksPhases 2A+2B+2C complete

Total: 8-12 weeks for full Campaign Mode.

Phase 2A alone (single-player campaign) is deliverable in 2-3 weeks and provides immediate value β€” a player can start a campaign, explore a generated world, fight monsters, and complete quests without multiplayer.

Risks & Mitigations

RiskImpactMitigation
LLM context window overflow in long campaignsHighSliding window + world state compression + summarize old events
AI DM generates inconsistent world stateHighStrict JSON schema for world updates, validate on parse
Multiplayer turn management feels slowMediumFast turn timers, narrative mode outside combat
Monster stat blocks are wrong/brokenMediumUnit test every stat block against SRD reference
Campaign save files become corruptedMediumAuto-save with versioning, keep last 3 saves
LLM cost per campaign session is highMediumOptimize prompt size, cache world state, use cheaper models for NPC dialogue
Players grief/abuse in multiplayerLowHost kick, report system, session-level bans

Next Steps

1. Review this plan β€” Lawman to approve/adjust scope and priorities

2. Start Phase 2A β€” Begin with campaign session manager + world builder

3. Write campaign DM prompts β€” The most critical piece β€” the DM's voice defines the experience

4. Build first theme β€” Gothic Horror (natural extension of existing Dracula content)

5. Single-player E2E test β€” One player, one campaign, full loop

This plan is a living document. Update as implementation progresses.

17. Monster Database (SRD 5.1)

Overview

The Binding includes a comprehensive monster database built from the D&D 5.1 Systems Reference Document (SRD), licensed under Creative Commons Attribution 4.0 International (CC-BY-4.0). This database powers combat encounters in Campaign Mode and Digital Dungeon Master Mode.

Future: The Binding will create its own custom monsters beyond the SRD. Custom creatures will extend the same JSON schema and live in a separate file (`data/monsters/binding-custom.json`).

License & Attribution

Source: Systems Reference Document 5.1

License: Creative Commons Attribution 4.0 International (CC-BY-4.0)

License URL: https://creativecommons.org/licenses/by/4.0/legalcode

API Source: https://www.dnd5eapi.co

*This work includes material from the Systems Reference Document 5.1, available at https://dnd.wizards.com/resources/systems-reference-document, and licensed under Creative Commons Attribution 4.0 International.*

Custom Binding monsters will be released under the project's own license.

Monster Stat Block Schema

Each monster in the database follows this JSON schema:

FieldTypeDescription
`name`stringCreature name (e.g., "Goblin", "Ancient Red Dragon")
`source`stringAlways "SRD 5.1" for license compliance
`license`stringAlways "CC-BY-4.0"
`cr`numberChallenge Rating (0, 0.125, 0.25, 0.5, 1–30)
`xp`numberXP value corresponding to CR
`type`stringCreature type (beast, undead, dragon, fiend, etc.)
`subtype`string\nullSubtype (goblinoid, elf, shapechanger, etc.)
`size`stringTiny, Small, Medium, Large, Huge, Gargantuan
`alignment`stringTypical alignment
`ac`numberArmor Class
`ac_type`stringSource of AC (natural armor, leather armor, etc.)
`hp`numberAverage hit points
`hp_formula`stringHit dice formula (e.g., "2d6", "17d12+119")
`speed`objectMovement speeds: `{ walk, fly, swim, climb, burrow }` (ft.)
`abilities`object`{ str, dex, con, int, wis, cha }`
`skills`objectSkill bonuses (e.g., `{ stealth: 6, perception: 3 }`)
`senses`string[]Special senses (darkvision, blindsight, etc.)
`languages`string[]Known languages
`traits`object[]Special abilities: `[{ name, description }]`
`actions`object[]Actions/attacks: `[{ name, attack_bonus?, damage?, damage_type?, description }]`
`reactions`object[]Reactions: `[{ name, description }]`
`legendary_actions`object[]Legendary actions (dragons, liches, etc.)
`lair_actions`object[]Lair actions (if any)
`damage_immunities`string[]Damage type immunities
`damage_resistances`string[]Damage type resistances
`damage_vulnerabilities`string[]Damage type vulnerabilities
`condition_immunities`string[]Condition immunities
`tags`string[]Additional tags
`environment`string[]Environments where found
`tactics`stringBrief tactical description

Challenge Rating & Encounter Building

CR to XP Table

CRXPCRXPCRXP
01051,8001310,000
1/82562,3001411,500
1/45072,9001513,000
1/210083,9001615,000
120095,0001718,000
2450105,9001820,000
3700117,2001922,000
41,100128,40020–3025,000–155,000

Encounter Difficulty Thresholds (per character level)

LevelEasyMediumHardDeadly
1255075100
250100150200
375150225400
4125250375500
52505007501,100
106001,2001,9002,800
151,4002,8004,3006,400
202,8005,7008,50012,700

Encounter Multipliers (DMG p.82)

# of MonstersMultiplier
1Γ—1
2Γ—1.5
3–6Γ—2
7–10Γ—2.5
11–14Γ—3
15+Γ—4

Party size adjustment: Party of 1–2 β†’ multiplier increases one step. Party of 6+ β†’ multiplier decreases one step.

How The Binding Uses This

The encounter builder (MonsterManual.buildRandomEncounter()) automatically:

1. Selects monsters appropriate for the party's level and environment

2. Calculates raw XP from selected creatures

3. Applies the encounter multiplier

4. Compares against DMG thresholds to determine difficulty

5. Returns a balanced encounter tagged as trivial/easy/medium/hard/deadly

Monster Types

TypeCountExamples
Beast87Wolf, Giant Eagle, T. Rex
Humanoid50Goblin, Bandit, Mage
Dragon43Ancient Red Dragon, Wyrmling Blue
Monstrosity39Basilisk, Medusa, Hydra
Fiend23Pit Fiend, Balor, Imp
Undead20Zombie, Lich, Vampire
Elemental16Fire Elemental, Djinni
Swarm10Swarm of Rats, Swarm of Bats
Giant10Hill Giant, Storm Giant
Construct9Iron Golem, Shield Guardian
Plant6Shambling Mound, Treant
Fey6Dryad, Satyr, Sprite
Celestial6Planetar, Solar, Deva
Aberration5Aboleth, Mind Flayer
Ooze4Black Pudding, Gelatinous Cube

Environment Distribution

Monsters are tagged by their natural environments, which the encounter builder uses to generate thematic encounters:

Usage in The Binding

Campaign Mode

Digital DM Mode

Storyline Mode

Database Statistics

MetricValue
Total Monsters334
CR Range0 – 30
Dragon Families10 types Γ— 4 ages = 40 variants
Legendary Creatures~20 (dragons, liches, etc.)
Creature Types15
File Size~764 KB
LicenseCC-BY-4.0

CR Distribution (Top 10)

CRCount
243
1/233
1/432
029
527
125
322
1/819
415
810

Future: Custom Monsters

The Binding plans to extend beyond the SRD with original creatures:

Custom monsters will use the same JSON schema as the SRD database, stored in a separate file (data/monsters/binding-custom.json). The Monster Manual module will automatically merge both databases.

Technical Reference

ComponentLocation
SRD Monster Database`data/monsters/srd-monsters.json`
Custom Monsters (future)`data/monsters/binding-custom.json`
Monster Manual Module`src/campaign/monster-manual.js`
Database Generator`data/monsters/build_monster_db.py`
Campaign Mode Plan`docs/campaign-mode-plan.md`
API EndpointsSee campaign-mode-plan.md for combat routes

18. Phase 2 Progress Tracker

Progress Tracker

Started: July 17, 2026

Last Updated: July 18, 2026

Overall Status: IN PROGRESS

PhaseStatusProgressETA
**2A: Campaign Foundation**βœ… Code Complete + Tested95%Weeks 1-3
**2B: Multiplayer**βœ… Code Complete + Tested80%Weeks 4-6
**2C: Combat & Progression**βœ… Code Complete + Tested80%Weeks 7-9
**2D: Polish & Advanced**🟑 Core Built, Needs Integration60%Weeks 10-12
**Storyline Mode Refinement**βšͺ Not Started0%Parallel
**Digital DM Mode**🟑 Scaffolding Done30%After 2A

Phase 2A: Campaign Foundation β€” Detailed Tasks

#TaskStatusFile(s)
2A.1Campaign Session Managerβœ… Code Complete`src/campaign/index.js` (480 lines)
2A.2World Builderβœ… Code Complete`src/campaign/world-builder.js` (308 lines)
2A.3Campaign DM Promptsβœ… Code Complete`src/campaign/campaign-prompts.js` (162 lines)
2A.4Campaign API Routesβœ… Code Complete`src/api/campaign-routes.js` (253 lines)
2A.5Quest Engineβœ… Code Complete`src/campaign/quest-engine.js` (168 lines)
2A.6Digital DM Scaffoldingβœ… Code Complete`src/campaign/digital-dm.js` (153 lines)
2A.7Server Integrationβœ… Done`src/api/server.js` (routes wired)
2A.8Unit Tests (Phase 2A)βœ… Done (56/56 passing)`tests/phase2-campaign.test.js`
2A.9Integration Test (E2E)βœ… Done (3/3 passing)`tests/phase2-e2e.test.js`
2A.10Storyline Mode Refinementβšͺ Not Startedβ€”
2A.11Adventure Catalog (12 adventures, level-tagged)βœ… Done`docs/adventure-catalog.md`
2A.12Lost Mine of Phandelver Manifestβœ… Done`docs/lmop-adventure-manifest.md`
2A.13Adventure Level Display in Dropdownβœ… Done`public/index.html`

Phase 2B: Multiplayer β€” Detailed Tasks

#TaskStatusFile(s)
2B.1Turn Managerβœ… Code Complete + Tested`src/campaign/turn-manager.js` (260 lines)
2B.2Lobby Managerβœ… Code Complete + Tested`src/campaign/lobby-manager.js` (391 lines)
2B.3Whisper Systemβœ… Code Complete + Tested`src/campaign/whisper-system.js` (371 lines)
2B.2Initiative Systemβœ… DoneIncluded in turn-manager
2B.3Narrative/Combat Mode Switchingβœ… Done`switchMode()` in turn-manager
2B.4AFK Auto-Skipβœ… Done`forceAdvance()` in turn-manager
2B.5Participant Add/Removeβœ… Done`addParticipant()` / `removeParticipant()`
2B.6Session Lobby Systemβšͺ Not Startedβ€”
2B.7DM Whisper Systemβšͺ Not Startedβ€”
2B.8Per-Player State Isolationβšͺ Not Startedβ€”

Phase 2C: Combat & Progression β€” Detailed Tasks

#TaskStatusFile(s)
2C.1Monster Manualβœ… Done (pre-existing)`src/campaign/monster-manual.js` (364 lines)
2C.2Encounter Builderβœ… Code Complete + Tested`src/campaign/encounter-builder.js` (260 lines)
2C.3Loot Engineβœ… Code Complete + Tested`src/campaign/loot-engine.js` (350 lines)
2C.4NPC Engineβœ… Code Complete + Tested`src/campaign/npc-engine.js` (300 lines)
2C.5Leveling Systemβœ… Code Complete + Tested`src/campaign/leveling.js` (526 lines)
2C.6Shop Systemβœ… DoneIncluded in loot-engine

Phase 2D: Polish & Advanced β€” Detailed Tasks

#TaskStatusFile(s)
2D.1Session Persistenceβœ… Code Complete + Tested`src/campaign/session-persistence.js` (280 lines)
2D.2Campaign Journalβœ… Done`generateCampaignJournal()` in session-persistence
2D.3Auto-Saveβœ… Done`shouldAutoSave()` in session-persistence
2D.4Save/Load/List/Deleteβœ… DoneFull CRUD in session-persistence
2D.5NPC Relationship Systemβœ… DoneIncluded in npc-engine
2D.6Weather/Time Systemβœ… DoneIncluded in world-builder + campaign index
2D.7Dungeon Generatorβœ… Code Complete + Tested`src/campaign/dungeon-generator.js` (622 lines)
2D.8Campaign UIβšͺ Not Startedβ€”
V.1Voice-to-Text (STT) Serviceβœ… Code Complete + Tested`src/voice/stt-service.js` (230 lines)
V.2Text-to-Voice (TTS) Serviceβœ… Done (pre-existing)`src/voice/tts-service.js` (408 lines)

Test Coverage Summary

Test SuiteTestsStatus
Phase 1 Tests(pre-existing)βœ…
Phase 2A Campaign Tests56βœ… 56/56 passing
Phase 2B/2C/2D Tests124βœ… 124/124 passing
Phase 2 Extended Tests91βœ… 91/91 passing
E2E Integration Tests3βœ… 3/3 passing
**Total****274****βœ… All passing**

Module Inventory

Campaign Modules (`src/campaign/`)

FileLinesPurpose
`index.js`480Campaign session manager (core)
`world-builder.js`308Procedural world generation
`quest-engine.js`168Quest creation/tracking/completion
`campaign-prompts.js`162AI DM system prompts
`digital-dm.js`153Digital DM mode scaffolding
`monster-manual.js`364SRD monster stat blocks
`encounter-builder.js`260Combat encounter generation
`turn-manager.js`260Turn order, initiative, phases
`loot-engine.js`350Treasure, magic items, shops
`npc-engine.js`300NPC personality, dialogue, memory
`session-persistence.js`280Save/load, journal, auto-save
`lobby-manager.js`391Session lobby, invite codes, ready-up
`whisper-system.js`371DM whispers, private messaging, visibility
`leveling.js`526XP, leveling, class features, proficiency
`dungeon-generator.js`622Procedural dungeons, rooms, traps, bosses
**Total****4,974****16 modules**

Voice Modules (`src/voice/`)

FileLinesPurpose
`index.js`40Voice module entry point (TTS + STT exports)
`tts-service.js`408Text-to-speech (Novita, OpenAI, ElevenLabs)
`stt-service.js`230Speech-to-text (OpenAI Whisper)
**Total****678****3 modules**

Blockers (Items Lawman Needs to Act On)

#BlockerPriorityStatusDetails
B1**LLM API key for campaign testing**βœ… DoneRESOLVEDUsing existing Novita API key (`NOVITA_API_KEY`). Model: `qwen/qwen3.6-plus` (free). E2E tests pass with real LLM.
B2**Gothic Horror theme approval**🟑 MediumOPENFirst world theme for Campaign Mode. Plan proposes Gothic Horror (natural extension of Dracula content). Approve or pick different starting theme?
B3**Storyline vs Adventure Mode naming**🟑 MediumOPENPhase 1 calls it "Adventure Mode." Phase 2 renames to "Storyline Mode." Should we rename existing references now or keep backward compat?
B4**Digital DM scope confirmation**🟑 MediumOPENDigital DM scaffolding is done. How much more should we build in Phase 2? Full implementation or keep as scaffolding and flesh out in Phase 3?
B5**Campaign session storage**🟒 LowOPENPlan uses JSON files (consistent with Phase 1). Confirm no database migration needed for beta?
B6**Campaign API auth**🟑 MediumOPENCurrent campaign routes have no beta token validation (unlike adventure routes). Should we add it now or later?
B7**E2E integration test needs live LLM**βœ… DoneRESOLVEDE2E tests pass with real Novita LLM (`qwen/qwen3.6-plus`).
B8**srd-monsters.json path mismatch**🟒 LowFIXEDMonster DB was at `public/docs/` but monster-manual.js expected `src/data/monsters/`. Copied file to fix. Consider permanent resolution.

Decisions Made

DecisionChoiceDate
ArchitectureBuild on existing Phase 1 modules (no rewrites)July 17
Monster ManualAlready done (`src/campaign/monster-manual.js`)Pre-existing
Session ModelAlready has campaign mode enum + multiplayer fieldsPre-existing
StorageJSON files for beta (same as Phase 1)Per plan
Server IntegrationTry/catch wrapped, graceful fallback if routes fail to loadJuly 17
Monster DB PathCopied to `src/data/monsters/` to match monster-manual.jsJuly 18
Encounter Builder APIUses `MonsterManual.getAll()` not raw MONSTERS dictJuly 18

Daily Log

July 18, 2026 β€” Day 2

July 17, 2026 β€” Day 1

Recommended Hardware & Connectivity Spec

The Binding is a browser-based Progressive Web App (PWA) that streams AI narration, renders dice animations, plays voice audio, and loads scene images in real time. This spec covers the minimum and recommended hardware, browser support, network requirements, and data usage for each phase of the platform.

Device Categories

CategoryMinimumRecommendedNotes
SmartphoneiPhone SE (2020) / Android 10+ with 3GB RAMiPhone 13+ / Pixel 7+ / Samsung S22+Primary target - 70%+ of players expected on mobile
TabletiPad (8th gen) / Android tablet with 4GB RAMiPad Air+ / Samsung Tab S8+Best landscape experience for campaign play
DesktopAny machine from 2018+ with 4GB RAMModern laptop/desktop with 8GB RAMChrome, Edge, Firefox, or Safari
ChromebookAny Chromebook with Chrome 100+Recent Chromebook with 4GB+ RAMFully supported - runs as PWA

Browser Support

BrowserMinimum VersionSupport Level
Chrome / Chromiumv100+Full - primary development target
Safari (iOS/macOS)v16+Full - voice input uses Web Speech API
Firefoxv100+Full - all features supported
Edgev100+Full - Chromium-based, identical to Chrome
Samsung Internetv17+Full - popular on Android devices
Opera Mini - Not supported - lacks WebSocket/SSE support

Why PWA? No app store install required. Players open a URL and play. The PWA caches assets (dice animations, UI, fonts) for instant reload and partial offline support. Voice and AI features require an active connection.

Network & Connectivity

FeatureMin BandwidthRecommendedLatency ToleranceData per Session (1hr)
Text-only gameplay64 Kbps1 Mbps+< 2000ms RTT0.5–1 MB
+ Voice output (DM speaks)128 Kbps2 Mbps+< 1500ms RTT2–5 MB
+ Voice input (player speaks)256 Kbps3 Mbps+< 1500ms RTT3–7 MB
+ Scene images1 Mbps5 Mbps+< 3000ms RTT10–30 MB
+ Multiplayer (spectator join)1 Mbps5 Mbps+< 2000ms RTT5–15 MB
Full experience (all features)2 Mbps10 Mbps+< 1500ms RTT15–50 MB

Mobile data note: A 1-hour text-only session uses roughly 1 MB - about the same as loading a news article. Voice adds 2–5 MB. Scene images are the heaviest feature (10–30 MB/hour). Players on limited data plans can disable image generation in settings.

Performance Targets

MetricTargetHow We Achieve It
First contentful paint< 1.5sPWA precaching, minimal JS bundle, static shell
Text response time< 500msServer-sent events (SSE), streaming LLM responses
Voice response time< 2sStreaming TTS, audio starts playing before generation completes
Dice animation60fps, no jankPre-baked lottie sprites, GPU-accelerated transforms
Image generationBackground, non-blockingImages load asynchronously - gameplay never waits for art
Page interaction (TTI)< 2s on 3GCode splitting, lazy-loaded modules, minimal initial bundle

Audio Requirements

FeatureRequirementDetails
Speaker / headphonesRequired for voice featuresDM voice, NPC voices, ambient audio, dice sound effects
MicrophoneOptionalFor voice input (player speaks actions). Falls back to text if unavailable or denied.
Audio codec supportMP3 / AACAll modern browsers support both. OGG fallback for Firefox.

Storage Requirements

ItemSizeDetails
PWA cache (initial)5–15 MBApp shell, UI assets, fonts, dice animation sprites
Cached scene imagesUp to 100 MBOptional - player can clear cache in settings
Session data (localStorage)< 1 MBSession ID, rejoin code, player preferences, settings
Total recommended free space150 MBComfortable headroom for all cached content

Accessibility & Input

Input MethodSupport
TouchPrimary - tap suggested actions, swipe to scroll, long-press for context
KeyboardFull - tab navigation, enter to submit, number keys (1–4) to select actions
VoiceOptional - Web Speech API for input, TTS for output. Graceful fallback to text.
Screen readersPlanned - ARIA labels on all interactive elements, semantic HTML throughout

Network Resilience

Scaling Architecture

PhaseExpected LoadInfrastructure
Phase 1 (beta)50–200 concurrent sessionsSingle Render instance (free tier), in-memory sessions
Phase 2 (launch)500–2,000 concurrentRender standard tier, Redis session store, CDN for static assets
Phase 3 (growth)5,000–20,000 concurrentMulti-instance Render, Redis cluster, Paxeer Cloud frontend, database persistence
Phase 4 (scale)50,000+ concurrentAuto-scaling compute, global CDN, Paxeer-native frontend, sharded session stores
Every layer is designed to scale independently. The frontend moves to Paxeer Cloud. The session store moves from in-memory to Redis to a database. The coin ledger moves from in-memory to Paxeer smart contracts. The DM brain stays on a compute instance - it's the only layer that truly needs a server.

Security & Privacy

System Architecture

The Binding is a hybrid application: the game engine runs on a traditional server, and the economy/assets live on the Paxeer blockchain. This is the same architecture every major web3 game uses. A blockchain cannot run a game server, call AI APIs, or serve web pages - but it is the best place to own assets, process payments, and store player reputation.

A blockchain is a ledger, not a computer. The game runs on a computer. The rewards live on the ledger.

What Runs Where

LayerWhere It LivesWhat It Does
Game EngineRender.com (Node.js server)Fastify API server, session management, rule engine (D&D 5e dice math, combat, stats), scene engine, continuity validation
AI Dungeon MasterRender.com β†’ OpenAI APIOrchestrates player action β†’ context assembly β†’ LLM call β†’ narrative response + 4 suggested actions. Manages hot/warm/cold context tiers for 50+ hour adventures.
Frontend (PWA)Render.com (same server)Responsive HTML/CSS/JS served as static files. Service worker for offline shell. Polling-based real-time sync. Works on any device with a browser.
Player WalletsPaxeer Network (chain 125)PAX balance, token holdings, transaction history. MetaMask or any EVM wallet.
Character NFTsPaxeer Network (ERC-721)Dynamic NFTs that update as characters level up. Stats, portrait, achievements, tier badges on-chain.
$BINDING TokenPaxeer Network (ERC-20)Platform meme coin. Only minted through gameplay. Tier-weighted conversion from in-game coins.
Achievement BadgesPaxeer Network (ERC-1155)Soulbound (non-transferable) tokens earned through gameplay milestones.
MarketplacePaxeer Network (custom contract)NFT trading between players: adventures, dice sets, cosmetics. Royalties to creators.

Why It Cannot All Run On-Chain

NeedWhy Blockchain Can't Do ItWhere It Actually Runs
AI narrationSmart contracts cannot call external APIs (no HTTP requests from EVM)Server β†’ OpenAI API
Session stateOn-chain storage costs gas per write. A 2-hour session = hundreds of state changes = hundreds of gas fees.Server memory (in-memory, zero cost, instant)
Web pagesA blockchain stores data, it does not serve HTML to browsersServer static file hosting
Dice rollingOn-chain randomness requires VRF oracles - expensive, slow, unnecessary for a single-player gameServer-side cryptographic random

Current Server Setup (Beta)

The game is deployed and running on Render.com. This is the simplest, lowest-cost setup for a Paxeer network beta test.

ComponentServiceMonthly CostStatus
Game server + frontendRender Starter plan$7/moNeeds upgrade from free tier (free tier spins down after 15 min idle - first visitor waits 30-60s)
LLM API (AI DM)OpenAI GPT-4o-mini$5–10/moNeeds API key added as env var on Render
Total for beta$12–17/moHandles hundreds of playthroughs

LLM cost breakdown: GPT-4o-mini costs $0.15 per million input tokens. A full Dracula playthrough (~30K tokens) costs about $0.01. One hundred playthroughs cost roughly $1. This is the cheapest model that produces quality narrative. GPT-4o (better quality) costs 10x more - about $0.15 per playthrough. We recommend starting with mini for beta and upgrading to GPT-4o for launch.

What Paxeer Network Users Need to Test

Testing PhaseWhat Players NeedWhat We Need
Phase 1 Beta (now)Just a URL. Open in any browser. No wallet needed. No install.Render paid tier + OpenAI API key
Phase 2 Beta (wallet connect)Paxeer wallet (MetaMask) + small PAX balance for gasWallet connection UI + smart contract for coin payouts
Phase 3 Launch (full on-chain)Paxeer wallet + PAX for transactionsDeployed smart contracts (NFTs, marketplace, $BINDING token)

What Is Needed to Build & Deploy

Immediate (Phase 1 Beta - this week)

  1. Render Starter plan - $7/mo. Toggle in Render dashboard. Eliminates cold starts.
  2. OpenAI API key - Free to create at platform.openai.com. Add $5-10 credit. Set as LLM_API_KEY env var on Render.
  3. Agent shell access - The build agent needs terminal access to push code, install dependencies, and run tests. This was working previously and appears to have been restricted.

Next (Phase 2 - Paxeer wallet integration)

  1. Paxeer wallet with PAX - For deploying smart contracts and testing payouts. The agent has an embedded wallet.
  2. Smart contracts - Character NFT (ERC-721), coin payout contract, achievement badges (ERC-1155). Written in Solidity, deployed to Paxeer chain 125.
  3. Wallet connection UI - MetaMask/WalletConnect integration in the frontend. Players connect their Paxeer wallet to receive coin rewards.

Later (Phase 3 - Full blockchain)

  1. $BINDING token contract - ERC-20 with gameplay-only minting. No ICO, no presale.
  2. Marketplace contract - NFT listings, purchases, royalties, escrow.
  3. Guild Pass contract - Subscription NFT with tier progression.
  4. Security audit - All contracts audited before mainnet launch with real funds.

Security Model

ConcernHow It's Handled
No PII on-chainPlayer names, emails, and game actions never touch the blockchain. Only wallet addresses and token balances are public.
HTTPS everywhereAll API traffic encrypted in transit. Render provides TLS certificates automatically.
Session isolationEach game session is fully isolated. No data leaks between sessions or players.
LLM data handlingPlayer actions are sent to OpenAI for narration. No player identity data is included. Conversation history is ephemeral.
Smart contract safetyContracts use OpenZeppelin standards. All contracts audited before mainnet. Agent wallet has spend limits enforced at the network layer.
Rejoin code securityShort-lived, session-scoped codes. Rate limiting prevents brute force.

Scaling Path

StageUsersInfrastructureCost
Beta (now)50–200 Paxeer testersSingle Render instance, in-memory sessions$12–17/mo
Launch500–2,000 concurrentRender standard tier, Redis for sessions, CDN for static assets$50–100/mo
Growth5,000–20,000 concurrentMulti-instance, Redis cluster, Paxeer Cloud frontend$200–500/mo
Scale50,000+ concurrentAuto-scaling compute, global CDN, sharded sessions$1,000–3,000/mo
The game engine is the only layer that needs a server. Everything else - frontend, assets, economy - can move to decentralized infrastructure over time. The architecture is designed so each layer scales independently.

Interactive Dice Roller

Real-time 3D physics-based dice. Click any die to roll it - the die tumbles with gravity, bounces off the table, and settles on a random result.

Multi-Die Rolls

Click any die to roll with real-time 3D physics. The die tumbles with gravity, bounces off the table, and settles on a random result. Tap the overlay to dismiss after the number appears.

Game Modes - Storyline, Campaign & Digital DM

Spec: July 17, 2026 • Three modes, one engine • Same rule system, dice, combat, and AI DM • Just different context and freedom levels

Three Modes, One App: The Binding offers three distinct ways to play, all powered by the same engine. The mode is selected at session creation and determines the DM prompts, content source, and player experience — not the server architecture.

The Three Modes

ModeDescriptionPlayersAI DM BehaviorContent Source
πŸ“– Storyline Mode Follow the book. Curated scenes with exit pressure ramps keep you in the canonical narrative. 1 (single player) Stays on the scene graph. Stays on script. 4 suggested actions per turn. Pre-written scenes (Dracula, Frankenstein, Holmes)
βš”οΈ Campaign Mode Sandbox in the book’s world. Explore freely, pursue side quests, build NPC relationships. 1–6 Uses the book’s world as a seed but improvises freely. No scene graph. Book world state (characters, locations, lore) + AI-generated content
🎲 Digital DM Mode Full Dungeon Master. Completely open-ended. The AI creates the world, NPCs, quests, and combat from scratch. 1–6 No pre-written content. Builds everything live from a theme preset. AI-generated from theme (gothic horror, sword coast, noir, wilderness, custom)

How the Engine Handles All Three

Same engine. Same rule system. Same dice. Same combat manager. The only difference is how much freedom the DM has:

The session model already has mode field ('storyline' | 'campaign' | 'digital_dm'). The message router, rule engine, and combat manager all work for 1–6 players already. No rewrites needed.

Major Deliverables - Phased Roadmap

PhaseDeliverableEffortStatus
Phase 2A: Campaign Foundation - Single-player campaign, world generation, DM prompts
2A.1 Campaign Session Manager - src/campaign/index.js
Extend session model with world state, party state, campaign log, DM context
1 week βœ… Code Complete
2A.2 World Builder - src/campaign/world-builder.js
Procedural generation: locations, NPCs, connections, quest hooks. Theme presets: gothic horror, sword coast, noir mystery, wilderness
1 week βœ… Code Complete
2A.3 Campaign DM Prompts - src/campaign/campaign-prompts.js
Open-ended DM prompts for sandbox play. Structured response parsing: [DICE_ROLL], [COMBAT_START], [QUEST_UPDATE], [NPC_ATTITUDE]
1 week βœ… Code Complete
2A.4 Campaign API Routes - src/api/campaign-routes.js
POST /campaigns, POST /campaigns/:id/actions, GET /campaigns/:id/events (SSE), POST /campaigns/:id/save
3 days βœ… Code Complete
Phase 2B: Multiplayer - 2-6 players, host/spectator, turn management
2B.1 Session Lobby System - Join flow, ready check, role assignment
Host creates campaign, gets share code. Players join β†’ create character β†’ ready up
1 week βœ… Code Complete
2B.2 Turn Manager - src/campaign/turn-manager.js
Initiative-based (combat) and narrative-based (exploration) turn order. Auto-switches between modes. AFK skip after timeout
1 week βœ… Code Complete
2B.3 DM Whisper System - Private messages to individual players
Router already supports whisper type. Build DM→Player and Player→Player whisper flows
3 days βœ… Code Complete
2B.4 Per-Player State Isolation - Shared vs private world state
Shared: location, visible NPCs, environment. Private: perception results, secret items, NPC relationships
3 days βœ… Code Complete
Phase 2C: Combat & Progression - Full D&D 5e combat, monsters, loot, leveling
2C.1 Monster Manual - src/campaign/monster-manual.js
50+ SRD creature stat blocks (Goblin, Skeleton, Dragon, etc.). CR, AC, HP, abilities, actions, XP
1 week βœ… Code Complete
2C.2 Encounter Builder - src/campaign/encounter-builder.js
CR-balanced encounter generation. Dynamic encounters from narrative. Integrates with existing Dynamic Difficulty
3 days βœ… Code Complete
2C.3 Loot Engine - src/campaign/loot-engine.js
Treasure tables by CR, magic items (Common→Legendary), attunement rules, gold/XP distribution, shop system
3 days βœ… Code Complete
2C.4 Leveling System - Per-character XP tracking, milestone leveling option
New HP, class features, spell slots, ability score improvements. Multi-class support (rule engine handles this)
3 days βœ… Code Complete
Phase 2D: Polish & Advanced Features
2D.1 Session Persistence - Auto-save, manual save, resume, campaign journal
JSON storage in data/campaigns/. Auto-save every N turns. Campaign recap for returning players
1 week βœ… Code Complete
2D.2 Advanced DM Features - NPC relationships, weather/time, random encounters, dungeon generator, puzzle system 1 week πŸ”¨ Partial
2D.3 Campaign UI - Party dashboard, location map, quest log, NPC codex, combat tracker 1 week βšͺ Planned

What Already Exists (Build On These)

ModuleWhat It DoesCampaign Reuse
src/session/index.js (330 lines) Session model with mode:'storyline'|'campaign'|'digital_dm', players array, hostId, turnOrder, worldState, lobby state βœ… Ready - no changes needed
src/session/message-router.js (271 lines) DmMessage with targets[], types: narration, dice_result, combat_update, whisper, spectator_suggestion βœ… Whisper + spectator types exist
src/rule-engine/ (7 modules, 108KB) D&D 5e: 12 classes, full SRD races, combat, stats, character sheets βœ… Player-count agnostic - works for 1-6
src/combat/combat-manager.js (438 lines) Initiative, multi-foe encounters, action economy, ENEMY_TEMPLATES βœ… Needs monster stat block expansion
src/difficulty/dynamic-difficulty.js (370 lines) Rubber-band scaling: 70% fair, 20% power window, 10% challenge βœ… Works as-is
src/coin-engine/index.js (428 lines) Categories: creativity/investigation/roleplay/combat/exploration, tier system βœ… Needs per-player tracking
src/inventory/inventory.js (511 lines) Item definitions with combat effects, equipment slots βœ… Needs per-player isolation
src/ai-dm/ (4 modules, 1,319 lines) LLM orchestration, context management, DM prompts ⚠️ Needs campaign-specific prompts
src/character/ (4 modules, 1,505 lines) Character model, service, portrait gen ⚠️ Needs multi-character per session
src/dice/ (4 modules, 899 lines) All die types, 207 tests passing βœ… Works as-is

Technical Design Decisions

1. World State as JSON - Campaign state stored in data/campaigns/{id}.json. Same pattern as adventure sessions. Easy to save/load/share. No database dependency for beta.

2. LLM Context Window Management - Sliding window for long campaigns. Keep last N exchanges in full, summarize older context. Only send relevant location/NPC data, not entire world. ~8K tokens system prompt, ~4K conversation, ~2K response.

3. DM Response Parsing - Structured tags alongside narration: [DICE_ROLL: ability_check, DC 15, Wisdom], [COMBAT_START: goblin x4], [QUEST_UPDATE: quest_id, status], [NPC_ATTITUDE: npc_id, change].

4. Multiplayer Message Routing - All messages through MessageRouter. Narration β†’ broadcast. Whisper β†’ specific player. Dice result β†’ roller + summary. Combat update β†’ all. Suggested actions β†’ current player only.

5. No New Dependencies - Everything needed is already in the tree: Fastify, uuid, ws, fastify-sse-v2. Only external dependency is the LLM API (already configured).

File Structure

FilePurpose
src/campaign/index.jsCampaign session manager (main entry)
src/campaign/world-builder.jsProcedural world generation
src/campaign/quest-engine.jsQuest creation/tracking/completion
src/campaign/encounter-builder.jsCombat encounter generation
src/campaign/monster-manual.jsSRD monster stat blocks
src/campaign/turn-manager.jsTurn order and initiative
src/campaign/loot-engine.jsTreasure/magic item generation
src/campaign/npc-engine.jsNPC personality/dialogue/memory
src/campaign/campaign-prompts.jsDM system prompts for campaigns
src/campaign/session-persistence.jsSave/resume functionality
src/campaign/themes/World templates (gothic-horror, sword-coast, noir-mystery, wilderness)
src/api/campaign-routes.jsCampaign API endpoints
public/campaign.htmlCampaign Mode frontend
data/campaigns/Saved campaign state files

Total Effort Estimate

PhaseScopeEffortDependencies
2A: FoundationCampaign session, world builder, DM prompts, API2-3 weeksNone - builds on existing
2B: MultiplayerLobby, turn manager, whispers, per-player state2-3 weeksPhase 2A complete
2C: CombatMonster manual, encounters, loot, leveling2-3 weeksPhase 2A (can parallel with 2B)
2D: PolishPersistence, advanced DM, UI2-3 weeksPhases 2A+2B+2C complete
Total8-12 weeks for all three game modesPhase 2A alone: 2-3 weeks (Campaign Mode foundation)

Theme Presets

ThemeDescriptionStarting Location
Gothic HorrorDark villages, haunted forests, vampire lordsA crumbling village on the edge of a cursed forest
Sword CoastClassic D&D frontier, dungeons, dragonsA bustling trade town at a crossroads
Noir MysteryUrban intrigue, thieves guilds, political corruptionA rain-soaked city with a dark underbelly
Wilderness ExpeditionExploration, ruins, ancient civilizationsAn expedition camp at the edge of uncharted territory
CustomPlayer describes a setting, AI generates from descriptionPlayer-defined

Full Implementation Plan

See the complete implementation plan with data models, API routes, testing strategy, and risk mitigations at:

/workspace/the-binding/docs/campaign-mode-plan.md

Monster Database - 334 SRD 5.1 Creatures

Complete stat blocks for all SRD monsters. Search, filter by CR or type, click any creature for full details.

Loading monster database...

Campaign Mode - Implementation Plan

Phase II: Full AI Dungeon Master for open-ended D&D 5e sessions. Status: 95% Complete β€” 16 modules built (4,974 lines), 274 tests passing.

Core Concept: Unlike Adventure Mode (curated book-based scenes), Campaign Mode is sandbox - the AI DM creates worlds, NPCs, quests, and combat encounters on the fly, responding to player actions in real time. The Phase 1 architecture was designed for this from Day 1. Campaign Mode is purely additive - no rewrites.

Three Game Modes (One Engine)

ModeDescriptionPlayersStatus
Storyline ModeBook-based adventures - Dracula, Frankenstein, Holmes. Curated scene graphs, narrative bug-hunted.1βœ… Built
Campaign ModeOpen-ended sandbox - AI DM generates worlds, NPCs, quests. Multi-player (2-6).2-6πŸ”¨ In Progress
Digital DM ModeGeneral-purpose AI DM - any TTRPG system, any setting. Maximum flexibility.1-6🟑 Scaffolding

Architecture - Build On These (No Rewrites)

ModuleWhat It DoesCampaign Reuse
Session ModelSession container with mode field, players array, turnOrderβœ… Already has campaign mode enum, lobby state
Message RouterDmMessage with targets[], types: narration/dice_result/combat_update/whisperβœ… Whisper + spectator types exist
Rule Engine (7 modules)D&D 5e: 12 classes, full SRD races, combat, statsβœ… Player-count agnostic - works for 1-6
Combat ManagerInitiative, multi-foe encounters, action economyβœ… Needs monster stat block expansion
Dynamic DifficultyRubber-band scaling: 70% fair, 20% power, 10% challengeβœ… Works as-is
Monster Manual334 SRD creature stat blocks, CR-balanced encountersβœ… DONE - see Monsters tab
Coin EngineCategories: creativity/investigation/roleplay/combat/explorationβœ… Needs per-player tracking
AI DM ServiceLLM orchestration, context management, DM prompts⚠️ Needs campaign-specific prompts

What Needs Building

New ModulePurposePriority
campaign/index.jsCampaign session manager - mode:'campaign', world state, party stateP0
campaign/world-builder.jsProcedural world generation - locations, NPCs, quest hooksP0
campaign/quest-engine.jsQuest creation, tracking, completionP0
campaign/campaign-prompts.jsDM system prompts for open-ended sandbox playP0
campaign/encounter-builder.jsCombat encounter generation from monster stat blocksP1
campaign/turn-manager.jsTurn order, initiative, action resolution for partiesP1
campaign/npc-engine.jsNPC personality, dialogue, memory, relationshipsP1
campaign/loot-engine.jsTreasure generation, magic item dropsP2
campaign/session-persistence.jsSave/resume campaign state to diskP1
api/campaign-routes.jsCampaign-specific API endpointsP0

Implementation Phases

PhaseScopeTimelineKey Deliverable
2A: FoundationCampaign session, world builder, DM prompts, APIWeeks 1-3Single player starts a campaign, AI DM generates a world, player explores
2B: MultiplayerLobby, turn manager, whispers, per-player stateWeeks 4-62-6 players join a campaign with host/spectator roles
2C: CombatEncounters, loot, leveling (parallel with 2B)Weeks 7-9Full D&D 5e combat with initiative, spell slots, loot drops
2D: PolishPersistence, advanced DM features, UIWeeks 10-12Auto-save, NPC relationships, party dashboard, combat tracker

Total: 8-12 weeks for full Campaign Mode. Phase 2A alone (single-player campaign) is deliverable in 2-3 weeks and provides immediate value.

World Themes (Starting Points)

ThemeDescriptionStarting Location
Gothic HorrorDark villages, haunted forests, vampire lordsA village on the edge of a cursed forest
Sword CoastClassic D&D frontier, dungeons, dragonsA bustling trade town at a crossroads
Noir MysteryUrban intrigue, thieves guilds, political corruptionA rain-soaked city with a dark underbelly
Wilderness ExpeditionExploration, ruins, ancient civilizationsAn expedition camp at uncharted territory

File Structure

src/campaign/ - index.js, world-builder.js, quest-engine.js, encounter-builder.js, monster-manual.js, turn-manager.js, loot-engine.js, npc-engine.js, campaign-prompts.js, session-persistence.js

src/campaign/themes/ - gothic-horror.js, sword-coast.js, noir-mystery.js, wilderness.js

src/api/campaign-routes.js - Campaign API endpoints

data/campaigns/ - Saved campaign state files

Risks & Mitigations

RiskImpactMitigation
LLM context overflow in long campaignsHighSliding window + world state compression + summarize old events
AI DM generates inconsistent world stateHighStrict JSON schema for world updates, validate on parse
Multiplayer turn management feels slowMediumFast turn timers, narrative mode outside combat
LLM cost per session is highMediumOptimize prompt size, cache world state, use cheaper models for NPC dialogue

Test Links & Live Environments

All live test environments and project resources in one place. Bookmark this page.

Live Applications

EnvironmentURLStatusNotes
Game App (Render)the-binding.onrender.comLiveMain game server - signup, character creation, adventure play
Docs Hub (Paxeer Cloud)the-binding-docs.cloud.hyperpaxeer.comLiveThis site - all specs, status, tools, monsters, campaign plan
Dice Roller (Direct)#dice tabLive3D physics dice roller (Three.js + Cannon.js)
Monster DatabaseMonsters tab aboveLive334 SRD 5.1 creatures - search, filter, detail view

Source Code & Repositories

ResourceURLNotes
GitHub Repositorygithub.com/rlaw22/the-bindingFull source code - game engine, rule engine, dice, monsters, manifests
Render Dashboarddashboard.render.comDeployment management for the-binding.onrender.com
Paxeer Cloud (paxc)CLI tool - paxc deploy the-binding-docsDeployment for this docs site

Adventure Content

BookActsScenesStatusReview File
Dracula525βœ… Bug Hunt DoneREVIEW-dracula-acts4-5.md, REVIEW-frankenstein.md
Frankenstein525βœ… Bug Hunt DoneREVIEW-frankenstein.md
Sherlock Holmes525βœ… Bug Hunt DoneREVIEW-holmes.md

Bug Hunt Results: 101 bugs found across all 75 scenes. 29 HIGH + 31 MEDIUM fixed. See review files in repo root.

Key Documentation Files (in repo)

FileLocationContents
Game Design Decisionsdocs/game-design-decisions.mdCore design philosophy, 3 game modes, replayability, Shoppe, difficulty scaling, NFTs, coin economy
Campaign Mode Plandocs/campaign-mode-plan.mdFull implementation plan for Phase II - world builder, quest engine, multiplayer, combat
Monster Databasedocs/monster-database.md334 SRD creatures schema, CR tables, encounter building rules
Scene System Designdocs/scene-system-design.mdScene engine architecture, dependency graphs, exit pressure
Multiplayer Roadmapdocs/multiplayer-roadmap.mdHost/spectator β†’ full co-op β†’ campaign mode progression
Logo & Art Briefdocs/logo-art-brief.mdVisual identity, logo specs, art direction
STATUS.mdSTATUS.mdLive project status tracker (updated each session)
Adventure Catalogdocs/adventure-catalog.md12 adventures cataloged (5 WotC + 7 third-party), level-tagged, integration priority ranked
Lost Mine Manifestdocs/lmop-adventure-manifest.mdFull scene graph for Lost Mine of Phandelver β€” 4 acts, 37 scenes, all NPCs, encounters, quest lines
Phase 2 Trackerdocs/phase2-tracker.mdLive progress tracker for all Phase 2 work β€” 274 tests, 16 modules, daily log, blockers

Test Suites

SuiteFileTestsStatus
Phase 1 (Core Engine)tests/phase1.test.js~19KBβœ… Passing
Phase 2 (Advanced)tests/phase2.test.js~12KBβœ… Passing
Dice Logictests/dice.test.js207 testsβœ… 327/327 Passed
Smoke Testsmoke_test.pyE2EπŸ”¨ Partial
Phase 2A Campaigntests/phase2-campaign.test.js56 testsβœ… 56/56 Passing
Phase 2B/2C/2Dtests/phase2bcd.test.js124 testsβœ… 124/124 Passing
Phase 2 Extendedtests/phase2-extended.test.js91 testsβœ… 91/91 Passing
E2E Integrationtests/phase2-e2e.test.js3 testsβœ… 3/3 Passing
Total274 testsβœ… All Passing