Skip to main content

Events

insight emits and consumes eventStream events for afflictions, defences, balances, limbs, and skill detection.

Emitted events

EventPayloadDescription
insightLoadednoneFired when insight has finished initialization.
insightAffsUpdatednoneAffliction state updated.
insightGotAffAfflictionAny aff added.
insightLostAffAfflictionAny aff removed.
insightGotDefDefenceAny defence added.
insightLostDefDefenceAny defence removed.
insightGotBalBalanceAny balance regained.
insightLostBalBalanceAny balance lost.
insightLimbHitLimbLimb damage updated.
insightLimbBreakLimbLimb broken.
insightLimbResetLimbLimb reset.
insightUsedCure{ id, person }Cure used.

Affliction specific events

These events include the affliction id in the name. Use inline code to avoid MDX parsing issues.

  • insightGotAff{afflictionId}
  • insightLostAff{afflictionId}

Example:

eventStream.registerEvent("insightGotAffasthma", (aff) => {
console.log(`Target gained ${aff.id}`);
});

Defence specific events

  • insightGotDef{defenceId}
  • insightLostDef{defenceId}

Balance specific events

  • insightGotBal{balanceId}
  • insightLostBal{balanceId}

Limb specific events

  • insightLimbHit{limbId}
  • insightLimbBreak{limbId}
  • insightLimbReset{limbId}

Timer events

Insight timers emit generic timer events used by eventStream:

  • timerReset{timerId}
  • timerStarted{timerId}
  • timerStopped{timerId}

Skill detection events

When insight processes a skill detection, it emits:

  • insight.<skill>.<ability>

Example:

eventStream.registerEvent("insight.occultism.instill", (args) => {
console.log(args);
});

Consumed events

insight listens to:

  • IRE.Target.Set
  • PromptEvent
  • nexSkillMatch
  • nexSkillNpcMatch

These feed target updates, prompt display, and skill parsing.