Skip to main content

Dice Formulas

At the heart of every roll is a roll formula. This is an overview of all the possible dice notations and modifiers.

Hem Brewster avatar
Written by Hem Brewster
Updated over a month ago

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” [[1d1]] or “2d1000” [[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 [[1d20/5]] will roll the die, take the result and divide it by 5.

Operators can also string multiple dice together: [[1d20 + 1d10 + 1d3]] 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

Roll formulas support most math operators as modifiers, like plus (+), minus (-), multiplication (*), division (/) and exponent (**). Therefore, rolling 1d20/5 will roll the die, take the result and divide it by 5.

Modifiers can also string multiple dice together: 1d20+1d10+1d3 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).

Roll buttons serve an important function in making Universal sheets very powerful for creating sheets for any system there is out there when combined with references. A reference in a Roll Button, Modifier Value, or Modifier Roll formula, can be a Modifier (including self), Slot or Point Widgets, as well as a Collection Widget cell that is a Slot or Point.

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 the Modifier Widget from within the same Note or Character Sheet and it will appear as an option to add, thne close the bracket

Example:

Dice Number Modifier = 2, Dice Size Modifier = 12
Roll Button Formula = (Dice Number)d(Dice Size)
This will then roll 2d12

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 1d100<75 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.

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 9d6kh3 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

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 6d10! 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:

  • 5d6!!- Rolls 5d6 and compound every time a 6 is rolled

  • 5d6!!5 - 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:

  • 5d6!p - Rolls 5d6 and explode with a -1 modifier every time a 6 is rolled

  • 5d6!p>5 - 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 4dF 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.

[[{4d6+3d8}kh1]] will roll 4 times 6-side dice and 3 times 8-sided dice and from both pools keep the highest value.

[[{4d6,3d8}kh1]] 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: [[10d20sa]]
Or for example, to roll 10d20, and order the results descending: [[10d20sd]]

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 1d20+5 Short Sword Attack, then it will only roll the 1d20 and add 5 to it, the rest will be included in the roll announcement information.

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 1d20+floor(1d10/3) 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 1d20+10

  • - Minus. Will subtract from the total 1d20-10

  • * Multiplication. Will multiply with a provided value 1d6*3

  • / Division. Will divide with a provided value 1d10/5

  • % Modulus division. The result of a % b is the remainder of a / b 1d20%2

  • ** Exponentiation. Will "raise a to the power of b". More commonly expressed as a^b but in roll formulas we use ab instead 1d6**2

  • floor(x) Rounds x towards negative infinity floor(1d20/5)

  • 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 round(1dd20/5)

  • ceil(x) Rounds x towards positive infinity ceil(1d20/5)

  • abs(x) Returns the absolute value of x abs(10)

Roll formulas follow a standard order of operation in math. Parenthesis can be used to group operations together.

Did this answer your question?