Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.
Craig Wisniewski edited this page Mar 9, 2019 · 2 revisions

Dice Roll Library

Dice name/rollers

Dice Name Description
d, D "Standard" Dice

Simple rolls of the "Standard" dice roller look like nds

Where

  • n = number of dice to roll, if omitted its a single die
  • s = the number of sides of the rolled dice.

Example Simple Dice Rolls

Example Description
d6 or 1d6 or D6 or 1D6 Roll a single six sided die.
3d10 Roll 3 ten sided dice.
2 d 12 Roll 2 twelve sided dice.

Mathematical Expressions Supported

Expression Description
x + y Add x and y
x - y Subtract y from x
x * y Multiply x by y
x / y Divide x by y (integer but may change)

Multiple Rolls

Multiple rolls can be separated by ;, e.g. 1d6 ; 1d12

Variables

Variables are prefixed with $ To set a variable $myVariable = 1d6

So to set and retrieve a variable $myVariable = 1d6 ; $myVariable

Dice Roll Arguments

The "Standard" dice roller can also accept arguments in either { } or ( )

Fumble

Arguments Description
cf Critical Fumble, defaults to 1
cfn, cf=n Critical Fumble if n is rolled.
cf < n Critical Fumble if less than n is rolled.
cf <= n Critical Fumble if n or less is rolled.
cf > n Critical Fumble if greater than n is rolled.
cf > n Critical Fumble if n or greater is rolled.

Critical

Arguments Description
cs Critical Success, defaults to the number of sides on the dice.
csn, cs=n Critical Success if n is rolled.
cs < n Critical Success if less than n is rolled.
cs <= n Critical Success if n or less is rolled.
cs > n Critical Success if greater than n is rolled.
cs > n Critical Success if n or greater is rolled.

Success

Arguments Description
sn, s=n Success if n is rolled.
s < n Success if less than n is rolled.
s <= n Success if n or less is rolled.
s > n Success if greater than n is rolled.
s > n Success if n or greater is rolled.

Keep/Drop Highest/Lowest

Arguments Description
khn, kh=n Keep highest n rolls, the others are dropped
kln, kl=n Keep lowest n rolls, the others are dropped
dhn, dh=n Drop highest n rolls
dln, dl=n Drop lowest n rolls