Log inGet started
Package

chronicle.module

README.md

chronicle

What the city remembers about this player, and what the paper says about it.

It keeps TALLIES of things that happened (walls signed by tier, Wardens painted out, escapes by level, cars
borrowed, nights without an arrest...), fires each authored MEMORY once when its condition first holds (a
"the city remembers" moment with lasting text and optional rewards), and picks the day's HEADLINE: the
highest-priority authored rule whose condition matches the player's present state, so the newspaper reacts to
what she has been doing. All three are data (content.chronicle); conditions use the mission runner's evaluator
over the tallies and whatever facts the game adds.

  local Chronicle = require("metropolisGame.logic.chronicle")
  local ch = Chronicle.new(ChronicleContent, hub?)
  ch:count("walls_signed")   ch:count("tins_fired", 3)   ch:set("best_escape_level", 3)   ch:max("streak", n)
  ch:tally("walls_signed")                          -- 0 when never counted
  local fired = ch:tick({ rank = 2, ["colour:old_quay"] = 55 })   -- { memoryId, ... } newly remembered (also on the hub)
  ch:remembers("first_masterwork")
  local h = ch:headline(day, facts)                 -- { id, key = "pm_street.headlines.<id>", priority } or nil
  ch:memories()                                     -- { { id, day } } in the order they happened (for a journal)
  ch:serialise()   ch:restore(data)

Hub events: "remembered" { id, rewards }.

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