• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

(A19) WalkerSim - Enhanced roaming zombies

I'm still working on this mod and I will eventually look into why hostile animals don't spawn, my current guess is that they are considered normal zombies and that no slots are available for them to spawn. Also I believe that the clearing is pretty hard currently as the zombie speed might be too high. I want to add a few modes to the simulation so instead of every zombie being a loner I want some of them to follow another fellow zed instead which would create some groups.

My plan is to refactor most of the code which I already started, the main reason for this is I want to be able to test the simulation without being in the game since the offline simulation doesn't require players until the zombie spawn is requested. Also glad people enjoy this.

 
Okay, this one is not really a bug but a limitation of the engine. It's really cool that most of the "Clear POI" quests will generate enough noise that a zombie horde will be trying to breakin as you are clearing the place. However, for Tier 5 POIs, you generate too much noise and the zombie hordes from Walkersims end up blocking the spawning sleepers in the Tier 5 POIs, preventing completion. 

Perhaps for Tier 4 and above clear quests, activating quests like this can generate a "Deadzone" where the walkersim is temporarily ignored? Usually Tier 4 and above POIs have swarms of zombies already.

 
The CreaturePack zombies work fine.  The characters using the bandit and survivor classes spawn in but never move, even if attacked.  These are vanilla classes, not extra code.  Its like they are stuck in sleeper state.  I didnt test the NPC (code) versions as the vanilla base versions would need to work first.

I tried it with and without Sphereiis core.  Both error on exit.  Heres the error on exiting the game with no code loaded (no core or any mods besides the creaturepacks)

2020-09-24T11:40:29 276.266 INF [WalkerSim] World no longer exists, stopping simulation
2020-09-24T11:40:29 276.266 INF [WalkerSim] Worker Finished
2020-09-24T11:40:29 276.298 INF Persistent GamePrefs saved
NullReferenceException: Object reference not set to an instance of an object
  at EntityAlive.Update () [0x00134] in <b96846cfb0544c2da3579e57837d9053>:0 
 
(Filename: <b96846cfb0544c2da3579e57837d9053> Line: 0)

Really fun gameplay, The spawned survivors really helped pull off some off the zombies.

 
Last edited by a moderator:
The CreaturePack zombies work fine.  The characters using the bandit and survivor classes spawn in but never move, even if attacked.  These are vanilla classes, not extra code.  Its like they are stuck in sleeper state.  I didnt test the NPC (code) versions as the vanilla base versions would need to work first.

I tried it with and without Sphereiis core.  Both error on exit.  Heres the error on exiting the game with no code loaded (no core or any mods besides the creaturepacks)

2020-09-24T11:40:29 276.266 INF [WalkerSim] World no longer exists, stopping simulation
2020-09-24T11:40:29 276.266 INF [WalkerSim] Worker Finished
2020-09-24T11:40:29 276.298 INF Persistent GamePrefs saved
NullReferenceException: Object reference not set to an instance of an object
  at EntityAlive.Update () [0x00134] in <b96846cfb0544c2da3579e57837d9053>:0 
 
(Filename: <b96846cfb0544c2da3579e57837d9053> Line: 0)

Really fun gameplay, The spawned survivors really helped pull off some off the zombies.
Thank you for testing this! 💗

I was going to re-test with the usual CP + NPC bundle, because the last time I tried it with this WalkerSim was A19.0 and I was getting errors in the console, I couldn't even load into the world. At first I thought the problem was in CP + NPC bundle as it was just updated at that time, but it turned out it was actually the WalkerSim incompatibility with the CP + NPC bundle, because everything worked fine when I removed WalkerSim.

I guess this means there's no point in re-testing if it doesn't work properly with the base CP alone without DMT NPC code. You're absolutely right, DMT NPC mod itself will have to wait for the second phase of testing, once the base mod works as intended.

 
I did some more testing.  I removed the humans from zombie and sleeper spawns and removed the animal zombies from groups so the only thing that could spawn are zombieclass entities and humans spawning in the enemyanimal groups.  Eventually I get the same error on exit, so not sure what else to test. 

 
The CreaturePack zombies work fine.  The characters using the bandit and survivor classes spawn in but never move, even if attacked.  These are vanilla classes, not extra code.  Its like they are stuck in sleeper state.  I didnt test the NPC (code) versions as the vanilla base versions would need to work first.

I tried it with and without Sphereiis core.  Both error on exit.  Heres the error on exiting the game with no code loaded (no core or any mods besides the creaturepacks)

