From 9e03feb468a3a43976d1a72e023624ca97572bca Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sun, 30 Apr 2017 21:58:38 -0400 Subject: [PATCH] See the Changelog for a full list of changes. --- .../Functions/GMS_fnc_emptyObject.sqf | 2 +- .../Functions/GMS_fnc_getTraderCitesExile.sqf | 2 +- .../Compiles/Functions/GMS_fnc_mainThread.sqf | 4 +- .../Groups/GMS_fnc_changeToMoveWaypoint.sqf | 88 +++++++++++++---- .../Groups/GMS_fnc_changeToSADWaypoint.sqf | 35 +++++-- .../Groups/GMS_fnc_changeToSentryWaypoint.sqf | 34 +++++-- .../Groups/GMS_fnc_cleanEmptyGroups.sqf | 3 +- .../Groups/GMS_fnc_emplacedWeaponWaypoint.sqf | 26 +++++ .../Groups/GMS_fnc_missionGroupMonitor.sqf | 89 +++++++++++++---- .../Groups/GMS_fnc_setNextWaypoint.sqf | 26 +++-- .../Groups/GMS_fnc_setupWaypoints.sqf | 93 ++++++++++++++++++ .../Compiles/Groups/GMS_fnc_spawnGroup.sqf | 33 +++++-- .../Missions/GMS_fnc_cleanUpObjects.sqf | 21 ++-- .../Compiles/Missions/GMS_fnc_endMission.sqf | 27 ++++-- .../Missions/GMS_fnc_missionSpawner.sqf | 7 +- .../GMS_fnc_spawnEmplacedWeaponArray.sqf | 65 ++++++++----- .../Missions/GMS_fnc_spawnMissionAI.sqf | 9 +- .../Missions/GMS_fnc_spawnMissionCrates.sqf | 7 +- .../Missions/GMS_fnc_spawnMissionHeli.sqf | 15 +-- .../GMS_fnc_spawnMissionVehiclePatrols.sqf | 29 +++--- .../Missions/GMS_fnc_spawnPendingMissions.sqf | 10 +- .../Compiles/Missions/otl7_Mapper.sqf | 11 +-- .../Compiles/TimeAccel/GMS_fnc_Time.sqf | 24 ++++- .../Compiles/Units/GMS_EH_AIHit.sqf | 19 +++- .../Units/GMS_EH_unitWeaponReloaded.sqf | 2 + .../Compiles/Units/GMS_fnc_cleanupAliveAI.sqf | 7 +- .../Compiles/Units/GMS_fnc_cleanupDeadAI.sqf | 2 +- .../Units/GMS_fnc_processIlleagalAIKills.sqf | 16 ++-- .../Vehicles/GMS_fnc_decomissionAIVehicle.sqf | 6 +- .../GMS_fnc_releaseVehicleToPlayers.sqf | 4 +- .../Vehicles/GMS_fnc_sendHeliHome.sqf | 8 -- .../Vehicles/GMS_fnc_spawnMissionHeli.sqf | 96 +------------------ .../GMS_fnc_spawnMissionParatroops.sqf | 3 +- .../Vehicles/GMS_fnc_spawnParaCrate.sqf | 2 +- .../Vehicles/GMS_fnc_spawnParaUnits.sqf | 20 +++- .../Vehicles/GMS_fnc_spawnReinforcements.sqf | 25 +++-- .../Vehicles/GMS_fnc_spawnVehicle.sqf | 6 +- .../Vehicles/GMS_fnc_spawnVehiclePatrol.sqf | 37 ++++--- .../Vehicles/GMS_fnc_vehicleMonitor.sqf | 48 +++++----- .../custom_server/Compiles/blck_functions.sqf | 4 +- .../custom_server/Compiles/blck_variables.sqf | 3 +- .../custom_server/Configs/blck_configs.sqf | 4 +- .../addons/custom_server/init/blck_init.sqf | 45 ++++++++- .../addons/custom_server/init/build.sqf | 16 +--- FAQ.txt | 37 ++++--- INSTALLATION.txt | 22 ++--- README.md | 2 +- changeLog.sqf | 15 ++- 48 files changed, 701 insertions(+), 408 deletions(-) create mode 100644 @epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_emplacedWeaponWaypoint.sqf create mode 100644 @epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf index 30d566e..2519fdc 100644 --- a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf +++ b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf @@ -15,4 +15,4 @@ clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; clearBackpackCargoGlobal _veh; - clearItemCargoGlobal _veh; \ No newline at end of file + clearItemCargoGlobal _veh; diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesExile.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesExile.sqf index 2b9cdec..c72b766 100644 --- a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesExile.sqf +++ b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesExile.sqf @@ -27,4 +27,4 @@ _tc = []; blck_locationBlackList pushback [(getMarkerPos _x),1000]; if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getExileLocations :: -- >> Added Exile Concrete Mixer location at %1", (getMarkerPos _x)];}; }; -}forEach _traderCites; \ No newline at end of file +}forEach _traderCites; diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf index e796b37..9c73abe 100644 --- a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf +++ b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -41,8 +41,7 @@ while {true} do [] call blck_fnc_cleanupAliveAI; [] call blck_fnc_cleanupObjects; [] call blck_fnc_cleanupDeadAI; - - //[] call blck_fnc_missionGroupMonitor; + [] call blck_fnc_missionGroupMonitor; _timer20sec = diag_tickTime; //diag_log format["_mainThread::-->> diag_tickTime = %1",diag_tickTime]; }; @@ -50,6 +49,7 @@ while {true} do { _timer1min = diag_tickTime; [] call blck_fnc_spawnPendingMissions; + //[] call blck_fnc_missionGroupMonitor; if (_modType isEqualTo "Epoch") then { [] call blck_fnc_cleanEmptyGroups; diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf index 96e4416..159f1bd 100644 --- a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last modified 3/14/17 + Last modified 4/23/17 -------------------------- License @@ -13,35 +13,81 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#ifdef blck_debugMode +//diag_log "_fnc_changeToMoveWaypoint: blck_debugMode enabled"; +#endif +private["_group","_wp","_wpPos","_dis","_arc","_dir","_newPos","_marker","_center","_minDis","_maxDis"]; -private["_group","_wp","_wpPos","_dis","_arc"]; - -//diag_log format["_fnc_changeToMoveWaypoint:: -- :: _this = %1 with typeName _this = %2",_this, typeName _this]; - -if !(typeName _this isEqualTo "OBJECT") exitWith {diag_log "_fnc_changeToSADWaypoint aborted for incorrect parameter. You must pass a unit in the group for this to function";}; _group = group _this; -//diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; - +_groupSpawned setcombatmode "YELLOW"; +_groupSpawned setBehaviour "COMBAT"; _group setVariable["timeStamp",diag_tickTime]; _wp = [_group, 0]; _wpPos = getPos ((units _group) select 0); -_dis = (_group getVariable["minDis"]) + random( (_group getVariable["maxDis"]) - (_group getVariable["minDis"])); +_dir = _group getVariable["wpDir",0]; +_center = _group getVariable ["patrolCenter",_wpPos]; if (_group getVariable["wpMode","random"] isEqualTo "random") then { - _arc = random(360); + _dir = random(360); } else { - _arc = (_group getVariable["arc",0]) + 70; - _group setVariable["arc",_arc]; + _dir = (_group getVariable["wpDir",0]) + 70; + _group setVariable["wpDir",_dir]; }; -_newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc]; -_group setCurrentWaypoint _wp; +_minDis = _group getVariable["minDis",25]; +_maxDis = _group getVariable["maxDis",30]; +_dis = (_minDis) + random( (_maxDis) - (_minDis) ); +_newPos = (_center) getPos[_dis,_dir]; +_wp setWPPos [_newPos select 0, _newPos select 1]; +_wp setWaypointCompletionRadius (_group getVariable["wpRadius",30]); _wp setWaypointType "MOVE"; _wp setWaypointName "move"; -_wp setWaypointBehaviour blck_groupBehavior; -_wp setWaypointCombatMode blck_combatMode; +_wp setWaypointBehaviour "COMBAT"; +_wp setWaypointCombatMode "YELLOW"; _wp setWaypointTimeout [1,1.1,1.2]; -//_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"]; -_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"]; -_wp setWaypointPosition _newPos; - - +_group setCurrentWaypoint _wp; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_changeToMoveWaypoint (4/25/17): _this = %1", _this]; + diag_log format["_fnc_changeToMoveWaypoint: typeName _this = %1", typeName _this]; + diag_log format["_fnc_changeToMoveWaypoint:_group = %1",_group]; + diag_log format["_fnc_changeToMoveWaypoint:_group timestamp updated to %1", _group getVariable "timeStamp"]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> wpMode %1 _dir %2 _dis %3 _center %4",_group getVariable["wpMode","random"], _dir, _dis,_center]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new position is %2",_group, _newPos]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp]; + diag_log format["_fnc_changeToMoveWaypoint:_group %1 basic waypoint parameters updates", _group getVariable "timeStamp"]; + _marker =_group getVariable["wpMarker",""]; + _marker setMarkerColor "ColorBlue"; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"]; +}; +#endif +if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then +{ + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SAD Mode",_group]; + }; + _wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"]; + #else + _wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;"]; + #endif +}; +if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then +{ + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SENTRY Mode",_group]; + }; + _wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SENTRY Waypoint',group this];"]; + #else + _wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint;"]; + #endif +}; +#ifdef blck_debugMode +if (blck_debugLevel > 1) then +{ + diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; +}; +#endif diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf index e76e606..a6b2c90 100644 --- a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last modified 3/14/17 + Last modified 4/29/17 -------------------------- License @@ -14,20 +14,39 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#ifdef blck_debugMode +diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled"; +#endif + private["_group","_wp"]; -//diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; _group = group _this; -//diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; - _group setVariable["timeStamp",diag_tickTime]; +_group setcombatmode "RED"; +_group setBehaviour "COMBAT"; _wp = [_group, 0]; _group setCurrentWaypoint _wp; _wp setWaypointType "SAD"; _wp setWaypointName "sad"; -_wp setWaypointBehaviour blck_groupBehavior; -_wp setWaypointCombatMode blck_combatMode; -_wp setWaypointTimeout [60,75,90]; +_wp setWaypointBehaviour "COMBAT"; +_wp setWaypointCombatMode "RED"; +_wp setWaypointTimeout [10,15,20]; + +#ifdef blck_debugMode _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"]; +#else +_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"]; +#endif - +#ifdef blck_debugMode +if (blck_debugLevel > 1) then +{ + private ["_marker"]; + _marker = _group getVariable["wpMarker",""]; + _marker setMarkerColor "ColorRed"; + diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; + diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; + diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; + diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"]; +}; +#endif \ No newline at end of file diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf index e70181b..2fd52b8 100644 --- a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last modified 3/14/17 + Last modified 4/29/17 -------------------------- License @@ -13,21 +13,37 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - +#ifdef blck_debugMode +diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled"; +#endif private["_group","_wp"]; -//diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; _group = group _this; -//diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; - _group setVariable["timeStamp",diag_tickTime]; _wp = [_group, 0]; _group setCurrentWaypoint _wp; +_group setcombatmode "RED"; +_group setBehaviour "COMBAT"; _wp setWaypointType "SENTRY"; _wp setWaypointName "sentry"; -_wp setWaypointBehaviour blck_groupBehavior; -_wp setWaypointCombatMode blck_combatMode; -_wp setWaypointTimeout [60,75,90]; +_wp setWaypointBehaviour "COMBAT"; +_wp setWaypointCombatMode "RED"; +_wp setWaypointTimeout [10,15,20]; +#ifdef blck_debugMode _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"]; +#else +_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"]; +#endif - +#ifdef blck_debugMode +if (blck_debugLevel >1) then +{ + diag_log format["_fnc_changeToSentryWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; + diag_log format["_fnc_changeToSentryWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; + private ["_marker"]; + _marker = _group getVariable["wpMarker",""]; + _marker setMarkerColor "ColorYellow"; + diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; + diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"]; +}; +#endif \ No newline at end of file diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_cleanEmptyGroups.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_cleanEmptyGroups.sqf index b6bcf49..9233b0c 100644 --- a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_cleanEmptyGroups.sqf +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_cleanEmptyGroups.sqf @@ -25,5 +25,6 @@ private _grp = allGroups; //diag_log format["_fnc_cleanEmptyGroups:: - >> type of object _x = %1",typeName _x]; if ((count units _x) isEqualTo 0) then {deleteGroup _x}; }forEach _grp; +#ifdef blck_debugMode if (blck_debugLevel > 2) then {diag_log "_fnc_cleanEmptyGroups:: -- >> exiting function";}; - +#endif diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_emplacedWeaponWaypoint.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_emplacedWeaponWaypoint.sqf new file mode 100644 index 0000000..b0926be --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_emplacedWeaponWaypoint.sqf @@ -0,0 +1,26 @@ +// Sets the WP type for WP for the specified group and updates other atributes accordingly. +/* + for DBD Clan + By Ghostrider-DBD- + Copyright 2016 + Last modified 4/23/17 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private["_group","_wp"]; + +diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; +_group = group _this; + diag_log format["_fnc_emplacedWeaponWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; +_group setVariable["timeStamp",diag_tickTime]; +_wp = [_group, 0]; +_group setCurrentWaypoint _wp; + diag_log format["_fnc_emplacedWeaponWaypoint:: -- >> group to update is %1 waypoints updated at %2",_group, (_group getVariable["timeStamp",diag_tickTime])]; + diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf index 063166a..c86be8f 100644 --- a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf @@ -17,8 +17,10 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -//diag_log format["_fnc_waypointMonitor::-->> running function at diag_tickTime = %1 with blck_fnc_missionGroupMonitor = %2",diag_tickTime,blck_monitoredMissionAIGroups]; - +//diag_log format["_fnc_missionGroupMonitor (4/29:4:09 PM)::-->> running function at diag_tickTime = %1 with blck_fnc_missionGroupMonitor = %2",diag_tickTime,blck_monitoredMissionAIGroups]; +#ifdef blck_debugMode + //diag_log format["_fnc_missionGroupMonitor:: blck_debugMode defined"]; +#endif _fn_allPlayers = { private ["_players"]; _players = []; @@ -75,43 +77,90 @@ _fn_removeEmptyOrNullGroups = { _fn_monitorGroupWaypoints = { { - private["_timeStamp","_index","_unit"]; + private["_timeStamp","_index","_unit","_soldierType"]; _timeStamp = _x getVariable ["timeStamp",0]; if (_timeStamp isEqualTo 0) then { - _group setVariable["timeStamp",diag_tickTime]; - //diag_log format["_fn_monitorGroupWaypoints::--> updating timestamp for group %1 at time %2",__x,diag_tickTime]; + _x setVariable["timeStamp",diag_tickTime]; + //diag_log format["_fn_monitorGroupWaypoints::--> updating timestamp for group %1 at time %2",_x,diag_tickTime]; }; - if (diag_tickTime > (_x getVariable "timeStamp") + 300) then + _soldierType = _x getVariable["soldierType","null"]; + //diag_log format["_fn_monitorGroupWaypoints::--> soldierType for group %1 = %2 and timeStamp = %3",_x,_soldierType,_timeStamp]; + + if (_soldierType isEqualTo "infantry") then { - if !([_x] call _fn_inCombat) then + if (diag_tickTime > (_x getVariable "timeStamp") + 60) then { _units = [_x] call _fn_aliveGroupUnits; if (count _units > 0) then { - _u = _units select 0; - if (vehicle _u isEqualTo _u) then // Only do this for foot patrols at present. + private _leader = leader _x; + (_leader) call blck_fnc_changeToMoveWaypoint; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: infantry group %1 stuck, waypoint reset",_x];}; + #endif + /* + if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then { - _index = currentWaypoint _x; - if ( (waypointName [_x, _index]) isEqualTo "move") then { - //diag_log format["_fn_monitorGroupWaypoints:: -- >> updating waypoint for group %1 to SAD at %2",_x,diag_tickTime]; - [_u] call blck_fnc_changetoSADWaypoint; - }; - if ( (waypointName [_x, _index])isEqualTo "sad") then { - //diag_log format["_fn_monitorGroupWaypoints:: -- >> updating waypoint for group %1 to Move at %2",_x,diag_tickTime]; - [_u] call blck_fnc_changeToMoveWaypoint; - }; + }; + */ }; + }; }; + if (_soldierType isEqualTo "vehicle") then + { + if (diag_tickTime > (_x getVariable "timeStamp") + 60) then + { + _units = [_x] call _fn_aliveGroupUnits; + if (count _units > 0) then + { + private _leader = leader _x; + (_leader) call blck_fnc_changeToMoveWaypoint; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: vehicle group %1 stuck, waypoint reset",_x];}; + #endif + /* + if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then + { + }; + */ + }; + + }; + }; + if (_soldierType isEqualTo "helicopter") then + { + if (diag_tickTime > (_x getVariable "timeStamp") + 60) then + { + _units = [_x] call _fn_aliveGroupUnits; + if (count _units > 0) then + { + private _leader = leader _x; + (_leader) call blck_fnc_changeToMoveWaypoint; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: helicopter group %1 stuck, waypoint reset",_x];}; + #endif + /* + if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then + { + + }; + */ + }; + + }; + }; } forEach blck_monitoredMissionAIGroups; }; //////// // Start of main function //////// -//diag_log format["_fnc_missionGroupMonitor: executing function at %1",diag_tickTime]; -uiSleep 0.1; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: executing function at %1",diag_tickTime];}; +#endif [] call _fn_removeEmptyOrNullGroups; +uiSleep 0.1; [] call _fn_monitorGroupWaypoints; diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf index 5d7535e..daaed11 100644 --- a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf @@ -19,6 +19,8 @@ private["_group","_wp","_index","_pattern","_mode","_arc","_dis","_wpPos"]; _group = group _this; _group setVariable["timeStamp",diag_tickTime]; +_group setcombatmode "YELLOW"; +_group setBehaviour "COMBAT" _wp = [_group, 0]; _pattern = _group getVariable["wpPattern",[]]; @@ -26,8 +28,10 @@ _index = _group getVariable["wpIndex",0]; _index = _index + 1; _minDis = _group getVariable["minDis",0]; _maxDis = _group getVariable["maxDis",0]; -_arc = (_group getVariable["arc",0]) + 70; -//diag_log format["_fnc_setNextWaypoint: -> _minDis = %1 | _maxDis = %2 | _arc = %3",_minDis,_maxDis,_arc]; +dir = (_group getVariable["wpDir",0]) + _group getVariable["wpArc",360/5]; +_group setVariable["wpDir",_dir]; + +diag_log format["_fnc_setNextWaypoint: -> _minDis = %1 | _maxDis = %2 | _arc = %3",_minDis,_maxDis,_arc]; if (_index >= (count _pattern)) then { _index = 0; @@ -47,25 +51,27 @@ _wpPos = waypointPosition _wp; _wp setWaypointType _type; _wp setWaypointName toLower _type; -if (true /*_type isEqualTo toLower "move"*/) then +if (_type isEqualTo (toLower "move")) then { _dis = (_minDis) + random( (_maxDis) - (_minDis) ); - if (toLower (_group getVariable["wpMode","random"]) isEqualTo "random") then + if (_group getVariable["wpMode",""] isEqualTo "random") then { - _arc = random(360); + _dir = random(360) } else { - _group setVariable["arc",_arc]; + _dir = _group getVariable["wpDir",0] + _group getVariable["wpArc",360/5]; }; + _group setVariable["wpDir",_dir]; _oldPos = waypointPosition _wp; + _newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc]; - _wp setWPPos _newPos; + _wp setWPPos [_newPos select 0, _newPos select 1]; #ifdef blck_debugMode diag_log format["_fnc_setNextWaypoint: -- > for group %5 | _dis = %1 | _arc = %2 _oldPos = %3 | _newPos = %4",_dis,_arc,_oldPos,_newPos,_group]; #endif - - //_wp setWaypointTimeout [1.0,1.1,1.2]; - _wp setWaypointTimeout [20,25,30]; + + _wp setWaypointTimeout [1.0,1.1,1.2]; + //_wp setWaypointTimeout [20,25,30]; } else { _wp setWaypointTimeout [20,25,30]; _newPos = _wpPos; diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf new file mode 100644 index 0000000..b646aa2 --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf @@ -0,0 +1,93 @@ +// Sets up waypoints for a specified group. +/* + for DBD Clan + By Ghostrider-DBD- + Copyright 2016 + Last modified 4/29/17 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#ifdef blck_debugMode +diag_log "_fnc_setupWaypoints: blck_debugMode enabled"; +#endif + +private["_dir","_arc","_noWp","_newpos","_wpradius","_wp"]; +params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ]; +_wp = [_group, 0]; +#ifdef blck_debugMode +diag_log format["_fnc_setupWaypoints (4/29/17): configuring waypoints for group %1: _mode = %2 | _wpPatrolMode = %3 _soldierType = %4",_group, _mode, _wpPatrolMode,_soldierType]; +#endif +if (_soldierType isEqualTo "emplaced") then +{ + _wp setWaypointType "SENTRY"; + _wp setWPPos (getPos leader _group); + _wp setWaypointCompletionRadius 100; + _wp setWaypointBehaviour "COMBAT"; + _wp setWaypointCombatMode "RED"; + _wp setWaypointTimeout [1,1.1,1.2]; + //_wp setWaypointTimeout [0.1,0.1100,0.1200]; + _group setCurrentWaypoint _wp; + _group setVariable["soldierType",_soldierType]; + #ifdef blck_debugMode + _wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to an emplaced weapon Waypoint',group this];"]; + #else + _wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint;"]; + #endif + if (blck_debugLevel > 1) then {diag_log format["_fnc_setupWaypoints: configuring weapoints for group %2 for emplaced weapon with _soldierType = %1",_soldierType,_group];}; +}; +if !(_soldierType isEqualTo "emplaced") then +{ + _group setcombatmode "YELLOW"; + _group setBehaviour "COMBAT"; + _group setVariable["patrolCenter",_pos]; + _group setVariable["minDis",_minDis]; + _group setVariable["maxDis",_maxDis]; + _group setVariable["timeStamp",diag_tickTime]; + _group setVariable["wpRadius",30]; + _group setVariable["wpMode",_mode]; + _group setVariable["wpPatrolMode",_wpPatrolMode]; + _group setVariable["wpDir",0]; + _group setVariable["wpArc",_arc]; + _group setVariable["soldierType",_soldierType]; + _dir = 0; + _arc = 360/5; + _wpradius = 30; + _dis = (_minDis) + random( (_maxDis) - (_minDis) ); + _newPos = _pos getPos[_dis,_dir]; + _wp setWPPos [_newPos select 0, _newPos select 1]; + _wp setWaypointCompletionRadius (_group getVariable["wpRadius",30]); + _wp setWaypointType "MOVE"; + _wp setWaypointName "move"; + _wp setWaypointBehaviour "COMBAT"; + _wp setWaypointCombatMode "RED"; + _wp setWaypointTimeout [1,1.1,1.2]; + _group setCurrentWaypoint _wp; + #ifdef blck_debugMode + _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"]; + #else + _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"]; + #endif + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + _marker = createMarker [format["GroupMarker%1",_group],_newPos]; + _group setVariable["wpMarker",_marker]; + _marker setMarkerColor "ColorBlue"; + _marker setMarkerText format["%1 %2",(_group getVariable["soldierType","null"]),_group]; + _marker setMarkerType "mil_triangle"; + //diag_log format["_fnc_setupWaypoints: configuring weapoints for group %2 mobile patrol with _soldierType = %1",_solderType,_group]; + diag_log format["_fnc_setupWaypoints: soldier type for mobile _group %1 set to %2",_group, (_group getVariable["soldierType","null"])]; + diag_log format["_fnc_setupWaypoints: all variables for the group have been set for group %1",_group]; + diag_log format["_fnc_setupWaypoints:: -- >> wpMode %1 _dir %2 _dis 3",_group getVariable["wpMode","random"], _dir, _dis]; + diag_log format["_fnc_setupWaypoints:: -- >> group to update is %1 and new position is %2",_group, _newPos]; + diag_log format["_fnc_setupWaypoints:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; + diag_log format["_fnc_setupWaypoints:: -- >> Waypoint marker for group %1 have been configured as %2 with text set to %3",_group, _group getVariable "wpMarker", markerText (_group getVariable "wpMarker")]; + }; + #endif +}; diff --git a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf index a73044c..d475164 100644 --- a/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf +++ b/@epochhive/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last modified 3/14/17 + Last modified 4/25/17 -------------------------- License @@ -16,30 +16,41 @@ private["_numbertospawn","_groupSpawned","_safepos","_weaponList","_useLauncher","_launcherType"]; -params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ]; -if (blck_debugLevel > 2) then +params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ]; +if (blck_debugLevel > 1) then { diag_log format["[blckeagls] _fnc_spawnGroup called parameters: _numai1 %1, _numbai2 %2, _skillLevel %3, _center %4",_numai1,_numai2,_skillLevel,_center]; }; //Spawns correct number of AI -if (_numai2 > _numai1) then { +if (_numai2 > _numai1) then +{ _numbertospawn = floor( (random (_numai2 - _numai1) + _numai1 ) ); } else { _numbertospawn = _numai2; }; #ifdef blck_debugMode -if (blck_debugLevel > 2) then +if (blck_debugLevel > 1) then { diag_log format["spawnGroup.sqf: _numbertospawn = %1",_numbertospawn]; }; #endif _groupSpawned = createGroup blck_AI_Side; +_groupSpawned setVariable["groupVehicle",objNull]; +#ifdef blck_debugMode +if (blck_debugLevel > 1) then +{ + diag_log format["spawnGroup.sqf: _groupSpawned = %1",_groupSpawned]; +}; +#endif if !(isNull _groupSpawned) then { + #ifdef blck_debugMode if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnGroup:: -- >> Group created = %1",_groupSpawned]}; - _groupSpawned setcombatmode blck_combatMode; + #endif + _groupSpawned setcombatmode "RED"; + _groupSpawned setBehaviour "COMBAT"; _groupSpawned allowfleeing 0; _groupSpawned setspeedmode "FULL"; _groupSpawned setFormation blck_groupFormation; @@ -81,10 +92,14 @@ if !(isNull _groupSpawned) then }; _groupSpawned selectLeader (units _groupSpawned select 0); // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]]; - [_pos,_minDist,_maxDist,_groupSpawned,"random",["MOVE","SAD"]] spawn blck_fnc_setupWaypoints; - + if (_configureWaypoints) then + { + [_pos,_minDist,_maxDist,_groupSpawned,"random","SAD","infantry"] spawn blck_fnc_setupWaypoints; + }; + //[_pos,_minDist,_maxDist,_groupSpawned,"random","SENTRY"] spawn blck_fnc_setupWaypoints; + //diag_log format["_fnc_spawnGroup: blck_fnc_setupWaypoints called for group %1",_groupSpawned]; #ifdef blck_debugMode - if (blck_debugLevel > 2) then + if (blck_debugLevel > 1) then { diag_log format["fnc_spawnGroup:: Group spawned was %1 with units of %2",_groupSpawned, units _groupSpawned]; }; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf index c0ffcfc..b79dbb4 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf @@ -6,7 +6,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last Modified 1-24-17 + Last Modified 4-11-17 -------------------------- License @@ -25,20 +25,11 @@ _fn_deleteObjects = { #endif { - if ((typeOf _x) isKindOf "LandVehicle") then - { - if !(_x getVariable["releasedToPlayers",false]) then - { - private _crew = crew _x; - { - [_x] call blck_fnc_deleteAI; - }forEach _crew; - }; - _x setVariable["blck_DeleteAt",0]; // Schedule it to be deleted by fnc_vehicleMonitor immediately - } else { - if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanUpObjects: -> deleting object %1",_x];}; - deleteVehicle _x; - }; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanUpObjects: -> deleting object %1",_x];}; + #endif + + deleteVehicle _x; } forEach _objects; }; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf index 8793c73..d008f72 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf @@ -16,11 +16,10 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_patrolVehicles",[]]]; - //diag_log format["_fnc_endMission: _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _aborted %4",_blck_localMissionMarker,_coords,_mission,_aborted]; - //uisleep 0.1; + params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_vehicles",[]]]; #ifdef blck_debugMode if (blck_debugLevel > 0) then { + diag_log format["_fnc_endMission: _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _aborted %4",_blck_localMissionMarker,_coords,_mission,_aborted]; diag_log format["_fnc_endMission: _aborted = %1",_aborted]; }; #endif @@ -28,7 +27,7 @@ private["_cleanupAliveAITimer","_cleanupCompositionTimer"]; if (blck_useSignalEnd && !_aborted) then { - diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0]; + //diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0]; [_crates select 0] spawn blck_fnc_signalEnd; #ifdef blck_debugMode @@ -67,22 +66,30 @@ // Using a variable attached to the crate rather than the global setting to be sure we do not fill a crate twice. // the "lootLoaded" loaded should be set to true by the crate filler script so we can use that for our check. { - diag_log format["_fnc_endMission: for crate %1 lootLoaded = %2",_x,_x getVariable["lootLoaded",false]]; + //diag_log format["_fnc_endMission: for crate %1 lootLoaded = %2",_x,_x getVariable["lootLoaded",false]]; if !(_x getVariable["lootLoaded",false]) then { // _crateLoot,_lootCounts are defined above and carry the loot table to be used and the number of items of each category to load [_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes; }; }forEach _crates; + { + private ["_v","_posnVeh"]; + _posnVeh = blck_monitoredVehicles find _x; // returns -1 if the vehicle is not in the array else returns 0-(count blck_monitoredVehicles -1) + if (_posnVeh >= 0) then + { + //diag_log format["_fnc_endMission: setting missionCompleted for vehicle %1 to %2",_x,diag_tickTime]; + (blck_monitoredVehicles select _posnVeh) setVariable ["missionCompleted", diag_tickTime]; + } else { + _x setVariable ["missionCompleted", diag_tickTime]; + blck_monitoredVehicles pushback _x; + }; + } forEach _vehicles; + [_mines] spawn blck_fnc_clearMines; //diag_log format["_fnc_endMission: (23) _objects = %1",_objects]; - [_objects, _cleanupCompositionTimer] spawn blck_fnc_addObjToQue; //diag_log format["_fnc_endMission:: (26) _blck_AllMissionAI = %1",_blck_AllMissionAI]; - { - _x setVariable["missionCompleted",diag_tickTime]; - _x setVariable["cleanupTimer",_cleanupAliveAITimer]; - } forEach _patrolVehicles; [_blck_AllMissionAI, (_cleanupAliveAITimer)] spawn blck_fnc_addLiveAItoQue; [_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf"; blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords]; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index 6f0550b..fcb650c 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -324,7 +324,7 @@ if (blck_useStatic && (_noEmplacedWeapons > 0)) then if !(_abort) then { _objects append (_temp select 0); - //_blck_AllMissionAI append (_temp select 1); + _blck_AllMissionAI append (_temp select 1); #ifdef blck_debugMode if (blck_debugLevel > 0) then @@ -352,7 +352,10 @@ if (_allowReinforcements) then temp = []; #ifdef blck_debugMode - diag_log format["[blckeagls] missionSpawner:: (268) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + if (blck_debugLevel > 1) then + { + diag_log format["[blckeagls] missionSpawner:: (268) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; #endif //params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"]; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf index 62cf534..c86198a 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf @@ -1,7 +1,7 @@ /* [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; - Last modified 3/20/17 + Last modified 4/27/17 By Ghostrider-DbD- -------------------------- @@ -23,7 +23,7 @@ _pos = []; _mode = "vector"; #ifdef blck_debugMode -diag_log "_fnc_spawnEmplacedWeaponArray start"; +//diag_log "_fnc_spawnEmplacedWeaponArray start"; #endif // Define _missionEmplacedWeapons if not already configured. @@ -32,7 +32,10 @@ if (_missionEmplacedWeapons isEqualTo []) then _mode = "world"; _missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius; #ifdef blck_debugMode - diag_log format["_fnc_spawnEmplacedWeaponArray: creating random spawn locations: _missionEmplacedWeaponsPositions = %1", _missionEmplacedWeaponPositions]; + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnEmplacedWeaponArray: creating random spawn locations: _missionEmplacedWeaponsPositions = %1", _missionEmplacedWeaponPositions]; + }; #endif { _static = selectRandom blck_staticWeapons; @@ -43,7 +46,10 @@ if (_missionEmplacedWeapons isEqualTo []) then }; #ifdef blck_debugMode -diag_log format["_fnc_spawnEmplacedWeaponArray:: starting static weapon spawner with _missionEmplacedWeapons = %1", _missionEmplacedWeapons]; +if (blck_debugLevel > 1) then +{ + diag_log format["_fnc_spawnEmplacedWeaponArray:: starting static weapon spawner with _missionEmplacedWeapons = %1", _missionEmplacedWeapons]; +}; #endif { @@ -55,26 +61,35 @@ diag_log format["_fnc_spawnEmplacedWeaponArray:: starting static weapon spawner }; #ifdef blck_debugMode - diag_log format["_fnc_spawnEmplacedWeaponArray: _coords = %1 | offset = %2 | final _pos = 53",_coords,_x select 1, _pos]; + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnEmplacedWeaponArray: _coords = %1 | offset = %2 | final _pos = 53",_coords,_x select 1, _pos]; + }; #endif // params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ]; - _empGroup = [(_x select 1),1,1,_aiDifficultyLevel,(_x select 1),1,2,_uniforms,_headGear] call blck_fnc_spawnGroup; - while {(count (waypoints _empGroup)) > 1} do - { - deleteWaypoint ((waypoints _empGroup) select 0); - }; + _empGroup = [(_x select 1),1,1,_aiDifficultyLevel,(_x select 1),1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; + + _empGroup setcombatmode "RED"; + _empGroup setBehaviour "COMBAT"; + [(_x select 1),0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints; if (isNull _empGroup) exitWith {_abort = _true}; #ifdef blck_debugMode - diag_log format["_fnc_spawnEmplacedWeaponArray:: typeName _empGroup = %1 and _empGroup = %2 and _x = %3",typeName _empGroup, _empGroup,_x]; + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnEmplacedWeaponArray:: typeName _empGroup = %1 and _empGroup = %2 and _x = %3",typeName _empGroup, _empGroup,_x]; + }; #endif // params["_vehType","_pos",["_clearInventory",true]]; _wep = [(_x select 0),[0,0,0],false] call blck_fnc_spawnVehicle; - + _empGroup setVariable["groupVehicle",_wep]; #ifdef blck_debugMode - diag_log format["_fnc_spawnEmplacedWeaponArray (23) spawnVehicle returned value of _wep = %1",_wep]; + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnEmplacedWeaponArray (23) spawnVehicle returned value of _wep = %1",_wep]; + }; #endif _wep setVariable["DBD_vehType","emplaced"]; @@ -87,24 +102,22 @@ diag_log format["_fnc_spawnEmplacedWeaponArray:: starting static weapon spawner _emplacedAI append _units; #ifdef blck_debugMode - diag_log format["_fnc_spawnEmplacedWeaponArray:: position of emplaced weapon = %1 and targetd position is %2",getPos _wep, _pos]; - diag_log format["_fnc_spawnEmplacedWeaponArray:: _gunner = %1 and crew _wep = %2",_gunner, crew _wep]; + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnEmplacedWeaponArray:: position of emplaced weapon = %1 and targetd position is %2",getPos _wep, _pos]; + diag_log format["_fnc_spawnEmplacedWeaponArray:: _gunner = %1 and crew _wep = %2",_gunner, crew _wep]; + }; #endif - - _wp = [_empGroup, 0]; - _wp setWaypointType "SENTRY"; - _wp setWaypointName "sentry"; - _wp setWaypointBehaviour "COMBAT"; - _wp setWaypointCombatMode "RED"; - _wp setWaypointTimeout [10000,11000,12000]; - _wp = _empGroup addWaypoint [_pos, 25]; - _wp setWaypointType "CYCLE"; + } forEach _missionEmplacedWeapons; -blck_missionVehicles append _emplacedWeps; +blck_monitoredVehicles append _emplacedWeps; _return = [_emplacedWeps,_emplacedAI,_abort]; #ifdef blck_debugMode -diag_log format["_fnc_spawnEmplacedWeaponArray:: returning with _return = _emplacedWeps = %1",_return]; +if (blck_debugLevel > 1) then +{ + diag_log format["_fnc_spawnEmplacedWeaponArray:: returning with _return = _emplacedWeps = %1",_return]; +}; #endif _return diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf index 0f34723..b54dace 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf @@ -47,7 +47,7 @@ }; #endif - _newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,3,18,_uniforms,_headGear] call blck_fnc_spawnGroup; + _newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,25,30,_uniforms,_headGear,true] call blck_fnc_spawnGroup; #ifdef blck_debugMode if (blck_debugLevel > 2) then @@ -63,7 +63,7 @@ else { _newAI = units _newGroup; - + blck_monitoredMissionAIGroups pushback _newGroup; #ifdef blck_debugMode if (blck_debugLevel > 2) then { @@ -72,6 +72,7 @@ #endif _blck_AllMissionAI append _newAI; + }; }; case 2: { @@ -93,7 +94,7 @@ } else { _adjusttedGroupSize = _unitsPerGroup; }; - _newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup; + _newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,15,25,_uniforms,_headGear] call blck_fnc_spawnGroup; if (isNull _newGroup) then { _abort = true; @@ -124,7 +125,7 @@ #endif - _newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup; + _newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,10,15,_uniforms,_headGear] call blck_fnc_spawnGroup; if (isNull _newGroup) then { _abort = true; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf index c692cee..30678fe 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf @@ -24,7 +24,12 @@ _objs = []; { _x params["_crateType","_crateOffset","_lootArray","_lootCounts"]; //_pos = [(_coords select 0)+(_crateOffset select 0),(_coords select 1) + (_crateOffset select 1),(_coords select 2)+(_crateOffset select 2)]; // calculate the world coordinates - diag_log format["_fnc_spawnMissionCrates: _crateType = %1 | _crateOffset = %2 | _lootArray = %3 | _lootCounts = %4",_crateType,_crateOffset,_lootArray,_lootCounts]; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnMissionCrates: _crateType = %1 | _crateOffset = %2 | _lootArray = %3 | _lootCounts = %4",_crateType,_crateOffset,_lootArray,_lootCounts]; + }; + #endif _pos = _coords vectorAdd _crateOffset; _crate = [_pos,_crateType] call blck_fnc_spawnCrate; _objs pushback _crate; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionHeli.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionHeli.sqf index bf028cb..6b532e8 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionHeli.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionHeli.sqf @@ -37,6 +37,8 @@ _grpPilot allowFleeing 0; private["_supplyHeli"]; //create helicopter and spawn it _supplyHeli = createVehicle [_chopperType, _spawnPos, [], 90, "FLY"]; +blck_monitoredVehicles pushback _supplyHeli; + [_supplyHeli] call blck_fnc_protectVehicle; /* if ([] call blck_fnc_getModType isEqualTo "Epoch") then @@ -68,18 +70,11 @@ diag_log format["_fnc_missionSpawner:: heli spawned and pilot added"]; #endif //set waypoint for helicopter -private["_wpDestination"]; -[_grpPilot, 0] setWPPos _coords; -[_grpPilot, 0] setWaypointType "MOVE"; -[_grpPilot, 0] setWaypointSpeed "FULL"; -[_grpPilot, 0] setWaypointBehaviour "CARELESS"; -[_grpPilot, 0] setWaypointCompletionRadius 30; -[_grpPilot, 0] setWaypointStatements ["true","[this, 0] setWaypointName ""done"" ;"]; -[_grpPilot,0] setWaypointTimeout [0.5,0.5,0.5]; -_grpPilot setCurrentWaypoint [_grpPilot,0]; +//params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ]; +[_coords,25,40,_grpPilot,"random","SAD","helicpoter"] spawn blck_fnc_setupWaypoints; #ifdef blck_debugMode diag_log format["_fnc_missionSpawner:: initial pilot waypoints set"]; #endif -_supplyHeli \ No newline at end of file +_supplyHeli diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf index 7a8e5a9..f82b21c 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf @@ -33,35 +33,42 @@ _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPosit { private ["_spawnPos"]; _spawnPos = _x; - _vehGroup = [_spawnPos,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup; + _vehGroup = [_spawnPos,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; if (isNull _vehGroup) exitWith { _abort = true; }; - - #ifdef blck_debugMode - if (blck_debugLevel > 2) then + if !(isNull _vehGroup) then { + blck_monitoredMissionAIGroups pushBack _vehGroup; + }; + + + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnMissionVehiclePatrols: group spawned = %1",_vehGroup]; diag_log format["_fnc_spawnMissionVehiclePatrols (40):: -> _missionType = %3 _vehGroup = %1 and units _vehGroup = %2",_vehGroup, units _vehGroup,_missionType]; }; #endif _randomVehicle = selectRandom blck_AIPatrolVehicles; - + #ifdef blck_debugMode - if (blck_debugLevel > 2) then + if (blck_debugLevel > 1) then { + diag_log format["_fnc_spawnMissionVehiclePatrols: _randomVehicle = %1",_randomVehicle]; diag_log format["_fnc_spawnMissionVehiclePatrols:: -> randomly selected vehicle = %1",_randomVehicle]; }; #endif //params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]]; - _patrolVehicle = [_coords,_spawnPos,_randomVehicle,30,45,_vehGroup] call blck_fnc_spawnVehiclePatrol; + _patrolVehicle = [_coords,_spawnPos,_randomVehicle,35,45,_vehGroup] call blck_fnc_spawnVehiclePatrol; #ifdef blck_debugMode - if (blck_debugLevel > 2) then + if (blck_debugLevel > 1) then { - diag_log format["_fnc_spawnMissionVehiclePatrols:: - > patrol vehicle spawned was %1",_patrolVehicle]; + diag_log format["_fnc_spawnMissionVehiclePatrols (65):: - > patrol vehicle spawned was %1",_patrolVehicle]; }; #endif @@ -72,7 +79,7 @@ _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPosit }; #ifdef blck_debugMode - if (blck_debugLevel > 2) then + if (blck_debugLevel > 1) then { diag_log format["_fnc_spawnMissionVehiclePatrols:: -- > _vehicles updated to %1",_vehicles]; }; @@ -80,7 +87,7 @@ _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPosit } forEach _vehiclePatrolSpawns; -blck_missionVehicles append _vehicles; +blck_monitoredVehicles append _vehicles; _return = [_vehicles, _missionAI, _abort]; _return diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf index 812ed19..65e95ed 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf @@ -2,7 +2,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last modified 3/20/17 + Last modified 4/29/17 checks the status of each entry in /* By Ghostrider-DbD- @@ -39,8 +39,12 @@ _readyToSpawnQue = []; _readyToSpawnQue pushback _x; }; } forEach blck_pendingMissions; -diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue = %1",_readyToSpawnQue]; - +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue = %1",_readyToSpawnQue]; +}; +#endif if (count _readyToSpawnQue > 0) then { _missionToSpawn = selectRandom _readyToSpawnQue; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/otl7_Mapper.sqf b/@epochhive/addons/custom_server/Compiles/Missions/otl7_Mapper.sqf index d0cc664..059edc8 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/otl7_Mapper.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/otl7_Mapper.sqf @@ -1,16 +1,7 @@ /* Pulled from Arma version of 11/9/16 - Modified by Ghostrider-DbD- - - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; params["_center","_azi","_objs","_setVector"]; @@ -53,4 +44,4 @@ _newObjs = []; _newObjs -_newObjs \ No newline at end of file +_newObjs diff --git a/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf b/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf index 7eed479..d4baf2c 100644 --- a/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf +++ b/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf @@ -27,17 +27,24 @@ _sunrise = _arr select 0; _sunset = _arr select 1; _time = dayTime; -diag_log format["_fnc_Time:: -- > _sunrise = %1 | _sunset = %2 | _time = %3",_sunrise,_sunset,_time]; + // blck_debugMode3 #ifdef blck_debugMode -diag_log "fnc_Time:: Debug settings ON"; +if (blck_debugLevel > 2) then +{ + diag_log "fnc_Time:: Debug settings ON"; + diag_log format["_fnc_Time:: -- > _sunrise = %1 | _sunset = %2 | _time = %3",_sunrise,_sunset,_time]; +}; #endif // Night if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith { setTimeMultiplier blck_timeAccelerationNight; #ifdef blck_debugMode - diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; + if (blck_debugLevel > 2) then + { + diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; + }; #endif }; @@ -45,14 +52,21 @@ if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith { if (_time > (_sunrise + 0.5) && _time < (_sunset - 0.5)) exitWith { setTimeMultiplier blck_timeAccelerationDay; #ifdef blck_debugMode - diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; + if (blck_debugLevel > 2) then + { + + diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; + }; #endif }; // default setTimeMultiplier blck_timeAccelerationDusk; #ifdef blck_debugMode -diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; +if (blck_debugLevel > 2) then +{ + diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; +}; #endif diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf index 95ef4e7..3060932 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf @@ -17,7 +17,14 @@ private ["_unit","_instigator","_group","_wp"]; //diag_log format["_EH_AIHit::-->> _this = %1",_this]; _unit = _this select 0 select 0; _instigator = _this select 0 select 3; -diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit]; + +#ifdef blck_debugMode +if (blck_debugLevel ? 1) then +{ + diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit]; +}; +#endif + if (!(alive _unit)) exitWith {}; if (!(isPlayer _instigator)) exitWith {}; [_unit,_instigator] call blck_fnc_alertNearbyLeader; @@ -33,9 +40,11 @@ if ((damage _unit) > 0.1 ) then { //diag_log format["_EH_AIHit::-->> Healing unit %1",_unit]; _unit setVariable["hasHealed",true,true]; - //_unit addMagazine "SmokeShellOrange"; - _unit fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShellRed"]; - _unit addItem "FirstAidKit"; - _unit action ["HealSoldierSelf", soldier1]; + _unit addMagazine "SmokeShellOrange"; + _unit fire "SmokeShellMuzzle"; + _unit addItem "FAK"; + _unit action ["HealSoldierSelf", _unit]; + _unit setDamage 0; + _unit removeItem "FAK"; }; diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf index 7a29daa..9671043 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf @@ -31,10 +31,12 @@ //_unit = _this select 0; //_mag = _this select 3 select 0; (_this select 0) addMagazine (_this select 3 select 0); +#ifdef blck_debugMode if (blck_debugON) then { //diag_log format["_EH_unitWeaponReloaded:: unit %1 reloaded weapon %2 with magazine %3",_this select 0, (_this select 3 select 0)]; //diag_log format["_EH_unitWeaponReloaded:: unit %1 currently has the following magazines 2",_this select 0,magazines (_this select 0)]; }; +#endif //if (blck_debugLevel > 2) then (diag_log format["_EH_unitWeaponReloaded:: one magazine of type %1 added to inventory of unit %2",_mag,_unit]; diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf index 6f8a3b6..0390861 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf @@ -47,13 +47,12 @@ for "_i" from 1 to (count blck_liveMissionAI) do diag_log format["_fnc_cleanupAliveAI:: deleting unit %1",_x]; diag_log format["_fnc_cleanupAliveAI:: vehicle _x = %1",vehicle _x]; diag_log format["_fnc_cleanupAliveAI:: objectParent _x = %1",objectParent _x]; - /* + if ((alive _x) && !(isNull objectParent _x)) then // mark the vehicle for deletion { - (vehicle _x) setVariable["blck_DeleteAt",diag_tickTime]; - diag_log format["_fnc_cleanupAliveAI:: deleteAt for vehicle _x = %1",(vehicle _x) getVariable["blck_DeleteAt",0]]; + diag_log format["_fnc_cleanupAliveAI: deleteing objectParent %1 [%3] for unit %2",objectParent _x, _x, typeName (objectParent _x), typeOf (objectParent _x)]; + [objectParent _x] call blck_fn_deleteAIvehicle; }; - */ [_x] call blck_fnc_deleteAI; }forEach (_units select 0); uiSleep 0.1; diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_cleanupDeadAI.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_cleanupDeadAI.sqf index d891542..e8c9867 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_cleanupDeadAI.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_cleanupDeadAI.sqf @@ -12,7 +12,7 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; #ifdef blck_debugMode -if (blck_debugLevel > 1) then {diag_log format["fnc_cleanupDeadAI called at time %1",diag_tickTime];}; +if (blck_debugLevel > 2) then {diag_log format["fnc_cleanupDeadAI called at time %1",diag_tickTime];}; #endif private["_aiList","_ai"]; diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf index 5377231..e8fcf9f 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf @@ -17,9 +17,10 @@ _launcher = _unit getVariable ["Launcher",""]; _legal = true; _fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equiped - params["_vk","_unit"]; + params["_unit","_vk"]; + private { - if (((position _x) distance (position _unit)) <= 350) then + if ( ( (getPos _vk) distance2d (getPos _x) ) < 500 ) then { _x reveal [_vk, 4]; _x dowatch _vk; @@ -33,7 +34,7 @@ _fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equi _x doFire _vk; }; }; - } forEach allUnits; + } forEach (call blck_fnc_allPlayers); }; _fn_applyVehicleDamage = { // apply a bit of damage @@ -60,10 +61,12 @@ if (typeOf _killer != typeOf (vehicle _killer)) then // AI was killed by a vehi if(_killer == driver(vehicle _killer))then{ // The AI was runover if(blck_RunGear) then { // If we are supposed to delete gear from AI that were run over then lets do it. [_unit] call _fn_deleteAIGear; - if (blck_debugON) then + #ifdef blck_debugMode + if (blck_debugLevel > 2) then { diag_log format["<<--->> Unit %1 was run over by %2",_unit,_killer]; }; + #endif }; if (blck_VK_RunoverDamage) then {//apply vehicle damage [vehicle _killer] call _fn_applyVehicleDamage; @@ -76,11 +79,12 @@ if (typeOf _killer != typeOf (vehicle _killer)) then // AI was killed by a vehi }; if ( blck_VK_GunnerDamage &&((typeOf vehicle _killer) in blck_forbidenVehicles or (currentWeapon _killer) in blck_forbidenVehicleGuns) ) then { - if (blck_debugON) then + #ifdef blck_debugMode + if (blck_debugLevel > 2) then { diag_log format["!!---!! Unit was killed by a forbidden vehicle or gun",_unit]; }; - + #endif if (blck_VK_Gear) then {[_unit] call _fn_deleteAIGear;}; [_unit, vehicle _killer] call _fn_targetVehicle; [vehicle _killer] call _fn_applyVehicleDamage; diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_decomissionAIVehicle.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_decomissionAIVehicle.sqf index 9c67703..cab77ef 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_decomissionAIVehicle.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_decomissionAIVehicle.sqf @@ -37,9 +37,9 @@ if (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") then // Deal w } forEach ["HitLFWheel","HitLF2Wheel","HitRFWheel","HitRF2Wheel","HitEngine","HitLBWheel","HitLMWheel","HitRBWheel","HitRMWheel","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun"]; _veh setVariable["blck_DeleteAt",diag_tickTime + 60]; } else { - if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: case of release vehicle = %1 to player with blck_missionVehicles = %2",_veh, blck_missionVehicles];}; - blck_missionVehicles = blck_missionVehicles - [_veh]; - if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: blck_missionVehicles updated to %1", blck_missionVehicles];}; + if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: case of release vehicle = %1 to player with blck_monitoredVehicles = %2",_veh, blck_monitoredVehicles];}; + blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; + if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: blck_monitoredVehicles updated to %1", blck_monitoredVehicles];}; [_veh] call blck_fnc_releaseVehicleToPlayers; }; }; diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf index 79f8cda..68347b4 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf @@ -15,8 +15,8 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; params["_v"]; - //diag_log format["_fnc_releastVehicletoPlayers.sqf: removing vehicle %1 from ",_v,blck_missionVehicles]; - //blck_missionVehicles = blck_missionVehicles - [_v]; + //diag_log format["_fnc_releastVehicletoPlayers.sqf: removing vehicle %1 from ",_v,blck_monitoredVehicles]; + //blck_monitoredVehicles = blck_monitoredVehicles - [_v]; _v removeAllEventHandlers "GetIn"; _v removeAllEventHandlers "GetOut"; _v removeAllEventHandlers "Fired"; diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_sendHeliHome.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_sendHeliHome.sqf index 2f5c5e5..908af48 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_sendHeliHome.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_sendHeliHome.sqf @@ -3,15 +3,7 @@ Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP License: Attribution-NonCommercial-ShareAlike 4.0 International Last Modified 1/23/17 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; - params["_grpPilot"]; private["_heli","_pilot"]; _pilot = (units _grpPilot) select 0; diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf index aa7dd08..5004a0f 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf @@ -80,6 +80,7 @@ if (!(isNull _grpPilot) && !(isNull _grpParatroops)) then #endif _patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"]; + _grpPilot setVariable["groupVehicle",_patrolHeli]; [_patrolHeli] call blck_fnc_protectVehicle; _patrolHeli setFuel 1; _patrolHeli engineOn true; @@ -163,96 +164,9 @@ if (!(isNull _grpPilot) && !(isNull _grpParatroops)) then }; //set waypoint for helicopter - private["_dir","_arc","_noWp","_wpradius","_newPos","_wp","_pos"]; - //set waypoint for helicopter - - _dir = 0; - _arc = 30; - _noWp = 1; - _wpradius = 30; - _wp = [_grpPilot, 0]; - _pos = getWPPos _wp; - _newPos = _pos getPos [(_minDis+(random (_maxDis - _minDis))), _dir]; - - #ifdef wpModeMove - _wp setWaypointType "MOVE"; - _wp setWaypointName "move"; - _wp setWaypointTimeout [1,1.1,1.2]; - _wp setWaypointStatements ["true","this call blck_fnc_setNextWaypoint;diag_log format['====Updating waypoint to for group %1',group this];"]; - #else - _wp setWaypointType "SAD"; - _wp setWaypointName "sad"; - _wp setWaypointTimeout [20,25,30]; - _wp setWaypointStatements ["true","this call blck_fnc_setNextWaypoint;diag_log format['====Updating waypointfor group %1',group this];"]; - #endif - - _wp setWaypointBehaviour "COMBAT"; - _wp setWaypointCombatMode "RED"; - //_wp setWaypointTimeout [1,1.1,1.2]; - _grpPilot setCurrentWaypoint _wp; - - // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]]; - //[_coords,2,10,_grpPilot,"random",["SENTRY"]] call blck_fnc_setupWaypoints; - - /* - _grpPilot setVariable["patrolCenter",_coords]; - _grpPilot setVariable["minDis",10]; - _grpPilot setVariable["maxDis",25]; - _grpPilot setVariable["timeStamp",diag_tickTime]; - _grpPilot setVariable["arc",0]; - _grpPilot setVariable["wpRadius",30]; - //_grpPilot setVariable["wpMode",_mode]; - - _dir = 0; - _arc = 30; - _noWp = 1; - _wpradius = 30; - _newPos = _pos getPos [(_minDis+(random (_maxDis - _minDis))), _dir]; - _wp = [_grpPilot, 0]; - - #ifdef wpModeMove - _wp setWaypointType "MOVE"; - _wp setWaypointName "move"; - _wp setWaypointTimeout [1,1.1,1.2]; - _wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;diag_log format['====Updating waypoint to SAD for group %1',group this];"]; - #else - _wp setWaypointType "SAD"; - _wp setWaypointName "sad"; - _wp setWaypointTimeout [20,25,30]; - _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;diag_log format['====Updating waypoint to Move for group %1',group this];"]; - #endif - - _wp setWaypointBehaviour blck_groupBehavior; - _wp setWaypointCombatMode blck_combatMode; - _grpPilot setCurrentWaypoint _wp; - */ - /* - for "_i" from 1 to 5 do - { - _pos = _coords getPos [15 + random (15), random(360)]; - if (_i == 1) then - { - _wp = [_grpPilot, 0]; - _wp setWPPos _pos; - } else { - _wp = _grpPilot addWaypoint [_pos, 25]; - }; - - _wp setWaypointType "SAD"; - _wp setWaypointSpeed "NORMAL"; - _wp setWaypointBehaviour "AWARE"; - //[_grpPilot, 0] setWaypointStatements ["true","[group this, 0] setCurrentWaypoint [group this,0];"]; - _wp setWaypointTimeout [20,30,40]; - _wp = _grpPilot addWaypoint [_coords,25]; - _wp setWaypointType "MOVE"; - _wp setWaypointBehaviour "AWARE"; - _wp setWaypointTimeout [1, 1.1, 1.2]; - }; - _wp = _grpPilot addWaypoint [_coords,25]; - _wp setWaypointType "CYCLE"; - _grpPilot setCurrentWaypoint [_grpPilot,0]; - */ + [_coords,30,35,_grpPilot,"random","SENTRY"] spawn blck_fnc_setupWaypoints; + blck_monitoredMissionAIGroups pushBack _grpPilot; #ifdef blck_debugMode if (blck_debugLevel > 1) then { @@ -262,7 +176,7 @@ if (!(isNull _grpPilot) && !(isNull _grpParatroops)) then diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop"; while {!isNull _patrolHeli} do { - uiSleep 10; + uiSleep 120; diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli]; diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli]; }; @@ -282,4 +196,4 @@ if (blck_debugLevel > 0) then }; #endif -_return; \ No newline at end of file +_return; diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf index d8b71db..c945751 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf @@ -91,8 +91,9 @@ if ( (random(1) < _chanceParatroops)) then _aborted = [_coords,_grpParatroops,_noPara,_skillAI,_weapons,_uniforms,_headGear,_heli] call blck_fnc_spawnParaUnits; //diag_log format["_fnc_spawnMissionParatroops: blck_fnc_spawnParaUnits returned a value of %1",_aborted]; }; - +#ifdef blck_debugMode diag_log format["_fnc_spawnMissionParatroops: _aborted = %1",_aborted]; +#endif if (_aborted) then { _return = [[],true]; diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaCrate.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaCrate.sqf index 01fd929..2198ec1 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaCrate.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaCrate.sqf @@ -89,4 +89,4 @@ _fn_monitorCrate = { }; [_crate,_chute] call _fn_monitorCrate; -[[_crate], 1200 /* 20 min*/] spawn blck_fnc_addObjToQue; \ No newline at end of file +[[_crate], 1200 /* 20 min*/] spawn blck_fnc_addObjToQue; diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaUnits.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaUnits.sqf index 042a319..810ef13 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaUnits.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaUnits.sqf @@ -30,6 +30,7 @@ if (isNull _paraGroup) then { _aborted = true; } else { + _paraGroup setVariable["groupVehicle",objNull]; _launcherType = "none"; private ["_arc","_spawnPos"]; _arc = 45; @@ -47,15 +48,26 @@ if (isNull _paraGroup) then _unit moveInDriver _chute; _unit allowDamage true; _dir = _dir + _arc; - diag_log format["_fnc_spawnParaUnits:: spawned unit %1, at location %2 and vehicle _unit %1",_unit,getPos _unit, vehicle _unit]; + + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnParaUnits:: spawned unit %1, at location %2 and vehicle _unit %1",_unit,getPos _unit, vehicle _unit]; + }; + #endif + uiSleep 2; }; _paraGroup selectLeader ((units _paraGroup) select 0); //params["_pos","_minDis","_maxDis","_group"]; - [_missionPos,10,20,_paraGroup] call blck_fnc_setupWaypoints; - + // [_pos,_minDist,_maxDist,_groupSpawned,"random","SAD"] spawn blck_fnc_setupWaypoints; + [_missionPos,20,30,_paraGroup,"random","SAD","paraUnits"] call blck_fnc_setupWaypoints; + blck_monitoredMissionAIGroups pushback _paraGroup; #ifdef blck_debugMode - diag_log "_fnc_spawnParaUnits (44): All Units spawned"; + if (blck_debugLevel > 1) then + { + diag_log "_fnc_spawnParaUnits (44): All Units spawned"; + }; #endif }; diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf index ef2dca9..013a10d 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf @@ -21,34 +21,43 @@ _uniforms = _this select 3; _headgear = _this select 4; private["_chanceHeliPatrol","_return","_temp","_missionHelis"]; - -if (blck_debugON) then {diag_log format["_fnc_spawnMissionReinforcements (25): Script Starting with _aiSkillsLevel = %1",_aiSkillsLevel]}; +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log format["_fnc_spawnMissionReinforcements (25): Script Starting with _aiSkillsLevel = %1",_aiSkillsLevel]}; +#endif _aiSkillsLevel = toLower _aiSkillsLevel; if (_aiSkillsLevel isEqualTo "blue") then { - if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (29): BLUE difficulty settings applied";}; + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (29): BLUE difficulty settings applied";}; + #endif _chanceHeliPatrol = blck_chanceHeliPatrolBlue; _missionHelis = blck_patrolHelisBlue; }; if (_aiSkillsLevel isEqualTo "green") then { - if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (34): GREEN difficulty settings applied";}; + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (34): GREEN difficulty settings applied";}; + #endif _chanceHeliPatrol = blck_chanceHeliPatrolGreen; _missionHelis = blck_patrolHelisGreen; }; if (_aiSkillsLevel isEqualTo "orange") then { - if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (39): ORANGE difficulty settings applied";}; + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (39): ORANGE difficulty settings applied";}; + #endif _chanceHeliPatrol = blck_chanceHeliPatrolOrange; _missionHelis = blck_patrolHelisOrange; }; if (_aiSkillsLevel isEqualTo "red") then { - if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (46): RED difficulty settings applied";}; + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (46): RED difficulty settings applied";}; + #endif _chanceHeliPatrol = blck_chanceHeliPatrolRed; _missionHelis = blck_patrolHelisRed; }; - +#ifdef blck_debugMode if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (50): Variables defined: _chanceHeliPatrol %1 | _missionHelis %2",_chanceHeliPatrol,_missionHelis];}; - +#endif if ( (_chanceHeliPatrol > 0) && (random (1) < _chanceHeliPatrol) ) then // if helipatrols are 'enabled' then paratroops will only drop if a heli spawns. // The chance that they drop is linked to the value for them for that difficulty _aiSkillsLevel //see _fnc_spannMissionParatroops for how this is handled. diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf index 06308c3..059f532 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf @@ -16,20 +16,20 @@ private["_veh","_modType"]; params["_vehType","_pos",["_clearInventory",true]]; #ifdef blck_debugMode -if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf: _vehType = %1 | _pos = %2",_vehType,_pos];}; +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1 | _pos = %2",_vehType,_pos];}; #endif _veh = createVehicle[_vehType, _pos, [], 0, "NONE"]; [_veh] call blck_fnc_protectVehicle; #ifdef blck_debugMode -if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf:: vehicle spawned is %1",_veh];}; +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf:: vehicle spawned is %1",_veh];}; #endif // params["_veh",["_clearInventory",true]]; [_veh,_clearInventory] call blck_fnc_configureMissionVehicle; #ifdef blck_debugMode -diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh]; +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];}; #endif _veh diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf index bec268c..4ae0985 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf @@ -25,23 +25,23 @@ params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_ //_maxDis = maximum distance from the center of the mission for vehicle waypoints //_groupForVehiclePatrol = The group with which to man the vehicle -#ifdef blck_debugMode -if (blck_debugLevel > 2) then +//#ifdef blck_debugMode +if (blck_debugLevel > 1) then { diag_log format["_fnc_spawnVehiclePatrol:: _center = %1 | _pos = %2 | _vehType = %3 | _group = %4",_center,_pos,_vehType,_group]; }; -#endif +//#endif if !(isNull _group) then { // exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnVehiclePatrol"; objNull;}; _veh = [_vehType,_pos] call blck_fnc_spawnVehicle; - - #ifdef blck_debugMode - if (blck_debugLevel > 2) then + _group setVariable["groupVehicle",_veh]; + //#ifdef blck_debugMode + if (blck_debugLevel > 1) then { diag_log format["spawnVehiclePatrol:: vehicle spawned is %1 of typeof %2",_veh, typeOf _veh]; }; - #endif + //#endif private["_unitNumber"]; _unitNumber = 0; @@ -56,6 +56,19 @@ if !(isNull _group) then _unitNumber = _unitNumber + 1; }forEach (units _group); + // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]]; + _group setcombatmode "RED"; + _group setBehaviour "COMBAT"; + [_center,_minDis,_maxDis,_group,"perimeter","SAD","vehicle"] spawn blck_fnc_setupWaypoints; +}; +//#ifdef blck_debugMode +if (blck_debugLevel > 1) then +{ + diag_log format["_fnc_spawnVehiclePatrol::->> _veh = %1",_veh]; +}; +//#endif +_veh + /* while {(count (waypoints _group)) > 0} do { deleteWaypoint ((waypoints _group) select 0); @@ -94,13 +107,9 @@ if !(isNull _group) then _wp = _group addWaypoint [_pos, 25]; _wp setWaypointType "CYCLE"; _group setVariable["wpIndex",0]; + }; -#ifdef blck_debugMode -if (blck_debugLevel > 1) then -{ - diag_log format["_fnc_spawnVehiclePatrol::->> _veh = %1",_veh]; -}; -#endif -_veh +*/ + diff --git a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf index dd86d2f..d2a0349 100644 --- a/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf +++ b/@epochhive/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf @@ -23,15 +23,14 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -_fn_removeVehicleFromVehicleMonitoring = { - params["_veh"]; - blck_missionVehicles = blck_missionVehicles - [_veh]; -}; +//diag_log "_fnc_vehicleMonitor: starting function"; +#ifdef blck_debugMode + //diag_log format["_fnc_vehicleMonitor:: blck_debugMode defined"]; +#endif _fn_releaseVehicle = { params["_v"]; - //diag_log format["vehicleMonitor.sqf: make vehicle available to players; stripping eventHandlers from _v %1",_v]; - [_v] call _fn_removeVehicleFromVehicleMonitoring; + blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; _v setVehicleLock "UNLOCKED" ; //_v setVariable["releasedToPlayers",true]; [_v] call blck_fnc_emptyObject; @@ -40,28 +39,19 @@ _fn_releaseVehicle = { } forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; #ifdef blck_debugMode - if (blck_debugLevel > 2) then + if (blck_debugLevel > 3) then { diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_v]; }; #endif }; -_fn_deleteAIvehicle = { - params["_veh"]; - { - _veh removeAllEventHandlers _x; - }forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear"]; - [_veh] call _fn_removeVehicleFromVehicleMonitoring; - deleteVehicle _veh; -}; - _fn_destroyVehicleAndCrew = { params["_veh"]; private["_crew"]; _crew = crew _veh; {[_x] call blck_fnc_deleteAI;} forEach _crew; - [_veh] call _fn_deleteAIvehicle; + [_veh] call blck_fn_deleteAIvehicle; }; _fn_reloadAmmo = { @@ -91,16 +81,30 @@ _fn_reloadAmmo = { } forEach _crew; }; }; - +blck_fn_deleteAIvehicle = { + params["_veh"]; + { + _veh removeAllEventHandlers _x; + }forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear"]; + blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; + deleteVehicle _veh; +}; private ["_veh","_vehList"]; -_vehList = blck_missionVehicles; +_vehList = +blck_monitoredVehicles; #ifdef blck_debugMode -if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function called at %1",diag_tickTime];}; +if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: function called at %1 with _vehList %2 and blck_monitoredVehicles %3",diag_tickTime,_vehList,blck_monitoredVehicles];}; #endif { _veh = _x; // (purely for clarity at this point, _x could be used just as well) + + #ifdef blck_debugMode + if (blck_debugLevel > 3) then + { + diag_log format["_fnc_vehicleMonitor: vehicle %1 with missionCompleted = %2 being evaluated",_x, _x getVariable"missionCompleted",0]; + }; + #endif private["_evaluate"]; _evaluate = true; // Case where vehicle has been marked for deletion after a certain time. @@ -118,7 +122,7 @@ if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function c if (blck_killEmptyStaticWeapons) then { #ifdef blck_debugMode - if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];}; + if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];}; #endif _veh setDamage 1; @@ -154,7 +158,7 @@ if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function c private["_cleanupTimer"]; _cleanupTimer = _veh getVariable["cleanupTimer",0]; // The time delat to deleting any alive AI units // "missionCompleted" = the time at which the mission was completed or aborted - if (diag_tickTime > (_cleanupTimer + (_veh getVariable["missionCompleted",0])) ) then + if (diag_tickTime > ((blck_AliveAICleanUpTimer - 70) + (_veh getVariable["missionCompleted",0])) ) then { [_veh] call _fn_destroyVehicleAndCrew; _evaluate = false; diff --git a/@epochhive/addons/custom_server/Compiles/blck_functions.sqf b/@epochhive/addons/custom_server/Compiles/blck_functions.sqf index 17235a7..3b1755c 100644 --- a/@epochhive/addons/custom_server/Compiles/blck_functions.sqf +++ b/@epochhive/addons/custom_server/Compiles/blck_functions.sqf @@ -81,12 +81,12 @@ blck_fnc_missionAIareDead = compileFinal preprocessFileLineNumbers "\q\addons\cu // Group-related functions blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units] -blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setWaypoints.sqf"; // Set default waypoints for a group +blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setupWaypoints.sqf"; // Set default waypoints for a group blck_fnc_missionGroupMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_missionGroupMonitor.sqf"; // Monitors active groups for those that are stuck in an SAD waypoint but not in combat blck_fnc_changeToSADWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSADWaypoint.sqf"; blck_fnc_changeToMoveWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToMoveWaypoint.sqf"; blck_fnc_changeToSentryWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSentryWaypoint.sqf"; // -blck_fnc_setNextWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setNextWaypoint.sqf"; +//blck_fnc_setNextWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setNextWaypoint.sqf"; blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"; // GMS_fnc_cleanEmptyGroups // Functions specific to vehicles, whether wheeled, aircraft or static diff --git a/@epochhive/addons/custom_server/Compiles/blck_variables.sqf b/@epochhive/addons/custom_server/Compiles/blck_variables.sqf index 9f3ae92..ffc71da 100644 --- a/@epochhive/addons/custom_server/Compiles/blck_variables.sqf +++ b/@epochhive/addons/custom_server/Compiles/blck_variables.sqf @@ -26,13 +26,12 @@ blck_locationBlackList = []; blck_monitoredVehicles = []; blck_livemissionai = []; blck_monitoredMissionAIGroups = []; // Used to track groups in active missions for whatever purpose -blck_liveMissionAIGroups = []; // Used to track groups assigned to completed missions for eventual cleanup. blck_oldMissionObjects = []; blck_pendingMissions = []; blck_missionsRunning = 0; blck_activeMissions = []; blck_deadAI = []; -blck_missionVehicles = []; + // Arrays for use during cleanup of alive AI at some time after the end of a mission DBD_HeliCrashSites = []; diff --git a/@epochhive/addons/custom_server/Configs/blck_configs.sqf b/@epochhive/addons/custom_server/Configs/blck_configs.sqf index 35ad685..9f1bfc6 100644 --- a/@epochhive/addons/custom_server/Configs/blck_configs.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_configs.sqf @@ -148,10 +148,10 @@ blck_chanceHeliPatrolRed = 0; // 0.4; blck_patrolHelisRed = _blck_littleBirds; - blck_chanceHeliPatrolGreen = 0.2; + blck_chanceHeliPatrolGreen = 0; blck_patrolHelisGreen = _blck_littleBirds; - blck_chanceHeliPatrolOrange = 0.5; + blck_chanceHeliPatrolOrange = 0; blck_patrolHelisOrange = _blck_littleBirds; //_blck_armed_hellcats+_blck_armed_orcas; diff --git a/@epochhive/addons/custom_server/init/blck_init.sqf b/@epochhive/addons/custom_server/init/blck_init.sqf index 84efc49..6c6164b 100644 --- a/@epochhive/addons/custom_server/init/blck_init.sqf +++ b/@epochhive/addons/custom_server/init/blck_init.sqf @@ -23,19 +23,22 @@ _blck_loadingStartTime = diag_tickTime; #include "\q\addons\custom_server\init\build.sqf"; diag_log format["[blckeagls] Loading version %1 Build %2",_blck_versionDate,_blck_version]; +#ifdef DBDserver +diag_log "[blckegls] Running DBD Clan Version"; +#endif call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf"; waitUntil {(isNil "blck_variablesLoaded") isEqualTo false;}; waitUntil{blck_variablesLoaded}; blck_variablesLoaded = nil; -if !(blck_debugON) then {uiSleep 60;}; +//if !(blck_debugON) then {uiSleep 60;}; // compile functions call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_functions.sqf"; waitUntil {(isNil "blck_functionsCompiled") isEqualTo false;}; waitUntil{blck_functionsCompiled}; blck_functionsCompiled = nil; -diag_log format["[blckeagls] debug mode settings:blck_debugON = %1",blck_debugON]; +diag_log format["[blckeagls] debug mode settings:blck_debugON = %1 blck_debugLevel = %2",blck_debugON,blck_debugLevel]; execVM "\q\addons\custom_server\Configs\blck_configs.sqf"; waitUntil {(isNil "blck_configsLoaded") isEqualTo false;}; @@ -61,28 +64,40 @@ blck_worldSet = nil; diag_log "[blckeagls] Loading Mission Lists"; #include "\q\addons\custom_server\Missions\GMS_missionLists.sqf"; +#ifdef DBDserver +//start the dynamic loot crate system +[] execVM "\q\addons\custom_server\DLS\DLS_init.sqf"; +waitUntil {(isNil "blck_DLSComplete") isEqualTo false;}; +waitUntil{blck_DLSComplete}; +blck_DLSComplete = nil; +#endif + // Load any user-defined specifications or overrides call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf"; diag_log format["[blckeagls] version %1 Build %2 Loaded in %3 seconds",_blck_versionDate,_blck_version,diag_tickTime - _blck_loadingStartTime]; //,blck_modType]; diag_log format["blckeagls] waiting for players to join ---- >>>>"]; -if (!blck_debugON || (blck_debugLevel isEqualTo 0)) then + +if !(blck_debugON || (blck_debugLevel isEqualTo 0)) then { waitUntil{{isPlayer _x}count playableUnits > 0}; + diag_log "[blckeagls] Player Connected, spawning missions"; +} else { + diag_log "[blckeagls] spawning Missions"; }; -diag_log "[blckeagls] Player Connected, loading mission system"; if (blck_spawnStaticLootCrates) then { // Start the static loot crate spawner + diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner Started"; [] execVM "\q\addons\custom_server\SLS\SLS_init.sqf"; waitUntil {(isNil "blck_SLSComplete") isEqualTo false;}; waitUntil{blck_SLSComplete}; blck_SLSComplete = nil; + diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner Done"; }else{ diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner disabled"; }; -blck_spawnStaticLootCrates = nil; //Start the mission timers if (blck_enableOrangeMissions > 0) then @@ -105,6 +120,26 @@ if (blck_enableBlueMissions > 0) then //[_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue] spawn blck_fnc_missionTimer;//Starts minor mission system (Blue Map Markers) [_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue,blck_enableBlueMissions] call blck_fnc_addMissionToQue; }; +#ifdef DBDserver +if (blck_enableScoutsMissions > 0) then +{ + //[_missionListScouts,_pathScouts,"ScoutsMarker","red",blck_TMin_Scouts,blck_TMax_Scouts] spawn blck_fnc_missionTimer; + [_missionListScouts,_pathScouts,"ScoutsMarker","red",blck_TMin_Scouts,blck_TMax_Scouts,blck_enableScoutsMissions, false] call blck_fnc_addMissionToQue; +}; +if (blck_enableHunterMissions > 0) then +{ + //[_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter] spawn blck_fnc_missionTimer; + // params["_missionList","_path","_marker","_difficulty","_tMin","_tMax","_noMissions"]; + [_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter,blck_enableHunterMissions, false] call blck_fnc_addMissionToQue; +}; + +// Running new version of Crash sites. +if (blck_maxCrashSites > 0) then +{ + [] execVM "\q\addons\custom_server\Missions\HeliCrashs\Crashes2.sqf"; +}; +#endif // start the main thread for the mission system which monitors missions running and stuff to be cleaned up [] spawn blck_fnc_mainThread; +diag_log "[blckeagls] Mission spawner started"; \ No newline at end of file diff --git a/@epochhive/addons/custom_server/init/build.sqf b/@epochhive/addons/custom_server/init/build.sqf index 9a44da3..d2e3fcf 100644 --- a/@epochhive/addons/custom_server/init/build.sqf +++ b/@epochhive/addons/custom_server/init/build.sqf @@ -1,15 +1,3 @@ -/* - By Ghostrider-DbD - Last Modified 4-11-17 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; - private ["_version","_versionDate"]; -_blck_version = "6.58 Build 53"; -_blck_versionDate = "4-11-17 8:00 PM"; +_blck_version = "6.58 Build 57"; +_blck_versionDate = "4-30-17 8:00 PM"; diff --git a/FAQ.txt b/FAQ.txt index e8f54d5..c0bcc80 100644 --- a/FAQ.txt +++ b/FAQ.txt @@ -1,11 +1,18 @@ -Core Mission System. +This addon includes several modules which will be discussed in the following order: +1. The core, dynamic mission system +2. A static mission system (WIP) +3. A custom time acceleration module +4. A module to execute scripts for custom bases and so forths. +5. A module to spawn loot crates in specific locations at server startup. + +1. Core Mission System. The core mission system is configured to run 4 different classes of mission (Blue, Red, Green and Orange) simultaneously. Reducing value for ...\custom_serer\configs\blck_configs.sqf\blck_maxSpawnedMissions will reduce the number of missions running on the server. -General settings include the ability set whether and how messages to players regarding missions spawned or completed are displayed, +General settings include: + the ability set whether and how messages to players regarding missions spawned or completed are displayed, whether and how messages to players regarding killed AI are displayed - Number of AI groups; Number of AI per group; AI skills; @@ -13,7 +20,12 @@ General settings include the ability set whether and how messages to players reg Number and type of armed vehicle patrols. Presence of AI helicopter patrols. Whether such patrols drop AI reinforcements. - + Whether vehicles are destroyed when AI are killed + Whether static weapons are destroyed when AI are killed. + Whether AI spawn with NVG or launchers and what types they spawn with. + Whether NVG or launchers are deleted. + Whether players are penalized for running over AI. + Loot can also be configured for each mission class. You can modify the number of weapons, magazines, items, construction materials, etc. You can also adjust the choices for each of these types of items. The equipment selected for each class of mission can also be specified. @@ -23,7 +35,7 @@ General settings include the ability set whether and how messages to players reg Where possible, I have tried group weapons based on desirability from low rank (5.56 ammo) to high rank (7.6 caliber or larger, large bore sniper, heavy LMG) then combine these groups to define parameters as needed. -The missions themselves are spawned from templates which can be used to define: +The missions themselves are spawned from templates which can be used to define most aspects of the missions including: the messages sent to players; text used to label the mark type of marker used to label the map @@ -45,12 +57,13 @@ Performance considerations. At present, missions do not actually spawn objects or players untill a player is within the trigger distance (1000 M). Hence, performance penalties should be modest to none until players engage a mission. There is some performance penalty to having a lot of dead AI on the server, or a lot of spawned objects used for scenery at AI missions. Hence, these are deleted after a certain time. +You can shorten the time after which bodies or scenery are deleted if you believe performance is an issue. -Static Mission System (WIP). +2. Static Mission System (WIP). Additional Modules Available: -1. Time Acceleration +3. Time Acceleration This provides an optional ability to accelerate time by user-specified factors. The time acceleration can be specified for night, daytime and dusk. @@ -63,7 +76,7 @@ Variables controlling the time acceleration module are located in ...\custom_ser Note that map/mod specific settings can be specified in blck_custom_config.sqf if that is helpful. -2. Map Addons +4. Map Addons This module allows you to load map-addons (custom bases, enhancements to villages or towns, ATMs at traders etc) but to do so in a way that is map and mod-specific. I use it to manage the map addons we run on multiple different Arma servers. @@ -74,18 +87,18 @@ blck_spawnMapAddons = false; You can define which addons you wish to load in ...\custom_server\MapAddons\MapAddons_init.sqf. -3. Static Loot System +5. Static Loot System This module spawns loot crates at pre-specified locations on the ground, inside buildings or on roofs. It is designed to function in conjunction with the Map Addons module if you wish it to. It was derived from the loot crate spawner originally released by DarthRogue but has been extensively revised. -One enhancement is that I have written the code so that you do not need to sort items by there arma type (weapon, magazine, item). +One enhancement is that I have written the code so that you do not need to sort items by their arma type (weapon, magazine, item). In any event, it is a great tool for placing loot chests at AI strongholds or static missions. Some basic features are: Crates can be spawned at precise locations with / without a nearby smoking wreck to mark their location (which crates an apololyptic feel). Crates can be loaded with one of 3 different loadouts (add more if you like) which can be specified or randomly determined. -If the number of possible spawn locations is greater than the number of crates to spawned, spawn locations will be randomly chosen giving some variation to your mission. +If the number of possible spawn locations is greater than the number of crates to spawned, spawn locations will be randomly chosen giving some variation to your mission from one server restart to the next. The static loot crate spawner is enabled/disable by changing the following variable in ...\custom_server\configs\blck_configs.sqf @@ -94,6 +107,4 @@ The static loot crate spawner is enabled/disable by changing the following varia I wrote the crate spawner in a way that helps me manage static loot crates across multiple maps and mods. The configuration files for Epoch or Exile give examples of how to implement the system. -Known issues -1. diff --git a/INSTALLATION.txt b/INSTALLATION.txt index 4bfae1f..924d42a 100644 --- a/INSTALLATION.txt +++ b/INSTALLATION.txt @@ -17,22 +17,14 @@ Installation: ///////////////////////// // Battleye Exceptions -9) update the scripts.txt file in the Battleye directory in your server directory as directed below. +More to come on this. +Please see the links below for some how-to's and two useful tools to automate adding appropriate exceptions: -7 deletemarker - - !"_MainMarker - -7 setMarker - !"_MainMarker" - -7 createMarker - !"_MainMarker" -10) Add the following to publicvariable.txt - !="blck_Message" - -11) Merge the following into addbackpackcargo.txt - !"B_Kitbag_(cbr|mcamo|rgr|sgg)" !"B_Bergen_(mcamo|dgtl|hex|tna)_F" !"ViperHarness_(blk|ghex|hex|khk|oli)_F" !"ViperLightHarness_(blk|ghex|hex|khk|oli)_F" !"B_Carryall_(cbr|khk|mcamo|ocamo|oli|oucamo|hex|ghex)" !"B_AssaultPack_(cbr|dgtl|khk|mcamo|ocamo|rgr|sgg|blk)" !"B_FieldPack_(blk|cbr|khk|ocamo|oli|oucamo)" !"B_TacticalPack_(blk|mcamo|ocamo|oli|rgr)" +http://opendayz.net/threads/a-guide-to-battleye-filters.21066/ +https://epochmod.com/forum/topic/29736-all-you-need-to-know-about-be-filters-but-were-too-lazy-to-google/ +http://www.exilemod.com/topic/9779-releasetool-bem-battleye-filter-manager-by-themeq/ +http://www.exilemod.com/topic/9256-battleye-filter-tool/ +http://www.exilemod.com/topic/9708-battleye-filter-editor/ 12) To permit you to loot crypto from dead AI on Epoch, Open Epoch.\epoch_config\CfgObjectInteractions.hpp diff --git a/README.md b/README.md index 1e15b78..cfb7c14 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Blckegls mission system Ver 6.58 -Build 54 +Build 57 Included is an updated version of blckeagls mission system. This began as an effort to fix bugs in and upgrade version 2.0.2 as updated by Narines and has now evolved to a complete reworking of almost all code. diff --git a/changeLog.sqf b/changeLog.sqf index d00d165..baf34e1 100644 --- a/changeLog.sqf +++ b/changeLog.sqf @@ -4,14 +4,25 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2 Contributions by Narines: bug fixes, testing, infinite ammo fix. Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. -4/6/17 Version 6.58 Build 54 +4/29/17 Version 6.58 Build 57 [Added] A FAQ presenting an overview of the mission system and addons. -[Changed] Helicopter crew waypoint system reverted to that from Build 46. +[Added] Optional helicopter patrols that drop paratroops. These can be configured using variables in blck_configs.sqf: + + For example, settings for the blue difficulty for missions are shown below. + + blck_chanceParaBlue = 0.1; // [0 - 1] set to 0 to deactivate and 1 to always have paratroops spawn over the center of the mission. + blck_noParaBlue = 3; // [1-N] + +[Changed] A new method for dynamically setting waypoints was added and waypoints are now scanned to detect and correct the case that AI get 'stuck', meaning the waypoint is never completed. +[Changes] AI behaviors should be more agressive. +[Changed] License information added to all files. +[Added] Preprocessor definitions included in all files. [Fixed] Mission timouts would prevent new missions from spawning after a while. [Fixed] blck_timeAcceleration now determines if time acceleration is activated. [Fixed] Missions did not complete correctly under certain circumstances. [Fixed] Mission vehicles were not properly deleted, unlocked or otherwise handled at misison end or when AI crew were killed. [Fixed] Throws errors when evaluating errors related to certain disallowed types of kills. +[Fixed] Static loot crate spawner spawned empty crates under some circumstances. Known errors: throws errors with certain loot crate setups (Exile) 3/23/17 Verision 6.58 build 48