Jump to content

Is there a way to make a zed place blocks?


doughphunghus

Recommended Posts

Specifically: Literally place blocks "randomly" as part of attacking something.

Why: I wanted to see what happens if a zed attacks you or your base and puts down dirt blocks as they try to hit, or like a zombie cop, as part of the "vomit attack" it drops blocks instead of throwing up.

Basically": I want some zeds to have a different type of "siege" mechanic, where they can possibly get over walls easier.

 

Other ramblings:

I have made some attempts at XML editing to change attack and vomit to "PlaceBlock" but cannot seem to get it to work.  I've racked my brain as a way to turn any projectile like an arrow into a block (like after it sticks) and cannot come up with anything.

 

Note: Even if a block was "thrown" and then hit the ground and was destroyed, this would work as it can leave "rubble"

Note 2: even if something like an arrow doesn't turn into a block, if it could have "weight" and throw off the structural stability of other blocks only when it sticks to them, that would work as the blocks of a base/POI would fall "randomly" of not supported well, leading to unexpected holes.

Note 3: I have considered "super jumping" as another possibility vs "dropping blocks" (like the spider zed jumping, but super high/far) but this feels weird for normal walking zeds, unless they are robots (like NPC pack bots).

Link to comment
Share on other sites

Just spit-balling here, but what if you had zombies drop old skool gore blocks when they die like in Darkness Falls, then have those gore blocks turn into terrain blocks a few minutes later using UpgradeRated like the old "concrete drying" mechanism (pretty sure that's still a valid thing)? Then, you'd have dead bodies stacking up around your defenses that zombies could hopefully use to climb walls. I'm at work now, so can't test this out, but if you created a copy of one of the gore blocks like so:

 

<configs>
	<append xpath="/blocks">
		<block name="goreBlockZombieBones">
			<property name="Extends" value="goreBlockHumanBones"/>
			<property name="WaterFlow" value="permitted"/>
			<property name="Collide" value="melee,bullet,arrow,rocket"/>
			<property name="IsTerrainDecoration" value="true"/>
			<property name="Class" value="UpgradeRated"/>
			<property name="UpgradeRated.ToBlock" value="terrainFillerAdaptive"/>
			<property name="UpgradeRated.Rate" value="1000"/>
		</block>
	</append>
</configs>

Then, set your zombies so they have a have a high chance to turn into that gore block when they die:

 

<config>
	<append xpath="/entity_classes/entity_class[@name='zombieTemplateMale']">
		<property name="CorpseBlock" value="goreBlockZombieBones" />
		<property name="CorpseBlockChance" value="0.80" /> 
	</append>
</config>

 

You could play around with the numbers as far as the UpgradeRated.Rate and CorpseBlockChance go and find something that achieves the effect you're after.

Edited by Cranberry Monster
adjusted code (see edit history)
Link to comment
Share on other sites

Interesting! and its probably "close enough" to what im hoping it will do. I was hoping a zed would run around and drop blocks and make you want to target them as "more dangerous" (like spitters or exploders) but this (mostly) would have you not shooting them all in 1 place to avoid block build up. My only concern is how the blocks will work when zeds die due to traps, but i bet it will almost work better (than random drops) as it might help wall off the trap. Or "wall you in" a room if you're not careful.

 

Other thoughts:

the dropped/grown block can be anything (terrain makes the most "sense") but.... maybe its a "high health" terrain block, which (after a few drops) might make zeds stop attacking the weak spot they were at and run elsewhere.... hmmm.

 

im also on the fence is there should be a way to "clear these blocks" from a distance (like a special pipe bomb (cause it rolls around) that is only particularly effective against terrain. I kinda like the idea of having to deal with it close up after its all "safe".

Link to comment
Share on other sites

3 hours ago, doughphunghus said:

Interesting! and its probably "close enough" to what im hoping it will do. I was hoping a zed would run around and drop blocks and make you want to target them as "more dangerous" (like spitters or exploders) but this (mostly) would have you not shooting them all in 1 place to avoid block build up. My only concern is how the blocks will work when zeds die due to traps, but i bet it will almost work better (than random drops) as it might help wall off the trap. Or "wall you in" a room if you're not careful.

 

Other thoughts:

the dropped/grown block can be anything (terrain makes the most "sense") but.... maybe its a "high health" terrain block, which (after a few drops) might make zeds stop attacking the weak spot they were at and run elsewhere.... hmmm.

 

im also on the fence is there should be a way to "clear these blocks" from a distance (like a special pipe bomb (cause it rolls around) that is only particularly effective against terrain. I kinda like the idea of having to deal with it close up after its all "safe".

 

The part where all zombies have a chance to drop remains could easily be changed to only certain zombies have a 100% chance of dropping remains. Based on my experience with a similar mechanic in Darkness Falls, the gore block sometimes spawns in midair, on top of another gore block, or somewhere else where stability rules won't allow it to stay, and therefore it falls and vanishes--which is why I had it quickly changing to terrain. Around a trap, you might have those rules negating a bunch of potential gore blocks--and as Morganic material blocks, they don't have stability, so one gore block won't stack on top of another, the first needs to change to terrain first. And yes, changing that terrain to something more resilient--stone or wasteland terrain, or a beefed up copy of the existing terrain block--is easy enough.

 

I was trying to think of a different way, along the lines of your original thought for them placing blocks at random. Maybe some piece that looked like damaged stone or wood and got placed on the side of a block to represent handholds being knocked in the wall, and then tag it to function like a ladder. But it'll take someone smarter than me to make that work.

 

As far as a way to clear it at a distance, I was thinking exactly the same thing. I like creating the "problem" of the player killing too many in one spot, but offering a solution is always a good idea. The Explosion.DamageBonus.earth line in explosives looks like it has real potential. Imagine a new "sodbuster" round for the rocket launcher that did massive damage to dirt and not much else. Could be fun. (Could also streamline digging up treasure chests).

Edited by Cranberry Monster (see edit history)
Link to comment
Share on other sites

@Cranberry Monster: I added your code posted above"as is" (and it works perfectly!)  but I set the block drop to 100%, made the Upgraded.Rate to 10 (seconds? I have no idea..wanted fast block spawning). Then made a basic "open pen with 1 way out,some windows, with traps in front of the opening" and just spawned 25/50 (over and over) in the pen and shot them like I normally would , with "infinite" ammo.

 

I feel with some tweaking this is going to have to be tested in a real game now, because it WAS kinda fun to watch it work.

 

Results:

- The zeds quickly died and "blocks covered up" the opening in the pen, and the trap(s), so they pathed to the windows/walls

- Very soon, the windows were blocked/covered and they were climbing on the dropped terrain and pathing/climbing over the walls.  So I added more blocks to put a semi roof over the holes. very sloppy patching, like if you were on blood moon and were not safe. kept spawning 25/50 at a time in the pen

- They kept escaping (as expected) but in fun and unpredictable ways.

- Explosive, especially in a closed area, made a lot of random corpse locations, and therefore, blocks.

 

Thoughts so far:

- Using the terrainFillerAdaptive block works well (the graphical look in game), except when you dig out the blocks (its sand sound, 200 health) you get a 'POI terrain filler' block... which is kinda nice to use anyway... buut prob not a great block to hand players? Yeah, the blocks stack weird ( I had some mini 2 block "towers" and floaters, but I doubt this can be avoided.

 

- The "total carnage craziness" of breaking the base/pen was probably really only due to the high number of zeds I spawned, so its probably a "horde night only" defense/siege issue to deal with vs "playing the game on a normal day".  Because of this, I could see *not* adding this mechanic to "all zeds" where random one off POI/open wilderness encounters would be weird (dropping like 2 blocks here and there, just making a small mess) and maybe adding it to zeds only on horde night would be the best way to add it to a game (like making special copies of zeds, adding to horde night spawns only.  maybe drop the health of some zeds so they die very fast (like on first shot/trap hit) and others more health to get further.

 

- Yeah making a way to clear (only?) the dropped block will be important.  but maybe also... a way to clear the corpse *before* it spawns a block? Not sure yet about this or the timing of dead zed -> corpse block -> block.  If you look at it this way, you almost could have 3 timings:

dead zed -(slow timer)-> corpse block -(fast timer)-> block

and then for maximum errr... fun?... use 3 tools/weapons/tiers to allowing to "quick clear" each type, so "clearing it all" can be a challenge:

shovel for dead zeds? -> thrown explosive for corpse blocks? -> shot/ammo explosive for blocks?

 

of course, the "block dropped" could be varied as well, for maximum craziness/clearing (like terrain for some, wood/ladders?etc for others). prob jumping the shark at this point. BUUUUT: if it was a "really really heavy block" this might make the newly added structural stability of your base go bonkers and randomly collapse things, which (to me) is kinda fun if you're not playing a "long serious game"

 

Edited by doughphunghus (see edit history)
Link to comment
Share on other sites

@doughphunghus: Thanks for doing the science! It certainly sounds like it could be a fun mechanic for blood moon shenanigans. I agree that having normal sleepers and such dropping dirt all over the world would be weird and probably not very welcome, so a blood moon only variant set of zombies dropping the gore blocks would definitely be a better solution. As for the particular terrain block, I just grabbed the first likely-looking block I came to in the xml, but you'd definitely want something to harvested to dirt or sand or rotting flesh rather than as a placeable block. I think terrTopSoil might be the one I intended--one that would match the surrounding biome terrain auto-magically.

 

If you move the code dropping the gore blocks from zombieTemplateMale (from which all vanilla zombies extend) to the individual zombie definitions, you could definitely have fun with them each dropping seemingly similar gore blocks that actually UpgradedRated into different blocks as you suggested. I'm picturing that Demo you worked so hard to kill leaving a gore block that then turns into an empty gas barrel just waiting to explode, or burnt zombies (I know, they don't spawn in vanilla blood moons, but that can be changed) turning into glowing embers. This could be really fun for a change of pace from vanilla gameplay.

Link to comment
Share on other sites

14 minutes ago, Cranberry Monster said:

I'm picturing that Demo you worked so hard to kill leaving a gore block that then turns into an empty gas barrel just waiting to explode, or burnt zombies (I know, they don't spawn in vanilla blood moons, but that can be changed) turning into glowing embers. This could be really fun for a change of pace from vanilla gameplay.

Ooooo the "randomness" of embers dropping (maybe walk over it causes burning) i like but the gas barrel is definitely gong to he tried!

Link to comment
Share on other sites

Just a suggestion, but you could limit it to feral and radiated construction workers - special variant for horde nights only.  That would limit which zombies would place the block and push up the game stage when you would first see them.


Another suggestion - flaming arrows/bolts & cocktails bonus to clearing corpses - thought of it after watching someone do it online in the Wasteland mod

Link to comment
Share on other sites

ok I had to mess with this tonight... here's a link to a working (and very incomplete) example mod if anyone wants to play with it and provide feedback (or just run with it make your own!)  Its on DropBox as I don't want it on my mods github page (or 7daystodiemods.com) at this level of unfinished-ness:

Doughs-Zombies-DropBlocksOnDeath

 

Basically: I set up a new vanilla navezgane game (with only this mod) where it was horde night every night, and made the days 30 min. I gave myself guns/ammo/blocks ( creative mode) and built a "always safe" little POI base like I normally would the first week. Blocking off a few doors with bars and making a 2nd floor place to hide and shoot if needed. Nothing fancy/overpowered or traps (except my weapons). Basically a "first test" to see what it feels like.

 

The zombies *only* spawn on horde night and can be identified by the fact they crawl (like the spider) vs walk. other than that and block/corpse drop their attributes are the same as their vanilla zed counterparts.

 

Current zombies => the block they drop:
zombieUtilityWorker_doughsZDBOD => dirt (allows walking on/up it, can block openings/paths)
zombieBurnt_doughsZDBOD => ember pile (can burn if walked on)
zombieMaleHazmat_doughsZDBOD => gas barrel (can explode if shot/hit)

 

Results:

Overall it was fun, but I wanted so much more.  It will be hard to test this in a proper long game, waiting for horde nights.  It feels like it would work better in a fast "tower defense" game mode like gnamod or enTowerDefense, but in a long game .. hard to tell. it probably depends on what kind of base type you have or the total number of zeds spawned to allow the dirt droppers enough time to drop enough dirt for climbing. I mean... maybe they drop cars/couches but this feels so wrong.

 

First/second/third horde night sent a few of these zeds in, but the first night (and gamestage) are so low its very underwhelming BUT it was fun to see a gas barrel spawn on top of the bars I had made (yes, on top), and it was lootable for gas but also... out of reach.  it made me realize how nervous it can make you just sitting there out of reach, because you can be very close to it.  like... looking out a small window of your base on horde night and seeing 2 fresh barrels right up against the wall near your workbench.

 

To spice things up (as I was very OP already), I started spawning in 25 of each zed (75 total all at once) and shooting them (for gamestage bonus, but also just to do it). This went on for awhile, and eventually my POI base was mostly blown up and holes everywhere.

 

Other/fixes/thoughts so far:

- make gas barrel non lootable? but definitely "able to pick up" or destroy with 0 explosion.  Once a gas barrel was there and all zeds were cleared it was a pain since there's no way to remove it.

- dirt was not acting like I thought it would. but I also didn't have a base with walls where I could not see the zeds climbing. I think this will be more of an issue with tight kill corridors or walls BUT what was happening in my "shooting area" the most was the gas barrel explosions were destroying the dropped dirt (and leaving large holes instead).

- Gas barrels kinda start accumulating everywhere (yay!), and then they "randomly" blow up (in chain reactions) because zeds hit them. This is actually the best part as its totally random when and how many are going to blow if you're not watching carefully.

- I found myself purposefully shooting and  blowing up gas barrels as it was convenient (zeds were near them) but also this is how I normally play (cannot resist using explosives to watch chaos).  A smarter and more competent survivor would have not shot them as carelessly. But its very fun to discover them!

- Gas barrels just appear "out of nowhere" ( from your gaming perspective) so its easy to shoot them by accident when mowing down a lot of zeds BUT they do not blow up with 1 bullet so its also easy to not hit them a lot... unless several zeds are in front of them and you don't see the barrel!

- The ember piles I used are a bit too large visually, BUT they do burn the zeds periodically, just not enough to make it useful as a trap/danger to you or them. Burn effect needs increasing.  I'm not sure how cool this would be with the Fire Mod (wood catches fire if flaming zed hits it?).

- I feel there definitely needs to be more block drop variations. "mines" come to mind immediately.

- I feel there needs to be some sort of "identifier" other than crawling to know its a special zed. but everything seems to already be used.  It would be nice if we could put hats or masks on them (UMA gone :( )

- I am still ambivalent so far on "clear corpse/gore block" weapons but the timing of corpse -> gore -> block likely needs to be a bit slower to give time to react to the corpses (like in kill pits/kill corridors). @BFT2020's idea of molotovs/exploding arrows (the bonuses) feels right for clearing a zed corpse (instead of a shovel) before it turns into a gore block as its a throw-able. maybe "molotovs (corpse clear) -> pipe bombs (corpse block clear) -> some shootable (dropped block clear) EXCEPT gas barrels/mines/explodables prob need to be just picked up with no remote clear option?

- I want to try out "very low health" zeds that run up to a wall and get easily killed by another zed hitting them, so "new zeds" will spawn faster. Maybe even "zed hits something once, it damages them and they die and drop their block".  this way the special zeds will just keep coming.

- in clusters/piles of corpses, blocks do not spawn, but also when some do they throw other blocks in the air. sometimes barrels blow up because of this I think. so you may be totally unable to stop explosions.

 

Link to comment
Share on other sites

Update: I made a second/beefed up pass at this.  All "features/ideas" above are not all done, but its workable for now I hope. The mod is on my mod page/github and is lightly tested for a21.2. I may add more special weapons to clear blocks but I'm having issues on how to "remotely" clear out a gas barrel without blowing it up (so they are made harvestable instead).  I couldn't even get the "pick up" action to work on the gas barrel.  I think it starts to kick in more around/after gamestage 35-40, based on how I added these zeds to the blood moon entitygroups.

 

Mod: Zombies: Add Some That Drop Blocks On Death - Adds several zeds (vanilla zed skins) that appear only during horde night that drop certain blocks a short time after death (first they drop a gore pile, and then that turns into a block). See README in the mod, but basically: ash pile (can burn if walked on), candy tin mine (can pick up), "organic dirt pile" (if harvested it yields some goo you can enhance pipe bombs with for blowing up organic blocks), and Gas barrel (cannot pick up, but can harvest. blows up if shot/hit). If you destroy the corpse or gore pile fast enough, then no extra block is left behind.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...