← p11c

Story Tools

Branching stories as state, not as trees. A Petri net decides what can happen next; plain text says how it reads.

The idea
Multilinear

A story written as a tree duplicates every branch that rejoins, and every combination of "has the sword" × "told the truth" × "night time" multiplies the nodes. Multilinear models the story as independent aspects — location, mood, who knows what — that change in parallel under constraints. An event fires only when its conditions hold; what the player can do next falls out of the state. Underneath sits a Petri net, so reachable states, dead ends and events that never fire can be inspected.

example.mld — what can happen
# Leave home

location: home > outside
mom: > alone

# Sidestory mom

mom: alone > party
example.pk — how it reads
# Leave home

So you decide to leave.

You hug your mom and go outside.
example.vng — glue
multilinear example.mld
story example.pk

The structure file never holds a word of prose, the prose file never a condition; they match by heading. Rewrite the text without touching the logic, rewire the logic without touching the text.