Story-aware spawning of zombies

Please forgive me, but this suggestion relies on a lot of assumptions about worldgen. As always, please correct me if I’m mistaken about how the game works - I am not a coder.

My assumption about C:DDA is that it follows a pretty standard heirarchical worldgen model: Terrain>Roads>Features>Buildings(in towns)>Cars>Monsters. I also assume that static spawn will be the spawn method that’s updated in the future.

So, my suggestion is to tie the zombie inventory code back into previous levels of worldgen. When a zombie is spawned at the end of things, have the spawn code check the nearby area for buildings or vehicles and randomly alter some of the spawned zombies inventories to match. Zombies near a fast-food joint have polo shirts and pants, a zombie spawned near a motocycle is wearing the helmet, and zombies near a bar might carry booze.

As for how, my personal guess would actually be to create an separate “map” array during worldgen that the various other algorithms write to. This array would be lower-resolution than the actual playfield. (I think I have heard mention that C:DDA is organized something like minecraft, with the playfield being separated into 16x16 sub-maps? Not a coder.) In each cell you could store things like IS_COFFEHOUSE and HAS_CYCLE, or CHOPPER_WRECK. When it comes time to spawn a zombie, the worldgen code checks the array 1/6th of the time and garbs the zombie in the pre-made inventory set depending on a randomly-selected flag from that “chunk” of the array which matches the spawning area. Finally, run each zombie for 12-16 turns in order to get a little drift, but not too much. (Alternately, the list of random array-flags to be chosen from could include the spawning chunk and all of the contiguous chunks in the array.)

I suggest that method because it avoids complicated analytical code being run on the map. If it turns out that this sort of analysis of the things near a given spot on the map is actually easy, then ignore everything I said.

Kill zombies around a gunstore for free ammo!

I think I’m still in favor of zombies just having random crap on them, since y’know… zombies tend to wander around. A motorcyclist zombie with a motorcycle helmet on would likely end up wandering off somewhere rather than lingering around the motorcycle that they died on/next to.

Yea that’s a solid idea. We wouldn’t have EVERY zombie inventory be based on its location, but the ocasional zombie wearing a fast food uniform and waving a flipper around would be nice. We were planning on adding a “outfit” module that tries to put consistent sets of items on zombies and corpses, and this would just do something like put themed outfits into rotation along with the defaults.

Code-wise, yea, we’re very aware of the type of building a zombie spawns in, so the information is there to be used.

Well, zombies of the same type should have variants, or that’s just another way of telling what you guys think. :wink:

Sounds interesting but…
I’m not a fan of seeing something like Screwdrivers over and over again when near a hardware spawn if ya get my drift?
I mean like, wouldn’t that cause you to be likely finding the same thing over and over when you kill a group of zombies?
Actually, I think screwdrivers need to be nerfed in terms of zombies dropping them. Honestly, I find them all the time from killing zombies…
But yeah, the idea of this is very interesting indeed…

I can think of two different ways to fix that problem, Dzlan. You could lower the chance of an outfit being picked, or include a bunch of outfits for customers (jeans, boots, jean jackets) that are more likely to appear. Alternately, you could just make sure that you have more than one kind of hardware store clerk outfit and swap tools out accordingly.

The other way to fix it would be somewhat more complicated, as the outfit templates would themselves be based on percentage chances for each piece of equipment beyond a basic uniform. Making variable outfits would probably be more computationally expensive, but we’re still a long way from having Dwarf Fortress levels of worldgen going on, so I think the devs are OK.

Then you can add some flavor text to some zombies like “This zombie must’ve been busy flipping burgers to notice zombies nomming on his brain by the looks of his outfit” or something less ridiculous. :stuck_out_tongue:

“Looks like this guy was a zombie even before the apocalypse.”

zombie wearing pajamas “looks like this guy asked the zombies 10 more minutes.” (would have a chance spawn near houses, hotels, apartments, you get the idea.)

