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.
This is amazing
100% agree with you. It often feels like you need an advanced degree in coding to make anything function.
It doesn't help that this is the first helpful thing I've seen the staff post about how to homebrew. Subclasses are the worst. I've spent hours trying to get a single feature of a subclass to function & usually have to go copying the existing subclasses just to see how they were getting the features to work in the system. They even don't have a help section on this website to even explain the bare basics of creating homebrew. For a system that is so not intuitive, the support for it is extremely lacking. Almost like they don't want you creating homebrew . . .
I'm just baffled that this didn't exist until now. D&D Beyond's tools need in-depth guides and you should (or must, even) make a whole helps/guides and link them from each tool.
This is the kind of advice that new players need. Good work!
Can’t believe it took this long to be made.
Great job finally getting this done. Much needed. Looks great!
Kudos to the D&D Beyond Mods for creating informative articles! I especially appreciate efforts to engage the community.
In spirit to #2 and #5 here, I suggest, to the mod team, referencing exceptional community resources like @IamSposta's and others insightful threads. Doing so would:
Ultimately, by working together, the D&D Beyond Mod team and the community can create the best possible resources for everyone.
Thanks to @IamSposta, Davyd, and everyone else who contributes their knowledge and passion to the forums!
This article is much needed!!
This is something that will help. Seems like it could be simplified though. Maybe I'm being picky.
We have some homebrew articles already published and more we want to. There are however only so many hours in the day and so much D&D to write about. But believe me, we want to have a solid, well written tutorial for each of the homebrew options. It's just no small task.
That is the very reason we have the comments section; the community can share their wisdom and add to these articles.
Always looking for feedback on how you think these articles could be improved! The goal is to be as clear, informative, and accessible as possible!
Am I the only one who is seeing the same image for both the before and after images on "Automatic rollable dice blocks"? I checked the link, Firefox says both are "rollable-dice-block-before.jpg".
Would you accept well written articles from community members?
I've raised this, there are two similar looking screenshots and it seems the same one get uploaded twice.
As far as I'm aware, that's not something we do.
How about automating this process with a fillable field that generates the rollable field for us.
I don't disagree with you, but it's also the most complete implementation of that concept on any similar platform. Homebrewing stuff on Roll20 is 10x harder, requires more work, and for Player Options, requires your players to make choices outside of the framework of the game system and then either add them themselves (which is error prone) or ask you to add them (which is more work).
The biggest problem is - it's hard to do this. It's hard to have a system that can even support the amount of complexity and specificity that DnDBeyond can, and it's much harder to turn that content management experience (because that's what it is) into something that doesn't feel like programming, to some degree. In my professional life, I've experimented with ways to do this for end users, and it always winds up being just a little bit not quite what you need, while also being a ton of work to implement. Like, if you've ever tried to set up a List or Library in certain Microsoft-based Enterprise Content Management Systems, it's actually kind of complicated and involved. Character features are even more involved, with even more relationships. I tried to write a wizard that could take statements about relationships in such a system and build the template of that system for the user, but it was never quite smart enough.
I will say, I have experimented with using an Open AI model to attempt to parse common Homebrew formatting and turn it into an object that DnDBeyond could theoretically understand, and, I gotta say, it's really hard. The biggest problem is the lack of commonality among formatting - there isn't really a standard way of implementing anything. For example, if you (as I did) wanted to implement Cunning Strikes from the One DnD playtest for your Rogue players, you have to come up with a way of making that available to them that is both functional for DnDBeyond and makes any kind of sense for them.
What I wound up doing initially was adding it to a Homebrew copy of the Rogue Subclass as an Additional Feature (which makes it not complain about it being a level 5 feature), with each option as a separate generic attack action that scaled with levels. Seeing the output of what I ultimately did, I went back and tried to train a model to be able to do something similar with a couple different versions of the formatting. I got pretty close, though, I'll admit, I didn't try super hard and it was still a LOT of model training to be able to get as close as I did.
Then Brutal Strikes came out and I thought, "Oh, great, that's a great example of testing my model to see if it can figure out what the output would need to be." And it failed abysmally. The two features aren't particularly different, from a practical perspective, but they are really, really different from an ML perspective simply because their formatting is wildly different in important ways - Brutal Strikes lacks a cost element, which are common among all Cunning Strikes options. I could not get it to parse the bonus d10 as the equivalent of a Sneak Attack value it had to reference and/or look up from an API, which means that the Brutal Strikes options all did no additional damage. Plus, it needed the full context of the Barbarian class to realize that the Brutal Strikes feature should use Strength as its Ability Score for calculating the Saving Throw.
So, yeah, you're not wrong. But to enable the amount of flexibility and complexity that the current system has, the UI has to be kind of complicated. I'm sure their internal tools are more powerful but even uglier to look at.
THAT SAID, @dndbeyond, I wouldn't hate if you exposed a little more of the Homebrew API so I could make an experience that had a little less clicking back and forth and fewer page form submissions and server roundtrips, maybe even a preview option for how it would look on a generic character sheet. It's the testing and reloading that is the most egregious pain point for me. But maybe I expect too much of my homebrew stuff. I mean, really, what I'm asking for is the Swagger endpoint (or whatever they call it now) for all the things the forms are getting and posting. I'll handle translating that stuff within my own client context into a UX that I prefer. Even if it can't actually handle batch requests, I can keep drafts locally and then fake-batch them back to the server by sequentially bundling them. I know 3rd party tools are kind of a sticky wicket for you guys, but feels like there's an opportunity there. And I don't mean like, Avrae integrations. I'm not trying to extend this on Discord. Honestly, I could sniff all those out if I spent the time and unpacked all the requests, but... yeah. No.
(To say nothing of the idea that you could better integrate DM's Guild content and even "Premium Homebrew"-like products then. Imagine a world where you guys let users sell "Premium Homebrew" to each other through the site you take 20% off the top. That's printin' money.)
It would be really nice if these rollable dice blocks also appeared in the Extras menu of a PC's character sheet. Like for use with a Rangers Beast Companion, or a Druids Wildshape, or even a wizards elemental summon. I'm tired of having to add custom actions to character sheets so my players can roll for their companions/wildshapes lmao
You obviously didn’t read to the end of the article.
Much appreciated. I’ve trying to figure this out for ages.
I have long had a wish for a sort of "a la carte" DnD word snippets. I know I seek out a "type" of action listed a few times and have to go find an example to get the verbiage right (or right enough to avoid slowing the table!).
It also just occurred to me if I can't find one of your monsters in the "create from template" feature I could recreate a local copy in my private library and template out variations from there. That's a feature use every chance I get
Fantastic! Thanks for this.
There is, but be warned that in doing so you can't ever choose NOT to roll with advantage/disadvantage (what will happen instead is something akin to rolling "super advantage"/"super disadvantage", i.e. 3 dice, keep the higher/lower).
Instead of having;
"Generic Attack Name. Melee Weapon Attack:[rollable ]+X;{"diceNotation":"1d20+X","rollType":"to hit","rollAction":"Generic Attack Name"}[/rollable ]..."
change it to;
"Generic Attack Name. Melee Weapon Attack:[rollable ]+X;{"diceNotation":"2d20kh1+X","rollType":"to hit","rollAction":"Generic Attack Name"}[/rollable ]..." for permanent advantage
or;
"Generic Attack Name. Melee Weapon Attack:[rollable ]+X;{"diceNotation":"2d20kl1+X","rollType":"to hit","rollAction":"Generic Attack Name"}[/rollable ]..." for permanent disadvantage.
I made a comment with more detail about 18 months ago on another post;
https://www.dndbeyond.com/forums/dungeons-dragons-discussion/homebrew-house-rules/106856-adding-rollable-tags-to-your-homebrew-monsters-for?comment=53