engine:basics:dice_definitions:start

Dice definitions

First things first. You probably might want to know how to roll dice.

Dice are defined in a format you are probably used reading:

[number]d[sides]

Please note that both parameters are optional.

  • If sides is not given, the engine assumes you want to use d6.
  • If number is not given, the engine assumes you want to roll only one.

Examples:

3d6 rolls 3 six-sided dice
2d20 rolls 2 twenty-sided-dice
5d rolls 5 six-sided dice
d shortest version, rolls 1 six-sided die

Whenever you roll dice, you are presented with the individual dice's results. If no further processing has been specified, the sum of all rolls will be calculated and shown.

Because the result of a normal dice roll is always a sum, you can use the dice definition in formulas, for example to add modifiers.

See Mathematics for more fun.

Examples:

3d6+4 rolls 3 six sided dice and adds 4 to the result
3(d6+4) rolls a d6, adds 4 and multiplies the result by 3 1)

For added fun, you can repeat rolls using the times operator, a simple “x”. While there is not much difference between 3xd6 and 3d6, there is a huge difference between 3x(d6+5),3(d6+5) and 3d6+5.

3d6+5 rolls 3d6, sums up the result, adds 5
➰ Processing: 3d6+5
🎲 dice: rolling 3d6: 5, 5, 5, sum: 15
+ taking 15, adding 5: 20
∎ Results on stack: 20
3(d6+5) rolls a d6, adds 5, multiplies the result by 3
➰ Processing: 3(d6+5)
🎲 dice: rolling 1d6: 2, sum: 2
+ taking 2, adding 5: 7
□ bracket result: 7
multiplying by 3
∎ Results on stack: 21
3x(d6+5) rolls three d6 and adds 5 to each, creating 3 results for 1d6+5, which are not summed up afterwards
➰ Processing: 3x(d6+5)
↦ repeating (1): start
🎲 dice: rolling 1d6: 6, sum: 6
+ taking 6, adding 5: 11
□ bracket result: 11
⤺ repeating (1): 1 of 3 times
🎲 dice: rolling 1d6: 1, sum: 1
+ taking 1, adding 5: 6
□ bracket result: 6
⤺ repeating (1): 2 of 3 times
🎲 dice: rolling 1d6: 4, sum: 4
+ taking 4, adding 5: 9
□ bracket result: 9
⇥ repeating (1): done
⭐ repeating (1): Results: 11, 6, 9
∎ Results on stack: Array
(
    [0] => 11
    [1] => 6
    [2] => 9
)

You can have exploding or imploding dice.

Warning: Fudge dice cannot not explode or implode. Therefore, using these designators with fudge dice will result in a parsing error.

If you add an e to your dice description, the dice will explode. Whenever they roll their highest score, they will reroll and add the result.

If you want to change the result span triggering the reroll, you can give a number behind the e. This is the new minimum roll for explosion.

If you rant to limit the number of explosions, you can add a second number behind the e, deparated by comma. By default, explosions are not limited.

Examples:

3d6e rolls 3d6 and explodes them on every 6
3d6e5 rolls 3d6 and explodes them on every 5 or 6
5d6e6,1 rolls 5d6 and explodes them once on a 6
d100e95 rolls a d100 end explodes on 95+
de rolls 1d6 and explodes it on every 6

If you add an i to your dice description, the dice will implode. Whenever they roll their lowest score, they will reroll and subtract the result.

If you want to change the result span triggering the reroll, you can give a number behind the i. This is the new maximum roll for implosion.

If you rant to limit the number of implosions, you can add a second number behind the i, separated by comma. By default, implosions are not limited.

Examples:

3d6i rolls 3d6 and implodes them on every 1
3d6i2 rolls 3d6 and implodes them on every 1 or 2
d100i5 rolls a d100 end implodes on 5 or less
5d6i1,1 rolls 3d6 and implodes them once on a 1
di rolls 1d6 and implodes it on every 1

1)
note that you do not need to put the multiplication point before brackets, as used to in math