Dice Rolls - Sichlan/DnD-3.5-Character-Sheet-Tool GitHub Wiki

Dice Rolls

Basic explanation of dice rolls possible

Order of operation

WIP

Syntax

Separators

Separator Explanation Example
[[content1]] Treat everything inside as a separate equation 1d20+[[5*6]] => 1d20+30
{content1+content2}modifier1 Treat everything as a seperate roll and apply any modifiers only to the whole roll. Can be referenced by $[[x]] {2+3+4}kh1 => 4
{content1,content2}modifier1 Treat as a list of rolls, apply modifier to grouped entries {2+3,4}kh1 => {5+4}kh1 => 5
(content1) Gives the equation inside a higher priority (2+3)*4 => 5*4 => 20

Modifier

Makes my head hurt to think about how to filter that shit...

Modifier Explanation Example
x>y; x>=y; x=y; x<=y; x<y Compares x to y and gives out 1 if the comparison is true 10>7 => 1
{}dz; {}dhz; {}dlz Drops the highest z values from the roll (or lowest in case of dl) {10,7,8,5}dh2 => {7,5}
xdyr<2 Rerolls any die once not fitting the comparison operator 5d20r<5 => [10,4,3,5,8]r<5 => [10,7,2,5,8]

Functions

Function Explanation Example
floor(x) Rounds the equation inside the brackets down floor(7/3) => 2
ceil(x) Rounds the equation inside the brackets up ceil(7/3) => 3
round(x) Rounds the equation inside the brackets to the nearest integer round(10/3) => 3; round(11/3) => 4
abs(x) Rounds the equation inside the brackets down abs(5-7) => 2

Operator

Operator Explanation Example
a+b Addition 1+2 => 3
a-b Subtraction 1-2 => -1
a*b Multiplication 1*2 => 2
a/b Division 1/2 => 0.5
a%b Modulo 5%2 => 1
a^b Exponent 3^4 => 0.5
adb Rolling a Dice(s) with b sides 1d2 => [1,2]*1
⚠️ **GitHub.com Fallback** ⚠️