Animated Helicrashs 0.1 - Release

This seems to glitch fly (looks weird) with 40+ players on a server. And I had one insta-crash in the ocean causing the rest to not spawn. It was only once though.
 
This seems to glitch fly (looks weird) with 40+ players on a server. And I had one insta-crash in the ocean causing the rest to not spawn. It was only once though.
Yep, on LOW-FPS-Servers this is a bit buggy.... most of my Helis on my Namalsk-Server crash in the ocean right now... i think because the server cant manage the AI very well because of the shitty performance.

But a crashing-chopper over the ocean cant cause the rest not to spawn in, because after a crash is completed, the next heli can start... even in the ocean, as long as the heli exploded somewhere the script ends and waits for the next heli. I hate Arma-Servers since a few days, my CPU is at 20% and the server is < 2fps when 40/40... i have to restart every 3 hours, performance became this shitty since 1.7.6.1

One thing that would be possible is to spawn the helis not over the ocean, but on a random-places over the map so even if they crash to early, they are still lootable.
 
Zeveron can you put together a post on the tweaks needed to get this running on Taviana 2.0?

This is an awesome idea Grafzahl!
 
Ok, put about 130 different static coords for Taviana, they are fairly spread around and I have tried not to have too many on maintains so that people can actually reach them without helis! I have attached the file to this post :)

Not sure if I have done it correctly so notify me if it is wrong or anything that need changing :p

Also where it says
Code:
!!!!!After you put in the coordinates you have to set _useStatic to true inside
        your server_monitor.sqf, default is false!!!!!
I don't have _useStatic in my server_monitor.sqf so what should I do?
 

Attachments

  • server_spawnCrashSite.sqf
    15.6 KB · Views: 11
Ok, put about 130 different static coords for Taviana, they are fairly spread around and I have tried not to have too many on maintains so that people can actually reach them without helis! I have attached the file to this post :)

Not sure if I have done it correctly so notify me if it is wrong or anything that need changing :p

Also where it says
Code:
!!!!!After you put in the coordinates you have to set _useStatic to true inside
        your server_monitor.sqf, default is false!!!!!
I don't have _useStatic in my server_monitor.sqf so what should I do?

Code:
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire, _useStatic, _preWaypoint, _crashDamage]
nul =    [
                3,        //Number of the guaranteed Loot-Piles at the Crashside
                4,        //Number of the random Loot-Piles at the Crashside 3+(1,2,3 or 4)
                3000,    //Fixed-Time (in seconds) between each start of a new Chopper
                500,      //Random time (in seconds) added between each start of a new Chopper
                1,        //Spawnchance of the Heli (1 will spawn all possible Choppers, 0.5 only 50% of them)
                'center', //Center-Marker for the Random-Crashpoints, for Chernarus this is a point near Stary
                4000,    //Radius in Meters from the Center-Marker in which the Choppers can crash and get waypoints
                true,    //Should the spawned crashsite burn (at night) & have smoke?
                false,    //Should the flames & smoke fade after a while?
                false,    //Use the Static-Crashpoint-Function? If true, you have to add Coordinates into server_spawnCrashSite.sqf
                1,        //Amount of Random-Waypoints the Heli gets before he flys to his Point-Of-Crash (using Static-Crashpoint-Coordinates if its enabled)
                1        //Amount of Damage the Heli has to get while in-air to explode before the POC. (0.0001 = Insta-Explode when any damage//bullethit, 1 = Only Explode when completly damaged)
            ] spawn server_spawnCrashSite;

you have to enable (set to true) the line that says: //Use the Static-Crashpoint-Function? If true, you have to add Coordinates into server_spawnCrashSite.sqf
 
Ah ok thanks guys, well those are a good amount of static coords, you can put it on your front page if you want so that people running Taviana can get some instead of spending time making them :p

Also want to thank you again Grafzahl for putting this together it is truly amazing! :)
 
How to get this to work on Taviana 2:

