Gamers logo

Dayz Console Modding Part 4

changing and increasing zombie loot.

By L.RPublished 3 years ago 3 min read
Like
(image source: https://store.steampowered.com/agecheck/app/221100/)

In this edition of my DayZ Console Modding guides we shall take a look at zombie loot and how to go about changing as well increasing the loot that can spawn on zombies. There are two files that we will be working with to get this done, which are:

  • cfgrandompresets.xml
  • cfgspawnabletypes.xml

cfgrandompresets.xml is where loot presets are created. In this file you will see blocks of code that have their own naming lines along with lists of items and chance values.

example of an entry in cfgrandompresets.xml for a cargo preset.

The first line of each preset tells the server whether or not it is used as "cargo" or "attachments" for the entity they are added to in cfgspawnabletypes.xml, followed by the chance value to determine how likely one object from the preset will be selected to spawn, with the name of the preset on the end. The next few lines declare the items available for the preset to pick from followed by chance values to determine which items are more or less likely to be selected. The final line of each preset is the closing tag for the code block and must match the "cargo" or "attachments" as used on the first line.

An easy way to boost the chances of zombies dropping loot is to simply raise the chance value on the first line of each preset. If raised to 1.00 then the chances of a zombie using the preset will drop one of the items from the list will be 100%. You can also raise the individual item chance values, but be aware that you cannot set all item chance values to 1.00 due to how the presets cycle through their lists to select items. Just keep in mind that the higher an items chance value is, the more likely it is to be selected and if you put items with higher chances at the top of a preset then you lessen the likelyhood of the items further down being selected.

Example of entries in cfgrandompresets.xml with 100% chance of an item being selected

cfgspawnabletypes.xml is where the preset names get declared under the entries for items, zombies and vehicles as well as declarations for items added directly such as the parts for cars and trucks. A quick way to increase the amount of items a zombie will drop is to copy/paste the lines for the cargo presets so there is two of them on each zombie. Don't double the attachments presets as they won't fit and will cause issues with zombie loot.

(Example of a zombie entry in cfgspawnabletypes with cargo presets doubled)

You can also declare items on zombies directly by following the same code logic as is done by default for cars and trucks. By doing this you can decide exactly what items a zombie will drop alongside or instead of using presets to randomise the loot drops. Take a look at the example below to see how this is done:

(example of cfgspawnabletypes.xml entry with items declared directly)

In the picture above the first zombie entry is entirely default/vanilla, but the second entry replaces the "foodCity" cargo preset with a tin of beans and the "bagsCity" attachments preset with a yellow dry bag. When adding to the amount of loot a zombie can drop, remember they only have 12 slots of inventory so any items that overfill that space wont be on them when they die. A few updates ago we could also fill any bags we attached to zombies with loot also, but as of update 1.10 that stopped being possible. Can only hope the devs "fix" that in future updates.

For more help, support and guidance please join my Discord: https://discord.gg/pp5JJDu

Just in case you missed them, here are the previous parts to the series:

https://vocal.media/stories/day-z-console-modding-part-1

https://vocal.media/stories/day-z-console-modding-part-2

https://vocal.media/stories/day-z-console-modding-part-3

Now although simply reading this article does help support me in my efforts to make coding Dayz XML easier for all, it doesnt help keep the lights on! ;) So if you found that this or any of my other articles have helped you please donate to the cause via one of the methods below:

https://server.nitrado.net/donations/donate/3858410

http://paypal.me/mrflyingbiscuits

https://cash.app/%C2%A3Rventris

how to
Like

About the Creator

L.R

I mostly find myself here to release creative flair, but also like to pass on what knowledge I can, so the odd tutorial and/or guide worms it's way to the forefront of my mind along the way =)

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.