Project Zomboid

Project Zomboid

AFK Auto-Pause [SP]
ChilaBrox 18 Jul, 2024 @ 4:17pm
Add custom time in settings please!
It will be great it you could add insta pause, because some times another app puts on top the main screen during the game, and I died a couple of time by this reason. Please add that custom setting please.
< >
Showing 1-1 of 1 comments
ChilaBrox 19 Jul, 2024 @ 12:03pm 
Folks, I have found where you can add more time settings in the mod code, since you only have time from 30 seconds onwards.

You can do it in two ways, by adding more options in the server side file.

OPTION 1 ------------------------------------------------------

Directory and FileName:

I:\SteamLibrary\steamapps\common\ProjectZomboid\steamapps\workshop\content\108600\3105170708\mods\AfkAutoPause\media\lua\server\afkModOptions.lua

... Line 9 local optTimer = settings:getData("Timer"); Line 10 optTimer[1] = "1" Line 11 optTimer[2] = "5" Line 12 optTimer[3] = "10" Line 13 optTimer[4] = "20" Line 14 optTimer[6] = "30" Line 15 optTimer[6] = "60" Line 16 optTimer[7] = "90" Line 17 optTimer[8] = "120" Line 18 optTimer[9] = "150" Line 19 optTimer[10] = "180" Line 20 optTimer.name = "UI_afk_Timer_Name"; Line 21 optTimer.tooltip = "UI_afk_Timer_Tooltip"; ...

OPTION 2 ------------------------------------------------------

Or directly in the condition where you check how long you stopped moving the mouse or keyboard. Changing the value 30 to 1 or desire time in seconds.

Directory and FileName:

\SteamLibrary\steamapps\common\ProjectZomboid\steamapps\workshop\content\108600\3105170708\mods\AfkAutoPause\media\lua\client\autoPause.lua

Lines of Code:

... Line 26 if getTimestamp() - AutoPause.pauseCount >= AutoPause.OPTIONs.Timer * 30 then Line 27 setGameSpeed(0) Line 28 end ...

After making changes to the files and saving the changes, it is necessary to remove the mod from the game and add it back again. This is for the changes to take effect.
Last edited by ChilaBrox; 19 Jul, 2024 @ 12:42pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50