I’ve been thinking that it may be interesting to see more environmentally placed ‘special zombies’. For example, an area may be flush with fungal zombies and little else special because it’s close to a fungal tower (perhaps even rooting into the town facilities and water systems.) While an area full of high technology labs industrial sectors, large cities may have loads of cybernetic type zombies (shockers, hopefully other specialized and malfunctioning CBM variants.)

Perhaps not all zombies are even ‘allied’ with each other, different breeds eventually forming into their own ecologies as New England’s enviroment continues to buckle, fracture, and reshape into alien vistas.

I suppose such apocalyptic evolution may be worthy of it’s own topic but I thought it may be relevant, but I know that some zombie types (children, soldiers) are already spawned based on local factors (parks, schools, bases, crash sites.)

That is an excellent idea.
Also, tougher zombies should not spawn immediately if we are to believe the backstory.

Fighting a gas station attendant zombie in a gas station you find on the highway or a farmer zombie I think would actually add a lot to immersion of the game. Even just seeing lots of cop zombies around police stations helped a lot to make the zombie spawns feel less arbitrary, so I love the idea of seeing more.

Obviously fast food restaurants should have a bonus chance of spawning boomers.

Agreed.

I like this idea and it shouldnt be the hardest thing in the universe to code (Im not a coder so thats just a guess) But I mean farmer zombies spawn with a random gun somewhere in their invetories so you could reuse that code to code it for other buildings.

[quote=“Kevin Granade, post:4, topic:1932”]Yea that’s a solid idea. We wouldn’t have EVERY zombie inventory be based on its location, but the ocasional zombie wearing a fast food uniform and waving a flipper around would be nice. We were planning on adding a “outfit” module that tries to put consistent sets of items on zombies and corpses, and this would just do something like put themed outfits into rotation along with the defaults.

Code-wise, yea, we’re very aware of the type of building a zombie spawns in, so the information is there to be used.[/quote]
I dont wanna be a buzz kill but us fast food cooks dont actually cook anymore :frowning: we just push the meat in a broiler and push a button for the timer in which it automatically ejects it into a pan :smiley: I work at burger king so its kinda depressing to know these things :stuck_out_tongue:

While it is a pretty rad idea, we have to remember that 99% of the population didn’t suddenly turn into zombies on the spot when the meteors hit, in a situation such as this there would be a lot more panic, fleeing, and evacuations.
For example, a burger cook would have probably heard the sirens, popped his head outside to see what the fuss was, ended up getting chased halfway across town, and got overwhelmed by zombies near a gun range.

This is why I think a system that assigns certain numbers of zombie arche-types to each town would be a bit better, possibly easier to code.
i.e. For every fast food joint in town, that town would be assigned around 5-7 Fastfood worker zombies, for every gun store in town there would be about 4-6 zombies packing heat scattered around, etc.

[quote=“Sharpsaw_Dogsleep, post:18, topic:1932”]This is why I think a system that assigns certain numbers of zombie arche-types to each town would be a bit better, possibly easier to code.
i.e. For every fast food joint in town, that town would be assigned around 5-7 Fastfood worker zombies, for every gun store in town there would be about 4-6 zombies packing heat scattered around, etc.[/quote]

I agree.

[quote=“Sharpsaw_Dogsleep, post:18, topic:1932”]While it is a pretty rad idea, we have to remember that 99% of the population didn’t suddenly turn into zombies on the spot when the meteors hit, in a situation such as this there would be a lot more panic, fleeing, and evacuations.
For example, a burger cook would have probably heard the sirens, popped his head outside to see what the fuss was, ended up getting chased halfway across town, and got overwhelmed by zombies near a gun range.

This is why I think a system that assigns certain numbers of zombie arche-types to each town would be a bit better, possibly easier to code.
i.e. For every fast food joint in town, that town would be assigned around 5-7 Fastfood worker zombies, for every gun store in town there would be about 4-6 zombies packing heat scattered around, etc.[/quote]

Actually that would be immensely more difficult to code :stuck_out_tongue:
It’s far easier to have things match a location rather than getting specific distributions, especially if that distribution changes based on randomly-generated qualities of the town.