Custom Bunker Loot
Looking for DayZ console bot setup guides?
See our feature pages for DayZ auto ban, and DayZ economy bot.
If you want to add a custom bunker to your map and make it actually work properly, there's a few things you can do beyond just copying the files from scalespeeder (or other such sources)
Lets dive into some of the code and Ill show you how to spawn in the loot effectively and show you how to adjust the loot to balance out the server.
Mapgroupproto.xml
<group name="Land_Underground_Storage_Workshop" lootmax="10">
<usage name="Military" />
<usage name="Industrial" />
<usage name="Underground" />
<value name="Tier1" />
<container name="lootTools" lootmax="10">
<category name="tools" />
<category name="containers" />
<category name="clothes" />
<category name="food" />
<category name="weapons" />
<category name="explosives" />
<point pos="7.701721 0.585022 2.162843" range="0.134375" height="0.335938" />
<point pos="-5.861390 1.038391 5.652586" range="0.134375" height="0.335938" />
<point pos="7.792112 1.085022 -3.612307" range="0.168750" height="0.370001" />
<point pos="8.779358 1.085022 -3.621338" range="0.168750" height="0.370001" />
<point pos="-6.112244 0.959229 -0.271973" range="0.203125" height="0.507797" />
<point pos="7.579895 1.085022 -0.845215" range="0.203125" height="0.370001" />
<point pos="3.603882 0.950012 0.095948" range="0.237500" height="0.593750" />
<point pos="8.984680 1.085022 -0.808107" range="0.237500" height="0.370001" />
<point pos="8.363525 1.085022 2.311525" range="0.271875" height="0.370001" />
<point pos="9.645080 1.085022 -2.508303" range="0.271875" height="0.370001" />
<point pos="0.097598 0.775879 5.849854" range="0.306250" height="0.765625" />
<point pos="4.675476 0.775879 0.722414" range="0.306250" height="0.765625" />
<point pos="4.860961 0.775879 -2.945070" range="0.308105" height="0.770264" />
<point pos="4.856812 0.775879 -1.292969" range="0.340625" height="0.851563" />
<point pos="-1.382507 1.250000 3.077636" range="0.340625" height="0.851563" />
<point pos="-2.626770 0.950012 -3.466797" range="0.375000" height="0.937500" />
<point pos="-1.047911 0.775879 5.904786" range="0.375000" height="0.937500" />
<point pos="-3.773071 0.950012 -3.527832" range="0.409375" height="1.023438" />
<point pos="3.589782 0.950012 1.729493" range="0.409375" height="1.023438" />
<point pos="-0.348816 0.775879 -0.082519" range="0.530546" height="1.326365" />
<point pos="-2.184265 0.775879 0.056396" range="0.546875" height="1.367188" />
<point pos="-7.276184 0.937866 -1.379150" range="0.650000" height="1.625000" />
</container>
</group>This is an example of one of the underground items available in the DayZ Editor - all those <point> markers are where loot can possibly spawn, but if you are adding a bunker to chernarus (or another map) - then we need to look at the usages and values.
<usage name="Military" />
<usage name="Industrial" />
<usage name="Underground" />
<value name="Tier1" />in this case the Usage is Military, Industrial and Underground and the value is Tier1 (so it will be shit loot) but beyond that on Chernarus there is no Underground flag. so we need to add that to cfglimitsdefinitions.xml
cfglimitsdefinitions
<usageflags>
<usage name="Military"/>
<usage name="Police"/>
<usage name="Medic"/>
<usage name="Firefighter"/>
<usage name="Industrial"/>
<usage name="Farm"/>
<usage name="Coast"/>
<usage name="Town"/>
<usage name="Village"/>
<usage name="Hunting"/>
<usage name="Office"/>
<usage name="School"/>
<usage name="Prison"/>
<usage name="SeasonalEvent"/>
<usage name="ContaminatedArea"/>
<usage name="Special"/>
<usage name="Lunapark"/>
<usage name="Underground"/> <!-- This is new add this -->
</usageflags>This means that the game can now read the types file and look for a usage for "Underground" and spawn loot to anywhere that has that flag.
Types
In types.xml all of the possible loot exists, and they have the same usage/values that are linked to the mapgrouppos entries.
So lets say in "Underground" we want to add cans of bacon. by default your bacon can might look like this
<type name="TacticalBaconCan">
<nominal>7</nominal>
<lifetime>28800</lifetime>
<restock>0</restock>
<min>3</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="food"/>
<tag name="shelves"/>
<usage name="Military"/>
</type>It currently spawns in Military, there is a nominal of 7 (what the server wants to spawn) and a minimum of 3. If we're adding bacon to Underground, we probably want to increase the minimum and the nominal, so that it has more of a chance of spawning there. Note: If it has multiple <usage> flags, its only a chance that it will spawn, its not guaranteed
mapgroupproto
Beyond using the types file to place loot you can actually use something called <dispatch> - this spawns items in at specific locations relative to the building they are in. Its a bit complicated to explain how to get the coordinates, but if you are familiar with the "loot editor" on the DayZ Editor. You can essentially place potential spawn points anywhere in any building. then with the coordinates generated you can turn it into something like this
<dispatch dechance="1.000000">
<proxy type="CigarettePack_Chernamorka" pos="1.109493 1.609856 -6.003641" rpy="0.000000 -0.000000 -0.000000" dechance="0.15" />
<proxy type="CigarettePack_Merkur" pos="8.640244 0.607653 -2.769645" rpy="0.000000 0.000000 -0.000000" dechance="0.15" />
<proxy type="CigarettePack_Partyzanka" pos="8.708515 1.693489 -6.351742" rpy="0.000000 -0.000000 -0.000000" dechance="0.15" />
<proxy type="CigarettePack_Merkur" pos="8.457572 1.628596 6.129225" rpy="0.000000 0.000000 -0.000000" dechance="0.15" />
<proxy type="CigarettePack_Partyzanka" pos="-6.993959 1.214358 4.343848" rpy="-0.000000 0.000000 -0.000000" dechance="0.15" />
<proxy type="CigarettePack_Chernamorka" pos="-0.848862 0.797701 0.403622" rpy="0.000000 0.000000 -0.000000" dechance="0.15" />
<proxy type="CannabisSeedsPack" pos="1.915974 0.474304 -6.018985" rpy="0.000000 -89.999954 -0.000000" dechance="0.15" />
<proxy type="CannabisSeedsPack" pos="9.755992 1.857545 4.375147" rpy="0.000000 -179.999878 -0.000000" dechance="0.15" />
</dispatch>What this does is it looks at the spawn points and looks at the "dechance" (dynamic event chance) and it will spawn in the items regardless of the types file. This is a great way to control the loot more robustly. as you can see im using it for some specialised items on my server, but it can be literally anything and if you have enough spawn points you can fill the room up (depending on the dechance) or make things rare.
The initial <dispatch dechance="1.000000"> means that something will always spawn, and then itll pick one based on the dechance of the other items, so if you want to add a room full of loot, you can copy and paste this multiple times to have multiple loot spawn points.
Final thoughts
As you build up each area and get all of the loot you want in each specific area you'll begin to see how all of this works together.