Project Zomboid

Project Zomboid

394 ratings
Random Zombies - Day and Night
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
445.355 KB
13 Nov, 2022 @ 4:11am
24 Jul, 2024 @ 2:43pm
19 Change Notes ( view )

Subscribe to download
Random Zombies - Day and Night

Description
Add distribution of different type of zombies with two separate distribution sets, one for the day and one for the night. Also a special schedule is available in which you can choose how the zombies act when there is rain, snow or fog.
Works on both single player and multiplayer.

You can decide:

  • When the mods should consider the time being "night" for each season
  • if you want zombies to behave differently in a specific weather (rain, snow, fog) and on which intensity (any, light, average, heavy) of the selected weather.
  • Specifically, if you want only some presets to be enabled (day, night, rain)
  • For each preset, which kind of zombies are more or less common between Crawlers, Shamblers, Fast Shamblers, Sprinters
  • For each preset, how many zombies are going to be flimsy, average or tough in terms of health
  • For each preset, if there is a percentage of "smart" zombies that can open doors and long memory. They *will* hunt you down!

HOW IS THIS WORKING?

The mod will check at the start of your single player session or server start and determine if it's "day", "night" or "special".
"Special" will always have priority over day/night if it's enabled. Then proceed to load the values you decided in the relative preset.

The "Frequency Override" determine how often the zombies in the current active cells are being overridden with the values you selected in the mod. It's in milliseconds which means that the default 7500msc translate to 7.5 seconds.

Until the override runs, the zombies in a cell will behave according to the "proper zombies" settings.

Every in game hour, the mod will check again the day/night/special event and update the preset. Be aware that the mod will not update the preset every hour in case the current preset is already the one that should be assigned.
I considered updating more often to catch the special event as soon as it start but don't want to complicate the logic too much for now. Look at it as "the zombies need some time to get "influenced by the weather" and you have that time to prepare accordingly :)

An example of the SandboxVars configuration block is available here: https://pastebin.com/raw/XUJ60mQj

FAQ

- What I need to do to enable this mod?
By default the day and night distribution is already enabled if you installed and activated the mod. Check that you activated it by opening your "mods" section in game after subscribing. For the details on the default distribution you can check the screenshots in this same page.


- How do I check if the mod is working?
The mod works on both solo and multiplayer (hosted and dedicated servers). If you see something like this[i.imgur.com] on your server/game logs, the mod has loaded and is working as it should. If there is some error happening, you should be able to see it in your server logs or in `C:\Users\[YOURUSERNAME]\Zomboid\Logs\[SOME_DATE_TIME]_DebugLog.txt` for game hosted locally, either single or multiplayer.

- Can I have the special preset trigger for more than one weather pattern?
Unfortunately not. The reason is that I wanted to keep the mod's logic simple and already there are parts that are quite complex. Adding the possibility to have multiple weather detected or all of them would make for a much more complex logic to cover all possible combinations and not just in the code. Also the interface for the options would be quite hellish. This is the main reason I've added support for plugins. So that if you want a niche or specific combination, you can write your own logic and have it load up with higher priority over the regular presets and triggers. However, the plugin example here will do exactly that if you want to try.

- What are the percentages for the weather pattern intensity?
When selecting the special schedule's trigger, you can select the intensity on which the preset actually get triggered. Intensity in the code goes from 0 to 1, using the decimals. The values used as thresholds are:
-- Any means Intensity > 0.0
-- Light means Intensity > 0.3
-- Average means Intensity > 0.5
-- Heavy means Intensity > 0.7

- What if I have multiple plugins with overlapping triggering conditions?
Plugins will require this mod to work (duh!). What determine the priority in the plugins loaded, in case there are more than one, is the order in which they are loaded. A typical order with multiple plugins will be something like:
-- [other mods]
-- rzf_plugin_a
-- rzf_plugin_b
-- randomzombiesfull
-- [other mods]
Assuming plugin_a and plugin_b share the same trigger (let's say "rain and fog") the lower in the list will be the one that gets activated.

BUGS!?

Please report bugs here[github.com], following the instructions provided.
If you don't follow the instructions, I won't be checking on the bug report. I'm sorry to be this harsh but I need to have some clear indication of what/where to check for a bug as this is a free product that I made in my free time and it's a limited resource :)

