-
Notifications
You must be signed in to change notification settings - Fork 0
Client help
Steven Soloff edited this page Feb 1, 2017
·
1 revision
The following table describes the basic dice notation that can be used within an expression.
Example | Description | Notes |
---|---|---|
1d8 | Roll one d8. | You can roll any number of dice (e.g. 2d8, 5d8, 42d8) and dice with any number of sides (e.g. 1d2, 1d10, 1d42). If multiple dice are rolled, the result is the sum of each die roll. Note: To roll a single die, you must explicitly specify a roll count of one—d8 is not a valid dice roll expression. |
3d6+1 | Roll three d6s, sum the results, and add one. | You can use the following arithmetic operations with any two expressions: addition (+), subtraction (-), multiplication (*), division (/), and modulo (%). |
d% | Roll percentile dice (i.e. roll two d10s to generate a result between 1 and 100). | You can roll one additional d10 for each 0 you place after d% (e.g. d%0 will roll permille dice, i.e. roll three d10s to generate a result between 1 and 1000). |
4d6-L | Roll four d6s, drop the lowest roll, and sum the remaining three results. | You can drop more than one die by prefixing the command with an integer (e.g. 4d6-2L will drop the two lowest rolls). You can also drop the highest roll(s) (e.g. 4d6-H). |
4d6+H | Roll four d6s, clone the highest roll, and sum all five results. | You can clone more than one die by prefixing the command with an integer (e.g. 4d6+2H will clone the two highest rolls). You can also clone the lowest roll(s) (e.g. 4d6+L). |
The following table explains the available rounding modes which control how fractional values are rounded in an expression result. The global rounding mode only affects operations which may result in fractional values, such as division (/) and modulo (%).
Rounding mode | Examples |
---|---|
No rounding |
|
Round towards zero |
|
Round down |
|
Round up |
|
Round to nearest |
|
The following table explains additional operators that are available when evaluating a dice notation expression.
Operator | Example | Description | Notes |
---|---|---|---|
Grouping | 3*(1d6+1) | Roll one d6, add one, and multiply the sum by three. | Use parentheses to group operations and override the default operator precedence. |
Unary plus | +1 | The literal positive one. | Can be applied to any expression. |
Unary negation | -1 | The literal negative one. | Can be applied to any expression. |
Divide and round towards zero | 1 // 2 | Divide 1 by 2 (0.5) and round towards zero (0). | Always ignores the selected global rounding mode. |
Divide and round to nearest | 1 /~ 2 | Divide 1 by 2 (0.5) and round to nearest (1). | Always ignores the selected global rounding mode. |
Divide and round down | 1 /- 2 | Divide 1 by 2 (0.5) and round down (0). | Always ignores the selected global rounding mode. |
Divide and round up | 1 /+ 2 | Divide 1 by 2 (0.5) and round up (1). | Always ignores the selected global rounding mode. |