Follow Grafzahl's instructions, there is no server_spawnCrashSite.sqf for Taviana 2 so just put Graf's file inside your compile folder.

Here's what you need to edit:
Spawning positions, line 50-51
I use
Code:
    //Random-Startpositions, Adjust this for other Maps then Chernarus
    _heliStart = [[3461.92,5021.77,0],[8582.35,14077.7,0]] call BIS_fnc_selectRandom;
Which is one spawn off the coast of each island.

Backup waypoint, line 53-54
Code:
    //A Backup Waypoint, if not Chernarus, set some Coordinates far up in the north (behind all possible Crashsites)
    _safetyPoint = [8450.08,20240,0];
That is up above Kameni.

Getting loot to work, line 231-237

Find this:
Code:
        _num        = round(random _randomizedLoot) + _guaranteedLoot;
 
        _config =        configFile >> "CfgBuildingLoot" >> _lootTable;
        _itemTypes =    [] + getArray (_config >> "itemType");
        _index =        dayz_CBLBase  find "HeliCrash";
        _weights =        dayz_CBLChances select _index;
        _cntWeights = count _weights;

And replace it with:

Code:
        _num        = round(random 4) + 4;
   
        _config = configFile >> "CfgBuildingLoot" >> _lootTable;
        _itemTypes = [["SCAR_H_LNG_Sniper", "weapon"],["SCAR_L_CQC_EGLM_Holo", "weapon"],["VSS_vintorez", "weapon"], ["MG36_camo", "weapon"], ["FN_FAL","weapon"], ["M14_EP1","weapon"], ["FN_FAL_ANPVS4","weapon"], ["Mk_48_DZ","weapon"], ["M249_DZ","weapon"], ["BAF_L85A2_RIS_SUSAT","weapon"], ["DMR","weapon"], ["G36C","weapon"], ["G36C_camo","weapon"], ["SCAR_H_CQC_CCO", "weapon"], ["G36_C_SD_camo","weapon"], ["G36A_camo","weapon"], ["G36K_camo","weapon"], ["", "military"], ["MedBox0", "object"], ["NVGoggles", "weapon"], ["AmmoBoxSmall_556", "object"], ["AmmoBoxSmall_762", "object"], ["Skin_Camo1_DZ", "magazine"], ["Skin_Soldier1_DZ", "magazine"], ["Skin_Sniper1_DZ", "magazine"], ["SVD_CAMO","weapon"], ["M24","weapon"], ["M4A1_AIM_SD_camo","weapon"], ["Sa58P_EP1","weapon"], ["Sa58V_CCO_EP1","weapon"], ["Sa58V_EP1","weapon"], ["Sa58V_RCO_EP1","weapon"], ["M4SPR","weapon"]];
        _itemChance = [0.01, 0.02, 0.01, 0.01, 0.02, 0.05, 0.01, 0.03, 0.05, 0.01, 0.06, 0.03, 0.02, 0.01, 0.01, 0.02, 0.02, 0.9, 0.09, 0.01, 0.5, 0.05, 0.05, 0.01, 0.05, 0.05, 0.04, 0.03, 0.05, 0.05, 0.05, 0.04, 0.05];
        _weights = [];
        _weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
        _cntWeights = count _weights;
        _index = _weights call BIS_fnc_selectRandom;

Use this guide to see how to change what weapons that are to spawn. Find a list of class names to change the weapons, for instance this one.

That should get it to work if you followed Graf's + my instructions. My server_monitor setup:
Code:
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
nul = [4, 4, 60, 0, 0.30, 'center', 4000, true, false] spawn server_spawnCrashSite;

Didn't want to mess around with spawn time so instead put it to 30% chance to spawn, running a server with 6-hour resets it seems to be working okay. Any questions, feel free to ask, and again, thanks to Graf for posting this in the first place!
 
How to get this to work on Taviana 2:

Follow Grafzahl's instructions, there is no server_spawnCrashSite.sqf for Taviana 2 so just put Graf's file inside your compile folder.

