Project Zomboid

Project Zomboid

Not enough ratings
Despawn Zombies on Water & More!
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
570.571 KB
Sep 6, 2024 @ 9:01pm
Sep 14, 2024 @ 12:34pm
4 Change Notes ( view )

Subscribe to download
Despawn Zombies on Water & More!

Description
Any zombies that somehow end up on a water tile will be de-spawned/removed.

"Zombies can be on the water?" - yep, they like to fall into it from above. If you know, you know.

And in case you got ahead of yourself and started slinging lead at those water zombies, when this finds a zombie that is on water, it will remove it and also check the surrounding tiles around that zombie for blood splats and dropped items and remove those also.

If you can't see it, this mod doesn't care about it.

MP: This looks for zombies in cells, which is around 300x300 squares. You can choose how often to check in sandbox options - every in game minute, ten minutes, hour or day. Default is every ten minutes. It might cause a lag spike for a split second if there's lots to remove.

SP: There is a sandbox option for single player games. This will check if a zombie is on water every time a zombie updates, so you probably won't even notice anything happened. I haven't experienced any jitters from this but your mileage may vary. You can also choose to just use MP behavior if that's your jam.

This will not remove any blood or items that are already on the water unless a zombie happens to end up near it.

There are still some literal "edge" cases where a zombie appears to be on water, usually near the edge of the water, but is really on a blend, but cannot path so they just stand there. Eventually, I might find all those blend tiles and remove zombies on them but that sounds like a real PITA.

Works in SP and MP. It probably conflicts with something and y'all will let me know if it does, right?

Should be safe to add to your save / server. As always, don't forget to back-up your game before adding any mod to an existing game.

Don't forget to like, favorite, share and subscribe! Smash that like button and ring that bell for notif... wait, where am I?

Keep this out of your mod packs.

Workshop ID: 3326089039
Mod ID: despawnwaterzombies
7 Comments
jbdiablo  [author] Sep 29, 2024 @ 10:01am 
I really appreciate the answer. I'm not a good programmer, I usually take the path most difficult, but looking at the server code again and seeing all the guessing it does, it gives me the heebies.
Mopop Sep 28, 2024 @ 11:20pm 
When they are out of player vision they have x time to either get refreshed by the OG player who got it's attention or to find another client to latch onto, if not it'll go back to client control and be simulated if that chunk has been unloaded. That's how it's SUPPOSE to work, but we've seen it do some stupid stuff before. It definitely seems to be some kind of band-aid to make the game more stable online.

The whole client/server zombie thing is what makes some of the fighting in PZ MP dangerous. Like if you've ever fought side by side with a friend and seen the zombie just turn on a dime and hit you. Stuff like ping really will effect it, why I've heard some people call it being ping diffed.

Not sure if this answers your question, but I'm happy to try to answer them. Sadly the other creator of the mod has been kind of MIA.
jbdiablo  [author] Sep 28, 2024 @ 1:47pm 
Hey Mopop! With this mod, I think the server is just talking trash when it says the zombie is stale. It has to be a byproduct of the code when the client/server don't agree. I never dug into the java much to see exactly what the server did when a zombie was removed from a square/world via client side though.

Question: With the "out of vision" zombies, was it the server updating the clients or the other way around?
Mopop Sep 28, 2024 @ 12:40pm 
Also now that I think about it with the ways stales do work, basically they can come back, but we never figured out how. We guessed it might be noise, but not all noise was equal. This is why some people on servers report how a group of zombies just dumps on them for no reason.

IIRC they're just standing there out of vision of the player till re-activated somehow as when we were testing the mod, somehow we got it to where stale zombies could be seen, but they were just standing in place, could be killed, but drop one of those weird 3D corpse you can't loot...it's very odd indeed.
Mopop Sep 28, 2024 @ 12:36pm 
No Mo Culling guy here, I don't think it will actually stop the zombies being set as stale from being removed. Mainly what our mod did was fix some code that was throwing false stales when zombies were updating, it does not stop the stale process itself. We tried that approach first and it gave some very...strange results lol.
jbdiablo  [author] Sep 24, 2024 @ 9:22am 
This is hard to answer. The way this game handles zombies is insane.

In SP: they will be gone for good. In MP: on the surface they are removed from the world. I was told by some very smart modders that these zombies would re-spawn somewhere else later. I did a lot of testing on this and I never came across a re-spawned zombie. My best guess is you would only have 50 zombies to kill.
ttvhungryhyena78 Sep 23, 2024 @ 9:54pm 
Do the despawned zombies get permanently removed from the world or do they respawn elsewhere? For example, if there were 100 zombies on the map and 50 despawned, where did they go? Do they respawn later or can I only kill 50 zombies now rather than the original 100?