Gamers logo

Dayz Console Modding

by sajid ali 2 months ago in adventure games
Report Story

Way To Mess With The Loot Economy

In this next edition of DayZ Console Modding, I want to take you through a few slightly different things that you can choose to do with your XML files. These are all tricks that will further switch up how loot can be distributed across your server. As most server owners are aware simply changing, adding and/or removing the "usage" tags used on items in types.xml will change the kinds of locations items can spawn at, but so does messing around with the "tag", "value" and "category" tags that are used on them. As well as this, further changes can be made by playing around with the same those same three tags which are also used on entries for buildings in mapgroupproto.xml.

At one time it appeared to have become a generally accepted fact that we couldn't set specific instances of building's to have different loot spawn inside them compared to other instances of those same building's elsewhere on the map. But since then the myth got itself busted. It turned out that with the right modifications made it is very much a possibilty for those willing and able to put the time into it. Before getting into further detail I would like to state that I cannot vouch for the general stability of over replicating this process on your servers. It's one thing to make a few instances of buildings have loot that is a little different to the rest, a whole other ball game to try and fully customize every different instance of those same buildings.

(example of the default entry in mapgroupproto.xml used for "Land_Barn_Wood1")

Before getting any further, I would like to touch on the relationship between mapgrouppos.xml and mapgroupproto.xml. A fairly common misconception is that mapgrouppos.xml spawns the buildings across the map whilst mapgroupproto.xml (along with types.xml) handles the kind of loot that can spawn where. But, although these two files can be manipulated to spawn buildings and other objects at custom locations, both files are only really designed to decide how & where loot gets distributed. Essentially mapgroupproto.xml creates nets to spawn loot and determines the kinds of loot that will spawn inside those nets. With Mapgrouppos.xml then used to place those loot nets across the map with the coordinates for each location set acting as the centre point for the net placed on them. As a side note, the names used don't actually matter as long as they match between the two files. By default the devs used the actual file name for the buildings, most likely to make it easy for them to see what code is for what object. But that isn't actually a necessity at all. As long as the names match between mapgrouppos.xml and mapgroupproto.xml they should work fine.

(default example from mapgrouppos.xml with a highlighted entry used for "Land_Barn_Wood1")

With all that said and out of the way, its time to finally dig into the code. Our first step will be to choose a building you would like to personalize the loot for. I'm going to use the "Land_Workshop2" in Turovo, Chernaraus as an example to work with. Next you need to find the entry for your chosen building in Mapgrouppos.xml and change its name. I have changed "Land_Workshop2" to "Land_Workshop2_Turovo" in my example so it's easy to see where it is located. You may find using to look at coordinates will help you find the entry for the building you have chosen.

(example from mapgrouppos.xml)

Back in Mapgroupproto.xml scroll down to the entry for your chosen building , copy/paste it and then change the name on this newly pasted entry. Finally simply add and/or remove the usage and category tags on the new entry to change the types of loot that will be available to spawn at this one instance of the building.

(example of new entry in mapgrouproto.xml with changes to usage and category tags)

If you have any questions or would like some more help, support and guidance please join my Discord:

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 this or any of my other articles have helped you please donate to the cause via one of the methods below:

adventure games

About the author

sajid ali

best story

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights


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

    © 2022 Creatd, Inc. All Rights Reserved.