Jump to content

A3E Animated Crash Spawner


Grahame

Recommended Posts

I  always liked the animated helicopter crash spawner in ARMA2/DayZ/Epoch and, with permission, I have ported the latest 1.0.6.2 version provided by @JasonTM to ARMA3/Epoch. It's nice as an enhancement to the existing static ARMA3/Epoch DayZ-Style Helo Crash Sites script or as a replacement. It is great to see a helo flying around for a while and then crash, spilling loot around the burning wreck :biggrin:

Note that the version provided requires that you have CUP Terrains Core and CUP Vehicles installed on your server (so you'd be good to go after changing the loot @natoed and @Drokz :wink:).

It's not that difficult to mod the loot and helos/planes used by the script for vanilla ARMA3 weapons and equipment (that I hate) so I leave that at an exercise for the reader.

Also note that the helo does not crash at the centre of the marker that appears... it is within that area only!

Credits

Installation

Download AnimatedCrashSpawner.sqf from https://github.com/morgoth0/Animated-Crash-Spawner and put it in the EpochEvents folder of your epoch_server_settings PBO.

Feel free to play with the configuration settings at the top of the file:

Spoiler

crashsite_loot = ["CUP_srifle_M110","CUP_srifle_VSSVintorez","CUP_srifle_ksvk","CUP_srifle_AS50","CUP_srifle_M40A3","CUP_srifle_M107_Base","CUP_srifle_M14","hlc_lmg_M249para","CUP_arifle_M16A4_Base","hlc_rifle_akm","hlc_rifle_m4a1carryhandle","hlc_rifle_awcovert_FDE","CUP_arifle_L85A2","hlc_rifle_ak74_MTK","optic_Nightstalker","optic_LRPS","optic_DMS","optic_Aco_smg","optic_ACO_grn_smg","optic_Holosight_smg","optic_Aco","optic_Holosight","acc_pointer_IR","Rangefinder","EnergyPack","ItemGeigerCounter_EPOCH","ItemDefibrillator","ToolKit","FAK","morphine_epoch","ItemLockbox","EpochRadio0","nanite_gun_epoch","RyanZombiesAntiVirusCure_Item","ItemRotor","CUP_hgun_BallisticShield_Armed","SmokeShellToxic","ClaymoreDirectionalMine_Remote_Mag","ItemCanteen_Clean","optic_Nightstalker","Towelette"];

// Configs - You can adjust these
#define DEBUG_MODE 		false  	// Adds diagnostic entries to the server rpt
#define CRASH_TIMEOUT 	1200	// The amount of time it takes for the mission to time out if no players show up
#define SPAWN_CHANCE 	100	 	// Percent chance of spawning a crash number between 0 - 100 
#define GUARANTEED_LOOT	16	 	// Guaranteed Loot Spawns
#define RANDOM_LOOT		8		// Random number of loot piles as well as the guaranteed ones
#define SPAWN_FIRE 		true 	// Spawn Smoke/Fire at the helicrash
//#define FADE_FIRE 		false	// Fade the Smoke/Fire overtime
#define PREWAYPOINTS 	2		// Amount of way points the heli flies to before crashing
#define MIN_LOOT_RADIUS 4	 	// Minimum distance for loot to spawn from the crash site in meters
#define MAX_LOOT_RADIUS 10	 	// Maximum distance for loot to spawn from the crash site in meters
#define MARKER_RADIUS 	400	 	// Radius for the marker
#define SHOW_MARKER		true	// Show a marker on the map
#define MARKER_NAME 	true	// Add the crash name to the marker, SHOW_MARKER must be true
#define LOWER_GRASS		true	// lowers the grass around the loot
_crashDamage			= 1;	// Amount of damage the heli can take before crashing (between 0.1 and 1) Lower the number and the heli can take less damage before crashing 1 damage is fully destroyed and 0.1 something like a DMR could one shot the heli
_exploRange				= 200;	// How far away from the predefined crash point should the heli start crashing

//Parameters for finding a suitable position to spawn the crash site
#define SEARCH_CENTER epoch_centerMarkerPosition
#define SEARCH_RADIUS EPOCH_dynamicVehicleArea
#define SEARCH_DIST_MIN 20
#define SEARCH_SLOPE_MAX 2

// Initialize mission variables - DO NOT CHANGE THESE
_ran15		= 0;
_isClose1	= false;
_isClose2	= false;
_isClose3	= false;
_inFlight 	= true;
_missionEnd	= false;
_lootArray	= [];

// Do not change below values if you do not know what you are doing
_crashSelect = selectRandom [["CUP_B_UH1Y_UNA_USMC","CUP_B_UH1Y_Wreck",false],["CUP_B_MV22_VIV_USMC","CUP_MV22Wreck",false],["CUP_O_Mi8_VIV_RU","Mi8Wreck",false],["CUP_B_UH60M_Unarmed_FFV_US","BlackhawkWreck",false],["CUP_B_UH60M_Unarmed_FFV_MEV_US","BlackhawkWreck",false],["CUP_B_A10_CAS_USA","CUP_A10Wreck",true],["CUP_O_Ka52_Blk_RU","CUP_Ka52Wreck",false],["CUP_O_Mi24_P_Dynamic_RU","CUP_Mi24Wreck",false],["CUP_B_AH1Z_Dynamic_USMC","CUP_AH1ZWreck",false],["CUP_B_AV8B_DYN_USMC","CUP_AV8BWreck",true],["CUP_B_Su25_Dyn_CDF","CUP_SU25Wreck",true],["CUP_O_AN2_TK","CUP_AN2Wreck",true]]

 

RePBO epoch_server_settings and upload to your server. Then add the following line to the events[] array in @EpochHive/epoch_config.hpp changing the first number to match how often you want the script to run:

    { 2700, "AnimatedCrashSpawner", 0 , 1, -1, {} ,{"VR"}},

And enjoy!

Issues/To Dos

  • For the life of me I cannot get client side messages about the incoming helos working right now for this script. Tried using the same mechanism as I used in the DZMS system and then the function used in the Message Epoch event but both just made the script silently fail... Will fix asap, but the script works fine without them and the marker is placed when the helo crashes.
  • Better loot table handling - probably using additions to the CfgLootTable
Link to comment
Share on other sites

No problem... and when I release LootSpawnerZ you'll have infected at the crash site too :blink: @natoedObviously you will get a look at that before I make it public. Just dealing with the deletion of corpses and working on a LOS mechanism so Zs don't spawn in eyesight of a player and then it should be good to go (and spawns infected at all buildings covered by the enhanced Haljv's LootSpawner with CfgLootPositions.hpp)

Link to comment
Share on other sites

  • 6 months later...
On 3/2/2018 at 5:36 PM, Grahame said:

No problem... and when I release LootSpawnerZ you'll have infected at the crash site too :blink: @natoedObviously you will get a look at that before I make it public. Just dealing with the deletion of corpses and working on a LOS mechanism so Zs don't spawn in eyesight of a player and then it should be good to go (and spawns infected at all buildings covered by the enhanced Haljv's LootSpawner with CfgLootPositions.hpp)

Any update on this? I'm having nothing but issues.

12:38:56 SteamAPI initialization failed. Steam features won't be accessible!

12:38:57 Cannot register unknown string STR_3DEN_CAMERA_NAME

12:38:57 Cannot register unknown string STR_DIFF_SCENE_ONLY

12:38:57 Cannot register unknown string STR_DIFF_SCENE_AND_MAP

12:38:57 Initializing stats manager.

12:38:57 Stats config disabled.

12:38:57 sessionID: 270a0e41829fad9d322cbc47843dd73801f2cdee

12:39:00 Unsupported language English in stringtable

12:39:00 Item str_a3_to_c01_m02_036_ta_mechanized_briefing_SOLDIERC_0 listed twice

12:39:01 ErrorMessage: File @epochhive\epochconfig.hpp, line 23: Config: '�' encountered instead of ','

There are no text errors for the epochConfig.hpp so I commented out the new line:

//{ 2700, "AnimatedCrashSpawner", 0 , 1, -1, {} ,{"VR"}},

 

Restarted the server to see what the underlining issue was and started getting these errors from the rpt file:

12:22:47 SteamAPI initialization failed. Steam features won't be accessible!

12:22:47 Cannot register unknown string STR_3DEN_CAMERA_NAME

12:22:47 Cannot register unknown string STR_DIFF_SCENE_ONLY

12:22:47 Cannot register unknown string STR_DIFF_SCENE_AND_MAP

12:22:47 Initializing stats manager.

12:22:47 Stats config disabled.

12:22:47 sessionID: 458af35cb2b498fefe4e8c2390c29a6151634d81

12:22:57 Item STR_CUP_dss_Soviet_Era_Tanker_Helmet listed twice

12:22:57 Unsupported language English in stringtable

12:22:57 Unsupported language English in stringtable

12:22:57 Item str_a3_to_c01_m02_036_ta_mechanized_briefing_SOLDIERC_0 listed twice

12:22:59 Warning Message: Addon 'CUP_AirVehicles_AH6' requires addon 'CUP_Weapons_DynamicLoadout'
Cups Core and Cups Vehicles have been installed.

 

 

 

Link to comment
Share on other sites

(1) I suspect that there was a non printing character in the epoch_config.hpp... This seems to be happening a lot more nowadays. I had the same issue myself the other day after copying and pasting from one notepad++ window to another. That's why you get this:

Config: '�' encountered

(2) You need CUP Weapons and Units to use CUP Vehicles. 

Basically you can have the following possibilities for these mods:

CUP Weapons alone,

CUP Weapons + CUP Units, or

CUP Weapons + CUP Units + CUP Vehicles

Link to comment
Share on other sites

4 hours ago, Grahame said:

(1) I suspect that there was a non printing character in the epoch_config.hpp... This seems to be happening a lot more nowadays. I had the same issue myself the other day after copying and pasting from one notepad++ window to another. That's why you get this:


Config: '�' encountered

(2) You need CUP Weapons and Units to use CUP Vehicles. 

Basically you can have the following possibilities for these mods:

CUP Weapons alone,

CUP Weapons + CUP Units, or

CUP Weapons + CUP Units + CUP Vehicles

Manually typed in the line and the server started immediately.

Question: do any of the "@Cups_" folders have to be added to the command line?

Ex: -servermod="@EpochHive;@Ryanzombies" -mod="@Epoch;@Ryanzombies"

 

Thanks.

Link to comment
Share on other sites

Had to install: Cups Terrain Core, Cups Units, Cups Vehicles, Cup Weapons and CBA_A3.

Added to the command line:

-servermod="@EpochHive;@Ryanzombies;@CUP_Terrains_Core;@CUP_Units;@CUP_Vehicles;@CUP_Weapons;@CBA_A3" -mod="@Epoch;@Ryanzombies;@CUP_Terrains_Core;@CUP_Units;@CUP_Vehicles;@CUP_Weapons;@CBA_A3"

And server started with no errors.

Per a previous link https://github.com/morgoth0/Animated-Crash-Spawner, only Cups Terrain Core and Cups Vehicles were needed. Really need a new install readme.

Still downloading all the client side Cups. I'll edit this post if all goes well.

Thanks.

 

Update: Enter BattlEye Script Restiction kicks.....LOL! Never a dull moment...to be continued.....

Link to comment
Share on other sites

After a sea of BE filters I finally no longer get kicked when the crashes are spawned. 
However, they do not show up on the map, I haven't found one yet and I get an error a few lines after the event.

 

20:45:16 "DEBUG: server event PlantSpawner"

20:50:16 "DEBUG: server event AnimatedCrashSpawner"

20:50:16 "DEBUG: server event ChangeWeather"

20:50:16 "DEBUG: server event MoneyDrop"

20:50:16 "DEBUG: server event PlantSpawner"

20:50:16 "DEBUG: server event \epoch_server_vip_event\EpochEvents\event1.sqf"

20:50:16 Cannot create non-ai vehicle CUP_B_Su25_Dyn_CDF,
Different vehicle for each instance
21:32:09 "DEBUG: server event AnimatedCrashSpawner"

21:32:09 "DEBUG: server event ChangeWeather"

21:32:09 "DEBUG: server event MoneyDrop"

21:32:09 "DEBUG: server event \epoch_server_vip_event\EpochEvents\event1.sqf"

21:32:09 Cannot create non-ai vehicle CUP_B_UH60M_Unarmed_FFV_MEV_US,
 But still no crash sites and definitely no markers to help you locate them.
 

 

 

Link to comment
Share on other sites

  • 1 year later...

Have anyone gotten this to work on Chernarus Redux? i have crash sites outside and inside the the map (FAR outside the map) I feel like its dependent on some epoch code / config not being correct for Chernarus Redux but idk.

I have tried messing around with the code for a few hours now with not luck of getting the crashes closer.

If it helps then pretty much all the EpochEvents spawn way outside and inside the map as if it were Altis or something lol

https://imgur.com/a/YGataga

 

Edit: Figured it out i guess, in @epochhive\addons\epoch_server_settings\config.cpp set worldsize to 12000 atleast i did dontknow if thats anywhere to correct but works it seems.

and in @epochhive\addons\epoch_server_settings\configs\maps\chernarusredux.h set worldsize to 0 to default to config.cpp instead also fixes other EpochEvents from going outside map boundaries.

Hope it helps someone else :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...