Campaign Codex is a D&D 5e campaign manager with a built-in AI Dungeon Master. Play through the web app, Discord, or SMS — all channels stay in sync.

DM Setup Player Join Discord SMS AI DM Commands

1. DM Setup (5 minutes)

Create your account

  1. Go to /register and create an account
  2. Choose the DM role
  3. You'll land on the DM Dashboard

Create a campaign

  1. Click "+ New Campaign" on the DM Dashboard
  2. Give it a name and description (or use the AI to generate one)
  3. You'll get a Join Code — this is what players use to join
Example

You create a campaign called "The Lost Mines of Phandelver".

Your join code is XK7M. Share this with your players.

Create characters for your players

  1. Go to Characters → + New Character
  2. Use the guided creator: pick race, class, abilities, skills, equipment
  3. On the campaign page, assign characters to players using "Assign Characters"

2. Players Joining

Via the web app

  1. Register at /register with the Player role
  2. On your Player Dashboard, enter the Join Code your DM gave you
  3. You'll see the campaign and your assigned character

Via Discord

  1. The DM runs /setup XK7M in their Discord server
  2. The bot creates campaign channels automatically
  3. Players type /join your_username to link their Discord account
  4. Then /verify XK7M to confirm
Example — Discord join

/join sarah_the_bold → Links your Discord to your web account "sarah_the_bold"

/verify XK7M → Confirms you're in the campaign, shows your character

Via SMS

  1. The DM links your phone number to your account on the campaign page
  2. Text anything to the campaign's Twilio number to start playing

3. Playing on Discord

When the DM runs /setup, the bot creates these channels:

ChannelPurpose
#tavernMain play channel — player actions happen here
#questsQuest log and objectives
#combatCombat encounters with initiative and HP tracking
#loreWorld lore, history, and discoveries
#dm-notesDM-only channel for private notes
#bot-logBot activity log

Player commands

CommandWhat it doesExample
/action Do anything — the AI DM interprets your intent /action I search the chest for traps
/roll Roll dice /roll 2d6+3
/attack Attack a target /attack Goblin
/check Make a skill check /check Perception
/cast Cast a spell /cast Fireball
/save Make a saving throw /save Dexterity
/stats View your character sheet /stats
/inventory Check your gear /inventory

DM commands

CommandWhat it doesExample
/scene Set the scene with narration /scene The cave entrance yawns before you, cold air rushing out
/npc add Add an NPC to the scene /npc add Gundren Rockseeker
/npc say Have an NPC speak /npc say Gundren "Well met, adventurers!"
/combat start Start combat and roll initiative /combat start
/combat next Advance to next turn /combat next
/combat end End combat /combat end
/damage Deal damage to a creature /damage Goblin 8
/heal Heal a creature /heal Thorin 10
/loot Announce loot /loot 50 gold and a Potion of Healing
/whisper Send a private message to a player /whisper @Sarah You notice poison on the goblin's blade
/condition add Apply a condition /condition add Goblin Poisoned
/condition remove Remove a condition /condition remove Goblin Poisoned
/recap AI-generated session recap /recap

4. Playing via SMS

Players can text their actions to the AI DM using plain English. No commands to memorize.

Setup

  1. The DM enables SMS Play Mode on the campaign page
  2. The DM enters each player's phone number next to their character
  3. Players text the Twilio number to start playing

How it works

Just text what your character does. The AI DM figures out the rest.

Example — Skill check

You text: I search the room for traps

AI DM replies:

[Perception 18] Your trained eyes catch a glint of wire stretched across the doorframe. A tripwire — connected to a crossbow bolt mechanism in the wall. (DC 15 — Pass)

Example — Combat

You text: I swing my sword at the goblin

AI DM replies:

[Attack vs Goblin: 17 HIT, 8 dmg] Your blade arcs through the torchlight and bites deep into the goblin's shoulder. It screeches and stumbles backward. (HP: 2/7)

Example — Roleplay

You text: I ask the innkeeper what he knows about the missing miners

AI DM replies:

The innkeeper leans close, voice dropping. "Ain't seen Gundren in a tenday. Last I heard, he was headed to Cragmaw Hideout with that sellsword Sildar. Folks say goblins got 'em." He wipes down a glass nervously.

SMS actions automatically appear in Discord (if connected) and in the campaign's combat log on the web.

5. The AI Dungeon Master

The AI DM is powered by xAI's Grok model. It handles two things:

Intent Recognition

Reads the player's natural language and determines: is this an attack? A skill check? A spell? Pure roleplay? It extracts the target, ability, and skill automatically.

Narration

After the game engine resolves the mechanics (dice rolls, AC checks, damage), the AI narrates the result in atmospheric, in-character prose. For SMS, it keeps responses under 300 characters.

The AI DM never fudges dice or invents rules. All mechanics go through the same engine that powers the web app — real d20 rolls, real AC calculations, real skill modifiers from your character sheet.

6. Quick Reference

For the DM

Create a campaignWeb app → DM Dashboard → + New Campaign
Connect to DiscordInvite bot → type /setup JOIN_CODE in your server
Enable SMSCampaign page → SMS Play Mode → Enable → add player phones
Run diagnosticsWeb app → sidebar → Diagnostics
Set a sceneDiscord: /scene  |  Web: campaign narration panel
Start combatDiscord: /combat start  |  Web: combat panel

For players

Join a campaignWeb: enter join code  |  Discord: /join + /verify
Do somethingDiscord: /action  |  SMS: just text it
Roll diceDiscord: /roll 2d6+3  |  SMS: "I roll perception"
AttackDiscord: /attack Goblin  |  SMS: "I attack the goblin"
Check your statsDiscord: /stats  |  Web: character sheet
Stop SMSText STOP to unsubscribe

7. Everything Stays in Sync

No matter how a player takes an action — web, Discord, or SMS — the result shows up everywhere:

  • SMS actions post to the Discord #tavern channel
  • Discord actions update the web campaign's combat log
  • HP, conditions, and inventory stay consistent across all channels
  • The DM sees everything in one place on the campaign page
Player Phone → Twilio → AI DM → Game Engine → Narration → SMS + Discord + Web