BetterStash ‐ Burried stashes per event - GarageMan/Setting-up-a-DayZ-server GitHub Wiki

The workshop Better Stash by Pope Leo inspired me to setup an event spawning in one (or multiple) hidden stashes with valuable loot.

On our Alteria server we decided to have one area on which one hidden barrel will spawn in per server cycle. That can be extended to spawn in multiple hidden stashes by extending the number of the

Add the following three (3) lines to your cfgeconomycore.xml - assuming you copy the files betterstash_types.xml, betterstash_spawnabletypes.xml, and betterstash_events.xml into the folder custom_files in your mission folder (e.g. empty.alteria). (Best practice is not to change the vanilla types.xml, cfgspawnabletypes.xml, and events.xml, but to create seperate files for each mod used on your server. The CE will load the files as listed in the cfgeconomycore.xml file.)

		<ce folder="custom_files">
		<file name="BetterStash_types.xml" types="types" />
		<file name="BetterStash_spawnabletypes.xml" type="spawnabletypes" />
		<file name="BetterStash_events.xml" type="events" /> 

Create/copy the following three (3) files to your custom_files folder: betterstash_types.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<types>
	<type name="PlasticBarrel">
		<nominal>5</nominal>
		<min>2</min>
		<lifetime>3600</lifetime>
		<restock>0</restock>
		<quantmin>-1</quantmin>
		<quantmax>-1</quantmax>
		<cost>100</cost>
		<flags count_in_map="1" count_in_hoarder="0" count_in_cargo="0" count_in_player="0" crafted="0" deloot="0" />
		<category name="container" />
		<tag name="floor" />
		<usage name="Farm" />
		<usage name="Industrial" />
	</type>
	<type name="PlasticBarrelStash">
		<nominal>0</nominal>
		<min>0</min>
		<lifetime>21600</lifetime>
		<restock>0</restock>
		<quantmin>-1</quantmin>
		<quantmax>-1</quantmax>
		<cost>100</cost>
		<flags count_in_map="1" count_in_hoarder="0" count_in_cargo="0" count_in_player="0" crafted="0" deloot="0" />
	</type>
</types>

betterstash_spawnamletypes.xml An example of what may be hidden in the stash - the cargo presets are defined in the cfgrandompresets.xml.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<spawnabletypes>
	<type name="PlasticBarrel">
		<cargo preset="bloodsuckerloot" />
		<cargo preset="Zmb_headtorch" />
		<cargo preset="foodHermit" />
		<cargo preset="foodVillage" />
		<cargo preset="foodCity" />
		<cargo preset="foodArmy" />
		<cargo preset="toolsHunter" />
		<cargo preset="toolsIndustrial" />
		<cargo preset="ammoArmy" />
		<cargo preset="mixArmy" />
		<cargo preset="mixHunter" />
		<cargo preset="mixVillage" />
		<cargo preset="optics_cargo" />
		<cargo preset="weapons" />
		<cargo preset="toolsMedic" />
		<cargo preset="toolsMedic" />
		<cargo preset="toolsMedic" />

		<cargo chance="0.50">
			<item name="NBCBootsYellow" />
		</cargo>
		<cargo chance="0.50">
			<item name="NBCGlovesYellow" />
		</cargo>
		<cargo chance="0.50">
			<item name="NBCHoodYellow" />
		</cargo>
		<cargo chance="0.50">
			<item name="NBCJacketYellow" />
		</cargo>
		<cargo chance="0.50">
			<item name="NBCPantsYellow" />
		</cargo>
		<cargo chance="0.50">
			<item name="GasMask_Filter" />
		</cargo>
	</type>
</spawnabletypes>

betterstash_events.xml - this will spawn in exactly one (1) burried barrel. You can modify the nominal to what ever value you intend to use, and set min/max to the same number, both in the event, and the children.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<events>
	<event name="StaticPlasticBarrelStash">
		<nominal>1</nominal>
		<min>1</min>
		<max>1</max>
		<lifetime>21600</lifetime>
		<restock>0</restock>
		<saferadius>0</saferadius>
		<distanceradius>1</distanceradius>
		<cleanupradius>1</cleanupradius>
		<flags deletable="1" init_random="0" remove_damaged="0"/>
		<position>fixed</position>
		<limit>mixed</limit>
		<active>1</active>
		<children>
			<child lootmax="0" lootmin="0" max="1" min="1" type="PlasticBarrelStash"/>
		</children>
	</event>
</events>

Insert the following lines into the cfgeventspawns.xml. The coordinates are in a small area on Alteria. You easily can create your custom spawn points by using the DayZ Editor and exporting the data as "event spawn".

	<event name="StaticPlasticBarrelStash">
		<pos x="3663.69" y="4.70451" z="5981.52" a="0"/>
		<pos x="3651.72" y="4.72274" z="5995.62" a="0"/>
		<pos x="3654.05" y="4.71012" z="6006.49" a="0"/>
		<pos x="3655.16" y="4.70405" z="6032.85" a="0"/>
		<pos x="3681.88" y="4.72643" z="6053" a="0"/>
		<pos x="3684.17" y="4.79038" z="6067.53" a="0"/>
		<pos x="3715.04" y="4.73341" z="6016.37" a="0"/>
		<pos x="3731.7" y="4.71348" z="6017.58" a="0"/>
		<pos x="3757.3" y="4.71993" z="6003.98" a="0"/>
		<pos x="3761.47" y="4.69951" z="6005.16" a="0"/>
		<pos x="3778.09" y="4.70452" z="6043.64" a="0"/>
		<pos x="3796.54" y="4.70369" z="6047.26" a="0"/>
		<pos x="3826.38" y="4.38861" z="6046.46" a="0"/>
		<pos x="3882.88" y="4.78259" z="6010.89" a="76.1014"/>
		<pos x="3804.96" y="4.72661" z="5989.68" a="0"/>
		<pos x="3779.53" y="4.72139" z="5984.81" a="0"/>
		<pos x="3737.25" y="4.70482" z="5976.91" a="0"/>
		<pos x="3730.82" y="4.7047" z="5954.77" a="0"/>
		<pos x="3718.13" y="4.70172" z="5956.24" a="0"/>
		<pos x="3698.46" y="4.71592" z="5948.54" a="0"/>
		<pos x="3690.84" y="4.70518" z="5953.07" a="0"/>
		<pos x="3671.48" y="4.70232" z="5961.19" a="0"/>
		<pos x="3646.34" y="4.72825" z="5975.42" a="0"/>
		<pos x="3626.11" y="4.68964" z="5988.64" a="0"/>
		<pos x="3640.46" y="4.71438" z="6011.48" a="0"/>
		<pos x="3668.86" y="4.70567" z="6033.18" a="0"/>
		<pos x="3708.38" y="4.7058" z="5974.27" a="0"/>
		<pos x="3838.93" y="5.56654" z="5953.52" a="0"/>
		<pos x="3855.72" y="4.84533" z="5981.37" a="0"/>
	</event>
⚠️ **GitHub.com Fallback** ⚠️