Project Zomboid

Project Zomboid

Random Zombies - Day and Night
This topic has been locked
Crius  [developer] 14 Nov, 2022 @ 6:06am
Bug Reports / Feature Requests
Steam forums are a terrible tool to manage issues, so please go here: https://github.com/theCrius/project-zomboid-random-zombies-full/issues/new/choose

And open a new issue following the guidelines if you think something is wrong with the mod.

Cheers!
Last edited by Crius; 18 May, 2023 @ 11:53pm
< >
Showing 1-13 of 13 comments
Powerfoon 15 Nov, 2022 @ 9:27pm 
Not sure if this is supposed to be working for multiplayer or not, but on a dedicated server, I see this:

LOG : General , 1668568602254> 105,123,396> [RZF] Schedule detected is default
LOG : General , 1668568602254> 105,123,396> [RZF] Checking if preset default is enabled
ERROR: General , 1668568602255> 105,123,397> ExceptionLogger.logException> Exception thrown se.krka.kahlua.vm.KahluaException: preset not recognized, accepted values are 'dayTime', 'nightTime' or 'specialTime'. at BaseLib.error line:292.
ERROR: General , 1668568602255> 105,123,398> DebugLogStream.printException> Stack trace:
se.krka.kahlua.vm.KahluaException: preset not recognized, accepted values are 'dayTime', 'nightTime' or 'specialTime'.
at se.krka.kahlua.stdlib.BaseLib.error(BaseLib.java:292)
at se.krka.kahlua.stdlib.BaseLib.call(BaseLib.java:120)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:65)
at zombie.network.GameServer.startServer(GameServer.java:1469)
at zombie.network.GameServer.main(GameServer.java:735)
LOG : General , 1668568602262> 105,123,404> -----------------------------------------
STACK TRACE


-------------------------------------------------
It doesn't crash, the mod just doesnt work. I'm not familiar with lua, but it seems like there are some leading spaces being injected into the preset name causing the preset check to fail.

EDIT: After looking into it more, it looks like the preset being set to 'default' , but the checks only look for 'dayTime', 'nightTime', and 'specialTime'

Adjusting the code to change 'default' to 'dayTime' as the default time fixes this error and I see the checks running within the server logs, but I don't see any changes to zombie behavior.

This is in rzf_server.lua in the function UpdatePreset()
Last edited by Powerfoon; 15 Nov, 2022 @ 10:38pm
Crius  [developer] 16 Nov, 2022 @ 12:31am 
Ah! good catch! I added "default" to make the logs looks clearer but forgot to add it as an accepted "neutral" preset. I'll fix it asap.
Crius  [developer] 16 Nov, 2022 @ 12:38am 
The "default" need to exists to allow the mod to fallback on the "default" game Zombie Lore in case someone only activate, let's say "nightTime" and want that during the day the zombies follow the regular unmodded behaviour on the server/solo settings.

I'm on it, just making myself a coffee and I'll release a fix.
Crius  [developer] 16 Nov, 2022 @ 12:52am 
Can you give me a screenshot or the main-page settings for the mod or paste here the SandboxVars of your settings?

I'm just reviewing the logic and the case in which the check on the preset enabled run, should really never end up checking against "default" as the first that runs is detecting if it's day time or night time.
Last edited by Crius; 16 Nov, 2022 @ 1:01am
Crius  [developer] 16 Nov, 2022 @ 1:07am 
I just started a dedicated server using https://hub.docker.com/r/renegademaster/zomboid-dedicated-server and it seems to pick up the preset correctly (initialize, detect daytime, move on).
https://i.imgur.com/Gm2THfl.png


Also started a local hosted and works fine as well.
https://i.imgur.com/xaFsLzC.png

I'll need that screenshot to see if I may have forgot some edge case

