S0larity 0 Posted May 10, 2022 (edited) Hello 😃 I've been tweaking around with loot in my server and I am currently adjusting the loot zombies drop I found out that in cfgrandompresets I can make nice loot tables with % drops And inside cfgspawnabletypes I can adjust what a zombie has as cargo, and which attachments it carries. So what I did was (for testing purposes) I added a 100% chance ZmbM_priestPopSkinny will spawn with a backpack, and this worked. Now what I am trying to do but I keep failing is add loot inside this backpack that the zombie is carrying. My question is: How do I accomplish to get the backpack the zombie is carrying to have loot inside it ? cfgspawnabletypes.xml : <type name="ZmbM_priestPopSkinny"> <cargo preset="foodHermit" /> <attachments> <item name="TaloonBag_Violet" chance="1.00"> <cargo preset="GenesisLoott" /> </item> </attachments> <cargo preset="testLoottt" /> <cargo preset="testLoott" /> <cargo preset="testLoot" /> </type> The code above doesn't work but it was my attempt to get loot to spawn inside the backpack Edited May 10, 2022 by S0larity typo Share this post Link to post Share on other sites
Derleth 1357 Posted May 10, 2022 On 5/10/2022 at 3:15 AM, S0larity said: Hello 😃 I've been tweaking around with loot in my server and I am currently adjusting the loot zombies drop I found out that in cfgrandompresets I can make nice loot tables with % drops And inside cfgspawnabletypes I can adjust what a zombie has as cargo, and which attachments it carries. So what I did was (for testing purposes) I added a 100% chance ZmbM_priestPopSkinny will spawn with a backpack, and this worked. Now what I am trying to do but I keep failing is add loot inside this backpack that the zombie is carrying. My question is: How do I accomplish to get the backpack the zombie is carrying to have loot inside it ? cfgspawnabletypes.xml : <type name="ZmbM_priestPopSkinny"> <cargo preset="foodHermit" /> <attachments> <item name="TaloonBag_Violet" chance="1.00"> <cargo preset="GenesisLoott" /> </item> </attachments> <cargo preset="testLoottt" /> <cargo preset="testLoott" /> <cargo preset="testLoot" /> </type> The code above doesn't work but it was my attempt to get loot to spawn inside the backpack Doesn't work like that, you can't add a second layer of attachments. There is another bit of code controlling what potentially spawns in that type of backpack, lines 147-150: <type name="TaloonBag_Violet"> <cargo preset="foodVillage" /> <cargo preset="mixVillage" /> </type> The foodVillage and mixVillage presets in turn are defined in cfgrandompresets.xml. So if you want that priest to have a special batch of loot it has to be in his pockets, or you can make sure that backpack only spawns on the priest and then use the backpack's config to define its contents. 1 Share this post Link to post Share on other sites
S0larity 0 Posted May 10, 2022 On 5/10/2022 at 6:23 AM, Derleth said: Doesn't work like that, you can't add a second layer of attachments. There is another bit of code controlling what potentially spawns in that type of backpack, lines 147-150: <type name="TaloonBag_Violet"> <cargo preset="foodVillage" /> <cargo preset="mixVillage" /> </type> The foodVillage and mixVillage presets in turn are defined in cfgrandompresets.xml. So if you want that priest to have a special batch of loot it has to be in his pockets, or you can make sure that backpack only spawns on the priest and then use the backpack's config to define its contents. Omg this is genius, totally understand the logic now, going to test it now, thanks so much for your reply man! really appreciate it been working to fix this for many hours now lol ❤️ Share this post Link to post Share on other sites
S0larity 0 Posted May 10, 2022 Seems that the backpack the zombie is carrying is still empty somehow 😞 Probably when the backpack spawns on the ground randomly it will have the items inside that I configurated. my code: cfgrandompresets.xml <cargo chance="1.00" name="GenesisLoot"> <item name="TunaCan" chance="1.00" /> <item name="Netting" chance="1.00" /> <item name="SaltySticks" chance="1.00" /> </cargo> <cargo chance="1.00" name="GenesisLoottt"> <item name="SaltySticks" chance="1.00" /> </cargo> <!-- ------------------------- BAGS ZOMBIE ------------------------- --> <attachments chance="1.0" name="backpacks_T1"> <item name="TaloonBag_Blue" chance="1.00" /> <item name="TaloonBag_Green" chance="0.05" /> <item name="TaloonBag_Orange" chance="0.05" /> <item name="TaloonBag_Violet" chance="0.05" /> </attachments> cfgspawnabletypes.xml <type name="TaloonBag_Blue"> <cargo preset="foodVillage" /> <cargo preset="mixVillage" /> <cargo preset="GenesisLoottt" /> </type> <type name="ZmbM_priestPopSkinny"> <cargo preset="GenesisLoot" /> <attachments preset="backpacks_T1" /> </type> Share this post Link to post Share on other sites
Derleth 1357 Posted May 10, 2022 Could be something else, I often kill zeds who have some cargo in their backpack so the logic normally works. Could be that it just doesn't like 1.0 values, I dunno... Share this post Link to post Share on other sites
S0larity 0 Posted May 10, 2022 On 5/10/2022 at 3:21 PM, Derleth said: Could be something else, I often kill zeds who have some cargo in their backpack so the logic normally works. Could be that it just doesn't like 1.0 values, I dunno... Can you maybe share your cfgspawnabletypes.xml & cfgrandompresets.xml ? somehow I can make items spawn inside the backpack when they are on the ground (world loot spawn) But backpacks on zombie stay empty 😞 Share this post Link to post Share on other sites
Atorcre666 0 Posted May 30, 2022 You can't add cargo to cargo. The backpack is considered zombie cargo and wont have anything youve added to the cargo of a backpack. If you find a backpack it will have the cargo. but cargo can not have cargo. Same if you add a firstaidkit to a car , it will be empty. If you want zombies to drop different items just change the items they currently drop to the randompresets . Youve had the answer , youre just over thinking. 1 Share this post Link to post Share on other sites