SOURCE CODE
I believe that open source helps immensely in improving a product, no matter the nature. Also, you could just subscribe the mod and get the source code anyway :D

So here is the official repository[github.com] for it. Contribution and feature requests are welcome. The latter will always be considered as long as they fit the scope of the project. Cheers!

Build 42 Update
Alright so, build 42 is out in an unstable release. I did a couple run in these past days and had chats with other mod devs from the official discord. It seems that b42 is still quite unfinished and lots of things are disabled due to "needing some more work" or very much changed. Zombies are one of those things that have changed, see the "new stealth mechanics" for example. Which means it doesn't make much sense to me to spend time messing with this at this time.

On top of that, the game devs already implemented some more randomisation in the zombie lore options, which I experimented a bit in the couple runs I did. In short, I am not so sure this mod need to keep existing going forward.

Eventually this can be a good moment to write it back from scratch but right now it's more of a "sits and wait". Things are too much *unstable*.

CREDITS

This mod has been made as I needed (and loved) Random Zombies by "Belette" but also wanted a day/night variation as Night Sprinters by "The Illuminati" does. I used the chance to try my hand at modding Project Zomboid.

Random Zombies
Night Sprinters [41.60+]
=====================

Workshop ID: 2888099799
Mod ID: RandomZombiesFull
344 Comments
crayven_ady 5 Jan @ 4:35am 
41.76 completely not working. I did all settings to get night sprinters and they do nothing. Some randomly sprint but during the day and night. Settings are 100% triple checked.
Crius  [author] 24 Dec, 2024 @ 8:27pm 
Build 42 Update
Alright so, build 42 is out in an unstable release. I did a couple run in these past days and had chats with other mod devs from the official discord. It seems that b42 is still quite unfinished and lots of things are disabled due to "needing some more work" or very much changed. Zombies are one of those things that have changed, see the "new stealth mechanics" for example. Which means it doesn't make much sense to me to spend time messing with this at this time.

On top of that, the game devs already implemented some more randomisation in the zombie lore options, which I experimented a bit in the couple runs I did. In short, I am not so sure this mod need to keep existing going forward.

Eventually this can be a good moment to write it back from scratch but right now it's more of a "sits and wait". Things are too much *unstable*.
Arduu 3 Oct, 2024 @ 9:34am 
can i run this with random zombies to? or i need to choose one your or normal random zombies
Malz 1 Oct, 2024 @ 8:14am 
@Crius if I want to add compatibility for the Bandits mod for my friends and I (Unless I have permission to make a public one, or you want to make one?) Which .lua's do I add local isBandit = zombie:getVariableBoolean("Bandit") to?
aquelarrefox 28 Sep, 2024 @ 6:19am 
Is posible as an option to get the special condition when temp go lower than a value in settings for example 2°c, so you don't get sprinters in deep winter, I would love see play that way
DuckGoosebear PrairieDogLover 25 Sep, 2024 @ 9:05pm 
@❤Tao❤ how can I do this?
IronLungs 11 Sep, 2024 @ 3:03am 
could you add compatibility for the Bandits mod?

local isBandit = zombie:getVariableBoolean("Bandit")
❤Tao❤ 23 Aug, 2024 @ 6:34am 
Is there any chance for you to add options for hearing, sight and memory of the zombies? If yes that would be great update
Betoke Fumez 16 Aug, 2024 @ 2:00pm 
are this mod compatible with CDDA Zombies?
aquelarrefox 27 Jul, 2024 @ 5:51pm 
Yes I will try a test with out the animation mod but I first wanted to ask if mybe the problem was from the change in the class of the zombi. Cose I hadn't this issue with normal random zombies neither definitive zombies (with speed control on). I really like how this mod works.