Here's what you need to edit:
Spawning positions, line 50-51
I use
Code:
    //Random-Startpositions, Adjust this for other Maps then Chernarus
    _heliStart = [[3461.92,5021.77,0],[8582.35,14077.7,0]] call BIS_fnc_selectRandom;
Which is one spawn off the coast of each island.

Backup waypoint, line 53-54
Code:
    //A Backup Waypoint, if not Chernarus, set some Coordinates far up in the north (behind all possible Crashsites)
    _safetyPoint = [8450.08,20240,0];
That is up above Kameni.

Getting loot to work, line 231-237

Find this:
Code:
        _num        = round(random _randomizedLoot) + _guaranteedLoot;
 
        _config =        configFile >> "CfgBuildingLoot" >> _lootTable;
        _itemTypes =    [] + getArray (_config >> "itemType");
        _index =        dayz_CBLBase  find "HeliCrash";
        _weights =        dayz_CBLChances select _index;
        _cntWeights = count _weights;

And replace it with:

Code:
        _num        = round(random 4) + 4;
 
        _config = configFile >> "CfgBuildingLoot" >> _lootTable;
        _itemTypes = [["SCAR_H_LNG_Sniper", "weapon"],["SCAR_L_CQC_EGLM_Holo", "weapon"],["VSS_vintorez", "weapon"], ["MG36_camo", "weapon"], ["FN_FAL","weapon"], ["M14_EP1","weapon"], ["FN_FAL_ANPVS4","weapon"], ["Mk_48_DZ","weapon"], ["M249_DZ","weapon"], ["BAF_L85A2_RIS_SUSAT","weapon"], ["DMR","weapon"], ["G36C","weapon"], ["G36C_camo","weapon"], ["SCAR_H_CQC_CCO", "weapon"], ["G36_C_SD_camo","weapon"], ["G36A_camo","weapon"], ["G36K_camo","weapon"], ["", "military"], ["MedBox0", "object"], ["NVGoggles", "weapon"], ["AmmoBoxSmall_556", "object"], ["AmmoBoxSmall_762", "object"], ["Skin_Camo1_DZ", "magazine"], ["Skin_Soldier1_DZ", "magazine"], ["Skin_Sniper1_DZ", "magazine"], ["SVD_CAMO","weapon"], ["M24","weapon"], ["M4A1_AIM_SD_camo","weapon"], ["Sa58P_EP1","weapon"], ["Sa58V_CCO_EP1","weapon"], ["Sa58V_EP1","weapon"], ["Sa58V_RCO_EP1","weapon"], ["M4SPR","weapon"]];
        _itemChance = [0.01, 0.02, 0.01, 0.01, 0.02, 0.05, 0.01, 0.03, 0.05, 0.01, 0.06, 0.03, 0.02, 0.01, 0.01, 0.02, 0.02, 0.9, 0.09, 0.01, 0.5, 0.05, 0.05, 0.01, 0.05, 0.05, 0.04, 0.03, 0.05, 0.05, 0.05, 0.04, 0.05];
        _weights = [];
        _weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
        _cntWeights = count _weights;
        _index = _weights call BIS_fnc_selectRandom;

Use this guide to see how to change what weapons that are to spawn. Find a list of class names to change the weapons, for instance this one.

That should get it to work if you followed Graf's + my instructions. My server_monitor setup:
Code:
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
nul = [4, 4, 60, 0, 0.30, 'center', 4000, true, false] spawn server_spawnCrashSite;

Didn't want to mess around with spawn time so instead put it to 30% chance to spawn, running a server with 6-hour resets it seems to be working okay. Any questions, feel free to ask, and again, thanks to Graf for posting this in the first place!
You have also to add
Code:
server_spawnCrashSite  =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
to your server_functions.sqf
 
Iam in a good mood :D

