Added reinforcements. Many fixes. See Changelog for details.

This commit is contained in:
Ghostrider-DbD- 2017-03-18 06:45:32 -04:00
parent 23b9567aab
commit cc96a77aa0
53 changed files with 1375 additions and 789 deletions

View File

@ -14,5 +14,5 @@ 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;
//if (blck_debugLevel > 2) then {diag_log "_fnc_cleanEmptyGroups:: -- >> exiting function";};
if (blck_debugLevel > 2) then {diag_log "_fnc_cleanEmptyGroups:: -- >> exiting function";};

View File

@ -16,4 +16,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;
}forEach _traderCites;

View File

@ -8,7 +8,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
//#define DBDserver 1
diag_log format["starting _fnc_mainThread with time = %1",diag_tickTime];
@ -46,7 +46,7 @@ while {true} do
[] call blck_fnc_cleanupObjects;
[] call blck_fnc_cleanupDeadAI;
[] call blck_fnc_spawnPendingMissions;
[] call blck_fnc_missionGroupMonitor;
//[] call blck_fnc_missionGroupMonitor;
if (_modType isEqualTo "Epoch") then
{
[] call blck_fnc_cleanEmptyGroups;

View File

@ -3,7 +3,7 @@
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last modified 3/14/17
Last modified 3/17/17
--------------------------
License
@ -12,10 +12,10 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_dir","_arc","_noWp","_newpos","_wpradius","_wp"];
params["_pos","_minDis","_maxDis","_group",["_mode","random"]];
private["_dist","_dir","_arc","_xpos","_ypos","_newpos","_wpradius","_wpnum","_oldpos"];
params["_pos","_minDis","_maxDis","_group"];
/*
_pos = _this select 0; // center of the patrol area
@ -24,33 +24,30 @@ _maxDis = _this select 2; // maximum distance from the center of a patrol area f
_group = _this select 3;
*/
_group setVariable["patrolCenter",_pos];
_group setVariable["minDis",_minDis];
_group setVariable["maxDis",_maxDis];
_group setVariable["timeStamp",diag_tickTime];
_group setVariable["arc",0];
_group setVariable["wpRadius",30];
_group setVariable["wpMode",_mode];
_dir = 0;
_arc = 30;
_noWp = 1;
_wpradius = 30;
_newPos = _pos getPos [(_minDis+(random (_maxDis - _minDis))), _dir];
_wp = [_group, 0];
_wpnum = 6;
_oldpos = _pos;
_newpos = _oldpos;
_dir = random 360;
_arc = 360/_wpnum;
//Set up waypoints for our AI
for [{ _x=1 },{ _x < _wpnum },{ _x = _x + 1; }] do {
_dir = _dir + _arc;
if (_dir > 360) then {_dir = _dir - 360;};
while{_oldpos distance2D _newpos < 20}do{
sleep .1;
#ifdef wpModeMove
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_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 setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;diag_log format['====Updating waypoint to Move for group %1',group this];"];
#endif
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [1,1.1,1.2];
_group setCurrentWaypoint _wp;
_dist = (_minDis+(random (_maxDis - _minDis)));
_xpos = (_pos select 0) + sin (_dir) * _dist;
_ypos = (_pos select 1) + cos (_dir) * _dist;
_newpos = [_xpos,_ypos,0];
};
_oldPos = _newpos;
_wp = _group addWaypoint [[_xpos,_ypos,0], _wpradius];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointName "move";
};
_wp = _group addWaypoint [[_xpos,_ypos,0], _wpradius];
_wp setWaypointType "CYCLE";

View File

@ -12,7 +12,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_numbertospawn","_groupSpawned","_safepos","_weaponList","_useLauncher","_launcherType"];

View File

@ -17,7 +17,15 @@
by Ghostrider-DbD-
11/14/16
--------------------------
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["_loadout","_crate",["_addAmmo",0]];

View File

@ -8,7 +8,15 @@
if _item is an array with 3 elements ["itemName",2,6] assume that the first element is the item name (string), the second the min # to add and the third the max # to add.
by Ghostrider-DbD-
11/14/16
--------------------------
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["_itemInfo","_crate",["_addAmmo",0]];

View File

@ -4,10 +4,18 @@
by Ghostrider-DbD-
Last modified 3-13-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";
//diag_log format["_fnc_addLiveAIToQue:: -> when called, blck_liveMissionAI = %1",blck_liveMissionAI];
params["_aiGroupsList","_timeDelay"];
//diag_log format["_fnc_addLiveAIToQue:: -->> _aiList = %1 || _timeDelay = %2 || diag_tickTime %3",_aiGroupsList,_timeDelay, diag_tickTime];
blck_liveMissionAIGroups pushback [_aiGroupsList, (diag_tickTime + _timeDelay)];
params["_aiList","_timeDelay"];
//diag_log format["_fnc_addLiveAIToQue:: -->> _aiList = %1 || _timeDelay = %2",_aiList,_timeDelay];
blck_liveMissionAI pushback [_aiList, (diag_tickTime + _timeDelay)];
//diag_log format["_fnc_addLiveAIToQue:: -> blck_fnc_addLiveAI updated to %1",blck_liveMissionAI];

View File

@ -3,7 +3,15 @@
by Ghostrider-DbD-
Last modified 1-21-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 _mission = _this;
//diag_log format["_fnc_addMissionToQue:: -- >> _mission - %1",_mission];

View File

@ -4,7 +4,15 @@
by Ghostrider-DbD-
Last modified 10-14-16
--------------------------
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["_objList","_timeDelay"];
//diag_log format["_fnc_addObjToQue:: -- >> _objList = %1 || _timeDelay = %2",_objList,_timeDelay];

View File

@ -7,7 +7,15 @@
By Ghostrider-DBD-
Copyright 2016
Last Modified 1-24-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";
_fn_deleteObjects = {
params["_objects"];

View File

@ -4,7 +4,16 @@
By Ghostrider-DBD-
Copyright 2016
Last Modified 8-13-16
*/
--------------------------
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 ["_mines"];
//_mines = _this select 0; // array containing the mines to be deleted
//diag_log format["deleting %1 mines----- >>>> ", count _mines];

View File

@ -1,29 +1,47 @@
/*
[_mines,_objects,_blck_AllMissionAIGroups,_endMsg,_blck_localMissionMarker,_coords,_mission] call blck_fnc_endMission;
[_mines,_objects,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission] call blck_fnc_endMission;
schedules deletion of all remaining alive AI and mission objects.
Updates the mission que.
Updates mission markers.
By Ghostrider-DbD-
3/13/17
*/
3/17/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["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false]];
private["_cleanupAliveAITimer","_cleanupCompositionTimer"];
if (blck_useSignalEnd) then
{
//diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0];
[_crates select 0] spawn blck_fnc_signalEnd;
if (blck_debugLevel > 1) then
if (blck_debugLevel > 2) then
{
diag_log format["[blckeagls] _fnc_endMission:: (18) SignalEnd called: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
};
params["_mines","_objects","_blck_AllMissionAIGroups","_endMsg","_blck_localMissionMarker","_coords","_mission"];
if (_aborted) then
{
_cleanupCompositionTimer = 0;
_cleanupAliveAITimer = 0;
} else {
_cleanupCompositionTimer = blck_cleanupCompositionTimer;
_cleanupAliveAITimer = blck_AliveAICleanUpTimer;
};
[_mines] spawn blck_fnc_clearMines;
//diag_log format["_fnc_endMission: (23) _objects = %1",_objects];
[_objects, (blck_cleanupCompositionTimer)] spawn blck_fnc_addObjToQue;
//diag_log format["_fnc_endMission:: (26) _blck_AllMissionAIGroups = %1",_blck_AllMissionAIGroups];
[_blck_AllMissionAIGroups, blck_AliveAICleanUpTimer] spawn blck_fnc_addLiveAItoQue;
[_objects, (_cleanupCompositionTimer)] spawn blck_fnc_addObjToQue;
//diag_log format["_fnc_endMission:: (26) _blck_AllMissionAI = %1",_blck_AllMissionAI];
[_blck_AllMissionAI, (_cleanupAliveAITimer)] spawn blck_fnc_addLiveAItoQue;
[["end",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
[_blck_localMissionMarker select 1, _markerClass] execVM "debug\missionCompleteMarker.sqf";
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";

View File

@ -5,7 +5,15 @@
Copyright 2016
Last Modified 11-11-16
Fill a crate with items
--------------------------
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["_a1","_item","_diff"];
params["_crate","_boxLoot","_itemCnts"];

View File

@ -12,9 +12,8 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
private ["_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAIGroups","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"];
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private ["_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"];
params["_coords","_mission"];
////////
@ -40,40 +39,7 @@ if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
if (isNil "_timeOut") then {_timeOut = -1;};
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
if (isNil "_chanceReinforcements") then
{
_chanceReinforcements = 0;
_noPara = 0;
_reinforcementLootCounts = [0,0,0,0,0,0];
_chanceHeliPatrol = 0;
_chanceLoot = 0;
}; // Set this value in your mission template if you would like to overide the default here.
if (isNil "_noPara") then {_noPara = 0};
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = 0;};
if (isNil "_chanceLoot") then {_chanceLoot = 0};
if (isNil "_heliCrew") then {_heliCrew = 3};
if (isNil "_reinforcementLootCounts") then
{
private["__weap","_mags","_backpacks","_optics","_loadout"];
_weap = 2 + floor(random(4));
_mags = 5 + floor(random(6));
_backpacks = 1 + floor(random(2));
_optics = 1 + floor(random(6));
_loadout = 1 + floor(random(3));
_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks];
if (blck_debugLevel > 1) then {diag_log "missionSpawner:: default values used for _reinforcementLootCounts";};
}
else
{
if (blck_debugLevel > 1) then {diag_log "missionSpawner (47):: Mission specific values used for _reinforcementLootCounts";};
};
if (blck_debugLevel > 1) then {
diag_log format["[blckEagle] Mission Reinforcement Parameters: changeReinforcements %1 numAI %2 changePatrol %3 chanceLoot %4",_chanceReinforcements,_noPara,_chanceHeliPatrol,_chanceLoot];
};
private["_useMines","_abortMissionSpawner","_blck_AllMissionAIGroups","_delayTime","_groupPatrolRadius"];
private["_useMines","_abortMissionSpawner","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
if (isNil "_useMines") then {_useMines = blck_useMines;};
_objects = [];
@ -81,7 +47,7 @@ _mines = [];
_crates = [];
_aiGroup = [];
_missionAIVehicles = [];
_blck_AllMissionAIGroups = [];
_blck_AllMissionAI = [];
_AI_Vehicles = [];
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
_delayTime = 1;
@ -209,17 +175,19 @@ uiSleep _delayTime;;
[_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
uiSleep _delayTime;
private ["_infantryGroups"];
_infantryGroups = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
//diag_log format["missionSpawner:: (201) -> _infantry = %1",_infantry];
_blck_AllMissionAIGroups append _infantryGroups;
private ["_infantry"];
[_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
//_blck_AllMissionAI append (_infantry select 0);
/*
if (_infantry select 1) exitWith // something went wrong spawning groups, abort.
{
[_mines,_objects,_crates_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
};
*/
uiSleep _delayTime;
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (210) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
diag_log format["[blckeagls] missionSpawner:: (189) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
uisleep _delayTime;
@ -229,7 +197,13 @@ if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
_veh = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
//diag_log format["missionSpawner :: (219) _veh = %1",_veh];
_objects append (_veh select 0);
_blck_AllMissionAIGroups append (_veh select 1);
_blck_AllMissionAI append (_veh select 1);
/*
if (_veh select 2) exitWith // somethen went wrong
{
[_mines,_objects,_crates_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
}
*/
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] missionSpawner:: (225) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
@ -244,19 +218,22 @@ if (blck_useStatic && (_noEmplacedWeapons > 0)) then
_temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
//diag_log format ["missionSpawner:: (246) value returned for _temp = %1",_temp];
_objects append (_temp select 0);
_blck_AllMissionAIGroups append (_temp select 1);
};
if (blck_enableReinforcements && (random(1) < _chanceReinforcements)) then
{
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
if (blck_debugLevel > 0) then
_blck_AllMissionAI append (_temp select 1);
/*
if (_temp select 2) exitWith // something went wrong
{
diag_log format["[blckeagls] missionSpawner:: calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
[_mines,_objects,_crates_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
};
*/
};
blck_monitoredMissionAIGroups append _blck_AllMissionAIGroups; // so that we can monitor the status of the groups in the missions.
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
_reinforcement = [];
diag_log format["[blckeagls] missionSpawner:: calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
//params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"];
_reinforcement = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear] call blck_fnc_spawnMissionReinforcements;
//if (typeName _reinforcement isEqualTo "ARRAY") then {diag_log format["_fnc_missionSpawner (253): blck_fnc_spawnMissionReinforcements returned value of %1",_reinforcement];};
//blck_monitoredMissionAI append _blck_AllMissionAI; // so that we can monitor the status of the groups in the missions.
// Trigger for mission end
//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition];
@ -279,8 +256,8 @@ while {_missionComplete isEqualTo -1} do
{
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300};
if ((_endIfPlayerNear) && [_coords,10,true] call blck_fnc_playerInRange) exitWith {};
if ((_endIfAIKilled) && [_blck_AllMissionAIGroups] call blck_fnc_missionAIareDead ) exitWith {};
//diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAIGroups];
if ((_endIfAIKilled) && [_blck_AllMissionAI] call blck_fnc_missionAIareDead ) exitWith {};
//diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI];
uiSleep 2;
};
@ -297,6 +274,6 @@ if (blck_debugLevel > 1) then
[_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes;
};
}forEach _crates;
[_mines,_objects,_blck_AllMissionAIGroups,_endMsg,_blck_localMissionMarker,_coords,_mission] call blck_fnc_endMission;
[_mines,_objects,_crates_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,false] call blck_fnc_endMission;
diag_log format["[blckeagls] missionSpawner:: (292)end of mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];

View File

@ -7,7 +7,16 @@
_lootarray
by Ghostrider-DbD-
1/9-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["_weaponList","_missionColor"];
_missionColor = _this select 0;
@ -18,4 +27,4 @@ switch (_missionColor) do {
case "orange": {_weaponList = blck_WeaponList_Orange;};
default {_weaponList = blck_WeaponList_Blue;};
};
_weaponList
_weaponList

View File

@ -3,6 +3,15 @@
// by Ghostrider-DBD- based on code from Wicked AI for Arma 2 Dayz Epoch
// Last modified 8/2/15
/////////////////////////////////////////////////////
/*
--------------------------
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 ["_start","_bbr","_p1","_p2","_maxHeight","_signalCrate","_smokeShell","_light","_lightSource"];
params["_crate",["_time",60]];

View File

@ -4,7 +4,16 @@
By Ghostrider-DBD-
Copyright 2016
Last updated 8-14-16
--------------------------
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 ["_objs","_wreckSelected","_smokeType","_fire","_posFire","_posWreck","_smoke","_dis","_minDis","_maxDis","_closest","_wrecks"];
_objs = [];

View File

@ -3,7 +3,15 @@
The code provided by M3Editor EDEN has been addapted to add checks for vehicles, should they be present.
Returns an array of spawned objects.
version of 1/13/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["_center","_azi","_objects","_setVector"];

View File

@ -5,7 +5,15 @@
By Ghostrider-DBD-
Copyright 2016
Last updated 9-4-16
--------------------------
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 ["_crate","_px","_py","_defaultCrate"];
_defaultCrate = "Box_NATO_Wps_F";

View File

@ -1,15 +1,24 @@
/*
[_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
Last modified 3/13/17
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["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
private["_return","_emplacedWeps","_emplacedAIGroups","_wep","_units","_gunner"];
private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort"];
_emplacedWeps = [];
_emplacedAIGroups = [];
_emplacedAI = [];
_units = [];
_abort = false;
//diag_log "_fnc_spawnEmplacedWeaponArray start";
// Define _missionEmplacedWeapons if not already configured.
if (count _missionEmplacedWeapons < 1) then
@ -19,6 +28,7 @@ if (count _missionEmplacedWeapons < 1) then
//diag_log format["_fnc_spawnEmplacedWeaponArray:: (18) _missionEmplacedWeapons = %1", _missionEmplacedWeapons];
{
_empGroup = [_x,1,1,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
if (isNull _empGroup) exitWith {_abort = _true};
//diag_log format["_fnc_spawnEmplacedWeaponArray:: typeName _empGroup = %1 and _empGroup = %2",typeName _empGroup, _empGroup];
// params["_vehType","_pos",["_clearInventory",true]];
_wep = [selectRandom blck_staticWeapons,[0,0,0],false] call blck_fnc_spawnVehicle;
@ -30,11 +40,11 @@ if (count _missionEmplacedWeapons < 1) then
_units = units _empGroup;
_gunner = _units select 0;
_gunner moveingunner _wep;
_emplacedAIGroups pushback _empGroup;
_emplacedAI append (units _empGroup);
//diag_log format["_fnc_spawnEmplacedWeaponArray:: position of emplaced weapon = %1 and position of _x is %2",getPos _wep, _x];
//diag_log format["_fnc_spawnEmplacedWeaponArray:: _gunner = %1 and crew _wep = %2",_gunner, crew _wep];
} forEach _missionEmplacedWeapons;
blck_missionVehicles append _emplacedWeps;
_return = [_emplacedWeps,_emplacedAIGroups];
_return = [_emplacedWeps,_emplacedAI,_abort];
//diag_log format["_fnc_spawnEmplacedWeaponArray:: returning with _return = _emplacedWeps = %1",_return];
_return

View File

@ -3,7 +3,16 @@
By Ghostrider-DBD-
Copyright 2016
Last updated 8-14-16
--------------------------
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 ["_noMines","_mineTypes","_minesPlaced","_minDis","_maxDis","_closest","_radius","_xpos","_ypos","_dir","_incr","_i","_j","_posMine","_mine"];
params["_pos"];
@ -34,4 +43,4 @@ for "_i" from 1 to _noMines/2 do
};
_dir = _dir + _incr;
};
_minesPlaced
_minesPlaced

View File

@ -1,7 +1,7 @@
/*
blck_fnc_spawnMissionAI
by Ghostrider-DbD-
3/13/17
3/17/17
[_coords, // center of the area within which to spawn AI
_minNoAI, // minimum number of AI to spawn
_maxNoAI, // Max number of AI to spawn
@ -9,14 +9,24 @@
_uniforms, // Uniforms to use - note default is blck_sSkinList
_headGear // headgear to use - blck_BanditHeager is the default
] call blck_fnc_spawnMissionAI
returns an array of the groups spawned
returns an array of the units spawned
--------------------------
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["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAIGroups"];
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAI","_abort"];
_unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
_ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups);
_blck_AllMissionAIGroups = [];
_blck_AllMissionAI = [];
_abort = false;
//diag_log format["_fnc_spawnMissionAI :: _unitsToSpawn %1 ; _unitsPerGroup %2 _ResidualUnits %3",_unitsToSpawn,_unitsPerGroup,_ResidualUnits];
switch (_noAIGroups) do
{
@ -25,10 +35,11 @@
_newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,3,18,_uniforms,_headGear] call blck_fnc_spawnGroup;
if !(isNull _newGroup) then
{
_blck_AllMissionAIGroups pushback _newGroup;
//_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + units _newGroup;
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=1 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
} else {
_abortMissionSpawner = true;
_abort = true;
};
};
case 2: {
@ -44,8 +55,9 @@
_adjusttedGroupSize = _unitsPerGroup;
};
_newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
if (isNull _newGroup) exitWith {_abortMissionSpawner = true;};
_blck_AllMissionAIGroups pushback _newGroup;
if (isNull _newGroup) exitWith {_abort = true;};
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning 2 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI];
}forEach _groupLocations;
@ -53,16 +65,17 @@
case 3: { // spawn one group near the center of the mission and the rest on the perimeter
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=3"];
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
if (isNull _newGroup) then {_abortMissionSpawner = true;} else
if (isNull _newGroup) exitWith {_abort = true;};
{
_blck_AllMissionAIGroups pushback _newGroup;
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=3 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
_groupLocations = [_coords,2,20,35] call blck_fnc_findPositionsAlongARadius;
{
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
if (isNull _newGroup) exitWith {_abortMissionSpawner = true;};
if (isNull _newGroup) exitWith {_abort = true;};
_newAI = units _newGroup;
_blck_AllMissionAIGroups pushback _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning 2 Groups:_newGroup=%1 _newAI = %2",_newGroup, _newAI];
}forEach _groupLocations;
};
@ -70,18 +83,20 @@
default { // spawn one group near the center of the mission and the rest on the perimeter
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=default"];
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
_blck_AllMissionAIGroups pushback _newGroup;
if (isNull _newGroup) exitWith {_abort = true};
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=%3 _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
_groupLocations = [_coords,(_noAIGroups - 1),20,40] call blck_fnc_findPositionsAlongARadius;
{
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
if (isNull _newGroup) exitWith {_abortMissionSpawner = true;};
_blck_AllMissionAIGroups pushback _newGroup;
if (isNull _newGroup) exitWith {_abort = true;};
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning %3 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
}forEach _groupLocations;
};
};
{
_x setVariable["blck_stuckMonitor",0];
}forEach _blck_AllMissionAIGroups;
_blck_AllMissionAIGroups
private["_return"];
_return = [_blck_AllMissionAI,_abort]

View File

@ -3,7 +3,15 @@
By Ghostrider-DBD-
Copyright 2016
Last updated 2-24-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 ["_objs","_pos","_offset"];
params[ ["_coords", [0,0,0]], ["_crates",[]], ["_loadCrateTiming","atMissionSpawn"] ];

View File

@ -22,10 +22,13 @@ _grpPilot allowFleeing 0;
private["_supplyHeli"];
//create helicopter and spawn it
_supplyHeli = createVehicle [_chopperType, _spawnPos, [], 90, "FLY"];
[_supplyHeli] call blck_fnc_protectVehicle;
/*
if ([] call blck_fnc_getModType isEqualTo "Epoch") then
{
_supplyHeli call EPOCH_server_setVToken;
};
*/
_supplyHeli setDir (_spawnVector -180);
_supplyHeli setFuel 1;
_supplyHeli engineOn true;

View File

@ -3,7 +3,16 @@
returns _vehs, an array of vehicles spawned.
by Ghostridere-DbD-
1/10/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["_missionLootVehicles"];
private _vehs = [];
{
@ -14,4 +23,4 @@ private _vehs = [];
_vehs pushback _veh;
[_veh,_x select 2 /*loot array*/, _x select 3 /*array of values specifying number of items of each loot type to load*/] call blck_fnc_fillBoxes;
}forEach _missionLootVehicles;
_vehs
_vehs

View File

@ -1,33 +1,39 @@
/*
[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionVehiclePatrols
by Ghostrider-DbD-
3/13/17
3/17/17
returns [] if no groups could be created
returns [_AI_Vehicles,_missionAIGroups] otherwise;
returns [_AI_Vehicles,_missionAI] otherwise;
--------------------------
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["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns","_missionAIGroups","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return"];
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return","_abort"];
_vehicles = [];
_missionAIGroups = [];
_missionAI = [];
_abort = false;
_vehiclePatrolSpawns= [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
{
_vehGroup = [_x,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
//if (isNull _vehGroup) exitWith {_abort = true;};
//if (blck_debugLevel > 0) then {diag_log format["_fnc_spawnMissionVehiclePatrols:: -> _missionType = %3 _vehGroup = %1 and units _vehGroup = %2",_vehGroup, units _vehGroup,_missionType];};
if (typename (_vehGroup) isEqualTo "GROUP") then
if (isNull _vehGroup) exitWith {_abort = true;};
if (blck_debugLevel > 0) then {diag_log format["_fnc_spawnMissionVehiclePatrols:: -> _missionType = %3 _vehGroup = %1 and units _vehGroup = %2",_vehGroup, units _vehGroup,_missionType];};
if (typename (units _vehGroup) isEqualTo "ARRAY") then
{
_randomVehicle = selectRandom blck_AIPatrolVehicles;
_patrolVehicle = [_coords,_x,_randomVehicle,(_x distance _coords) -5,(_x distance _coords) + 5,_vehGroup] call blck_fnc_spawnVehiclePatrol;
//diag_log format["_fnc_spawnMissionVehiclePatrols:: - > patrol vehicle spawned was %1 with type of %2",_patrolVehicle,_randomVehicle];
_vehicles pushback _patrolVehicle;
_missionAIGroups pushback _vehGroup;
_missionAI append units _vehGroup;
//diag_log format["_fnc_spawnMissionVehiclePatrols:: -- > _vehicles updated to %1",_vehicles];
};
}forEach _vehiclePatrolSpawns;
blck_missionVehicles append _vehicles;
{
_x setVariable["blck_stuckMonitor",0];
}forEach _missionAIGroups;
_return = [_vehicles,_missionAIGroups];
_return = [_vehicles,_missionAI,_abort];
_return

View File

@ -3,7 +3,15 @@
By Ghostrider-DbD-
Last modified 1/22/17
copyright 2016
--------------------------
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["_coords","_missionLandscape",["_min",3],["_max",15],["_nearest",1]];
private["_objects"];
@ -25,4 +33,4 @@ _objects = [];
sleep 0.1;
} forEach _missionLandscape;
if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnRandomLandscape::-->> _objects = %1",_objects];};
_objects
_objects

View File

@ -3,18 +3,26 @@
Call with the name of the marker associated with the mission and either "Active" or "Completed"
by Ghostrider-DbD-
Last modified 1-22-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["_mission","_status",["_coords",[0,0,0]] ];
if (blck_debugLevel > 1) then {diag_log format["_fnc_updateMissionQue :: _mission = %1 | _status = %2 | _coords = %3",_mission,_status,_coords];};
if (blck_debugLevel > 2) then {diag_log format["_fnc_updateMissionQue :: _mission = %1 | _status = %2 | _coords = %3",_mission,_status,_coords];};
private["_index","_element","_waitTime"];
_index = blck_pendingMissions find _mission;
if (_index > -1) then
{
if (blck_debuglevel > 0) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions began as %1",blck_pendingMissions];};
if (blck_debuglevel > 2) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions began as %1",blck_pendingMissions];};
_element = blck_pendingMissions select _index;
if (blck_debuglevel > 0) then {diag_log format["_fnc_updateMissionQue:: -- >> _element before update = %1",_element];};
if (blck_debuglevel > 2) then {diag_log format["_fnc_updateMissionQue:: -- >> _element before update = %1",_element];};
if (toLower(_status) isEqualTo "active") then {
_element set[6, -1];
_element set[7,_coords];
@ -25,9 +33,9 @@ if (_index > -1) then
_element set[6, diag_tickTime + _waitTime];
_element set [7,[0,0,0]];
};
if (blck_debuglevel > 0) then {diag_log format["_fnc_updateMissionQue:: -- >> _element after update = %1",_element];};
if (blck_debuglevel > 2) then {diag_log format["_fnc_updateMissionQue:: -- >> _element after update = %1",_element];};
blck_pendingMissions set [_index, _element];
if (blck_debuglevel > 0) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions after update = %1",blck_pendingMissions];};
if (blck_debuglevel > 2) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions after update = %1",blck_pendingMissions];};
};

View File

@ -2,6 +2,7 @@
// by Ghostrider-DBD_
// Last Updated 12/21/16
// Creds to AWOL, A3W, LouD and Creampie for insights.
if (!isServer) exitWith {};
/*
@ -35,3 +36,4 @@ if (_time > (_sunrise + 0.5) && _time < (_sunset - 0.5)) exitWith {
setTimeMultiplier blck_timeAccelerationDusk;
//diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime];

View File

@ -2,40 +2,36 @@
Delete alive AI.
Now called from the main thread which tracks the time elapsed so that we no longer spawn a wait timer for each completed mission.
by Ghostrider
Last updated 3/13/17
Last updated 1/24/17
*/
//diag_log format["_fnc_cleanupAliveAI:: blck_liveMissionAIGroups = %1",blck_liveMissionAIGroups];
if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanupAliveAI called at %1",diag_tickTime];};
// blck_liveMissionAIGroups is an array of groups
for "_i" from 1 to (count blck_liveMissionAIGroups) do
{
if ((_i) <= count blck_liveMissionAIGroups) then
_fn_deleteAIfromList = {
params["_aiList"];
if (blck_debugLevel > 0) then {diag_log format["_fn_deleteAIfromList:: _aiList = %1",_aiList];};
{
private["_missionGroups","_groupsToClean"];
_missionGroups = blck_liveMissionAIGroups select (_i - 1);
//diag_log format["_fnc_cleanupAliveAI:: _missionGroups = %1", _missionGroups];
//diag_log format["_fnc_cleanupAliveAI:: (19) evaluating with delete time = %2 and diag_tickTime %1", diag_tickTime, _missionGroups select 1];
if ( diag_tickTime > (_missionGroups select 1) ) then
if (blck_debugLevel > 1) then {diag_log format["_fn_deleteAIfromList:: -> deleteing AI Unit %1",_x];};
[_x] call blck_fnc_deleteAI;
}forEach _aiList;
};
if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanupAliveAI called at %1",diag_tickTime];};
for "_i" from 1 to (count blck_liveMissionAI) do
{
if ((_i) <= count blck_liveMissionAI) then
{
_units = blck_liveMissionAI select (_i - 1);
//diag_log format["_fnc_cleanupAliveAI:: (34) evaluating with delete time = %2 and diag_tickTime %1", diag_tickTime, _units select 1];
if (diag_tickTime > (_units select 1) ) then
{
_groupsToClean = _missionGroups select 0;
//diag_log format["_fnc_cleanupAliveAI:: cleaning up AI groups %1",_groupsToClean];
//diag_log format["_fnc_cleanupAliveAI:: cleaning up AI group %1",_units];
{
if !(_x isEqualTo grpNull) then
{private["_group"];
_group = _x; // for coding clarity only
//diag_log format["_fnc_cleanupAliveAI:: cleaning up %2 units for group %1",_group, count (units _group)];
{
//diag_log format["_fnc_cleanupAliveAI:: deleting unit %1",_x];
[_x] call blck_fnc_deleteAI;
} forEach (units _group);
};
}forEach (_groupsToClean);
//diag_log format["_fnc_cleanupAliveAI:: deleting unit %1",_x];
[_x] call blck_fnc_deleteAI;
}forEach (_units select 0);
uiSleep 0.1;
blck_liveMissionAIGroups set[(_i - 1), -1];
blck_liveMissionAIGroups = blck_liveMissionAIGroups - [-1]; // Remove that list of live AI from the list.
//if (blck_debugLevel > 1) then {diag_log format["_fnc_mainTread:: blck_liveMissionAI updated to %1",blck_liveMissionAIGroups];};
blck_liveMissionAI set[(_i - 1), -1];
blck_liveMissionAI = blck_liveMissionAI - [-1]; // Remove that list of live AI from the list.
if (blck_debugLevel > 1) then {diag_log format["_fnc_mainTread:: blck_liveMissionAI updated to %1",blck_liveMissionAI];};
};
};
};

View File

@ -13,7 +13,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_veh",["_clearInventory",true]];
private["_unit"];

View File

@ -12,7 +12,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
// Unused at present, reserved for the future
private ["_ai_veh","_ai_veh_type","_ai_veh_name"];

View File

@ -8,7 +8,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_Vehicle"];

View File

@ -0,0 +1,36 @@
/*
Author: Ghostrider-DbD-
Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP
License: Attribution-NonCommercial-ShareAlike 4.0 International
Last Modified 1/23/17
*/
params["_grpPilot"];
private["_heli","_pilot"];
_pilot = (units _grpPilot) select 0;
_heli = vehicle _pilot;
diag_log "reinforcements deployed:: send heli back to spawn";
[[_heli], 300 /* 5 min*/] spawn blck_fnc_addObjToQue;
// select a random location abotu 2K from the mission
_spawnVector = round(random(360));
_spawnDistance = 2000;
_pos = getPos _heli;
// Use the new functionality of getPos
// https://community.bistudio.com/wiki/getPos
_home = _pos getPos [_spawnDistance,_spawnVector];
// Send the heli back to base
_grpPilot = group this;
[_grpPilot, 0] setWPPos _pos;
[_grpPilot, 0] setWaypointType "MOVE";
[_grpPilot, 0] setWaypointSpeed "FULL";
[_grpPilot, 0] setWaypointBehaviour "CARELESS";
[_grpPilot, 0] setWaypointCompletionRadius 200;
[_grpPilot, 0] setWaypointStatements ["true", "{deleteVehicle _x} forEach units group this;deleteVehicle (vehicle this);diag_log ""helicopter and crew deleted"""];
[_grpPilot, 0] setWaypointName "GoHome";
[_grpPilot,0] setWaypointTimeout [0.5,0.5,0.5];
diag_log "reinforcements:: sending Heli Home";

View File

@ -0,0 +1,121 @@
/*
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last Modified 3-17-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["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis"];
_coords = _this select 0;
_skillAI = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headGear = _this select 4;
_helis = _this select 5;
/*
Handles upper level functions of reinforcements utilizing helicoptor patrols and/or spawned from a helicopter.
Calls on functions that spawn paratroops and/or loot chests at the heli's location.
Tasks are:
1) spawn a heli over the mission center.
2) add crew and gunners
3) spawn paratroops
4) configure waypointScript
5) return the _heli that was spawned.
*/
diag_log format["_fnc_spawnMissionHeli (35):: _helis = %1",_helis];
private["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return"];
_grpPilot = createGroup blck_AI_Side;
if (isNull _grpPilot) exitWith {diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned";};
_grpParatroops = createGroup blck_AI_Side;
if (_grpParatroops isEqualTo grpNull) exitWith {deleteGroup _grpPilot; diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned";};
_grpPilot setBehaviour "CARELESS";
_grpPilot setCombatMode "RED";
_grpPilot setSpeedMode "FULL";
_grpPilot allowFleeing 0;
private["_supplyHeli"];
//create helicopter and spawn it
_chopperType = selectRandom _helis;
diag_log format["_fnc_spawnMissionHeli (49):: _chopperType seleted = %1",_chopperType];
_patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"];
[_patrolHeli] call blck_fnc_protectVehicle;
_patrolHeli setFuel 1;
_patrolHeli engineOn true;
_patrolHeli flyInHeight 100;
_patrolHeli setVehicleLock "LOCKED";
_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
diag_log format["_fnc_spawnMissionHeli (58):: heli %1 spawned",_patrolHeli];
clearWeaponCargoGlobal _patrolHeli;
clearMagazineCargoGlobal _patrolHeli;
clearItemCargoGlobal _patrolHeli;
clearBackpackCargoGlobal _patrolHeli;
_launcherType = "none";
_unitPilot = _grpPilot createUnit ["I_helipilot_F", getPos _patrolHeli, [], 0, "FORM"];
_unitPilot = [[100,100,100],_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
_unitPilot setSkill 1;
_unitPilot assignAsDriver _patrolHeli;
_unitPilot moveInDriver _patrolHeli;
_grpPilot selectLeader _unitPilot;
diag_log format["_fnc_spawnMissionHeli (72):: heli spawned pilot added"];
diag_log format["_fnc_spawnMissionHeli (74):: pilot %1 spawned",_unitPilot];
_turrets = allTurrets [_patrolHeli,false];
diag_log "_fnc_spawnMissionHeli (78): preparing to clear out blacklisted turrets";
{
if ( (_patrolHeli weaponsTurret _x) in blck_blacklisted_heli_weapons) then
{
private["_mags","_turret"];
_mags = _patrolHeli magazinesTurret _x;
_turret = _x;
{
_patrolHeli removeMagazines [_x,_turret];
} forEach _mags;
_patrolHeli removeWeaponTurret _turret;
diag_log format["_fnc_spawnMissionHeli (90)::-->> weapon %1 and its ammo removed from heli %2 for turret %3",_patrolHeli weaponsTurret _x,_patrolHeli, _x];
}
else
{
// B_helicrew_F
_unitCrew = [[100,100,100],_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
_unitCrew assignAsTurret [_patrolHeli, _x];
_unitCrew moveInTurret [_patrolHeli, _x];
diag_log format["_fnc_spawnMissionHeli (98)::-- >> unit %1 moved into turret %2 of vehicle %3",_unitCrew,_x,_patrolHeli];
};
}forEach _turrets;
diag_log format["_fnc_spawnMissionHeli (102)::-->> Heli %1 outfited with a crew numbering %2",_patrolHeli, crew _patrolHeli];
// params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull],_grpParatroops];
//params["_coords","_skillAI","_weapons","_uniforms","_headGear",["_grpParatroops",grpNull],["_heli",objNull]];
[_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops;
//set waypoint for helicopter
private["_wpDestination"];
[_grpPilot, 0] setWPPos _coords;
[_grpPilot, 0] setWaypointType "SAD";
[_grpPilot, 0] setWaypointSpeed "NORMAL";
[_grpPilot, 0] setWaypointBehaviour "CARELESS";
[_grpPilot, 0] setWaypointStatements ["true","[group this, 0] setCurrentWaypoint [group this,0];"];
[_grpPilot,0] setWaypointTimeout [100,150,200];
_grpPilot setCurrentWaypoint [_grpPilot,0];
diag_log format["_fnc_spawnMissionHeli (116):: initial pilot waypoints set"];
_return = [_patrolHeli,_grpPilot,_grpParatroops];
_return;

View File

@ -0,0 +1,64 @@
/*
Author: Ghostrider-DbD-
Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP
License: Attribution-NonCommercial-ShareAlike 4.0 International
3/17/17
This is basically a container that determines whether a paragroop group should be created and if so creates a group and passes it off to the routine that spawns the paratroops.
--------------------------
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["_coords","_skillAI","_weapons","_uniforms","_headGear",["_grpParatroops",grpNull],["_heli",objNull]];
private["_grpParatroops","_chanceParatroops"];
_aiSkillsLevel = toLower _aiSkillsLevel;
_chanceParatroops = 0;
_noPara = 0;
if (_aiSkillsLevel isEqualTo "blue") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: BLUE difficulty settings applied";};
_chanceParatroops = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
};
if (_aiSkillsLevel isEqualTo "green") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: GREEN difficulty settings applied";};
_chanceParatroops = blck_chanceParaGreen;
_noPara = blck_noParaGreen;
};
if (_aiSkillsLevel isEqualTo "orange") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: ORANGE difficulty settings applied";};
_chanceParatroops = blck_chanceParaOrange;
_noPara = blck_noParaOrange;
};
if (_aiSkillsLevel isEqualTo "red") then
{
if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: RED difficulty settings applied";};
_chanceParatroops = blck_chanceParaRed;
_noPara = blck_noParaRed;
};
if (blck_debugON) then {diag_log format["_fnc_spawnMissionParatroops (47): _numAI %1 |_chanceParatroops %2",_noPara,_chanceParatroops];};
if (blck_debugON) then {diag_log format["_fnc_spawnMissionParatroops (48): _coords %1 | _numAI %2 | _skillAI %3 | _grpParatroops %4 | _heli",_coords,_skillAI,_grpParatroops,_heli];};
if (isNull _grpParatroops) then
{
_grpParatroops = createGroup blck_AI_Side;
if (blck_debugON) then {diag_log format["_fnc_spawnMissionParatroops (53):No group passed as a parameter, _grpParatroops %4 created",_grpParatroops];};
};
if (isNull _grpParatroops) exitWith {diag_log "BLCK_ERROR: _fnc_spawnMissionParatroops (56)::_->> NULL GROUP Returned";};
if (random(1) < _chanceParatroops) then
{
if (blck_debugON) then {diag_log format["_fnc_spawnMissionParatroops (58): function running and group %1 successfully created; now calling blck_fnc_spawnParaUnits",_grpParatroops];};
//params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]];
[_coords,_grpParatroops,_noPara,_skillAI,_weapons,_uniforms,_headGear,_heli] spawn blck_fnc_spawnParaUnits;
};
_grpParatroops;

View File

@ -0,0 +1,83 @@
/*
Author: Ghostrider-DbD-
Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP
License: Attribution-NonCommercial-ShareAlike 4.0 International
call with
[
_supplyHeli, // heli from which they should para
_lootCounts,
_lootSetting // [blue, red, green, orange]
] call blck_spawnHeliParaCrate
*/
params["_supplyHeli","_lootCounts"];
private ["_chute","_crate"];
_crate = "";
_chute = "";
diag_log "_fnc_spawnParaCrate:: spawning crate";
private["_dir","_offset"];
_dir = getDir _supplyHeli;
_dir = if (_dir < 180) then {_dir + 210} else {_dir - 210};
_offset = _supplyHeli getPos [10, _dir];
//open parachute and attach to crate
_chute = createVehicle ["I_Parachute_02_F", [100, 100, 100], [], 0, "FLY"];
[_chute] call blck_fnc_protectVehicle;
_chute setPos [_offset select 0, _offset select 1, 100 ]; //(_offset select 2) - 10];
diag_log format["_fnc_spawnParaCrate:: chute spawned yielding object %1 at postion %2", _chute, getPos _chute];
//create the parachute and crate
private["_crateSelected"];
_crateSelected = selectRandom["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_IND_AmmoVeh_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F"];
_crate = [getPos _chute, _crateSelected] call blck_fnc_spawnCrate;
//_crate = createVehicle [_crateSelected, position _chute, [], 0, "CAN_COLLIDE"];
_crate setPos [position _supplyHeli select 0, position _supplyHeli select 1, 250]; //(position _supplyHeli select 2) - 10];
_crate attachTo [_chute, [0, 0, -1.3]];
_crate allowdamage false;
_crate enableRopeAttach true; // allow slingloading where possible
diag_log format["_fnc_spawnParaCrate:: crate spawned %1 at position %2 and attached to %3",_crate, getPos _crate, attachedTo _crate];
switch (_lootSetting) do
{
case "orange": {[_crate, blck_BoxLoot_Orange, _lootCounts] call blck_fnc_fillBoxes;};
case "green": {[_crate, blck_BoxLoot_Green, _lootCounts] call blck_fnc_fillBoxes;};
case "red": {[_crate, blck_BoxLoot_Red, _lootCounts] call blck_fnc_fillBoxes;};
case "blue": {[_crate, blck_BoxLoot_Blue, _lootCounts] call blck_fnc_fillBoxes;};
default {[_crate, blck_BoxLoot_Red, _lootCounts] call blck_fnc_fillBoxes;};
};
diag_log format["_fnc_spawnParaCrate:: crate loaded and now at position %1 and attached to %2", getPos _crate, attachedTo _crate];
_fn_monitorCrate = {
params["_crate","_chute"];
uiSleep 30;
private["_crateOnGround"];
_crateOnGround = false;
while {!_crateOnGround} do
{
uiSleep 1;
diag_log format["_fnc_spawnParaCrate:: Crate Altitude: %1 Crate Velocity: %2 Crate Position: %3 Crate attachedTo %4", getPos _crate select 2, velocityModelSpace _crate select 2, getPosATL _crate, attachedTo _crate];
if ( (((velocity _crate) select 2) < 0.1) || ((getPosATL _crate select 2) < 0.1) ) exitWith
{
uiSleep 10; // give some time for everything to settle
detach _crate;
deleteVehicle _chute;
if (surfaceIsWater (getPos _crate)) then
{
deleteVehicle _crate;
} else
{
[_crate] call blck_fnc_signalEnd;
};
};
};
};
[_crate,_chute] call _fn_monitorCrate;
[[_crate], 1200 /* 20 min*/] spawn blck_fnc_addObjToQue;

View File

@ -0,0 +1,71 @@
/*
Author: Ghostrider-DbD-
Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP
License: Attribution-NonCommercial-ShareAlike 4.0 International
3/17/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/
*/
params["_missionPos","_paraGroup","_numAI","_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]];
private["_arc","_dir","_spawnPos","_chute","_unit","_launcherType"];
diag_log format["_fnc_spawnParaUnits (17)::_missionPos %1 | _paraGroup %2 | _numAI %3 | _skillAI %4 | _heli = %5",_missionPos,_paraGroup,_numAI,_skillAI,_heli];
_launcherType = "none";
private ["_arc","_spawnPos"];
_arc = 45;
_dir = 0;
_pos = _missionPos;
for "_i" from 1 to _numAI do
{
if (_heli isKindOf "Air") then {_pos = getPos _heli};
_spawnPos = _pos getPos[1.5,_dir];
_chute = createVehicle ["Steerable_Parachute_F", [100, 100, 200], [], 0, "FLY"];
[_chute] call blck_fnc_protectVehicle;
_unit = [[_spawnPos select 0, _spawnPos select 1, 100],_weapons,_paraGroup,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
_chute setPos [_spawnPos select 0, _spawnPos select 1, 125]; //(_offset select 2) - 10];
_unit assignAsDriver _chute;
_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];
uiSleep 2;
};
_paraGroup selectLeader ((units _paraGroup) select 0);
//params["_pos","_minDis","_maxDis","_group"];
[_missionPos,10,20,_paraGroup] call blck_fnc_setupWaypoints;
diag_log "_fnc_spawnParaUnits (44): All Units spawned";
/*
diag_log "_fnc_spawnParaUnits:: waiting for paratroops to land";
private["_troopsOnGround"];
params["_group"];
_troopsOnGround = false;
while {!_troopsOnGround} do
{
_troopsOnGround = true;
{
diag_log format["reinforments:: Tracking Paratroops unit %1 position %4 altitue %2 velocity %3 attachedTo %4",_x, (getPos _x select 2), (velocity _x select 2), getPosATL _x, attachedTo _x];
if ( (getPosATL _x select 2) < 0.1) then {
if (surfaceIsWater (position _x)) then {
diag_log format["_fnc_spawnParaUnits:: unit %1 at %2 deleted",_x, getPos _x];
[_x] call blck_fnc_deleteAI;
};
}
else
{_troopsOnGround = false;};
}forEach units _paraGroup;
uiSleep 5;
};
diag_log "spawnParatroops:: All Units on the Ground";
*/

View File

@ -0,0 +1,66 @@
/*
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last Modified 3-17-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["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"];
_coords = _this select 0;
_aiSkillsLevel = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headgear = _this select 4;
private["_chanceHeliPatrol","_return","_paratroops","_missionHelis"];
if (blck_debugON) then {diag_log format["_fnc_spawnMissionReinforcements (34): Script Starting with _aiSkillsLevel = %1",_aiSkillsLevel]}
_aiSkillsLevel = toLower _aiSkillsLevel;
if (_aiSkillsLevel isEqualTo "blue") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (38): BLUE difficulty settings applied";};
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_missionHelis = blck_patrolHelisBlue;
};
if (_aiSkillsLevel isEqualTo "green") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (43): GREEN difficulty settings applied";};
_chanceHeliPatrol = blck_chanceHeliPatrolGreen;
_missionHelis = blck_patrolHelisGreen;
};
if (_aiSkillsLevel isEqualTo "orange") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (48): ORANGE difficulty settings applied";};
_chanceHeliPatrol = blck_chanceHeliPatrolOrange;
_missionHelis = blck_patrolHelisOrange;
};
if (_aiSkillsLevel isEqualTo "red") then
{
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (54): RED difficulty settings applied";};
_chanceHeliPatrol = blck_chanceHeliPatrolRed;
_missionHelis = blck_patrolHelisRed;
};
if (blck_debugON) then {diag_log format["_fnc_spawnMissionReinforcements (59): Variables defined: _chanceHeliPatrol %1 | _missionHelis %2",_chanceHeliPatrol,_missionHelis];};
if (random (1) < _chanceHeliPatrol) then
{
//params["_coords","_aiSkillsLevel",,"_weapons","_uniforms","_headgear""_helis"];
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (64): calling _fnc_spawnMissionHeli to spawn heli and paratroops";};
_return = [_coords,_aiSkillsLevel,_weapons,_uniforms,_headgear,_missionHelis] call blck_fnc_spawnMissionHeli;
if (blck_debugON) then {diag_log format["_fnc_spawnMissionReinforcements (66): blck_fnc_spawnMissionHeli returned value of %1 for _return",_return];};
} else {
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (68): calling _fnc_spawnMissionParatroops to spawn para reinforcements";};
// params["_coords","_skillAI","_weapons","_uniforms","_headgear"];
_paratroops = [_coords,_aiSkillsLevel,_weapons,_uniforms,_headgear] call blck_fnc_spawnMissionParatroops;
if (blck_debugON) then {diag_log format["_fnc_spawnMissionReinforcements (71):: blck_fnc_spawnMissionParatroops returned value for _paratroops of %1",_paratroops];};
_return = [objNull, _paratroops];
};
if (blck_debugLevel > 0) then {diag_log format["_fnc_spawnMissionReinforcements (74):: _return = %1",_return];};
_return

View File

@ -10,18 +10,16 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_veh","_modType"];
params["_vehType","_pos",["_clearInventory",true]];
//_vehType = _this select 0; // type of vehicle to be spawned
//_pos = _this select 1; // position at which vehicle is to be spawned
//if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf: _this = %1",_this];};
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
[_veh] call blck_fnc_protectVehicle;
// params["_veh",["_clearInventory",true]];
[_veh,_clearInventory] call blck_fnc_configureMissionVehicle;
//if (blck_debugLevel > 2) then {diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];};
//diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];
_veh

View File

@ -1,7 +1,7 @@
/*
By Ghostrider-DBD-
Copyright 2016
Last updated 3-14-17
Last updated 3-17-17
spawns a vehicle of _vehType and mans it with units in _group.
returns _veh, the vehicle spawned.
@ -12,7 +12,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_vehType","_safepos","_veh"];
params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull] ];
@ -58,8 +58,14 @@ for "_i" from 1 to _count do
_p2 = _center getPos [(_minDis + random(_maxDis - _minDis)),_angle];
_wp = _group addWaypoint [_p2, 25];
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp = _group addWaypoint [_p2, 25];
_wp setWaypointType "SENTRY";
_wp setWaypointName "sentry";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [10,17.5,25];
};
_wp = _group addWaypoint [_pos, 25];

View File

@ -11,7 +11,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
//blck_functionsCompiled = false;
//#define DBDserver 1
@ -55,7 +55,6 @@ blck_fnc_spawnMissionVehiclePatrols = compileFinal preprocessFileLineNumbers "\q
blck_fnc_spawnEmplacedWeaponArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnEmplacedWeaponArray.sqf";
blck_fnc_spawnMissionAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionAI.sqf";
blck_fnc_spawnMissionLootVehicles = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionLootVehicles.sqf";
blck_fnc_spawnMissionHeli = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionHeli.sqf";
blck_fnc_addItemToCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addItemToCrate.sqf";
blck_fnc_loadLootItemsFromArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc__loadLootItemsFromArray.sqf";
blck_fnc_fillBoxes = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_fillBoxes.sqf"; // Adds items to an object according to passed parameters. See the script for details.
@ -69,11 +68,11 @@ blck_fnc_missionAIareDead = compileFinal preprocessFileLineNumbers "\q\addons\cu
// #define Reinforcements 1
#ifdef Reinforcements
// Reinforcement-related functions
blck_fnc_callInReinforcements = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_callInReinforcements.sqf";
blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_spawnParaUnits.sqf";
blck_fnc_spawnParaCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_spawnParaCrate.sqf";
//blck_fnc_callInReinforcements = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_callInReinforcements.sqf";
//blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_spawnParaUnits.sqf";
//blck_fnc_spawnParaCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_spawnParaCrate.sqf";
//blck_fnc_spawnReinforcHeli = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_spawnReinforcHeli.sqf";
blck_fnc_sendHeliHome = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_sendHeliHome.sqf";
//blck_fnc_sendHeliHome = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_sendHeliHome.sqf";
//blck_fnc_spawnHeliPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_spawnParaUnits.sqf";
//blck_fnc_spawnHeliPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_spawnParaUnits.sqf";
#endif
@ -86,12 +85,16 @@ blck_fnc_changeToSADWaypoint = compileFinal preprocessFileLineNumbers "\q\addon
blck_fnc_changeToMoveWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToMoveWaypoint.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 or static
// Functions specific to vehicles, whether wheeled, aircraft or static
blck_fnc_spawnVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf";
blck_fnc_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehiclePatrol.sqf";
blck_fnc_protectVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_protectVehicle.sqf";
blck_fnc_configureMissionVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_configureMissionVehicle.sqf";
blck_fnc_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf";
blck_fnc_spawnMissionReinforcements = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnReinforcements.sqf";
blck_fnc_spawnMissionHeli = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf";
blck_fnc_spawnMissionParatroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionParatroops.sqf"; // Lumped here because these 'jump' from aircraft
blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnParaUnits.sqf"; // Lumped here because these 'jump' from aircraft
// functions to support Units
blck_fnc_removeGear = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"; // Strip an AI unit of all gear.

View File

@ -10,10 +10,10 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include"\q\addons\custom_server\Configs\blck_defines.hpp";
blck_debugON = false;
blck_debugLevel = 0; // Sets level of detail for debugging info - WIP.
blck_debugON = true;
blck_debugLevel = 3; // Sets level of detail for debugging info - WIP.
blck_minFPS = 10;
////////////////////////////////////////////////
@ -24,6 +24,7 @@ blck_ActiveMissionCoords = [];
blck_recentMissionCoords = [];
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 = [];

View File

@ -0,0 +1,349 @@
/*
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last Modified 3-17-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";
if (blck_debugON) then {diag_log "[blckeagls] Loading blck_configs.sqf";};
/*
Configuration for Addons that support the overall Mission system.
These are a module to spawn map addons generated with the Eden Editor
And a moduel to spawn static loot crates at specific location
A time acceleration module.
*/
blck_spawnMapAddons = true; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf
blck_spawnStaticLootCrates = true; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent).
// Note that you can define map-specific variants in custom_server\configs\blck_custom_config.sqf
blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
blck_timeAccelerationDay = 1; // Daytime time accelearation
blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 6; // Nighttim time acceleration
/**************************************************************
BLACKLIST LOCATIONS
**************************************************************/
// if true then missions will not spawn within 1000 m of spawn points for Altis, Bornholm, Cherno, Esseker or stratis.
blck_blacklistTraderCities = true; // Set this = true if you would like the mission system to automatically search for the locations of the Epoch trader cities. Note that these are pre-defined in GMS_fnc_findWorld for the most common maps.
// list of locations that are protected against mission spawns
switch (toLower(worldName)) do
{
case "altis": {
blck_locationBlackList append [
//Add location as [[xpos,ypos,0],minimumDistance],
// Note that there should not be a comma after the last item in this table
[[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched.
];
};
case "tanoa": {
blck_locationBlackList append [ ];
};
};
/***********************************************************
GENERAL MISSION SYSTEM CONFIGURATION
***********************************************************/
////////
// Headless Client Configurations
blck_useHC = false; // Not Yet Working
///////////////////////////////
// Kill message configurations
// These determine whether and when messages are sent to players regarding AI Kills or illegal kills that might damage a vehicle.
blck_useKillMessages = false; // when true a message will be broadcast to all players each time an AI is killed; may impact server performance.
blck_useKillScoreMessage = true; // when true a tile is displayed to the killer with the kill score information
blck_useIEDMessages = true;
///////////////////////////////
// MISSION MARKER CONFIGURATION
// blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type
//When set to true,"arrow", text will be to the right of an arrow below the mission marker.
// When set to true,"dot", ext will be to the right of a black dot at the center the mission marker.
blck_labelMapMarkers = [true,"center"];
blck_preciseMapMarkers = true; // Map markers are/are not centered at the loot crate
//Minimum distance between missions
blck_MinDistanceFromMission = 2000;
///////////////////////////////
// Mission Smoke and Signals
///////////////////////////////
// global loot crate options
// Options to spawn a smoking wreck near the crate. When the first parameter is true, a wreck or junk pile will be spawned.
// It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission.
blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether.
blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion.
blck_loadCratesTiming = "atMissionCompletion"; // valid choices are "atMissionCompletion" and "atMissionSpawn";
///////////////////////////////
// PLAYER PENALTIES
///////////////////////////////
blck_RunGear = true; // When set to true, AI that have been run over will ve stripped of gear, and the vehicle will be given blck_RunGearDamage of damage.
blck_RunGearDamage = 0.2; // Damage applied to player vehicle for each AI run over
blck_VK_Gear = true; // When set to true, AI that have been killed by a player in a vehicle in the list of forbidden vehicles or using a forbiden gun will be stripped of gear and the vehicle will be given blck_RunGearDamage of damage
blck_VK_RunoverDamage = true; // when the AI was run over blck_RunGearDamage of damage will be applied to the killer's vehicle.
blck_VK_GunnerDamage = true; // when the AI was killed by a gunner on a vehicle that is is in the list of forbidden vehicles, blck_RunGearDamage of damage will be applied to the killer's vehicle each time an AI is killed with a vehicle's gun.
blck_forbidenVehicles = ["B_MRAP_01_hmg_F","O_MRAP_02_hmg_F"]; // Add any vehicles for which you wish to forbid vehicle kills
// For a listing of the guns mounted on various land vehicles see the following link: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Vehicle_Weapons
// HMG_M2 is mounted on the armed offroad that is spawned by Epoch
blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC",/*"HMG_M2",*/"HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","HMG_127_LSV_01"]; // Add any vehicles for which you wish to forbid vehicle kills, o
///////////////////////////////
// MISC MISSION PARAMETERS
///////////////////////////////
blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player, distance and name of AI unit killed are shown.
blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Turn this off if you have vehicle patrols.
blck_cleanupCompositionTimer = 1200; // Mission objects will be deleted after the mission is completed after a deley set by this timer.
blck_cleanUpLootChests = false; // when true, loot crates will be deleted together with other mission objects.
blck_MissionTimout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting.
///////////////////////////////
// Paratroop Settings
// AI paratrooper reinforcement paramters
blck_chanceParaBlue = 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]
blck_chanceParaRed = 1;
blck_noParaRed = 3;
blck_chanceParaGreen = 0.4;
blck_noParaGreen = 4;
blck_chanceParaOrange = 0.5;
blck_chanceParaOrange = 4;
// Supplemental Loot Parameters.
///////////////////////////////
// Heli Patrol Heli Types
// Armed Helis
//////////////////////////////
_blck_littleBirds = ["B_Heli_Light_01_armed_F"]; // AH-9 Pawnee (WEST)
_blck_armed_hellcats = ["I_Heli_light_03_F"];
_blck_armed_orcas = ["O_Heli_Light_02_F","O_Heli_Light_02_v2_F"];
_blck_armed_ghosthawks = ["B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F"];
_blck_armed_hurons = ["B_Heli_Transport_03_F","B_Heli_Transport_03_black_F"];
_blck_armed_attackHelis = ["B_Heli_Attack_01_F"];
_blck_armed_heavyAttackHelis = ["O_Heli_Attack_02_F","O_Heli_Attack_02_black_F"];
blck_blacklisted_heli_ammo = ["24Rnd_missiles","24Rnd_PG_missiles","12Rnd_PG_missiles","2Rnd_LG_scalpel","6Rnd_LG_scalpel","8Rnd_LG_scalpel","M_Scalpel_AT ","14Rnd_80mm_rockets","38Rnd_80mm_rockets"];
blck_blacklisted_heli_weapons = ["missiles_SCALPEL","missiles_titan","rockets_Skyfire","missiles_DAGR","missiles_DAR"];
///////////////////////////////
// Heli Patrol Settings
///////////////////////////////
blck_chanceHeliPatrolBlue = 0; //[0 - 1] Set to 0 to deactivate and 1 to always have a heli spawn over the mission center and patrol the mission area. The chance of paratroops dropping from the heli is defined by blck_chancePara(Blue|Red|Green|Orange) above.
blck_patrolHelisBlue = _blck_littleBirds;
blck_chanceHeliPatrolRed = 1; // 0.4;
blck_patrolHelisRed = _blck_armed_orcas;
blck_chanceHeliPatrolGreen = 0.55;
blck_patrolHelisGreen = _blck_littleBirds;
blck_chanceHeliPatrolOrange = 0.75;
blck_patrolHelisOrange = _blck_armed_hellcats+_blck_armed_orcas;
////////////////////
// Enable / Disable Missions
////////////////////
//Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission - this feature is not recommended because you may run out of available groups.
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = 1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = 1;
#ifdef DBDserver
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
blck_maxcrashsites = 3;
#endif
////////////////////
// MISSION TIMERS
////////////////////
// Reduce to 1 sec for immediate spawns, or longer if you wish to space the missions out
blck_TMin_Orange = 250;
blck_TMin_Green = 200;
blck_TMin_Blue = 120;
blck_TMin_Red = 150;
#ifdef DBDserver
blck_TMin_Hunter = 120;
blck_TMin_Scouts = 115;
blck_TMin_Crashes = 115;
blck_TMin_UMS = 200;
#endif
//Maximum Spawn time between missions in seconds
blck_TMax_Orange = 360;
blck_TMax_Green = 300;
blck_TMax_Blue = 200;
blck_TMax_Red = 250;
#ifdef DBDserver
blck_TMax_Hunter = 200;
blck_TMax_Scouts = 200;
blck_TMax_Crashes = 200;
blck_TMax_UMS = 280;
#endif
///////////////////////////////
// AI VEHICLE PATROL PARAMETERS
///////////////////////////////
blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area.
blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out.
blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases
////////////////////
// Mission Vehicle Settings
////////////////////
//Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high
blck_SpawnVeh_Orange = 3; // Number of static weapons at Orange Missions
blck_SpawnVeh_Green = 2; // Number of static weapons at Green Missions
blck_SpawnVeh_Blue = -1; // Number of static weapons at Blue Missions
blck_SpawnVeh_Red = 1; // Number of static weapons at Red Missions
///////////////////////////////
// AI STATIC WEAPON PARAMETERS
///////////////////////////////
blck_useStatic = true; // When true, AI will man static weapons spawned 20-30 meters from the mission center. These are very effective against most vehicles
blck_killEmptyStaticWeapons = true; // When true, static weapons will have damage set to 1 when the AI manning them is killed.
blck_staticWeapons = ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; // [0.50 cal, grenade launcher, AT Launcher]
////////////////////
// Mission Static Weapon Settings
////////////////////
// Defines how many static weapons to spawn. Set this to -1 to disable spawning
blck_SpawnEmplaced_Orange = 3; // Number of static weapons at Orange Missions
blck_SpawnEmplaced_Green = 2; // Number of static weapons at Green Missions
blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions
blck_SpawnEmplaced_Red = 1; // Number of static weapons at Red Missions
/****************************************************************
GENERAL AI SETTINGS
****************************************************************/
blck_combatMode = "RED"; // Change this to "YELLOW" if the AI wander too far from missions for your tastes.
blck_groupFormation = "WEDGE"; // Possibilities include "WEDGE","VEE","FILE","DIAMOND"
blck_AI_Side = RESISTANCE;
blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack
blck_useNVG = true; // When true, AI will be spawned with NVG if is dark
blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed.
blck_useLaunchers = true; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now
//blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"];
blck_launcherTypes = ["launch_RPG32_F"];
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
//This defines how long after an AI dies that it's body disappears.
blck_bodyCleanUpTimer = 1200; // time in seconds after which dead AI bodies are deleted
// Each time an AI is killed, the location of the killer will be revealed to all AI within this range of the killed AI, set to -1 to disable
// values are ordered as follows [blue, red, green, orange];
blck_AliveAICleanUpTimer = 1200; // Time after mission completion at which any remaining live AI are deleted.
blck_AIAlertDistance = [250,325,450,500];
//blck_AIAlertDistance = [150,225,400,500];
// How precisely player locations will be revealed to AI after an AI kill
// values are ordered as follows [blue, red, green, orange];
blck_AIIntelligence = [0.3, 0.5, 0.7, 0.9];
blck_baseSkill = 1.0; // The overal skill of the AI - range 0.1 to 1.0.
/***************************************************************
MISSION TYPE SPECIFIC AI SETTINGS
**************************************************************/
//This defines the skill, minimum/Maximum number of AI and how many AI groups are spawned for each mission type
// Orange Missions
blck_MinAI_Orange = 20;
blck_MaxAI_Orange = 25;
blck_AIGrps_Orange = 6;
blck_SkillsOrange = [
["aimingAccuracy",0.4],["aimingShake",0.7],["aimingSpeed",0.7],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]
];
// Green Missions
blck_MinAI_Green = 16;
blck_MaxAI_Green = 21;
blck_AIGrps_Green = 5;
blck_SkillsGreen = [
["aimingAccuracy",0.3],["aimingShake",0.65],["aimingSpeed",0.65],["endurance",0.9],["spotDistance",0.9],["spotTime",0.9],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75]
];
// Red Missions
blck_MinAI_Red = 12;
blck_MaxAI_Red = 15;
blck_AIGrps_Red = 3;
blck_SkillsRed = [
["aimingAccuracy",0.2],["aimingShake",0.6],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.8],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70]
];
// Blue Missions
blck_MinAI_Blue = 8;
blck_MaxAI_Blue = 12;
blck_AIGrps_Blue = 2;
blck_SkillsBlue = [
["aimingAccuracy",0.1],["aimingShake",0.5],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60]
];
// Add some money to AI; only works with Exile for now.
blck_maxMoneyOrange = 25;
blck_maxMoneyGreen = 20;
blck_maxMoneyRed = 15;
blck_maxMoneyBlue = 10;
private["_modType"];
_modType = [] call blck_fnc_getModType;
if (_modType isEqualTo "Epoch") then
{
diag_log format["[blckeagls] Loading Mission System using Parameters for %1",_modType];
execVM "\q\addons\custom_server\Configs\blck_configs_epoch.sqf";
waitUntil {(isNil "blck_configsEpochLoaded") isEqualTo false;};
waitUntil{blck_configsEpochLoaded};
blck_configsEpochLoaded = nil;
diag_log "[blckeagles] Running getTraderCitiesEpoch to get location of trader cities";
execVM "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitesEpoch.sqf";;
};
if (_modType isEqualTo "Exile") then
{
diag_log format["[blckeagls] Loading Mission System using Parameters for %1",_modType];
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_configs_exile.sqf";
waitUntil {(isNil "blck_configsExileLoaded") isEqualTo false;};
waitUntil{blck_configsExileLoaded};
blck_configsExileLoaded = nil;
if (blck_blacklistTraderCities || blck_blacklistSpawns || blck_listConcreteMixerZones) then {execVM "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitesExile.sqf";};
};
blck_configsLoaded = true;

View File

@ -12,245 +12,11 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
if (blck_debugON) then {diag_log "[blckeagls] Loading blck_configs_epoch.sqf";};
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
/*
Configuration for Addons that support the overall Mission system.
These are a module to spawn map addons generated with the Eden Editor
And a moduel to spawn static loot crates at specific location
A time acceleration module.
*/
blck_spawnMapAddons = true; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf
blck_spawnStaticLootCrates = true; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent).
// Note that you can define map-specific variants in custom_server\configs\blck_custom_config.sqf
blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
blck_timeAccelerationDay = 1; // Daytime time accelearation
blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 6; // Nighttim time acceleration
/**************************************************************
BLACKLIST LOCATIONS
**************************************************************/
// if true then missions will not spawn within 1000 m of spawn points for Altis, Bornholm, Cherno, Esseker or stratis.
blck_blacklistTraderCities = true; // Set this = true if you would like the mission system to automatically search for the locations of the Epoch trader cities. Note that these are pre-defined in GMS_fnc_findWorld for the most common maps.
// list of locations that are protected against mission spawns
switch (toLower(worldName)) do
{
case "altis": {
blck_locationBlackList append [
//Add location as [[xpos,ypos,0],minimumDistance],
// Note that there should not be a comma after the last item in this table
[[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched.
];
};
case "tanoa": {
blck_locationBlackList append [ ];
};
};
/***********************************************************
GENERAL MISSION SYSTEM CONFIGURATION
***********************************************************/
////////
// Headless Client Configurations
blck_useHC = false; // Not Yet Working
// Kill message configurations
// These determine whether and when messages are sent to players regarding AI Kills or illegal kills that might damage a vehicle.
blck_useKillMessages = false; // when true a message will be broadcast to all players each time an AI is killed; may impact server performance.
blck_useKillScoreMessage = true; // when true a tile is displayed to the killer with the kill score information
blck_useIEDMessages = true;
// MISSION MARKER CONFIGURATION
// blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type
//When set to true,"arrow", text will be to the right of an arrow below the mission marker.
// When set to true,"dot", ext will be to the right of a black dot at the center the mission marker.
blck_labelMapMarkers = [true,"center"];
blck_preciseMapMarkers = true; // Map markers are/are not centered at the loot crate
//Minimum distance between missions
blck_MinDistanceFromMission = 2000;
// global loot crate options
// Options to spawn a smoking wreck near the crate. When the first parameter is true, a wreck or junk pile will be spawned.
// It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission.
blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether.
blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion.
blck_loadCratesTiming = "atMissionCompletion"; // valid choices are "atMissionCompletion" and "atMissionSpawn";
// PLAYER PENALTIES
blck_RunGear = true; // When set to true, AI that have been run over will ve stripped of gear, and the vehicle will be given blck_RunGearDamage of damage.
blck_RunGearDamage = 0.2; // Damage applied to player vehicle for each AI run over
blck_VK_Gear = true; // When set to true, AI that have been killed by a player in a vehicle in the list of forbidden vehicles or using a forbiden gun will be stripped of gear and the vehicle will be given blck_RunGearDamage of damage
blck_VK_RunoverDamage = true; // when the AI was run over blck_RunGearDamage of damage will be applied to the killer's vehicle.
blck_VK_GunnerDamage = true; // when the AI was killed by a gunner on a vehicle that is is in the list of forbidden vehicles, blck_RunGearDamage of damage will be applied to the killer's vehicle each time an AI is killed with a vehicle's gun.
blck_forbidenVehicles = ["B_MRAP_01_hmg_F","O_MRAP_02_hmg_F"]; // Add any vehicles for which you wish to forbid vehicle kills
// For a listing of the guns mounted on various land vehicles see the following link: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Vehicle_Weapons
// HMG_M2 is mounted on the armed offroad that is spawned by Epoch
blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC",/*"HMG_M2",*/"HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","HMG_127_LSV_01"]; // Add any vehicles for which you wish to forbid vehicle kills, o
// GLOBAL MISSION PARAMETERS
blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player, distance and name of AI unit killed are shown.
blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Turn this off if you have vehicle patrols.
blck_cleanupCompositionTimer = 1200; // Mission objects will be deleted after the mission is completed after a deley set by this timer.
blck_cleanUpLootChests = false; // when true, loot crates will be deleted together with other mission objects.
blck_MissionTimout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting.
// AI VEHICLE PATROL PARAMETERS
// Settings for Mission Vehicles.
blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area.
blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out.
blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases
// AI STATIC WEAPON PARAMETERS
blck_useStatic = true; // When true, AI will man static weapons spawned 20-30 meters from the mission center. These are very effective against most vehicles
blck_killEmptyStaticWeapons = true; // When true, static weapons will have damage set to 1 when the AI manning them is killed.
blck_staticWeapons = ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; // [0.50 cal, grenade launcher, AT Launcher]
// AI paratrooper reinforcement paramters
blck_enableReinforcements = false; // When true, reinforcements will be spawned at missions based on a probability defined in each mission template.
// Armed Helis
blck_AIHelis = ["B_Heli_Light_01_armed_F","B_Heli_Transport_01_camo_F","B_Heli_Transport_03_F"]; // The helis used to bring in and drop reinforcements.
// Unarmed Helis provided for reference.
// ["B_Heli_Transport_03_unarmed_EPOCH","O_Heli_Light_02_unarmed_EPOCH","I_Heli_Transport_02_EPOCH"];
// Mission - specific settings
//Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission - this feature is not thoroughly tested.
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = 1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = 1;
#ifdef DBDserver
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
blck_maxcrashsites = 3;
#endif
//Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high
blck_SpawnVeh_Orange = 3; // Number of static weapons at Orange Missions
blck_SpawnVeh_Green = 2; // Number of static weapons at Green Missions
blck_SpawnVeh_Blue = -1; // Number of static weapons at Blue Missions
blck_SpawnVeh_Red = 1; // Number of static weapons at Red Missions
// Defines how many static weapons to spawn. Set this to -1 to disable spawning
blck_SpawnEmplaced_Orange = 3; // Number of static weapons at Orange Missions
blck_SpawnEmplaced_Green = 2; // Number of static weapons at Green Missions
blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions
blck_SpawnEmplaced_Red = 1; // Number of static weapons at Red Missions
// MISSION TIMERS
// Reduce to 1 sec for immediate spawns, or longer if you wish to space the missions out
blck_TMin_Orange = 250;
blck_TMin_Green = 200;
blck_TMin_Blue = 120;
blck_TMin_Red = 150;
#ifdef DBDserver
blck_TMin_Hunter = 120;
blck_TMin_Scouts = 115;
blck_TMin_Crashes = 115;
blck_TMin_UMS = 200;
#endif
//Maximum Spawn time between missions in seconds
blck_TMax_Orange = 360;
blck_TMax_Green = 300;
blck_TMax_Blue = 200;
blck_TMax_Red = 250;
#ifdef DBDserver
blck_TMax_Hunter = 200;
blck_TMax_Scouts = 200;
blck_TMax_Crashes = 200;
blck_TMax_UMS = 280;
#endif
/****************************************************************
GENERAL AI SETTINGS
****************************************************************/
blck_combatMode = "RED"; // Change this to "YELLOW" if the AI wander too far from missions for your tastes.
blck_groupFormation = "WEDGE"; // Possibilities include "WEDGE","VEE","FILE","DIAMOND"
blck_AI_Side = RESISTANCE;
blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack
blck_useNVG = true; // When true, AI will be spawned with NVG if is dark
blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed.
blck_useLaunchers = true; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now
//blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"];
blck_launcherTypes = ["launch_RPG32_F"];
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
//This defines how long after an AI dies that it's body disappears.
blck_bodyCleanUpTimer = 1200; // time in seconds after which dead AI bodies are deleted
// Each time an AI is killed, the location of the killer will be revealed to all AI within this range of the killed AI, set to -1 to disable
// values are ordered as follows [blue, red, green, orange];
blck_AliveAICleanUpTimer = 1200; // Time after mission completion at which any remaining live AI are deleted.
blck_AIAlertDistance = [250,325,450,500];
//blck_AIAlertDistance = [150,225,400,500];
// How precisely player locations will be revealed to AI after an AI kill
// values are ordered as follows [blue, red, green, orange];
blck_AIIntelligence = [0.3, 0.5, 0.7, 0.9];
blck_baseSkill = 1.0; // The overal skill of the AI - range 0.1 to 1.0.
/***************************************************************
MISSION TYPE SPECIFIC AI SETTINGS
**************************************************************/
//This defines the skill, minimum/Maximum number of AI and how many AI groups are spawned for each mission type
// Orange Missions
blck_MinAI_Orange = 20;
blck_MaxAI_Orange = 25;
blck_AIGrps_Orange = 6;
blck_SkillsOrange = [
["aimingAccuracy",0.4],["aimingShake",0.7],["aimingSpeed",0.7],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]
];
// Green Missions
blck_MinAI_Green = 16;
blck_MaxAI_Green = 21;
blck_AIGrps_Green = 5;
blck_SkillsGreen = [
["aimingAccuracy",0.3],["aimingShake",0.65],["aimingSpeed",0.65],["endurance",0.9],["spotDistance",0.9],["spotTime",0.9],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75]
];
// Red Missions
blck_MinAI_Red = 12;
blck_MaxAI_Red = 15;
blck_AIGrps_Red = 3;
blck_SkillsRed = [
["aimingAccuracy",0.2],["aimingShake",0.6],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.8],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70]
];
// Blue Missions
blck_MinAI_Blue = 8;
blck_MaxAI_Blue = 12;
blck_AIGrps_Blue = 2;
blck_SkillsBlue = [
["aimingAccuracy",0.1],["aimingShake",0.5],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60]
];
// Add some money to AI; only works with Exile for now.
blck_maxMoneyOrange = 25;
blck_maxMoneyGreen = 20;
blck_maxMoneyRed = 15;
blck_maxMoneyBlue = 10;
////////////
// Epoch-specific settings
////////////
/*********************************************************************************
AI WEAPONS, UNIFORMS, VESTS AND GEAR
@ -1056,5 +822,4 @@ for examples of how you can do this see \Major\Compositions.sqf
blck_crateTypes = ["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F","Box_NATO_Wps_F","I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F"]; // Default crate type.
diag_log "[blckeagls] Configurations for Epoch Loaded";
blck_configsLoaded = true;
blck_configsEpochLoaded = true;

View File

@ -12,247 +12,11 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
if (blck_debugON) then {diag_log "[blckeagls] Loading blck_configs_exlie.sqf";};
/*
Configuration for Addons that support the overall Mission system.
These are a module to spawn map addons generated with the Eden Editor
And a moduel to spawn static loot crates at specific location
A time acceleration module.
*/
blck_spawnMapAddons = true; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf
blck_spawnStaticLootCrates = true; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent).
// Note that you can define map-specific variants in custom_server\configs\blck_custom_config.sqf
blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
blck_timeAccelerationDay = 1; // Daytime time accelearation
blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 6; // Nighttim time acceleration
/**************************************************************
BLACKLIST LOCATIONS
**************************************************************/
// if true then missions will not spawn within 1000 m of spawn points for Altis, Bornholm, Cherno, Esseker or stratis.
blck_listConcreteMixerZones = true;
blck_blacklistSpawns = true;
blck_blacklistTraderCities = true; // Set this = true if you would like the mission system to automatically search for the locations of the trader cities. Note that these are pre-defined in GMS_fnc_findWorld for the most common maps.
// list of locations that are protected against mission spawns
switch (toLower(worldName)) do
{
case "altis": {
blck_locationBlackList append [
//Add location as [[xpos,ypos,0],minimumDistance],
// Note that there should not be a comma after the last item in this table
[[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched.
];
};
case "tanoa": {
blck_locationBlackList append [ ];
};
};
/***********************************************************
GENERAL MISSION SYSTEM CONFIGURATION
***********************************************************/
////////
// Headless Client Configurations
blck_useHC = false; // Not Yet Working
// Kill message configurations
// These determine whether and when messages are sent to players regarding AI Kills or illegal kills that might damage a vehicle.
blck_useKillMessages = false; // when true a message will be broadcast to all players each time an AI is killed; may impact server performance.
blck_useKillScoreMessage = true; // when true a tile is displayed to the killer with the kill score information
blck_useIEDMessages = true;
// MISSION MARKER CONFIGURATION
// blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type
//When set to true,"arrow", text will be to the right of an arrow below the mission marker.
// When set to true,"dot", ext will be to the right of a black dot at the center the mission marker.
blck_labelMapMarkers = [true,"center"];
blck_preciseMapMarkers = true; // Map markers are/are not centered at the loot crate
//Minimum distance between missions
blck_MinDistanceFromMission = 2000;
// global loot crate options
// Options to spawn a smoking wreck near the mission. When the first parameter is true, a wreck or junk pile will be spawned.
// It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission.
blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether.
blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion.
blck_loadCratesTiming = "atMissionCompletion"; // valid choices are "atMissionCompletion" and "atMissionSpawn";
// PLAYER PENALTIES
blck_RunGear = true; // When set to true, AI that have been run over will ve stripped of gear, and the vehicle will be given blck_RunGearDamage of damage.
blck_RunGearDamage = 0.2; // Damage applied to player vehicle for each AI run over
blck_VK_Gear = true; // When set to true, AI that have been killed by a player in a vehicle in the list of forbidden vehicles or using a forbiden gun will be stripped of gear and the vehicle will be given blck_RunGearDamage of damage
blck_VK_RunoverDamage = true; // when the AI was run over blck_RunGearDamage of damage will be applied to the killer's vehicle.
blck_VK_GunnerDamage = true; // when the AI was killed by a gunner on a vehicle that is is in the list of forbidden vehicles, blck_RunGearDamage of damage will be applied to the killer's vehicle each time an AI is killed with a vehicle's gun.
blck_forbidenVehicles = ["B_MRAP_01_hmg_F","O_MRAP_02_hmg_F"]; // Add any vehicles for which you wish to forbid vehicle kills
// For a listing of the guns mounted on various land vehicles see the following link: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Vehicle_Weapons
blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC",/*"HMG_M2",*/"HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","HMG_127_LSV_01"]; // Add any vehicles for which you wish to forbid vehicle kills, o
// GLOBAL MISSION PARAMETERS
blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player, distance and name of AI unit killed are shown.
blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Turn this off if you have vehicle patrols.
blck_cleanupCompositionTimer = 1200; // Mission objects will be deleted after the mission is completed after a deley set by this timer.
blck_cleanUpLootChests = false; // when true, loot crates will be deleted together with other mission objects.
blck_MissionTimout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting.
// AI VEHICLE PATROL PARAMETERS
// Settings for Mission Vehicles.
blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area.
blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out.
blck_AIPatrolVehicles = ["Exile_Car_Offroad_Armed_Guerilla01","Exile_Car_Offroad_Armed_Guerilla02","Exile_Car_BTR40_MG_Green","Exile_Car_BTR40_MG_Camo","Exile_Car_HMMWV_M134_Green","Exile_Car_HMMWV_M134_Desert",/*"Exile_Car_HMMWV_M134_Desert","Exile_Car_HMMWV_M2_Desert",*/"B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases
// AI STATIC WEAPON PARAMETERS
blck_useStatic = true; // When true, AI will man static weapons spawned 20-30 meters from the mission center. These are very effective against most vehicles
blck_killEmptyStaticWeapons = true; // When true, static weapons will have damage set to 1 when the AI manning them is killed.
blck_staticWeapons = ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; // [0.50 cal, grenade launcher, AT Launcher]
// AI paratrooper reinforcement paramters
blck_enableReinforcements = false; // When true, reinforcements will be spawned at missions based on a probability defined in each mission template.
// Armed Helis
blck_AIHelis = ["B_Heli_Light_01_armed_F","B_Heli_Transport_01_camo_F","B_Heli_Transport_03_F"]; // The helis used to bring in and drop reinforcements.
// Unarmed Helis provided for reference.
// ["Exile_Chopper_Orca_CSAT", "Exile_Chopper_Orca_Black","","Exile_Chopper_Huey_Desert","Exile_Chopper_Hummingbird_Green","Exile_Chopper_Huron_Green"]
// Mission - specific settings
//Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission - this feature is not thoroughly tested.
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = 1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = 1;
#ifdef DBDserver
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
blck_maxcrashsites = 3;
#endif
//Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high
blck_SpawnVeh_Orange = 3; // Number of static weapons at Orange Missions
blck_SpawnVeh_Green = 2; // Number of static weapons at Green Missions
blck_SpawnVeh_Blue = -1; // Number of static weapons at Blue Missions
blck_SpawnVeh_Red = 1; // Number of static weapons at Red Missions
// Defines how many static weapons to spawn. Set this to -1 to disable spawning
blck_SpawnEmplaced_Orange = 3; // Number of static weapons at Orange Missions
blck_SpawnEmplaced_Green = 2; // Number of static weapons at Green Missions
blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions
blck_SpawnEmplaced_Red = 1; // Number of static weapons at Red Missions
// MISSION TIMERS
// Reduce to 1 sec for immediate spawns, or longer if you wish to space the missions out
blck_TMin_Orange = 250;
blck_TMin_Green = 200;
blck_TMin_Blue = 120;
blck_TMin_Red = 150;
#ifdef DBDserver
blck_TMin_Hunter = 120;
blck_TMin_Scouts = 115;
blck_TMin_Crashes = 115;
blck_TMin_UMS = 200;
#endif
//Maximum Spawn time between missions in seconds
blck_TMax_Orange = 360;
blck_TMax_Green = 300;
blck_TMax_Blue = 200;
blck_TMax_Red = 250;
#ifdef DBDserver
blck_TMax_Hunter = 200;
blck_TMax_Scouts = 200;
blck_TMax_Crashes = 200;
blck_TMax_UMS = 280;
#endif
/****************************************************************
GENERAL AI SETTINGS
****************************************************************/
blck_combatMode = "RED"; // Change this to "YELLOW" if the AI wander too far from missions for your tastes.
blck_groupFormation = "WEDGE"; // Possibilities include "WEDGE","VEE","FILE","DIAMOND"
blck_AI_Side = EAST;
blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack
blck_useNVG = true; // When true, AI will be spawned with NVG if is dark
blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed.
blck_useLaunchers = true; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now
//blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"];
blck_launcherTypes = ["launch_RPG32_F"];
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
//This defines how long after an AI dies that it's body disappears.
blck_bodyCleanUpTimer = 1200; // time in seconds after which dead AI bodies are deleted
// Each time an AI is killed, the location of the killer will be revealed to all AI within this range of the killed AI, set to -1 to disable
// values are ordered as follows [blue, red, green, orange];
blck_AliveAICleanUpTimer = 1200; // Time after mission completion at which any remaining live AI are deleted.
blck_AIAlertDistance = [250,325,450,500];
//blck_AIAlertDistance = [150,225,400,500];
// How precisely player locations will be revealed to AI after an AI kill
// values are ordered as follows [blue, red, green, orange];
blck_AIIntelligence = [0.3, 0.5, 0.7, 0.9];
blck_baseSkill = 1.0; // The overal skill of the AI - range 0.1 to 1.0.
/***************************************************************
MISSION TYPE SPECIFIC AI SETTINGS
**************************************************************/
//This defines the skill, minimum/Maximum number of AI and how many AI groups are spawned for each mission type
// Orange Missions
blck_MinAI_Orange = 20;
blck_MaxAI_Orange = 25;
blck_AIGrps_Orange = 6;
blck_SkillsOrange = [
["aimingAccuracy",0.4],["aimingShake",0.7],["aimingSpeed",0.7],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]
];
// Green Missions
blck_MinAI_Green = 16;
blck_MaxAI_Green = 21;
blck_AIGrps_Green = 5;
blck_SkillsGreen = [
["aimingAccuracy",0.3],["aimingShake",0.65],["aimingSpeed",0.65],["endurance",0.9],["spotDistance",0.9],["spotTime",0.9],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75]
];
// Red Missions
blck_MinAI_Red = 12;
blck_MaxAI_Red = 15;
blck_AIGrps_Red = 3;
blck_SkillsRed = [
["aimingAccuracy",0.2],["aimingShake",0.6],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.8],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70]
];
// Blue Missions
blck_MinAI_Blue = 8;
blck_MaxAI_Blue = 12;
blck_AIGrps_Blue = 2;
blck_SkillsBlue = [
["aimingAccuracy",0.1],["aimingShake",0.5],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60]
];
// Add some money to AI; only works with Exile for now.
blck_maxMoneyOrange = 25;
blck_maxMoneyGreen = 20;
blck_maxMoneyRed = 15;
blck_maxMoneyBlue = 10;
////////////
// Exile-specific settings
////////////
/*********************************************************************************
@ -260,8 +24,6 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
**********************************************************************************/
#define useAPEX 1
// Blacklisted itesm
blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"];
@ -1053,4 +815,4 @@ for examples of how you can do this see \Major\Compositions.sqf
diag_log format["[blckeagls] Configurations for Exile Loaded"];
blck_configsLoaded = true;
blck_configsExileLoaded = true;

