Root Label

Every formula can optionally have a text label attached to its final result. This "root label" captures any text that appears after the main calculation part of the formula is read by the system.

Intended Use:

Its most common intended use is simply to add a descriptive label to a complete and valid formula, which can be helpful for context in user interfaces.

  • Input: `2d6 + 3 fire damage`

    • Explanation: The system calculates `2d6 + 3`. The remaining text ` fire damage` is treated as the root label for the result.

    • Result: Calculates `2d6+3` (e.g., 10) and attaches the label `" fire damage"`.

  • Input: `1d20+5 Attack Roll`

    • Explanation: The system calculates `1d20+5`. The remaining text ` Attack Roll` is the root label.

    • Result: Calculates `1d20+5` (e.g., 18) and attaches the label `" Attack Roll"`.

Pitfall: Errors or Extra Text Treated as Labels

Because the root label mechanism captures all text following the first valid part of the formula it understands, it can unintentionally hide errors or typos that occur later in the string. This happens because the system might successfully parse the beginning of the formula but then fail to understand the rest due to an error. Instead of stopping, it treats the problematic remainder as the root label.

How it Manifests:

If the beginning part of your formula is valid according to the notation rules, but there's a syntax error, typo, or structural mistake after that valid part, the system might:

  1. Successfully evaluate the initial valid part it understood.

  2. Treat the entire rest of the string (including the mistake) as the root label.

  3. Not perform any calculations based on the text intended to be part of the formula after the error.

This means a formula might seem to "work" but give the wrong answer because a crucial part was ignored and treated as a label.

Examples of Unexpected Behavior:

  • Misplaced Modifier (Space):

    • Input: `3d6k 3` (Note the space after `k`)

    • Explanation: The system understands `3d6k` (applying the default `k1`). The ` 3` that follows isn't part of the `k` modifier due to the space, so it's treated as the root label.

    • Result: Calculates `3d6k1`. The label `" 3"` is attached. This differs from `3d6k3`.

  • Operator Typo:

    • Input: `1d20 +* 5`

    • Explanation: The system understands `1d20`. The ` +* 5` isn't a valid operation sequence, so it's treated as the root label.

    • Result: Calculates `1d20`. The label `" +* 5"` is attached.

  • Unclosed Parenthesis (Late):

    • Input: `1d6 + (2 * 3`

    • Explanation: The system understands `1d6`. The ` + (2 * 3` isn't a complete, valid calculation structure, so it's treated as the root label.

    • Result: Calculates `1d6`. The label `" + (2 * 3"` is attached.

Recommendation:

If a formula isn't behaving as expected, especially a complex one, carefully check the entire string for typos or structural errors. Sometimes, an error partway through can cause the rest of the formula to be ignored and treated as a label rather than causing a failure.

More fun at the table, less fuss around it

The tavern falls quiet. You spent all week on this villain: the scarred voice, the secret letter, the slow reveal in the final act. Your players have other plans. They have just set fire to the only bridge out of town, the paladin is deep in an argument with a goat, and the rogue has quietly pocketed the letter that was supposed to unravel everything. Somewhere across the river, your villain stands alone in the rain, waiting for an entrance that will never come. The bard leans back, grinning. Four faces turn to you.

What do
you do?

Start Free

30 days free · no card needed