Project Zomboid

Project Zomboid

35 vurderinger
Update PLZ
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Filstørrelse:
Offentliggjort:
Opdateret:
7.588 KB
14. mar. 2022 kl. 15:54
28. mar. 2022 kl. 17:37
7 ændringsbemærkninger ( vis )

Abonner for at downloade
Update PLZ

Beskrivelse
DATA LOSS WARNING: Restarting while players are online from a mod currently causes DATA LOSS, I have asked the devs for a solution but they do not seem to really care. If you are concerned about data loss please use one of the long delay options or only restart when no players are online. Sorry!

GitHub[github.com]

Don't you hate it when you try and join your server and it disconnects telling you there are outdated Workshop mods? Hate no more thanks to Update PLZ!

This mod will query the server's Workshop mods every minute and check if they were updated after the server started up. If it detects outdated Workshop items, the server will be saved & restarted the next time it is empty.


For dedicated servers ONLY
This mod ONLY works on DEDICATED SERVERS and does nothing in co-op/singleplayer!


How "restarting" works
This mod will SHUT DOWN the server - currently there is no way to RESTART the server from a mod, so please make sure you are using a daemon that will automatically restart the server when it shuts itself down.

If you don't currently have this setup for your server, you can find a simple script (bash script for Linux, Batch script for Windows) online for automatically restarting a program if it exits.


Choosing the restart time
Mod ID
Restarts after
UpdatePlz
When the server becomes empty
UpdatePlz1
1 minute
UpdatePlz5
5 minutes
UpdatePlz10
10 minutes
UpdatePlz15
15 minutes
UpdatePlz30
30 minutes
UpdatePlz60
1 hour


Workshop ID: 2779169728
Mod ID: UpdatePlz
Mod ID: UpdatePlz1
Mod ID: UpdatePlz10
Mod ID: UpdatePlz15
Mod ID: UpdatePlz30
Mod ID: UpdatePlz5
Mod ID: UpdatePlz60
51 kommentarer
Syn 3. apr. kl. 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 kl. 18:00 
Appears to work
MarujaKing 1. juni 2024 kl. 7:03 
IS this mode required when not playing muti or with friends?
Zefirr 9. juli 2023 kl. 12:21 
same . does it work please ?
ripmaikel SKINS 12. maj 2023 kl. 23:45 
it works?? i actually need to do a auto restart system for a linux dedicated server
Methylenedioxymethamphetamine  [ophavsmand] 11. maj 2023 kl. 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. maj 2023 kl. 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. mar. 2023 kl. 17:21 
Mod id UpdatePlz180 = 3hour?
can i 3hour update use?
UdderlyEvelyn 2. sep. 2022 kl. 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. sep. 2022 kl. 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.