Project Zomboid

Project Zomboid

triple88a Jan 25, 2022 @ 3:21pm
How does the game saving process work?
As said, does the game write to the save files every x minutes? Is it event based? Is it login/logout based? I have created a script that automatically backups the saves folder every hour and deletes save files older than 7 days but I want to know when the game actually writes to the save files so I can know if the script will actually work.

Any feedback? Thanks.

(Multiplayer and single player if you know)
Last edited by triple88a; Jan 25, 2022 @ 3:26pm
< >
Showing 1-5 of 5 comments
ColStuckInMyTeeth Jan 25, 2022 @ 3:26pm 
This is a customizable setting. I don't know if the UI allows you to customize it in single player or not. Gotta be honest, I also don't remember where the singleplayer ini files are. But there is an ini file that exists *somewhere* with a setting for
SaveWorldEveryMinutes=N
Where N is some number. I think by default it's like an hour? Someone else might be able to comment more

To be clear though, game saves way more often than that depending on some events. Like if you die, I've had cases where I tried to 'recover' a character by forcing the game down and prevent the game from saving out the death. Sure enough though when I restart the game, character is still dead.

So I can't tell you all the ways that the game saves, but I know the game will prevent you from trying to 'cheeze' out of a death by forcing the game down. So backing up is the way to do it if you want to do it that way because game does save on certain events like that.
Last edited by ColStuckInMyTeeth; Jan 25, 2022 @ 3:29pm
it's a gabe Jan 25, 2022 @ 3:29pm 
Just remember that, by default, the game unpromptly saves when you quit. I've no clue if this can be asjuted via a .ini file, but it's something to keep in mind.
Nordil(Hun) Jan 25, 2022 @ 3:29pm 
Originally posted by GDICommand:
This is a customizable setting. I don't know if the UI allows you to customize it in single player or not. Gotta be honest, I also don't remember where the singleplayer ini files are. But there is an ini file that exists *somewhere* with a setting for
SaveWorldEveryMinutes=N
Where N is some number. I think by default it's like an hour? Someone else might be able to comment more

There is one autosave when you wake up as well.
However i never bothered with figuring out the saving system, since i realized that if i use the manual save (aka to quit to menu) it will save the game. But if i press alt+f4, then it is possible that i will end up with having only my waking up save.(And when you are awake for 2-3 days in game...that is BAD)
Last edited by Nordil(Hun); Jan 25, 2022 @ 3:29pm
triple88a Jan 25, 2022 @ 3:35pm 
Originally posted by GDICommand:
So I can't tell you all the ways that the game saves, but I know the game will prevent you from trying to 'cheeze' out of a death by forcing the game down. So backing up is the way to do it if you want to do it that way because game does save on certain events like that.

I was playing on a server that recently shut down because of a power failure.. save game got corrupt. The script i'm working on is intended to create rolling backups to prevent that. Rather than going to an hour before the interruption, we are now rolling back to the last server backup from 2 weeks ago.
Nebgama (Banned) Jan 25, 2022 @ 8:27pm 
Originally posted by triple88a:
As said, does the game write to the save files every x minutes? Is it event based? Is it login/logout based? I have created a script that automatically backups the saves folder every hour and deletes save files older than 7 days but I want to know when the game actually writes to the save files so I can know if the script will actually work.

Any feedback? Thanks.

(Multiplayer and single player if you know)

All of the above. The game saves on a few events player dmg has a a flag that can be enabled to save player data on dmg and many others like some have been mentioned. Logging in out of the game does it and save every X mins is a thing too.
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Jan 25, 2022 @ 3:21pm
Posts: 5