Skip to main content

Writing a rule

The rules decide what the reader sees, what the character pays and what changes next. They are written in plain English, without code.

Fill-in-the-blank sentences, AND and OR groups, costs, effects and dice tests. No code, anywhere.

This chapter is a reference: come back to it when an adventure needs it. If Fatum is new to you, start with the first step of the path: What the engine can do

A rule is a sentence

The "Rules…" button on a choice opens the builder. A rule there takes the form of a sentence to complete: "the character has at least [1] [Brass key]". The words are fixed; each box in square brackets opens a selector or a small number field.

At the top of the panel, a summary rewrites itself on every change and hands the whole rule back as one sentence. It is the same summary that appears in miniature on the graph and in the inspector, which means there is only one way to read a rule anywhere in the editor.

The expanded rule builder: the automatic summary, the choice text, and an "all these conditions" group holding two sentences.
The arrow at the top right toggles between the narrow panel and this wide view. Both show the same thing; the wide one reads better.

A rule holds for every language at once. Only the choice's text, at the top of the panel, follows the working language.

Picking a condition

"+ Condition" opens a selector sorted by family: inventory, resources, values, events, character, progression, shop, tests, combat, logical groups, run memory, comparisons with a value, achievements and profile. Each entry is worded in plain English, and the selector only offers what the engine can actually evaluate.

The condition picker: a search field and the entries grouped by family.
A still-empty reference slot fills from the same picker, and offers to create the missing definition without leaving the rule.

A slot left empty stays visible: the sentence displays a marker in its place, and validation reminds you of it before publication. While you are writing, an empty slot is not flagged as an error; it becomes one at publishing time.

Groups

Several conditions placed side by side must all be met. To say something else, you put them in a group, which is a real box on screen with its own label.

"+ Condition" in a group's header creates the row inside it. To move an existing row into a group, use its "Déplacer…" menu: that is the only path, and it refuses any move that would create a loop.
Group True when Used for
ALL OF THESE Every row it holds is met. "the key and the lantern"
AT LEAST ONE A single row is enough. "the key or the lockpicking ability"
UNLESS Its single row is not met. "unless the bridge is destroyed"

Costs, effects, tests, destination

Below the conditions, the panel follows the order in which things actually happen for the reader.

  • Costs are paid the moment the reader chooses, before anything else, and they are shown. A cost takes a fixed number: a rolled amount would make a choice visible without being payable.
  • Effects apply once the choice resolves, in the order you arrange them. An effect may roll dice.
  • A test transforms the choice: the destination leaves it and moves into the outcomes, one per result, each with its own effects.
  • The destination closes the panel, and it is the same control as in the inspector: five possibilities, one at a time.

No code to type

The editor has no field where you type a condition, an effect or a destination by hand. No advanced mode, no source view, no workaround. A collapsible section "Technical details (read only)" shows the detail of a rule as the engine reads it, without allowing it to be edited, for those who are interested.

The consequence is simple: until a rule is offered by the picker, it cannot be written. This constraint guarantees that a saved rule will be understood by the engine the day a reader plays it.