Nicer Dicer Info
Nicer Dicer uses the dice-typescript
package as it's dice engine. Dice-Typescript is based on the Roll20 dice specification that can be found on the Roll20 Wiki.
There are a number of presets available on the dice roller page that you can easily copy and modify to get started.
Dice Specification
Nicer Dicer supports more than just your standard polyhedrons when rolling dice, below are the available die types you can use in your games.
Basic Roll NdX
Rolls N traditional (almost, you can have any number of sides that you want) dice with X sides per die. N must be greater than or equal to 0 and X must be greater than or equal to 1.
Fate/Fudge Roll NdF
Rolls N Fate/Fudge dice. These dice have three sides with values of -1, 0, and 1.
Computed Dice Roll (N+Y)dX
/Nd(X+Y)
Computes the number of dice to roll or the number of sides on the dice based on the mathematical expression in the parentheses. Dice coputation can be used with both Basic and Fate dice.
Roll Modifiers
Modfiers that can change the behavior or outcome of dice rolls. Each modifier states which Types Of Dice it can be applied to in parentheses after the modifier name. Rolls can have multiple modifiers applied to a single roll to allow for complex dice expressions.
- B - Basic Roll
- F - Fate/Fudge Roll
Target Number / Successes (B,F) - CP
Normally when you perform a roll, Roll20 reports back the total value of all the dice rolled, plus any modifiers. Some game systems, though, work by rolling a set of dice versus a target number, and then adding up the total number of successes instead.
- Example Success Checks
3d6>=3
- Roll 3 d6's and count one success for each roll of 3 or higher10d6<=4
- Roll 10 d6's and count one success for each roll of 4 or less
Failures (B,F) - fCP
Some systems build on success checks by also including failures. Failure checks only work when a success check is already being done and each failure subtracts one from the total number of successes.
- Example Failure Checks
3d6>=3f1
- Roll 3 d6's and count one success for each roll of 3 or higher and one failure for each 110d6<=4f>=5
- Roll 10 d6's and count one success for each roll of 4 or less and one failure for each roll of 5 or more
Exploding Dice (B,F) !CP
Exploding dice, also known as "rule of 6" or "rule of 10s" depending on your gaming system, rolls an additional die if the maximum is rolled. If the additional roll is also the maximum number the additional rolls keep on going! The Compare Point can be specified to change the exploding trigger.
- Example Exploding Dice
3d6!
- Rolls 3d6 and explodes every time a 6 is rolled3d6!>=5
- Rolls 3d6 and explodes every time a 5 or 6 is rolled
Compounding Dice (B,F) !!CP
Shadowrun (and some other systems) use a special style of exploding dice where the the additional rolls for each dice are added together as a single "roll". To do this, just use two exclamation marks instead of one. With the compounding exploding rolls a single roll can be infinitely high! The Compare Point can be specified to change the exploding trigger.
- Example Compounding Dice
5d6!!
- Rolls 5d6 and compound every time a 6 is rolled5d6!!5
- Rolls 5d6 and compound every time a 5 is rolled, 6's will be treated as a normal roll
Penetrating Dice (B,F) !pCP
HackMaster (and some other systems) use a special style of exploding dice where the the additional rolls for each dice have 1 subtracted from the roll. To do this, add a p after the exclamation mark. A die can penetrate multiple times but the modifier is only ever -1 to each additional die.
- Example Compounding Dice
5d6!p
- Rolls 5d6 and explode with a -1 modifier every time a 6 is rolled5d6!p>=5
- Rolls 5d6 and explode with a -1 modifier every time a 5 or higher is rolled.
Keep / Drop Dice (B,F) khN
/klN
/dhN
/dlN
Some game systems ask you to roll a large number of dice, and then either drop a certain number (N) of the lowest rolls, or keep only a certain number (N) of the highest rolls. Roll20 supports this type of roll through the d
and k
commands, respectively. The optional h
/l
parameter can either be h
to keep or drop the highest N dice or l
to keep or drop the lowest N dice. If not specified when keeping rolls the high rolls will be kept and when dropping rolls the low rolls will be dropped.
- Example Keep Rolls
8d100k4
- Roll 8 d100's and keep the four largest rolls.8d100kl4
- Roll 8 d100's and keep the four smallest rolls.- Example Drop Rolls
8d100d4
- Roll 8 d100's and drop the four smallest rolls.8d100dh4
- Roll 8 d100's and drop the four largest rolls.
Rerolling Dice (B,F) rCP
Several systems require that certain dice be reroll, for example brutal weapons in D&D 4e require any 1s or 2s to be re-rolled and the orignal die value ignored. The reroll modifier can be specified multiple times to allow rerolling at multiple Compare Points
- Example Rerolls
2d10r<=2
- Roll 2 d10's and reroll any time a 2 or lower is rolled8d6r
- Roll 8 d6's and reroll any time a 1 is rolled8d6r2r4r6
- Roll 8 d6's and reroll any time a 2, 4, or 6 is rolled
Sorting Dice (B,F) sa
/sd
You may want to see your results in either ascending or descending order. The sorting modifier does just this. The order parameter is optional and specifies the order to sort with a
for ascending and d
for descending. Sorting defaults to ascending if order is not specified.
- Example Rerolls
8d6s
- Roll 8 d6's and sort the results in ascending order8d6sd
- Roll 8 d6's and sort the results in descending order
Order of Operations for Modifiers
Modifiers are applied in the following order:
- Exploding, Compounding, Penetrating, Rerolls
- These are applied while the dice are still rolling. imagine that you roll some exploding 6d6 on your table and the instant one of them settles as a 6 another die is rolled
- Keep, Drop, Success, Failure, Sorting
- These are applied after all of the dice have "settled" and all of the result values are known.
Grouped Rolls
Mutliple rolls can be perfomed within a group via curly braces using a comma to seperate the sub-roll expressions {3d6+3d4+5, 2d8+4}
. Grouped Rolls have their own set of Group Modifiers which perform actions across the whole group.
Grouped Roll Modifiers
Modfiers that can change the behavior or outcome of grouped rolls. Grouped Rolls can have multiple modifiers applied to a group roll to allow for complex dice expressions.
Keep / Drop khN
/klN
/dhN
/dlN
To apply a keep or drop modifier across multiple types of dice wrap the roll in a group. With a single Sub-Roll in the group the keep/drop operation is applied across all rolls. To choose the best or worse roll expression multiple sub-groups can be used. In this case the keep/drop operation is applied to the final result of each subgroup.
- Single Sub-Roll Keep Example
{4d6+3d8}k4
- Roll 4 d6's and 3 d8's, out of those 7 dice the highest 4 are kept and summed up.- Multiple Sub-Roll Drop Example
{4d6+2d8, 3d20+3, 5d10+1}d1
- Roll each of the three sub-roll expressions and total them up. Drop the sub-roll expression with the lowest total and sum the other two totals as the result.
Target Number / Successes (B,F) - CP
The same concept as when using on Dice Rolls but with different behavor for a group. For a Grouped Roll with a single sub-roll expression the success check is done after the remaining math expressions have been totaled into each roll. Single sub-roll groups are also useful when doing a success check on a roll that has another Compare Point enabled modifer. For a Grouped Roll with a multiple sub-roll expression the success check is applied to the esult of each sub-roll expression.
- Single Sub-Roll Success Example
{3d20+5}>=21
- Roll 3 d20's, for each roll add 5 and then count a success for each result of 21 or more.{2d6!}>=4
- Roll 2d6 exploding and count a success for each roll of 4 or greater.- Multiple Sub-Roll Success Example
{4d6+2d8, 3d20+3, 5d10+1}>=40
- Roll each of the three sub-roll expression and total them up. Count one success for each sub-roll total of 40 or more.
Failures (B,F) - fCP
Failure checks on groups work just like success checks.
- Single Sub-Roll Failure Example
{3d20+5}>=21f<=10
- Roll 3 d20's, for each roll add 5 and then count a success for each result of 21 or more and count a failure for each result of 10 or less.{2d6!}>=4f1
- Roll 2d6 exploding and count a success for each roll of 4 or greater and a failure for each roll of 1.- Multiple Sub-Roll Failure Example
{4d6+2d8, 3d20+3, 5d10+1}>=40f<=10
- Roll each of the three sub-roll expression and total them up. Count one success for each sub-roll total of 40 or more and one failure for each sub-roll total of 10 or less.
Dice Expression Syntax
In addition to the above syntax rules, some slightly more complicated variations are also available. For example, you can roll a variable number of dice using an expression similar to the following:
(4d4)d20
Conditional Operators
As per the Roll20 syntax, you can use conditional operators, such as in 4d20>10
, but in this library, the semantics of those operators is slightly different. In the Roll20 engine, >10
actually means >=10
, but in this library, you would need to actually use the >=
operator. I feel needing to use the correct mathematical operators makes for a more intuitive library.
Group Repeaters
Sometimes it is necessary to roll complex groups of dice that aren't supported by the basic syntax. For example, rolling a saving throw at disadvantage for 10 creatures. For this, you can use the group repeater modifier, which works like this:
{2d20k...10}>=14
The above will roll 10 disadvantaged saving throws, reporting successes for those that break DC14.
Fractional Dice Rolls
Using the allowed syntax, it is possible to request a fractional number of dice to be rolled. Take the following example:
(2 / 5)d6
In this instance, the number of dice to be rolled will be rounded to the nearest integer (2.5 gets rounded up to 3).
This will first roll 4d4
dice, and use the outcome of that to determine how many d20
dice will be rolled.