How It Works Primer Guides Tools Pricing About FAQ Blog Contact Sign in Sign Up
← All posts

How TableForge's D&D Rules Engine Works

The short answer

TableForge splits an AI dungeon master into two jobs. The AI narrates: it describes scenes, voices NPCs, and reacts to what players choose. A separate rules engine, ordinary code rather than a language model, settles every outcome with real dice and keeps your character sheet and the world's state. The DM tells the story of what happened, but it never decides a number. That is what lets a campaign stay consistent across dozens of sessions.

The biggest decision in TableForge is one players never see directly. We separated the AI that tells the story from the system that runs the game. The AI describes what happens in the world. The rules engine decides what actually happens. This post is about why we built it that way and what it means at the table.

Why we separated narration from adjudication

Large language models are extraordinary collaborative writers and unreliable accountants. They can describe a tense standoff in a smoke-filled tavern with real atmosphere, and they can also forget how many hit points you had two turns ago. Both of those things are true at the same time, and they don't have the same fix.

You don't make an LLM better at math by training it harder. You make it better at math by handing the math to a calculator. The same logic applies to D&D. The storyteller doesn't need to roll the dice or keep the books. It needs to know what happened so it can tell you about it.

Most AI DM tools we've seen don't make this split. They ask the language model to do everything: improvise the scene, voice the NPCs, invent the dice, and remember the numbers. That works for a while. It usually breaks somewhere around the third fight, when the game starts contradicting itself in small ways that players notice and the AI doesn't.

TableForge handles the work differently. The AI narrates. The engine adjudicates.

Which system owns what

Job Owner Why
Scenes, NPC voices, atmosphere AI narrator What language models are best at
Reacting to choices, plot continuity AI narrator Needs open-ended judgment
Dice and outcomes Rules engine Needs real randomness and the same answer every time
Your character sheet and the world's state Rules engine Has to survive dozens of sessions

What it feels like at the table

You never talk to the engine. You play the way you would at any table.

You say what you do. "I swing my longsword at the bog wraith." Plain words, no commands or syntax.

The engine settles it. Real dice are rolled, and the result is decided by the rules, not by what would make a nice paragraph. You can see the roll.

The DM tells you what happened. "Your longsword catches the wraith mid-drift, biting deep into its ethereal form. It recoils with a sound like wind through dead reeds, but stays upright." The story follows the dice, never the other way around.

Your character sheet updates on its own. Nobody has to remember to subtract the damage or cross off the potion.

Why this matters for long campaigns

The split matters most when campaigns get long.

A one-shot doesn't stress anything. A twenty-session campaign does. By then there have been hundreds of fights and thousands of rolls, and a long trail of things your character gained, spent, and lost. None of that can be "approximately right." It has to be actually right, the way it would be at a real table with a sharp DM and good notes.

That is what the engine is for. The numbers on your sheet are the numbers the game agrees on, session after session. None of it depends on the AI remembering, because the game is not stored in the AI's memory.

This is the difference between an AI that can run a session and an AI that can run a campaign.

What this doesn't do

It's worth being honest about what the rules engine isn't.

It doesn't make the narration better. That's the AI's job. A great rules engine with a mediocre narrator gives you a correct game that isn't fun to play. We work hard on both sides.

Homebrew is partial. The engine is built against the SRD, so third-party books are not loaded into it. Custom rulings agreed with the DM, such as a subclass or species from outside the SRD or a house rule, are saved as Table Rules that the DM follows for the rest of the campaign, and the DM names items, places, and people to fit your setting, so you can skin your own world on top of the 5e rules. Uploading homebrew books is on the roadmap, as is importing a PDF adventure or an official module.

It doesn't make the AI dungeon master a substitute for a great human DM at a great table. We've said this elsewhere and we'll keep saying it. The rules engine makes AI DMs viable for long campaigns; it doesn't change the fact that AI DMs are for a different occasion than the irreplaceable human game. How the rest of a campaign fits together covers what sits on top of the engine.

