DayZ
Alien Invasion
Cole  [developer] 3 Aug, 2022 @ 5:01am
How to use
//
------ EXAMPLES OF CHANGES/ADDITIONS TO GET ALIEN CRASH SITES SPAWNING AND GENERATE HELI LOOT OR CUSTOM ASSIGNED LOOT ------
------ AS WELL AS SET CUSTOM LOOT FOR ALIENS AND CUSTOM SPAWN LOCATIONS FOR ALIENS -----------------------------------------
//



TYPES EXAMPLE:

//Copy/paste these functions to your servers types.xml file located in "mpmissions>mission.map>db>types.xml".
//I added these to the bottom of my types_banov.xml types as I am using Banov. Make sure to stay within the main <types></types> function.


<!-- Alien Invasion Types -->

<type name="geb_Aliencrash">
<nominal>0</nominal>
<lifetime>5</lifetime>
<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>
<type name="geb_GreenAlien">
<nominal>0</nominal>
<lifetime>1800</lifetime>
<restock>0</restock>
<min>1</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>



EVENTS EXAMPLE:

//Copy/paste these functions into your servers events.xml file located in "mpmissions>mission.map>db>events.xml".
//I pasted at the bottom of the file. Make sure you stay within the main <events></events> function.


<!-- Alien Invasion Events -->

<event name="StaticAlienCrash">
<nominal>3</nominal>
<min>0</min>
<max>0</max>
<lifetime>2100</lifetime>
<restock>0</restock>
<saferadius>1000</saferadius>
<distanceradius>1000</distanceradius>
<cleanupradius>1000</cleanupradius>
<secondary>InfectedAlien</secondary>
<flags deletable="1" init_random="0" remove_damaged="0"/>
<position>fixed</position>
<limit>child</limit>
<active>1</active>
<children>
<child lootmax="15" lootmin="10" max="3" min="1" type="geb_Aliencrash"/>
</children>
</event>
<event name="InfectedAlien">
<nominal>50</nominal>
<min>25</min>
<max>250</max>
<lifetime>3</lifetime>
<restock>0</restock>
<saferadius>100</saferadius>
<distanceradius>50</distanceradius>
<cleanupradius>100</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>player</position>
<limit>custom</limit>
<active>1</active>
<children>
<child lootmax="5" lootmin="0" max="0" min="30" type="geb_GreenAlien"/>
</children>
</event>



CFG EVENT SPAWNS EXAMPLE:

//Copy/Paste these functions into your cfgeventspawns.xml file located in "mpmissions>mission.map>db>cfgeventspawns.xml"
//I pasted at the bottom of the file, just above the infected/animal events such as - <event name="AnimalWildBoar" /> - and - <event name="InfectedVillage" />
//This allows you to customize the x & z coordinates at wich a crash will occur.
//Make sure you stay within the main <eventposdef></eventposdef> function.


<!-- Alien Invasion Crash Sites -->

