Dynamic events - GarageMan/Setting-up-a-DayZ-server GitHub Wiki
### Diagram: Vehicles spawn
Diagram: Dynamic heli crashes
Source: DonSibiley’s PasteBin
event.xml (the What)
<event name="StaticFireplace">
<nominal>10</nominal>
<min>6</min>
<max>10</max>
<lifetime>2500</lifetime>
<restock>0</restock>
<saferadius>100</saferadius>
<distanceradius>100</distanceradius>
<cleanupradius>100</cleanupradius>
<flags deletable="1" init_random="0" remove_damaged="0"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="5" lootmin="5" max="10" min="6" type="Fireplace"/>
</children>
</event>
cfgeventspawns.xml (the Where)
<event name="StaticFireplace">
<pos x="2368.36" z="2624" a="0" />
<pos x="1443.13" z="2555.15" a="0" />
<pos x="886.108" z="2772.49" a="0" />
<pos x="4250.75" z="7515.21" a="0" />
...
cfgspawnabletypes.xml (the loot to spawn in at these specific event places)
<type name="Fireplace">
<cargo chance="1.00">
<item name="PetrolLighter" chance="1.00" /> <!-- A lighter to ignite the fire ;-) -->
</cargo>
...
<attachments chance="1.00">
<item name="Firewood" />
</attachments>
<attachments chance="1.00">
<item name="Firewood" />
</attachments>
<attachments chance="1.00">
<item name="Firewood" />
</attachments>
<attachments chance="1.00">
<item name="Firewood" />
</attachments>
<attachments chance="1.00">
<item name="Firewood" />
</attachments>
<attachments chance="1.00">
<item name="Firewood" />
</attachments>
<attachments chance="1.00">
<item name="Tripod" />
</attachments>
<attachments chance="1.00">
<item name="Pot" /> <!-- Unfortunately, pots are allways empty :-( -->
</attachments>
<attachments chance="1.00">
<item name="Rag" />
</attachments>
</type>
mapgroupproto.xml with five loot spawn positionen for each of the camp fires:
<group name="Fireplace" lootmax="5">
<usage name="Village" />
<usage name="Farm" />
<container name="lootFloor">
<category name="food"/>
<point pos="-1.876667 -1.211807 1.021349" range="0.483887" height="1.209718" flags="32" />
<point pos="0.396737 -1.174454 -0.807087" range="0.564209" height="1.410522" flags="32" />
<point pos="1.760472 -1.067368 0.874323" range="0.665283" height="1.626160" flags="32" />
<point pos="1.757211 -1.085785 -0.656583" range="0.712402" height="1.781005" flags="32" />
<point pos="0.068999 -1.178558 0.701673" range="0.838379" height="2.037003" flags="32" />
</container>
</group>
Another great idea by DonSibley. PasteBin, source files
Although ready-to-go workshops (like Airstrike) exist, it is much more fun to create such events on your own.
You have to create two file extensions, the What and the "Where":
Use <restock>10</restock>
and play with the number, try 11, 12, etc. with five coordinates for each bombstrike location, so that five bombs will explode at different times closely together.
<event name="StaticAirStrike_No_1">
<nominal>3</nominal>
<min>3</min>
<max>4</max>
<lifetime>5</lifetime>
<restock>10</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="4" min="3" type="ExplosionTest"/>
</children>
</event>
...
... plus three more events of the same kind (No_2 to No_4)
Add four coordinates for each air strike in one city (here: lumber mill, Chernarus). Four groups of coordinates, so four different restock times.
...
<event name="StaticAirStrike_No1">
<pos x="12953.735352" z="10191.112305" a="0.0" />
<pos x="12864.111328" z="10008.990234" a="0.0" />
<pos x="12829.454102" z="10148.540039" a="0.0" />
<pos x="12976.588867" z="10060.056641" a="0.0" />
</event>
<event name="StaticAirStrike_No2">
<pos x="13053.509766" z="10187.283203" a="0.0" />
<pos x="12746.974609" z="10109.939453" a="0.0" />
<pos x="12880.847656" z="9980.504883" a="0.0" />
<pos x="12824.101563" z="10197.749023" a="0.0" />
</event>
<event name="StaticAirStrike_No3">
<pos x="12860.897461" z="10120.537109" a="0.0" />
<pos x="12850.071289" z="10081.449219" a="0.0" />
<pos x="12807.242188" z="10100.523438" a="0.0" />
<pos x="12780.526367" z="10138.191406" a="0.0" />
</event>
<event name="StaticAirStrike_No4">
<pos x="12911.041016" z="10168.166992" a="0.0" />
<pos x="12786.923828" z="10071.817383" a="0.0" />
<pos x="12824.938477" z="9979.027344" a="0.0" />
<pos x="12890.789063" z="10257.854492" a="0.0" />
</event>
...
Refer to: https://community.bistudio.com/wiki/DayZ:Contaminated_Areas_Configuration
The dynamic events for the contaminated areas are defined in the types.xml:
<type name="ContaminatedArea_Dynamic">
<nominal>0</nominal>
<lifetime>900</lifetime> <!-- the default value for Chernarus is 1800 sec = 60 min -->
<restock>0</restock>
<min>0</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"/>
</type>
The event is defined in the file events.xml:
<event name=“StaticContaminatedArea“>
...
<child lootmax=“0“ lootmin=“0“ max=“4“ min=“2“ type=“ContaminatedArea_Dynamic“/>
The positions of the dynamic events are definied in the file cfgeventspawns.xml:
...
<event name=“StaticContaminatedArea“>
...