Generated from smudgy v0.5.6 (smudgy-core.d.ts @ a6d8757f1b33). Index: scriptref.
Read the server's self-reported MSSP status variables as shared state and react when a payload updates the snapshot.
MSSP values are untrusted claims from the game server. Display them, but do not use them to grant access or make security decisions.
The module's default export (mssp).
const mssp: StateConsumer<MsspVariables>;
The server's self-reported status variables (see MsspVariables),
merged last-write-wins as payloads arrive and cleared on reconnect: read
with mssp.value, subscribe with mssp.watch(path, ...), and wire
widgets with mssp.bind(path). Read-only — MSSP has no client-to-server
direction — and live-session data only: nothing persists across sessions
here.
export interface MsspVariables { NAME?: string; PLAYERS?: string; UPTIME?: string; PORT?: string | string[]; [variable: string]: string | string[] | undefined; }
The shape of the MSSP snapshot (import mssp from "smudgy:state/mssp"):
the status variables the server volunteered about itself, one entry per
variable. Everything is a wire-string ("52", not 52) — or an array of
them where the server sent several values (PORT) — and every value is
the game's own claim: display it, never act on it. Keys are the raw spec
names, several of which contain spaces, so bracket access is normal:
mssp.value?.["MINIMUM AGE"]. Empty until the server sends MSSP.
NAME — The game's name — one of the three variables every MSSP server sends.PLAYERS — Player count at the time the server sent it — point-in-time, not live.UPTIME — Unix time the server started (a start time, not a duration).PORT — The server's port(s); an array lists alternates, preferred last.export const updated: EventConsumer<Record<string, never>>;
Fires after each MSSP payload is merged into the snapshot — once on
connect for most games, again if the server re-sends on change. Read the
merged variables through smudgy:state/mssp.
Script API reference · ← MSDP (experimental) · smudgy:core — Automations → · Scripting manual