<event name="StaticAlienCrash">
<zone smin="1" smax="3" dmin="3" dmax="5" r="45" />
<pos x="11844.371094" z="6020.828613" a="357.697601" />
<pos x="10772.458984" z="7141.783691" a="236.599503" />
<pos x="6357.467285" z="5393.447754" a="4.996732" />
<pos x="9537.379883" z="6346.113769" a="298.912109" />
<pos x="6507.537598" z="3160.664062" a="241.351349" />
<pos x="9395.842773" z="8118.120605" a="168.518341" />
<pos x="3826.167236" z="725.191772" a="72.453087" />
<pos x="11606.522461" z="4326.942871" a="10.140474" />
<pos x="9916.824219" z="3880.88208" a="32.136044" />
<pos x="9935.674805" z="5458.304199" a="329.921448" />
<pos x="11722.352539" z="7612.571777" a="163.276627" />
<pos x="7122.116699" z="5103.704101" a="292.347717" />
<pos x="8957.305664" z="5408.166504" a="305.672455" />
<pos x="1902.029053" z="2396.375976" a="305.231537" />
<pos x="5421.377442" z="1441.891357" a="153.467041" />
<pos x="7781.773926" z="997.603821" a="236.305603" />
<pos x="10454.764648" z="4566.578125" a="71.130417" />
<pos x="10513.841797" z="7460.008789" a="14.157501" />
<pos x="11075.945312" z="2103.969238" a="7.593108" />
<pos x="12284.845703" z="6532.125488" a="168.800293" />
<pos x="10770.838867" z="5033.983398" a="14.402428" />
<pos x="9799.932617" z="5986.262207" a="296.511719" />
<pos x="9493.401367" z="6859.635254" a="332.174927" />
<pos x="11390.188477" z="5130.928223" a="171.016739" />
<pos x="10392.649414" z="6202.329102" a="226.997894" />
<pos x="11457.69043" z="6532.165527" a="300.234802" />
<pos x="11288.463867" z="3901.264893" a="341.482605" />
<pos x="10066.341797" z="7019.535645" a="60.353058" />
<pos x="11164.566406" z="6245.58252" a="25.130795" />
<pos x="12028.506836" z="5253.910644" a="276.524628" />
<pos x="9593.34375" z="8950.186523" a="169.633057" />
<pos x="12300.630859" z="4292.416504" a="107.773361" />
<pos x="12352.316406" z="3855.271484" a="247.376831" />
<pos x="9671.808594" z="1155.7594" a="65.545807" />
<pos x="11581.37793" z="3195.328857" a="299.695923" />
<pos x="11776.484375" z="930.251892" a="70.248642" />
<pos x="9270.135742" z="7127.370117" a="45.754696" />
<pos x="3976.023682" z="6856.164063" a="117.374977" />
<pos x="2639.861328" z="6405.301758" a="189.473114" />
<pos x="6727.75" z="6937.537109" a="1.371592" />
<pos x="6486.924316" z="7557.751953" a="270.646088" />
<pos x="2441.762207" z="4908.613281" a="195.498657" />
<pos x="6836.494629" z="8600.134766" a="190.550873" />
<pos x="4286.803223" z="6212.870117" a="132.904129" />
<pos x="5397.504883" z="6689.651367" a="176.442398" />
<pos x="740.898437" z="5043.588867" a="70.0037" />
<pos x="7265.016113" z="7720.161133" a="68.681" />
<pos x="6995.759766" z="6220.584473" a="4.310974" />
<pos x="7938.515137" z="6592.683594" a="4.849762" />
<pos x="8678.618164" z="6389.382813" a="26.257509" />
<pos x="4607.828125" z="6965.80957" a="200.789352" />
<pos x="7298.620117" z="8475.169922" a="300.332794" />
<pos x="2734.593262" z="5628.562988" a="210.831863" />
<pos x="7512.816406" z="7044.394531" a="42.374527" />
<pos x="5499.094238" z="7905.272461" a="310.571228" />
<pos x="6220.04834" z="6929.438477" a="297.638458" />
<pos x="7796.510742" z="7870.70459" a="112.280243" />
<pos x="7900.789551" z="8257.776367" a="171.445618" />
<pos x="8546.589844" z="8372.402344" a="250.377197" />
<pos x="7776.442383" z="8989.429688" a="69.693436" />
<pos x="8356.177734" z="9151.981445" a="134.569748" />
<pos x="9198.206055" z="6041.199219" a="285.832367" />
<pos x="8241.619141" z="6025.999512" a="141.819946" />
<pos x="8490.319336" z="2832.061035" a="27.825129" />
<pos x="7188.131348" z="3713.572266" a="338.102417" />
<pos x="6369.329102" z="6150.516602" a="162.933716" />
<pos x="4725.089844" z="3215.219727" a="331.929962" />
<pos x="7088.905273" z="5616.130371" a="357.942535" />
<pos x="6868.194824" z="4171.091797" a="174.874771" />
<pos x="761.743042" z="3605.641846" a="82.054726" />
<pos x="3503.032715" z="4181.35791" a="126.241791" />
<pos x="4873.035156" z="5679.072754" a="142.983643" />
<pos x="6783.110352" z="4831.280762" a="127.368523" />
<pos x="5689.485352" z="5770.709473" a="316.449738" />
<pos x="8360.750976" z="5494.712402" a="17.831593" />
<pos x="5924.764648" z="5012.937988" a="24.787872" />
<pos x="8371.013672" z="7563.428223" a="62.508549" />
<pos x="5521.995605" z="4904.76416" a="46.440514" />
<pos x="5911.780762" z="3579.843506" a="274.124268" />
</event>
<event name="InfectedAlien" />



MAP GROUP PROTO EXAMPLE:

//Copy/paste this into you mapgroupproto.xml file located in "mpmissions>mission.map>mapgroupproto.xml"
//This allows the "geb_Aliencrash" to have loot spawn points. In this example I copy pasted the "Wreck_Mi8_Crashed" group proto and replaced the group name - <group name="geb_Aliencrash" lootmax="15">
//You may use either of the Heli crash groups or the special event groups such as "Wreck_SantasSleigh" OR if you are a big brain you can create your own loot spawn points.
//Notice I have a custom usage flag - <usage name="UFO" /> - this allows you to set custom loot to the crash site. Shown/explained in following two examples.
//If you want the crash site to spawn standard Heli crash loot, use usage - <usage name="Military" />
//Make sure to stay witihin the main <prototype></prototype> function.


