When rolling dice, include any bonuses in your roll.
XdY to roll X dice of Y sides. Prefix N# to roll the dice N separate times.
Operators allowed are +, -, *, and / which follow order of operations. Division rounds down. Use parentheses if needed. Full format is any number of terms combined with the operators, where term is a literal number or a roll. N can be a term itself.
Combinatorics are possible as well. N-choose-K results can be of the form NcK, the value will be the number of combinations to choose K items from a set of N items, and return a random one of these sets in the details. (i.e. 4c2 might result in 6 [4c2=1,3]) Permutations are possible in the form NpK. These terms are useful for generating sequences.
Append the following modifiers as desired, if using multiple then they must be added in the order below. Some combinations may be invalid.
rZ – reroll die if result is Z or lower (Brutal property in D&D, etc.)
roZ – reroll die only once if result is Z or lower
mZ – count result as Z if roll is lower than Z
eZ or oZ – extra / open roll when the die is Z or higher, extra grants one bonus roll only
kZ or lZ – keep the highest / lowest Z rolls, drop others
tZ – target number Z, count rolls that meet or exceed Z as successes (if Z > Y, implicit oY)
hZ – hits Z, count rolls that meet or exceed Z as successes, max roll grants bonus roll (implicit oY) (WoD)
xZ – hits Z, count rolls that meet or exceed Z as successes, max roll grants bonus success (Exalted)
uZ – under Z, count rolls that are equal to or under Z as successes
! – when at the end of any roll, turns on verbose mode (shows all dice rerolled and modified)