Project Zomboid

Project Zomboid

Armagenesis Sep 22, 2022 @ 12:55am
How do zombie respawn and migration actually work? [Solved]
I’m fairly new to the game and have been trying different things out, and I found this happening several times throughout multiple playthroughs:
Zombies spawning/respawning inside a cleared and completely closed-off building.

And by closed-off I mean there’s no broken windows and the doors are all closed, but no locked doors and no barricades.

I played in sandbox mode with this kind of setting:
Zombie Population 1.0, initial population 0.1, peak population 2.5, peak day 365, respawn & unseen respawn timer 8760 hours, respawn number 0.1

I spawned in Rosewood and pretty much cleared out its commercial district from the police station up to Spiffo’s, and also walled-off the whole place with wooden fences and crates. And after several in-game days of playing normally I suddenly got surprised by two zombies banging on the glass from inside the police station when I passed by the place returning from Rosewood Prison. I checked and there’s no broken windows or doors leading outside, and there’s no broken doors inside the station either.

So yeah, the question is: how do the spawn and migration mechanic actually work?
Do zombies respawn wherever they want outside of the player's chunk even if that means they somehow pop into existence inside a building that’s supposed to be closed-off?
Last edited by Armagenesis; Sep 22, 2022 @ 6:14am
Originally posted by Drizzt:
your respawn is set to not happen until a year has passed, and only in places that you haven't been for a year, and only allowing 10% of the cell's desired population to be added for each spawn

so it is unlikely that any zombies are spawning in your game

maybe some weird migration caused it (since there are settings for how often they will do that)

but more likely is that you killed some zombies in the police station and a few of them came back to life due to the reanimation mechanic - as zombies decay there is a small chance that they may come back to life

and probably that is what you are seeing
< >
Showing 1-13 of 13 comments
Last edited by ⛧CyberDemonEmpress⛧; Sep 22, 2022 @ 1:06am
Armagenesis Sep 22, 2022 @ 1:17am 
Originally posted by 🎃CyberDemonEmpress🎃:
https://youtu.be/hglrA6FrxOw
Yeah, I already watched this video several times and tested this myself. Hence the post. Retanaru explained how the migration works in his video, but didn’t really touch on the spawn/respawning mechanic much.

I did test it several times on a separate save file with default apocalypse setting and debug on, cleared out the whole Rosewood map, then sped up the game and waited.

I tested using the police station as the testing ground. First with it being just out of sight but still inside my player’s chunk, me being on the other side of the town, and me being in a completely different town altogether. But I couldn’t replicate the same instance in my normal sandbox playthrough.

I examined the zombie population map and saw that while, yes, the zombies did move around, they wouldn’t necessarily enter a building. And again, the ones I encountered didn’t even break any doors or windows. They just somehow pop into existence right inside the police station.
DON COCAINE Sep 22, 2022 @ 3:21am 
I just turn the spawn off because it's unrealistic. To balance it I have increased Z's number and occasional helicopter flying around.

Respawn ruining lot of sence in gameplay and required for multiplayer only when lot of people are running around and killing anything that moves.

Btw about the migration in previous versions it's been obviously predictable moves. I been cleaning the WP and been able to +\- predict when the Z's are going to move up the map (to the north). Then in couple of days they been moving down (to the south). So it's been like waves ruuning on and off the shore.
Also if you kill all Z's in one map chunk they'll fill that chunk in next N hours — depends on your options that you been editting during the world generation (if you play sandbox but I see no sence in other starting options).
Undead Llama Sep 22, 2022 @ 3:39am 
Zombie pop and spread is governed by two factors; peak population and respawn rate.

Meta zombie pops (as in, not actively simulated) are not subject to pathfinding restrictions. This allows the (highly unlikely) occurence of zombies spawning in buildings that are otherwise completely secured.

Any given cell will populate itself to a specified ratio of the peak population, and does so without regard to path-finding in either it's cell, or any adjacent.

Migration is the meta level application of zombie population based on the regional heat levels. Cells will, at a certain saturation of zeds as a integer, and a ratio to peak population, ambulate zed movement to surrounding cells. Again, this movement/spawning is not subject to any path-finding restrictions; percentile weighting prefers spawning in and around open spaces/roads, but outliers do occur.,
Armagenesis Sep 22, 2022 @ 4:06am 
Originally posted by Dr Jan Itor:
Zombie pop and spread is governed by two factors; peak population and respawn rate.

Meta zombie pops (as in, not actively simulated) are not subject to pathfinding restrictions. This allows the (highly unlikely) occurence of zombies spawning in buildings that are otherwise completely secured.

Any given cell will populate itself to a specified ratio of the peak population, and does so without regard to path-finding in either it's cell, or any adjacent.

Migration is the meta level application of zombie population based on the regional heat levels. Cells will, at a certain saturation of zeds as a integer, and a ratio to peak population, ambulate zed movement to surrounding cells. Again, this movement/spawning is not subject to any path-finding restrictions; percentile weighting prefers spawning in and around open spaces/roads, but outliers do occur.,

So, the TL;DR is: zombie spawning/respawning doesn't care if they are in a completely closed-off tile(s)?
DON COCAINE Sep 22, 2022 @ 4:21am 
Originally posted by Armagenesis:
So, the TL;DR is: zombie spawning/respawning doesn't care if they are in a completely closed-off tile(s)?

