Drag to rearrange ▸ click again to lock
Construction Kit
0

Button Scripting Reference

How it works

Chain steps with | — they run left to right. n always refers to the current display value at that moment.

d6 | + | d6 | =    → roll d6, press +, roll another d6, compute

Display Input

42appends the digits 4 then 2 to the display 42nprepends "42" in front of the current display nthe current display value — use it in expressions

Math Expressions

n * 2double the display (replaces display) n ^ 3cube — use ^ for exponentiation sqrt(n)square root, or n^0.5 floor(n)round down — also ceil, round, abs sin(n)trig — also cos, tan (radians) log(n)natural log — log(n,2) for log base 2 min(n,0)clamp to 0 — also max(n, limit) pow(n,2)power — same as n^2 PIπ (3.14159…) 3√cube root — any number before √ sets the degree

Dice

d6roll a d6, append result to display 2d6roll 2d6 (sum), append to display d6nroll a d6, prepend result d20any number of sides — d4, d8, d10, d12, d20, d100… dntype sides first, then press — rolls d(display), replaces dnnsame but prepends the result

Random

rf(max)random float from 0 to max rf(min,max)random float between min and max ri{1,2,4,8}pick a random item from the list, replace display ri{1,2,4,8}npick a random item, prepend to display n * ri{2,3,5}use ri{} inside an expression

Conditionals

Run different steps depending on the display value.

n>0:[d20][d6]if display > 0 roll d20, else roll d6 n%2=0:[n/2][(n*3)+1]even/odd branch — single = is fine n>=100:[AC][]empty branch = do nothing
Condition is any JS expression using n.
Each branch is a full pipe sequence: [d6 | + | d6 | =]

Built-in Actions

ACclear all =compute (equals) backspace — delete last digit +/-toggle sign %percent (÷ 100) + - × ÷operators √ x² 1/xsquare root, square, reciprocal