Ordered outcome labels
At the table
Some games speak in named bands (failure, success, critical) instead of a raw total. You still want exact probabilities—and sometimes “success or better” on that ladder.
Try it
In the playground, open this lesson in the playground and click Run (or press Shift+Enter).
The script
↗Scale = (
scale()
.step("CRITICAL_FAIL", ..5)
.step("FAIL", 6..10)
.step("SUCCESS", 11..15)
.step("CRITICAL_SUCCESS", 16..)
)
roll = 1d20
out = roll.bucket(Scale)
output("check", out)
output("p_success_plus", out.p_at_least("SUCCESS"))
check · Outcomes
| outcome | % | frac | X/36 |
|---|---|---|---|
| CRITICAL_FAIL | 25.0 | 1/4 | 9 |
| FAIL | 25.0 | 1/4 | 9 |
| SUCCESS | 25.0 | 1/4 | 9 |
| CRITICAL_SUCCESS | 25.0 | 1/4 | 9 |
p_success_plus · Prob
| outcome | % | frac | X/36 |
|---|---|---|---|
| p_success_plus | 50.0 | 1/2 | 18 |