Skip to main content

Events

External packages attach nexSys4 listeners through the Nexus eventStream global. eventStream is the canonical listener interface for cross-package integrations.

eventStream.registerEvent(
"nexsys4.aff.got",
(payload) => {
console.log(payload.name);
},
{ id: "my-package:aff-got", tags: ["my-package"] },
);

Every payload includes topic and at. Events with a scoped variant can also be targeted by appending the payload value shown in angle brackets. For example, nexsys4.aff.got.asthma listens only for the asthma affliction, while nexsys4.aff.got listens for every gained affliction.

The list below is generated from the runtime topic registry. If an event is not listed here, it is not part of nexSys4's external EventStream contract.

Runtime and system

EventScoped variantsDescription
nexsys4.runtime.startednoneRuntime startup completed.
nexsys4.runtime.stoppednoneRuntime shutdown completed.
nexsys4.raw.gmcpnoneRaw GMCP payload observed at the adapter boundary.
nexsys4.system.vitals.changednoneCharacter vitals changed.
nexsys4.system.health.changednoneHealth changed.
nexsys4.system.mana.changednoneMana changed.
nexsys4.system.rage.changednoneRage changed.
nexsys4.system.bleed.changednoneBleed changed.
nexsys4.system.status.changednoneCharacter status snapshot changed.
nexsys4.system.class.changednoneCharacter class changed.
nexsys4.system.target.changednoneCurrent target changed.
nexsys4.system.room.changednoneCurrent room changed.
nexsys4.system.room_items.changednoneVisible room items changed.
nexsys4.system.pause.changednoneRuntime pause state changed.
nexsys4.system.pausednoneRuntime paused.
nexsys4.system.unpausednoneRuntime unpaused.
nexsys4.system.loadednoneStartup game-state initialization completed.
nexsys4.system.death.detectednoneDeath was detected from character state.
nexsys4.system.mount.changednoneMounted state changed.
nexsys4.system.wielded.changednoneWielded equipment changed.

Afflictions, defences, balances, and limbs

EventScoped variantsDescription
nexsys4.aff.gotnexsys4.aff.got.<name>Affliction became active.
nexsys4.aff.lostnexsys4.aff.lost.<name>Affliction was cured or removed.
nexsys4.aff.stack.changednexsys4.aff.stack.changed.<name>Affliction stack count changed.
nexsys4.def.gotnexsys4.def.got.<id>Defence became active.
nexsys4.def.lostnexsys4.def.lost.<id>Defence expired or was removed.
nexsys4.balance.gotnexsys4.balance.got.<id>Balance became available.
nexsys4.balance.lostnexsys4.balance.lost.<id>Balance was consumed or lost.
nexsys4.balance.resetnexsys4.balance.reset.<id>Balance timing was reset.
nexsys4.balance.duration.observednexsys4.balance.duration.observed.<id>Observed balance recovery duration changed.
nexsys4.eqbal.gotnoneBalance and equilibrium are both available.
nexsys4.limb.hitnexsys4.limb.hit.<limb>Limb damage was recorded.
nexsys4.limb.resetnexsys4.limb.reset.<limb>Limb tracking was reset.
nexsys4.limb.stage.changednexsys4.limb.stage.changed.<limb>Limb damage stage changed.

Items, cache, queue, rules, and serverside

EventScoped variantsDescription
nexsys4.cache.amount.changednoneCached item counts changed.
nexsys4.cache.inventory.listnoneInventory cache snapshot applied.
nexsys4.cache.rift.listnoneRift cache snapshot applied.
nexsys4.item.room.addednoneAn item appeared in the current room.
nexsys4.item.room.removednoneAn item left the current room.
nexsys4.item.room.updatednoneA current-room item changed.
nexsys4.item.room.listnoneCurrent-room item list snapshot received.
nexsys4.item.inv.addednoneAn item was added to inventory.
nexsys4.item.inv.removednoneAn item was removed from inventory.
nexsys4.item.inv.updatednoneAn inventory item changed.
nexsys4.item.inv.listnoneInventory item list snapshot received.
nexsys4.queue.sentnexsys4.queue.sent.<queueName>A queue submission was accepted by the server.
nexsys4.queue.firednexsys4.queue.fired.<queueName>A queue fire was acknowledged for a named queue.
nexsys4.queue.fired.acknoneQueue fire acknowledgement was recorded.
nexsys4.serverside.aff.priority.setnexsys4.serverside.aff.priority.set.<id>Live serverside affliction priority confirmation was observed.
nexsys4.serverside.def.priority.setnexsys4.serverside.def.priority.set.<id>Live serverside defence priority confirmation was observed.
nexsys4.rule.activatednexsys4.rule.activated.<id>Serverside rule became active.
nexsys4.rule.deactivatednexsys4.rule.deactivated.<id>Serverside rule stopped being active.

Contract notes

  • Base and scoped events receive the same payload object.
  • Scoped events are available only where a scoped variant is listed.
  • nexsys4.raw.gmcp is emitted only when publishRawGmcp is enabled.
  • Adapter-local events such as PromptEvent, NoticeEvent, TargetSetEvent, and TargetChanged are not nexSys4 events.