<!--Alien Crash Loot Spawn Points -->

<group name="geb_Aliencrash" lootmax="15">
<usage name="UFO" />
<container name="lootFloor" lootmax="15">
<category name="tools" />
<category name="containers" />
<category name="clothes" />
<category name="weapons" />
<tag name="floor" />
<tag name="shelves" />
<point pos="-2.693787 -1.888990 1.671386" range="0.703328" height="2.000000" flags="32" />
<point pos="-1.758788 -1.888990 -2.302246" range="0.597443" height="1.493607" flags="32" />
<point pos="-5.150909 -1.888990 -4.171387" range="1.199951" height="2.000000" flags="32" />
<point pos="-9.951996 -1.888990 -2.661621" range="0.932135" height="2.000000" flags="32" />
<point pos="-9.645112 -1.888990 1.531249" range="1.199951" height="2.000000" flags="32" />
<point pos="-7.113404 -1.888990 1.797849" range="1.199951" height="2.000000" flags="32" />
<point pos="-4.582459 -1.888990 1.906738" range="1.199951" height="2.000000" flags="32" />
<point pos="-1.599335 -1.888990 -0.949219" range="0.764948" height="1.163458" flags="32" />
<point pos="-3.084625 -1.796867 -1.247071" range="0.393962" height="0.169039" />
<point pos="-4.700715 -1.854195 -1.203125" range="0.334039" height="0.211958" />
<point pos="-7.857819 -1.816639 -0.384278" range="0.407959" height="1.019897" />
<point pos="-6.361786 -1.474339 -0.424318" range="0.203125" height="0.507813" />
<point pos="-5.188050 -1.487791 -0.553956" range="0.168750" height="0.421875" />
<point pos="-3.660218 -1.511133 -0.747803" range="0.134375" height="0.335938" />
<point pos="-3.550293 -1.555975 -2.536621" range="0.203125" height="0.507813" />
<point pos="-6.174928 -1.774635 -1.928222" range="0.216064" height="0.540161" />
<point pos="-6.652740 -1.799643 -1.263429" range="0.603010" height="0.139997" />
<point pos="-5.446472 -1.813892 -1.698241" range="0.548840" height="1.410522" />
<point pos="-2.769746 -1.517029 -2.799561" range="0.203125" height="0.507813" />
<point pos="-3.818542 -1.811153 -1.685303" range="0.460957" height="1.302490" />
</container>
</group>



CFG LIMITS DEFINITION EXAMPLE:

//Below is an example of my usage flags function in cfglimitsdefinition.xml file located in "mpmissions>mission.map>cfglimitsdefinition.xml".
//At the bottom of the list you will see I created a custom usgae flag name <usage name="UFO" />
//You may choose whatever name suits you if you choose to create one. Alternate example - <usage name="Alien"/>
//Whatever you name it, it has to be the same usage name in your "geb_Aliencrash" mapgrouproto function shown in the example above.
//Creat a custom usage flag in the <usageflags> function and associate it into your "geb_Aliencrash" mapgrouproto function,
//OR copy/paste the usage flag I've used below if you're using the "geb_Aliencrash" mapgroupproto function above that I made.


<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="Lunapark"/>
<usage name="SeasonalEvent"/>
<usage name="ContaminatedArea"/>
<usage name="UFO"/>
</usageflags>



SLECTING CUSTOM LOOT FOR ALIEN CRASH SITES EXAMPLE:

Part 1)
//This is an example of choosing the loot you want to spawn at the crash sites. I will represent this using the FAL types function.
//Below you will see first a vanilla FAL types function. Notice the usage flag <usage name="Military"/>. This calls for the item to spawn at Heli crash sites.
//Notice also the "deloot" value in the <flags /> function. <flags ... ... ... ... ... deloot="1"/>
//A "deloot" value of "1" calls for the item to spawn at event spawns as well as it's normal spawns. A "deloot" value of "0" nullifies the items event spawns.
//With "deloot" value set to "1" the item will be called to spawn at an event that shares the same associated usage flag. Here the usage flag <usage name="Military"/> is shared with Heli crash sites.


<type name="FAL">
<nominal>5</nominal>
<lifetime>28800</lifetime>
<restock>0</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="1" crafted="0" deloot="1"/>
<category name="weapons"/>
<usage name="Military"/>
</type>


