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

The Return of the Zombie Loot

Kubikus

New member
Just replacing the 2% chance zombie's currently have to drop something good with a 50% chance to drop junk. I'll probably work on this further to give zombies specific loot, tools and mats for the builder, meds for the nurse and so on.

Add this line to Localization.txt to have a proper label for the bag:

Code:
EntityLootContainerJunk,entityclasses,Entity Info,New,Dropped Loot (Junk),,,,,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The second archive contains a template for those who want one. It creates a lootcontainer (in loot.xml) and a dropped bag (in entityclasses.xml) for every zombie. It adds the bag for the "LootDropEntityClass"-property and it adds a "LootDropProb" for every zombie. Every lootcontainer just contains the lootgroup "junk", but you can edit it anyway you want to, fill the lootcontainer with items or lootgroups, change the drop rate, remove duplicates.

Edit: I have now started to populate the template with actual zombie specific loot, so some have something else but junk. Might not be balanced.

There is, however, another flaw in the xpath-approach: The ids for the lootcontainer:

Code:
<!-- cntMedicLootPile -->
<lootcontainer id="107" count="1,2" size="5,3" sound_open="UseActions/open_pill_case" sound_close="UseActions/close_pill_case" loot_quality_template="baseTemplate" destroy_on_close="true">
<item group="medicine"/>
</lootcontainer>
My lootcontainer start with id="108". If another xpath-mod would also use the id "108", the mods would not be compatible, only one would have the proper container.

Also: Here is a desc-list for localization.txt.

Here is another thing: I'm currently using the satchel as the dropped bag, you can use all kinds of containers, some I tried are:

//backpack_droppedPrefab

//loot_satchelPrefab

//duffle01Prefab

//sports_bag01Prefab

//sports_bag02Prefab

//backpack01Prefab

//backpack03Prefab

//backpack02Prefab

//AmmoPiles_LargePrefab

//medic_loot_pile_APrefab

Some, however, seem pretty restless, once they start rolling, they hardly ever stop. Satchel is fine, vanilla's bag is "backpack_droppedPrefab".

Kubikus Zombie Loot Template.zip

Kubikus Zombie Loot.zip

 

Attachments

Last edited by a moderator:
Nice. Is it possible to let the zds have a chance of dropping two or more bags?
No. But why would you want two bags? You can put anything you want from loot in one bag. You could also give the junk-bag a chance to be vanilla's good stuff bag.
Also, I edited the op, to have a proper label for the bag. I guess you can't use xpath to edit Localization.txt? Flaw!

 
No. But why would you want two bags? You can put anything you want from loot in one bag. You could also give the junk-bag a chance to be vanilla's good stuff bag.
Also, I edited the op, to have a proper label for the bag. I guess you can't use xpath to edit Localization.txt? Flaw!
nope no Localization

