Skip to main content

Events

nexSys builds on eventStream and emits events for state changes, output scheduling, and user actions. This page summarizes the most important events and naming patterns.

Naming patterns

  • Afflictions: ${aff}GotAffEvent, ${aff}LostAffEvent
  • Defences: ${def}GotDefEvent, ${def}LostDefEvent
  • Balances: ${bal}GotBalEvent, ${bal}LostBalEvent
  • Trackables: ${name}GotTrackableEvent, ${name}LostTrackableEvent

System events

EventPayloadDescription
SystemLoadednonenexSys finished initial startup.
SystemPausednoneSystem paused.
SystemUnpausednoneSystem unpaused.
SystemSlowModeOnnoneSlow mode enabled.
SystemSlowModeOffnoneSlow mode disabled.
SystemStatusSetEvent{ status, arg }Settings change propagated to serverside.
SystemCharVitalsUpdatedsys.charVitals and stats updated.
SystemCharStatusUpdatedsys.charStatus info updated (class, race, target).
RoomChangedEventGMCP Room.InfoRoom change detected.

Affliction events

EventPayloadDescription
AffGotAffAny affliction gained.
AffLostAffAny affliction lost.
${aff}GotAffEventAffSpecific affliction gained.
${aff}LostAffEventAffSpecific affliction lost.
${aff}AffCountAddEventnumberCountable aff increment.
${aff}AffCountSubtractEventnumberCountable aff decrement.
${aff}AffCountSetEventnumberCountable aff set.

Defence events

EventPayloadDescription
DefGotDefAny defence gained.
DefLostDefAny defence lost.
${def}GotDefEventDefSpecific defence gained.
${def}LostDefEventDefSpecific defence lost.

Balance events

EventPayloadDescription
BalanceGotBalanceAny balance regained.
BalanceLostBalanceAny balance lost.
eqBalRecoveredEventnoneBalance and equilibrium recovered together.

Trackables

EventPayloadDescription
TrackableGotTrackableTrackable gained.
TrackableLostTrackableTrackable lost.

Limb tracking

EventPayloadDescription
nexSysLimbHitLimbLimb damage recorded.
nexSysLimbBreakLimbLimb break detected.
nexSysLimbResetLimbLimb state reset.

Output scheduling

EventPayloadDescription
SystemOutputAddstring or string[]Add output commands.
OutputSentEventstring[]Output sent to server.
SystemOutputCompleteEventnoneOutput finished (echoed by server).

Example

const onAffGot = (aff) => {
if (aff.name === "aeon") {
nexusclient.display_notice("Aeon detected");
}
};

eventStream.registerEvent("AffGot", onAffGot);