View File

@ -13,39 +13,103 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
diag_log "[blckeagls] Loading Configuration Overides";
switch (toLower (worldName)) do
{
case"tanoa": {blck_maxCrashSites = 2};
case"namalsk": {
blck_enableOrangeMissions = -1;
blck_enableGreenMissions = -1;
blck_enableRedMissions = -1;
blck_enableBlueMissions = 1;
}
private["_startTime"];
_startTime = diag_tickTime;
_world = toLower format ["%1", worldName];
private["_nightAccel","_dayAccel","_duskAccel"];
switch (_world) do {
case "altis":{_nightAccel = 3;_dayAccel=0.5; _duskAccel = 3;};
case "napf":{_nightAccel = 12; _dayAccel = 2;_duskAccel = 6;};
case "namalsk":{_nightAccel = 12; _dayAccel = 2;_duskAccel = 6;};
case "tanoa":{_nightAccel = 12; _dayAccel = 3.2;_duskAccel = 6;};
};
if (blck_debugON) then
switch (toLower (worldName)) do
{
case "altis":
{
blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
blck_timeAccelerationDay = 1.5; // Daytime time accelearation
blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 8; // Nighttim time acceleration
};
case"tanoa":
{
blck_maxCrashSites = 2;
blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
blck_timeAccelerationDay = 1.4; // Daytime time accelearation
blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 8; // Nighttim time acceleration
};
case"namalsk":
{
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = -1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = -1;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = -1;
blck_maxCrashSites = -1; // recommended settings: 3 for Altis, 2 for Tanoa, 1 for smaller maps. Set to -1 to disable
blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
blck_timeAccelerationDay = 2; // Daytime time accelearation
blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 8; // Nighttim time acceleration
};
case "esseker":
{
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = -1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = -1;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = -1;
blck_maxCrashSites = 1;
blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
blck_timeAccelerationDay = 1; // Daytime time accelearation
blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 6; // Nighttim time acceleration
};
case "panthera3":
{
blck_maxCrashSites = 2;
blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
blck_timeAccelerationDay = 1.4; // Daytime time accelearation
blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 8; // Nighttim time acceleration
};
};
if (blck_debugON || (blck_debugLevel isEqualTo 3)) then
{
// Used primarily for debugging.
diag_log "[blckeagls] Debug seting is ON, Custom configurations used";
blck_timeAccelerationDay = 6; // Daytime time accelearation
blck_timeAccelerationDusk = 6; // Dawn/dusk time accelearation
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = 1;
blck_mainThreadUpdateInterval = 10;
blck_enableOrangeMissions = 0;
blck_enableGreenMissions = 0;
blck_enableRedMissions = 1;
blck_enableBlueMissions = 1;
blck_enableHunterMissions = 0;
blck_enableScoutsMissions = 0;
blck_maxCrashSites = 0;
blck_enabeUnderwaterMissions = -1;
blck_cleanupCompositionTimer = 10; // Time after mission completion at which items in the composition are deleted.
blck_AliveAICleanUpTimer = 10; // Time after mission completion at which any remaining live AI are deleted.
blck_bodyCleanUpTimer = 10;
blck_SpawnEmplaced_Orange = 3; // Number of static weapons at Orange Missions
blck_SpawnEmplaced_Green = 2; // Number of static weapons at Green Missions
blck_SpawnEmplaced_Orange = 4; // Number of static weapons at Orange Missions
blck_SpawnEmplaced_Green = 3; // Number of static weapons at Green Missions
blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions
blck_SpawnEmplaced_Red = 2;
@ -54,31 +118,32 @@ if (blck_debugON) then
blck_SpawnVeh_Blue = 1; // Number of static weapons at Blue Missions
blck_SpawnVeh_Red = 2;
//blck_reinforcementsBlue = [0, 0, 0.0, 0]; // Chance of reinforcements, number of reinforcements, Chance of reinforcing heli patrols, chance of dropping supplies for the reinforcements
blck_TMin_Blue = 7;
blck_TMin_Red = 20;
blck_TMin_Red = 30;
blck_TMin_Green = 23;
blck_TMin_Orange = 20;
blck_TMin_Hunter = 15;
blck_TMin_Scouts = 20;
blck_TMin_Crashes = 5;
//Maximum Spawn time between missions in seconds
blck_TMax_Blue = 12;
blck_TMax_Red = 35;
blck_TMax_Red = 40;
blck_TMax_Green = 38;
blck_TMax_Orange = 31;
//blck_reinforceBlue = [0.999, 2, 0.001];
//blck_MissionTimout = 10; // 40 min
blck_TMax_Hunter = 40;
blck_TMax_Scouts = 45;
blck_TMax_Crashes = 15;
//blck_MissionTimout = 120; // 40 min
blck_SkillsBlue = [
["aimingAccuracy",0.01],
["aimingShake",0.3],
["aimingShake",0.01],
["aimingSpeed",0.01],
["endurance",0.5],
["spotDistance",0.7],
["spotTime",0.7],
["courage",0.7],
["endurance",0.01],
["spotDistance",0.01],
["spotTime",0.01],
["courage",0.01],
["reloadSpeed",0.80],
["commanding",0.8],
["general",1.00]

View File

@ -0,0 +1,18 @@
/*
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last Modified 3-14-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/
*/
#define modUsed true
#define DBDserver 1
#define wpModeMove
#define useAPEX 1

View File

@ -4,42 +4,52 @@ 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.
3/15/17 Version 6.58 Build 42
Disabled DBDServer settings for this public release.
Added a missing file (custom_server\Compiles\Missions\GMS_fnc_missionAIareDead.sqf )
3/17/17 Version 6.58 Build 43
Reverted back to v6.56 build 39 then:
[Added] a Hit event handler to make AI more responsive. All AI in the group to which the hit AI belongs are informed of the shooter's location.
[Changed] the Killed event handler as below.
[Added] New logic for informing AI of the location of players to give AI a more gradual ramp up from little knowledge about player location to full knowledge.
[Added] scripts and functions for reinforcements: a) heli patrols; b) paratroops.
[Added] ...\custom_server\Configs\blck_defines.hpp inside which you can disable APEX gear and other attributes.
3/13/17 Version 6.58 Build 41
[Changed] Re-organized variables in the configs.
[Changed] Divided configs into tow basic parts:
- General configs for the mission system.
- Mod-specific configs.
[Changed] spawnMarker.sqf in the debug folder (mission.pbo) to reduce unneeded logging.
3/13/17 Version 6.57 Build 41
Changed the method of tracking live AI from an array of units to an array of groups which will aid in monitoring groups for a 'stuck' state.
Added Search and Destroy waypoints for each location in the waypoint cycle.
Change waypoint compbat mode to "COMBAT"
Added Group Waypoint Monitor that deals with the case wherein a group gets 'stuck' in a search and destroy waypoint without any nearby targets.
Updated spawnMarker.sqf in the debug folder (mission.pbo) to reduce unneeded logging.
3/12/17 Version 6.57 Build 40
3/12/17 Version 6.57 Build 40 Reworked AI Event handlers
Added an event handler to make AI more responsive.
Revised logic for informing AI of the location of players to give AI a more gradual ramp up from little knowledge about player location to full knowledge.
2/24/17 Version 6.56 Build 39.
2/24/17 Version 6.56 Build 39. Reworked Mission End Criteria and timing of loading of loot chests
Added a check so that mission completion by players near loot crates was tripped only when players were on foot.
Added a setting that determines whether loot crates are loaded when the mission spawns or once the mission is complete.
see blck_loadCratesTiming = "atMissionCompletion"; (line 78) for this configuration setting.
1/28/17 Version 6.55 Build 38
1/28/17 Version 6.55 Build 38 Bug Fixes
bug fixes
Commented out logging that is no longer needed
Removed a weapon from loot tables that could be used for dupping.
1/24/17 Version 6.55 Build 35
1/24/17 Version 6.55 Build 35 Improved handling of static weapons with dead AI; added option to delete loot chests at some time after mission completion.
Added a new configuration blck_killEmptyStaticWeapons which determines if static weapons shoudl be disabled after the AI is killed.
Added a configuration blck_cleanUpLootChests that determines if loot crates are deleted when other mission objects are deleted.
Fixed an issue that prevented proper deletion of mission objects and live AI.
1/23/17 Version 6.54 Build 33
1/23/17 Version 6.54 Build 33 Bug Fixes
Fixed typos in GMS_fnc_vehicleMonitor.sqf
Removed a few files that are not used or needed.
Removed some code that had been commented out from blck_functions.sqf.
1/22/17 Version 6.54 build 32
1/22/17 Version 6.54 build 32 Primarily performance-oriented improvements to switch from using timers and .sqf to a 'thread' that scans various arrays related to missions and mission objects using pre-compiled functions.
Changed code to test for conditions that trigger to spawn mission objects and AI completely
Rewrote the code for spawning emplaced weapons from scratch.
Fixed an error in how the waitTime till a mission was respawned after being updated to inactive status.
@ -58,7 +68,7 @@ Tweaked code for deleting dead AI to also delete any weapons containers nearby.
Checked throughout for potential scope issues; ensured all private variables were declared as such.
Changed the method by which mission patrol vehicles and static weapons are deleted at the end of a mission.
1/21/17 Build 29.
1/21/17 Build 29. Reverted to an older system for mission timers.
Went back to the timerless system for spawning missions.
Improved code for updating the array of pending/active missions
GMS_fnc_updateMissionQue.sqf re-written to take greater advantage of existing array commands: set and find.
@ -67,7 +77,7 @@ Ensured that the array used to store the location(s) of active or recent mission
1/13/17 Version 6.54 Build 27
Rerverted back to the code that spawned a single instance of each mission until I can debug certain issues.
1/7/17 Version 6.53 Build 24
1/7/17 Version 6.53 Build 24 AI difficulty updates; some performance improvements.
Added a setting blck_baseSkill = 0.7; // This defines the base skil of AI. Increase it to make AI more challenging.
Tweaked AI difficulty settings to make missions more difficult.
changed - GMS_EH_unitKilled - the event handler now uses precompiled rather than compiled on the fly code.
@ -79,7 +89,7 @@ fixed - GMS_fnc_updateMissionQue was not correctly updating mission information
fixed - GMS_fnc_mainThread was not deleted old AI and Vehicles from the arrays used to capture them after mission completion.
changed - calls to GMS_fnc_vehicleMonitor were moved inside the main loop.
1/3/17 Version 6.51 Build 23
1/3/17 Version 6.51 Build 23 Added several new kinds of messaging to the UI.
Moved configuration for the client from debug\blckclient.sqf to debug\blckconfig.sqf.
Added a setting blck_useKillMessages = true/false; (line 60 of the config. when true, kill messages will be send to all players when a player kills an AI. The style of the message is controlled client-side (debug\blck_config.sqf)
Added a setting blck_useKillScoreMessage = true/false; // (line 61 of the config) when true a tile is displayed to the killer with the kill score information
@ -89,19 +99,19 @@ Added a way to easily include / exclude APEX items. To exclude them comment out
#define useAPEX 1
at approximately line 219 in the config.
12/21/16 Version 6.50 Build 21
12/21/16 Version 6.50 Build 21 Added checks that delete empty groups.
Added a check for mod type to the routine that deletes empty groups as this is only needed for Epoch.
Added back the code that (a) eliminates the mission timers and (b) allows multiple instances of a mission to be spawned.
12/20/16 Version 6.46 Buid 20
12/20/16 Version 6.46 Buid 20 Tweaks to time acceleration module.
Moved Variables for time acceleration to the config files.
Reworked code for time acceleration to use timeDay and BIS_fnc_sunriseSunsetTime.
11/20/16 Build 6.45 Build 19
11/20/16 Build 6.45 Build 19 UI-related additions and bug fixes.
Added Option to display mission information in Toasts (Exile Only).
Fixed an issue related to bugs in Arma 1.66
11/16/16 Version 6.44 Build 15
11/16/16 Version 6.44 Build 15 Added options for automated generation of location blacklists; added APEX gear; tweaks to the code that loads items into crates.
Added parameters
blck_blacklistTraderCities=true; // the locations of the Epoch/Exile trader cities will be pulled from the config and added to the location blacklist for the mission system.
blcklistConcreteMixerZones = true; // Locations of the concrete mixers will be pulled from the configs; no missions will be spawned within 1000 m of these locations.
@ -116,15 +126,15 @@ Changed: Divided rifles and optics into subcategories to better enable assigning
Changed: DLS crate loader (not publically available yet) now uses blck_fnc_loadLootItemsFromArray rather than the prior approach for which specific crate loading functions were called depending on the loadout type (weapons, building supplies, foord etc).
Fixed: You can now loot AI bodies in Epoch.
11/12/16 Version 6.43 Build 12
11/12/16 Version 6.43 Build 12 Added MAP ADDONS and Loot Crate Spawners.
Added: MapAddons - use this to spawn AI strongholds or other compositions you generate with Eden editor at server startup.
Added: Loot Crate Spawner - Spawn loot crates at prespecified points. This is designed so that you can spawn crates inside buildings or other structures spawned through the map-addons.
Added: APEX weapons, sights and optics to AI and loot crates.
11/12/16 Version 6.42 Build 11
11/12/16 Version 6.42 Build 11 Added code to fit weapons attachments.
Enhancements to code to equip weapons; pointrs, silencers and bipods are now attached.
11/11/16 Version 6.42 build 10
11/11/16 Version 6.42 build 10 Added code to fit weapons attachments. Improved code to spawn mission objects.
Redid the code that spawns the objects at missions to work properly with the new formats generated by M3Arma EDEN Editor whilc being backwards compatible with older formats used in the existing missions.
Added code to add scopes and other attachments to AI weapons.
Added new variable blck_blacklistedOptics which you can use to block spawning optics like TMS.
@ -133,53 +143,53 @@ Fixed: launchers and rounds should now be deleted when blck_removeLaunchers = tr
Fixed: All AI should spawn with a uniform.
More bug fixes and correction of typos.
11/2/16 Version 6.41 Build 9
11/2/16 Version 6.41 Build 9 Kill message improvements; added money to AI.
Added a parameter blck_useKilledAIName that, when true, changes the kill messages to show player name and AI unit name
Added message to players for killstreaks and a crypto/Tabs bonus for killstreaks.
Exile: AI spawn with a few tabs.
//Epoch: AI spawn with a few Crypto
Corrected an error that would spawn Epoch NVG on AI in Exile.
10/25/16 Version 6.4 Build 8
10/25/16 Version 6.4 Build 8 Code improvements.
Reworked the code to spawn vehicle patrols and static weapons and clean them up.
Reworked the code that messages players to be sure that calling titleText does not hang the messaging function and delay hints or system chat notifications.
10/22/16 v 6.3 Build 8-14-16
10/22/16 v 6.3 Build 8-14-16 Code performance improvements.
Moved routines that delete dead AI, Alive AI and mission objects from individual loops to a single loop spawned by blck_init.sqf.
Added functions to cache these data with time stamps for later time-based deletion.
10/21/16 Version 6.2 Build 7
10/21/16 Version 6.2 Build 7 Coding improvements
Redid system for markers which are now defined in the mission template reducing dependence on client side configurations for each mission or marker type.
Bug-fixes for helicrashes including ensuring that live AI are despawned after a certain time.
10-1-16 Version 6.1.4 Build 6
10-1-16 Version 6.1.4 Build 6 Added a time acceleration function
1) Added back the time acceleration module
9-25-16 Version 6.1.4 Build 6
9-25-16 Version 6.1.4 Build 6 bug fixes; added metadata.
1) Added metadata for Australia 5.0.1
2) Fixed bugs with the IED notifications used when a player is penalized for illeagal AI Kills. _fnc_processIlegalKills (server side) and blckClient (client side) reworked. _this select 0 etc was replaced with params[] throughout. Many minor errors were corrected.
9/24/16 Version 6.1.3 Build 5
9/24/16 Version 6.1.3 Build 5 Code optimization
1) Re-wrote the SLS crate spawning code which now relies on functions for crate spawning and generating a smoke source already used by the mission system. Replaced old functions with newer ones (e.g., params[] and selectRandom). Found a few bugs. Broke the script up into several discrete functions. Tested on Exile and Epoch,
2) Reworked the code for generating a smoke source. Added additional options with defaults set using params[].
9-19-16 Ver 6.1.2/11/16
9-19-16 Ver 6.1.2/11/16 Bug fixes.
Minor bug fixes to support Exile.
Corrected errors with scout and hunter missions trying to spawn using Epoch headgear.
Corrected error wherein AI were spawned as Epoch soldiers
Inactivated a call to an exile function that had no value
9-15-16 vER 6.1.1
9-15-16 vER 6.1.1 Bug fixes.
1) Reverted to the old spawnUnits routine because the new one was not spawning AI at Scouts and Hunters correctly.
9-13-16 Ver 6.10
9-13-16 Ver 6.10 Improved vehicle patrols.
1) Added waypoints for spawned AI Vehicles.
2) Reworked the logic for generating the positions of these waypoints
3) Added loiter waypoints in addition to move wayponts.
4) Reworked the param/params for spawnUnits
5) several other minor optimizations.
9-3-16 Ver 6.0
9-3-16 Ver 6.0
1) Re-did the custom_server folder so the mod automatically starts. Blck_client.sqf no longer calls the mod from the server.
2) Added a variable blck_modType which presently can be either "Epoch" or "Exile" with the aim of having a single mission system for both mods.
3) Added a more intelligent method for loading key components (variables, functions, and map-specific parameters).

