It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
It looks like Project Zomboid currently saves to ~/Zomboid on Linux. The game should use either ~/.zomboid or ~/.config/zomboid to follow unix or XDG convention.

Please, I'm begging you, don't trash my home directory.
The problem with this is, as we have many people whom are new to linux, if the file were hidden or tucked away, they may not be able to find it.

If you'd like, you can add the -cachedir=dir/to/cache/ variable (either added to the launch paremters via Steam or added to the jsno file) to change the directory.

I do not have an example off-hand of the json/sh file though, as the computer containing my linux partition recently kciked it. Let me know if you need it, though.
To be honest, I'd prefer it didn't break convention on OS X as well, but that seems to be the way it's going to be.
avatar
EnigmaGrey: The problem with this is, as we have many people whom are new to linux, if the file were hidden or tucked away, they may not be able to find it.

If you'd like, you can add the -cachedir=dir/to/cache/ variable (either added to the launch paremters via Steam or added to the jsno file) to change the directory.

I do not have an example off-hand of the json/sh file though, as the computer containing my linux partition recently kciked it. Let me know if you need it, though.
I hope you will reconsider. Just because someone isn't going to immediately know where the save files are doesn't mean they want them strewn around their home directory. The Documents directory has been completely ruined in Windows by poorly behaving third party software, I hope this won't become the norm in Linux too.

That said, adding -cachedir=$HOME/.config/zomboid fixes the problem. I have no idea what this Steam thing you mention is, but here is a copy of the only json file I could find:

$ cat ./data/noarch/game/projectzomboid/ProjectZomboid64.json
{
"mainClass": "zombie/gameStates/MainScreenState",
"classpath": [
".",
"jinput.jar",
"lwjgl.jar",
"lwjgl_util.jar",
"sqlite-jdbc-3.8.10.1.jar",
"uncommons-maths-1.2.3.jar"
],
"vmArgs": [
"-Xms1024m",
"-Xmx1024m",
"-Dzomboid.steam=0",
"-Dzomboid.znetlog=1",
"-Djava.library.path=linux64/:.",
"-XX:-UseSplitVerifier",
"-Djava.security.egd=file:/dev/urandom"
]
}
Proper directory should be ~/.local/share/Zomboid if it's including save files. ~/.config/Zomboid would be for configuration files.

>> The problem with this is, as we have many people whom are new to linux, if the file were hidden or tucked away, they may not be able to find it.

This isn't a good reason.. If it's important for users know where their save file is at, it should have the directory in the settings somewhere in the game. Ignorance is short lived.

If Project Zomboid feels like being extra important, they can place a ~/.Zomboid file. and their files in there. But right now, ~/Zomboid wants to be as visible as my ~/Music folder. This makes no sense.

As for "-cachedir=dir/to/cache/"
This should be used to change the cachedir *away* from normal convention, not to return it to one.

To break away from negativity - zomboid is truly a great game and this issue should be easily resolved.
It's unlikely this change will be made at this point, but you never know what the future will bring.

For now, those concerned with convention have a workaround.
Seconded. There are plenty of locations that are easily accessible (~/Documents or ~/Documents/Saved Games, mirroring one of the myriad of Windows' patterns) that don't pollute top level directories. I strongly recommend you reconsider this, Indie Stone, and you, GOG, to enforce better practices.

As for the workaround, the start.sh bundled by GOG doesn't pass its arguments over to projectzomboid.sh so `./start.sh -cachedir` doesn't do anything. I assume that's a bug.
Post edited July 11, 2018 by themoll
I think after seven years, we can put to the bed the idea it's going to change.

To set your own with the newer bat/exes, I think you just have to edit the json files. There's two, one for 64-bit and one for 32-bit.

Add the bolded option:
...
],
"vmArgs": [
"-Xms1200m",
"-Xmx1200m",
"-Duser.home=.",
...

user.home can be pointed to any directory you like. Here it just creates the Zomboid folder in the game's installation directory. Remove the dot and insert the path of your choice.
Post edited July 19, 2018 by EnigmaGrey
Just an update for anyone else looking to move the folder to a sane location. (This may be for the Steam version only. This was the first topic I've found for this issue, so posting here.) Even with the -cachedir launch option set, you'll still need to go into projectzomboid.sh and edit the GAMEDIR variable to prevent a log file from creating this folder. For me, it's located in steamapps/common/ProjectZomboid/.