Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Common recipes

Eight small patterns that come up in most Rulebooks. Each one takes a few minutes in the Editor. Copy the one you need, then change the names and numbers.

A secret revealed at Trust 80

The character keeps something to themselves until the player has earned it.

  1. Meters > a Bar meter Trust, 0 to 100, starts at 20.

  2. Influence rules > add a level Trusted, 80 to 100. Status line: "She trusts you". Instruction: "Tell {{user}} about the night your brother left. Do this once, then refer back to it naturally."

  3. Turn Show in the user's levels list off for this level, so players see ??? until they reach it.

  4. AI rules on Trust: "{{user}} shares something personal about themselves" +6, "{{user}} lies to {{char}}" -15.

Starter to compare with: Trust and secrets.

A shop that is closed at night

Something in the story depends on the time of day.

  1. Meters > add a Story clock, starting at 09:00, 5 minutes per message.

  2. Influence rules > levels by time of day: Open, 09:00 to 17:59, instruction "The shop is open. {{char}} serves customers between lines." Closed, 18:00 to 08:59, instruction "The shop is closed and dark. {{char}} will not sell anything until morning."

  3. Leave Detect time skips on, so "the next morning" moves the clock forward.

Starter to compare with: Day and night.

A win and a lose ending

Two combined rules that end the story in different ways.

  1. Meters: Trust (Bar, 0 to 100) and Suspicion (Bar, 0 to 100).

  2. Influence rules > Combined rules > add Win: Trust >= 90 and Suspicion <= 20. Status line "She says yes". Instruction "The story has reached its happy ending. Wrap up the scene warmly."

  3. Add Lose: Suspicion >= 80. Status line "She walks away". Instruction "{{char}} ends the relationship and leaves. Do not come back."

  4. Keep both at the top of the list with Higher priority, so they take the status line over the everyday levels. The two rules cannot match together because Suspicion cannot be both <= 20 and >= 80.

A purchase that can be refused

Money that goes up and down, with a hard floor.

  1. Meters > a Number meter Coins, 0 to 1,000, starts at 50, Can decrease on.

  2. Turn Detect from messages on. What to detect: "How many coins {{user}} has after this exchange, counting what they earn and spend".

  3. Leave the lower bound at 0. When the player tries to buy something they cannot afford, the meter stays at its floor and the chat shows a "Not enough" chip.

  4. Add a level Broke, 0 to 9, instruction "{{user}} has no money. Shopkeepers refuse them and point it out."

Starter to compare with: Wallet.

A one-time story beat

Something that should count once, like a first kiss or a confession.

  1. On the meter, add an AI rule: "{{user}} tells {{char}} they love them for the first time", impact +15.

  2. Set Can fire to Once. The rule fires one time per chat and then stays quiet, even when the player says it again.

  3. For something that may repeat but not every message, use Every N turns instead: a gift that counts every 3 turns at most.

Starter to compare with: Mood (the apology rule).

Two meters that feed each other

One meter changes another without an AI question.

  1. Meters: Energy (Bar, 0 to 100, starts at 80) and Mood (Bar, 0 to 100, starts at 60).

  2. On Energy, Decay -2 every turn, so it slowly runs out.

  3. On Mood, add a trigger: "When Energy <= 20, Change Mood by -5, Every turn while true". Tired characters get grumpy.

  4. An AI rule on Energy: "{{char}} eats, drinks coffee or rests" +25, so the player can fix it.

Starter to compare with: Energy and Mood.

A rule that reads another meter

An AI rule can mention the current value or the level name of any meter, so one rule adapts to the rest of the story.

  1. In an AI rule, open the {{ }} picker and choose a meter. Value inserts the number, for example {{meters.gold}}. Caption inserts the name of the level the meter is in, for example {{meters.affection.caption}}.

  2. Before the AI reads the rule, each token is replaced by the bare value: "{{user}} offers more than {{meters.gold}} coins" becomes "offers more than 30 coins", and "{{char}} acts in a way that fits being {{meters.affection.caption}}" becomes "fits being Warming up".

  3. Write the token inside a full sentence. The AI only sees the number or the level name, not the meter name, so "{{meters.gold}} coins" reads well and "{{meters.gold}}" alone does not.

  4. Do not use a value as an on/off switch ("while {{meters.affection}} is 20 or lower" reads as "while 30 is 20 or lower"). To run a rule only at some values, use Only when on the rule instead: Affection <= 20.

The tokens also work in level and combined rule instructions and in the status line, so "{{char}} has {{meters.gold}} coins left" stays current.

A meter that is capped until a day

Keep a relationship from going too far too early, then let it grow.

  1. Meters: Affection (Bar, 0 to 100, starts at 10) and Day (Number, starts at 1, Can decrease off). On Day, set Per message change so it counts up on its own, or move it with a keyword like "next day" +1.

  2. On Affection, add a trigger: "When Day <= 3 and Affection >= 40, Set Affection to 40, Every turn while true". Match All. Until day 4, anything that pushes Affection over 40 is pulled back to 40 on the same turn.

  3. Optional: a level Holding back, 40 to 40, instruction "{{char}} likes {{user}} but it is too soon. Keep a little distance." so the cap shows in the story.

  4. To cap only one source instead of the whole meter, skip the trigger and put Only when Day >= 4 on the AI rules that give the big boosts.

From day 4 the trigger stops matching, and Affection moves freely again.


Up next: When something does not work the way you expect.

Troubleshooting, FAQ and limits

Was this helpful?