Next Update will have maxChoppers (Script will Stop when more then X choppers have spawned) - this way you can spawn a chopper every 20 minutes after server restart, but stop the spawning as soon as X choppers are out.
Why not instead of stopping the script,once it reaches maximum heli count it deletes the oldest crashsite or one that was already looted from? That way people will always be able to see a cool heli crash.:D
 
Just uploaded my static points but now no helis actually spawn this is only what i get in the logs

Code:
"CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:true||PW:1||CD:1]"
19:50:43 "CRASHSPAWNER: 100% chance to start a crashing UH-1H with loot table 'Military' at 3349"

My server.pbo is attached if someone can look at it.
 

Attachments

  • dayz_server.pbo
    73.3 KB · Views: 7
Just uploaded my static points but now no helis actually spawn this is only what i get in the logs

Code:
"CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:true||PW:1||CD:1]"
19:50:43 "CRASHSPAWNER: 100% chance to start a crashing UH-1H with loot table 'Military' at 3349"

My server.pbo is attached if someone can look at it.
Have you waited 55 minutes since server started?
 
so can i change this:

Code:
_num        = round(random _randomizedLoot) + _guaranteedLoot;
 
        _config =        configFile >> "CfgBuildingLoot" >> _lootTable;
        _itemTypes =    [] + getArray (_config >> "itemType");
        _index =        dayz_CBLBase  find "HeliCrash";
        _weights =        dayz_CBLChances select _index;
        _cntWeights = count _weights;

to this:

Code:
_num= round(random 4) + 4;
 
              _config = configFile >> "CfgBuildingLoot" >> _lootTable;
              _itemTypes = [["SVD_CAMO", "weapon"], ["M24", "weapon"], ["FN_FAL", "weapon"], ["UZI_EP1", "weapon"], ["RPK_74", "weapon"], ["M40A3", "weapon"], ["M60A4_EP1", "weapon"], ["M9SD", "weapon"], ["SCAR_H_LNG_Sniper_SD", "weapon"], ["m8_carbineGL", "weapon"], ["SCAR_H_CQC_CCO", "weapon"], ["M4A1_HWS_GL_SD_camo"], ["AK_107_GL_kobra", "weapon"], ["G36_c_SD_eotech", "weapon"], ["", "military"], ["MedBox0", "object"], ["NVGoggles", "weapon"], ["AmmoBoxSmall_556", "object"], ["AmmoBoxSmall_762", "object"], ["Skin_Camo1_DZ", "magazine"], ["Skin_Soldier1_DZ", "magazine"], ["Skin_Sniper1_DZ", "magazine"]];
              _itemChance = [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.5, 0.05, 0.05, 0.5, 0.05, 0.05, 0.05, 0.05];
              _weights = [];
              _weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
              _cntWeights = count _weights;
              _index = _weights call BIS_fnc_selectRandom;

to have the crash loot be custom, or is there more to it?

thanks in advance
 
Im getting this in my server.rpt log:
Code:
18:42:29 UH1Wreck_DZ: MainTurret - unknown animation source MainTurret
18:42:29 UH1Wreck_DZ: MainGun - unknown animation source mainGun
18:42:29 UH1Wreck_DZ: Gatling - unknown animation source Gatling
18:42:29 "CRASHSPAWNER: Loot spawn at '[1619.37,209.646,0]' with loot table '15.3165'"
18:42:29 "CRASHSPAWNER: Loot spawn at '[1626.83,218.904,0]' with loot table '15.3165'"
18:42:29 "CRASHSPAWNER: Loot spawn at '[1621.16,214.039,0]' with loot table '15.3165'"
18:42:29 "CRASHSPAWNER: Loot spawn at '[1631.3,216.861,0]' with loot table '15.3165'"
18:42:29 "CRASHSPAWNER: Loot spawn at '[1622.76,216.991,0]' with loot table '15.3165'"
18:42:29 "CRASHSPAWNER: Flight complete! Runtime: 175.881 Sec"
18:42:29 "CRASHSPAWNER: 100% chance to spawn 'Mi17_DZ' with loot table 'HeliCrash' at 175.881"
18:42:29 "CRASHSPAWNER: Spawning 'Mi17_DZ' with loot table 'HeliCrash' NOW! (175.996) at: [4892.98,7917.75]"
18:42:30 "CLEANUP: KILLING A HACKER Grace Hirasaki C 1-1-A:1 IN Mi17_DZ"
18:42:33 "CLEANUP: DELETED 5 LOOT BAGS"
I am positive that I pasted the code Graf told us to paste in the right spot but I could be wrong. Can someone please take a look at my server_cleanup.sqf file to check if it is correctly configured.

