Project Zomboid

Project Zomboid

Update PLZ
51 comentarii
Syn 3 apr. la 6:51 
To configure the server to automatically restart after a shutdown, locate the "StartServer32.bat", "StartServer64.bat", or "StartServer64_nosteam.bat" file. Open the batch file in an editor and replace the "pause" command at the end with:

call "%~f0"

Make sure to copy and paste it exactly as shown. This line will enable the server to automatically restart whenever it detects that it has gone offline.

Hope that helps.
Daimyo 12 nov. 2024 la 18:00 
Appears to work
MarujaKing 1 iun. 2024 la 7:03 
IS this mode required when not playing muti or with friends?
Zefirr 9 iul. 2023 la 12:21 
same . does it work please ?
ripmaikel SKINS 12 mai 2023 la 23:45 
it works?? i actually need to do a auto restart system for a linux dedicated server
Methylenedioxymethamphetamine  [autor] 11 mai 2023 la 4:53 
Hello yes it only shuts down the PZ application not the machine - would be kind of crazy if they gave mod developers access to do that lol
TancredTerror 11 mai 2023 la 2:47 
Hello Billy !
Thank you for the Mod
Do you confirm that your mod shudown the PZ application and not the server machine ?
Because when you say it shutdown the server, both could be understoof.
Thank you for your answer ;)
해솔 6 mart. 2023 la 17:21 
Mod id UpdatePlz180 = 3hour?
can i 3hour update use?
UdderlyEvelyn 2 sept. 2022 la 7:22 
Feel free to mimic the delay feature to fix the data loss in your mod, or just point people to my mod if you'd rather wash your hands of maintenance. Thanks again for letting me base mine on your code!
UdderlyEvelyn 2 sept. 2022 la 7:21 
I made my version, you can find it here:
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2844315442

I fixed the message sending to be compatible with chat mods (the message table was missing some function stubs), added sandbox options for the restart delay and how often to poll the workshop, as well as a new (also configurable) feature to add a delay between saving and quitting to avoid the data loss issue.
UdderlyEvelyn 25 iul. 2022 la 10:41 
Yeah I found that already, was seeking permission since I'd have to upload a copy. xD