I'm quickly realising that the steam forum are a terrible tool to do bug reporting and resolution. If you want, you can go here: https://github.com/theCrius/project-zomboid-random-zombies-full/issues/new/choose and create a bug from there.
However, In this specific case, we can continue here if you prefer :)
Last edited by Crius; 16 Nov, 2022 @ 1:21am
666rdsrds666 16 Nov, 2022 @ 5:12am 
Hello:
LOG : General , 1668603986070> 0> ISMiniHealth(): config file for reading...
LOG : General , 1668603986070> 0> ISMiniHealth(): Read CONFIG_VERSION as current version: 1 1
LOG : General , 1668603986070> 0> ISMiniHealth(): Closed config file.
LOG : General , 1668603986071> 0> STATE: enter zombie.gameStates.IngameState
LOG : General , 1668603986628> 0> Init ISContextManager
LOG : General , 1668603986666> 0> [RZF] Schedule detected is default
LOG : General , 1668603986666> 0> [RZF] Checking if preset default is enabled
ERROR: General , 1668603986667> 0> ExceptionLogger.logException> Exception thrown se.krka.kahlua.vm.KahluaException: preset not recognized, accepted values are 'dayTime', 'nightTime' or 'specialTime'. at BaseLib.error line:292.
ERROR: General , 1668603986667> 0> DebugLogStream.printException> Stack trace:
se.krka.kahlua.vm.KahluaException: preset not recognized, accepted values are 'dayTime', 'nightTime' or 'specialTime'.
at se.krka.kahlua.stdlib.BaseLib.error(BaseLib.java:292)
at se.krka.kahlua.stdlib.BaseLib.call(BaseLib.java:120)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:65)
at zombie.gameStates.IngameState.enter(IngameState.java:737)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:145)
at zombie.GameWindow.logic(GameWindow.java:298)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:765)
at zombie.GameWindow.run_ez(GameWindow.java:681)
at zombie.GameWindow.mainThread(GameWindow.java:495)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1668603986671> 0> -----------------------------------------
STACK TRACE
-----------------------------------------
Callframe at: error
function: isPresetEnabled -- file: rzf_server.lua line # 12 | MOD: Random Zombies - Day and Night
function: UpdatePreset -- file: rzf_server.lua line # 33 | MOD: Random Zombies - Day and Night
function: LoadConfiguration -- file: rzf_server.lua line # 59 | MOD: Random Zombies - Day and Night
Crius  [developer] 16 Nov, 2022 @ 9:26am 
Until someone post a screenshot of their "Random Zombies Full - Main Page" or a paste of their SandboxVars I can't reproduce the issue guys.
666rdsrds666 16 Nov, 2022 @ 9:33am 
RUS
RandomZombiesFull = {
-- Минимум=1000 Максимум=60000 По умолчанию=7500
Frequency = 7500,
Enable_Day = 2,
Enable_Night = 2,
Enable_Special = 1,
Special_Threshold = 2,
-- Минимум=0 Максимум=23 По умолчанию=23
Summer_Night_Start = 23,
-- Минимум=0 Максимум=23 По умолчанию=6
Summer_Night_End = 6,
-- Минимум=0 Максимум=23 По умолчанию=22
Autumn_Night_Start = 22,
-- Минимум=0 Максимум=23 По умолчанию=6
Autumn_Night_End = 6,
-- Минимум=0 Максимум=23 По умолчанию=20
Winter_Night_Start = 20,
-- Минимум=0 Максимум=23 По умолчанию=6
Winter_Night_End = 6,
-- Минимум=0 Максимум=23 По умолчанию=22
Spring_Night_Start = 22,
-- Минимум=0 Максимум=23 По умолчанию=6
Spring_Night_End = 6,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Crawler_Day = 5.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=65,00
Shambler_Day = 65.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=25,00
FastShambler_Day = 25.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Sprinter_Day = 5.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=30,00
Fragile_Day = 30.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=50,00
Normal_Day = 50.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=20,00
Tough_Day = 20.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Smart_Day = 5.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Crawler_Night = 5.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=25,00
Shambler_Night = 25.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=65,00
FastShambler_Night = 65.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Sprinter_Night = 5.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=30,00
Fragile_Night = 30.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=50,00
Normal_Night = 50.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=20,00
Tough_Night = 20.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Smart_Night = 5.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Crawler_Special = 5.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Shambler_Special = 5.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=25,00
FastShambler_Special = 25.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=65,00
Sprinter_Special = 65.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=30,00
Fragile_Special = 30.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=50,00
Normal_Special = 50.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=20,00
Tough_Special = 20.0,
-- Минимум=0,00 Максимум=100,00 По умолчанию=5,00
Smart_Special = 5.0,
},
666rdsrds666 16 Nov, 2022 @ 9:59am 
New game on MP server. On your PC. 1 mod only
Crius  [developer] 16 Nov, 2022 @ 1:40pm 
Originally posted by 666rdsrds666:
New game on MP server. On your PC. 1 mod only

Thank you, I'll double check. If you can, try and pass me along the log file or even just a little more of the logs you just pasted.

I'll double check again for solo/hosted server
Crius  [developer] 16 Nov, 2022 @ 3:02pm 
Originally posted by 666rdsrds666:
New game on MP server. On your PC. 1 mod only

Thanks again 666rdsrds666, it seems like the GameTime is not instantiated when the mod start, weird as it's supposed to be invoked only on OnGameStart and OnServerStarted.

I'll try and add more logs into the function that determine the initial schedule. Would you mind trying again in about 8h (tomorrow) and report back with another log copy? Unfortunately it doesn't happen on my local and dedicated server so I can't really understand what could go wrong on your side.
Crius  [developer] 16 Nov, 2022 @ 3:39pm 
GOTCHA!

The recent addition of the special case (rain, fog, snow) introduced a new variable and I forgot to transpose the result in case it's not enable! Thanks so much for reporting it!

My server/local had the rain active so I couldn't notice it :(

I'll release an update in 5 minutes!
Last edited by Crius; 16 Nov, 2022 @ 3:39pm
< >
Showing 1-13 of 13 comments
Per page: 1530 50