2020-09-24T11:40:29 276.266 INF [WalkerSim] World no longer exists, stopping simulation
2020-09-24T11:40:29 276.266 INF [WalkerSim] Worker Finished
2020-09-24T11:40:29 276.298 INF Persistent GamePrefs saved
NullReferenceException: Object reference not set to an instance of an object
  at EntityAlive.Update () [0x00134] in <b96846cfb0544c2da3579e57837d9053>:0 
 
(Filename: <b96846cfb0544c2da3579e57837d9053> Line: 0)

Really fun gameplay, The spawned survivors really helped pull off some off the zombies.
If its just an error on exit I'm not exactly sure what I should look for, if theres a hidden exception that stops the A.I. tasks that would explain why they stop moving but without any errors/exceptions I'm clueless on whats wrong.

I might install those mods eventually but I need to prioritize on fixing bugs in my own code first.

D00D said:
Okay, this one is not really a bug but a limitation of the engine. It's really cool that most of the "Clear POI" quests will generate enough noise that a zombie horde will be trying to breakin as you are clearing the place. However, for Tier 5 POIs, you generate too much noise and the zombie hordes from Walkersims end up blocking the spawning sleepers in the Tier 5 POIs, preventing completion. 

Perhaps for Tier 4 and above clear quests, activating quests like this can generate a "Deadzone" where the walkersim is temporarily ignored? Usually Tier 4 and above POIs have swarms of zombies already.
I will look into having active quests disable spawning from the simulation that are nearby.

 
Last edited by a moderator:
I think I resolved the exit error by moving the human class entities out of the zombie spawn groups.  The humans spawn in as friendly animals but not as enemy animals.  I have yet to see a single enemy animal, wolf, bandit, or otherwise.  Is there a work around for this?

BTW I will build a 2-Walkersimcompatibility modlet for the CreaturePacks once this is all sorted.

 
Last edited by a moderator:
It would be great to be able to configure which edges of the map new zombies appear from.  You could then, for example, set the eastern edge to be the spawning edge and simulate an approaching mega hoard that in the early game you can keep ahead of if you keep moving west.  This would be especially cool if you could start with few zombies, but keep ramping it up over time.  With no loot respawn (and no trader quest resets) that would create a tension between looting the eastern side when it's not totally overrun and moving on to safer areas in the west, and then later make the prime untouched loot locations (for later gamestage looting) in the area where there are both the most zombies and which have the quickest respawn (as killed zombies respawn nearby).

 
Really loving this so far, adds a lot to the game. Please allow more configuration options to be set eg: max distance the zombies will hear you and walk towards you (inactive ones), zombie speed (when inactive).

Oh and btw how does it handle horde night? I haven't tried so far. Massive shooting resulting in even more zombies?

 
Is this mod still alive?

I'm trying to use it in a19.3 and my server is constantly outputting this error. 

MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)
MissingMethodException: void EntityAlive.SetInvestigatePosition(UnityEngine.Vector3,int)


I believe this is happening when the mod is supposed to spawn a zombie as my world has no roaming zombies. I've turned on the simulation viewer and there do appear to be Zeds roaming, just not getting spawned when activated by a player.

This is the only mod I have running on my server.

 
I love this mod and its idea, in A19.3 its working flawless, but as mentioned before its a bit too much off a endless hassle, there should be a break every now and then...

My suggestion would be something like this pseudo code. It would bring in some values, such as gamestage, difficulty, population, day lenghts and (bad)luck. Differencing between Day and Night would also be an option, but for now the example is w/o Day/Night difference.

Its all about the idea, to make an player "invisible" for the 2D-ModeOfflineZombies as long as the player stays in the current chunk. If this is possible at all, bonus points for saving this chunk status (or the timer set for "invisibility"), when player leaves the current chunk.

Invisible means the player does not cause the 2D-Zombies to spawn in as soon as he hits the kills needed, more below.

Invisible does not mean, that any Zombies already spawned cant see/hear him.

Please let me know, what you think of it and if its possible at all.

Pseudo code:

TimeInChunkMins = get TimeInChunkMins
24hrLengthMins = day length in Mins
24hrLengthFlo = (24hrLengthMins / 100)
GameStage = get PlayerGameStage
TimeInChunkModMins = (GameStage x 24hrLengthFlo)
Difficulty = get PlayerDifficulty ---- 7 <-> 2 , 7 beeing easiest
Population = get (Population / 100)
RnG = random N# between 20 and 10

DayOrNight = ?


---------------------------------------------------------------------------------------------------------------------------------------------------

while in currentChunk


