Skip to content

SavePort

Where saves live; the host app supplies it. who is a seat key (“u:”) for a person’s profile, null for a game’s shared world save (rooms played together), “alone:” for one person’s own world save (Play alone: a room of one keeps its own game, so playing together never touches it). slot is the app’s stable key for the game. store(…, null) deletes. Keep a world at least saveDays (90).

load(scope, slot, who): Promise<{ at: number; data: unknown; v?: number; } | null>

null = nothing saved. Reject only when the save could not be read (the hub then writes nothing over it and tries again later).

string

string

string | null

Promise<{ at: number; data: unknown; v?: number; } | null>


store(scope, slot, who, data, meta?): Promise<void>

meta.session: one id per room session for world saves, so a store that keeps an earlier copy can take it once per session. meta.v: the game’s save format number (multiplayer.saveVersion), kept with the data and given back by load (a file without it counts as 1).

string

string

string | null

unknown

string

number

Promise<void>