To add dice rolls to SillyTavern, install the official D&D Dice extension. It gives you the seven familiar polyhedral dice, a /roll slash command, dice macros for scripts, and an optional function tool that compatible models can call.
That solves random numbers. It does not install D&D 5e around them. A workable SillyTavern D&D setup also needs a narrator card, rule references, a character sheet, and a reliable way to track hit points, spell slots, initiative, conditions, and enemy state.
This guide shows the smallest setup that works, what each part actually guarantees, and when it is easier to use a game that already owns the mechanics. The SillyTavern details below are current as of August 14, 2026.
How to install the D&D Dice extension
SillyTavern lists D&D Dice in its official installable extension catalog. You do not need the discontinued SillyTavern Extras server for it.
- Make sure git is installed on the machine running SillyTavern. Installable extensions use git for downloads and updates.
- Open Extensions from the SillyTavern top bar.
- Choose Download Extensions & Assets.
- Load the asset list, find D&D Dice, and click Download.
- Open the extension settings and confirm that D&D Dice is enabled.
The official extension guide documents the installer and lists D&D Dice. You can also inspect or install the official D&D Dice repository directly through Extensions > Install Extension.
If /roll is unknown after installation, reload SillyTavern and confirm that the extension appears as active. Installing the old Extras project will not fix a missing D&D Dice command because current installable extensions run in the main application.
Three ways to roll dice in SillyTavern
Roll from the wand menu
Open the wand menu, choose Roll Dice, and select a die or a custom formula. This is the quickest option when you want to see a random result and decide what it means yourself.
The important limitation is visibility. The extension describes these menu rolls as user-facing results that are not included in AI prompts. The narrator does not automatically know that you rolled a 7. Put the result in your next message if it should control the fiction.
Use the /roll command
The slash command accepts standard dice formulas:
/roll 1d20
/roll 2d6+3
/roll 1d20+5
For scripting, the extension can keep the normal chat message quiet and pass the result down the STscript pipe:
/roll quiet=true 1d20 | /echo Result: {{pipe}}
SillyTavern also supports a {{roll::1d20}} macro. That is useful inside a Quick Reply or a larger script. The STscript reference covers /roll, pipes, variables, and Quick Replies.
A die formula can include a modifier, but SillyTavern does not decide which modifier is legal. You still determine whether the roll uses Strength or Dexterity, whether proficiency applies, whether advantage changes the roll, and which difficulty class or armor class the total must beat.
Let a compatible model call the dice tool
The D&D Dice extension can expose a function tool to the model. This is the closest option to telling the narrator, “Make the check,” and having an actual random result return to the conversation.
- Use a Chat Completion connection and a model that supports function calling.
- Enable Function calling in AI Response Configuration.
- Open the D&D Dice extension settings and enable Use function tool.
- Tell the narrator explicitly when it should roll instead of merely describing a roll.
Function calling is not available through ordinary Text Completion connections, and a compatible model is not guaranteed to call a tool every time. SillyTavern's function-calling documentation lists the supported connection types and current limitations.
How to add enough 5e mechanics to play
The dice extension answers “what number came up?” D&D also needs answers to “what can this character do?” and “what changed because of the result?” The following setup is deliberately small. Add more automation only after this loop is stable.
1. Make a Dungeon Master character card
Give the narrator a clear job and a clear boundary. Ask it to present scenes, portray NPCs, call for checks when outcomes are uncertain, and narrate the mechanical result you provide. Tell it not to invent die results or silently change tracked values.
Include the campaign premise and tone, but keep changing state out of the permanent character description. Hit points and spell slots become stale quickly when buried in a long prompt.
2. Put compact rules in a chat lorebook
Create a World Info file and bind it to the campaign chat. Add focused entries for the rules that will actually appear:
- Ability checks, saving throws, and advantage or disadvantage.
- Action, bonus action, reaction, movement, and concentration.
- The conditions your current characters or enemies can impose.
- The exact class features and spells on the active character sheet.
- House rules the narrator should consistently follow.
Use activation keywords so a concentration entry appears when someone casts a concentration spell, for example. Keep each entry concise because every activated rule consumes prompt context.
World Info inserts guidance into the prompt; it does not enforce that guidance. The official World Info documentation explicitly distinguishes adding relevant information from guaranteeing model behavior.
3. Store changing values in chat-local variables
STscript local variables are saved in the current chat metadata. That makes them more suitable than global variables for campaign state.
Enable the built-in Quick Replies extension and make an initialization button like this:
/setvar key=hp 24 |
/setvar key=max_hp 24 |
/setvar key=ac 15 |
/setvar key=slots_1 4 |
/echo 5e state initialized
Then make small buttons for state changes. For example, change the -5 in this script to the damage taken:
/addvar key=hp -5 |
/getvar hp |
/echo HP: {{pipe}}/{{getvar::max_hp}}
A first-level spell-slot button can use the same pattern:
/addvar key=slots_1 -1 |
/getvar slots_1 |
/echo Level 1 slots left: {{pipe}}
These scripts store and calculate values. They do not automatically prove that the damage was correct, prevent HP from dropping below zero, validate that a spell uses a first-level slot, or guarantee that the narrator sees the newest value. Display or inject a compact state block before narration when the current numbers matter.
4. Keep one combat ledger
Use one visible note or state block for:
- Initiative order and current turn.
- Current and maximum HP for every combatant.
- Armor class and temporary hit points.
- Conditions, durations, and concentration.
- Remaining actions, bonus actions, reactions, and movement.
- Spell slots and limited-use features.
- Death saves and defeated enemies.
Do not keep half of this in World Info, half in the narrator's prose, and half on a paper sheet. Pick one canonical ledger, update it after every resolved action, and tell the narrator to describe that result rather than recalculate it.
A practical turn loop
This six-step loop prevents most early drift:
- State what the character attempts.
- Decide which rule applies, including the modifier, target number, and advantage or disadvantage.
- Roll with D&D Dice.
- Put the exact formula, natural roll, modifier, total, and success or failure into the conversation.
- Apply damage, resources, conditions, and turn changes to the canonical ledger.
- Ask the narrator to describe the already-resolved outcome and continue the scene.
The separation matters. If the model chooses the check, invents the die, decides whether it succeeded, updates the sheet, and narrates the result in one response, there is no independent game state to catch a mistake.
What this setup solves and what it does not
| Part | What it gives you | What remains manual |
|---|---|---|
| D&D Dice | Real random dice formulas | Choosing the correct roll and applying its result |
| Function tool | A model can request an actual die roll | Ensuring it calls the tool and respects the outcome |
| World Info | Relevant 5e guidance in prompt context | Rule enforcement and context-budget management |
| Local variables | Persistent numbers tied to one chat | Validation, cross-field rules, and narrator visibility |
| Quick Replies | Repeatable state updates | Writing and maintaining every workflow |
| DM character card | Consistent role and style instructions | Canonical mechanics and recovery from contradictions |
This is enough for a careful player to run a satisfying campaign. It is not a hidden turnkey 5e extension. The player remains the rules engine and integration layer.
Or skip the setup
For a SillyTavern tinkerer, building the table can be part of the fun. You choose the model, write the scripts, inspect the prompt, and own every file. No hosted D&D game offers the same control.
The cost is that every new mechanic becomes another piece to design and maintain. Sneak Attack needs legal timing and dice. Concentration needs damage triggers and a saving throw. Death saves need counters and reset rules. Multiplayer needs identity, permissions, shared state, and event delivery. A model failure midway through an update needs recovery logic.
TableForge takes the opposite trade. The AI handles narration, while programmatic systems own supported dice, character resources, conditions, and combat state. Character sheets update from the same state the narrator receives. Multiple people can join the same browser campaign without sharing a SillyTavern server or appointing one player to relay every action.
That means less model control and no general-purpose roleplay frontend. It also means you can skip the card, lorebook, variables, scripts, ledger, and correction loop. How the TableForge rules engine works explains the architecture, and the campaign walkthrough shows the player experience.
Where SillyTavern still wins
Choose SillyTavern when model choice, local inference, privacy, prompt control, unusual content, and extensibility are the point. It can connect to local or cloud backends, and its character-card and lorebook ecosystem supports roleplay far beyond D&D.
Choose TableForge when the desired outcome is a shared D&D 5e campaign rather than a system-building project. You give up model and prompt access in exchange for a table where supported mechanics already have an owner.
| SillyTavern D&D setup | TableForge | |
|---|---|---|
| Best for | Tinkerers who want control over the stack | Players who want to begin a campaign |
| Dice | Official extension, configured by the user | Integrated into game resolution |
| 5e rules | Lorebook, scripts, and player rulings | Programmatic supported systems |
| Character state | Variables, notes, or another sheet | Canonical in-app character sheet |
| Combat | Player-maintained ledger and narration | Integrated initiative and combat state |
| Models | Bring local or cloud models | Managed by TableForge |
| Human multiplayer | Requires networking and a shared workflow | Up to six players, real time or async |
| Privacy | Can run entirely locally | Hosted service |
If you want to keep building, the guide to running your own AI dungeon master goes deeper into local inference and infrastructure. If you want to test the other trade, TableForge's free tier covers roughly one session.