if (TimeInChunkMins > ((TimeInChunkModMins x Population) / (RnG - Difficulty)) then --- the time when counter starts should be a "secret" to the player, hence the RnG

count _kills

if _kills > (((RnG / Population) x TimeInChunkModMins) / (Difficulty x RnG)) then --- in terms of kills, a high RnG roll means (bad)luck


current chunk makePlayerInvisibleIn2D for (((TimeInChunkModMins x Population ) / RnG) + Difficulty) --- make Player invisible but do not remove the zombies currently left
end
end
end

---------------------------------------------------------------------------------------------------------------------------------------------------






ALL results should be upped to their next integer !

    
Example 1: EasyMode Early-Game: 60Mins Day, 120 Population, Random No. 17 , Difficulty 5, Gamestage 20       --- Low Difficulty, low Gamestage + good                                                                                                                                                                                   --- luck, in this  gamestage you will only                                                                                                                                                                                     --- be able to kill slowly


Gamestage 20 x DayFloat 0,6 = TimeInChunkModMins 12

(TimeInChunkModMins x Population) / (RnG - Difficulty) = 1,2 Mins             --- time you already have to be been in the chunk, before the kill count starts                                                  

((RnG / Population) x TimeInChunkModMins) / (Difficulty x RnG) =  2 kills                                    --- seems a bit low but keep in mind that all previously                                                                                                                                                             --- spawned zombies will stay, which is already a lot at                                                                                                                                                             --- pop 120                                

((TimeInChunkModMins x Population ) / RnG) + Difficulty = 5,8  Mins Invisible/no Respawn

                
Example 2: RegularMode Mid-Game: 60Mins Day, 120 Population, Random No. 16 , Difficulty 4, Gamestage 80     --- good mid-game, in-between good                                                                                                                                                                                        --- and bad


Gamestage 80 x DayFloat 0,6 = TimeInChunkModMins 48

(TimeInChunkModMins x Population) / (RnG - Difficulty) = 4,8 Mins 

((RnG / Population) x TimeInChunkModMins) / (Difficulty x RnG) =  14,4 kills  

                         

((TimeInChunkModMins x Population ) / RnG) + Difficulty = 7,6  Mins Invisible/no Respawn

Example 3: HarderMode End-Game: 60Mins Day, 120 Population, Random No. 13 , Difficulty 3, Gamestage 120     --- Harder Difficulty, higher Gamestage                                                                                                                                                                                      --- + less luck, but in this gamestage                                                                                                                                                                                          ---you should be able to kill  really fast                                                                                                                                                                                          

Gamestage 120 x DayFloat 0,6 = TimeInChunkModMins 72

(TimeInChunkModMins x Population) / (RnG - Difficulty) = 8,6 Mins

 

((RnG / Population) x TimeInChunkModMins) / (Difficulty x RnG) = 28,8 kills

((TimeInChunkModMins x Population ) / RnG) + Difficulty = 9,6  Mins Invisible/no Respawn

 
Last edited by a moderator:
Update 1/24/2021, Version: 0.3.0
- A19.3 support.
- Fixed potentially locking up the server.
- Fixed initial population not using 'POITravellerChance'.
- Added option to make sound distance configurable.
- Added sound event vizualization support to the viewer.
- Added option 'PauseDuringBloodmoon'.
- Added option 'ReservedSpawnSlots'.
- Added option 'WalkSpeedScale'.
- Improved offline walking behavior.
- Improved zombie spawning to avoid lag.
- Improved despawn when backtracking, they have a minimum lifetime of 1 in-game minute.
- Reduced network bandwidth for viewer.
- Reduced default server update rate from 60 to 40 Hz.
- Reduced 'PopulationDensity' from 120 to 60.
- Increased 'POITravellerChance' from 0.25 to 0.65.
Download: https://github.com/ZehMatt/7dtd-WalkerSim/releases/tag/0.3.0

This is what the new sound visualization looks like:

2021-01-24_03-00-40.gif

For demonstration purposes all zombies not inflicted by the sound are standing still in this gif.

 
Last edited by a moderator:
Barra said:
I love this mod and its idea, in A19.3 its working flawless, but as mentioned before its a bit too much off a endless hassle, there should be a break every now and then...

My suggestion would be something like this pseudo code. It would bring in some values, such as gamestage, difficulty, population, day lenghts and (bad)luck. Differencing between Day and Night would also be an option, but for now the example is w/o Day/Night difference.

Its all about the idea, to make an player "invisible" for the 2D-ModeOfflineZombies as long as the player stays in the current chunk. If this is possible at all, bonus points for saving this chunk status (or the timer set for "invisibility"), when player leaves the current chunk.

Invisible means the player does not cause the 2D-Zombies to spawn in as soon as he hits the kills needed, more below.

Invisible does not mean, that any Zombies already spawned cant see/hear him.

Please let me know, what you think of it and if its possible at all.

Pseudo code:

TimeInChunkMins = get TimeInChunkMins
24hrLengthMins = day length in Mins
24hrLengthFlo = (24hrLengthMins / 100)
GameStage = get PlayerGameStage
TimeInChunkModMins = (GameStage x 24hrLengthFlo)
Difficulty = get PlayerDifficulty ---- 7 <-> 2 , 7 beeing easiest
Population = get (Population / 100)
RnG = random N# between 20 and 10

DayOrNight = ?


---------------------------------------------------------------------------------------------------------------------------------------------------

while in currentChunk


if (TimeInChunkMins > ((TimeInChunkModMins x Population) / (RnG - Difficulty)) then --- the time when counter starts should be a "secret" to the player, hence the RnG

count _kills

if _kills > (((RnG / Population) x TimeInChunkModMins) / (Difficulty x RnG)) then --- in terms of kills, a high RnG roll means (bad)luck


current chunk makePlayerInvisibleIn2D for (((TimeInChunkModMins x Population ) / RnG) + Difficulty) --- make Player invisible but do not remove the zombies currently left
end
end
end

---------------------------------------------------------------------------------------------------------------------------------------------------






ALL results should be upped to their next integer !

    
Example 1: EasyMode Early-Game: 60Mins Day, 120 Population, Random No. 17 , Difficulty 5, Gamestage 20       --- Low Difficulty, low Gamestage + good                                                                                                                                                                                   --- luck, in this  gamestage you will only                                                                                                                                                                                     --- be able to kill slowly


Gamestage 20 x DayFloat 0,6 = TimeInChunkModMins 12

(TimeInChunkModMins x Population) / (RnG - Difficulty) = 1,2 Mins             --- time you already have to be been in the chunk, before the kill count starts                                                  

((RnG / Population) x TimeInChunkModMins) / (Difficulty x RnG) =  2 kills                                    --- seems a bit low but keep in mind that all previously                                                                                                                                                             --- spawned zombies will stay, which is already a lot at                                                                                                                                                             --- pop 120                                

((TimeInChunkModMins x Population ) / RnG) + Difficulty = 5,8  Mins Invisible/no Respawn

                
Example 2: RegularMode Mid-Game: 60Mins Day, 120 Population, Random No. 16 , Difficulty 4, Gamestage 80     --- good mid-game, in-between good                                                                                                                                                                                        --- and bad


Gamestage 80 x DayFloat 0,6 = TimeInChunkModMins 48

(TimeInChunkModMins x Population) / (RnG - Difficulty) = 4,8 Mins 

((RnG / Population) x TimeInChunkModMins) / (Difficulty x RnG) =  14,4 kills  

                         

((TimeInChunkModMins x Population ) / RnG) + Difficulty = 7,6  Mins Invisible/no Respawn

Example 3: HarderMode End-Game: 60Mins Day, 120 Population, Random No. 13 , Difficulty 3, Gamestage 120     --- Harder Difficulty, higher Gamestage                                                                                                                                                                                      --- + less luck, but in this gamestage                                                                                                                                                                                          ---you should be able to kill  really fast                                                                                                                                                                                          

Gamestage 120 x DayFloat 0,6 = TimeInChunkModMins 72

(TimeInChunkModMins x Population) / (RnG - Difficulty) = 8,6 Mins

 

((RnG / Population) x TimeInChunkModMins) / (Difficulty x RnG) = 28,8 kills

((TimeInChunkModMins x Population ) / RnG) + Difficulty = 9,6  Mins Invisible/no Respawn


I've been thinking on how to add the game stage into the mix, the issue remains primarily on having multiple players in the same area. I want to keep the system more natural with less rules, if you clear an area you should be fine but there is always the chance more of them stumble upon that area and gun sounds have a way of attracting them all in all pretty simple rules.

I have however different roaming models planned for the future, one example being actual waves spawning at the border and just crossing through the map from one random map border to another random map border of the opposite direction, this just being one example. Another thing I definitely want to look into is terrain elevations, there are so many things I wanna try out eventually but I have only so much time sadly.

There is also always the option to simply fork the source code, the code is under MIT license so you can pretty much do whatever you want.

 
this is such a cool development!....I hope you're still active with it cuz it feels like there's so much potential.

a couple questions.... (I'm experimenting with it but haven't done enough yet)

How do Wilderness Spawn increase modlets affect this? (like JaxTeller's x5 multiplier) 

same for increased wandering hordes and increased screamers? do they change the way WalkerSim works and/or are they compatible?

and to run on a dedicated server, can I just use the server version on the server or do the clients need the DMT version as well?

thanks for the cool mod....if I was a better programmer (not just a hack-n-slasher/copy-n-paster) I could really dive into this more(!)

 
Back
Top