# Events and state

> How Author works out a character's state: events with effects on strands, folded in story order, plus the profile, the age from the birth date and the last scene they were in.

Source: https://author.geenius.io/docs/events-and-state/

Author does not remember where your characters are. It **works it out**, from the events you mark.

## Events

An event sits on a **strand**. It has a title and a **kind**: beat, plot point, development, reveal, travel, injury, death, birth, relationship change, learns, weather or custom. It happens either at a time (a start, and an end or duration) or **anchored to a scene** (it happens at the scene's end). It can be about one character, and it has an **importance** from 1 to 3.

An event has **effects** on characters. An effect names a character, an operation (add, replace or remove) and a path:

| Path | Meaning |
|---|---|
| `location` | A place profile id |
| `injuries`, `knows`, `possessions` | Lists: add or remove an item |
| `mood`, `status` | A value |
| `alive` | `false` means dead |
| `appearance.<x>` | Something about how they look |
| `relations.<other id>` | What they are to someone, such as "engaged" |
| `facets.<facet>.<field>` | A change to a facet of the profile |

A travel event can name a mode: walk, horse, bicycle, car, train, boat or plane.

## State

The state of a character at a moment is built from four layers:

1. **Base**: the profile as it is (who they are).
2. **Derived**: age from the birth date, alive from the birth and death dates.
3. **Overlay**: every event up to that moment, folded in story order.
4. **Presence**: the last scene they were in before that moment sets their location, unless a later event moved them.

The result has `alive`, `age`, `location`, `injuries`, `knows`, `possessions`, `mood`, `status`, `appearance`, `relations`, `facets` and anything else an effect named. It is pure: the same story and the same time always give the same state, and **each change says which event, strand and scene made it**.

## Asking

You ask for a state at a time, or at a scene (its start or its end). You can also ask what **changed** for a character between two moments, and why.

```json title="State and difference (through Geenius OS, Premium and Max)"
{ "tool": "story", "action": "state", "args": { "book_id": "<book>", "profile_id": "<character>", "scene_id": "<scene>" } }
{ "tool": "story", "action": "state_diff", "args": { "book_id": "<book>", "profile_id": "<character>", "from_scene_id": "<a>", "to_scene_id": "<b>" } }
```

## What it does not do

Author does not read your sentences to find events. If Ilse learns a secret in scene 7, you add an event "Ilse learns the secret" with the effect `knows + the secret`. That is the price, and the benefit: the answer is exact and the checks can be exact too.

## Habits that help

- Add events as you finish a scene, not months later.
- Keep one strand per thread you care about.
- Use anchored events for what happens in a scene, so moving the scene moves the event.
