Skip to content

Defining Events

Events are the unit of Pack capability: a viewer-triggered Cue fires an Event, which the bridge dispatches as an Invocation to the Adapter.

[events.apply_status]
summary = "Apply a status condition to a Pokémon-like creature."
queue = "default"
[events.apply_status.params_schema]
type = "object"
required = ["status"]
[events.apply_status.params_schema.properties.status]
type = "string"
enum = ["burn", "freeze", "paralyze"]
"x-mobrule-viewer-override" = true

Each Event has a summary, a queue (one of the Pack’s declared [queues.<name>] entries), and a params_schema (JSON Schema). The schema is compiled and cached once per Pack load.

The Invocation payload sent to the Adapter must validate against params_schema. Payloads >16 KiB are rejected at ingress.

Use:

  • type, required, enum, pattern, minimum, maximum, maxLength
  • additionalProperties = false to lock the shape.
  • Nested objects for grouped params.

Viewer-overridable params (x-mobrule-viewer-override)

Section titled “Viewer-overridable params (x-mobrule-viewer-override)”

Set "x-mobrule-viewer-override" = true on a property to surface it in the broadcaster’s Cue→Event mapping UI as a viewer-controlled input. The platform will render an input field from the JSON Schema and validate the viewer’s value before producing an Invocation.