Dice Expressions
Help
| Info
Dice codes can be more than a single die roll. You can combine dice, numbers, comparisons, and functions in one expression.
Math
- Multiplication before addition:
- Parentheses first:
- Negative numbers:
- Combine dice and numbers:
Comparisons
Comparisons return 1 when true and 0 when false.
- Equal:
- Greater or equal:
- Less than:
Functions
Functions can use numbers, dice rolls, and full expressions as arguments.
- Minimum and maximum:
- Absolute value:
- Rounding:
- Clamp into a range:
- Inclusive range test:
Conditional rolls
Use if(condition, true result, false result) for conditional dice. Only the selected branch is rolled.
- Roll damage only on a hit:
- Only the chosen branch rolls: