Gamers logo

DayZ Console Modding V2.1

How to Modify The Loot Economy

By L.RPublished 2 years ago 6 min read
2
image source: https://store.steampowered.com/agecheck/app/221100/

Produced by Bohemia Interactive, DayZ is a massive open-world zombie survival game for PC, Xbox and PlayStation. It's main aim is to pit players against a harsh unforgiving landscape. Including but not limited to wolves, bears, other humans and of course...the undead. All who may want nothing more than to steal the rags from your bag and leave you to rot out where you bleed out. Originally an Indie mod for the Arma games, Bohemia Interactive bought the rights to and further developed the game. Through this series of articles, I shall aim to give a fairly easy to read run-down of how to modify the DayZs XML files so you can get your console community servers working (more-or-less) exactly how you would like them to.

Assuming you are starting from a brand new server or have no care for the play time thats been had on it. Go into economy.xml, find the "<dynamic" line. Set all four values on it to "0", save, upload and then do a server restart. This will wipe all of the loot (and any bases) off of the map ready for when changes to the loot economy are complete.

(example of lines 1 to 3 of economy.xml)

With that step out of the way, it's time to make changes to how many of each item can spawn on the map. To do this go into types.xml and raise or lower the <nominal> and <min> values for each item to suit your needs. <nominal> is the total amount of an item the server will aim to spawn. <min> is the bottom threshold to tell the server when to start spawning more. As an example, if <nominal> is 10 and <min> is 5, then when 5 of that item has been picked up or despawned, the server will spawn more to reach <nominal> value again. Also be aware that raising values too high can cause performance issues. I personally don't recommend boosting loot by anymore than 25% to start with. This way, once finished you will be able to see the kind of difference made and whether you want to raise/lower some items further.(please note; all zombie, car, animal, police wreck and heli crash entries found in types.xml must be left at 0 value or problems will occur.)

example: entry from types.xml

Now that you have set how many of each item you want spawning, we should take a look at where these things are spawning. In types.xml you will notice most items have these tags: category, usage and value (tier). Each item can have just one category aswell as multiple usage and tier tags to spread or limit potential spawn points for each item across the map. (please note; usage and category tags must match those defined in cfglimitsdefinitions as well as declared on entries in mapgrouproto.xml to function correctly)

Okay so now we have the desired amount of loot spawning across the places we would like them to spawn at, we should probably take a deeper dive into all these other tags that you see for each item in types.xml.

  • <lifetime> - This is the amount of time (in seconds) an item stays on the map before despawning. i recomend reducing this to the equivelant of 2 and 4 hours for all items that are not considered storage like tents, barrels and fences. this will help cycle loot more efficiently.
  • <restock> - this is the amount of time (in seconds) between individual spawns of an item once the min value has been reached until the nominal amount is on map.
  • <quantmin> and <quantmax> are for items that stack together or contain something like loose nails, bullets, mags, water bottle. for example: water bottles with both at 100 will always spawn full.
  • <cost> is a priorty setting for spawn rates. i dont recomend changing this as it can make a mess of the loot econmy.
  • the final part to look at here are the "<flags".Tthese are used to decide if items stored in containers or on players count towards nominal value.
  • count_in_cargo - if set to "1" then instances of that item inside pockets, bags, cars and rendered zombies count towards nominal value. If this is set to "0" then they will not be counted towards its nominal value.
  • count_in_hoarder - when set to "1" will count items stored in tents, barrels and chests towards nominal value. If set to "0" then they will not be counted towards its nominal value.
  • count_in_map - should always be set to "1" or items spawning on the map will not count towards nominal value. Meaning they can and will forever spawn, flooding the map and likely crashing the server due to overload.
  • count_in_player - when set to "1" will count items players have on them towards nominal value. this potentially includes offline players so be careful.
  • crafted - this only effects craftable items like fireplaces, fences and so on. if set to "1" by default that indicates the item is craftable in game, but if it is"0" by default then the item isn't craftable. This could possibly be useful if you spawn crates filled with loot and dont want them crafted by players.
  • deloot - Is short for "Dynamic Event loot", If items have this set to "1" they can only spawn with events such as heli crashes and police wrecks provided they also have the correct category and usage tags to match.

Now it is time to test out the changes made. So go back into economy.xml, return all four of the values on that "<dynamic" line back to "1" and restart your server. This will tell the server to begin spawning items based on the new values you've provided. Just be aware that it can take some time for the map to repopulate the loot. One thing that will help to speed this process up is going go into globals.xml and set the "IdleModeStartup" value to "0". This will stop your server (and thus all timers such as lifetimes) getting paused when no one is online.

The final thing I would like to cover today is error checking via code validation. What I mean by this is setting up and/or making use of tools that will point you to code breaking errors, so that you can fix them yourself or ask for more specific help than "something's not working".

The first tool for the job that I would like to mention is web based and can be found at: http://xmlvalidation.com. With this you can upload an XML file for it to scan through to check for code breaks. If it doesn't find any then it will tell you, but if it does it will try to point you to the first one it can find. Just be aware that sometimes it will point you close to but not quite exactly where the issue really is. One last note for this tool, be sure to return to and then refresh the homepage between file uploads. Otherwise it will simply read the file already uploaded again and not the next one you thought you had uploaded.

(Plugins admin window in notepad++)

The other tool for the job that I would like to mention is "XML Tools". This is a plugin that can be downloaded from within notepad++. To find it you will need to first click "plugins", followed by "plugins admin..." and then type "XML Tools" in the searchbar. Check the tickbox and then hit install. Once done notepad++ will most likely want to restart to finish making changes, but after this every time you hit save, the file will be scanned for code breaking errors and if any are found you will be taken to the first one it can see.

(Example of an error found. A missing " on line 13)

pc
2

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

Nice work

Very well written. Keep up the good work!

Top insights

  1. Easy to read and follow

    Well-structured & engaging content

  2. Expert insights and opinions

    Arguments were carefully researched and presented

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.