Saving
Learning paths through this topic
Hundreds of story flags make the save file long and slow to read
A long adventure remembers who you met, which doors you opened and what you chose. Written out one by one, this fills the save. Here is a compact way to store all of it, and the one rule that keeps old saves from reading the wrong answers after an update.
Conjured helpers and thrown decoys come back from a save as ghosts or strangers
A summoned wolf, a decoy, a fire wall: not everything in the world should survive saving. Some should vanish, some should stay with their master, some belong to the world. Here is how to sort them when saving and what to do when the master is gone.
A thrown spear or dropped potion in mid-air is gone when the save is loaded
Saving at the moment something is flying through the air loses it for good, and for a quest item that means the game cannot be finished. Here is how to finish the flight at save time and where an item goes when it would land in a pit.
After sleeping or loading, townspeople stand at the wrong place for the hour
People in the village go to work, to the pub and to bed. Skip the time forward or load a save, and they are all still where they were or they pile up at the door. Here is how to look up where each person is from the clock alone, with nothing to simulate.
A one-of-a-kind item shows up twice after loading, in the bag and on the ground
Throw a legendary item, save during the throw, or close the game while it is changing hands, and some saves hold two copies. Here is a check that runs when loading, which copy it keeps, and how to report what it removed.
A quest needs an item the player sold, lost or threw away, and the story can't go on
Open worlds let people do anything, including getting rid of the one thing a quest needs next. Here is a check that runs on loading, looks only at what the current step needs, and puts a replacement where the player can fetch it.
After rebalancing experience, old heroes drop a level or jump up several
You make leveling faster or slower in an update. Saves that stored only the experience total suddenly show a different level, and players feel robbed or handed a free gift. Here is how to keep the level and carry the progress toward the next one over fairly.
A player changes their name and their character turns into a stranger's
Saves filed under a player's name break the moment names change or are given to someone new. Here is how to move old name-based saves onto stable accounts, what to do when two old saves belong to one person, and what must be left alone.
A save made from recorded player inputs loads into a different game than it ended in
Games where everyone's moves are recorded and replayed can save almost nothing, but one tiny difference makes a long replay drift into another world. Here is how to keep a few anchor points, notice a spoiled one, and go back to the one before it.
An update removes or renames an item and players' bags fill with broken things
Saves keep pointing at things you later changed or deleted, and the game either crashes on them or shows empty ghost items. Here is how to clean a loaded bag in one pass and tell the player what happened instead of silently eating things.
Things vanish or turn into nothing when the game is saved and loaded again
Some kinds of data quietly change or disappear when turned into a save file, so the game after loading is not the game you saved. Here is the list of the usual culprits and a way to carry them through unharmed.
The game closed while saving and now the only save file is broken
A save that is half written looks fine until you try to load it, and then everything is gone. Here is a way to always keep one good save behind the one being written, and how to tell good from broken when loading.