Sophie's Dice - Documentation

Dice Notation

Sophie's Dice supports standard dice notation and a few other things, here's the full list:

Basics

To roll a dice, enter the dice name. For example:
d6
Will roll a die with 6 sides. You can do this for any number and if there isn't a premade dice with that many sides, the program will make one and roll that. (if a fair dice can't be made, it will roll a coin whose face values are set randomly)

To roll multiple dice, put a number in front of the dice name:
4d8
This will roll four eight-sided dice.

You can roll multiple pools of dice in a single expression, and include simple maths operations too, for example:
d6 + 4d8 - 3
Which will roll both the expressions above at the same time, add them together, and subtract three.
Warning:
Be careful when rolling large amounts of dice, Sophie's Dice will attempt to roll as many as you ask it to, but some computers/devices will have trouble if there are a great many dice - and the program may crash. For this reason, it is not advised to roll much more than a hundred or so dice at once.

Roll Conditions

The basics above will suit almost all of your dice needs, but there are more interesting ways of rolling dice! by adding roll conditions to a dice pool (a dice pool is any group of dice in an expression, eg; "4d6 - 2d12" has two pools, a d6 pool and a d12 pool) you can change how that dice pool is treated in the expression.

Drop Highest

This condition will disregard the dice which roll the highest values. By default it will only disregard one dice, but you can specify a different amount. For example:
2d20H
This will roll two twenty-sided dice, and disregard the highest of the two values. (this is equivalent to a disadvantage roll in DnD)

5d10H3
This will roll five ten-sided dice, and disregard the highest three values.

Drop Lowest

This condition will disregard the dice which roll the lowest values. By default it will only disregard one dice, but you can specify a different amount. For example:
2d20L
This will roll two twenty-sided dice, and disregard the lowest of the two values. (this is equivalent to a advantage roll in DnD)

5d10L3
This will roll five ten-sided dice, and disregard the lowest three values.

Drop conditionally

With this you can disregard dice that roll over a value, below a value, or by specific values.
4d6D<3
Roll 4d6, drop any that roll a value less than 3.

4d6D>4
Roll 4d6, drop any that roll a value greater than 4.

4d6D<3>4
Roll 4d6, drop any that roll a value less than 3, and also drop dice with values greater than 4.

4d6D=4
Roll 4d6, drop any that roll a value of 4.

4d20D<5=9=11>15
Roll 4d20, drop dice below 5, dice above 15, and dice that roll 9 or 11.

Cap/Clamp

Clamp values that roll above/below a specified value
4d6C<2
Roll 4d6, treating any value less than 2, as 2.

4d6C>5
Roll 4d6, treating any value greater than 5, as 5.

4d6C<2>5
Roll 4d6, treating any value less than 2, as 2, and any value greater than 5, as 5.

Value Replacement

Use this condition to replace dice face values with others

4d6V{4=6,5=6}
Roll 4d6, and count face values of 4 or 5 as if they were 6.

d20V{20=9001}
Roll a d20, and count the 20 face as extra powerful.

You can also replace all values less than (<) or greater than (>) a specific value
d20V{<5=0,>15=20}
Roll a d20, and count the faces below 5 as 0, and above 15 as 20.

It is also possible to replace number values with string values (without spaces) and vice-versa:
d6{6=Success}
Roll a d6, and count the 6 face as a "Success" string value.