I assume that you're OK with it since you're pointing me at the bit of code. Turns out our current host doesn't support modifying the script to make it auto-restart, so we'll have to muddle through with manual restarts until they implement that.
UdderlyEvelyn 24 iul. 2022 la 15:47 
Should be a way to configure the frequency of checks. For a large server, checking every minute is *quite excessive* and causes a lagspike since we run 325 mods at present. If you aren't interested in making this a thing would it be OK for me to spin off a copy (with credit and link given) that is tweaked for my scenario?
Z 20 iul. 2022 la 9:03 
Hello, thanks for the mod! :steamthumbsup:
Is it possible to make the mod save before shutting down the server?
Also is it possible to make the notification broadcast from /all so the discord bot announce it on discord? (or directly to discord)
Methylenedioxymethamphetamine  [autor] 13 iun. 2022 la 3:10 
@Apollo Awesome, I could easily integrate it into the current mod if you open a pull request on GitHub :D
@Mihalich Yes it does, not sure why it isn't showing for you if you're not seeing it.
Apollo 13 iun. 2022 la 1:12 
As-per my previous comment I was hoping for a log message only option. I ended up just creating my own mod to do that using code from your mod. Hope that's ok. My mod workshop ID is 2820127528
Mihalich™ 12 iun. 2022 la 11:37 
@infanticide gaming
Listen, does the mod have a server restart notification in the game itself?
The thing is, I've seen this message a couple of times (in red letters on screen and in chat), but most of the time my server just goes on reboot, kicking everyone out.
Mihalich™ 11 iun. 2022 la 21:31 
:cherrypie::cherrypie::cherrypie::cherrypie::cherrypie::cherrypie::cherrypie::cherrypie:
Thank you! Thank you!
Thank you! Thank you!
Thank you! Thank you!
Thank you! Thank you!
Thank you! Thank you!
:cherrypie::cherrypie::cherrypie::cherrypie::cherrypie::cherrypie::cherrypie::cherrypie:
Apollo 7 iun. 2022 la 1:32 
Could an option be added that just prints a message to log that the server needs to be restarted, without actually shutting down the server?
Odysia 3 mai 2022 la 9:29 
Hello. I am from the same server as Audie, Ravenrose. Recently out server hasn't been getting auto restart warnings. Any idea what may be causing this and how to fix it? Is it maybe a setting we accidentally turned off? It worked when we first added the mod.
Outlaw 24 apr. 2022 la 18:11 
We get it our server too. I generally tell everyone to log out before the update. Once everyone logs out from a chunk I believe it saves it. Could I possibly suggest another mod? An AFK check/kicker. On weekends we usually have several people...um.. pass out lol.. and wake up dead. Or people AFK'ing during our events taking up space. Currently theres only one mod and I don't believe it works.
Methylenedioxymethamphetamine  [autor] 12 apr. 2022 la 19:02 
I am going to directly ask the devs if they have a solution. As far as I can tell there is no other way to save the game. You can't even execute server commands (like quit) from a mod unfortunately.
batsonline.ttv 12 apr. 2022 la 8:23 
We are also noticing items disappearing and progress being rolled back significantly after updates. Is there a way to fix this? We are currently using the 15 minutes warning version, and have a daemon to restart the server.
paTaNiNHo 8 apr. 2022 la 2:37 
If the server has more active slots (64 slots), saving takes arround 2100ms and our players can see up to 10 min. items roll-back, when the server shutdown. So maybe there is some bug with the saving procedure...
ttv: mitaagon 2 apr. 2022 la 12:34 
Last 1 minute did not save like 2 hours progress, saving just player positions but saved items on containers are lost
Methylenedioxymethamphetamine  [autor] 2 apr. 2022 la 0:29 
Hello, what data is lost?
ttv: mitaagon 31 mart. 2022 la 23:01 
Is there a solution to data lost when rebooting the server on a workshop update?
SmugJack 30 mart. 2022 la 11:21 
You are correct I had a daemon not executing properly. It seems something else is causing my item duplication and partial resetting characters. But I don't think it is caused by this mod.
Methylenedioxymethamphetamine  [autor] 29 mart. 2022 la 15:29 
I don't know what you mean by pausing, you probably don't have a daemon that automatically restarts the server when it quits. Those assertions come from Steam and will print when you quit anyway, it's not caused by the mod.
Methylenedioxymethamphetamine  [autor] 28 mart. 2022 la 17:37 
Also please, what data was lost exactly?
Methylenedioxymethamphetamine  [autor] 28 mart. 2022 la 17:36 
I have made an experimental change to resolve the issue
It will wait 2 ticks before quitting
Yell420 28 mart. 2022 la 12:57 
i had to remove the script aswell due to data loss, Its closing the process too fast from what i can tell
Methylenedioxymethamphetamine  [autor] 28 mart. 2022 la 8:25 
Could you elaborate on what exactly doesn't save properly?
Methylenedioxymethamphetamine  [autor] 28 mart. 2022 la 7:49 
As far as I can tell, the saving is not asynchronous or done in a different thread. When saving from Lua it should block the main thread until saving is complete (which is then when UpdatePLZ quits the game) so I am not sure what would cause that.
Flandre Scarlet 26 mart. 2022 la 0:14 
is this mod can auto restart server , will be the best mod , but still great work
Yell420 25 mart. 2022 la 9:56 
Working flawlessly, thanks for the update!
R4ZH0R 25 mart. 2022 la 6:01 
Hey, If it works flawlesslyand keep doing so, chance of being the mod of the year.
Awesome job
Methylenedioxymethamphetamine  [autor] 24 mart. 2022 la 22:51 
Yeah it does display a few server messages (and counts down in reasonable intervals)
Outlaw 24 mart. 2022 la 21:58 
Does the new versions do a /servermsg stating that an update is found, server restarting. Or does it just shut down after the time period
Methylenedioxymethamphetamine  [autor] 24 mart. 2022 la 18:19 
Done, let me know if there are any issues
Methylenedioxymethamphetamine  [autor] 24 mart. 2022 la 12:38 
It is trivial to make, don't worry, I will make it soon
Yell420 23 mart. 2022 la 22:07 
Thanks for this mod, if you could make a separate version that restarts regardless of people being in the server that would be great.
Outlaw 23 mart. 2022 la 15:58 
And to also do it whether players are in the server or not? My server host has a scheduled tasks feature to check, but gives absolutely no warning that it is restarting.
Outlaw 23 mart. 2022 la 15:57 
Is there anyway to have this mod or create something similar to operate like this:
Check for game/workshop mod updates, if theres an update, announce using servermsg "Update detected, server restarting in 15 minutes" and then again at 10, 5, 1, then restart?
Kagoule 21 mart. 2022 la 1:39 
Thanks, for those interested, here is my batch:
@echo off
:Restart
start "PZ" /wait "G:\Games\...\StartServer64.bat"
goto Restart
Methylenedioxymethamphetamine  [autor] 20 mart. 2022 la 9:40 
You can use a simple Batch script to achieve that, Google "windows batch restart after exit"
Kagoule 20 mart. 2022 la 7:43 
Can anyone using this mod can explain how to automatically restart a dedicated server on Windows 10?
FR_Alucard88 15 mart. 2022 la 6:03 
Thank :)
Methylenedioxymethamphetamine  [autor] 15 mart. 2022 la 5:53 
Pterodactyl, TCAdmin, etc. I believe are capable of restarting the server automatically if it crashes/shuts down.
FR_Alucard88 15 mart. 2022 la 5:17 
Hello, " so please make sure you are using a daemon that will automatically restart the server when it shuts itself down " do you have an example ?