What it does do is keep the game honest. In a category where most tools quietly fall apart somewhere around session four, that's the foundation that makes everything else possible.

Frequently asked questions

Why separate the AI from the rules engine?
Large language models are excellent writers and unreliable accountants. You do not make an LLM better at math by training it harder; you hand the math to a calculator. Separating narration from adjudication means the AI never has to remember a hit point total or decide whether an attack landed.
Are the dice rolls in TableForge actually random?
Yes. Dice are rolled by the engine using real random number generation, not generated as text by the language model. An LLM asked to roll a d20 produces a number that looks plausible, which is not the same as being random, and over a long campaign the difference shows.
Which D&D ruleset does TableForge use?
The System Reference Document 2024 (SRD 5.2), published by Wizards of the Coast under Creative Commons Attribution 4.0.
Can the AI still get rules wrong?
The AI is not asked to get rules right. Outcomes are settled by code, and the AI receives the result and describes it. What the AI can still get wrong is narration, for example describing a scene in a way that does not quite match what happened, which is a much less damaging failure.
Does the rules engine support homebrew content?
Partly. The engine is built against the SRD, so it does not load third-party books. Custom rulings agreed with the DM, such as a subclass, a species, or a house rule, are saved as Table Rules and followed for the rest of the campaign, and the DM names items and places to fit your own setting. Uploading homebrew books is on the roadmap.
Does a rules engine make the game feel mechanical?
No, because you never interact with it directly. You type what your character does in plain language and read prose back. The engine runs underneath, and TableForge shows you the roll behind a result because players want to see the numbers.
Pricing

Choose your path.

Every plan includes full 5e rules, AI narration, scene illustrations, and complete campaign memory. The host subscribes; everyone else plays free. No hidden costs. Cancel any time.

Free
Try it before you commit
$ 0 /mo
  • 60 campaign turns
  • Everyone at your table plays free
  • Premium AI Dungeon Master narration to bring your stories to life
  • Full 5e rules & adjudication
  • Full combat system, level-ups & NPCs
  • Tactical & scene maps
  • Scene-matched background music
  • Play async or real time
  • Complete campaign memory
  • Run your own stories & worlds
  • Explore our curated campaign library
  • 1 active campaign
  • Up to 2 players per campaign
  • Up to 1 traveling NPC companion per campaign
  • Your DM remembers your house rules
Get started free
Hearthfire
The solo quest or a duo adventure
$ 14.99 /mo
  • Unlimited campaign turns
  • Only the host subscribes, guests play free
  • Premium AI Dungeon Master narration to bring your stories to life
  • Full 5e rules & adjudication
  • Full combat system, level-ups & NPCs
  • Tactical & scene maps
  • Scene-matched background music
  • Play async or real time
  • Complete campaign memory
  • Run your own stories & worlds
  • Explore our curated campaign library
  • 2 active campaigns
  • Up to 2 players per campaign
  • Up to 2 traveling NPC companions per campaign
  • Your DM remembers more house rules
  • 180 min/mo of voice narration, with a distinct voice for every NPC
Start with Hearthfire
Legendary
For the dedicated campaign
$ 39.99 /mo
  • Unlimited campaign turns
  • Only the host subscribes, guests play free
  • Premium AI Dungeon Master narration to bring your stories to life
  • Full 5e rules & adjudication
  • Full combat system, level-ups & NPCs
  • Tactical & scene maps
  • Scene-matched background music
  • Play async or real time
  • Complete campaign memory
  • Run your own stories & worlds
  • Explore our curated campaign library
  • 5 active campaigns
  • Up to 6 players per campaign
  • Up to 4 traveling NPC companions per campaign
  • Your DM remembers the most house rules
  • Custom character portraits for you and your guests
  • Match every adventure with the right Dungeon Master
  • Tell your DM where to take the story
  • 600 min/mo of voice narration, with a distinct voice for every NPC
  • Priority inference
  • 1 Included Campaign Pack Every Month
Start with Legendary

Everyone starts on a free account — pick your tier from inside the app, whenever you're ready.

From the D&D guides

All D&D guides

Keep reading