Part 2)
//In the following FAL types I have replaced the usage flag to the newly created <usage name="UFO"/>.
//Because it now shares that usage flag with the "geb_Aliencrash" mapgroupproto.xml funcion usage flag, and has a "deloot" value of "1", the item will spawn at the Alien Invasion crash sites instead of the Heli crash sites.

<type name="FAL">
<nominal>5</nominal>
<lifetime>28800</lifetime>
<restock>0</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="1" crafted="0" deloot="1"/>
<category name="weapons"/>
<usage name="UFO"/>
</type>


Part 3)
//In the following FAL types I have used both the orginal and new usage flags with a "deloot" value of "1" to call the item to spawn at both Heli crash and Alien Invasion crash sites.

<type name="FAL">
<nominal>5</nominal>
<lifetime>28800</lifetime>
<restock>0</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="1" crafted="0" deloot="1"/>
<category name="weapons"/>
<usage name="Military"/>
<usage name="UFO"/>
</type>



SETTING CUSTOM LOOT FOR ALIENS:


Part 1)
//Below is an example of a cfgspawnabletypes.xml function used to call items to spawn in Alien inventory as well as any attachments.
//Copy/paste this into you cfgspwnabletypes.xml file locate in "mpmissions>mission.map>cfgspwnabletypes.xml".
//Make sure to stay within the main <spawnabletypes></spawnabletypes> function.
//To find what items the cargo and attachments presets in this example contain, look in cfgrandompresets.xml found in "mpmissions>mission.map>cfgrandompresets.xml".
//The function below can be customised to spawn whatever loot you want. Reflected in the following example parts.


<!-- Aliens Loot -->

<type name="geb_GreenAlien">
<cargo preset="toolsPolice" />
<cargo preset="ammoPolice" />
<cargo chance="0.1">
<item name="Mag_Scout_5Rnd" chance="1.0" />
</cargo>
<attachments preset="hatsPolice" />
<attachments preset="vestsPolice" />
</type>


Part 2)
//Below is an example of my custom cfgspawnabletypes.xml function.
//Notice I have a custom cargo preset <cargo preset="mixAlien" /> I will show how to create your own custom cargo preset in the next main example.
//Notice I have altered the attachments so the Aliens have a 10% chance to be wearing a courier bag. LMAO You may replace that item with any other bag, hat, or vest.
//You may also use attachments presets as shown in the example above.


<!-- Aliens Loot -->

<type name="geb_GreenAlien">
<cargo preset="mixAlien" />
<attachments chance="0.10">
<item name="CourierBag" chance="1.00" />
</attachments>
</type>


Part 3)
//Below I show a custom cfgspawnabletypes.xml function that calls for a random of three attachments.
//We see a 10% chance of an attachment spawning on an Alien, and each attachment having it's own percent chance.
//If the chance hits and the Alien is going to have an attachment, there is a 50% chance it will be a "CourierBag", 20% chance it will be a "HuntingVest", and a 10% chance it will be a "OfficerHat".


<!-- Aliens Loot -->

<type name="geb_GreenAlien">
<cargo preset="mixAlien" />
<attachments chance="0.10">
<item name="CourierBag" chance="0.50" />
<item name="HuntingVest" chance="0.20" />
<item name="OfficerHat" chance="0.10" />
</attachments>
</type>



CREATING A CUSTOM CARGO PRESET:


Part 1)
//Below I first show an example of two vanilla cargo presets.
//Chance="0.05" or chance="0.2" ect. represents the items percent chance to spawn when the preset is called upon.
//So, <item name="Ammo_45ACP" chance="0.2" /> represents that .45ACP ammo has a 20% chance to spawn when the preset is called upon.


<cargo chance="0.25" name="ammoArmy">
<item name="Ammo_45ACP" chance="0.2" />
<item name="AmmoBox_45ACP_25Rnd" chance="0.05" />
<item name="Ammo_762x39" chance="0.2" />
<item name="AmmoBox_762x39_20Rnd" chance="0.05" />
<item name="Ammo_762x54" chance="0.2" />
<item name="AmmoBox_762x54_20Rnd" chance="0.05" />
</cargo>
<cargo chance="0.1" name="mixArmy">
<item name="SodaCan_Cola" chance="0.05" />
<item name="SodaCan_Pipsi" chance="0.05" />
<item name="SodaCan_Spite" chance="0.05" />
<item name="TunaCan" chance="0.1" />
<item name="SardinesCan" chance="0.05" />
<item name="PeachesCan" chance="0.05" />
<item name="SpaghettiCan" chance="0.05" />
<item name="BakedBeansCan" chance="0.05" />
<item name="TacticalBaconCan" chance="0.1" />
<item name="Canteen" chance="0.1" />
<item name="Ammo_45ACP" chance="0.2" />
<item name="AmmoBox_45ACP_25Rnd" chance="0.05" />
<item name="Ammo_762x39" chance="0.2" />
<item name="AmmoBox_762x39_20Rnd" chance="0.05" />
<item name="Ammo_762x54" chance="0.2" />
<item name="AmmoBox_762x54_20Rnd" chance="0.05" />
</cargo>