View File

@ -15,7 +15,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
if !(isNil "blck_Initialized") exitWith{};
private["_blck_loadingStartTime"];
@ -23,6 +23,10 @@ _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};
@ -36,28 +40,10 @@ waitUntil{blck_functionsCompiled};
blck_functionsCompiled = nil;
diag_log format["[blckeagls] debug mode settings:blck_debugON = %1",blck_debugON];
private["_modType"];
_modType = [] call blck_fnc_getModType;
if (_modType isEqualTo "Epoch") then
{
diag_log format["[blckeagls] Loading Mission System using Parameters for %1",_modType];
execVM "\q\addons\custom_server\Configs\blck_configs_epoch.sqf";
waitUntil {(isNil "blck_configsLoaded") isEqualTo false;};
waitUntil{blck_configsLoaded};
blck_configsLoaded = nil;
diag_log "[blckeagles] Running getTraderCitiesEpoch to get location of trader cities";
execVM "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitesEpoch.sqf";;
};
if (_modType isEqualTo "Exile") then
{
diag_log format["[blckeagls] Loading Mission System using Parameters for %1",_modType];
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_configs_exile.sqf";
waitUntil {(isNil "blck_configsLoaded") isEqualTo false;};
waitUntil{blck_configsLoaded};
blck_configsLoaded = nil;
if (blck_blacklistTraderCities || blck_blacklistSpawns || blck_listConcreteMixerZones) then {execVM "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitesExile.sqf";};
};
execVM "\q\addons\custom_server\Configs\blck_configs.sqf";
waitUntil {(isNil "blck_configsLoaded") isEqualTo false;};
waitUntil{blck_configsLoaded};
blck_configsLoaded = nil;
// spawn map addons to give the server time to position them before spawning in crates etc.
if (blck_spawnMapAddons) then
@ -78,10 +64,18 @@ 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 for mod = %3 Loaded in %4 seconds",_blck_versionDate,_blck_version,_modType,diag_tickTime - _blck_loadingStartTime]; //,blck_modType];
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
{
@ -91,7 +85,6 @@ diag_log "[blckeagls] Player Connected, loading mission system";
if (blck_spawnStaticLootCrates) then
{
blck_SLSComplete = false;
// Start the static loot crate spawner
[] execVM "\q\addons\custom_server\SLS\SLS_init.sqf";
waitUntil {(isNil "blck_SLSComplete") isEqualTo false;};
@ -123,10 +116,25 @@ 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] 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] call blck_fnc_addMissionToQue;
};
//diag_log "[blckeagls] >>--- Completed initialization";
//blck_Initialized = true;
// 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;

View File

@ -1,17 +1,3 @@
/*
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last Modified 3-14-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\Compiles\blck_defines.hpp";
private ["_version","_versionDate"];
_blck_version = "6.58 Build 42";
_blck_versionDate = "3-15-17 8:00 AM";
_blck_versionDate = "3-16-17 8:00 PM";

View File

@ -9,7 +9,7 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
///////////////////////////////////////////////
// prevent the system from being started twice