You can even replace a face value with the value of another dice roll by providing a sub-expression:
d20V{20=[10d6]}
Roll a d20, and if it settles on the 20 face, roll 10d6 (and don't count the 20).

No Repeats/Unique

This will roll the pool so that if any two dice in the pool have rolled the same value, one of them will re-roll.

4d6u
It's worth keeping in mind, some dice pools can't have unique results, for example, 7d6 will always have at least one dice that matches another, so 7d6u will re-roll forever (which is fun, so don't worry about it too much).

Explosion

With this roll condition, dice that roll certain values will spawn new dice.

4d6!
Roll 4d6, and explode dice that land on the maximum value (6).

4d6!3
Roll 4d6, and for dice that land on the maximum value, explode 3 new dice.

4d6!!
Limited explosion: Roll 4d6 exploding as above, but exploded dice cannot explode any further.

4d6!!!
Reductive explosion: Whatever value each dice rolls (except 1) a dice with that many sides will be exploded from it.

4d6!{4,5}
Roll 4d6, and explode on values 4 or 5 (and no others).

4d6!{<4,>5}
Roll 4d6, and explode on values less than 4 or greater than 5.

4proficiency!{Success}
Roll 4 proficiency dice, and explode on "Success" string values. (this requires you have dice labelled "proficiency" in your dice bag, with a string value face of "Success").

d20!{20=[4d8]}
Roll a d20, and explode on the 20 face into the sub-expression "4d8".

4d6!~6,6,6~
Pattern explosion: Roll 4d6, and if three dice match the pattern 6-6-6, explode them

Reroll

This condition allows you to specify certain values that dice in a pool cannot settle on, if they do then the dice will be re-rolled.

4d6R{1,2}
Roll 4d6, and re-roll any dice that settle on values 1 or 2.

4d6R{<3,>5}
Roll 4d6, and re-roll any dice that settle on values less than 3 or greater than 5.

You can also specify a maximum number of rerolls per die:
4d6R{1,2}3
Roll 4d6, and re-roll any dice that settle on values 1 or 2, but do not allow any die to be re-rolled more than three times.

Count

Count the number of dice in the pool that meet specified conditions

4d6#
Roll 4d6 and count how many dice roll the maximum value (6).

4d6#>4
Roll 4d6 and count how many dice roll a value greater than 4

4d6#=5
Roll 4d6 and count how many dice roll a value of 5

4d6#<3=5
Roll 4d6 and count how many dice roll a value less than 4, or equal to 5

4d6#=1=3=5
Roll 4d6 and count how many dice roll an odd-numbered value
That's all the ways to roll with expressions for now!

Combinations

The roll conditions can generally be combined, for example:
10d6H3L2D=4!{2}
This will roll 10d6, drop the highest 3, drop the lowest 2, drop any dice that landed on face 4, and explode any dice that rolled a 2.

Sub-Expressions

Roll expressions can include within them, instructions to roll yet other roll expressions if certain conditions are met.

These conditions are explosion (where the result of the sub-expression will be rolled and added to the face result:
d6!{6=[4d8]}

And value replacement (where the result of the sub-expression will be rolled and replace the face result:
d6V{6=[4d8]}


sub-expressions are indicated by square brackets ( "[" and "]" ), and can contain any valid roll expression (including further sub-expressions).

Math Functions

You can include several mathematical functions in your dice expressions:

round(d20/2)
Roll a d20, divide by two, and round the result to the nearest whole number.

floor(d20/2)
Roll a d20, divide by two, and round the result down.

ceiling(d20/2)
Roll a d20, divide by two, and round the result up.

abs(d20-10)
Roll a d20, subtract ten, and get the absolute value of the result.

sqrt(d20)
Roll a d20 and get the square root of the result.

ln(d20)
Roll a d20 and get the natural logarithm of the result.

There are trigonometric functions sin(), cos(), tan(), asin(), acos(), atan().

Variable and Constant Values

There are severable variables you can include in your expressions that will change based on the results of the roll:

d20R{1} * rerollCount
Roll a d20, reroll it whenever it lands on a 1, and multiply the result by the number of times it has been re-rolled.

d20! * diceCount
Roll a d20, spawning new d20s whenever they roll max value, and multiply the result by the total number of dice rolled by the expression.

4d6 * pinCount
Roll 4d6, and multiply the result by the total number of dice that have been pinned.

4d6 * pinSum
Roll 4d6, and multiply the result by the total values of all dice that have been pinned.

4d6 * discardCount
Roll 4d6, and multiply the result by the total number of dice that have been discarded.

4d6 * discardSum
Roll 4d6, and multiply the result by the total values of all dice that have been discarded.

4d6!2 * explodedCount
Roll 4d6, exploding two new d6s whenever they roll max value, and multiply the result by the number of dice that exploded.

4d6!2 * explosionCount
Roll 4d6, exploding two new d6s whenever they roll max value, and multiply the result by the number of dice that have been spawned by explosions.

There are also constant values which do not change: PI, Phi, DegToRad, RadToDeg.

User Values

You can add your own values to use in roll expressions too, click/tap the 'X=Y' button above the settings menu and edit a User Value Set to create names and values for them, whenever you use a named value in a roll expression, it will be treated as if you entered the specified value instead.

The upshot of this, is you can enter things like character sheet stats as user values, and when you level up you only need to change the value set, and not every saved roll expression that uses those values.
Documentation index

Sophie's Dice