Project Zomboid

Project Zomboid

Changes to sandboxvars not working
I run a dedicated server and my players would like more time before water/power shuts off. I changed those variables in the sandboxvars.lua file, but it doesn't seem to take effect. What am I missing?
< >
Showing 1-12 of 12 comments
Did you change the correct variables? There are two of them, one is the
WaterShutModifier for example, which would be the exact days when water shuts off.
yeah, I followed the wiki as best I could to affect both sets of values. I also changed a couple of things with more immediate effects, like making zombies sprint and turning on the minimap. Doesn't seem to work.

I'll keep messing around, but thanks
I was thinking the shutmodifier is the date from which you may have water and elec shuting down, with a limit based on the interval you set in the other shutdown variable
This is annoying. Started a fresh server, followed a guide here on the forums dated Dec. 30 and claimed to explain how to set all variables in build 41. Still the power and water went off like clockwork at 2 weeks. No starter kit, no minimap - the only thing we 'think' is working is no zombies respawn.

Overall, why these settings aren't taking is beyond frustrating.
I'm having similar issues. Changes to the ini file are taking fine, just not any changes I make to sandboxvars. Running a dedicated server on Debian 11.
Still in october 2022, I am having this issue with my dedicated server. Anything set manually through lua file will not be saved. Running ubuntu 22.
Originally posted by EnigmaGrey:
Originally posted by Tofuman:
Still in october 2022, I am having this issue with my dedicated server. Anything set manually through lua file will not be saved. Running ubuntu 22.

Looks like it's working fine here. If you have any mods installed, especially those that mess with sandbox settings, I'd assume the problem lies there.

I disabled all mods that changes sandbox settings, and it is still the same.
Originally posted by EnigmaGrey:
Originally posted by Tofuman:
Still in october 2022, I am having this issue with my dedicated server. Anything set manually through lua file will not be saved. Running ubuntu 22.

Looks like it's working fine here. If you have any mods installed, especially those that mess with sandbox settings, I'd assume the problem lies there.

I did an extensive testing, checking mods one by one. Still not working. Finally found the issue;

no mods are affecting the ability to change sandbox settings
I started new server and tried changing sandbox and it works, tried it on old save, doesnt work
started new server with all the previous mods and I am able to change sandbox settings, through in game or lua

old save map_sand.bin is corrupted somehow
I suspect its the crashes and disconnections back in 41.73 since I started hosting during that game version

deleted the file
deleted sandbox lua too
let the server regenerates new file
change the sandbox option ingame back
and BADABING BADABOOM
it works

Seriously, sometimes it is not mod issue...
I've had the same issue (it's also been something mentioned on PZ discord by others) and I've been searching for a solution. ( https://discord.com/channels/136501320340209664/1031695081033433128/1032041864603381830 )

Editing the server_sandboxvars.lua and uploading it via ftp, server wouldn't reflect the change despite the file being correct.
Go into game, edit is as Admin (loads not showing the change, and it says it writes the changes). The lua file updates modify timestamp, changes are shown in the lua, upon restart of the server the changes aren't in place.
Update the file directly on server via vim, still no impact.
Delete server_sandboxvars.lua altogether, let the server save a new one, no change in behavior.

In all these cases, (here, pz discord, and my own) deleting the map_sand.bin resolved the issue. I deleted this without making any other change to the server or mods installed and magically the changes are now in place and working as expected.

And so far, the file has not recreated either.
Originally posted by Madforce2k:
I've had the same issue (it's also been something mentioned on PZ discord by others) and I've been searching for a solution. ( https://discord.com/channels/136501320340209664/1031695081033433128/1032041864603381830 )

Editing the server_sandboxvars.lua and uploading it via ftp, server wouldn't reflect the change despite the file being correct.
Go into game, edit is as Admin (loads not showing the change, and it says it writes the changes). The lua file updates modify timestamp, changes are shown in the lua, upon restart of the server the changes aren't in place.
Update the file directly on server via vim, still no impact.
Delete server_sandboxvars.lua altogether, let the server save a new one, no change in behavior.

In all these cases, (here, pz discord, and my own) deleting the map_sand.bin resolved the issue. I deleted this without making any other change to the server or mods installed and magically the changes are now in place and working as expected.

And so far, the file has not recreated either.

after awhile, server will create a new file. Mine does the same
Yeah, I saw it later that night come back.

At least it appears innocuous to remove if running into this issue. I beat my head for several days trying to figure it out.
I dont know if this topic actual, but maybe i will help someone. If your edits of SanboxVars.lua are massive the best choise would be delete all in folder Zomboid/Saves/Multiplayer/NameOfServer/*. This woul restart all your world.
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: Jan 7, 2022 @ 4:40am
Posts: 12