The dice language Contents

Rule systems

The dice language

The formulas behind every sentence: dice notation, values a roll can read, how a roll is read, with recipes for common mechanics.

One small language under every sentence

Every number in a rule system is either a plain number or a formula in one small language: the dice a check rolls, a target, a track's maximum, a stat's modifier, an enemy's health by tier, an amount on a rule card. You rarely need to write one: the sentence editor, the composer and Hob write them for you. The Advanced tab shows them all when you want to.

It is deliberately small. It is not a programming language: no loops, no reaching outside the values it's handed, nothing that can misbehave. A formula that doesn't make sense is refused when you save, in a sentence saying what's wrong.

Advanced: each check's roll and target, each track's maximum, each derived value's formula
Studio › Rules › Advanced: the formulas behind every sentence, each in its own field. Everything else the system holds is here too, as editable data.
The editor's footer: unsaved changes, one problem, written as a sentence
A broken formula is caught as you type, explained in words, and can't be saved.

Dice

WriteMeansExample
d20One twenty-sided die13
3d6Three six-sided dice, added4 + 2 + 6 = 12
2d20kh1Two d20s, keep the highest one (advantage)(7, 16) → 16
2d20kl1Keep the lowest one (disadvantage)(19, 7) → 7
4d6kh3Four d6s, keep the best three(5, 2, 6, 3) → 14
(@stat)d6As many dice as a value saysProwl 3 → 3d6
6d10>=6Count the dice at or over 6: the value is the count(2, 6, 9, 10, 1, 7) → 4
3d6!Exploding: a top face rolls another die(6, 2, 4) + 5 → 17
4dFFate dice: each −1, 0 or +1(+, 0, −, +) → +1
d100Percentile; d% is the same47
d100t(1)Percentile with a bonus tens die (keep the better tens); t(-1) a penalty die(4 or 7, 3) → 43
d12[Hope]A die with a name: shown with its name, and readable by rule cardsHope d12 (9)

Every face is kept in the roll's record, so the dice tray can replay it and the roll chip can show it. All dice roll from a seed: the same roll, rolled again for the same turn, gives the same faces.

Numbers and logic

Arithmetic
+ - * / and brackets: floor((@str - 10) / 2)
Comparisons
> >= < <= == !=, giving 1 or 0: @hp < 5
Logic
and, or, not: @cond.blessed > 0 and @nerve >= 3
Choices
if … then … else …: if @level >= 5 then 2 else 1. Only the branch taken is worked out, so only its dice are rolled.
Functions
floor ceil round abs min max clamp: clamp(@edge + @cond.edge, -1, 1)

Values a formula can read

WriteWhat it isWhere
@strA stat's value (by its id)Anywhere
@str.modA stat's modifier: its value when it has noneAnywhere
@statThe stat being rolled; @stat.mod its modifierA check's roll and target
@hpA track's current value; @hp.max its maximumAnywhere
@proficiencyA derived value (by its id)Anywhere
@levelThe character's level; @xp their xpAnywhere
@difficultyThe number behind the word the storyteller picked for a label (Hard → 20). Every label is readable by its id: @edge, @position.A check's roll and target
@spend_push1 if the player paid that spend before the roll, else 0A check's roll
@cond.edgeWhat the sheet's conditions add up to as edge; @cond.mod as a bonus or penaltyA check's roll
@cond.poisonedA condition's level (0 when absent); @cond.poisoned.left its ticks leftAnywhere
@opp.insight.modThe opponent's stat or modifier, when a roll is aimed at someone present; @opp.tier their tierA check's opposed targets
@defenceThe defender's defenceThe attack check
@tierThe enemy's tier, 1 to 6Enemy templates
@thisThe stat itself; @linked the stat it leans onA stat's modifier
@group.Hope.highA named die's highest face; also .tops (top faces), .ones, .successes, .valueOutcomes and rule cards after a roll
@totalThe roll's total; also @target, @margin (total − target), @measureOutcomes and rule cards after a roll
@event.amountThe damage of the blow that set off the cardDamage cards
@thing.ship.hullA value on the character's first thing of a kindAnywhere

How a roll is read

A check has a roll and a way of reading it. The reading turns the dice into the outcome bands' measure:

ReadingMeasureOptions
Total against a targetA degree: −1 fumble, 0 failure, 1 success, 2 criticalsteps: beat the target by this much for a critical, miss by it for a fumble (PF2e: 10). naturals: a top or bottom face on the first die sets or shifts the degree.
Total into bandsThe total itselfBands by range: 10+, 7-9, 6- (PbtA).
Roll underA grade: −1 fumble, 0 failure, 1 success, 2 hard, 3 extremegrades (fractions of the target), what counts as a critical (a 1, rolling exactly the target, doubles), what fumbles, faces that always pass or fail, success levels instead of grades.
Highest dieThe best face; several top faces count one higherForged in the Dark.
Count successesThe countPairs of a face as extra successes and a critical (tens in a d10 pool).

On top of any reading, a check can compare two named dice (Hope against Fear): which came up higher adds a word to the outcome and its own effects; equal dice can be a critical.

Recipes

Fifth-edition advantage, with conditions and exhaustion

(if @edge + clamp(@cond.edge + (if @exhaustion >= 1 then -1 else 0), -1, 1) > 0 then 2d20kh1
 else if @edge + clamp(@cond.edge + (if @exhaustion >= 1 then -1 else 0), -1, 1) < 0 then 2d20kl1
 else d20) + @stat.mod + @cond.mod

Classic d20's ability check: any number of disadvantages and advantages count once either way.

Pushing yourself for an extra die

if @stat + @spend_push <= 0 then 2d6kl1 else (@stat + @spend_push)d6

Forged in the Dark: zero dots rolls two and keeps the lower; paying the “push” spend (2 Stress) adds a die.

Hope, Fear, and a d6 if you spend Hope

d12[Hope] + d12[Fear] + @stat + (if @spend_hope > 0 then d6 else 0)

Percentile with bonus and penalty dice

d100t(@edge)                       read: roll under, target @stat.mod * @difficulty

A hunger pool: some dice are dangerous

(@stat - @hunger)d10>=6 + (@hunger)d10[Hunger]>=6

Count successes across both groups; then a rule card reads @group.Hunger.ones to turn a failure with a 1 on a Hunger die into something worse.

Degrees of success by ten

roll:  d20 + @stat.mod
read:  total against @difficulty, steps 10, naturals 20 / 1 shift the degree

An opposed lie

opposed: { "deception": "10 + @opp.insight.mod" }

A lie told to someone present is rolled against their passive Insight instead of a difficulty.