# Let AI write the NPCs but keep the rules in code

PaperChase agent use case (free feed entry), version 1.0. Source: [Ghamra Studios (@Ghamrastudios on X)](https://x.com/Ghamrastudios/status/2112036410878243267), 2026-10-19.

## What they did

There are no dialogue trees: you type what you say, and characters answer what you actually said. In a posted example a scribe offered 120 gold for a job, the player asked for double, and the scribe agreed to 240, which the game then recorded and enforced. When you try to talk an enemy down, the AI only scores how good the argument was and the game's own rules decide whether it works. Places you mention and errands you accept get written into the map, and a setting at New Game picks whether the world is written for under 13, 13 to 17, or adults.

## Worth knowing

The split (AI for words, code for numbers and outcomes) is the reusable design lesson, because it keeps the game learnable and stops a model from talking its way past the rules. The Steam page carries an unusually clear AI disclosure. The game is still listed as coming soon, needs an internet connection, and uses a monthly fair-use limit with paid credits beyond it, so treat this as a design pattern to study rather than a game to recommend yet.

## Workflow template

```text
Apply this workflow to [your project]:
1. Let the model write [world text, character voice, replies].
2. Keep every rule that decides outcomes (damage, prices, deals, win and lose) in plain code the model cannot change.
3. Pass the model only the facts the rules produced, and validate its reply against them before showing it.
4. Log every case where the model contradicts the rules and add a code check for it.
Stop and ask me before anything irreversible: deploys, payments, sends or deletes.
```

## Steps

1. **Let the model write [world text, character voice, replies].** Let the model write [world text, character voice, replies].
2. **Keep every rule that decides outcomes (damage, prices, deals, win and .** Keep every rule that decides outcomes (damage, prices, deals, win and lose) in plain code the model cannot change.
3. **Pass the model only the facts the rules produced, and validate its rep.** Pass the model only the facts the rules produced, and validate its reply against them before showing it.
4. **Log every case where the model contradicts the rules and add a code ch.** Log every case where the model contradicts the rules and add a code check for it.

## Credit

Workflow reported by Ghamra Studios (@Ghamrastudios on X): https://x.com/Ghamrastudios/status/2112036410878243267
Related: https://store.steampowered.com/app/5370050/

Summary and template written by PaperChaseWebb in our own words. Questions: mgmt@paperchasewebb.com
