Events
insight emits and consumes eventStream events for afflictions, defences, balances, limbs, and skill detection.
Emitted events
| Event | Payload | Description |
|---|---|---|
insightLoaded | none | Fired when insight has finished initialization. |
insightAffsUpdated | none | Affliction state updated. |
insightGotAff | Affliction | Any aff added. |
insightLostAff | Affliction | Any aff removed. |
insightGotDef | Defence | Any defence added. |
insightLostDef | Defence | Any defence removed. |
insightGotBal | Balance | Any balance regained. |
insightLostBal | Balance | Any balance lost. |
insightLimbHit | Limb | Limb damage updated. |
insightLimbBreak | Limb | Limb broken. |
insightLimbReset | Limb | Limb 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.SetPromptEventnexSkillMatchnexSkillNpcMatch
These feed target updates, prompt display, and skill parsing.