Skip to content

Save, load and death

The host keeps one save per world, with the world itself and a character sheet for every player. When a survivor dies, the world goes on and the player starts a new character in it.

In the game

What the save keeps

For the world:

  • The clock and the options, the weather episode and the snow on the ground.
  • The contents of every container.
  • Every door, window and fence (open, locked, broken), and every barricade with its kind and its layers.
  • Every piece you built (a built door open or shut), and the furniture you built, moved or carried away.
  • Every item on the floor (a bag with its contents).
  • Every zombie with its type and health.
  • Every vehicle that came from a spawn point, with its place, parts, fuel, battery, locks, key and broken windows. Its trunk, glove box and seats are containers like the others.
  • The stock of every fuel pump.

On Pine Hollow, also:

  • The packed zones and the world events.
  • The houses' locks, keys and alarms.
  • The felled trees and the fire.
  • The generators, and the days the power and water go off.
  • The car points already drawn.

For each player, one character sheet:

  • Their position, and whether they are alive or dead.
  • The four needs, the infection, the statuses, body temperature and wetness.
  • The wounds with their treatments.
  • The bag, the equipped item, the weapon slots, the clothes worn and what the worn bags hold.
  • The recipes learned.

A weapon or a tool keeps its condition, charge and repairs wherever it is saved. The skin's stains are not saved: the clothes keep their blood and dirt, and the skin starts clean again when a character is loaded.

When the host saves

Only the host saves, into its own Saved/SaveGames/. It saves from the pause menu (SAVE GAME, shown to the host only), when the host quits, and automatically at a fixed interval of game time.

A world has two files, written in turn, so a save cut short leaves the previous one intact. Loading takes the newest valid one.

Pressing Play on a map in the editor, without going through the menu, saves to the two files ZS_World_A and ZS_World_B, not to one of the worlds of the menu.

Death

When a survivor dies, everything they carried and wore drops on the ground where they fell, and the others can loot it. Input is cut at once, and the death screen comes 1.5 s later.

The death screen reports the cause of death, how long the character survived and the zombies they put down, then offers CREATE CHARACTER, MAIN MENU and EXIT GAME. CREATE CHARACTER starts a new character in the same world, at the world's start point, with the starting kit.

The cause of death is the first of these that applies:

  1. A hit taken in the last 10 s, from a zombie or another survivor.
  2. Otherwise the infection, if its incubation had elapsed.
  3. Otherwise hunger or thirst.
  4. Otherwise bleeding.
  5. Otherwise a body that gave out.

A group takedown by three zombies shows "Dragged down by the dead."

The assets

Content/ZombieSurvival/Blueprints/Core/SG_World is the save class. It is versioned, and written through AC_WorldPersistence on the game mode.

Nothing in the save file is an object reference. Items are stored as string ids and resolved back through DataAssets/Items/Childs/DA_ItemRegistry_Default, so an item missing from that registry is dropped on load. Each lost id writes one line in the Output Log: Item id '…' read from a save is not in the item registry.

Every persistent actor placed in a map carries a SaveId, the key the save stores. Two containers that share a SaveId empty together.

Asset Property Default What it does
Blueprints/Core/BP_ZSGameInstance AutosaveGameMinutes 120 game minutes the autosave interval, which is 150 real seconds at the default day length of 30 minutes
Blueprints/Core/BP_ZSGameMode WorldSlotA, WorldSlotB ZS_World_A, ZS_World_B the two files a map played from the editor, without the menu, saves to
Blueprints/Core/BP_ZSPlayerController DeathScreenDelay 1.5 s the wait before the death screen
Blueprints/Player/BP_Survivor RecentHarmSeconds 10 s how recent a hit must be to be the cause of death
DA_ItemRegistry_Default ItemDefs every item how saved item ids are resolved on load

Change it

  • To change the autosave interval, set it in the Class Defaults of BP_ZSGameInstance. The death screen delay is on BP_ZSPlayerController, and the harm window on BP_Survivor.
  • To keep a new item loadable, register it in DA_ItemRegistry_Default.

Save ids for your own map

Your own placed actors are saved once they have a save id. After placing doors, windows, fences, barricades, containers, furniture or pickups:

  1. Right-click any actor of the open map.
  2. Pick Scripted Actor Actions > Assign Save Ids, then Scripted Actor Actions > Validate Save Ids.
  3. Save the map.

The two actions come from the editor tool Blueprints/Editor/EUB_SaveIdTool. They treat the whole map, whichever actor you clicked.