Adding Custom Spawns
Looking for DayZ console bot setup guides?
See our feature pages for DayZ auto ban, and DayZ economy bot.
adding custom items (hidden items such as books) and their spawn points
Lets say you want to add a trader to the server, and you want some specific items to spawn in on the server in specific buildings and nowhere else.
I'll choose books in this case, and I want them to spawn in only in churches.
First thing we need to do is define a new usage flag in cfglimitsdefinitions.xml
<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="BooksOrSomethingElse"/> <!-- This is new add this -->
</usageflags>Types.xml
we now need to pick the items that will spawn there, if its a vanilla item its easier, if its a hidden item we need to add the types. Im adding books - so an example type entry would be
<type name="BookThreeMenInABoat">
<nominal>4</nominal>
<lifetime>1800</lifetime>
<restock>600</restock>
<min>2</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="tools"/>
<usage name="BooksOrSomethingElse"/>
</type>I have said here I want a minimum of 2 on the map and i want the server to try spawn a further 2 in. But we dont know where to put it yet. So we need to head to mapgroupproto.xml
mapgroupproto.xml
<group name="Land_Church1_Yellow" lootmax="4">
<usage name="Town" />
<usage name="Village" />
<container name="lootFloor" lootmax="2">
<category name="tools" />
<category name="containers" />
<category name="clothes" />
<tag name="floor" />
<point pos="2.002054 -6.091278 -3.834365" range="1.200000" height="2.000000" />
<point pos="-1.169370 -6.188171 1.904544" range="1.199951" height="1.993324" />
<point pos="-1.149495 -6.091278 -5.062063" range="1.200000" height="2.000000" />
</container>
<container name="lootshelves" lootmax="2">
<category name="tools" />
<category name="containers" />
<category name="clothes" />
<category name="food" />
<category name="books" />
<tag name="shelves" />
<point pos="-2.412278 -5.496460 -2.257169" range="0.100000" height="0.250000" />
<point pos="6.259614 -4.854523 -5.469607" range="0.100000" height="0.250000" />
<point pos="-2.398675 -5.496460 3.063595" range="0.134375" height="0.335938" />
<point pos="-1.512522 -5.496460 -2.306278" range="0.168750" height="0.421875" />
<point pos="-0.714704 -5.496460 3.240467" range="0.168750" height="0.421875" />
<point pos="-0.317947 -5.496460 -2.309299" range="0.168750" height="0.421875" />
<point pos="-0.580908 -4.883392 -6.972151" range="0.168750" height="0.421875" />
<point pos="-1.686934 -5.496429 -0.389934" range="0.168750" height="0.421875" />
<point pos="-0.984521 -5.496429 -0.438461" range="0.168750" height="0.421875" />
<point pos="-0.112725 -5.496429 -0.455061" range="0.168750" height="0.421875" />
<point pos="0.202690 -4.883392 -7.001423" range="0.190674" height="0.476685" />
</container>
</group>This is an example of a church entry. it currently has Town and Village as the usage names. But we want to add a chance for the books to spawn so all we need to add is `<usage name="BooksOrSomethingElse" /> to it.
this will tell the game "hey, this is a church, put the books here" This is a really good way of making hyper specific items spawn in hyper specific locations. where you know for a fact these books as an example will never spawn anywhere else other than churches in this case. But go through the editor. pick a building and play about. I'm sure you'll come up with something better than books in churches!