Gamers logo

DayZ Console Modding Part 6

Another Way To Mess With The Loot Economy

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

In this edition of DayZ Console Modding, I want to talk through some slightly different things that you could possibly do with your XML files to further switch up how loot gets distrubuted across your server. As most server owners are aware simlpy changing, adding and/or removing the "usage" tags used on items in types.xml will change the kinds of locations items can spawn at, so does messing with the "tag", "value" and "category" tags used on them. On top of this, further changes can be made by changing the "tag", "usage" and "category" tags used on entries for buildings in mapgroupproto.xml.

Now it seemed to have become a generally accepted fact that we can't set specicifc instances of building's to have different loot spawn inside them compared to other instances of the same building's elsewhere on the map. But I have recently come to understand that this generally accepted fact, is indeed a myth with the right modifications made. But 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 one or two instances of the same building 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")

For a moment I would like to touch on the relationship between mapgrouppos.xml and mapgroupproto.xml. A common misconception is that mapgrouppos.xml spawns the buildings across the map whilst mapgroupproto.xml (along with types.xml) handles what kinds of loot can spawn where. But, although they can be manipulated to spawn buildings and other objects at custom locations, both files are only really designed to effect where loot is distributed. Mapgroupproto.xml essentially 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 each location 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, but as I'll cover further on, that isn't a neccessity at all.

(default example from mapgrouppos.xml showing an entry used for "Land_Barn_Wood1")

With all that said and out of the way, its time to get into the code. The first step is to pick a building to "play" with. I'm going to use the "Land_Workshop2" in Turovo, Chernaraus as an example. Next find the entry for the chosen building in Mapgrouppos.xml and change its name. I use "Land_Workshop2_Turovo" in my example. I recommend using https://dayz.xam.nu to get rough coordinates which help you find the entry for the building you have chosen.

(example from mapgrouppos.xml)

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

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

A trick for those that custom spawn buildings with loot and want those instances to have different loot to the ones across the map. Is to instead of changing just the one mapgrouppos.xml entry for a building on the map. Change all of the ones that match with the type name on your event to something else. Then copy/paste the default entry for the same building in mapgroupproto.xml and change its name to match the new name in mapgrouppos.xml. Finally modify the tags used on the original entry to the ones you desire.

If you have any questions or would like some 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

https://vocal.media/gamers/dayz-console-modding-part-4

https://vocal.media/gamers/day-z-console-modding-part-5

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:

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.