Guide

Broadcasts and world events

One line to a whole town, and events that are nobody's fault. New in 0.1.7. Optional: nothing else depends on it.

1 Broadcast a line

POST http://localhost:8767/v1/broadcast
{ "from": "the mayor", "text": "There's a tornado warning", "to": "all" }
->  { "ok": true, "heard_by": 34, "orders": 0, "wakes": 31 }

From the terminal, lw broadcast "There's a tornado warning" --from "the mayor". From an agent, the MCP tool broadcast.

to is one of:

towho hears it
"all" (the default)every named character in the last state feed
["Tobias", "Mara"]those characters
{"near": [x, z], "radius": 40}everyone within the radius of that point, from the last state feed

The answer comes back straight away. heard_by is how many journals got the line, orders how many characters were given the instruction in it, wakes how many will plan something about it. The reactions follow on the next ticks; your game only runs the commands it is sent, exactly as for anything else.

2 Order, news, offer, or a mix

The brain decides what the line is, once, for everyone:

A line is an order only when part of it is shaped like one (an imperative, "everyone to…", "you must…") and the command gate can ground that part. Reported speech ("the guards told everyone to stay calm") is news.

3 Who said it

Every listener's journal records the line as kind: "broadcast" with told-by:<from>. It is hearsay, and it is treated as hearsay:

4 What a character does about a hazard or an offer

A line classed hazard ("fire at the inn", "the river's rising", "raiders on the north road") or opportunity ("the fair opens at noon", "the smith is hiring") wakes a character when its weight times the character's persona reaches 5 (wrongs keep their own bar of 8). The persona shapes the plan:

whoon a hazard
a watchman or guardwarns others, then holds his post
a childshelters at home
an innkeepershelters at her inn and opens the door to others
someone stubbornfinishes the task first, then shelters: a late shelter, not no shelter
whoever is at the hazard's placegets out first
anyone elseshelters

An opportunity is attended when its time is free that day and no mission holds it. An all-clear ("the storm has passed", "the fire's out") ends a shelter and the character goes back to her day; a shelter also ends by itself after two game hours. A grudge she was pursuing is set aside for the reaction and resumes after it.

The manifest's per-character salience block replaces the persona's multipliers ({"hazard": 1.4, "opportunity": 0.5}; 0 means never wakes for this), and never rules still filter every move. See Manifest.

What reads these classes. The event gate 0.1.7 fetches reads hazards, opportunities and all-clears in your own words, next to the wrongs, gifts, needs and background lines it always read. A line it is not sure of goes to the unsure lane. If your world has phrasings of its own (a hazard only your lore names, an offer spelled your way), name them in the manifest's events section and they are stamped before the gate:

"events": {
  "hazard":      ["tornado warning", "the dam has burst"],
  "opportunity": ["free food", "the fair opens"],
  "clear":       ["storm has passed", "the fire is out"]
}

5 The moves need bodies

Shelter, warn others, evacuate, hold a post and attend are verbs of the town-2 vocabulary. Declare "vocabulary": "town-2" and list the ones your characters may use; a town-1 manifest keeps exactly its old behaviour, and a character with none of them simply does not react to a hazard. With no manifest loaded, every move is available.

verbengine action (default)what your game does
shelterseek-covergo indoors (the nearest door, or your own home), or behind something solid
warn-otherssay, then navigate-toshout the warning, then move
evacuate-tonavigate-torun to the named place
hold-postguardstay put, alert
attendnavigate-to, then idle_socialwalk to the event and join in

Rebind any of them to an action of your own with the verb's engine. lw manifest check lw.manifest.json --executes <your actions> lists every verb with no body in your game, so nothing silently does nothing.

6 World events, one witness at a time

For an event only some characters see, keep using the perception door, one line per witness:

POST http://localhost:8767/v1/perceive   { "char": "Mara", "text": "the inn's kitchen is on fire" }

The classes above apply the same way. There is nothing to list per event and nothing to script.

7 Reading what happened

lw watch shows the reactions as they happen; lw why tobias shows the plan, the move he is on and the line that woke him. The flywheel log carries deliberator_wake with the class, deliberator_hearsay when a told wrong was held against someone who is not the player, and deliberator_stand_down with all clear.

Next: Give orders.