Part 2)
//Below I show my custom mix cargo preset following example of the function structure above. You may name this cargo preset whatever you wish.
//You may notice some "indiffernet" items in the list. This is because I am using Banov and some of it's custom items. You may use whatever other items found within cargo presets that you wish.
//Copy/paste this into your cfgrandompresets.xml found in "mpmissions>mission.map>cfgrandompresets.xml"
//Or create your own custom cargo preset. Just rememebr to include the name into your "geb_GreenAlien" cfgspwnabletypes function within your cfgspawnabletypes.xml file.



<!-- Alien Cargo Preset -->

<cargo chance="0.10" name="mixAlien">
<item name="Thermometer" chance="0.05" />
<item name="SalineBag" chance="0.05" />
<item name="BandageDressing" chance="0.10" />
<item name="BloodBagEmpty" chance="0.05" />
<item name="BloodTestKit" chance="0.05" />
<item name="StartKitIV" chance="0.05" />
<item name="Blue_Key" chance="0.05" />
<item name="Red_Key" chance="0.05" />
<item name="Yellow_Key" chance="0.05" />
</cargo>



SETTING CUSTOM SPAWN LOCATIONS FOR ALIENS OUTSIDE OF THE CRAHS SITES:


//Below is an example of a territory function for Aliens. This calls for the Aliens to spawn at the specified coordinates in the function.
//Copy/paste this or create a new territory function into your zombie_territories.xml found in "mpmissions>mission.map>db>zombie_territories.xml".
//Make sure to stay within the main <territory-type></territory-type> function.
//The territory color # does not matter. In this example I have used the territory function of "InfectedCity" from Banov, replacing "InfectedCity" with "InfectedAlien".
//The coordinates can be customized to your liking so you can have the aliens wherever you want. I am not using these coordinates. They're just an example.
//I am uncertain if you can use 'Y' coordinates. None of the territores in Banov use 'Y' coordinates.


<!-- Alien Spawn Locations -->

<territory color="4289244426">
<zone name="InfectedAlien" smin="0" smax="0" dmin="2" dmax="4" x="7135.71" z="1461.43" r="50"/>
<zone name="InfectedAlien" smin="0" smax="0" dmin="3" dmax="4" x="6717.86" z="13792.5" r="80"/>
</territory>




Credits to Woods#7244 thank you so much for creating the xmls!
Last edited by Cole; 25 Oct, 2022 @ 11:34pm
< >
Showing 1-9 of 9 comments
xenymbus 3 Aug, 2022 @ 5:32am 
thanks for your quick support, Cole. have fun continuing to develop mods!
xenymbus 3 Aug, 2022 @ 6:57am 
unfortunately I can't get my GTX server "online" by hook or by crook and with all possible variations. but I'm sure the fault is mine.

I'll just wait for later versions and I'm very happy that there are dev's who are so innovative besides the known 50 weapon mods. deep respect, Cole!
jonesdavid0912 15 Oct, 2022 @ 7:51am 
can u they be made harder to kill ?
Cole  [developer] 24 Oct, 2022 @ 9:04pm 
Aliens now made harder to kill. Updated instructions for install. Verified working 1.19
SpamQue 26 Oct, 2022 @ 7:06pm 
SLECTING CUSTOM LOOT FOR ALIEN CRASH SITES EXAMPLE:
can you please explain where you go to edit this information?
Cole  [developer] 27 Oct, 2022 @ 6:28am 
Check out the AlienCargo section above
Tony 2 Nov, 2022 @ 12:27pm 
what map are them coordinates for as im looking for some for namalsk
kavling 25 Dec, 2023 @ 7:28am 
As Tony wrote, it would be good if you knew which map all coordinates go to.
Are Alien Invasion Crash Sites for Cherno or some other map?
And if so, does anyone have coordinates to Banov and as Tony said Namlask?

Thanks for a wonderful mod by the way!
BloodRaiNxp 13 Dec, 2024 @ 4:16am 
He literally says at the top of this post what map this example is for (//I added these to the bottom of my types_banov.xml types as I am using Banov.)
< >
Showing 1-9 of 9 comments
Per page: 1530 50