Log inGet started
Package

missions.module

README.md

missions

The eighteen story missions, as data the mission runner runs.

A mission is a list of steps. A step has a goal (a condition), may have a fail condition and a time limit, may
be a checkpoint (where a retry returns to), may be a DECISION (`choose`) and may exist only on the branch one
option opened (`when = { chose = "x" }`). One step carries the twist: a condition that, the first time it holds,
fires the mission's "twist" moment. `bonus` objectives pay extra. `rewards` are paid on completion,
`rewardsBy[choice]` on top for each choice made. Every word is in the catalog `pm_story`:
`missions.<id>.title`, `.giver_line`, `.brief`, `.twist`, `.done`, `.failed`, `.steps.s<n>`, `.options.<choice>`.

Conditions (logic.missionRunner):
  { fact = "near:studio" }   { fact = "level", atLeast = 3 }   { fact = "tins", atMost = 0 }   { fact = "state", is = "clear" }
  { event = "signed", match = { site = "fishmarket" }, min = { rank = 2 }, count = 1 }
  { after = 30 }   { all = { ... } }   { any = { ... } }   { never = cond }
Facts (logic.session supplies them every tick; the host adds its own through the frame's `facts`):
  near:<place or named site>   in:<district>   colour:<district>   trust:<contact>   flag:<name>   has:<upgrade>
  driving:<vehicle type>   state   level   heat   hour   night   weekday   day   in_vehicle   hot   speed
  tins   van_tins   painting   firing   colour (0..1, Wren's own)   washed_out   strikes   rank   sous   blocks
  hidden   on_ground   painted:<site> (0..1)   tier:<site> (0 none, 1 rough, 2 clean, 3 masterwork)
  host: load (0..1 of a carried load left)   aboard:<tram | ferry | cradle>   on_roof   height (m above the street)
Events (the game reports the first group; the host reports the second with session:event):
  signed { site, tier, rank, district, size }   bought { tins, pigment }   upgraded { id }   escaped { level }
  arrested   ejected   reported   noticed   scrubbed { site }   scrub_stopped { site, how }   jammed { id }
  blinded { id }   fouled { id }   painted_out { kind }   washed_out   fired { arm }   boarded { type, owned }
  alighted   stored   retrieved   fenced   shed { what }
  talked { who }   delivered { to }   arrived { at }   patrol_passed { at }   freight_gone   inspector_returned
  panels_filled   picked_up { what }   float_painted   convoy_stalled   convoy_passed   cut_loose   file_burnt   map_copied

`stage` directions (a list on a step or a twist). GAME verbs are applied by logic.session; HOST verbs by the
driver's stage director through actors, vehicles, camera and audio (Missions.VERBS lists both):
  game: { give = "tins", pigment, n }   { set_hour = h }   { scrub = site, in_seconds, unstoppable }   { heat = level }
        { van_tins = n, pigment }   { flag = name }   { grant = upgrade }   { scrub_call = district, in_seconds, crew }
  host: { spawn = kind, at = place, id, count, walks_to, leaves, stays, returns_in }   { despawn = id }
        { crowd = name, at }   { patrol = "reverse" | "double", at }   { shut = "bridges" | "roads", district }
        { vehicle = type, at, id, state }   { convoy = name, from, to }   { load = name }   { trail = true }
        { show = name, district }   { say = line, who }   { shot = name }   { freight = "pass" }
        { searchlights = pattern }   { winch = true }   { doors = "open", held_by }   { marker = place }
        { item = what, at = place }  something to pick up there (reports picked_up { what })
        { handover = to, at = place } someone to hand a thing to there (reports delivered { to })
        { sketch = place }           a place to draw from (reports sketched { at })

  local Missions = require("metropolisGame.content.missions")
  Missions.list   Missions.byId("first_coat")   Missions.order   Missions.sites   Missions.VERBS

The interface is documented in the header of init.luau; this file repeats it for the asset browser.