Seems correct. Just turn the respawn off. Maybe they have a lower priority but it's always above 0% so it might happened and it's defenitely gonna be stupid death for your character.
The author of this thread has indicated that this post answers the original topic.
Drizzt Sep 22, 2022 @ 5:34am 
your respawn is set to not happen until a year has passed, and only in places that you haven't been for a year, and only allowing 10% of the cell's desired population to be added for each spawn

so it is unlikely that any zombies are spawning in your game

maybe some weird migration caused it (since there are settings for how often they will do that)

but more likely is that you killed some zombies in the police station and a few of them came back to life due to the reanimation mechanic - as zombies decay there is a small chance that they may come back to life

and probably that is what you are seeing
Armagenesis Sep 22, 2022 @ 5:34am 
Originally posted by DON COCAINE:
Originally posted by Armagenesis:
So, the TL;DR is: zombie spawning/respawning doesn't care if they are in a completely closed-off tile(s)?

Seems correct. Just turn the respawn off. Maybe they have a lower priority but it's always above 0% so it might happened and it's defenitely gonna be stupid death for your character.
If that's the case then, well... it's a pretty crappy situation anyway.

Even with respawn off, your survivor can still die a stupid death if the zombie pop, initial pop, and peak pop aren't set in the same value. As any difference in value between them will cause the zombies to continue to spawn anyway until they reach peak population. Unless it's a decrease in the peak population instead.

I want a gradually increasing challenge, not a cheap jumpscare from a zombie magically popping up in my barricaded safehouse after I left it for a few days to loot in a different town.
Armagenesis Sep 22, 2022 @ 5:40am 
Originally posted by Drizzt:
your respawn is set to not happen until a year has passed, and only in places that you haven't been for a year, and only allowing 10% of the cell's desired population to be added for each spawn

so it is unlikely that any zombies are spawning in your game

maybe some weird migration caused it (since there are settings for how often they will do that)

but more likely is that you killed some zombies in the police station and a few of them came back to life due to the reanimation mechanic - as zombies decay there is a small chance that they may come back to life

and probably that is what you are seeing

I completely forgot about the reanimation. That could be the case as well. I did leave the bodies where they were when I went to loot the police station. I'll try doing it again and see if that's the case.
Drizzt Sep 22, 2022 @ 5:47am 
Originally posted by Armagenesis:
Originally posted by Drizzt:
your respawn is set to not happen until a year has passed, and only in places that you haven't been for a year, and only allowing 10% of the cell's desired population to be added for each spawn

so it is unlikely that any zombies are spawning in your game

maybe some weird migration caused it (since there are settings for how often they will do that)

but more likely is that you killed some zombies in the police station and a few of them came back to life due to the reanimation mechanic - as zombies decay there is a small chance that they may come back to life

and probably that is what you are seeing

I completely forgot about the reanimation. That could be the case as well. I did leave the bodies where they were when I went to loot the police station. I'll try doing it again and see if that's the case.
i seem to recall the devs mentioning that they were making efforts to stop zombies from spawning inside already cleared buildings - and so while it may still happen accidentally, the zombie reanimation thing is possibly more likely

just be aware when experimenting that there is only a small chance or reanimation - so maybe make some copies of the save after killing the zombies so that you can repeat it

good luck :-)
dustbiter Sep 22, 2022 @ 6:13am 
Zombies respawning inside a cleared building may be due to some bug from using a save from an older version of the game.
Armagenesis Sep 22, 2022 @ 6:16am 
Originally posted by Drizzt:
Originally posted by Armagenesis:

I completely forgot about the reanimation. That could be the case as well. I did leave the bodies where they were when I went to loot the police station. I'll try doing it again and see if that's the case.
i seem to recall the devs mentioning that they were making efforts to stop zombies from spawning inside already cleared buildings - and so while it may still happen accidentally, the zombie reanimation thing is possibly more likely

just be aware when experimenting that there is only a small chance or reanimation - so maybe make some copies of the save after killing the zombies so that you can repeat it

good luck :-)
Thankfully debug mode can help with that. I can just try dumping all the bodies in the fire station while keeping the police station completely clear then see what happens.
Drizzt Sep 22, 2022 @ 6:32am 
Originally posted by Armagenesis:
Originally posted by Drizzt:
i seem to recall the devs mentioning that they were making efforts to stop zombies from spawning inside already cleared buildings - and so while it may still happen accidentally, the zombie reanimation thing is possibly more likely

just be aware when experimenting that there is only a small chance or reanimation - so maybe make some copies of the save after killing the zombies so that you can repeat it

good luck :-)
Thankfully debug mode can help with that. I can just try dumping all the bodies in the fire station while keeping the police station completely clear then see what happens.
cool yeah - and debug mode has that awesomely fast time acceleration :-)

so theoretically if you clear out both buildings, and store the corpses in one of them - one will stay empty, while the other one will occassionally have a corpse reanimate

maybe use autoloot to take all the items off every zombie you kill so that when you find new ones in the building you can tell if it is a new one or a reanimated one - or just use rip all so that you know that naked zombies are ones you have killed, since most zombies spawn with clothes - but auto loot will be more thorough, since all zombies have something on them - and so empty zombies will have been reanimated

unless of course when they reanimate they are actually replaced with a new zombie with new loot - oh so many variables lol :-)
Last edited by Drizzt; Sep 22, 2022 @ 6:32am
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Sep 22, 2022 @ 12:55am
Posts: 13