You are viewing a potentially older version of this package. View all versions.
hiccup-SaveBackups-1.0.0 icon

SaveBackups

Automatic rolling backups of your save files, with a Backups tab built into the Load Game screen. Restore any earlier state in two clicks if a mod or a crash corrupts a save.

By hiccup
Date uploaded 3 hours ago
Version 1.0.0
Download link hiccup-SaveBackups-1.0.0.zip
Downloads 39
Dependency string hiccup-SaveBackups-1.0.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

SaveBackups

Modded games break saves sometimes. This keeps rolling copies of yours and lets you put one back from inside the game.

A Backups button appears on the Save Info panel in the Load Game screen. It lists every backup of that save with when it was taken and what is in it, and each row has Restore and Delete.

Aug 23  18:44  (manual)   2877 money, island 4, 4h 45m played   [Restore] [Delete]
Aug 23  18:44             2677 money, island 4, 4h 46m played   [Restore] [Delete]
Aug 23  18:43             2877 money, island 4, 4h 45m played   [Restore] [Delete]

The money, island and playtime are read out of each backup file, so you can tell which one you actually want instead of guessing from a timestamp.

When backups happen

Automatically every time the game saves, which includes the five minute autosave, and again when you pick a save to load, so you always have the state you started a session with. You can also take one on demand with Back up now.

Restoring is safe

Restoring takes a backup of the current file first, marked manual, so restoring is itself undoable. If you pick the wrong one you have not lost anything.

Manual backups are never deleted automatically. Only automatic ones rotate, keeping the newest few.

The mod also refuses to back up or restore an empty file.

Where the files live

%USERPROFILE%\AppData\LocalLow\Dazed Games\How to Fish\SaveBackups\<save name>\

They are plain copies of the game's own save files, so you can also just copy one back by hand if you prefer. Open folder in the menu takes you straight there.

Configuration

BepInEx/config/dazed.howtofish.savebackups.cfg

Setting Default What it does
BackupOnSave true Back up on every save, including the autosave
BackupOnLoad true Back up when a save is selected to load
SkipUnchanged true Do not store a copy identical to the newest one
MaxAutomaticBackups 10 Automatic backups kept per save. 0 keeps everything
MaxRowsShown 7 Rows listed at once, so the panel does not overflow

Disk use is modest. Save files are small, and 10 backups of a save is still well under a megabyte.

Notes

Singleplayer and hosted saves both work, since these are the server save files. Only the host has them, so joining someone else's game has nothing to back up.

Nothing is overwritten without being copied first, and no game files are modified. Removing the mod leaves your saves exactly as they are, and the backup folder can be deleted freely.

CHANGELOG

Changelog

1.1.0

  • Snapshots can now include files belonging to other mods, so a restore puts the whole save back rather than just the vanilla part.
  • Added a public API other mods can call to register their own save files. See the README for the two lines needed.
  • A snapshot is now a folder holding the save, any companion files, and a manifest describing what is inside.
  • Backups made before this update are still listed and still restore, as save only snapshots. Nothing on disk is migrated or touched.
  • File copying is deferred to the end of the frame. Other mods write their data from the same game event and the running order is not guaranteed, so this makes sure a snapshot holds the save and its companion files from the same moment.
  • Restoring a snapshot whose companion mod is no longer installed now restores the save and says which data was skipped, rather than failing.
  • Rows show a marker when a snapshot carries companion data.

1.0.0

Initial release.

  • Automatic rolling backups of server save files, taken on every save including the five minute autosave, and when a save is selected to load.
  • Backups tab built into the Load Game screen, using the game's own button styling.
  • Each row shows when the backup was taken plus the money, island and playtime read from the file itself.
  • Restore and Delete per backup, plus Back up now and Open folder.
  • Restoring takes a backup of the current file first, so a restore can itself be undone.
  • Manual backups are never pruned. Only automatic ones rotate.
  • Identical saves are skipped so the history holds genuinely different states.
  • Empty save files are refused for both backup and restore.
  • The save list and the save info panel refresh in place after a restore, so the restored values show immediately.