snapshot_diff
Compares two snapshots and says what differs: the same save and inputs run in two engines, or the game at two moments. Pass a and b, each a snapshot or a file holding one. Creatures are matched by their key (tag | template#k), not by id. |
The answer has same, count and differences, each with a JSON pointer path, the values a and b, and by for a distance or an amount. Where the game times differ past the tolerance, skew is b’s minus a’s: line the two up before reading the rest. notCompared lists fields only one side gave. Needs no game.
Read-only: it writes nothing.
Arguments
| Name | Type | Required | What |
|---|---|---|---|
a | any | yes | A snapshot as snapshot answers it (or another engine writes it, the same schema), or the path of a file holding one. |
b | any | yes | A snapshot as snapshot answers it (or another engine writes it, the same schema), or the path of a file holding one. |
tolerance | object | How far a value may differ and still be the same: position (metres, default 0.01), facing (degrees, 1), health and stamina (points, 0), time (seconds, 0.05: the game time and an effect’s time left). | |
most | integer (≥ 1, ≤ 5000) | The most differences to list. Default 200; count has them all. |
Call it as snapshot_diff over MCP, or from a shell as ghilana.exe --call snapshot_diff '<arguments as JSON>'.