EDIT: I have fixed the issue by using moleman's code on page 6 I think. Here it is:
Code:
 " if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && ((vehicle _x getVariable [""Sarge"",0]) != 1)) then {" \n

Edit #2!!!!: Disregard the last edit it is still doing the same thing!!
 

Attachments

  • server_cleanup.zip
    3 KB · Views: 5
Here are my current test timings. Seems to work pretty good.


Code:
nul = [3, 4, (30 * 60),(5 * 60), 1, 'center', 4000, true, false] spawn server_spawnCrashSite;
 
Took Me long enough to find the problem! cyrq's newest fix was for some reason not working with me so i just went to the older one it works now. Cyrq i think you should look into the code a little more because there could be something wrong because it is working perfectly when I use the older fix.


I can also confirm using Cyrq's post a few pages back works perfectly with DayZ CC. I have been using it since it was posted and have not had any issues with it.
 
I can also confirm using Cyrq's post a few pages back works perfectly with DayZ CC. I have been using it since it was posted and have not had any issues with it.
Its nice to hear someone is having the same problem as me haha :mad: . I have managed to make it work(kind of) since its showing the CRASHSPAWNER again but now its killing the hacker/pilot because i did something wrong with my server_cleanup.sqf. If you are wondering what i did to do that all I did was delete server_Spawnwreck and followed the latest fix.
 
Installed this onto my server and it gets stuck loading in. It just says something went wrong disconnect and try again.

This is the error it is giving me in my RPT.
Code:
 6:47:07 Error: Bone oldloader doesn't exist in some skeleton
6:47:13 Error in expression <s, sizeOf(_crashModel)]);
 
 
_near
 
 
 
 
 
private["_useStatic","_crashDamage","_lo>
6:47:13  Error position: <private["_useStatic","_crashDamage","_lo>
6:47:13  Error Missing ;
6:47:13 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 259
6:47:13 Error in expression <s, sizeOf(_crashModel)]);
 
 
_near
 
 
 
 
 
private["_useStatic","_crashDamage","_lo>
6:47:13  Error position: <private["_useStatic","_crashDamage","_lo>
6:47:13  Error Missing ;
6:47:13 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 259
6:47:20 Error in expression <s, sizeOf(_crashModel)]);
 
 
_near
 
 
 
 
 
private["_useStatic","_crashDamage","_lo>
6:47:20  Error position: <private["_useStatic","_crashDamage","_lo>
6:47:20  Error Missing ;
6:47:20 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 259
6:47:20 Error in expression <s, sizeOf(_crashModel)]);
 
 
_near
 
 
 
 
 
private["_useStatic","_crashDamage","_lo>
6:47:20  Error position: <private["_useStatic","_crashDamage","_lo>
6:47:20  Error Missing ;
6:47:20 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 259

Not really sure what is going on here. Also I noticed you said to replace/merge the spawn crash site sqf. I just replaced. Is there a specific way to go about merging them?
 
Installed this onto my server and it gets stuck loading in. It just says something went wrong disconnect and try again.

This is the error it is giving me in my RPT.
Code:
 6:47:07 Error: Bone oldloader doesn't exist in some skeleton
6:47:13 Error in expression <s, sizeOf(_crashModel)]);
 
 
_near
 
 
 
 
 
