snapshot
Takes the game’s state in one frame, as a JSON another engine can write too, to compare with snapshot_diff: the same save and inputs run here and elsewhere, or this game at two moments. It has the area, mode, paused, gameTime (the world clock a save keeps, in seconds; worldTime the same as day and ms), the frame and an events cursor; every creature of the area, inactive ones too, keyed tag|template#k (k counts that tag and template in the order they were made), with position, facingDegrees, health and stamina, dead, active, group, combatState, attackTarget (a key), the command’s type number and effects (type, ability, remaining); the party and the one controlled, by key. Pass plots for their flags by name, vars for variables, and file to keep it on disk for snapshot_diff. To line two runs up, pause, act, let the same game time pass, pause again, then take it.
Read-only: it changes nothing in the game.
Arguments
| Name | Type | Required | What |
|---|---|---|---|
plots | array | Plots whose flags to include, by resource name (bed000pt_main). | |
vars | array | Variables to include, each with object, name and type: object is module (the default), area, hero, controlled, a creature’s key or an id; type is int (the default), float, string or object. A variable the object’s scripts do not declare reads as 0 or empty. | |
file | string | A path to write the snapshot to as well, for snapshot_diff to read later. |
Call it as snapshot over MCP, or POST /api/tool/snapshot with the arguments as JSON.