> For the complete documentation index, see [llms.txt](https://docs.spicychat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spicychat.ai/product-guides/rulebooks/common-recipes.md).

# 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.

{% hint style="success" %}
**You only need one.** Pick the recipe that matches your idea, build it, [playtest it](https://docs.spicychat.ai/product-guides/rulebooks/playtest-and-checks.md), and stop there. The others can wait for your second Rulebook.
{% endhint %}

## A secret revealed at Trust 80

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

1. [Meters](https://docs.spicychat.ai/product-guides/rulebooks/meters.md) > a Bar meter **Trust**, 0 to 100, starts at 20.
2. [Influence rules](https://docs.spicychat.ai/product-guides/rulebooks/influence-rules.md#levels) > 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](https://docs.spicychat.ai/product-guides/rulebooks/making-meters-move.md#ai-rules) on Trust: "`{{user}}` shares something personal about themselves" +6, "`{{user}}` lies to `{{char}}`" -15.

Starter to compare with: [Trust and secrets](https://docs.spicychat.ai/product-guides/rulebooks/examples-to-clone.md#starter-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](https://docs.spicychat.ai/product-guides/rulebooks/meters.md#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](https://docs.spicychat.ai/product-guides/rulebooks/examples-to-clone.md#starter-day-and-night).

## A win and a lose ending

Two [combined rules](https://docs.spicychat.ai/product-guides/rulebooks/influence-rules.md#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](https://docs.spicychat.ai/product-guides/rulebooks/meters.md#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](https://docs.spicychat.ai/product-guides/rulebooks/examples-to-clone.md#starter-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](https://docs.spicychat.ai/product-guides/rulebooks/making-meters-move.md#ai-rules): "`{{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](https://docs.spicychat.ai/product-guides/rulebooks/examples-to-clone.md#starter-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](https://docs.spicychat.ai/product-guides/rulebooks/making-meters-move.md#decay) -2 every turn, so it slowly runs out.
3. On Mood, add a [trigger](https://docs.spicychat.ai/product-guides/rulebooks/making-meters-move.md#triggers): "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](https://docs.spicychat.ai/product-guides/rulebooks/examples-to-clone.md#starter-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](https://docs.spicychat.ai/product-guides/rulebooks/making-meters-move.md#ai-rules), 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](https://docs.spicychat.ai/product-guides/rulebooks/meters.md#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](https://docs.spicychat.ai/product-guides/rulebooks/making-meters-move.md#triggers): "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.

{% content-ref url="/pages/FKWE3tDkkCV584VQC2Mn" %}
[Troubleshooting, FAQ and limits](https://docs.spicychat.ai/product-guides/rulebooks/troubleshooting-faq-and-limits.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.spicychat.ai/product-guides/rulebooks/common-recipes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