private["_useStatic","_crashDamage","_lo>
6:47:13  Error position: <private["_useStatic","_crashDamage","_lo>
6:47:13  Error Missing ;
6:47:13 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 259
6:47:13 Error in expression <s, sizeOf(_crashModel)]);
 
 
_near
 
 
 
 
 
private["_useStatic","_crashDamage","_lo>
6:47:13  Error position: <private["_useStatic","_crashDamage","_lo>
6:47:13  Error Missing ;
6:47:13 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 259
6:47:20 Error in expression <s, sizeOf(_crashModel)]);
 
 
_near
 
 
 
 
 
private["_useStatic","_crashDamage","_lo>
6:47:20  Error position: <private["_useStatic","_crashDamage","_lo>
6:47:20  Error Missing ;
6:47:20 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 259
6:47:20 Error in expression <s, sizeOf(_crashModel)]);
 
 
_near
 
 
 
 
 
private["_useStatic","_crashDamage","_lo>
6:47:20  Error position: <private["_useStatic","_crashDamage","_lo>
6:47:20  Error Missing ;
6:47:20 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 259

Not really sure what is going on here. Also I noticed you said to replace/merge the spawn crash site sqf. I just replaced. Is there a specific way to go about merging them?

Replacing it is fine, looks like you have a missing ; on one of your lines you editted
 
Its nice to hear someone is having the same problem as me haha :mad: . I have managed to make it work(kind of) since its showing the CRASHSPAWNER again but now its killing the hacker/pilot because i did something wrong with my server_cleanup.sqf. If you are wondering what i did to do that all I did was delete server_Spawnwreck and followed the latest fix.

You left the current cleanup code in from this version and started running an old version of the code that doesn't add the public variable it checks for. Wonder why it doesn't work....

Add this within your spawn_crashsite code

//Make sure its not destroyed by the Hacker-Killing-Cleanup (Thanks to Sarge for the hint)
_crashwreck setVariable["Sarge",1];

Or if you can't understand that comment out the check for hacker lines in your cleanup with "//"
 
so can i change this:

Code:
_num        = round(random _randomizedLoot) + _guaranteedLoot;
 
        _config =        configFile >> "CfgBuildingLoot" >> _lootTable;
        _itemTypes =    [] + getArray (_config >> "itemType");
        _index =        dayz_CBLBase  find "HeliCrash";
        _weights =        dayz_CBLChances select _index;
        _cntWeights = count _weights;

to this:

Code:
_num= round(random 4) + 4;
 
              _config = configFile >> "CfgBuildingLoot" >> _lootTable;
              _itemTypes = [["SVD_CAMO", "weapon"], ["M24", "weapon"], ["FN_FAL", "weapon"], ["UZI_EP1", "weapon"], ["RPK_74", "weapon"], ["M40A3", "weapon"], ["M60A4_EP1", "weapon"], ["M9SD", "weapon"], ["SCAR_H_LNG_Sniper_SD", "weapon"], ["m8_carbineGL", "weapon"], ["SCAR_H_CQC_CCO", "weapon"], ["M4A1_HWS_GL_SD_camo"], ["AK_107_GL_kobra", "weapon"], ["G36_c_SD_eotech", "weapon"], ["", "military"], ["MedBox0", "object"], ["NVGoggles", "weapon"], ["AmmoBoxSmall_556", "object"], ["AmmoBoxSmall_762", "object"], ["Skin_Camo1_DZ", "magazine"], ["Skin_Soldier1_DZ", "magazine"], ["Skin_Sniper1_DZ", "magazine"]];
              _itemChance = [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.5, 0.05, 0.05, 0.5, 0.05, 0.05, 0.05, 0.05];
              _weights = [];
              _weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
              _cntWeights = count _weights;
              _index = _weights call BIS_fnc_selectRandom;

to have the crash loot be custom, or is there more to it?

thanks in advance


well i tried this.. must be more to it...
 
Back
Top