In roll20, you define a dice roll through the dice expression – you express the dice roll. As described earlier, you start with /roll
or enclose in inline roll brackets [[ ]]
– the rest is the dice expression.
You often have a dice code, like 2d6
, and add a lot of special stuff immediately after that with no spaces. So, for instance, you might have 7d6sdkh2
. That tells you 7 dice with 6 sides - sort descending - keep highest 2 dice
. So you roll 7d6, keep the 2 highest, and display the dice from highest to lowest. It’s very convenient that Roll20 usually takes the initial letters in the expression, so you can remember what it means.
By default, when you roll a bunch of dice, roll20 adds tem up and reports the total. But if you include a >
or <
character, it instead counts how many dice qualify for that target. You can use this to count successes or failures.
Note that this follows standard roll20 comparison rules, so >
means “equal or above”.
So 6d6>5
tells us to count how many dice roll 5 or higher (5 or 6).
You can count successes and failures on the same roll (and that leads to a special trick). Failures must be defined with the f
character, and reduce success. So you might roll 6d6>5f<2
.
You might want a visual indicator of whether you rolled a critical or fumble. Luckily, Roll20 does this automatically. If you roll the max on your die, it’s treated as a critical (and coloured green), and a minimum roll is fumble (and coloured red).
But your system might calculate these differently, so you can define them with your own codes – cs for critical success and cf for critical failure. You can define both. For instance 1d10cs1cf10
for a die where they are reversed. Note that you can’t use c and f alone, it must be cs
and cf
.
You can also use formulas, – say critical occurs on 18-20, you could type 1d20cs>18
.
Partial successes occur when a roll is both a critical success an fumble. For instance, on a roll of 1d6cs>3cf<4 if you rolled 3 or 4 it is both – and coloured blue.
Roll20 just looks at one die. So if in your system, you roll 3d6, and a critical occurs when all 3 roll a 1, there’s no direct way to represent this (without a script). The critical code described here doesn’t work.
There are times you want to see the order of the dice. It’s very handy sometimes to see the highest dice rolled. Just add sa
or sd
for sorting ascending (lowest to high) or descending (high to low).
You can just enter the code s
, and ascending is assumed. eg. 7d6s
.
One of the most common types of rolls in recent years is to roll extra dice and keep only a certain amount (D&D’s advantage for instance asks you to roll 1 extra dice, and keep all but one).
You might want to keep only the worst dice – disadvantage asks you to roll one extra dice, but keep all dice but that one.
You can represent these using kh
or kl
(keep high or keep low) followed by the number of dice. Lets say you roll 1d20 with advantage. You could roll that as 2d20kh1
. Roll two 2d1-, but keep only the highest one.
You can also drop
instead of keep
ing. Write that as 2d20dl1
– roll two 2d20 and drop the lowest. Drop is the sdame kind of operation as keep, but reversed.
Many systems have a method where you reroll and add if you roll the maximum. This is called exploding. This dice don’t literally expode!
So if you have a roll like 6d10 exploding, you’d roll 6 10-sided dice, and if any rolled 10, you’d roll again and add. Roll20 does extra things, but is also more limited. There are three types of exploding dice.

- Exploding Dice (!): if the dice code is marked with an ! then an extra die is rolled for each maximum. There are two gotchas here: the extra dice are just normal dice, and are included in the total. But you can also change the number on which explodes happen. 6d6!5 means your explode on rolls of 5, not on 6. and 6d6<2 means you explode on 1 or 2.
- Penetrating dice (!!): Mark a roll with two asterisks, like 6d6!! sand the extra dice are added to the original dice. So that roll will never show more than 6 dice, but some might have totals exceeding 8. This is probably what you expect.
- Compounding Roll (!p): Apparently created for Hackmaster, this is useless and you should probably never use it. This works like exploding rolls but each extra die has -1 subtracted from it. though each extra die is treated as an extra die, not added to the total, and there’s no way to tell which those dice are!
Many game systems have specific situations where a die is rerolled. There are two ways to do this: the die is rerolled as many times as necessary to qualify for a condition, or the die is rerolled exactly once.
- Reroll (r): You can specify a single number or multiple conditions, like
8d6r2r4r>6
. If no number is stated, like5d6r
, then rerolls occur on the minimum roll. - Reroll Once (ro): this is written exactly like reroll, expect dice are rerolled only once. Unlike reroll, you can include the
ro
code only once, and cannot mixr
andro
.

Here is a complex example of rerolls. Notice how the dice that have been rerolled are greyed out – they are not included in the total.

If you type mt
, the number of matches will be displayed, and the number of matches will be reported.
It’s a good idea to sort these dice, so you can see the matches next to each other.

Just using m,
not mt
, will show you matches and total.
If you include a number after m or mt it shows only that number of mathes or greater,. So if you have 6d6m3 it will show if you get any matches of 3 dice or more, but wont show any pairs.

You can include multiple codes in a single string, like /r 6d6skh2!!
.

The order does sometimes matter (but often doesn’t), and I leave that to your trial and error.
You can make very complicated expressions and (not shown here) can include calculations within the expression.

Since codes can be very complex, it’s very easy to create code that doesn’t work. Roll20 shows errors in various ways, but one sign is when the code produced just matches the number of dice rolled.
Here we have code using the code fs
which doesn’t exist, so the display shows no dice roll and shows just the number of dice rolled.
Changes To A Roll
Since a roll is being sent to chat, you can do anything with it that you can with text that is being sent to chat. That opens up possibilities, but most options here likely need more explanation (more articles?).

