Dice Formulas
At the heart of every roll is a roll formula. Below is an overview of all the possible dice notations and modifiers.
First, it's important to note that you can write roll formulas for dice unsupported by the 3D dice. So you can create a roll formula like “1d1” or “2d1000” and it will roll that for you and return the result, you just won’t see any 3D dice.
Operators
Roll formulas support most math operators, like plus (+), minus (-), multiplication (*), division (/) and exponent (**). Therefore, rolling will roll the die, take the result and divide it by 5.
Operators can also string multiple dice together: will roll a 20-sided die, a 10-sided die and a 3-sided die (you will only see the first two roll across your screen).
Modifiers Widget
A Modifier Widget can be used instead of a numerical value within a formula. Start by opening a bracket, type the name of a Modifier Widget from within the same Note or Character Sheet and it will appear as an option to add, then close the bracket
Example:
Dice Number Modifier = 2, Dice Size Modifier = 12
Roll Button Formula = (Dice Number)d(Dice Size)
This will then roll 2 d12
Comparisons
To compare a dice roll to some value you can use comparison notations like greater than or equal to (>), less than or equal to (<) or equals (=). Comparison rolls will always return a 0 if false and 1 if true.
Rolling will roll the 100-sided die (a 1d10 and a percentile die) and compare the result with the value 75. If it is lower than or equal to 75 then it will return a 1 else a 0.
This works for multiple dice as well. In systems that counts numbers of successes, this is especially useful. For example if the target is 5 or higher on a d6 from a pool of 10d6s the roll formula would look like this: and the returned value will be the number of dice that roll a 5 or 6.
Dropping and keeping
Dropping or keeping dice work very similarly. They will allow you to specify if you want to keep/drop the highest or lowest dice and how many to keep/drop.
The notations are
dh = drop highest
dl = drop lowest
kh = keep highest
kl = keep lowest
For example, the roll formula will roll 9 times 6-sided dice and keep the three highest rolls and add them up. So if the dice roll like 1, 4, 3, 1, 1, 3, 5, 2, 2 then you would keep the 5, 4, and 3 for a total of 12.
Exploding, compounding and penetrating dice
Our 3D dice don't currently support exploding, compounding and penetrating dice. The dice that should explode are not re-rolled visually, however they are accounted for in the dice results.
The roll formulas support using exploding, compounding and penetrating notations. These are compound additional rolls (!!) and penetrate additional rolls (!p).
Exploding dice or explode highest value (!) are when you roll the maximum number of a die you get to re-roll again and add the additional roll to your total for the roll. If the additional roll is also a maximum number, you get to keep rolling!
Example:
If you roll and you will initially roll 6 times 10-sided dice. If that results
3, 7, 6, 8, 8, 10 then you get to roll that 10 again for a total of 7 dice rolls. Then add up all the numbers.
Compounding dice or compound additional rolls (!!) are when the additional rolls for each dice are added together as a single "roll". With the compounding exploding rolls a single roll can be infinitely high! The Compare Point can be specified to change the exploding trigger.
Example:
- Rolls 5d6 and compound every time a 6 is rolled
- Rolls 5d6 and compound every time a 5 is rolled, 6's will be treated as a normal roll
Penetrating dice or penetrate additional rolls (!p) are when additional rolls for each dice have 1 subtracted from the roll. A die can penetrate multiple times but the modifier is only ever -1 to each additional die.
Example:
- Rolls 5d6 and explode with a -1 modifier every time a 6 is rolled
- Rolls 5d6 and explode with a -1 modifier every time a 5 or higher is rolled.
The Dice Formula Builder allows you to create complex roll strings visually. This can help you navigate creating the more complex rolls, without remembering all the syntax required.
Rolls that are saved in the Dice tool are tied to a campaign.
FATE dice
The dF notation accurately simulates FATE dice as 6-sided dice in which two sides are 0, two sides are +1, and two sides are -1.
To roll 4 FATE dice you would write as your roll formula. You can add modifiers to those dice as well.
Grouping Rolls
If you want to perform a series of rolls and compare each to a common check you can use the roll grouping notations.
will roll 4 times 6-side dice and 3 times 8-sided dice and from both pools keep the highest value.
will roll the same number of dice, but keep the highest group total. If you get 10 from your 4d6 and 9 from your 3d8, then the 10 is kept.
Grouping dice will cause the Roll Announcement to display a total of the roll, and also display each group's individual dice rolls separately.Labelling Rolls
When a roll contains grouping, you are able to label them by adding a [label] after the roll. This is displayed in the Roll announcement.
Color Dice
You can color a dice (or group of dice) by adding # followed by color name (blue), a six digit rgb in hex (#ABCDEF) or a three digit rgb in hex (#ABC).
Example formula for a roll with grouping, labels and colors
8d20#yellow[Sunflower]+1d20#blue[chaos]
The order of the formula is important, and an incorrect order will not result in either a roll, or the desired outcome.
"Dice formula" then "#color" then "[Label]"
8d20#yellow[Sunflower]
Order Dice Rolls Ascending or Descending
To order your dice rolls ascending or descending, add sa (or just s) for ascending after the formula, or sd for descending order.
For example, to roll 10d20, and order the results ascending:
Or for example, to roll 10d20, and order the results descending:
Rolling and adding additional information
You can write a valid roll formula then add non-formula text with your roll. So if you use the formula then will only roll the 1d20 and add 5 to it, the rest will be included in the roll announcement information.
Rerolling dice
Several systems require that certain dice be rerolled, for example 1s or 2s on damage die, and the original die value ignored.
To use reroll type r followed by a number that is to be re rolled, or by using the > or < functions to specify numbers equal to or higher/lesser than.
Example: will roll 3d6, re-rolling results of 1 or 2 until they are 3 or above. The value will only add values of 3 or above in the total.
If you only want to re-roll a dice only once use ro instead of r.
You could also use to roll 5d8 and re-roll any odd numbers.
Math only rolls
You can do math-only rolls by adding a math expression after the roll command. This won't roll any dice, just perform the calculation.
You can use the floor and ceil operators to round rolls that might otherwise lead to fractions. The roll formula will roll a 20-sided die and a 10-sided die and for the 10-sided die divide the result by 3 then round down to the nearest integer.
Math notations and formulas overview
+ Plus. Will add to the total
- Minus. Will subtract from the total
* Multiplication. Will multiply with a provided value
/ Division. Will divide with a provided value
% Modulus division. The result of a % b is the remainder of a / b
** Exponentiation. Will "raise a to the power of b". More commonly expressed as a^b but in roll formulas we use ab instead
floor(x) Rounds x towards negative infinity
round(x) Rounds x towards 0 if the fractional portion of x is less than 0.5, and round x towards positive infinity if the fractional portion of x is 0.5 or greater
ceil(x) Rounds x towards positive infinity
abs(x) Returns the absolute value of x
Roll formulas follow a standard order of operation in math. Parenthesis can be used to group operations together.
If you spot any errors, please let us know.