Help. Save deletion does not work - ntrf/blamod GitHub Wiki

Mechanism of save deletion explaied

Each time you're executing reload command (or you press fire button while being dead), you trigger loading of the last created save file. If such file is not found - game restarts the map, that player previously visited. The key moment is how it determines that save file is present.

And there is a flaw...

Duplicated file names problem

When game mounts additional resources for episodic games, it will also mount their save folders. Mounting process also specifies how specific folders should be used. Blamod correctly mounts all the game folders as read-only, so they should never be used for saves and caches. However, engine itself only remembers save file name, not it's location. When you trigger reload, it will search all the game folders for file save/{name}.sav, ignoring the fact that theese locations might not be writable and should not be used for save files.

Here is what happens when you invoke reload in Blamod after you delete the save quick:

  1. Engine serches for file named save/quick.sav in all folders, mounted as game.
  2. Unable to find save/quick.sav in Blamod mod folder and continues it's serach through list of all mounted folders.
  3. Finds file save/quick.sav in hl2 folder.
  4. Scince file check was successfull, regular load quick command is invoked.
  5. It fails to find save/quick.sav in Blamod mod folder.
  6. Disconnects the player with error message.

Workaround

Basicly you need to make sure, that all the save files that you intend to delete, don't have their equivalents in mounted games. Here are afew weays to accomplist this.

Option 1. Only perform save deletion with unique file name

Just use something like save blamod_save_deletion;wait;load blamod_save_deletion. This way there will be no file with the same name in mounted games.

Option 2. Delete common saves from mounted games

Or at least delete the ones you're going to use for save-deletion. Ironically, you need to delete saves in main games in order for save-deletion to work in Blamod.

Option 3. Rebind all the save keys, so your save names are Blamod-specifc.

Something like bind f5 "save bla_quick