How do I edit a save file?

I’ve been browsing the internet for specific files, since I wanted to mess around with pre-played options in a game I’m currently developing and I have no idea how to view or edit a save file, I already tried a hex editor but seemingly I can’t figure it out. Does anyone know a way how to edit them?

I know gblorb and gargoyle does different save files, but is there a way how to manually edit their values?

Unfortunately, save files for Inform (i.e. Z-code and Glulx) games aren’t particularly easy to edit. They’re essentially a representation of the virtual machine’s RAM, compressed by comparing it with the original file.

If you want to distribute save files with your game, the easiest way to do that is to play through to the appropriate point and save, potentially using debugging commands to get the state the way you want it. Save files aren’t backward- or forward-compatible between versions, so you’ll need to do this every time your game changes. But if the sequence of commands to get to the save point is fixed, you can automate that part.

There is a “Config File” extension which I believe has the potential to edit game states that are pre-planned. You have to set up parts of the game that read from the config file…say if you have a battle with three monkeys you read the how_many_monkeys number from the config file, which would allow you to change it to 10 outside the game if you desired.

Another weird option - I used Emily Shorts “Recorded Endings” to remember certain milestones in a game, and at the beginning, it would read these and set up the world accordingly. It also produces an external file that may be easier to read and tweak, however again you’d need to manually set up the states in the game that these affect.