Many versions of XStoryPlayer have a hidden setting: Auto-save on quit. While convenient, this is dangerous. If the game freezes during exit, it writes a half-corrupted auto-save.
Use a PowerShell script to check save file sizes. A normal save is usually 50KB-500KB. If you see a 0KB or 1KB file, that is a corrupted save. Delete it immediately before the player tries to read it and crashes.
Never save over a single file.
Even with perfect habits, things go wrong. Here is the recovery ladder for when you need to save better in crisis mode.
To enable auto-save in XStoryPlayer, you can add the following code to your project's configuration file:
"autoSave": true,
"autoSaveInterval": 5
This will enable auto-save and set the interval to 5 minutes.
To manually save a game in XStoryPlayer, you can use the save() function:
save("game_save");
This will save the game with the label "game_save".
For the paranoid saver:
Some modded versions of XStoryPlayer allow you to export a save file as a plaintext script. This lets you: