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. fileciteturn20file0
Serialized Atoms & Events
- VoidEvent
captureStarted— broadcast when capture begins. - FloatEvent
changeCaptureParameter— raised with1on capture start (used by music). - VoidEvent
yearPassed— triggers the yearly notoriety calculation. - FloatVariable
captureIncreasePerTick,captureProgress,captureGainPerTickMult - FloatVariable
notorietyIncreasePerLab,notorietyIncreasePerRoute,notorietyProgress,notorietyGainMult - IntVariable
labCount,routeCountfileciteturn20file0
Lifecycle
- Start()
- If
captureProgress > 0on boot: immediately raiseschangeCaptureParameter(1),captureStarted, and enables ticking capture. - Else: registers
YearlyNotorietyIncreasetoyearPassed. fileciteturn20file0
- If
- Tick() (only when capture is enabled)
captureProgress += captureIncreasePerTick * captureGainPerTickMult. fileciteturn20file0
- OnDestroy()
- Unregisters from
yearPassed. fileciteturn20file0
- Unregisters from
YearlyNotorietyIncrease()
- Skips if capture already enabled.
- Computes:
labProgress = labCount * notorietyIncreasePerLab * notorietyGainMultrouteProgress = routeCount * notorietyIncreasePerRoute * notorietyGainMult
notorietyProgress += labProgress + routeProgress- If
notorietyProgress >= 1→ raiseschangeCaptureParameter(1),captureStarted, and enables capture ticking. fileciteturn20file0
Integration Notes
- Wire
yearPassedto whatever system advances the in‑game year. - Connect
changeCaptureParameterto your music manager to bring in capture tension layers.