Repository navigation
Dice Rolls
Vox edited this page Oct 7, 2023
·
6 revisions
Basic explanation of dice rolls possible
- Tables
- Separators / Modifiers
- { }x
- ( )
- Functions
- Operators
- adb
- a^b
- a%b
- a/b
- a*b
- a-b
- a+b
| Syntax | Explanation | Example |
|---|---|---|
tcXrY[roll]
|
generates an array length X of arrays length Y of results of the specified roll within brackets |
tc2r3[1d2] => [ [1,2,2], [2,1,1] ] |
| Separator | Explanation | Example |
|---|---|---|
{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 |
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; xdyr!<2 |
Rerolls any die once (if no ! is given) not fitting the comparison operator | 5d20r<5 => [10,4,3,5,8]r<5 => [10,7,2,5,8] |
| 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 | 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 |