1.7 KiB
1.7 KiB
Event observation (observe → confirm → emit)
IdleSpectator learns about the game through Harmony sensors. Those sensors must not treat AI noise as catalog truth.
Pipeline
Patch (Observe) → EventOutcome (Confirm) → Feed Emit (EventReason + catalog)
| Layer | Responsibility | Lives in |
|---|---|---|
| Observe | Thin Harmony Prefix/Postfix; snapshot before when needed | Events/Patches/* |
| Confirm | Did the semantic claim happen? | Events/EventOutcome.cs |
| Bridge | Drop unconfirmed with InterestDropLog; else run emit |
Events/EventObservation.cs |
| Emit | Catalog dials, keys, EventReason labels |
Events/Feeds/* |
Rules
- Never treat
BehResult.Continueas success by itself. - Prefer state setters when they exist (
setLover,setParent*,newFamily,addNewStatusEffect). - Beh hooks need before/after confirmation (
EventOutcome.GainedFamily,StillSeekingLover, …). - Unconfirmed attempts log
outcome_unconfirmedviaInterestDropLog(not silent). - New catalog events must name their confirm predicate (or setter) in the audit TSV
game_call_site/fix_action.
Example (family join)
Vanilla BehFamilyGroupJoin returns Continue even when no nearby family exists.
Confirm with GainedFamily(before, actor) before Emit family_group_join.
Adding an event
- Find the real game call site (setter or Beh).
- Add/extend an
EventOutcomepredicate if needed. - Patch calls
EventObservation.Confirm/ConfirmAfterthen the domain feed. - Mark the audit row with the confirm rule.
- Harness: force or live path that asserts key + absence when outcome fails.