You can include extra text after the roll, or around the roll is using inline roll brackets (the second example in the image).
Inline rolls are great way to incorporate dice rolls with chat.

Any text inside single square brackets is ignored by the roll, and treated as a label.


If its added to an inline roll, it is treated as part of the roll and not displayed.
But you can still see them if you hover over the roll (here, you can see what is shown in chat (blue background), what was typed (white background), and the tooltip when you hover over the roll (black background).
Like rollable Tables, roll templates need their own article. But for now, understand they are an awesome addition to character sheets. Each character sheet might have extra roll templates added, but every campaign has access to the default roll template.
When using roll templates, you must express any rolls as inline rolls. You can not start a roll with /roll, /r
, or /gmroll
. The start of a line containing a roll template must being with &{template:name-of-template}
.
Each roll template has keys and values enclosed in double curly brackets, like {{strength=[[4d6kh3]] }} {{dexterity=[[4d6kh3]] }}
. The key is before the = sign, and is a label used by the template to identify the value which it might use in various ways (usually for formatting).
There’s a lot more that could be said about roll templates, and I probably will one day, but for now check out the wiki page.
Rollable Tables are an interesting feature that I’ll have to make a rant about some time (apparently I already have). Most features in Roll20 I consider good, if not excellent, but rollable tables are not fit for purpose – I honestly don’t know how they were ever considered good enough to roll out. However, if you have very specific goals, they can be used. For some things.
You can use Rollable tables in lieu of dice. First, create the table and name it. Then you can access that pseudo-dice roll with the code 1t[table-name]
. The 1t there is how many rolls – 3t[table-name]
would roll 3 times (though for inline rolls, you can only see the first).
Lets say you build a table with 3d6 odds – you can then roll 1t[3d6], and because this is one die, criticals and fumbles will be recorded properly. This is way to get around the fact that you cant do certain rolls in Roll20.
You’ll probably find more on the Rollable Table page on the wiki.
The Turn Tracker is handy tool during initiative – it can show people who have a token and the order of their actions. You can add your own token to this display using dice rolls. Do this just by adding &{tracker}
to the end of any roll.
In many games, characters have an initiative roll macro which is just one of their rolls with the above addition. For instance /roll 1d20+@{selected|dexterity} [Initiative Roll] &{tracker}
.
There is more that you can do with the Turn Tracker, but that’s all you need to know here. Just make sure you always have a Token selected when making an Initiative Roll.
Often you want to present players with a choice, like should they use their str, dex, or con modifier for this roll. Or maybe its a flat number, like this axe is +1, +2, or +3 vs different opponents. You can give a query, like this:
?{query-name|choice 1|choice 2|choice 3}
Whatever is listed as the choice is used in the dice roll, and sometimes you want a visible label so the PCs can make a decision easily, so you can use a comma to split a label and the actual number used. For example:
1d20+ ?{Strength,@{str-mod}|Dexterity,@{dex-mod}|Constitution,@{con-mod} }
Whenever you think about nesting choices within choices (queries within queries), the code gets very complicated very fast, and that’s the time to look into Chat Menus.
If using inline rolls (those enclosed by double square brackets), you can display the roll in another location.
Simply count the inline rolls (from left to right, and innermost to outer), and put that number inside $[[ ]]
, and you have that Reusing Roll. Since it was made by programmers, start counting at 0, not 1.
@{template:default} {{first=[[d20+3]] }} {{showfirst=$[[0]] }}
There’s a lot ore to be said about Reusing Rolls, another time.
But remember this: the quantity being displayed here looks like a number, but it is not – it is an “object”, and you cannot perform arithmetic with it.
This is one important skill everyone should possess. It’s handy to be able to look at a previous roll. Put your mouse pointer in the chat box (where you’d type), and press the up arrow.
The above step will show the previous chat entry, and you can keep pressing the up arrow to find all previous rolls.
This method only shows your last chat entries, but you can see the text of any button from the character sheet, or any macro you have triggered, in this way. When you are trying to figure out the code for something, just click a button that already does that and examine the code.
Group Rolls
When you enclose a roll in curly brackets { } it is a group roll. You can include multiple rolls here. You could use /r {2d8, 3d6}
– note the comma separating them.

This will by default just add the rolls together, so you’ll want to use successes, like /r {2d8, 3d6}>9
. Each separate comma-separated roll is treated distinctly, and can be its own complete roll.

Since each roll can be its own distinct roll, you can make each one its own dice expression.

A very common use of Grouped Rolls is to handle multiple attackers. Say you have 5 attackers, all with +5 attack, and you want to see how many hit the AC 18 warrior, you can do this.
Because roll20 doesn’t include iteration, you need to type each one out, which can be painful if you have, say, 20 attackers, but here we see 2 of them hit.
You cannot have rolls and fixed numbers in the same group – it must be all one of the other. You can convert a fixed number to a roll just by adding a zero die to it, I often use +0d0
. This adds nothing to the number, but sine a fictitious die is involved, it is treated as a roll.
Stupid Tricks
There is a thread on the Roll20 forums that collects advanced tricks people have devised. That used to be called the Stupid Tricks thread, hence the title here.