And with RH Localization heavy its why i stopped using xpath. Which is a shame :( I liked it a LOT

 
Looks like 199 upped it from base .02 and .03 for ferals to .03 for all. Would a simple mass replace of "LootDropProb" value=".03" to "LootDropProb" value=".25" in entityclasses.xml change it or is there something else that needs to be changed?

Thanks

 
nope no Localization
And with RH Localization heavy its why i stopped using xpath. Which is a shame :( I liked it a LOT
I assume it will be "fixed" sometime, no reason not to use it. It's already great because you don't have to quit the whole programm for every change you want to test, just stop and re-start the save.

Looks like 199 upped it from base .02 and .03 for ferals to .03 for all. Would a simple mass replace of "LootDropProb" value=".03" to "LootDropProb" value=".25" in entityclasses.xml change it or is there something else that needs to be changed?
Thanks
You can simply increase the chance for the drops with that number, yeah, but what vanilla drops is pretty good stuff, getting such a bag from every fourth zombie you kill is kinda too much; personally I find it too good even with the low chance it currently has. Some zombies still drop it, btw, at least the Hawaiian.
Anyways, this mod will drop bags with "junk", pretty much what the trash mobs dropped in A16. I'll expand it to zombie-type-specific loot, when I actually start some serious modding.

 
At some point the forum is going to decide you have too many attachments, so you'll want a real file host kub.

Github or gitlab is your best bet.

 
Honestly I feel 25% would be abit more balanced than the 50%
Oh hey, I didn't see you there. Well, it's only junk and junk for every type, so so far I can say it's alright. Will adjust when I get more type-specific loot in; still playing mainly and only modding every now and then.
- - - Updated - - -

At some point the forum is going to decide you have too many attachments, so you'll want a real file host kub.
Github or gitlab is your best bet.
Damn this complicated life... Thanks for the heads up, tho, will cross that bridge when I have to.

Edit: I am just noticing a major flaw of the mod, wherever a zombie has no loot-drop-probability of it's own, but a dropped container of it's own, it drops that container with a 50% chance. Like here:

Code:
<entity_class name="zombieBiker" extends="zombieTemplateMale">
<property name="Tags" value="zombie,walker"/>
<property name="Mesh" value="Zombies/zombieStandardBikerRagdoll"/>
<property name="Mass" value="230"/>
<property name="WalkType" value="7"/>
<property name="PainResistPerHit" value=".75"/>

<!-- Gameplay -->
<property name="HandItem" value="meleeHandZombieStrong"/>
<property name="ExperienceGain" value="1200"/> <!-- XP strong -->
<property name="LootDropEntityClass" value="EntityLootContainerStrong"/>
<effect_group name="Base Effects">
	<passive_effect name="HealthMax" operation="base_set" value="300"/>
	<passive_effect name="HealthMax" operation="perc_add" value="0"/> <!-- Zombie HP scale -->
	<passive_effect name="PhysicalDamageResist" operation="base_add" value="20"/>
</effect_group>
</entity_class>
It will drop the EntityLootContainerStrong-bag with a 50% chance. Will fix that... soon. Weekend.

 
Last edited by a moderator:
Is there a way to make it still drop the good loot 2 - 3% of the time and the junk as well?
This might work; haven't tested it. I'm particularly uncertain if the probability-values work like this, vanilla sometimes uses kinda weird values. Is "0.98" actually the 98% chance..?
Try it out, replace everything that is in the loot.xml (of the xpath-mod) with this:

Code:
<configs>
<insertAfter xpath="/lootcontainers/lootgroup[@name='BuriedStashChest']" >
<lootgroup name="A17drops">
<item group="cannedfood" count="1,2" prob="2"/>
<item name="drinkJarBeer" count="1,3" prob=".8"/>
<item name="drinkJarBoiledWater" count="1,4" prob="1.5"/>
<item group="books" prob="1"/>
<item name="resourceCandleStick" count="1,2" prob="1"/>
<item name="resourceForgedIron" count="1,8" prob="0.5"/>
<item name="resourceForgedSteel" count="1,8" prob="0.5"/>
<item group="tools" prob="1"/>
<item group="rareTools" prob=".5"/>
<item group="ironArmor" prob=".5"/>
<item group="steelArmor" prob=".3"/>
<item group="militaryArmor" prob=".3"/>
<item group="clothes"/>
<item group="warmClothes" prob=".3"/>
<item group="ammo" prob="2"/>
<item group="weaponsPistol+ammo" prob="0.8"/>
<item group="weaponsMagnum+ammo" prob="0.15"/>
<item group="weaponsAnyShotguns+ammo" prob=".8"/>
<item group="weaponsHuntingRifle+ammo" prob=".5"/>
<item group="weaponsMilitaryGuns+ammo" prob=".15"/>
<item name="gunCompoundBow" prob="0.4"/>
<item name="nightvisionGoggles" prob="0.2"/>
<item name="casinoCoin" count="10,110" prob="1"/>
<item name="oldCash" count="20,100"/>
<item name="drugHerbalAntibiotics" count="1,2" prob="0.2"/>
<item group="rareMedicine" prob="0.3"/>
<item name="drugPainkillers" count="1,2" prob=".5"/>
<item name="drugVitamins" count="1,2" prob=".7"/>
<item group="treasureMaps" count="1" prob="0.1"/>
<item group="questChallenge" count="1" prob="0.1"/>
</lootgroup>
</insertAfter>

<append xpath="/lootcontainers" >
<lootcontainer id="108" count="1,2" size="6,2" destroy_on_close="false" sound_open="UseActions/open_backpack" sound_close="UseActions/close_backpack" open_time="1" loot_quality_template="baseTemplate">
<item group="junk" count="0.98"/>
<item group="A17drops" count="0.02"/>
</lootcontainer>
</append>
</configs>
 
Last edited by a moderator:
Nice, saved me a bit of work doing this myself. I ended up setting the drop chance to 20% (10x vanilla value) then re-adding the vanilla good loot and reducing their probability by 10x (to make up for the increased chance of the container dropping). Increased the container count and size a tad too. Pasted the code below, haven't done much testing yet and I'm not sure how count 1,3 will affect the chance of junk spawning. It may be that it picks 1-3 individual items at random, then rolls the probability, which means it may make junk more rare which isn't what I want.

Code:
<lootcontainer id="108" count="1,3" size="6,4" destroy_on_close="false" sound_open="UseActions/open_backpack" sound_close="UseActions/close_backpack" open_time="1" loot_quality_template="baseTemplate">
<item group="junk" count="1"/>
<item group="cannedfood" count="1,2" prob="0.2"/>
<item name="drinkJarBeer" count="1,3" prob=".08"/>
<item name="drinkJarBoiledWater" count="1,4" prob=".15"/>
<item group="books" prob="0.1"/>
<item name="resourceCandleStick" count="1,2" prob="0.1"/>
<item name="resourceForgedIron" count="1,8" prob="0.05"/>
<item name="resourceForgedSteel" count="1,8" prob="0.05"/>
<item group="tools" prob="0.1"/>
<item group="rareTools" prob=".05"/>
<item group="ironArmor" prob=".05"/>
<item group="steelArmor" prob=".03"/>
<item group="militaryArmor" prob=".03"/>
<item group="clothes"/>
<item group="warmClothes" prob=".03"/>
<item group="ammo" prob="0.2"/>
<item group="weaponsPistol+ammo" prob="0.08"/>
<item group="weaponsMagnum+ammo" prob="0.015"/>
<item group="weaponsAnyShotguns+ammo" prob=".08"/>
<item group="weaponsHuntingRifle+ammo" prob=".05"/>
<item group="weaponsMilitaryGuns+ammo" prob=".015"/>
<item name="gunCompoundBow" prob="0.04"/>
<item name="nightvisionGoggles" prob="0.02"/>
<item name="casinoCoin" count="10,110" prob="0.1"/>
<item name="oldCash" count="20,100" prob="0.1"/>
<item name="drugHerbalAntibiotics" count="1,2" prob="0.02"/>
<item group="rareMedicine" prob="0.03"/>
<item name="drugPainkillers" count="1,2" prob=".05"/>
<item name="drugVitamins" count="1,2" prob=".07"/>
<item group="treasureMaps" count="1" prob="0.01"/>
<item group="questChallenge" count="1" prob="0.01"/>
</lootcontainer>
 
Hi, change lootcontainer groups from count to prob :)

Code:
<lootcontainer id="108" count="1,2" size="6,2" destroy_on_close="false" sound_open="UseActions/open_backpack" sound_close="UseActions/close_backpack" open_time="1" loot_quality_template="baseTemplate">
<item group="junk" prob="0.98"/>
<item group="A17drops" prob="0.02"/>
</lootcontainer>
and a typo (extra ") at the top

Code:
<lootgroup name="A17drops">
 
Last edited by a moderator:
I'm getting a bag dupe exploit when using this modlet. If I walk up and spam click "E" on an unsearched dropped loot bag, each click spawns a new bag.

 
the entityclasses has loot container id 108, and the loot xml has it as 111. so change the 108 to 111

from

<property name="LootListOnDeath" value="108"/>

to

<property name="LootListOnDeath" value="111"/>

that should work.

 
I did a rework of a middle ground between A16.4 and A17 loot drops. Most zombies have their loot lists changed back to what they were in A16.4 with updated item names, eg. farmers drop hoes and seeds, snow zombies drop fireaxes, cops drop flashlights/guns/vests, etc. But most ferals now drop their A17 loot albeit at a lower probability and a lowered count of 1,3 from 2,3 since the universal drop probability is higher. Also all item ids start at 200 to avoid problems with patches. Seems to work fairly well so far, going to do a little more testing then I can post the code for you to throw in your mod or whatever if you're interested.

 
Back
Top