When you use the D&D Beyond Encounters tool, you'll notice that monster stat blocks have buttons you can click to easily roll for attacks, damage, saving throws, and ability checks. These fancy buttons are powered by something that looks more like eldritch script—or worse, code!
In this tutorial, we'll explain how dice blocks work, how to set them up yourself, and a few useful shortcuts you can use.
- What Is the Encounters Tool?
- What Is a Rollable Dice Block?
- Components of a Rollable Dice Block
- Attack/Spell Blocks
- Damage/Healing
- Recharge
- Generic Roll
- Automatic Rollable Dice Blocks
What Is the Encounters Tool?
Encounters is two powerful tools in one package available to D&D Beyond users. It combines a combat difficulty calculator and an initiative tracker, allowing you to take an encounter from an idea to a thrilling fight in one place.
The first part of the tool automates the encounter building rules found in the 2014 Dungeon Master's Guide, saving you from having to calculate XP budgets and difficulty thresholds. You can pull in all the monsters you have access to, including homebrew ones.
Once you've designed your perfectly deadly encounter, you can hit "Run" and start rolling those dice.
But speaking of homebrew and rolling dice, you may wonder how to add those handy dice buttons. Well, it's all down to rollable dice blocks, the secret behind making your custom monsters roll-ready.
What Is a Rollable Dice Block?
A rollable dice block is a special bit of text that you add to a monster stat block. Outside of the encounter builder and initiative tracker built into Encounters, you won't even know it's there.
But when you load a creature up in either of those tools, the rollable dice block transforms into a clickable button that lets you roll dice directly from the stat block. When you click the button, it not only rolls the associated dice and adds any bonuses, but the result is displayed in the Game Log along with the ability's name, what type of roll it is, and any associated damage types.
There are four types of rollable dice blocks you can find in a monster stat block:
- Attack/Spell
- Damage/Healing
- Recharge
- Generic Roll
This tutorial will cover each rollable dice block type and how you set it up. But first, let's cover some of the fundamental elements of a rollable dice block.
Components of a Rollable Dice Block
All rollable dice blocks are wrapped in rollable tags, which means you need [rollable] at the start and at the end [/rollable]. This tells the site that what you're writing needs to be handled in a special way. Whatever you write immediately after the [rollable] tag, followed by a semicolon, will be displayed on your monster's stat block. For example, writing:
[rollable]+4;
Will be displayed as "+4" on the stat block as a button when using the Encounters tool. Outside of the Encounters tool, this will appear as plain text.
The next bit is the fancy part: the dice notation. After the semicolon of your button text, you put a pair of curly brackets containing "diceNotation:"
[rollable]+4;{“diceNotation”:}
After the colon is where the magic happens. You tell the site what dice to roll, what modifiers to apply, and what information to display. A comma will separate each element and consist of an element category in quotation marks, a colon, and then the type.
These are the following dice element categories:
- "diceNotation:" The actual dice and modifiers that will be rolled when you click the button.
- "rollType:" What type of dice roll is being made, such as a spell, damage, recharge, or general roll.
- "rollAction:" The name of the ability being rolled, such as the name of the attack or damage.
- "rollDamageType:" For blocks that have damage, this will list the damage type for the game log.
Attack/Spell Blocks
Attack and Spell Attack blocks are used whenever you want a clickable attack roll. When writing an attack or spell attack dice block, your dice notation will always be 1d20 plus a number, which will be the to-hit bonus.
Let's start making a weapon attack for our monster, the pancake elemental:
[rollable]+4;{"diceNotation":"1d20+4",
Note the parts in bold. They should be the same. Also, don't forget to use colons and commas in the right places to tell the site where elements begin and end.
Next, we want to tell the site what type of roll this is. For attack rolls, it's "to hit" and for spells, it's "spell". Let's take the above example and make it an attack roll:
[rollable]+4;{"diceNotation": "1d20+4", "rollType": "to hit",
Finally, we want to set the name of this dice block, which, in this case, is the attack's name. Let's say it's for an attack called Batter Flip; we'll want to use "rollAction" followed by the name:
[rollable]+4;{"diceNotation": "1d20+4", "rollType": "to hit", "rollAction": "Batter Flip"}
That's almost everything. The last thing we need to do is add the closing [/rollable] tag like this:
[rollable]+4;{"diceNotation": "1d20+4", "rollType": "to hit", "rollAction": "Batter Flip"}[/rollable]
Unlike all the other elements, we don't need a comma after the rollAction because we're ending the dice block. It's important to check that all your colons and commas are in the right place because dice blocks are a stickler for precision.
If you wanted to write a spell attack block, it'd look pretty much the same, except the rollType would be "spell" instead:
[rollable]+3;{"diceNotation": "1d20+3", "rollType": "spell", "rollAction": "Big Spell"}[/rollable]
Damage/Healing
You've got your to-hit roll sorted, so now you need damage rolls. These are very similar, with only one additional element, "rollDamageType." We'll follow the same steps as above, first defining the opening rollable tag and the button. We want Batter Flip to deal 2d8+2 fire damage, so that's what we'll put after the rollable tag:
[rollable](2d8 + 2);
Note that the dice block is written inside a pair of parentheses. When writing out damage or healing in D&D, you write the average first, then the dice roll in parentheses. We only want the dice roll to be a button, so that's the part we put within the rollable tag.
Next up, we want to write out the diceNotation, which follows the same format as for to-hit rolls. Just make sure it matches what you wrote for the button:
[rollable](2d8 + 2);{"diceNotation":"2d8+2",
Now we add the rollType, which in this case is damage, and the rollAction name to display:
[rollable](2d8 + 2);{"diceNotation": "2d8+2", "rollType": "damage", "rollAction": "Batter Flip",
This is where we add the new element unique to damage rolls, rollDamageType. This defines what type of damage the roll is, which will be displayed in the Game Log. In this case, we're going with fire damage:
[rollable](2d8 + 2);{"diceNotation": "2d8+2", "rollType": "damage", "rollAction": "Batter Flip", "rollDamageType": "fire"
That is our almost complete damage dice block. We just need to close the rollable tag by adding the closing curly brace and [/rollable]:
[rollable](2d8 + 2);{"diceNotation": "2d8+2", "rollType": "damage", "rollAction": "Batter Flip", "rollDamageType": "fire"}[/rollable]
If you wanted instead to make a dice block for a healing roll, you change the rollType from "damage" to "heal" and remove the rollDamageType, like this:
[rollable](2d4);{"diceNotation": "2d4", "rollType": "heal", "rollAction": "Smol Heal"}[/rollable]
Recharge
Some monsters, such as the legendary ancient red dragon, feature abilities that recharge at the start of their turn on a roll of a d6. These blocks are even simpler than the previous examples. The first element is the button immediately after the opening rollable tag:
[rollable](Recharge 6);
The recharge value may vary, from 4-6 to just 6, but this doesn't actually change the dice block itself. Once you've got your button text defined, the recharge dice block follows a familiar structure:
[rollable](Recharge 6);{"diceNotation": "1d6", "rollType": "recharge", "rollAction": "Breath Weapon"}[/rollable]
The important elements are highlighted in bold; the diceNotation is always 1d6, and the rollType is "recharge."
Generic Roll
Finally, here is the structure for just making a generic, multipurpose dice roll block, such as for determining a random effect on a table:
[rollable]10d20 + 23;{"diceNotation": "10d20 + 23", "rollType": "roll", "rollAction": "Big Roll"}[/rollable]
You'll see that it's very simple compared to the previous examples, with the only unique element being that its rollType is "roll", which is fairly self-explanatory.
Automatic Rollable Dice Blocks
If all this seems a little too much like wizardry to you, don't worry, as the D&D Beyond homebrew tools have an unseen servant waiting to lend you a hand. If you go into the homebrew tools and look at the toolbar in any text input field, you'll see a small calculator-looking icon at the far end of the toolbar; this is the automatic rollable dice block tool.
If you highlight an attack action, recharge ability, or other similar feature where you'd like to add a dice block and click that button, a dialogue box will appear.
Once that dialogue appears, click "Add Rollable Dice Blocks," and you'll see the text converted automatically to a dice block!
It's important to keep in mind that this tool will do its best to correctly format the dice block for you, but it may not properly register every element every time. As such, it's useful to understand how the dice blocks work so you can fix an error yourself.
Get Rolling!
With D&D Beyond's suite of tools, prepping D&D has never been easier. Whether you're homebrewing monsters using the creation tools, planning combat using Encounters, or running the game through Maps, we're here to take work off your plate so you can focus on the fun!
Davyd is a moderator for D&D Beyond. A Dungeon Master of over fifteen years, he enjoys Marvel movies, writing, and of course running D&D for his friends and family, including his daughter Willow (well, one day). The three of them live with their two cats Asker and Khatleesi in south of England.
My understanding is that when Wizards bought dndbeyond, they bought a system with a lot of limitations. I'm assuming when they have more time and resources to shuffle over to software development, they'll make it more intuitive and user friendly, but for now, it's workarounds after increasingly-frustrating workaround.
Don't get me wrong I love D&D Beyond. So much of my frustration comes from having all the pieces there and either in beta, or 80% fleshed out, and hearing that WOTC is focusing on a 3D VVT and then laying off staff. Same s*** you see in a lot of places, executive leadership not understanding their product or base and pushing the wrong thing.
Rumor is Hasboro is looking to offload D&D.
Considering that D&D is one of its biggest money makers, I highly doubt it.
I haven't been able to get it to work. Could you simply publish a sample completed line and we can swap the numbers out and keep the main text?
Being a 50-year veteran of programming in everything from basic, c, c#, SQL, visual basic, pascal, java, and even cobol, as well as using html, xml, ccs, javascript, and various other languages, I find it very easy to use the coding layout dndbeyond offers for homebrew. I know those less familiar with such things could have issues and it can get complicated sometimes, but giving us access to the special coding style they use is MUCH more flexible for us and easier for them than trying to provide us buttons to handle every linkage, highlight, or reference automatically. Yes, use the buttons they provide when they are convenient, but that coding </> button is the best thing I've found in some many years for a site allowing players to make their own content.
Not only is this page one of my bookmarks on dndbeyond's forums, another I love greatly is the one about how to add tooltips. Using my investigative skills, I also found several other things that can make tooltips and links much more useful. Forgive me if I'm giving away any trademark secrets or internal code with this, but it just works so well I thought I'd share it.
To link to other homebrew stuff
Open the completed page of the homebrew item. Copy the full URL from the browser. In your new homebrew, type the name of the other homebrew thing in the new homebrew thing, highlight the entire name, and click on the add link button (hourglass tilted sideways), then paste the copied link into the URL section.
This uses a public item I created, so you may be able to actually see it work, I'm not sure, but it should work for you own stuff, published or not. Anyway, to include a pop-up tooltip when linking to other homebrewed items you have to edit the source code of the link. To do this click the </> option in the editor and change the link you previously added, see example below:
Assuming you properly linked Augury Dice you will see this when you open the source editor:
To make it have a functional tooltip, change it as detailed below (colors for explanation only):
<a class="tooltip-hover spell-tooltip" href="https://www.dndbeyond.com/magic-items/2823573-augury-dice" data-tooltip-href="https://www.dndbeyond.com/magic-items/2823573-tooltip?disable-webm=1">Augury Dice</a>
Note: the green text is required AS IS to include the dndbeyond html class handler for links, then you keep the full link on the href so that the link actually works and takes you to the referenced item, then add the blue component to tell it you want a tooltip duplicating most of the copied link, but notice in the red text you have to change the link to the item so that it only uses its reference number and special notation dndbeyond requires for tooltips.
I long since covered Homebrew tooltips, and a great many other things in the Homebrewers’ “How-To” FAQ: (https://www.dndbeyond.com/forums/dungeons-dragons-discussion/homebrew-house-rules/131411-a-homebrewers-how-to-faq). You should check it out, you might find more interesting stuff in there too.
Yes, I have that one bookmarked, too. Love your posts IamSposta
Aww, shucks. Why thank you.
Any one able to help?
Anyone able to help?
Nice of them to finally get around to publishing this.
This is great, but can one get one of the roll able tables, ie my attack automatically triggers a roll on the wildmagic table. Is it possible to add a a link so that it it will roll the 1d100 and tell me the result?
If you use any Official Monster Stat Block as a template, it'll come with rollable blocks that you can modify, but here's an example from a modified / homebrew Axe Beak I had made (remove the _underscores_ and it should work for you):
Beak. Melee Weapon Attack: [rollable_]+3;{"diceNotation":"1d20+3","rollType":"to hit","rollAction":"Beak"}[/rollable_] to hit, reach 5 ft., one target. Hit: 4 [rollable_](1d6 + 1);{"diceNotation":"1d6+1","rollType":"damage","rollAction":"Beak","rollDamageType":"slashing"}[/rollable_] slashing damage.
Try this (without the _underscores_):
Claw. Melee Weapon Attack. [rollable_]+5;{"diceNotation":"1d20+5","rollType":"to hit","rollAction":"Claw"}[/rollable_] to hit, reach 5ft., one target. Hit: 8 [rollable_](2d4 + 3);{"diceNotation":"2d4+3","rollType":"damage","rollAction":"Claw","rollDamageType":"slashing"}[/rollable_] slashing damage, or Hit: 8 [rollable_](2d4 + 3);{"diceNotation":"2d4+3","rollType":"damage","rollAction":"Claw","rollDamageType":"bludgeoning"}[/rollable_] bludgeoning damage, or Hit: 8 [rollable_](2d4 + 3);{"diceNotation":"2d4+3","rollType":"damage","rollAction":"Claws","rollDamageType":"piercing"}[/rollable_] piercing damage.
Bite. Melee Weapon Attack. [rollable_]+5;{"diceNotation":"1d20+5","rollType":"to hit","rollAction":"Bite"}[/rollable_] to hit, reach 5ft., one target. Hit: 7 [rollable_](1d8 + 3);{"diceNotation":"1d8+3","rollType":"damage","rollAction":"Bite","rollDamageType":"piercing"}[/rollable_] piercing damage.
I've removed the [code][/code] because it's unnecessary if you paste this directly into the "Actions Description". I've also removed all the spaces within the rollable text, though that's likely not a necessary step. Also, damage type doesn't (yet) matter for DnDBeyond as you don't choose a single target, so your "Claw" attack is needlessly complicated, and would achieve the same thing if it were written like below:
Claw. Melee Weapon Attack. [rollable_]+5;{"diceNotation":"1d20+5","rollType":"to hit","rollAction":"Claw"}[/rollable_] to hit, reach 5ft., one target. Hit: 8 [rollable_](2d4 + 3);{"diceNotation":"2d4+3","rollType":"damage","rollAction":"Claw","rollDamageType":"slashing"}[/rollable_] slashing damage. This slashing damage can be replaced with bludgeoning or piercing damage.
The only reason to have different rollers for the different damage types you want is if they all had different damage dice. Like, if slashing was 3d4, piercing was 2d6 and bludgeoning was 1d12.
These Rollable Dice Blocks are for Homebrew Monsters only, not Player Character character sheets, so if you're looking for a 1d100 roll on the character sheet, you'll need to roll the generic dice roller on the bottom left of the screen and look up the result.
If you are talking about a Monster automatically triggering a Wild Magic Surge, then you can add a 1d100 roll to the Stat Block (using the snippet below), but it'll just give you the numerical result, not the equivalent text from the Wild Magic Table. You'll still need to look up the result on the Wild Magic table to see what the effect is.
1d100 Rollable (remove the _underscores_): [rollable_]1d100;{"diceNotation":"1d100","rollType":"roll"}[/rollable_]
Can this be done for homebrew items too?
No, only monster stat blocks support this and the function only operates within the combat tracker and encounter builder.
For dice rolls on character sheets, you can use the homebrew tools with modifiers that add actions (for feats, race features and subclass features) or custom actions.
none of this works, I'm not sure why but every time input in the code for the buttons to appear the only thing that appears in the encounter window is the actual code and no the button. then i try to use the automatic rollable dice block tool and it just deletes everything from the text box. this needs to be easier to use, i shouldnt have to be a software developer to add a button to a game.
Thank you. In the end got around it by creating the rollable table in foundrtyvttt
One of the main reasons I don't use D&D Beyond more is how difficult it is to add homebrew. Most other 3rd party systems I use will just automatically detect dice notations and make them rollable.
Why has the "My Encounters" tool been in beta for so long? It's been 3 + years now, hasn't it?
Is there a way to add rollable dice blocks to homebrew weapons?