CaptureController

Overview

Drives the capture mechanic and its prelude via notoriety. Before capture starts, it listens for a yearly tick and grows notorietyProgress based on the current number of Labs and Routes. Once notoriety reaches 1.0, it raises a capture started signal, flips an FMOD Capture music parameter via a float event, and begins incrementing captureProgress every simulation tick. fileciteturn20file0

Serialized Atoms & Events

  • VoidEvent captureStarted — broadcast when capture begins.
  • FloatEvent changeCaptureParameter — raised with 1 on capture start (used by music).
  • VoidEvent yearPassed — triggers the yearly notoriety calculation.
  • FloatVariable captureIncreasePerTick, captureProgress, captureGainPerTickMult
  • FloatVariable notorietyIncreasePerLab, notorietyIncreasePerRoute, notorietyProgress, notorietyGainMult
  • IntVariable labCount, routeCount fileciteturn20file0

Lifecycle

  • Start()
    • If captureProgress > 0 on boot: immediately raises changeCaptureParameter(1), captureStarted, and enables ticking capture.
    • Else: registers YearlyNotorietyIncrease to yearPassed. fileciteturn20file0
  • Tick() (only when capture is enabled)
    • captureProgress += captureIncreasePerTick * captureGainPerTickMult. fileciteturn20file0
  • OnDestroy()
    • Unregisters from yearPassed. fileciteturn20file0

YearlyNotorietyIncrease()

  • Skips if capture already enabled.
  • Computes:
    • labProgress = labCount * notorietyIncreasePerLab * notorietyGainMult
    • routeProgress = routeCount * notorietyIncreasePerRoute * notorietyGainMult
  • notorietyProgress += labProgress + routeProgress
  • If notorietyProgress >= 1 → raises changeCaptureParameter(1), captureStarted, and enables capture ticking. fileciteturn20file0

Integration Notes

  • Wire yearPassed to whatever system advances the in‑game year.
  • Connect changeCaptureParameter to your music manager to bring in capture tension layers.