Changed WP settings and logic. Changed the system for tracking live AI from unit based to group-based which should save some memory and CPU.
This commit is contained in:
parent
fcdc4a57d7
commit
310ec8dd20
@ -1,12 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
By Ghostrider-DbD-
|
By Ghostrider-DbD-
|
||||||
Last modified 1-24-17
|
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\Compiles\blck_defines.hpp";
|
||||||
//#define DBDserver 1
|
//#define DBDserver 1
|
||||||
|
|
||||||
diag_log format["starting _fnc_mainThread with time = %1",diag_tickTime];
|
diag_log format["starting _fnc_mainThread with time = %1",diag_tickTime];
|
||||||
private["_modType","_timer1sec","_timer20sec","_timer5min"];
|
|
||||||
|
#ifdef DBDserver
|
||||||
|
diag_log "running DBDServer version of _fnc_mainThread";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private["_modType","_timer1sec","_timer5sec","_timer20sec","_timer5min"];
|
||||||
_timer1sec = diag_tickTime;
|
_timer1sec = diag_tickTime;
|
||||||
|
_timer5sec = diag_tickTime;
|
||||||
_timer20sec = diag_tickTime;
|
_timer20sec = diag_tickTime;
|
||||||
_timer5min = diag_tickTime;
|
_timer5min = diag_tickTime;
|
||||||
_modType = [] call blck_fnc_getModType;
|
_modType = [] call blck_fnc_getModType;
|
||||||
@ -22,17 +35,24 @@ while {true} do
|
|||||||
#endif
|
#endif
|
||||||
_timer1sec - diag_tickTime;
|
_timer1sec - diag_tickTime;
|
||||||
};
|
};
|
||||||
|
if (diag_tickTime - _timer5sec > 5) then
|
||||||
|
{
|
||||||
|
_timer5sec = diag_tickTime;
|
||||||
|
|
||||||
|
};
|
||||||
if (diag_tickTime - _timer20sec > 20) then
|
if (diag_tickTime - _timer20sec > 20) then
|
||||||
{
|
{
|
||||||
[] call blck_fnc_cleanupAliveAI;
|
[] call blck_fnc_cleanupAliveAI;
|
||||||
[] call blck_fnc_cleanupObjects;
|
[] call blck_fnc_cleanupObjects;
|
||||||
[] call blck_fnc_cleanupDeadAI;
|
[] call blck_fnc_cleanupDeadAI;
|
||||||
[] call blck_fnc_spawnPendingMissions;
|
[] call blck_fnc_spawnPendingMissions;
|
||||||
|
[] call blck_fnc_missionGroupMonitor;
|
||||||
if (_modType isEqualTo "Epoch") then
|
if (_modType isEqualTo "Epoch") then
|
||||||
{
|
{
|
||||||
[] call blck_fnc_cleanEmptyGroups;
|
[] call blck_fnc_cleanEmptyGroups;
|
||||||
}; // Exile cleans up empty groups automatically so this should not be needed with that mod.
|
}; // Exile cleans up empty groups automatically so this should not be needed with that mod.
|
||||||
_timer20sec = diag_tickTime;
|
_timer20sec = diag_tickTime;
|
||||||
|
//diag_log format["_mainThread::-->> diag_tickTime = %1",diag_tickTime];
|
||||||
};
|
};
|
||||||
if (diag_tickTime - _timer5min > 300) then
|
if (diag_tickTime - _timer5min > 300) then
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
// Changes type of waypont0 for the specified group to "MOVE" and updates time stamps, WP postion and Timout parameters accordinglyD.
|
||||||
|
/*
|
||||||
|
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["_group","_wp","_wpPos","_dis","_arc"];
|
||||||
|
|
||||||
|
//diag_log format["_fnc_changeToMoveWaypoint:: -- :: _this = %1 with typeName _this = %2",_this, typeName _this];
|
||||||
|
|
||||||
|
if !(typeName _this isEqualTo "OBJECT") exitWith {diag_log "_fnc_changeToSADWaypoint aborted for incorrect parameter. You must pass a unit in the group for this to function";};
|
||||||
|
_group = group _this;
|
||||||
|
//diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
|
||||||
|
|
||||||
|
_group setVariable["timeStamp",diag_tickTime];
|
||||||
|
_wp = [_group, 0];
|
||||||
|
_wpPos = getPos ((units _group) select 0);
|
||||||
|
_dis = (_group getVariable["minDis"]) + random( (_group getVariable["maxDis"]) - (_group getVariable["minDis"]));
|
||||||
|
if (_group getVariable["wpMode","random"] isEqualTo "random") then
|
||||||
|
{
|
||||||
|
_arc = random(360);
|
||||||
|
} else {
|
||||||
|
_arc = (_group getVariable["arc",0]) + 70;
|
||||||
|
_group setVariable["arc",_arc];
|
||||||
|
};
|
||||||
|
_newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc];
|
||||||
|
_group setCurrentWaypoint _wp;
|
||||||
|
_wp setWaypointType "MOVE";
|
||||||
|
_wp setWaypointName "move";
|
||||||
|
//_wp setWaypointBehaviour "COMBAT";
|
||||||
|
//_wp setWaypointCombatMode "RED";
|
||||||
|
_wp setWaypointTimeout [1,1.1,1.2];
|
||||||
|
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"];
|
||||||
|
_wp setWaypointPosition _newPos;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
// Sets the WP type for WP for the specified group and updates other atributes accordingly.
|
||||||
|
/*
|
||||||
|
for DBD Clan
|
||||||
|
By Ghostrider-DBD-
|
||||||
|
Copyright 2016
|
||||||
|
Last modified 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["_group","_wp"];
|
||||||
|
|
||||||
|
//diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
|
||||||
|
_group = group _this;
|
||||||
|
//diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
|
||||||
|
|
||||||
|
_group setVariable["timeStamp",diag_tickTime];
|
||||||
|
_wp = [_group, 0];
|
||||||
|
_group setCurrentWaypoint _wp;
|
||||||
|
_wp setWaypointType "SAD";
|
||||||
|
_wp setWaypointName "sad";
|
||||||
|
//_wp setWaypointBehaviour "COMBAT";
|
||||||
|
//_wp setWaypointCombatMode "RED";
|
||||||
|
_wp setWaypointTimeout [60,75,90];
|
||||||
|
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
call as [] call blck_fnc_cleanEmptyGroups;
|
||||||
|
Deletes any empty groups and thereby prevents errors resulting from createGroup returning nullGroup.
|
||||||
|
By Ghostrider-DbD-
|
||||||
|
11/16/16
|
||||||
|
*/
|
||||||
|
if (blck_debugLevel > 2) then
|
||||||
|
{
|
||||||
|
diag_log format ["_fnc_cleanEmptyGroups:: -- >> group count = %1 ",(count allGroups)];
|
||||||
|
diag_log format ["_fnc_cleanEmptyGroups:: -- >> Group count AI side = %1", call blck_fnc_groupsOnAISide];
|
||||||
|
};
|
||||||
|
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";};
|
||||||
|
|
@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
[] call blck_fnc_waypointMonitor;
|
||||||
|
|
||||||
|
Scans all groups in for those that have been stuck in a particular waypoint for an excessive time and checks if they are in combat.
|
||||||
|
If not it directs them to the next waypoint.
|
||||||
|
It uses a timestamp attached to the group that is cleared upon waypoint completion.
|
||||||
|
|
||||||
|
By Ghostrider-DbD-
|
||||||
|
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";
|
||||||
|
|
||||||
|
//diag_log format["_fnc_waypointMonitor::-->> running function at diag_tickTime = %1 with blck_fnc_missionGroupMonitor = %2",diag_tickTime,blck_monitoredMissionAIGroups];
|
||||||
|
|
||||||
|
_fn_allPlayers = {
|
||||||
|
private ["_players"];
|
||||||
|
_players = [];
|
||||||
|
{
|
||||||
|
if (isPlayer _x) then {_players pushback _x};
|
||||||
|
}forEach playableUnits;
|
||||||
|
//diag_log format["_fn_allPlayers::-->> result s %1",_players];
|
||||||
|
_players
|
||||||
|
};
|
||||||
|
|
||||||
|
_fn_aliveGroupUnits = {
|
||||||
|
private["_grp","_aliveUnits"];
|
||||||
|
_grp = _this select 0;
|
||||||
|
_aliveUnits = [];
|
||||||
|
{
|
||||||
|
if ( alive _x) then {_aliveUnits pushback _x};
|
||||||
|
} forEach (units _grp);
|
||||||
|
_aliveUnits
|
||||||
|
};
|
||||||
|
|
||||||
|
_fn_inCombat = {
|
||||||
|
private["_grp","_targets","_players","_aliveUnits"];
|
||||||
|
_grp = _this select 0;
|
||||||
|
_players = [] call _fn_allPlayers;
|
||||||
|
_aliveUnits = [_grp] call _fn_aliveGroupUnits;
|
||||||
|
_inCombat = false;
|
||||||
|
{
|
||||||
|
_targets = _x findNearestEnemy (position _x);
|
||||||
|
if !(isNull _targets) exitWith {_inCombat = true};
|
||||||
|
} forEach _aliveUnits;
|
||||||
|
//diag_log format["_fn_inCombat::-->> _grp to test is %1 and result is %2",_grp,_inCombat];
|
||||||
|
_inCombat;
|
||||||
|
};
|
||||||
|
|
||||||
|
_fn_removeEmptyOrNullGroups = {
|
||||||
|
//diag_log format["_fn_removeEmptyOrNullGroups::-->> excuting function at %1",diag_tickTime];
|
||||||
|
// Remove any null groups (which will occur if all units in the group are dead) or groups with no alive AI.
|
||||||
|
for "_i" from 0 to ((count blck_monitoredMissionAIGroups) - 1) do
|
||||||
|
{
|
||||||
|
private["_grp"];
|
||||||
|
if (_i >= (count blck_monitoredMissionAIGroups)) exitWith {};
|
||||||
|
_grp = blck_monitoredMissionAIGroups select _i;
|
||||||
|
if (_grp isEqualTo grpNull) then {
|
||||||
|
blck_monitoredMissionAIGroups set[_i, -1];
|
||||||
|
blck_monitoredMissionAIGroups = blck_monitoredMissionAIGroups - [-1];
|
||||||
|
//diag_log "_fnc_waypointMonitor::-->> deleting a NULL-GROUP";
|
||||||
|
};
|
||||||
|
if ({alive _x} count units _grp < 1) then {
|
||||||
|
blck_monitoredMissionAIGroups = blck_monitoredMissionAIGroups - [_grp];
|
||||||
|
//diag_log "_fnc_waypointMonitor::-->> deleting an empty group";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_fn_monitorGroupWaypoints = {
|
||||||
|
{
|
||||||
|
private["_timeStamp","_index","_unit"];
|
||||||
|
|
||||||
|
_timeStamp = _x getVariable ["timeStamp",0];
|
||||||
|
if (_timeStamp isEqualTo 0) then {
|
||||||
|
_group setVariable["timeStamp",diag_tickTime];
|
||||||
|
//diag_log format["_fn_monitorGroupWaypoints::--> updating timestamp for group %1 at time %2",__x,diag_tickTime];
|
||||||
|
};
|
||||||
|
if (diag_tickTime > (_x getVariable "timeStamp") + 300) then
|
||||||
|
{
|
||||||
|
if !([_x] call _fn_inCombat) then
|
||||||
|
{
|
||||||
|
_units = [_x] call _fn_aliveGroupUnits;
|
||||||
|
if (count _units > 0) then
|
||||||
|
{
|
||||||
|
_u = _units select 0;
|
||||||
|
if (vehicle _u isEqualTo _u) then // Only do this for foot patrols at present.
|
||||||
|
{
|
||||||
|
_index = currentWaypoint _x;
|
||||||
|
if ( (waypointName [_x, _index]) isEqualTo "move") then {
|
||||||
|
//diag_log format["_fn_monitorGroupWaypoints:: -- >> updating waypoint for group %1 to SAD at %2",_x,diag_tickTime];
|
||||||
|
[_u] call blck_fnc_changetoSADWaypoint;
|
||||||
|
};
|
||||||
|
if ( (waypointName [_x, _index])isEqualTo "sad") then {
|
||||||
|
//diag_log format["_fn_monitorGroupWaypoints:: -- >> updating waypoint for group %1 to Move at %2",_x,diag_tickTime];
|
||||||
|
[_u] call blck_fnc_changeToMoveWaypoint;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach blck_monitoredMissionAIGroups;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////
|
||||||
|
// Start of main function
|
||||||
|
////////
|
||||||
|
//diag_log format["_fnc_missionGroupMonitor: executing function at %1",diag_tickTime];
|
||||||
|
uiSleep 0.1;
|
||||||
|
[] call _fn_removeEmptyOrNullGroups;
|
||||||
|
[] call _fn_monitorGroupWaypoints;
|
@ -3,11 +3,19 @@
|
|||||||
for DBD Clan
|
for DBD Clan
|
||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 8-13-16
|
Last modified 3/14/17
|
||||||
*/
|
|
||||||
|
|
||||||
private["_dist","_dir","_arc","_xpos","_ypos","_newpos","_wpradius","_wpnum","_oldpos"];
|
--------------------------
|
||||||
params["_pos","_minDis","_maxDis","_group"];
|
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["_dir","_arc","_noWp","_newpos","_wpradius","_wp"];
|
||||||
|
params["_pos","_minDis","_maxDis","_group",["_mode","random"]];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
_pos = _this select 0; // center of the patrol area
|
_pos = _this select 0; // center of the patrol area
|
||||||
@ -16,27 +24,33 @@ _maxDis = _this select 2; // maximum distance from the center of a patrol area f
|
|||||||
_group = _this select 3;
|
_group = _this select 3;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_wpradius = 30;
|
|
||||||
_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;
|
|
||||||
|
|
||||||
_dist = (_minDis+(random (_maxDis - _minDis)));
|
_group setVariable["patrolCenter",_pos];
|
||||||
_xpos = (_pos select 0) + sin (_dir) * _dist;
|
_group setVariable["minDis",_minDis];
|
||||||
_ypos = (_pos select 1) + cos (_dir) * _dist;
|
_group setVariable["maxDis",_maxDis];
|
||||||
_newpos = [_xpos,_ypos,0];
|
_group setVariable["timeStamp",diag_tickTime];
|
||||||
};
|
_group setVariable["arc",0];
|
||||||
_oldPos = _newpos;
|
_group setVariable["wpRadius",30];
|
||||||
_wp = _group addWaypoint [[_xpos,_ypos,0], _wpradius];
|
_group setVariable["wpMode",_mode];
|
||||||
|
|
||||||
|
_dir = 0;
|
||||||
|
_arc = 30;
|
||||||
|
_noWp = 1;
|
||||||
|
_wpradius = 30;
|
||||||
|
_newPos = _pos getPos [(_minDis+(random (_maxDis - _minDis))), _dir];
|
||||||
|
_wp = [_group, 0];
|
||||||
|
|
||||||
|
#ifdef wpModeMove
|
||||||
_wp setWaypointType "MOVE";
|
_wp setWaypointType "MOVE";
|
||||||
};
|
_wp setWaypointName "move";
|
||||||
_wp = _group addWaypoint [[_xpos,_ypos,0], _wpradius];
|
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;diag_log format['====Updating waypoint to SAD for group %1',group this];"];
|
||||||
_wp setWaypointType "CYCLE";
|
#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;
|
||||||
|
@ -3,8 +3,16 @@
|
|||||||
for DBD Clan
|
for DBD Clan
|
||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 1/22/17
|
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["_numbertospawn","_groupSpawned","_safepos","_weaponList","_useLauncher","_launcherType"];
|
private["_numbertospawn","_groupSpawned","_safepos","_weaponList","_useLauncher","_launcherType"];
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs
|
call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs
|
||||||
|
|
||||||
by Ghostrider-DbD-
|
by Ghostrider-DbD-
|
||||||
Last modified 1-14-17
|
Last modified 3-13-17
|
||||||
*/
|
*/
|
||||||
//diag_log format["_fnc_addLiveAIToQue:: -> when called, blck_liveMissionAI = %1",blck_liveMissionAI];
|
//diag_log format["_fnc_addLiveAIToQue:: -> when called, blck_liveMissionAI = %1",blck_liveMissionAI];
|
||||||
params["_aiList","_timeDelay"];
|
params["_aiGroupsList","_timeDelay"];
|
||||||
diag_log format["_fnc_addLiveAIToQue:: -->> _aiList = %1 || _timeDelay = %2",_aiList,_timeDelay];
|
//diag_log format["_fnc_addLiveAIToQue:: -->> _aiList = %1 || _timeDelay = %2 || diag_tickTime %3",_aiGroupsList,_timeDelay, diag_tickTime];
|
||||||
blck_liveMissionAI pushback [_aiList, (diag_tickTime + _timeDelay)];
|
blck_liveMissionAIGroups pushback [_aiGroupsList, (diag_tickTime + _timeDelay)];
|
||||||
//diag_log format["_fnc_addLiveAIToQue:: -> blck_fnc_addLiveAI updated to %1",blck_liveMissionAI];
|
//diag_log format["_fnc_addLiveAIToQue:: -> blck_fnc_addLiveAI updated to %1",blck_liveMissionAI];
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
[_mines,_objects,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission] call blck_fnc_endMission;
|
[_mines,_objects,_blck_AllMissionAIGroups,_endMsg,_blck_localMissionMarker,_coords,_mission] call blck_fnc_endMission;
|
||||||
schedules deletion of all remaining alive AI and mission objects.
|
schedules deletion of all remaining alive AI and mission objects.
|
||||||
Updates the mission que.
|
Updates the mission que.
|
||||||
Updates mission markers.
|
Updates mission markers.
|
||||||
By Ghostrider-DbD-
|
By Ghostrider-DbD-
|
||||||
1/24/17
|
3/13/17
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (blck_useSignalEnd) then
|
if (blck_useSignalEnd) then
|
||||||
@ -18,14 +18,12 @@
|
|||||||
diag_log format["[blckeagls] _fnc_endMission:: (18) SignalEnd called: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
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_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission"];
|
params["_mines","_objects","_blck_AllMissionAIGroups","_endMsg","_blck_localMissionMarker","_coords","_mission"];
|
||||||
[_mines] spawn blck_fnc_clearMines;
|
[_mines] spawn blck_fnc_clearMines;
|
||||||
//diag_log format["_fnc_endMission: (23) _objects = %1",_objects];
|
//diag_log format["_fnc_endMission: (23) _objects = %1",_objects];
|
||||||
uisleep 0.1;
|
|
||||||
[_objects, (blck_cleanupCompositionTimer)] spawn blck_fnc_addObjToQue;
|
[_objects, (blck_cleanupCompositionTimer)] spawn blck_fnc_addObjToQue;
|
||||||
//diag_log format["_fnc_endMission:: (26) _blck_AllMissionAI = %1",_blck_AllMissionAI];
|
//diag_log format["_fnc_endMission:: (26) _blck_AllMissionAIGroups = %1",_blck_AllMissionAIGroups];
|
||||||
uisleep 0.1;
|
[_blck_AllMissionAIGroups, blck_AliveAICleanUpTimer] spawn blck_fnc_addLiveAItoQue;
|
||||||
[_blck_AllMissionAI, (blck_AliveAICleanUpTimer)] spawn blck_fnc_addLiveAItoQue;
|
|
||||||
[["end",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
[["end",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
||||||
[_blck_localMissionMarker select 1, _markerClass] execVM "debug\missionCompleteMarker.sqf";
|
[_blck_localMissionMarker select 1, _markerClass] execVM "debug\missionCompleteMarker.sqf";
|
||||||
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
|
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
|
||||||
|
@ -3,10 +3,18 @@
|
|||||||
for DBD Clan
|
for DBD Clan
|
||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last modified 2/24/17
|
Last modified 3/14/17
|
||||||
*/
|
|
||||||
|
|
||||||
private ["_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"];
|
--------------------------
|
||||||
|
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 ["_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAIGroups","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"];
|
||||||
params["_coords","_mission"];
|
params["_coords","_mission"];
|
||||||
|
|
||||||
////////
|
////////
|
||||||
@ -65,7 +73,7 @@ if (blck_debugLevel > 1) then {
|
|||||||
diag_log format["[blckEagle] Mission Reinforcement Parameters: changeReinforcements %1 numAI %2 changePatrol %3 chanceLoot %4",_chanceReinforcements,_noPara,_chanceHeliPatrol,_chanceLoot];
|
diag_log format["[blckEagle] Mission Reinforcement Parameters: changeReinforcements %1 numAI %2 changePatrol %3 chanceLoot %4",_chanceReinforcements,_noPara,_chanceHeliPatrol,_chanceLoot];
|
||||||
};
|
};
|
||||||
|
|
||||||
private["_useMines","_abortMissionSpawner","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
|
private["_useMines","_abortMissionSpawner","_blck_AllMissionAIGroups","_delayTime","_groupPatrolRadius"];
|
||||||
if (isNil "_useMines") then {_useMines = blck_useMines;};
|
if (isNil "_useMines") then {_useMines = blck_useMines;};
|
||||||
|
|
||||||
_objects = [];
|
_objects = [];
|
||||||
@ -73,7 +81,7 @@ _mines = [];
|
|||||||
_crates = [];
|
_crates = [];
|
||||||
_aiGroup = [];
|
_aiGroup = [];
|
||||||
_missionAIVehicles = [];
|
_missionAIVehicles = [];
|
||||||
_blck_AllMissionAI = [];
|
_blck_AllMissionAIGroups = [];
|
||||||
_AI_Vehicles = [];
|
_AI_Vehicles = [];
|
||||||
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
|
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
|
||||||
_delayTime = 1;
|
_delayTime = 1;
|
||||||
@ -201,13 +209,12 @@ uiSleep _delayTime;;
|
|||||||
[_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
|
[_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
|
||||||
|
|
||||||
uiSleep _delayTime;
|
uiSleep _delayTime;
|
||||||
private ["_infantry"];
|
private ["_infantryGroups"];
|
||||||
_infantry = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
|
_infantryGroups = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
|
||||||
//diag_log format["missionSpawner:: (201) -> _infantry = %1",_infantry];
|
//diag_log format["missionSpawner:: (201) -> _infantry = %1",_infantry];
|
||||||
if (typeName _infantry isEqualto "ARRAY") then
|
|
||||||
{
|
_blck_AllMissionAIGroups append _infantryGroups;
|
||||||
_blck_AllMissionAI append _infantry;
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
uiSleep _delayTime;
|
||||||
if (blck_debugLevel > 0) then
|
if (blck_debugLevel > 0) then
|
||||||
@ -219,12 +226,10 @@ uisleep _delayTime;
|
|||||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
||||||
{
|
{
|
||||||
private["_veh"];
|
private["_veh"];
|
||||||
uiSleep 1;
|
|
||||||
_veh = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
|
_veh = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
|
||||||
//diag_log format["missionSpawner :: (219) _veh = %1",_veh];
|
//diag_log format["missionSpawner :: (219) _veh = %1",_veh];
|
||||||
_objects append (_veh select 0);
|
_objects append (_veh select 0);
|
||||||
_blck_AllMissionAI append (_veh select 1);
|
_blck_AllMissionAIGroups append (_veh select 1);
|
||||||
uiSleep _delayTime;
|
|
||||||
if (blck_debugLevel > 0) then
|
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];
|
diag_log format["[blckeagls] missionSpawner:: (225) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
||||||
@ -239,21 +244,19 @@ if (blck_useStatic && (_noEmplacedWeapons > 0)) then
|
|||||||
_temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
|
_temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
|
||||||
//diag_log format ["missionSpawner:: (246) value returned for _temp = %1",_temp];
|
//diag_log format ["missionSpawner:: (246) value returned for _temp = %1",_temp];
|
||||||
_objects append (_temp select 0);
|
_objects append (_temp select 0);
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
_blck_AllMissionAIGroups append (_temp select 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
if (blck_enableReinforcements && (random(1) < _chanceReinforcements)) then
|
if (blck_enableReinforcements && (random(1) < _chanceReinforcements)) then
|
||||||
{
|
{
|
||||||
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
|
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
|
||||||
if (blck_debugLevel > 0) then
|
if (blck_debugLevel > 0) then
|
||||||
{
|
{
|
||||||
diag_log format["[blckeagls] missionSpawner:: calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
diag_log format["[blckeagls] missionSpawner:: calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
||||||
// ["_pos","_numAI","_skillAI","_chanceLoot","_lootCounts","_weapons","_uniforms","_headgear","_patrol"];
|
|
||||||
[_coords,_noPara,_aiDifficultyLevel,_chanceLoot,_reinforcementLootCounts,_weaponList,_uniforms,_headgear,_chanceHeliPatrol] spawn blck_fnc_callInReinforcements;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
blck_monitoredMissionAIGroups append _blck_AllMissionAIGroups; // so that we can monitor the status of the groups in the missions.
|
||||||
|
|
||||||
// Trigger for mission end
|
// Trigger for mission end
|
||||||
//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition];
|
//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition];
|
||||||
@ -267,7 +270,7 @@ switch (_endCondition) do
|
|||||||
case "allUnitsKilled": {_endIfPlayerNear = false;_endIfAIKilled = true;};
|
case "allUnitsKilled": {_endIfPlayerNear = false;_endIfAIKilled = true;};
|
||||||
case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;};
|
case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;};
|
||||||
};
|
};
|
||||||
//diag_log format["missionSpawner :: (270) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
|
//diag_log format["missionSpawner :: (269) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
|
||||||
private["_locations"];
|
private["_locations"];
|
||||||
_locations = [_coords] + _crates;
|
_locations = [_coords] + _crates;
|
||||||
|
|
||||||
@ -275,9 +278,9 @@ _locations = [_coords] + _crates;
|
|||||||
while {_missionComplete isEqualTo -1} do
|
while {_missionComplete isEqualTo -1} do
|
||||||
{
|
{
|
||||||
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300};
|
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300};
|
||||||
if ((_endIfPlayerNear) && [_coords,20, true /*only allow completion by players on foot*/] call blck_fnc_playerInRange) exitWith {};
|
if ((_endIfPlayerNear) && [_coords,10,true] call blck_fnc_playerInRange) exitWith {};
|
||||||
if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1 ) 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_AllMissionAI];
|
//diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAIGroups];
|
||||||
uiSleep 2;
|
uiSleep 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -294,6 +297,6 @@ if (blck_debugLevel > 1) then
|
|||||||
[_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes;
|
[_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes;
|
||||||
};
|
};
|
||||||
}forEach _crates;
|
}forEach _crates;
|
||||||
[_mines,_objects,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission] call blck_fnc_endMission;
|
[_mines,_objects,_blck_AllMissionAIGroups,_endMsg,_blck_localMissionMarker,_coords,_mission] call blck_fnc_endMission;
|
||||||
diag_log format["[blckeagls] missionSpawner:: (298)end of mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
diag_log format["[blckeagls] missionSpawner:: (292)end of mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
||||||
|
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
[_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
|
[_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
|
||||||
|
Last modified 3/13/17
|
||||||
|
By Ghostrider-DbD-
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
|
params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
|
||||||
private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner"];
|
private["_return","_emplacedWeps","_emplacedAIGroups","_wep","_units","_gunner"];
|
||||||
_emplacedWeps = [];
|
_emplacedWeps = [];
|
||||||
_emplacedAI = [];
|
_emplacedAIGroups = [];
|
||||||
_units = [];
|
_units = [];
|
||||||
//diag_log "_fnc_spawnEmplacedWeaponArray start";
|
//diag_log "_fnc_spawnEmplacedWeaponArray start";
|
||||||
// Define _missionEmplacedWeapons if not already configured.
|
// Define _missionEmplacedWeapons if not already configured.
|
||||||
@ -26,15 +27,14 @@ if (count _missionEmplacedWeapons < 1) then
|
|||||||
_wep setPosATL _x;
|
_wep setPosATL _x;
|
||||||
[_wep,false] call blck_fnc_configureMissionVehicle;
|
[_wep,false] call blck_fnc_configureMissionVehicle;
|
||||||
_emplacedWeps pushback _wep;
|
_emplacedWeps pushback _wep;
|
||||||
blck_missionVehicles pushback _wep;
|
|
||||||
_units = units _empGroup;
|
_units = units _empGroup;
|
||||||
_gunner = _units select 0;
|
_gunner = _units select 0;
|
||||||
_gunner moveingunner _wep;
|
_gunner moveingunner _wep;
|
||||||
_emplacedAI append (units _empGroup);
|
_emplacedAIGroups pushback _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:: 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];
|
//diag_log format["_fnc_spawnEmplacedWeaponArray:: _gunner = %1 and crew _wep = %2",_gunner, crew _wep];
|
||||||
} forEach _missionEmplacedWeapons;
|
} forEach _missionEmplacedWeapons;
|
||||||
|
blck_missionVehicles append _emplacedWeps;
|
||||||
_return = [_emplacedWeps,_emplacedAI];
|
_return = [_emplacedWeps,_emplacedAIGroups];
|
||||||
//diag_log format["_fnc_spawnEmplacedWeaponArray:: returning with _return = _emplacedWeps = %1",_return];
|
//diag_log format["_fnc_spawnEmplacedWeaponArray:: returning with _return = _emplacedWeps = %1",_return];
|
||||||
_return
|
_return
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
blck_fnc_spawnMissionAI
|
blck_fnc_spawnMissionAI
|
||||||
by Ghostrider-DbD-
|
by Ghostrider-DbD-
|
||||||
1/9/17
|
3/13/17
|
||||||
[_coords, // center of the area within which to spawn AI
|
[_coords, // center of the area within which to spawn AI
|
||||||
_minNoAI, // minimum number of AI to spawn
|
_minNoAI, // minimum number of AI to spawn
|
||||||
_maxNoAI, // Max number of AI to spawn
|
_maxNoAI, // Max number of AI to spawn
|
||||||
@ -9,14 +9,14 @@
|
|||||||
_uniforms, // Uniforms to use - note default is blck_sSkinList
|
_uniforms, // Uniforms to use - note default is blck_sSkinList
|
||||||
_headGear // headgear to use - blck_BanditHeager is the default
|
_headGear // headgear to use - blck_BanditHeager is the default
|
||||||
] call blck_fnc_spawnMissionAI
|
] call blck_fnc_spawnMissionAI
|
||||||
returns an array of the units spawned
|
returns an array of the groups spawned
|
||||||
*/
|
*/
|
||||||
params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
|
params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
|
||||||
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAI"];
|
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAIGroups"];
|
||||||
_unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
|
_unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
|
||||||
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
|
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
|
||||||
_ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups);
|
_ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups);
|
||||||
_blck_AllMissionAI = [];
|
_blck_AllMissionAIGroups = [];
|
||||||
//diag_log format["_fnc_spawnMissionAI :: _unitsToSpawn %1 ; _unitsPerGroup %2 _ResidualUnits %3",_unitsToSpawn,_unitsPerGroup,_ResidualUnits];
|
//diag_log format["_fnc_spawnMissionAI :: _unitsToSpawn %1 ; _unitsPerGroup %2 _ResidualUnits %3",_unitsToSpawn,_unitsPerGroup,_ResidualUnits];
|
||||||
switch (_noAIGroups) do
|
switch (_noAIGroups) do
|
||||||
{
|
{
|
||||||
@ -25,8 +25,7 @@
|
|||||||
_newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,3,18,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
_newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,3,18,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||||
if !(isNull _newGroup) then
|
if !(isNull _newGroup) then
|
||||||
{
|
{
|
||||||
//_newAI = units _newGroup;
|
_blck_AllMissionAIGroups pushback _newGroup;
|
||||||
_blck_AllMissionAI = _blck_AllMissionAI + units _newGroup;
|
|
||||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=1 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=1 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
||||||
} else {
|
} else {
|
||||||
_abortMissionSpawner = true;
|
_abortMissionSpawner = true;
|
||||||
@ -46,8 +45,7 @@
|
|||||||
};
|
};
|
||||||
_newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
_newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||||
if (isNull _newGroup) exitWith {_abortMissionSpawner = true;};
|
if (isNull _newGroup) exitWith {_abortMissionSpawner = 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];
|
//diag_log format["missionSpawner: Spawning 2 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
||||||
}forEach _groupLocations;
|
}forEach _groupLocations;
|
||||||
|
|
||||||
@ -57,15 +55,14 @@
|
|||||||
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
_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) then {_abortMissionSpawner = true;} else
|
||||||
{
|
{
|
||||||
_newAI = units _newGroup;
|
_blck_AllMissionAIGroups pushback _newGroup;
|
||||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
|
||||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=3 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=3 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
||||||
_groupLocations = [_coords,2,20,35] call blck_fnc_findPositionsAlongARadius;
|
_groupLocations = [_coords,2,20,35] call blck_fnc_findPositionsAlongARadius;
|
||||||
{
|
{
|
||||||
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||||
if (isNull _newGroup) exitWith {_abortMissionSpawner = true;};
|
if (isNull _newGroup) exitWith {_abortMissionSpawner = true;};
|
||||||
_newAI = units _newGroup;
|
_newAI = units _newGroup;
|
||||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
_blck_AllMissionAIGroups pushback _newGroup;
|
||||||
//diag_log format["missionSpawner: Spawning 2 Groups:_newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
//diag_log format["missionSpawner: Spawning 2 Groups:_newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
||||||
}forEach _groupLocations;
|
}forEach _groupLocations;
|
||||||
};
|
};
|
||||||
@ -73,18 +70,18 @@
|
|||||||
default { // spawn one group near the center of the mission and the rest on the perimeter
|
default { // spawn one group near the center of the mission and the rest on the perimeter
|
||||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=default"];
|
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=default"];
|
||||||
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||||
_newAI = units _newGroup;
|
_blck_AllMissionAIGroups pushback _newGroup;
|
||||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
|
||||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=%3 _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
|
//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;
|
_groupLocations = [_coords,(_noAIGroups - 1),20,40] call blck_fnc_findPositionsAlongARadius;
|
||||||
{
|
{
|
||||||
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||||
if (isNull _newGroup) exitWith {_abortMissionSpawner = true;};
|
if (isNull _newGroup) exitWith {_abortMissionSpawner = true;};
|
||||||
_newAI = units _newGroup;
|
_blck_AllMissionAIGroups pushback _newGroup;
|
||||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
|
||||||
//diag_log format["missionSpawner: Spawning %3 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
|
//diag_log format["missionSpawner: Spawning %3 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
|
||||||
}forEach _groupLocations;
|
}forEach _groupLocations;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
{
|
||||||
_blck_AllMissionAI
|
_x setVariable["blck_stuckMonitor",0];
|
||||||
|
}forEach _blck_AllMissionAIGroups;
|
||||||
|
_blck_AllMissionAIGroups
|
||||||
|
@ -1,30 +1,33 @@
|
|||||||
/*
|
/*
|
||||||
[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionVehiclePatrols
|
[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionVehiclePatrols
|
||||||
by Ghostrider-DbD-
|
by Ghostrider-DbD-
|
||||||
1/22/17
|
3/13/17
|
||||||
returns [] if no groups could be created
|
returns [] if no groups could be created
|
||||||
returns [_AI_Vehicles,_missionAI] otherwise;
|
returns [_AI_Vehicles,_missionAIGroups] otherwise;
|
||||||
*/
|
*/
|
||||||
params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
|
params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
|
||||||
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return"];
|
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns","_missionAIGroups","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return"];
|
||||||
_vehicles = [];
|
_vehicles = [];
|
||||||
_missionAI = [];
|
_missionAIGroups = [];
|
||||||
_vehiclePatrolSpawns= [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
|
_vehiclePatrolSpawns= [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
|
||||||
{
|
{
|
||||||
_vehGroup = [_x,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
_vehGroup = [_x,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||||
//if (isNull _vehGroup) exitWith {_abort = true;};
|
//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 (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
|
if (typename (_vehGroup) isEqualTo "GROUP") then
|
||||||
{
|
{
|
||||||
_randomVehicle = selectRandom blck_AIPatrolVehicles;
|
_randomVehicle = selectRandom blck_AIPatrolVehicles;
|
||||||
_patrolVehicle = [_coords,_x,_randomVehicle,(_x distance _coords) -5,(_x distance _coords) + 5,_vehGroup] call blck_fnc_spawnVehiclePatrol;
|
_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];
|
//diag_log format["_fnc_spawnMissionVehiclePatrols:: - > patrol vehicle spawned was %1 with type of %2",_patrolVehicle,_randomVehicle];
|
||||||
_vehicles pushback _patrolVehicle;
|
_vehicles pushback _patrolVehicle;
|
||||||
_missionAI append units _vehGroup;
|
_missionAIGroups pushback _vehGroup;
|
||||||
//diag_log format["_fnc_spawnMissionVehiclePatrols:: -- > _vehicles updated to %1",_vehicles];
|
//diag_log format["_fnc_spawnMissionVehiclePatrols:: -- > _vehicles updated to %1",_vehicles];
|
||||||
};
|
};
|
||||||
}forEach _vehiclePatrolSpawns;
|
}forEach _vehiclePatrolSpawns;
|
||||||
blck_missionVehicles append _vehicles;
|
blck_missionVehicles append _vehicles;
|
||||||
_return = [_vehicles,_missionAI];
|
{
|
||||||
|
_x setVariable["blck_stuckMonitor",0];
|
||||||
|
}forEach _missionAIGroups;
|
||||||
|
_return = [_vehicles,_missionAIGroups];
|
||||||
|
|
||||||
_return
|
_return
|
@ -2,36 +2,40 @@
|
|||||||
Delete alive AI.
|
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.
|
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
|
by Ghostrider
|
||||||
Last updated 1/24/17
|
Last updated 3/13/17
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_fn_deleteAIfromList = {
|
//diag_log format["_fnc_cleanupAliveAI:: blck_liveMissionAIGroups = %1",blck_liveMissionAIGroups];
|
||||||
params["_aiList"];
|
|
||||||
if (blck_debugLevel > 0) then {diag_log format["_fn_deleteAIfromList:: _aiList = %1",_aiList];};
|
|
||||||
{
|
|
||||||
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];};
|
if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanupAliveAI called at %1",diag_tickTime];};
|
||||||
for "_i" from 1 to (count blck_liveMissionAI) do
|
// blck_liveMissionAIGroups is an array of groups
|
||||||
|
for "_i" from 1 to (count blck_liveMissionAIGroups) do
|
||||||
{
|
{
|
||||||
if ((_i) <= count blck_liveMissionAI) then
|
if ((_i) <= count blck_liveMissionAIGroups) then
|
||||||
{
|
{
|
||||||
_units = blck_liveMissionAI select (_i - 1);
|
private["_missionGroups","_groupsToClean"];
|
||||||
//diag_log format["_fnc_cleanupAliveAI:: (34) evaluating with delete time = %2 and diag_tickTime %1", diag_tickTime, _units select 1];
|
_missionGroups = blck_liveMissionAIGroups select (_i - 1);
|
||||||
if (diag_tickTime > (_units select 1) ) then
|
//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
|
||||||
{
|
{
|
||||||
//diag_log format["_fnc_cleanupAliveAI:: cleaning up AI group %1",_units];
|
_groupsToClean = _missionGroups select 0;
|
||||||
|
//diag_log format["_fnc_cleanupAliveAI:: cleaning up AI groups %1",_groupsToClean];
|
||||||
|
{
|
||||||
|
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];
|
//diag_log format["_fnc_cleanupAliveAI:: deleting unit %1",_x];
|
||||||
[_x] call blck_fnc_deleteAI;
|
[_x] call blck_fnc_deleteAI;
|
||||||
}forEach (_units select 0);
|
} forEach (units _group);
|
||||||
|
};
|
||||||
|
}forEach (_groupsToClean);
|
||||||
uiSleep 0.1;
|
uiSleep 0.1;
|
||||||
blck_liveMissionAI set[(_i - 1), -1];
|
blck_liveMissionAIGroups set[(_i - 1), -1];
|
||||||
blck_liveMissionAI = blck_liveMissionAI - [-1]; // Remove that list of live AI from the list.
|
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_liveMissionAI];};
|
//if (blck_debugLevel > 1) then {diag_log format["_fnc_mainTread:: blck_liveMissionAI updated to %1",blck_liveMissionAIGroups];};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,19 @@
|
|||||||
// Configures a mission vehicle
|
// Configures a mission vehicle
|
||||||
// by Ghostrider-DBD-
|
/*
|
||||||
// Last Updated 1/22/17
|
By Ghostrider-DBD-
|
||||||
|
Copyright 2016
|
||||||
|
Last updated 3-14-17
|
||||||
|
|
||||||
|
spawns a vehicle of _vehType and mans it with units in _group.
|
||||||
|
returns _veh, the vehicle 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\Compiles\blck_defines.hpp";
|
||||||
|
|
||||||
params["_veh",["_clearInventory",true]];
|
params["_veh",["_clearInventory",true]];
|
||||||
private["_unit"];
|
private["_unit"];
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
// =========================================================================================================
|
/*
|
||||||
// blckeagls mission system
|
By Ghostrider-DBD-
|
||||||
// Author: Ghostrider-DBD-
|
Copyright 2016
|
||||||
// Last modified 1-22-17
|
Last updated 3-14-17
|
||||||
// ------------------------------------------------------------------------------------------------------------
|
|
||||||
|
spawns a vehicle of _vehType and mans it with units in _group.
|
||||||
|
returns _veh, the vehicle 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\Compiles\blck_defines.hpp";
|
||||||
// Unused at present, reserved for the future
|
// Unused at present, reserved for the future
|
||||||
|
|
||||||
private ["_ai_veh","_ai_veh_type","_ai_veh_name"];
|
private ["_ai_veh","_ai_veh_type","_ai_veh_name"];
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
// Protect Vehicles from being cleaned up by the server
|
// Protect Vehicles from being cleaned up by the server
|
||||||
// Last modified 2/26/16 by Ghostrider-DBD-
|
// Last modified 2/26/16 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\Compiles\blck_defines.hpp";
|
||||||
|
|
||||||
params["_Vehicle"];
|
params["_Vehicle"];
|
||||||
|
|
||||||
@ -8,7 +17,7 @@ _modType = call blck_fnc_getModType;
|
|||||||
switch (_ModType) do {
|
switch (_ModType) do {
|
||||||
case "Epoch":
|
case "Epoch":
|
||||||
{
|
{
|
||||||
diag_log format["GMS_fnc_protectVehicle:: Tokens set for vehicle %1",_Vehicle];
|
if (blck_debugLevel > 2) then {diag_log format["GMS_fnc_protectVehicle:: Tokens set for vehicle %1",_Vehicle];};
|
||||||
//_Vehicle call EPOCH_server_vehicleInit;
|
//_Vehicle call EPOCH_server_vehicleInit;
|
||||||
_Vehicle call EPOCH_server_setVToken;
|
_Vehicle call EPOCH_server_setVToken;
|
||||||
};
|
};
|
||||||
|
@ -2,24 +2,26 @@
|
|||||||
Spawn a vehicle and protect it against cleanup by Epoch
|
Spawn a vehicle and protect it against cleanup by Epoch
|
||||||
Returns the object (vehicle) created.
|
Returns the object (vehicle) created.
|
||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Last modified 1-22-17
|
Last modified 1-27-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["_veh","_modType"];
|
private["_veh","_modType"];
|
||||||
params["_vehType","_pos",["_clearInventory",true]];
|
params["_vehType","_pos",["_clearInventory",true]];
|
||||||
//_vehType = _this select 0; // type of vehicle to be spawned
|
//_vehType = _this select 0; // type of vehicle to be spawned
|
||||||
//_pos = _this select 1; // position at which vehicle is 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];};
|
//if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf: _this = %1",_this];};
|
||||||
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
|
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
|
||||||
_modType = call blck_fnc_getModType;
|
[_veh] call blck_fnc_protectVehicle;
|
||||||
if (_modType isEqualTo "Epoch") then
|
|
||||||
{
|
|
||||||
_veh call EPOCH_server_setVToken;
|
|
||||||
//diag_log format["_fnc_spawnVehicle:: (20) EPOCH_server_setVToken performed for vehicle %1",_veh];
|
|
||||||
};
|
|
||||||
// params["_veh",["_clearInventory",true]];
|
// params["_veh",["_clearInventory",true]];
|
||||||
[_veh,_clearInventory] call blck_fnc_configureMissionVehicle;
|
[_veh,_clearInventory] call blck_fnc_configureMissionVehicle;
|
||||||
diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];
|
//if (blck_debugLevel > 2) then {diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];};
|
||||||
_veh
|
_veh
|
||||||
|
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last updated 8-14-16
|
Last updated 3-14-17
|
||||||
|
|
||||||
spawns a vehicle of _vehType and mans it with units in _group.
|
spawns a vehicle of _vehType and mans it with units in _group.
|
||||||
returns _veh, the vehicle spawned.
|
returns _veh, the vehicle 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\Compiles\blck_defines.hpp";
|
||||||
|
|
||||||
private["_vehType","_safepos","_veh"];
|
private["_vehType","_safepos","_veh"];
|
||||||
params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull] ];
|
params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull] ];
|
||||||
@ -52,7 +59,7 @@ for "_i" from 1 to _count do
|
|||||||
_wp = _group addWaypoint [_p2, 25];
|
_wp = _group addWaypoint [_p2, 25];
|
||||||
_wp setWaypointType "MOVE";
|
_wp setWaypointType "MOVE";
|
||||||
_wp = _group addWaypoint [_p2, 25];
|
_wp = _group addWaypoint [_p2, 25];
|
||||||
_wp setWaypointType "LOITER";
|
_wp setWaypointType "SENTRY";
|
||||||
_wp setWaypointTimeout [10,17.5,25];
|
_wp setWaypointTimeout [10,17.5,25];
|
||||||
};
|
};
|
||||||
_wp = _group addWaypoint [_pos, 25];
|
_wp = _group addWaypoint [_pos, 25];
|
||||||
|
@ -26,7 +26,7 @@ _fn_releaseVehicle = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function called at %1",diag_tickTime];};
|
//if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function called at %1",diag_tickTime];};
|
||||||
{
|
{
|
||||||
_veh = _x;
|
_veh = _x;
|
||||||
if (_veh getVariable["blck_DeleteAt",0] > 0) then
|
if (_veh getVariable["blck_DeleteAt",0] > 0) then
|
||||||
@ -43,10 +43,7 @@ if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function c
|
|||||||
{
|
{
|
||||||
if (blck_killEmptyStaticWeapons) then
|
if (blck_killEmptyStaticWeapons) then
|
||||||
{
|
{
|
||||||
if (blck_debugLevel > 2) then
|
//if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];};
|
||||||
{
|
|
||||||
diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];
|
|
||||||
};
|
|
||||||
_veh setDamage 1;
|
_veh setDamage 1;
|
||||||
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
||||||
} else {
|
} else {
|
||||||
@ -55,10 +52,7 @@ if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function c
|
|||||||
}else { // Deal with vehicles
|
}else { // Deal with vehicles
|
||||||
if (blck_killEmptyAIVehicles) then
|
if (blck_killEmptyAIVehicles) then
|
||||||
{
|
{
|
||||||
if (blck_debugLevel > 2) then
|
//if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle destroyed where vehicle = %1",_veh];};
|
||||||
{
|
|
||||||
diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle destroyed where vehicle = %1",_veh];
|
|
||||||
};
|
|
||||||
{
|
{
|
||||||
_veh setHitPointDamage [_x, 1];
|
_veh setHitPointDamage [_x, 1];
|
||||||
|
|
||||||
|
17
@epochhive/addons/custom_server/Compiles/blck_defines.hpp
Normal file
17
@epochhive/addons/custom_server/Compiles/blck_defines.hpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
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
|
@ -2,9 +2,17 @@
|
|||||||
AI Mission for Epoch Mod for Arma 3
|
AI Mission for Epoch Mod for Arma 3
|
||||||
By Ghostrider
|
By Ghostrider
|
||||||
Functions and global variables used by the mission system.
|
Functions and global variables used by the mission system.
|
||||||
Last modified 1/23/17
|
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/
|
||||||
*/
|
*/
|
||||||
blck_functionsCompiled = false;
|
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
|
||||||
|
//blck_functionsCompiled = false;
|
||||||
|
|
||||||
//#define DBDserver 1
|
//#define DBDserver 1
|
||||||
// General functions
|
// General functions
|
||||||
@ -21,8 +29,10 @@ blck_fnc_groupsOnAISide = compileFinal preprocessFileLineNumbers "\q\addons\cus
|
|||||||
blck_fnc_emptyObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObject.sqf";
|
blck_fnc_emptyObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObject.sqf";
|
||||||
blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRange.sqf";
|
blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRange.sqf";
|
||||||
blck_fnc_mainThread = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf";
|
blck_fnc_mainThread = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf";
|
||||||
|
|
||||||
#ifdef DBDserver
|
#ifdef DBDserver
|
||||||
blck_fnc_broadcastServerFPS = = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf";
|
blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf";
|
||||||
|
diag_log "blck_functions loaded using DBDServer settings ---- >>>> ";
|
||||||
#endif
|
#endif
|
||||||
// Player-related functions
|
// Player-related functions
|
||||||
blck_fnc_rewardKiller = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_rewardKiller.sqf";
|
blck_fnc_rewardKiller = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_rewardKiller.sqf";
|
||||||
@ -54,6 +64,7 @@ blck_fnc_spawnMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_s
|
|||||||
blck_fnc_clearMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"; // clears mines in an array passed as a parameter
|
blck_fnc_clearMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"; // clears mines in an array passed as a parameter
|
||||||
blck_fnc_signalEnd = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_signalEnd.sqf"; // deploy smoke grenades at loot crates at the end of the mission.
|
blck_fnc_signalEnd = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_signalEnd.sqf"; // deploy smoke grenades at loot crates at the end of the mission.
|
||||||
blck_fnc_endMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_endMission.sqf";
|
blck_fnc_endMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_endMission.sqf";
|
||||||
|
blck_fnc_missionAIareDead = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionAIareDead.sqf";
|
||||||
|
|
||||||
// #define Reinforcements 1
|
// #define Reinforcements 1
|
||||||
#ifdef Reinforcements
|
#ifdef Reinforcements
|
||||||
@ -70,7 +81,10 @@ blck_fnc_sendHeliHome = compileFinal preprocessFileLineNumbers "\q\addons\custom
|
|||||||
// Group-related functions
|
// Group-related functions
|
||||||
blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units]
|
blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units]
|
||||||
blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setWaypoints.sqf"; // Set default waypoints for a group
|
blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setWaypoints.sqf"; // Set default waypoints for a group
|
||||||
blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_cleanEmptyGroups.sqf"; // GMS_fnc_cleanEmptyGroups
|
blck_fnc_missionGroupMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_missionGroupMonitor.sqf"; // Monitors active groups for those that are stuck in an SAD waypoint but not in combat
|
||||||
|
blck_fnc_changeToSADWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSADWaypoint.sqf";
|
||||||
|
blck_fnc_changeToMoveWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToMoveWaypoint.sqf";
|
||||||
|
blck_fnc_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 or static
|
||||||
blck_fnc_spawnVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf";
|
blck_fnc_spawnVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf";
|
||||||
|
@ -3,9 +3,15 @@
|
|||||||
For the Mission System originally coded by blckeagls
|
For the Mission System originally coded by blckeagls
|
||||||
By Ghostrider
|
By Ghostrider
|
||||||
Functions and global variables used by the mission system.
|
Functions and global variables used by the mission system.
|
||||||
Last modified 10/25/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/
|
||||||
*/
|
*/
|
||||||
//blck_variablesLoaded = false;
|
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
|
||||||
|
|
||||||
blck_debugON = false;
|
blck_debugON = false;
|
||||||
blck_debugLevel = 0; // Sets level of detail for debugging info - WIP.
|
blck_debugLevel = 0; // Sets level of detail for debugging info - WIP.
|
||||||
blck_minFPS = 10;
|
blck_minFPS = 10;
|
||||||
@ -18,7 +24,8 @@ blck_ActiveMissionCoords = [];
|
|||||||
blck_recentMissionCoords = [];
|
blck_recentMissionCoords = [];
|
||||||
blck_locationBlackList = [];
|
blck_locationBlackList = [];
|
||||||
blck_monitoredVehicles = [];
|
blck_monitoredVehicles = [];
|
||||||
blck_liveMissionAI = [];
|
blck_monitoredMissionAIGroups = []; // Used to track groups in active missions for whatever purpose
|
||||||
|
blck_liveMissionAIGroups = []; // Used to track groups assigned to completed missions for eventual cleanup.
|
||||||
blck_oldMissionObjects = [];
|
blck_oldMissionObjects = [];
|
||||||
blck_pendingMissions = [];
|
blck_pendingMissions = [];
|
||||||
blck_activeMissions = [];
|
blck_activeMissions = [];
|
||||||
|
@ -1,8 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
This file contains most constants that define mission parameters, AI behavior and loot for mission system.
|
for DBD Clan
|
||||||
Last modified 8/1/15
|
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 DBDserver 1
|
|
||||||
|
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
|
||||||
|
|
||||||
if (blck_debugON) then {diag_log "[blckeagls] Loading blck_configs_epoch.sqf";};
|
if (blck_debugON) then {diag_log "[blckeagls] Loading blck_configs_epoch.sqf";};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
This file contains most constants that define mission parameters, AI behavior and loot for mission system.
|
for DBD Clan
|
||||||
Last modified 8/1/15
|
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 DBDserver 1
|
|
||||||
|
#include "\q\addons\custom_server\Compiles\blck_defines.hpp";
|
||||||
|
|
||||||
if (blck_debugON) then {diag_log "[blckeagls] Loading blck_configs_exlie.sqf";};
|
if (blck_debugON) then {diag_log "[blckeagls] Loading blck_configs_exlie.sqf";};
|
||||||
|
|
||||||
|
@ -1,10 +1,20 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Place any overrides of the default configurations here.
|
for DBD Clan
|
||||||
This is a convenient way to specify the configuration you like without worrying about going through the individual config files with each update.
|
By Ghostrider-DBD-
|
||||||
Several Examples are shown below.
|
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";
|
||||||
|
|
||||||
diag_log "[blckeagls] Loading Configuration Overides";
|
diag_log "[blckeagls] Loading Configuration Overides";
|
||||||
|
|
||||||
switch (toLower (worldName)) do
|
switch (toLower (worldName)) do
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
by Ghostrider-DbD-
|
by Ghostrider-DbD-
|
||||||
for DBD Clan
|
for DBD Clan
|
||||||
11/12/16
|
11/12/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\Compiles\blck_defines.hpp";
|
||||||
|
|
||||||
if (!isServer) exitWith{};
|
if (!isServer) exitWith{};
|
||||||
_addonsPath = "\q\addons\custom_server\MapAddons\mapcontent\";
|
_addonsPath = "\q\addons\custom_server\MapAddons\mapcontent\";
|
||||||
_addonsEpoch = [
|
_addonsEpoch = [
|
||||||
|
@ -1,8 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Define loot crate configurations for Epoch.
|
Define loot crate configurations for Epoch.
|
||||||
*/
|
|
||||||
diag_log "[blckeagls] SLS : Loading Static Loot Container Spawning System for Epoch";
|
|
||||||
|
|
||||||
|
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/
|
||||||
|
*/
|
||||||
|
diag_log "Loading Static Loot Container Spawning System for Epoch";
|
||||||
_lootBoxes =
|
_lootBoxes =
|
||||||
[
|
[
|
||||||
/*[
|
/*[
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
Define constants for SLS for Exile
|
Define constants for SLS for Exile
|
||||||
uncomment the examples below to see it in action.
|
|
||||||
or use them as a template for your own.
|
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/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
diag_log "[blckeagls] SLS : Loading Static Loot Container Spawning System for Exile";
|
diag_log "[blckeagls] SLS : Loading Static Loot Container Spawning System for Exile";
|
||||||
|
@ -1,6 +1,19 @@
|
|||||||
|
/*
|
||||||
|
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/
|
||||||
|
*/
|
||||||
|
|
||||||
//Based on the Random Loot Crates addon by Darth_Rogue & Chisel (tdwhite)
|
//Based on the Random Loot Crates addon by Darth_Rogue & Chisel (tdwhite)
|
||||||
// Re-written by Ghostrider-DBD- to add features and clean up code
|
// Re-written by Ghostrider-DBD- to add features and clean up code
|
||||||
// Last updated 11-14-16
|
|
||||||
|
|
||||||
// Do not touch anything below this line.
|
// Do not touch anything below this line.
|
||||||
/// ********************************************************************************************************************************************************************************************************************************
|
/// ********************************************************************************************************************************************************************************************************************************
|
||||||
|
@ -3,11 +3,16 @@
|
|||||||
by Ghostrider-DbD-
|
by Ghostrider-DbD-
|
||||||
For Arma 3 Exile and Epoch
|
For Arma 3 Exile and Epoch
|
||||||
Last Updated 11/12/16
|
Last Updated 11/12/16
|
||||||
Written to be independent of blckeagles functions for now.
|
--------------------------
|
||||||
However, as written it relies on variables defined in in the configurations files for Epoch / Exile for blckeagls.
|
License
|
||||||
It could easily be addapted to other purposes.
|
--------------------------
|
||||||
|
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";
|
||||||
|
|
||||||
if not (isNull( configFile >> "CfgPatches" >> "a3_epoch_server" )) then
|
if not (isNull( configFile >> "CfgPatches" >> "a3_epoch_server" )) then
|
||||||
{
|
{
|
||||||
[] execVM "\q\addons\custom_server\SLS\SLS_init_epoch.sqf";
|
[] execVM "\q\addons\custom_server\SLS\SLS_init_epoch.sqf";
|
||||||
|
@ -4,6 +4,16 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
|
|||||||
Contributions by Narines: bug fixes, testing, infinite ammo fix.
|
Contributions by Narines: bug fixes, testing, infinite ammo fix.
|
||||||
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
|
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
|
||||||
|
|
||||||
|
3/13/17 Version 6.58 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.
|
||||||
|
|
||||||
|
3/12/17 Version 6.57 Build 40
|
||||||
|
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.
|
||||||
Added a check so that mission completion by players near loot crates was tripped only when players were on foot.
|
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.
|
Added a setting that determines whether loot crates are loaded when the mission spawns or once the mission is complete.
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
/*
|
||||||
|
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/
|
||||||
|
*/
|
||||||
|
|
||||||
class CfgPatches {
|
class CfgPatches {
|
||||||
class custom_server {
|
class custom_server {
|
||||||
units[] = {};
|
units[] = {};
|
||||||
|
@ -5,7 +5,18 @@ To Narines for debugging that original version
|
|||||||
To cynwncler for many helpful comments along the way
|
To cynwncler for many helpful comments along the way
|
||||||
And mostly importantly,
|
And mostly importantly,
|
||||||
To Vampire, KiloSwiss, blckeagls, theFUCHS, lazylink, Mark311 and Buttface (Face) who wrote the pionering mission and roaming AI systems upon which this one is based and who's code is used with modification in some parts of this addon.
|
To Vampire, KiloSwiss, blckeagls, theFUCHS, lazylink, Mark311 and Buttface (Face) who wrote the pionering mission and roaming AI systems upon which this one is based and who's code is used with modification in some parts of this addon.
|
||||||
|
|
||||||
|
By Ghostrider-DbD
|
||||||
|
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";
|
||||||
|
|
||||||
if !(isNil "blck_Initialized") exitWith{};
|
if !(isNil "blck_Initialized") exitWith{};
|
||||||
private["_blck_loadingStartTime"];
|
private["_blck_loadingStartTime"];
|
||||||
_blck_loadingStartTime = diag_tickTime;
|
_blck_loadingStartTime = diag_tickTime;
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
/*
|
||||||
|
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"];
|
private ["_version","_versionDate"];
|
||||||
_blck_version = "6.57 Build 40";
|
_blck_version = "6.58 Build 41";
|
||||||
_blck_versionDate = "3-11-17 8:00 PM";
|
_blck_versionDate = "3-13-17 8:00 PM";
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
/*
|
||||||
|
by Ghostrider-DbD-
|
||||||
|
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";
|
||||||
|
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
// prevent the system from being started twice
|
// prevent the system from being started twice
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
@ -64,7 +64,7 @@ _blck_fn_configureRoundMarker = {
|
|||||||
_blck_fn_configureIconMarker = {
|
_blck_fn_configureIconMarker = {
|
||||||
private["_MainMarker"];
|
private["_MainMarker"];
|
||||||
params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]];
|
params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]];
|
||||||
diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text];
|
if (blck_debugLevel > 2) then {diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text];};
|
||||||
|
|
||||||
_name = "label" + _name;
|
_name = "label" + _name;
|
||||||
_MainMarker = createMarker [_name, _pos];
|
_MainMarker = createMarker [_name, _pos];
|
||||||
@ -74,19 +74,15 @@ _blck_fn_configureIconMarker = {
|
|||||||
_MainMarker setMarkerText _text;
|
_MainMarker setMarkerText _text;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isServer && (blck_debugLevel isEqualTo 3)) then
|
|
||||||
{
|
|
||||||
diag_log format["spawnMarker:: -- >> _this = %1",_this];
|
|
||||||
};
|
|
||||||
// _this = [[""BlueMarker"",[12524.1,18204.7,0],""Bandit Patrol"",""center"",""ColorBlue"",[""ELIPSE"",[175,175]]],""ColorBlue"",""BlueMarker""]"
|
// _this = [[""BlueMarker"",[12524.1,18204.7,0],""Bandit Patrol"",""center"",""ColorBlue"",[""ELIPSE"",[175,175]]],""ColorBlue"",""BlueMarker""]"
|
||||||
params["_mArray"];
|
params["_mArray"];
|
||||||
_mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"];
|
_mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"];
|
||||||
_markerType params["_mShape","_mSize","_mBrush"];
|
_markerType params["_mShape","_mSize","_mBrush"];
|
||||||
|
|
||||||
if (isServer && (blck_debugLevel isEqualTo 3)) then
|
//if (isServer && (blck_debugLevel > 0)) then
|
||||||
{
|
//{
|
||||||
diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType];
|
if (blck_debugLevel > 1) then {diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType];};
|
||||||
};
|
//};
|
||||||
if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon ....
|
if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon ....
|
||||||
{
|
{
|
||||||
switch (_missionType) do {
|
switch (_missionType) do {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Blckegls mission system Ver 6.55
|
Blckegls mission system Ver 6.57
|
||||||
|
|
||||||
Build 38
|
Build 41
|
||||||
|
|
||||||
Included is an updated version of blckeagls mission system. This began as an effort to fix bugs in and upgrade version 2.0.2 as updated by Narines and has now evolved to a complete reworking of almost all code.
|
Included is an updated version of blckeagls mission system. This began as an effort to fix bugs in and upgrade version 2.0.2 as updated by Narines and has now evolved to a complete reworking of almost all code.
|
||||||
|
|
||||||
|
@ -4,6 +4,16 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
|
|||||||
Contributions by Narines: bug fixes, testing, infinite ammo fix.
|
Contributions by Narines: bug fixes, testing, infinite ammo fix.
|
||||||
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
|
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
|
||||||
|
|
||||||
|
3/13/17 Version 6.58 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.
|
||||||
|
|
||||||
|
3/12/17 Version 6.57 Build 40
|
||||||
|
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.
|
||||||
Added a check so that mission completion by players near loot crates was tripped only when players were on foot.
|
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.
|
Added a setting that determines whether loot crates are loaded when the mission spawns or once the mission is complete.
|
||||||
@ -14,6 +24,7 @@ bug fixes
|
|||||||
Commented out logging that is no longer needed
|
Commented out logging that is no longer needed
|
||||||
Removed a weapon from loot tables that could be used for dupping.
|
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
|
||||||
Added a new configuration blck_killEmptyStaticWeapons which determines if static weapons shoudl be disabled after the AI is killed.
|
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.
|
Added a configuration blck_cleanUpLootChests that determines if loot crates are deleted when other mission objects are deleted.
|
||||||
|
Loading…
Reference in New Issue
Block a user