Snapshots, epochs, restore plans
Reconnect persistence internals
Optional recovery of equipment, position or vehicle seat after a disconnect. It never handles death; the soul template owns that.
1. Model
The server keeps two maps: FFPP_snapshots (latest accepted state per UID) and
FFPP_pending (plans awaiting acknowledgement). A reconnect asks for a plan, receives it on the client,
and acknowledges after applying it. Snapshots expire after maxAge (default 900 s) and are pruned by a
one-minute server loop.
2. Epoch guard
Every enable/disable transition increments FFPP_epoch and clears both maps. In-flight reports carrying an
old epoch are rejected, so a briefing snapshot cannot be restored after Zeus enabled recovery mid-mission, and a
disabled service cannot silently revive old data.
3. Flow
Validation checks the reporting owner (remoteExecutedOwner), liveness, that the unit is a player, and that
the loadout is a plausible ten-element array. Deaths and respawns call persistenceForget, so a corpse
never restores into a new life.
4. Restore
- Loadout is applied first; equipment is restored even if positioning fails.
- Vehicle recovery prefers the original seat, then any free seat, and reports failure instead of teleporting into a wall.
blockedcallback lets the mission pause recovery during cutscenes, soul sequences or emissions.persistenceFinishRestoreclears the in-progress flag and publishesFFPP_ready.
5. Entry points
// server
["server", createHashMapFromArray [["enabled", true], ["maxAge", 900]]]
call FF_utils_fnc_persistenceStart;
// each client, including JIP
["client", createHashMapFromArray [
["snapshotInterval", 5],
["blocked", { missionNamespace getVariable ["MyMission_cutscene", false] }]
]] call FF_utils_fnc_persistenceStart;
[false] call FF_utils_fnc_persistenceSetEnabled; // disable and clear
Horror exposes the same recovery through its FFPP_* functions and state keys.
Related functions
FF_utils_fnc_persistenceStart— Starts opt-in session recovery on the specified machine role.FF_utils_fnc_persistenceSetEnabled— Changes recovery collection and invalidates all earlier snapshots.FF_utils_fnc_persistenceSnapshot— persistenceSnapshot handler for session reconnect recovery.FF_utils_fnc_persistenceRequestRestore— persistenceRequestRestore handler for session reconnect recovery.FF_utils_fnc_persistenceApplyRestore— Accepts a server restore plan for the local player.FF_utils_fnc_persistenceForget— Removes recovery data belonging to a dead or respawned body.