Guide

Tell characters what happened

The brain does not see your world. Your engine's hooks tell a character what it witnessed, in the first person, in your words. That one line is the whole perception model.

The door

POST http://localhost:8767/v1/perceive
{ "char": "Hulda", "text": "the newcomer took a purse of 40 septims right off me" }

lw serve is that endpoint. Without it, send {"kind":"perceive","char":"Hulda","text":"..."} on the socket. From the CLI: lw trigger raw "..." --char hulda.

What happens to the line

  1. It lands in Hulda's journal, on the player's disk.
  2. The gate reads its meaning and stamps a class (theft, attack, threat, slight, debt, gift, amends, need, ambient) and a weight from 1 to 10. Phrasing does not matter: a new way of saying a theft is a theft, with nothing to list and nothing to train. Nearly every wrong a game produces lands in one of those classes; the rare sentence that does not, or that the gate cannot read with enough certainty to stamp, is stamped other: a heavy one still wakes the character, your events section decides if it names the phrase, and it is captured for the next gate retrain.
  3. A heavy line wakes the deliberator on its own; small ones add up over days. Three slights make a grudge; one gift does not erase a theft.
  4. If it is worth planning about, a plan forms and its first step fires. lw why hulda shows the chain.

Where to call it from

Each engine event that matters to a character is one line: on-hit, on-steal, on-gift, on-insult, on-rescue, on-unpaid. Call it for the character who witnessed it, not for everyone; a bystander who saw the theft gets their own line ("I saw the newcomer take coin from Hulda's table").

Your world's own events

Things only you can class go in the manifest's events section and are consulted before the gate:

"events": {
  "ambient": ["the forge test-fires", "the bell rings for prayers"],
  "theft":   ["skimmed the till", "the captain's tithe"],
  "importance": { "weapon": 0 }
}

Phrases are case-insensitive substrings. importance re-weighs a word: {"weapon": 0} makes a weapon rack furniture, so the smithy stops spiking. If you find yourself adding a fifth phrasing of the same thing, that is a gate retrain (lw train gate --propose), not a longer list.

Next: See why she did that.