Updates and bug fixes - see change long

This commit is contained in:
Chris Cardozo 2020-01-29 08:37:13 -05:00
parent 464910860e
commit 331bf40a89
89 changed files with 1408 additions and 2585 deletions

View File

@ -1,28 +0,0 @@
1. Added new settings to specify the number of crew per vehhicle to blck_config.sqf and blck_config_mil.sqf
// global settings for this parameters
// Determine the number of crew plus driver per vehicle; excess crew are ignored.
// This can be a value or array of [_min, _max];
blck_vehCrew_blue = 3;
blck_vehCrew_red = 3;
blck_vehCrew_green = 3;
blck_vehCrew_orange = 3;
You can also define this value in missions by adding the following variable definition to the mission template:
_vehicleCrewCount = [3,6]; // min/max number of AI to load including driver. see the missions\blue\template.sqf and blck_configs.sqf for more info.
2. Lists of items to be excluded from dynamically generated loadouts has been moved to:
blck_config.sqf
blck_config_mil.sqf
3. Added a new setting that specifies whether logging of blacklisted items is done (handy for debugging)
blck_logBlacklistedItems = true; // set to false to disable logging
4. Hit and Killed event handlers extensively reworked. Methods for notification of nearby AI and Vehicles of the killers whereabouts were revised to be more inclusive of neighboring AI.
5. Issues with AIHit events fixed; AI now deploy smoke and heal.
6. Removed some unnecessary logging.
7. Other minor coding fixes and optimizations.

View File

@ -9,7 +9,13 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
<<<<<<< Updated upstream
params["_markerName"];
=======
params[["_markerName",""]];
diag_log format["_fnc_deleteMarker: _maerkName = %1",_markerName];
if (_markerName isEqualTo "" || !(typeName _markerName isEqualTo "STRING")) exitWith {diag_log format"[blckeagls] <ERROR> illeagal or missing marker name: typeName _markerName = %1 | _makerName = %2",typeName _markerName,_markerName};
>>>>>>> Stashed changes
deleteMarker _markerName;
deleteMarker ("label" + _markerName);

View File

@ -1,24 +0,0 @@
// pull trader cities from config
/*
By Ghostrider [GRG]
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";
if !(blck_blacklistTraderCities) exitWith {};
diag_log format["[blckeagls] Adding Trader Cities to blacklisted locations based on setting for blck_blacklistTraderCities = %1",blck_blacklistTraderCities];
private _traderCites = allMapMarkers;
{
if (_x in ["center","respawn_east","respawn_west","respawn_north"] && blck_blacklistTraderCities) then
{
blck_locationBlackList pushback [getMarkerPos _x,1000];
//if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getTraderCitiesEpoch:: -- >> Added epoch trader city location at %1", (getMarkerPos _x)];};
};
}forEach _traderCites;

View File

@ -1,31 +0,0 @@
// pull trader cities from config
/*
By Ghostrider [GRG]
--------------------------
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 _traderCites = allMapMarkers;
_tc = [];
{
//if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getExileLocations :: -- >> Evaluating Markertype of %1", (getMarkerType _x)];};
if (getMarkerType _x isEqualTo "ExileTraderZone" && blck_blacklistTraderCities) then {
blck_locationBlackList pushback [(getMarkerPos _x),1000];
if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getExileLocations :: -- >> Added Exile Trader location at %1", (getMarkerPos _x)];};
};
if ((getMarkerType _x isEqualTo "ExileSpawnZone") && blck_blacklistSpawns) then {
blck_locationBlackList pushback [(getMarkerPos _x),1000];
if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getExileLocations :: -- >> Added Exile Spawn location at %1", (getMarkerPos _x)];};
};
//
if (getMarkerType _x isEqualTo "ExileConcreteMixerZone" && blck_listConcreteMixerZones) then {
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;

View File

@ -24,9 +24,13 @@ while {true} do
uiSleep 1;
if (diag_tickTime > _timer1sec) then
{
<<<<<<< Updated upstream
#ifdef GRGserver
[] call blck_fnc_broadcastServerFPS;
#endif
=======
>>>>>>> Stashed changes
_timer1sec = diag_tickTime + 1;
};
if (diag_tickTime > _timer5sec) then
@ -35,6 +39,15 @@ while {true} do
if (blck_simulationManager isEqualTo blck_useBlckeaglsSimulationManagement) then {[] call blck_fnc_simulationManager};
[] call blck_fnc_sm_staticPatrolMonitor;
[] call blck_fnc_vehicleMonitor;
<<<<<<< Updated upstream
=======
//[] call blck_fnc_cleanupAliveAI;
//[] call blck_fnc_cleanupObjects;
//[] call blck_fnc_cleanupDeadAI;
#ifdef GRGserver
[] call blck_fnc_broadcastServerFPS;
#endif
>>>>>>> Stashed changes
};
if (diag_tickTime > _timer20sec) then
{
@ -44,15 +57,22 @@ while {true} do
[] call blck_fnc_scanForPlayersNearVehicles;
[] call GMS_fnc_cleanupTemporaryMarkers;
[] call GMS_fnc_updateCrateSignals;
<<<<<<< Updated upstream
[] call blck_fnc_cleanEmptyGroups;
=======
>>>>>>> Stashed changes
_timer20sec = diag_tickTime + 20;
};
if ((diag_tickTime > _timer1min)) then
{
_timer1min = diag_tickTime + 60;
[] call blck_fnc_spawnPendingMissions;
<<<<<<< Updated upstream
[] call blck_fnc_cleanEmptyGroups;
[] call blck_fnc_groupWaypointMonitor; // TODO: Test implementation of this function.
=======
[] call blck_fnc_groupWaypointMonitor;
>>>>>>> Stashed changes
if (blck_dynamicUMS_MissionsRuning < blck_numberUnderwaterDynamicMissions) then {[] spawn blck_fnc_addDyanamicUMS_Mission};
if (blck_useHC) then {[] call blck_fnc_HC_passToHCs};
if (blck_useTimeAcceleration) then {[] call blck_fnc_timeAcceleration};
@ -79,6 +99,13 @@ while {true} do
};
} forEach diag_activeSQFScripts;
#endif
<<<<<<< Updated upstream
=======
[] call blck_fnc_cleanupAliveAI;
[] call blck_fnc_cleanupObjects;
[] call blck_fnc_cleanupDeadAI;
[] call blck_fnc_cleanEmptyGroups;
>>>>>>> Stashed changes
_timer5min = diag_tickTime + 300;
};
};

View File

@ -14,8 +14,8 @@ private["_blck_fn_configureRoundMarker"];
_blck_fn_configureRoundMarker = {
private["_name","_pos","_color","_size","_MainMarker","_arrowMarker","_labelMarker","_labelType"];
params["_name","_pos","_color","_text","_size","_labelType","_mShape","_mBrush"];
if ((_pos distance [0,0,0]) < 10) exitWith {};
if ((_pos distance [0,0,0]) < 10) exitWith {};
_MainMarker = createMarker [_name, _pos];
_MainMarker setMarkerColor _color;
_MainMarker setMarkerShape "ELLIPSE";
@ -62,9 +62,11 @@ _blck_fn_configureIconMarker = {
_MainMarker
};
params["_mArray"];
params["_mArray","_mBrush"];
private["_marker"];
_mArray params["_missionMarkerName","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerTypeInfo"];
<<<<<<< Updated upstream
_markerTypeInfo params["_mShape",["_mSize",[0,0]],["_mBrush","GRID"]];
if (toUpper(_mShape) in ["ELIPSE","ELLIPSE","RECTANGLE"]) then // not an Icon ....
{
@ -72,6 +74,16 @@ if (toUpper(_mShape) in ["ELIPSE","ELLIPSE","RECTANGLE"]) then // not an Icon ..
};
if !(toUpper(_mShape) in ["ELIPSE","ELLIPSE","RECTANGLE"]) then
{
=======
_markerTypeInfo params[["_mShape","mil_dot"],["_mSize",[0,0]],["_mBrush","GRID"]];
if (toUpper(_mShape) in ["ELLIPSE","RECTANGLE"]) then // not an Icon ....
{
if (isNil "_mBrush") then {_mBrush = "GRID"};
_marker = [_missionMarkerName,_markerPos,_markerColor,_markerLabel, _mSize,_markerLabelType,_mShape,_mBrush] call _blck_fn_configureRoundMarker;
} else {
>>>>>>> Stashed changes
_marker = [_missionMarkerName,_markerPos, _markerColor,_markerLabel,_mShape] call _blck_fn_configureIconMarker;
};
if (isNil "_marker") then {_marker = ""};

View File

@ -15,7 +15,6 @@ blck_fnc_countGroupsAssigned = {
params["_HC"];
private["_result"];
_result = {(groupOwner _x) == (owner _HC)} count allGroups;
//diag_log format["_fnc_countGroupsAssigned = %1",_result];
_result
};
@ -24,26 +23,20 @@ _numTransfered = 0;
_idHC = -2;
if (blck_limit_ai_offload_to_blckeagls) then {_groups = blck_monitoredMissionAIGroups} else {_groups = allGroups};
blck_connectedHCs = entities "HeadlessClient_F";
diag_log format["_fnc_passToHCs:: blck_connectedHCs = %1 | count _HCs = %2 | server FPS = %3",blck_connectedHCs,count blck_connectedHCs,diag_fps];
//diag_log format["_fnc_passToHCs:: blck_connectedHCs = %1 | count _HCs = %2 | server FPS = %3",blck_connectedHCs,count blck_connectedHCs,diag_fps];
if !(blck_connectedHCs isEqualTo []) then
{
_idHC = [blck_connectedHCs] call blck_fnc_HC_leastBurdened;
{
//diag_log format["_fnc_passToHCs: group = %1 | owner = %2 | blck_group = %3",_x, groupOwner _x, _x getVariable ["blck_group","undefined"]];
//if (_x getVariable["blck_group",false]) then
//{
if ((groupOwner _x) == 2) then
{
private _sgor = _x setGroupOwner (owner _idHC);
//diag_log format["_fnc_passToHCs: group = %1 | _sgor = %2 | _idHC = %3",_x,_sgor,_idHC];
if (_sgor) then
{
[_x] remoteExec["blck_fnc_HC_XferGroup",_idHC];
_numTransfered = _numTransfered + 1;
//diag_log format["_fnc_passToHCs: group %1 Passed to HC %2",_x,_idHC];
};
};
//};
} forEach (_groups);
//diag_log format["[blckeagls] _passToHCs:: %1 groups transferred to HC %2",_numTransfered,_idHC];
};

View File

@ -1,22 +0,0 @@
/*
Adds a list of live AI associated with a mission to a que of live AI that will be deleted at a later time by the main thread
call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs
By Ghostrider-GRG-
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";
//diag_log format["_fnc_addLiveAIToQue:: -> when called, blck_liveMissionAI = %1",blck_liveMissionAI];
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

@ -1,22 +0,0 @@
/*
Adds a list of live AI associated with a mission to a que of live AI that will be deleted at a later time by the main thread
call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs
By Ghostrider-GRG-
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["_objList","_timeDelay"];
//diag_log format["_fnc_addObjToQue:: -- >> _objList = %1 || _timeDelay = %2",_objList,_timeDelay];
//diag_log format["_fnc_addObjToQue:: (11) -- >> blck_oldMissionObjects prior to update = %1",blck_oldMissionObjects];
blck_oldMissionObjects pushback [_objList, (diag_tickTime + _timeDelay)];
//diag_log format["_fnc_addObjToQue:: (11) -- >> blck_oldMissionObjects after update = %1",blck_oldMissionObjects];

View File

@ -17,10 +17,17 @@ private["_cleanupAliveAITimer","_cleanupCompositionTimer","_isScubaMission"];
_fn_missionCleanup = {
params["_mines","_objects","_blck_AllMissionAI","_mission","_cleanupAliveAITimer","_cleanupCompositionTimer",["_isScubaMission",false]];
<<<<<<< Updated upstream
//diag_log format["_fn_missionCleanup: blck_missionsRunning Started at %1", blck_missionsRunning];
[_mines] call blck_fnc_clearMines;
[_objects, _cleanupCompositionTimer] call blck_fnc_addObjToQue;
[_blck_AllMissionAI, (_cleanupAliveAITimer)] call blck_fnc_addLiveAItoQue;
=======
[_mines] call blck_fnc_clearMines;
//[_coords,_objects, _cleanupCompositionTimer] call blck_fnc_addObjToQue;
blck_oldMissionObjects pushback [_coords,_objects, (diag_tickTime + _cleanupCompositionTimer)];
blck_liveMissionAI pushback [_coords,_blck_AllMissionAI, (diag_tickTime + _cleanupAliveAITimer)];
>>>>>>> Stashed changes
blck_missionsRunning = blck_missionsRunning - 1;
//diag_log format["_fn_missionCleanup: blck_missionsRunning reset to %1", blck_missionsRunning];
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
@ -40,6 +47,7 @@ _fn_missionCleanup = {
///////////////////////////////////////////////////////////////////////
// MAIN FUNCTION STARTS HERE
//////////////////////////////////////////////////////////////////////
<<<<<<< Updated upstream
#ifdef blck_debugMode
diag_log format["_fnc_endMission: _this = %1",_this];
#endif
@ -67,6 +75,17 @@ _fn_missionCleanup = {
_cleanupCompositionTimer = 0;
_cleanupAliveAITimer = 0;
=======
params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_endCondition",0],["_vehicles",[]],["_isScubaMission",false]];
if (_endCondition > 0) exitWith // Mision aborted for some reason
{
[_blck_localMissionMarker select 0] call blck_fnc_deleteMarker;
_cleanupCompositionTimer = 0;
_cleanupAliveAITimer = 0;
>>>>>>> Stashed changes
[_mines,_objects,_blck_AllMissionAI,_mission,_cleanupAliveAITimer,_cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
{
//if (local _x) then {deleteVehicle _x};
@ -77,7 +96,11 @@ _fn_missionCleanup = {
};
if (_endCondition <= 0) then // Normal Mission End State
{
<<<<<<< Updated upstream
//diag_log format["_fnc_endMission: mission end condition == 0 | setting all timers to 0"];
=======
>>>>>>> Stashed changes
private["_cleanupAliveAITimer","_cleanupCompositionTimer"];
if (blck_useSignalEnd) then
{
@ -85,6 +108,7 @@ _fn_missionCleanup = {
{
_x enableRopeAttach true;
}forEach _crates;
<<<<<<< Updated upstream
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
@ -97,6 +121,9 @@ _fn_missionCleanup = {
diag_log format["_fnc_endMission: Mission Completed without errors, setting all timers to default values"];
};
#endif
=======
};
>>>>>>> Stashed changes
_cleanupCompositionTimer = blck_cleanupCompositionTimer;
_cleanupAliveAITimer = blck_AliveAICleanUpTimer;
@ -118,9 +145,12 @@ _fn_missionCleanup = {
_posnVeh = blck_monitoredVehicles find _x; // returns -1 if the vehicle is not in the array else returns 0-(count blck_monitoredVehicles -1)
if (_posnVeh >= 0) then
{
<<<<<<< Updated upstream
#ifdef blck_debugMode
diag_log format["_fnc_endMission: setting missionCompleted for vehicle %1 to %2",_x,diag_tickTime];
#endif
=======
>>>>>>> Stashed changes
(blck_monitoredVehicles select _posnVeh) setVariable ["missionCompleted", diag_tickTime];
} else {
_x setVariable ["missionCompleted", diag_tickTime];
@ -129,8 +159,12 @@ _fn_missionCleanup = {
} forEach _vehicles;
[_mines,_objects,_blck_AllMissionAI,_mission,_cleanupAliveAITimer,_cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
};
<<<<<<< Updated upstream
#ifdef blck_debugMode
diag_log format["_fnc_endMission: after to running mission end functions -> blck_missionsRunning = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_missionsRunning,blck_dynamicUMS_MissionsRuning];
#endif
//diag_log format["_fnc_endMission (138): after to running mission end functions -> blck_missionsRunning = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_missionsRunning,blck_dynamicUMS_MissionsRuning];
=======
>>>>>>> Stashed changes
_endCondition

View File

@ -16,7 +16,11 @@
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_assetKilledMsg","_enemyLeaderConfig",
"_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned","_hostageConfig",
"_chanceHeliPatrol","_noPara","_chanceLoot","_heliCrew","_loadCratesTiming","_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius",
<<<<<<< Updated upstream
"_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_marker","_vehicleCrewCount"];
=======
"_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_paraSkill","_marker","_vehicleCrewCount"];
>>>>>>> Stashed changes
params["_coords","_markerClass","_aiDifficultyLevel"];
@ -28,7 +32,11 @@ diag_log format["[blckeagls] missionSpawner (17):: Initializing mission: _cords
if (isNil "_assetKilledMsg") then {_assetKilledMsg = ""};
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
<<<<<<< Updated upstream
//if (isNil "_timeOut") then {_timeOut = -1;};
=======
if (isNil "_markerSize") then {_markerSize = []};
>>>>>>> Stashed changes
if (isNil "_endCondition") then {_endCondition = blck_missionEndCondition}; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"};
if (isNil "_spawnCratesTiming") then {_spawnCratesTiming = blck_spawnCratesTiming}; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
@ -48,6 +56,7 @@ if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_
if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops};
if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis};
if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops};
if (isNil "_paraSkill") then {_paraSkill = _aiDifficultyLevel};
if (isNil "_chanceLoot") then {_chanceLoot = 1.0}; //0.5};
if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;};
if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Green}; // Add diffiiculty based settings
@ -56,6 +65,25 @@ if (isNil "_missionLootVehicles") then {_missionLootVehicles = []};
if (isNil "_garrisonedBuilding_ATLsystem") then {_garrisonedBuilding_ATLsystem = []};
if (isNil "_garrisonedBuildings_BuildingPosnSystem") then {_garrisonedBuildings_BuildingPosnSystem = []};
if (isNil "_vehicleCrewCount") then {_vehicleCrewCount = [_aiDifficultyLevel] call GMS_fnc_selectVehicleCrewCount};
<<<<<<< Updated upstream
=======
if (isNil "_defaultMissionLocations") then {_defaultMissionLocations = []};
if (isNil "_submarinePatrolParameters") then {_submarinePatrolParameters = []};
if (isNil "_airpatrols") then {_airpatrols = []};
if (isNil "_scubagroupparameters") then {_scubagroupparameters = []};
if (isNil "_markerMissionName") then {
diag_log format["_fnc_missionSpawner: _markerMissionName not defined, using default value"];
_markerMissionName = "Default Mission Name";
};
if (isNil "_noLootCrates") then {_noLootCrates = 1};
if (isNil "_lootCrates") then {_lootCrates = blck_crateTypes};
if (isNil "_lootCratePositions") then {_lootCratePositions = []};
//if (isNil "_markerSize") then {_markerSize = [200,200]};
//if (isNil "_markerBrush") then {_markerBrush = "GRID"};
if (isNil "_isScubaMission") then {_isScubaMission = false};
if (isNil "_missionLootBoxes") then {_missionLootBoxes = []};
private "_temp";
>>>>>>> Stashed changes
_objects = [];
_mines = [];
@ -180,6 +208,7 @@ if (blck_debugLevel > 0) then
uiSleep delayTime;
_abort = false;
<<<<<<< Updated upstream
_temp = [[],[],false];
#ifdef blck_debugMode
@ -190,6 +219,11 @@ private _params = [_coords,_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_
#endif
_temp = [_coords, _minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionAI;
=======
_temp = [];
_temp = [_coords, _minNoAI,_maxNoAI,_noAIGroups,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionAI;
>>>>>>> Stashed changes
_abort = _temp select 1;
@ -291,6 +325,7 @@ _noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
if (blck_useStatic && (_noEmplacedToSpawn > 0)) then
{
_temp = [_coords,_missionEmplacedWeapons,useRelativePos,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
<<<<<<< Updated upstream
if (typeName _temp isEqualTo "ARRAY") then
{
@ -302,6 +337,11 @@ if (blck_useStatic && (_noEmplacedToSpawn > 0)) then
_objects append (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
=======
_temp params ["_emplacedObjects","_units","_abort"];
_objects append _emplacedObjects;
_blck_AllMissionAI append _units;
>>>>>>> Stashed changes
};
#ifdef blck_debugMode
@ -314,16 +354,32 @@ if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles
{
//diag_log format["_missionSpawner(315): _vehToSpawn = %1 | _missionPatrolVehicles = %2",_vehToSpawn,_missionPatrolVehicles];
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
<<<<<<< Updated upstream
//diag_log format["_missionSpawner(317): _temp = %1",_temp];
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
=======
diag_log format["_fnc_missionSpawner (327) _temp = %1",_temp];
_temp params ["_patrolVehicles","_units","_abort"];
_blck_AllMissionAI append _units;
/*
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
} else {
_abort = true;
>>>>>>> Stashed changes
};
if !(_abort) then
{
_patrolVehicles = _temp select 0;
_blck_AllMissionAI append (_temp select 1);
};
<<<<<<< Updated upstream
=======
*/
>>>>>>> Stashed changes
};
#ifdef blck_debugMode
@ -358,7 +414,11 @@ if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (355) loot crate(s)
if (count _missionLootVehicles > 0) then
{
<<<<<<< Updated upstream
_temp = [_coords,_missionLootVehicles,_loadCratesTiming] call blck_fnc_spawnMissionLootVehicles;
=======
_temp = [_coords,_missionLootVehicles,_loadCratesTiming,0] call blck_fnc_spawnMissionLootVehicles;
>>>>>>> Stashed changes
_crates append _temp;
};
if (_noPara > 0 && (random(1) < _chancePara) && _paraTriggerDistance == 0) then

View File

@ -24,12 +24,15 @@ _headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear;
_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests;
_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks;
if (_patrols isEqualTo []) then
if !(_patrols isEqualTo []) then
{
<<<<<<< Updated upstream
// Use the random spawn logic from the regular dyanmic mission system.
//params[_coords,"_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weapons,sideArms,_isScubaGroup];
[_coords,_minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sidearms,false] call blck_fnc_spawnMissionAI;
} else {
=======
>>>>>>> Stashed changes
{
//diag_log format["_sm_spawnInfantryPatrols.sqf:: _x = %1",_x];
// Use the pre-defined spawn positions and other parameters for each group.

View File

@ -632,5 +632,10 @@ _result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMission
#ifdef blck_debugMode
diag_log format["[blckeagls] dynamicUMSspawner:: (559) end of mission: blck_fnc_endMission has returned control to _fnc_dynamicUMSspawner"];
#endif
<<<<<<< Updated upstream
blck_missionsRun = blck_missionsRun + 1;
diag_log format["[blckeagls] dynamicUMSspawner:: Total Dyanamic Land and UMS Run = %1", blck_missionsRun];
=======
//blck_missionsRun = blck_missionsRun + 1;
//diag_log format["[blckeagls] dynamicUMSspawner:: Total Dyanamic Land and UMS Run = %1", blck_missionsRun];
>>>>>>> Stashed changes

View File

@ -32,20 +32,23 @@ _unitsPerGroup = 0;
_ResidualUnits = 0;
if (_noAIGroups > 0) then
{
// Can add optional debug code here if needed.
_unitsToSpawn = [[_minNoAI,_maxNoAI]] call blck_fnc_getNumberFromRange; //round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
_ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups);
// Can add optional debug code here if needed.
_unitsToSpawn = [[_minNoAI,_maxNoAI]] call blck_fnc_getNumberFromRange; //round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
_ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups);
};
_blck_AllMissionAI = [];
_abort = false;
<<<<<<< Updated upstream
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
{
diag_log format["_fnc_spawnMissionAI (30):: _unitsToSpawn %1 ; _unitsPerGroup %2 _ResidualUnits %3",_unitsToSpawn,_unitsPerGroup,_ResidualUnits];
};
#endif
=======
>>>>>>> Stashed changes
private _newGroup = grpNull;
//_newGroup setVariable ["soldierType","infantry"];
if ( (count _missionGroups > 0) && _noAIGroups > 0) then
@ -64,6 +67,7 @@ if ( (count _missionGroups > 0) && _noAIGroups > 0) then
if !(isNull _newGroup) then
{
//[["_group","Error"],"_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true], ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_scuba",false],["_patrolRadius",30]];
[_newGroup,_groupSpawnPos,_coords,_minAI,_maxAI,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup;
_newGroup setVariable ["soldierType","infantry"];
_newAI = units _newGroup;

View File

@ -74,6 +74,28 @@ if (_missionPatrolVehicles isEqualTo []) then
};
};
} forEach _missionPatrolVehicles;
<<<<<<< Updated upstream
blck_monitoredVehicles append _vehicles;
_return = [_vehicles, _missionAI, _abort];
=======
if !(_abort) then
{
blck_monitoredVehicles append _vehicles;
if !(isNil "blck_spawnerMode") then
{
_return = [_vehicles, _missionAI];
} else {
_return = [_vehicles, _missionAI, _abort];
};
} else {
if !(isNil "blck_spawnerMode") then
{
{[_x] call blck_fnc_destroyVehicleAndCrew} forEach _vehicles;
_return = grpNull;
} else {
blck_monitoredVehicles append _vehicles;
_return = [_emplacedWeps,_emplacedAI,_abort];
};
};
>>>>>>> Stashed changes
_return

View File

@ -23,9 +23,7 @@
(unit) addMagazine (newMagazine);
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {
//diag_log format["_EH_unitWeaponReloaded:: unit %1 reloaded weapon %2 with magazine %3",_this select 0, (_this select 3 select 0)];
//diag_log format["_EH_unitWeaponReloaded:: unit %1 currently has the following magazines 2",_this select 0,magazines (_this select 0)];
diag_log format["_EH_unitWeaponReloaded:: one magazine of type %1 added to inventory of unit %2",_mag,(_this select 3 select 0];
diag_log format["_EH_unitWeaponReloaded:: one magazine of type %1 added to inventory of unit %2",_mag,(_this select 3 select 0)];
};
#endif

View File

@ -73,6 +73,7 @@ if (blck_debugLevel >= 2) then
[_unit] call blck_fnc_removeGear;
if (_scuba) then
{
<<<<<<< Updated upstream
_unit swiminDepth (_pos select 2);
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then
@ -80,6 +81,9 @@ if (_scuba) then
diag_log format["_fnc_spawnUnit:: -- >> unit depth = %1 and underwater for unit = %2",_pos select 2, underwater _unit];
};
#endif
=======
_unit swiminDepth (([_pos] call blck_fnc_findWaterDepth) / 2);
>>>>>>> Stashed changes
};
_skin = "";
@ -193,13 +197,6 @@ else
_unit addWeapon selectRandomWeighted["",4,"Binocular",3,"Rangefinder",1];
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_spawnUnit:: --> unit loadout = %1", getUnitLoadout _unit];
};
#endif
_unit addEventHandler ["FiredNear",{_this call blck_EH_AIfiredNear;}];
_unit addEventHandler ["Reloaded", {_this call blck_EH_unitWeaponReloaded;}];
_unit addMPEventHandler ["MPKilled", {[(_this select 0), (_this select 1)] call blck_EH_AIKilled;}];

View File

@ -431,7 +431,65 @@
blck_maxMoneyRed = 15;
blck_maxMoneyBlue = 10;
<<<<<<< Updated upstream
if (toLower(blck_modType) isEqualTo "epoch") then
=======
#ifdef GRGserver
blck_AIAlertDistance = [250,450,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed.
//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 = 0.7; // 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 = 5;
blck_SkillsOrange = [
["aimingAccuracy",[0.25,0.36]],["aimingShake",[0.45,0.55]],["aimingSpeed",[0.65,0.75]],["endurance",1.00],["spotDistance",1.0],["spotTime",0.7],["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 = 4;
blck_SkillsGreen = [
["aimingAccuracy",[0.2,0.3]],["aimingShake",[0.4,0.5]],["aimingSpeed",[0.55,0.7]],["endurance",0.9],["spotDistance",0.9],["spotTime",0.65],["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,0.25]],["aimingShake",[0.35,0.4]],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.6],["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.08,16]],["aimingShake",[0.25,0.35]],["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;
blck_maxMoneyOrange = 25;
blck_maxMoneyGreen = 20;
blck_maxMoneyRed = 15;
blck_maxMoneyBlue = 10;
#endif
if (toLower(blck_modType) isEqualTo "epoch") then
>>>>>>> Stashed changes
{
diag_log format["[blckeagls] Loading Mission System using Parameters for %1",blck_modType];
execVM "\q\addons\custom_server\Configs\blck_configs_epoch.sqf";

View File

@ -50,6 +50,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
blck_allowSalesAtBlackMktTraders = true; // Allow vehicles to be sold at Halvjes black market traders.
blck_lightlyArmed_ARMA3 = [
"B_G_Offroad_01_armed_F",
"O_G_Offroad_01_armed_F",
@ -63,19 +64,29 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
"I_APC_Wheeled_03_cannon_F"
];
blck_light_AT_ARMA3 = [
"O_G_Offroad_01_AT_F",
"B_G_Offroad_01_AT_F",
"O_T_LSV_02_AT_F",
"O_LSV_02_AT_F",
"B_T_LSV_01_AT_F",
"B_LSV_01_AT_F"
];
blck_tracked_AA_ARMA3 = [
"O_APC_Tracked_02_AA_F",
"B_APC_Tracked_01_AA_F"
];
blck_tracked_APC_ARMA3 = [
"B_APC_Tracked_01_rcws_F",
"B_APC_Tracked_01_CRV_F",
"B_APC_Tracked_01_AA_F",
"O_APC_Tracked_02_cannon_F",
"O_APC_Tracked_02_AA_F",
"O_APC_Wheeled_02_rcws_F",
"I_APC_tracked_03_cannon_F"
];
blck_Tanks_ARMA3 = [
//"B_MBT_01_arty_F",
"B_MBT_01_mlrs_F",
//"B_MBT_01_mlrs_F",
"B_MBT_01_TUSK_F",
"O_MBT_02_cannon_F",
//"O_MBT_02_arty_F",
@ -108,7 +119,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
"CUP_O_GAZ_Vodnik_PK_RU"
];
_blck_Tanks_CUP = [
blck_Tanks_CUP = [
"CUP_B_M2A3Bradley_USA_D",
"CUP_B_M113_desert_USA",
"CUP_B_M163_USA",

View File

@ -51,7 +51,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
blck_useConfigsGeneratedLoadouts = true;
blck_maximumItemPriceInAI_Loadouts = 1000;
_blck_armed_vehicles_Exile = [
blck_armed_vehicles_Exile = [
"Exile_Car_BTR40_MG_Green",
"Exile_Car_HMMWV_M134_Green",
"Exile_Car_HMMWV_M2_Green",
@ -59,7 +59,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
"Exile_Car_Offroad_Armed_Guerilla01"
];
_blck_lightlyArmed_ARMA3 = [
blck_lightlyArmed_ARMA3 = [
"B_G_Offroad_01_armed_F",
"O_G_Offroad_01_armed_F",
"B_MRAP_01_gmg_F",
@ -72,7 +72,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
"I_APC_Wheeled_03_cannon_F"
];
_blck_tracked_APC_ARMA3 = [
blck_tracked_APC_ARMA3 = [
"B_APC_Tracked_01_rcws_F",
"B_APC_Tracked_01_CRV_F",
"B_APC_Tracked_01_AA_F",
@ -82,7 +82,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
"I_APC_tracked_03_cannon_F"
];
_blck_Tanks_ARMA3 = [
blck_Tanks_ARMA3 = [
//"B_MBT_01_arty_F",
//"B_MBT_01_mlrs_F",
"B_MBT_01_TUSK_F",
@ -189,13 +189,13 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
"B_LSV_01_armed_F"
];
blck_AIPatrolVehiclesRed = _blck_lightlyArmed_ARMA3 + _blck_APC_CUP;
blck_AIPatrolVehiclesGreen = _blck_Tanks_ARMA3 + _blck_Tanks_CUP;
blck_AIPatrolVehiclesOrange = _blck_Tanks_ARMA3 + _blck_Tanks_CUP;
blck_AIPatrolVehiclesRed = blck_lightlyArmed_ARMA3 + _blck_APC_CUP;
blck_AIPatrolVehiclesGreen = blck_Tanks_ARMA3 + _blck_Tanks_CUP;
blck_AIPatrolVehiclesOrange = blck_Tanks_ARMA3 + _blck_Tanks_CUP;
if (toLower(worldName) isEqualTo "namalsk") then
{
_blck_lightlyArmed_ARMA3 = [
= [
"B_G_Offroad_01_armed_F",
"O_G_Offroad_01_armed_F",
//"B_MRAP_01_gmg_F",
@ -208,7 +208,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
//"I_APC_Wheeled_03_cannon_F"
];
diag_log "blck)configs_exile_mil.sqf:: - > Using special settings for namalsk";
blck_AIPatrolVehiclesRed = _blck_lightlyArmed_ARMA3 + blck_AIPatrolVehiclesBlue;
blck_AIPatrolVehiclesRed = blck_lightlyArmed_ARMA3 + blck_AIPatrolVehiclesBlue;
blck_AIPatrolVehiclesGreen = blck_AIPatrolVehiclesRed;
blck_AIPatrolVehiclesOrange = blck_AIPatrolVehiclesRed;
};

View File

@ -417,6 +417,63 @@
blck_maxMoneyRed = 30;
blck_maxMoneyBlue = 20;
<<<<<<< Updated upstream
=======
#ifdef GRGserver
blck_AIAlertDistance = [250,425,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed.
//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; // 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 = 30;
blck_MaxAI_Orange = 35;
blck_AIGrps_Orange = 5;
blck_SkillsOrange = [
["aimingAccuracy",0.6],["aimingShake",0.9],["aimingSpeed",0.9],["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 = 26;
blck_MaxAI_Green = 31;
blck_AIGrps_Green = 4;
blck_SkillsGreen = [
["aimingAccuracy",0.55],["aimingShake",0.75],["aimingSpeed",0.85],["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 = 18;
blck_AIGrps_Red = 3;
blck_SkillsRed = [
["aimingAccuracy",0.4],["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 = 14;
blck_AIGrps_Blue = 2;
blck_SkillsBlue = [
["aimingAccuracy",0.12],["aimingShake",0.3],["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;
#endif
>>>>>>> Stashed changes
if (toLower(blck_modType) isEqualTo "epoch") then
{
diag_log format["[blckeagls] Loading Mission System using Parameters for %1 for militarized servers",blck_modType];

View File

@ -152,10 +152,17 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in
blck_enableGreenMissions = 1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = 1;
<<<<<<< Updated upstream
blck_numberUnderwaterDynamicMissions = 1;
blck_enableHunterMissions = -1;
blck_enableScoutsMissions = -1;
blck_maxCrashSites = -3;
=======
blck_numberUnderwaterDynamicMissions = 3;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
blck_maxCrashSites = 1;
>>>>>>> Stashed changes
//blck_killEmptyStaticWeapons = false;
//blck_killEmptyAIVehicles = true;

View File

@ -22,7 +22,11 @@
///////////////////////////
//#define blck_debugMode
<<<<<<< Updated upstream
//#define GRGserver
=======
#define GRGserver
>>>>>>> Stashed changes
//#define blck_addCarParts
#define blck_triggerLoopCompleteTime 40*60
#define onFoot 1

View File

@ -124,8 +124,13 @@ if (toLower(blck_modType) isEqualTo "exile") then
case "Backpack": {if !(_x in blck_blacklistedBackpacks) then {_backpacks pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Backpack %1 Excluded: blacklisted Item",_x]}}};
};
};
<<<<<<< Updated upstream
} else {
if (["base",_x] call BIS_fnc_inString) then {diag_log format["_dynamicConfigs: excluding class %1",_x]};
=======
//} else {
//if (["base",_x] call BIS_fnc_inString) then {diag_log format["_dynamicConfigs: excluding class %1",_x]};
>>>>>>> Stashed changes
};
} forEach _classnameList;

View File

@ -0,0 +1,99 @@
Core Mission System.
The core mission system is configured to run 4 different classes of mission (Blue, Red, Green and Orange) simultaneously.
Reducing value for ...\custom_serer\configs\blck_configs.sqf\blck_maxSpawnedMissions will reduce the number of missions running on the server.
General settings include the ability set whether and how messages to players regarding missions spawned or completed are displayed,
whether and how messages to players regarding killed AI are displayed
Number of AI groups;
Number of AI per group;
AI skills;
Number and type of static weapons;
Number and type of armed vehicle patrols.
Presence of AI helicopter patrols.
Whether such patrols drop AI reinforcements.
Loot can also be configured for each mission class. You can modify the number of weapons, magazines, items, construction materials, etc.
You can also adjust the choices for each of these types of items.
The equipment selected for each class of mission can also be specified.
Whether kills by guns mounted on vehicles are to be penalized (gunes that are prohobited are listed in blck_config.sys).
Whether to spawn a smoking wreck near the mission to be used as a visual landmark.
Whether to spawn mines (recommended only when no vehcle patrols are spawned).
Where possible, I have tried group weapons based on desirability from low rank (5.56 ammo) to high rank (7.6 caliber or larger, large bore sniper, heavy LMG) then combine these groups to define parameters as needed.
The missions themselves are spawned from templates which can be used to define:
the messages sent to players;
text used to label the mark
type of marker used to label the map
number of AI groups and number of AI
(optional) loot chest positions and loot to be loaded
type and location of any objects, buildings, or other entities that give the mission character
number and (optional) locations of static weapons
number of vehicle patrols
To create and run new missions simply:
layout an AI base in the Arma 3 editor,
export the base as an .sqf
Define the above parameters (nu. AI groups, No AI, etc)
add this information to the mission template and modify any messages accordingly
Add the name of the file (e.g., "newAImission" to the list of missions to be spawned of that class in ...\custom)server\missions\GMS_missionLists.sqf
Repack your custom_server.pbo
Performance considerations.
At present, missions do not actually spawn objects or players untill a player is within the trigger distance (1000 M).
Hence, performance penalties should be modest to none until players engage a mission.
There is some performance penalty to having a lot of dead AI on the server, or a lot of spawned objects used for scenery at AI missions. Hence, these are deleted after a certain time.
Static Mission System (WIP).
Additional Modules Available:
1. Time Acceleration
This provides an optional ability to accelerate time by user-specified factors.
The time acceleration can be specified for night, daytime and dusk.
Variables controlling the time acceleration module are located in ...\custom_server\configs\blck_configs.sqf and are:
blck_useTimeAcceleration = false; // 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 = 4; // Dawn/dusk time accelearation
blck_timeAccelerationNight = 8; // Nighttim time acceleration
Note that map/mod specific settings can be specified in blck_custom_config.sqf if that is helpful.
2. Map Addons
This module allows you to load map-addons (custom bases, enhancements to villages or towns, ATMs at traders etc) but to do so in a way that is map and mod-specific.
I use it to manage the map addons we run on multiple different Arma servers.
It is designed to permit you to place files in subdirectories of the MapAddons folder to simplyfy organization of the various files.
You can enable/disable the use of map-addons with the following variable found in ...\custom_server\configs\blck_configs:
blck_spawnMapAddons = false;
You can define which addons you wish to load in ...\custom_server\MapAddons\MapAddons_init.sqf.
3. Static Loot System
This module spawns loot crates at pre-specified locations on the ground, inside buildings or on roofs.
It is designed to function in conjunction with the Map Addons module if you wish it to.
It was derived from the loot crate spawner originally released by DarthRogue but has been extensively revised.
One enhancement is that I have written the code so that you do not need to sort items by there arma type (weapon, magazine, item).
In any event, it is a great tool for placing loot chests at AI strongholds or static missions.
Some basic features are:
Crates can be spawned at precise locations with / without a nearby smoking wreck to mark their location (which crates an apololyptic feel).
Crates can be loaded with one of 3 different loadouts (add more if you like) which can be specified or randomly determined.
If the number of possible spawn locations is greater than the number of crates to spawned, spawn locations will be randomly chosen giving some variation to your mission.
The static loot crate spawner is enabled/disable by changing the following variable in ...\custom_server\configs\blck_configs.sqf
blck_spawnStaticLootCrates = false;
I wrote the crate spawner in a way that helps me manage static loot crates across multiple maps and mods.
The configuration files for Epoch or Exile give examples of how to implement the system.
Known issues
1.

View File

@ -0,0 +1,5 @@
Known issues
1.

View File

@ -20,18 +20,12 @@ _addonsPath = "\q\addons\custom_server\MapAddons\mapcontent\";
_addonsEpoch = [
//["mapName","subfolder","filename.sqf"]
// when "subfolder" equals "" then the spawner will look for the file in the mapcontent directory
// See the examples below and in custom_server\MapAddons\mapcontent\Altis for an idea as to how to set these arrays up.
/*
["Altis","Altis","mobileRefuelSaltFlats.sqf"],
["Altis","Altis","smallbaseSaltFlats.sqf"]
*/
];
_addonsExile = [
/*
["Altis","Altis","mobileRefuelSaltFlats-DBD_final.sqf"],
["Altis","Altis","smallbaseSaltFlats.sqf"]
*/
//["mapName","subfolder","filename.sqf"]
// when "subfolder" equals "" then the spawner will look for the file in the mapcontent directory
];
@ -50,7 +44,8 @@ _fnc_runIt =
} else {
_path = format["%1%2%3",_addonsPath,_x select 1,"\"];
};
if (blck_debugLevel > 1) then {diag_log format["[blckeagls] MapAddons::-->> Running the following script: %1%2",_path,_x select 2];};
if (blck_debugLevel >= 1) then {diag_log format["[blckeagls] MapAddons::-->> Running the following script: %1%2",_path,_x select 2];};
diag_log format["[blckeagls] MapAddons::-->> Running the following script: %1%2",_path,_x select 2];
[] execVM format["%1%2",_path,_x select 2];
};
}forEach _addons;

View File

@ -1,33 +0,0 @@
// Small bandit base on the salt flats
// by Ghostrider-GRG-
// 11/8/16
private _objects = [
["Land_BluntStone_02",[26582.2,24670.5,12.0115],[[0,0.995673,-0.0929294],[-0.130865,0.0921302,0.98711]],[false,false]],
["Land_BluntStone_02",[25767.7,21581.5,24.3651],[[0,0.999645,0.0266571],[-0.0346456,-0.0266411,0.999045]],[false,false]],
["Land_BluntStone_02",[24927.3,22961.3,11.2178],[[0,0.999996,0.00265199],[0.031983,-0.00265063,0.999485]],[false,false]],
["Flag_AAF_F",[22954.8,17041.1,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_CargoBox_V1_F",[22952.6,17016,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22947.5,17024.9,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22935.9,17031.2,3.19],[[-0.866282,-0.499555,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22934,17045.2,3.19],[[-0.979295,0.202436,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22942.7,17055.7,3.19],[[0.425964,-0.90474,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22956.6,17059.1,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22968.8,17054.2,3.19],[[0.658744,0.752367,0],[0,0,1]],[false,false]],
["Land_WaterTank_F",[22957.9,17020.7,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_WaterBarrel_F",[22973.4,17042.1,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_CncBarrier_F",[22955.9,17026.5,3.19],[[0.627124,-0.778919,0],[0,0,1]],[false,false]],
["Land_CncBarrierMedium4_F",[22944.5,17023.4,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_CncBarrierMedium4_F",[22960.6,17031.1,3.19],[[0.682042,-0.731313,0],[0,0,1]],[false,false]],
["Land_CncBarrierMedium4_F",[22966.7,17036.8,3.19],[[0.682042,-0.731313,0],[0,0,1]],[false,false]],
["Land_CncBarrierMedium4_F",[22971.8,17043.3,3.19],[[-0.855661,0.517537,0],[0,0,1]],[false,false]],
["Land_FuelStation_Build_F",[22949.7,17049.9,3.19],[[0.551057,-0.834468,0],[0,0,1]],[false,false]],
["Land_fs_feed_F",[22952.9,17044.6,3.19],[[0.555135,-0.83176,0],[0,0,1]],[false,false]]
];
{
private _object = (_x select 0) createVehicle [0,0,0];
_object setPosASL (_x select 1);
_object setVectorDirAndUp (_x select 2);
_object enableSimulationGlobal ((_x select 3) select 0);
_object allowDamage ((_x select 3) select 1);
} forEach _objects;

View File

@ -1,41 +0,0 @@
// Small bandit base on the salt flats
// by Ghostrider-GRG-
// 11/8/16
private _objects = [
["Land_HBarrier_1_F",[23531.2,18446,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23533.5,18446.1,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23536.8,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23540.2,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23543.6,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23529.6,18431.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23530.1,18434.7,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23530.4,18437.9,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23530.7,18441.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23543.7,18431.2,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23544.1,18434.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23544.5,18437.7,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23544.7,18441.2,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23530.3,18427.3,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23533.6,18426.9,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23536.9,18426.6,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23540.4,18426.5,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]],
["Land_HBarrier_01_big_tower_green_F",[23556.9,18453,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrierTower_F",[23520,18423,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Scrap_MRAP_01_F",[23536,18434.6,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_PressureWasher_01_F",[23534.2,18427.5,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_PressureWasher_01_F",[23534.2,18427.5,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_ScrapHeap_1_F",[23549.8,18426.8,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_ScrapHeap_2_F",[23524.8,18445.7,3.19],[[0,1,0],[0,0,1]],[false,false]],
["CamoNet_INDP_Curator_F",[23536.3,18434,3.19],[[-0.998396,0.0566218,0],[0,0,1]],[false,false]],
["Land_Cargo_House_V3_F",[23556.7,18420.3,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Cargo_House_V3_F",[23519.2,18449.4,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Flag_AAF_F",[23538.1,18443,3.19],[[0,1,0],[0,0,1]],[false,false]]
];
{
private _object = (_x select 0) createVehicle [0,0,0];
_object setPosASL (_x select 1);
_object setVectorDirAndUp (_x select 2);
_object enableSimulationGlobal ((_x select 3) select 0);
_object allowDamage ((_x select 3) select 1);
} forEach _objects;

View File

@ -13,6 +13,7 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
<<<<<<< Updated upstream
_pathBlue = "Blue";
//_missionListBlue = ["hostage1"];
_missionListBlue = ["default","captive1","hostage1"/*,"default2"/*,"medicalCamp","redCamp","resupplyCamp"*/];
@ -28,3 +29,16 @@ _missionListGreen = [/*"default","default2",/*"redCamp",*//*"resupplyCamp",*/"me
_pathOrange = "Orange";
//_missionListOrange = ["resupplyCamp"];
_missionListOrange = [/*"default","default2","medicalCamp","redCamp",*/"resupplyCamp"];
=======
private _pathBlue = "Blue";
private _missionListBlue = ["default","hostage1","captive1","medicalCamp","redCamp","resupplyCamp"];
private _pathRed = "Red";
private _missionListRed = ["default","redCamp","medicalCamp","resupplyCamp"];
private _pathGreen = "Green";
private _missionListGreen = ["default","medicalCamp","redCamp","resupplyCamp"];
private _pathOrange = "Orange";
private _missionListOrange = ["default","medicalCamp","redCamp","resupplyCamp"];
>>>>>>> Stashed changes

View File

@ -1,17 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_sm_addAircraft: _this = %5",_this];
params["_aircraftPatrol"];
//diag_log format["_sm_addAircraft: _aircraftPatrol = %1",_aircraftPatrol];
blck_sm_Aircraft pushBack [_aircraftPatrol,grpNull,0];
//diag_log format["_sm_addAircraft: updated blck_sm_Aircraft = %1",blck_sm_Aircraft];
true

View File

@ -1,16 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_emplacedWeapon"];
blck_sm_Emplaced pushBack [_emplacedWeapon,grpNull,0];
diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced];
true

View File

@ -1,16 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_group"];
blck_sm_Groups pushBack [_group,grpNull,0];
diag_log format["_sm_AddGroup:: blck_sm_Groups = %1",blck_sm_Groups];
true

View File

@ -1,22 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_array","_patrolInformation",["_timesToRespawn",-1]];
waitUntil {blck_sm_monitoring isEqualTo 0};
_array pushBack [
_patrolInformation,
grpNull,
0, // groupSpawned
0, // times Spawned
0, // Respawn At
_timesToRespawn // Max Times to Respawn
];
_array

View File

@ -1,16 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_vehicle"];
blck_sm_Vehicles pushBack [_vehicle,grpNull,0];
//diag_log format["_fnc_sm_AddVehicle: _vehicle = %1",_vehicle];
true

View File

@ -1,80 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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 "[blckeagls] GMS_fnc_sm_init_functions.sqf <Defining Variables and Compiling Functions>";
//blck_sm_Groups = [];
blck_sm_Infantry = [];
blck_sm_Vehicles = [];
blck_sm_Aircraft = [];
blck_sm_Emplaced = [];
blck_sm_scubaGroups = [];
blck_sm_surfaceShips = [];
blck_sm_submarines = [];
blck_sm_lootContainers = [];
blck_sm_garrisonBuildings_ASL = [];
blcl_sm_garrisonBuilding_relPos = [];
blck_fnc_sm_AddGroupToArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroupToArray.sqf";
/*
blck_fnc_sm_AddGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroup.sqf";
blck_fnc_sm_AddVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddVehicle.sqf";
blck_fnc_sm_AddAircraft = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddAircraft.sqf";
blck_fnc_sm_AddEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddEmplaced.sqf";
*/
private _functions = [
//["blck_fnc_sm_monitorStaticUnits","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticPatrols.sqf"],
["blck_fnc_sm_monitorInfantry","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorInfantry.sqf"],
["blck_fnc_sm_monitorScuba","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorScuba.sqf"],
["blck_fnc_sm_monitorVehicles","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorVehicles.sqf"],
["blck_fnc_sm_monitorAircraft","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorAircraft.sqf"],
["blck_fnc_sm_monitorShips","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorShips.sqf"],
["blck_fnc_sm_monitorSubs","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorSubs.sqf"],
["blck_fnc_sm_monitorEmplaced","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorEmplaced.sqf"],
["blck_fnc_sm_monitorGarrisonsASL","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorGarrisonsASL.sqf"],
["blck_fnc_sm_monitorGarrisons_relPos","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorGarrisons_relPos.sqf"],
["blck_fnc_sm_spawnVehiclePatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrol.sqf"],
["blck_fnc_sm_spawnAirPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrol.sqf"],
["blck_fnc_sm_spawnEmplaced","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf"],
// ["blck_fnc_sm_spawnInfantryPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf"],
["blck_fnc_sm_staticPatrolMonitor","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_staticPatrolMonitor.sqf"],
// ["blck_fnc_sm_checkForPlayerNearMission","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_checkForPlayerNearMission.sqf"],
["blck_fnc_sm_spawnAirPatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrols.sqf"],
["blck_fnc_sm_spawnEmplaceds","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf"],
["blck_fnc_sm_spawnInfantryPatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnInfantryPatrols.sqf"],
["blck_fnc_sm_spawnLootContainers","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnLootContainers.sqf"],
["blck_fnc_sm_spawnObjects","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjects.sqf"],
["blck_fnc_sm_spawnVehiclePatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrols.sqf"],
["blck_fnc_sm_spawnBuildingGarrison_ASL","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnBuildingGarrisonASL.sqf"],
["blck_fnc_sm_spawnBuildingGarrison_relPos","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf"],
["blck_fnc_sm_spawnObjectASLVectorDirUp","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf"],
["blck_fnc_spawnScubaGroup","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnScubaGroup.sqf"],
["blck_fnc_spawnSDVPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnSDVPatrol.sqf"],
["blck_fnc_spawnSurfacePatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnSurfacePatrol.sqf"],
//["blck_fnc_sm_AddScubaGroup","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddScubaGroup.sqf"],
//["blck_fnc_sm_AddSurfaceVehicle","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddSurfaceVehicle.sqf"],
["blck_fnc_sm_AddSDVVehicle","\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddSDVVehicle.sqf"]
];
{
_x params ["_name","_path"];
missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path];
} foreach _functions;
diag_log "[blckeagls] GMS_sm_init_functions.sqf <Variables Defined and Functions Loaded>";
/*
blck_fnc_spawnScubaGroup = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnScubaGroup.sqf";
blck_fnc_spawnSDVPatrol = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnSDVPatrol.sqf";
blck_fnc_spawnSurfacePatrol = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnSurfacePatrol.sqf";
blck_fnc_sm_AddScubaGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddScubaGroup.sqf";
blck_fnc_sm_AddSurfaceVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddSurfaceVehicle.sqf";
blck_fnc_sm_AddSDVVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddSDVVehicle.sqf";

View File

@ -1,93 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_mode","_sm_groups"];
//_sm_groups = +blck_sm_Aircraft;
//diag_log format["_fnc_monitorAircraft: time %2 | blck_sm_Aircraft %1",blck_sm_Aircraft,diag_tickTime];
for "_i" from 1 to (count blck_sm_Aircraft) do
{
if (_i == (count blck_sm_Aircraft)) exitWith {};
private _element = blck_sm_Aircraft deleteAt 0;
_element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//diag_log format["_fnc_monitorAircraft: _x %1",_element];
//diag_log format["_fnc_monitorAircraft: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorAircraft (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorAircraft: _aircraftType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_aircraftType,_pos,_difficulty,_patrolRadius,_respawnTime];
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli;
_group = group (driver (_return select 0));
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned + 1];
_element set[respawnAt,0];
};
blck_sm_Aircraft pushBack _element;
};
case 2: {
_element set[respawnAt,diag_tickTime + _respawnTime];
_element set[groupSpawned,0];
blck_sm_Aircraft pushBack _element;
//diag_log format["_fnc_monitorAircraft: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorAircraft(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorAircraft: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorAircraft: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
blck_sm_Aircraft pushBack _element;
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorAircraft: despanwing patrol for _element %1",_element];
//_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
{deleteVehicle _x} forEach (units _group);
deleteGroup _group;
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
};
blck_sm_Aircraft pushBack _element;
};
};
};

View File

@ -1,92 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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_monitorEmplaced: time %2 | blck_sm_Emplaced %1",blck_sm_Emplaced,diag_tickTime];
for "_i" from 0 to (count blck_sm_Emplaced) do
{
if (_i >= (count blck_sm_Emplaced)) exitWith {};
private _element = blck_sm_Emplaced deleteAt 0;
_element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//diag_log format["_fnc_monitorEmplaced: _element %1",_element];
//diag_log format["_fnc_monitorEmplaced: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorEmplaced (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_monitorEmplaced: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime];
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]]];
private _return = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
_group = group( (_return select 1) select 0);
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned + 1];
_element set[respawnAt,0];
};
blck_sm_Emplaced pushBack _element;
};
case 2: {
_element set[respawnAt,diag_tickTime + _respawnTime];
_element set[groupSpawned,0];
blck_sm_Emplaced pushBack _element;
//diag_log format["_fnc_monitorEmplaced: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorEmplaced(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorEmplaced: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorEmplaced: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
blck_sm_Emplaced pushBack _element;
} else {
if (diag_tickTime >= (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorEmplaced: despanwing patrol for _element %1",_element];
//_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
{deleteVehicle _x} forEach (units _group);
deleteGroup _group;
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
};
blck_sm_Emplaced pushBack _element;
};
};
};

View File

@ -1,97 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_mode","_sm_groups"];
//diag_log format["_fnc_sm_monitorGarrisonASL: blck_fnc_spawnGarrisonInsideBuilding_ATL = %1",blck_sm_garrisonBuildings_ASL];
if (blck_sm_garrisonBuildings_ASL isEqualTo []) exitWith {};
for "_i" from 0 to (count blck_sm_garrisonBuildings_ASL) do
{
if (_i >= (count blck_sm_garrisonBuildings_ASL)) exitWith {};
private _element = blck_sm_garrisonBuildings_ASL deleteAt 0;
_element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"];
// ["_building","_aiDifficultyLevel","_staticsATL","_unitsATL"];
_groupParameters params['_building','_aiDifficulty','_staticsASL','_unitsASL','_respawnTime','_maxRespawns'];
//diag_log format["_fnc_sm_monitorGarrisonASL: _group = %1 | _timesSpawned = %2 | _respawnTime = %3 | _respawnAt = %4 | _groupSpawned = %5",_group,_timesSpawned,_respawnTime,_respawnAt,_groupSpawned];
private _pos = position _building;
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
// ["_building","_aiDifficultyLevel","_staticsATL","_unitsATL"]
//diag_log format
private _group = [_building,_aiDifficulty,_staticsASL,_unitsASL] call blck_fnc_sm_spawnBuildingGarrison_ASL;
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
//blck_sm_garrisonBuildings_ASL set[blck_sm_garrisonBuildings_ASL find _x,_element];
};
blck_sm_garrisonBuildings_ASL pushBack _element;
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
//blck_sm_garrisonBuildings_ASL set[blck_sm_garrisonBuildings_ASL find _x,_element];
blck_sm_garrisonBuildings_ASL pushBack _element;
};
default {};
};
} else {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
blck_sm_garrisonBuildings_ASL pushBack _element;
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
{deleteVehicle _x} forEach (units _group);
deleteGroup _group;
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
//blck_sm_garrisonBuildings_ASL set[(blck_sm_garrisonBuildings_ASL find _x), _element];
};
blck_sm_garrisonBuildings_ASL pushBack _element;
};
};
};

View File

@ -1,89 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_mode","_sm_groups","_pos","_element"];
if (blck_fnc_sm_spawnBuildingGarrison_relPos isEqualTo []) exitWith {};
_sm_groups = +blcl_sm_garrisonBuilding_relPos;
{
_x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"];
// [_building,_aiDifficulty,_noStatics,_typesStatics,_noUnits,_respawn]
_groupParameters params['_building','_aiDifficulty','_noStatics','_typesStatics','_noUnits','_respawnTime','_maxRespawns'];
_element = +_x;//
_pos = position _building;
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {blcl_sm_garrisonBuilding_relPos deleteAt (blcl_sm_garrisonBuilding_relPos find _x)};
case 1: {
if (true /*[_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange*/) then
{
// ["_building","_skillLevel","_noStatics","_typesStatics","_noUnits"];
private _group = [_building,_aiDifficulty,_noStatics,_typesStatics,_noUnits] call blck_fnc_sm_spawnBuildingGarrison_relPos;
_timesSpawned = _timesSpawned + 1;
_groupSpawned = 1;
_respawnAt = 0;
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned];
_element set[respawnAt,_respawnAt];
blcl_sm_garrisonBuilding_relPos set[blcl_sm_garrisonBuilding_relPos find _x,_element];
};
};
case 2: {
_groupSpawned = 0;
_respawnAt = diag_tickTime + _respawnTime;
_element set[respawnAt,_respawnAt];
_element set[groupSpawned,_groupSpawned];
blcl_sm_garrisonBuilding_relPos set[blcl_sm_garrisonBuilding_relPos find _x,_element];
};
default {};
};
} else {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
blcl_sm_garrisonBuilding_relPos set[(blcl_sm_garrisonBuilding_relPos find _x), _element];
};
};
};
}forEach _sm_groups;

View File

@ -1,94 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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_monitorShips: time %2 | blck_sm_surfaceShips %1",blck_sm_surfaceShips,diag_tickTime];
for "_i" from 0 to (count blck_sm_surfaceShips) do
{
if (_i >= (count blck_sm_surfaceShips)) exitWith {};
private _element = blck_sm_surfaceShips deleteAt 0;
_element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//diag_log format["_fnc_monitorShips: _element %1",_element];
//diag_log format["_fnc_monitorShips: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorShips (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"];
//diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime];
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
//diag_log format["_fnc_monitorShips: _return = %1",_return];
_group = group ((_return select 1) select 0);
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned + 1];
_element set[respawnAt,0];
//blck_sm_surfaceShips pushBack _element;
};
blck_sm_surfaceShips pushBack _element;
};
case 2: {
_element set[respawnAt,diag_tickTime + _respawnTime];
_element set[groupSpawned,0];
blck_sm_surfaceShips pushBack _element;
//diag_log format["_fnc_monitorShips: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorShips(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorShips: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorShips: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
blck_sm_surfaceShips pushBack _element;
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorShips: despanwing patrol for _element %1",_element];
//_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
{deleteVehicle _x} forEach (units _group);
deleteGroup _group;
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
};
blck_sm_surfaceShips pushBack _element;
};
};
};

View File

@ -1,236 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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 _triggerRange = 2000;
_fnc_updateGroupSpawnTimerFields = {
//diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this];
params["_array","_element",["_group",grpNull],["_spawnTime",0]];
private["_index"];
_index = _array find _element;
_element set[1,_group];
_element set[2,_spawnTime];
_array set[_index,_element];
};
private["_group","_groupParameters","_numAI","_return"];
_sm_groups = +blck_sm_Groups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnTime, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime","_maxRespawns"];
//diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI];
// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
_group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup;
//diag_log format["[blckeagls static group spawner] _group %1",_group];
[blck_sm_Groups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnTime > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval
{
[blck_sm_Groups,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead but we should not do a respawn
{
blck_sm_Groups deleteAt (blck_sm_Groups find _x);
};
};
}forEach _sm_groups;
_sm_scubaGroups = +blck_sm_scubaGroups;
{
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnTime, _group, _spawnAt]
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
//diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex];
private _groupSpawned = false;
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x];
_numAI = [_units] call blck_fnc_getNumberFromRange;
//diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI];
//params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]];
_group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup;
//diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group];
[blck_sm_scubaGroups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnTime > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval
{
[blck_sm_scubaGroups,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set scubaGroup respawn time step :: blck_sm_Groups updated to %1",blck_sm_scubaGroups];
};
if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead but we should not do a respawn
{
blck_sm_scubaGroups deleteAt (blck_sm_scubaGroups find _x);
};
};
}forEach _sm_scubaGroups;
_sm_Emplaced = +blck_sm_Emplaced;
{
// ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt]
//diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnTime"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
// params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]];
_group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray;
[blck_sm_Emplaced,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Emplaced,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0)) then // a group was spawned and all units are dead
{
blck_sm_Emplaced deleteAt (blck_sm_Emplaced find _x);
};
}forEach _sm_Emplaced;
_sm_Vehicles = +blck_sm_Vehicles;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
//diag_log format["_sm_monitorVehicles::-> _x = %1",_x];
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
// _return = [_vehicles, _missionAI, _abort];
_group = group (_return select 1 select 0);
[blck_sm_Vehicles,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Vehicles,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Vehicles deleteAt (blck_sm_Vehicles find _x);
};
}forEach _sm_Vehicles;
_sm_surfaceVehicles = +blck_sm_surfaceShips;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnTime"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
[_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_surfaceShips,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_surfaceShips,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead
{
blck_sm_surfaceShips deleteAt (blck_sm_surfaceShips find _x);
};
}forEach _sm_surfaceVehicles;
_sm_SDVVehicles = +blck_sm_submarines;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnTime"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one.
{
//diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty];
//params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]];
_return = [_pos,1,_difficulty,[_groupParameters],false,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,blck_backpacks,blck_UMS_weapons,blck_Pistols,true] call blck_fnc_spawnMissionVehiclePatrols;
_return params ["_vehicles", "_missionAI", "_abort"];
_group = group (_missionAI select 0);
[blck_sm_submarines,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_submarines,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead
{
blck_sm_submarines deleteAt (blck_sm_submarines find _x);
};
}forEach _sm_SDVVehicles;
_sm_Aircraft = +blck_sm_Aircraft;
{
// ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
_x params["_groupParameters","_group","_spawnAt"];
_groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnTime"];
if ([_pos,_triggerRange] call blck_fnc_playerInRange) then
{
if ( (isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one.
{
_weapon = [toLower _difficulty] call blck_fnc_selectAILoadout;
//params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]]
//diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty];
_return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI.
//diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return];
_return params ["_patrolHeli","_ai","_abort"];
_group = group (_ai select 0);
[blck_sm_Aircraft,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
};
if ( (isNull _group) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead
{
[blck_sm_Aircraft,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields;
//diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft];
};
if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead
{
blck_sm_Aircraft deleteAt (blck_sm_Aircraft find _x);
};
}forEach _sm_Aircraft;

View File

@ -1,94 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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_monitorSubs: time %2 | blck_sm_submarines %1",blck_sm_submarines,diag_tickTime];
for "_i" from 0 to (count blck_sm_submarines) do
{
if (_i >= (count blck_sm_submarines)) exitWith {};
private _element = blck_sm_submarines deleteAt 0;
_element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//diag_log format["_fnc_monitorSubs: _element %1",_element];
//diag_log format["_fnc_monitorSubs: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorSubs (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
//_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"];
//diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime];
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_return = [_pos,1,_difficulty,[_groupParameters],false,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,blck_backpacks,blck_UMS_weapons,blck_Pistols,true] call blck_fnc_spawnMissionVehiclePatrols;
//diag_log format["_fnc_monitorSubs: _return = %1",_return];
_group = group ((_return select 1) select 0);
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned + 1];
_element set[respawnAt,0];
//blck_sm_submarines pushBack _element;
};
blck_sm_submarines pushBack _element;
};
case 2: {
_element set[respawnAt,diag_tickTime + _respawnTime];
_element set[groupSpawned,0];
bblck_sm_submarines pushBack _element;
//diag_log format["_fnc_monitorSubs: update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorSubs(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorSubs: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorSubs: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
blck_sm_submarines pushBack _element;
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorSubs: despanwing patrol for _element %1",_element];
//_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
{deleteVehicle _x} forEach (units _group);
deleteGroup _group;
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
};
blck_sm_submarines pushBack _element;
};
};
};

View File

@ -1,96 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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_monitorVehicles: time %2 | blck_sm_Vehicles %1",blck_sm_Vehicles,diag_tickTime];
for "_i" from 0 to (count blck_sm_Vehicles) do
{
if (_i >= (count blck_sm_Vehicles)) exitWith {};
private _element = blck_sm_Vehicles deleteAt 0;
//diag_log format["_fnc_monitorVehicles(18): _element %1",_element];
_element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"];
//diag_log format["_fnc_monitorVehicles: _groupParameters = %1",_groupParameters];
//diag_log format["_fnc_monitorVehicles (21): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt];
_groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"];
//diag_log format["_fnc_monitorVehicles(23): _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime];
if (!(isNull _group) && {alive _x} count (units _group) == 0) then
{
deleteGroup _group;
_group = grpNull;
};
if (isNull _group) then
{
_mode = -1;
if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn
if (_timesSpawned > 0) then
{
if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation
if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0};
if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time
if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1};
};
switch (_mode) do
{
case 0: {};
case 1: {
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
// params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false]];
_return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols;
//diag_log format["_fnc_monitorVehicles(50): _return = %1",_return];
_group = group ((_return select 1) select 0);
// _element [[""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90],O Alpha 1-1,1,1,0,-1]"
// _groupParameters = [""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90]"
_element set[patrolGroup,_group];
_element set[groupSpawned,1];
_element set[timesSpawned,_timesSpawned + 1];
_element set[respawnAt,0];
};
blck_sm_Vehicles pushBack _element;
};
case 2: {
_element set[respawnAt,diag_tickTime + _respawnTime];
_element set[groupSpawned,0];
blck_sm_Vehicles pushBack _element;
//diag_log format["_fnc_monitorVehicles(63): update respawn time to %1",_respawnAt];
};
default {};
};
//diag_log format["_fnc_monitorVehicles(67) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned];
} else {
//diag_log format["_fnc_monitorVehicles(69): diag_tickTime = %1 | playerNearAt = %2 | _playerInRange = %3",diag_tickTime,_group getVariable["playerNearAt",-1],[_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange];
if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then
{
_group setVariable["playerNearAt",diag_tickTime];
//diag_log format["_fnc_monitorVehicles(73): playerNearAt updated to %1",_group getVariable["playerNearAt",-1]];
blck_sm_Vehicles pushBack _element;
} else {
if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then
{
//diag_log format["_fnc_monitorVehicles(78): despanwing patrol for _element %1",_element];
// _element [[""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90],O Alpha 1-1,1,1,0,-1]"
// _groupParameters = [""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90]"
//_groupParameters set [2, {alive _x} count (units _group)];
private _veh = vehicle (leader _group);
{deleteVehicle _x} forEach (units _group);
deleteGroup _group;
[_veh] call blck_fnc_destroyVehicleAndCrew;
_element set[groupParameters,_groupParameters];
_element set[patrolGroup ,grpNull];
_element set[timesSpawned,(_timesSpawned - 1)];
_element set[groupSpawned,0];
};
blck_sm_Vehicles pushBack _element;
};
};
};

View File

@ -1,31 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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_sm_spawnAirPatrols: _this = %1",_this];
params["_airPatrols"];
private["_aircraft","_pos","_difficulty","_uniforms","_headGear"];
_aircraft = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
_uniforms = blck_SkinList;
_headGear = blck_headgearList;
switch (_difficulty) do
{
case "blue": {_weapons = blck_WeaponList_Blue;};
case "red": {_weapons = blck_WeaponList_Red};
case "green": {_weapons = blck_WeaponList_Green};
case "orange": {_weapons = blck_WeaponList_Orange};
};
_return = [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli;
_group = group (_return select 1 select 0);
_group

View File

@ -1,50 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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";
/*
_coords = _this select 0;
_skillAI = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headGear = _this select 4;
_helis = _this select 5;
*/
params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear","_weapons"];
diag_log format["_sm_spawnAirPatrols:: _this = %1",_this];
diag_log format["_sm_spawnAirPatrols:: _airPatrols = %1",_airPatrols];
if (_airPatrols isEqualTo []) then
{
for "_i" from 1 to _noAirPatrols do
{
/*
_coords = _this select 0;
_skillAI = _this select 1;
_weapons = _this select 2;
_uniforms = _this select 3;
_headGear = _this select 4;
_helis = _this select 5;
*/
[_center,_difficulty,_weapons,_uniforms,_headGear,_heliTypes,0] call blck_fnc_spawnMissionHeli;
};
} else {
{
/*
/*[aircraft classname, position, difficulty(blue, red etc)]*/
_aircraft = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
[_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli;
}forEach _airPatrols;
};

View File

@ -1,8 +0,0 @@
params["_building","_aiDifficultyLevel","_statics","_units"];
diag_log format["_fnc_sm_spawnBuildingGarrisonASL: handling _building = %1 | at location = %2",_building,position _building];
private _group = [] call blck_fnc_create_AI_Group;
//params["_building","_group","_statics","_men","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks",["_launcher","none"],"_weaponList","_sideArms"];
[_building,_group,_statics,_units,_aiDifficultyLevel] call blck_fnc_spawnGarrisonInsideBuilding_ATL;
_group

View File

@ -1,8 +0,0 @@
params["_building","_skillLevel","_noStatics","_typesStatics","_noUnits"];
diag_log format["_fnc_sm_spawnBuildingGarrison_relPos: handling _building = %1 | at location = %2",_building,position _building];
private _group = [] call blck_fnc_create_AI_Group;
// ["_building","_group","_noStatics","_typesStatics","_noUnits",["_aiDifficultyLevel","Red"],
[_building,_group,_noStatics,[],_noUnits,_skillLevel] call blck_fnc_spawnGarrisonInsideBuilding_relPos;
_group

View File

@ -1,58 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"];
_emplacedWeps = [];
_emplacedAI = [];
_units = [];
_abort = false;
_pos = [];
//diag_log format["_sm_spawnEmplaced <Line 26>:: _missionEmplacedWeapons = %1",_missionEmplacedWeapons];
// Define _missionEmplacedWeapons if not already configured.
if (_missionEmplacedWeapons isEqualTo []) then
{
_missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
{
_static = selectRandom blck_staticWeapons;
//diag_log format["_fnc_spawnEmplacedWeaponArray: creating spawn element [%1,%2]",_static,_x];
_missionEmplacedWeapons pushback [_static,_coords vectorAdd _x,_aiDifficultyLevel];
//diag_log format["_fnc_spawnEmplacedWeaponArray: _mi updated to %1",_missionEmplacedWeapons];
} forEach _missionEmplacedWeaponPositions;
};
//diag_log format["_sm_spawnEmplaced<Line 38>:: _missionEmplacedWeapons = %1",_missionEmplacedWeapons];
{
_wepnClassName = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ];
_empGroup = [_pos,1,1,_difficulty,_pos,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
_empGroup setcombatmode "RED";
_empGroup setBehaviour "COMBAT";
[_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints;
//if (isNull _empGroup) exitWith {_abort = _true};
_wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle;
//_empGroup setVariable["groupVehicle",_wep];
_wep setVariable["vehicleGroup",_empGroup];
_wep setVariable["GRG_vehType","emplaced"];
_wep setPosATL _pos;
[_wep,false] call blck_fnc_configureMissionVehicle;
_units = units _empGroup;
_gunner = _units select 0;
_gunner moveingunner _wep;
} forEach _missionEmplacedWeapons;
blck_monitoredVehicles append _emplacedWeps;
true

View File

@ -1,58 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"];
_emplacedWeps = [];
_emplacedAI = [];
_units = [];
_abort = false;
_pos = [];
//diag_log format["_sm_spawnEmplaced <Line 26>:: _missionEmplacedWeapons = %1",_missionEmplacedWeapons];
// Define _missionEmplacedWeapons if not already configured.
if (_missionEmplacedWeapons isEqualTo []) then
{
_missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
{
_static = selectRandom blck_staticWeapons;
//diag_log format["_fnc_spawnEmplacedWeaponArray: creating spawn element [%1,%2]",_static,_x];
_missionEmplacedWeapons pushback [_static,_coords vectorAdd _x,_aiDifficultyLevel];
//diag_log format["_fnc_spawnEmplacedWeaponArray: _mi updated to %1",_missionEmplacedWeapons];
} forEach _missionEmplacedWeaponPositions;
};
//diag_log format["_sm_spawnEmplaced<Line 38>:: _missionEmplacedWeapons = %1",_missionEmplacedWeapons];
{
_wepnClassName = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
/// params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ];
__empGroup = [_pos,_pos,1,1,_difficulty,1,2,false,_uniforms,_headGear] call blck_fnc_spawnGroup;
_empGroup setcombatmode "RED";
_empGroup setBehaviour "COMBAT";
[_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints;
//if (isNull _empGroup) exitWith {_abort = _true};
_wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle;
//_empGroup setVariable["groupVehicle",_wep];
_wep setVariable["vehicleGroup",_empGroup];
_wep setVariable["GRG_vehType","emplaced"];
_wep setPosATL _pos;
[_wep,false] call blck_fnc_configureMissionVehicle;
_units = units _empGroup;
_gunner = _units select 0;
_gunner moveingunner _wep;
} forEach _missionEmplacedWeapons;
blck_monitoredVehicles append _emplacedWeps;
true

View File

@ -1,40 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_objects","_coords"];
private["_object"];
if !(_objects isEqualTo []) exitWith
{ // Spawn loot crates where specified in _objects using the information for loot parameters provided for each location.
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_sm_spawnLootContainers (21):-> _x = %1",_x];
};
#endif
//diag_log format["_fnc_sm_spawnLootContainers (21):-> _x = %1",_x];
// [selectRandom blck_crateTypes,[22904.8,16742.5,6.30195],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts]
_x params["_crateClassName","_cratePosASL","_vectorDirUp","_allowDamageSim","_crateLoot","_lootCounts"];
_crate = [_cratePosASL, _crateClassName] call blck_fnc_spawnCrate;
[_crate, _crateLoot,_lootCounts] call blck_fnc_fillBoxes;
} forEach _objects;
};
// In the case where no loot crate parameters are defined in _objects just spawn 1 at the center of the mission.
if (_objects isEqualTo []) then
{
_crateType = selectRandom blck_crateTypes;
_crate = [_coords,_crateType] call blck_fnc_spawnCrate;
[_crate,blck_BoxLoot_Red,blck_lootCountsGreen] call blck_fnc_fillBoxes;
};

View File

@ -1,51 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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"];
// Spawn landscape
// params["_objects"];
[_missionLandscape] call blck_fnc_sm_spawnObjects;
uiSleep 10; // Let the objects 'settle' before placing anything on or around them.
// Spawn Air Patrols
// params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear"];
[_airPatrols,_noAirPatrols,_aircraftTypes,_missionCenter,_difficulty,_uniforms,_headgear,_weapons] call blck_fnc_sm_spawnAirPatrols;
//uiSleep 1;
// Spawn Vehicle Patrols
// params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
[_missionCenter,_noVehiclePatrols,_vehiclePatrolParameters,_difficulty,_uniforms,_headGear] call blck_fnc_sm_spawnVehiclePatrols;
//uiSleep 1;
// spawn infantry
// params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_weapons",blck_WeaponList_Orange],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]];
[_aiGroupParameters, _missionCenter,_minNoAI,_maxNoAI,_difficulty,_weapons,_uniforms,_headGear] call blck_fnc_sm_spawnInfantryPatrols;
//uiSleep 1;
// spawn loot vehicles
// params["_objects","_coords","_loot","_lootCounts"];
[_missionLootVehicles,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers;
// Spawn static weapons
// params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
[_missionEmplacedWeapons,_noEmplacedWeapons,_difficulty,_missionCenter,_uniforms,_headGear] call blck_fnc_sm_spawnEmplaceds;
// spawn loot chests
[_missionLootBoxes,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers;
_blck_localMissionMarker = ["",_missionCenter,"","",_markerColor,_markerType];
[_blck_localMissionMarker] call blck_fnc_spawnMarker;
diag_log format["[blckeagls] Static Mission Spawner: Mission %1 spawned",_mission];

View File

@ -1,21 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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["_buildingClassName","_posASL","_vectorDirUp","_enableDamSim"];
_object = createVehicle [_buildingClassName, [0,0,0], [], 0, "CAN_COLLIDE"];
_object setPosASL _posASL;
_object setVectorDirAndUp _vectorDirUp;
_object enableSimulationGlobal (_enableDamSim select 0);
_object allowDamage (_enableDamSim select 1);
_object

View File

@ -1,19 +0,0 @@
/*
by Ghostrider [GRG]
--------------------------
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["_objects"];
private["_objects","_object"];
{
_object = [_x select 0, _x select 1, _x select 2, _x select 3] call blck_fnc_sm_spawnObjectASLVectorDirUp;
} forEach _objects;

View File

@ -1,33 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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["_airPatrols"];
private["_aircraft","_pos","_difficulty","_uniforms","_headGear"];
_aircraft = _x select 0;
_pos = _x select 1;
_difficulty = _x select 2;
_uniforms = blck_SkinList;
_headGear = blck_headgearList;
switch (_difficulty) do
{
case "blue": {_weapons = blck_WeaponList_Blue;};
case "red": {_weapons = blck_WeaponList_Red};
case "green": {_weapons = blck_WeaponList_Green};
case "orange": {_weapons = blck_WeaponList_Orange};
};
_vehGroup = [_spawnPos,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
_return = [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnVehiclePatrol;
_group = group (_return select 1 select 0);
_group

View File

@ -1,51 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
//diag_log format["_sm_spawnVehiclePatrols:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
private["_vehGroup","_patrolVehicle","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return","_abort"];
//if (count _weapons isEqualTo 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (_vehiclePatrolSpawns isEqualTo []) then
{
private["_spawnPoints","_vehType"];
_spawnPoints = [_coords,_noVehiclePatrols,75,100] call blck_fnc_findPositionsAlongARadius;
{
// ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red", 600],
_vehType = selectRandom blck_AIPatrolVehicles;
_vehiclePatrolSpawns pushBack [_vehType, _x, _aiDifficultyLevel, 150];
} forEach _spawnPoints;
};
{
private ["_vehicle","_spawnPos","_difficulty","_patrolRadius"];
_vehicle = _x select 0;
_spawnPos = _x select 1;
_difficulty = _x select 2;
_patrolRadius = _x select 3;
//_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup;
_vehGroup = [_spawnPos,_spawnPos,3,3,_difficulty,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
_patrolVehicle = [_spawnPos,_spawnPos,_vehicle,_patrolRadius,_patrolRadius,_vehGroup] call blck_fnc_spawnVehiclePatrol;
//_vehGroup setVariable["groupVehicle",_vehicle];
if !(isNull _patrolVehicle) then
{
_patrolVehicle setVariable["vehicleGroup",_vehGroup];
};
} forEach _vehiclePatrolSpawns;
true

View File

@ -1,27 +0,0 @@
/*
by Ghostrider [GRG]
for ghostridergaming
12/5/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";
// GMS_fnc_sm_missionPatrolMonitor
[] call blck_fnc_sm_monitorInfantry;
[] call blck_fnc_sm_monitorScuba;
//uiSleep 0.1;
[] call blck_fnc_sm_monitorVehicles;
[] call blck_fnc_sm_monitorAircraft;
[] call blck_fnc_sm_monitorEmplaced;
[] call blck_fnc_sm_monitorShips;
[] call blck_fnc_sm_monitorSubs;
//[] call blck_fnc_sm_monitorGarrisonsASL;
//[] call blck_fnc_sm_monitorGarrisons_relPos;

View File

@ -1,21 +0,0 @@
/*
by Ghostrider [GRG]
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";
// ["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0],
params["_SDV","_pos","_difficulty","_numAI","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_spawnSDVPatrol: _this = %1",_this];
private["_vehicle","_group","_diveDepth"];
_group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius - 2,_patrolRadius,blck_UMS_uniforms,blck_UMS_headgear,true,blck_UMS_weapons,blck_UMS_vests,true] call blck_fnc_spawnGroup;
_vehicle = [[_pos select 0, _pos select 1,0],[_pos select 0, _pos select 1,0],_vehType,_patrolRadius - 2,_patrolRadius,_group] call blck_fnc_spawnVehiclePatrol;
_diveDepth = 0.5 * [_pos] call blck_fnc_findWaterDepth;
(driver _vehicle) swiminDepth (_diveDepth select 2);
_group

View File

@ -1,38 +0,0 @@
/*
by Ghostrider [GRG]
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";
#define configureWaypoints true
#define isScubaGroup true
// [_pos,_difficulty,_units,_patrolRadius]
params["_pos",["_skillLevel","red"],["_numUnits",6],["_patrolRadius",15]];
//diag_log format["_fnc_spawnScubaGroup: _this = %1",_this];
private["_group","_diveDepth"];
_group = grpNull;
//params["_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",20], ["_maxDist",35],["_configureWaypoints",true], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_scuba",false] ];
_group = [_pos,_pos,_numUnits,_numUnits,_skillLevel, _patrolRadius - 2, _patrolRadius, configureWaypoints, blck_UMS_uniforms, blck_UMS_headgear, blck_UMS_vests, [], blck_UMS_weapons, [], isScubaGroup] call blck_fnc_spawnGroup;
//diag_log format["_fnc_spawnScubaGroup (14): -> value returned for group = %1",_group];
private _waterDepth = [_pos] call blck_fnc_findWaterDepth;
_diveDepth = _waterDepth * 0.5;
{
_x swimInDepth (_diveDepth);
} forEach units _group;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
{
diag_log format["_fnc_spawnScubaGroup:: _this select %1 = %2",_forEachIndex,_this select _forEachIndex];
}forEach _this;
diag_log format["_fnc_spawnScubaGroup:: -->> group spawned = %1",_group];
};
#endif
_group;

View File

@ -1,22 +0,0 @@
/*
by Ghostrider [GRG]
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";
// ["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0],
params["_SDV","_pos","_difficulty","_numAI","_patrolRadius","_respawnTime"];
//diag_log format["_fnc_spawnSurfacePatrol: _this = %1",_this];
private["_vehicle"];
_group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius - 2,_patrolRadius,blck_UMS_uniforms,blck_UMS_headgear,true,blck_UMS_weapons,blck_UMS_vests,true] call blck_fnc_spawnGroup;
// params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
_vehicle = [_pos,_pos,_vehType,_minDis,_maxDis,_group] call blck_fnc_spawnVehiclePatrol;
_vehicle

View File

@ -1,15 +0,0 @@
/*
by Ghostrider [GRG]
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["_vehicle"];
blck_sm_submarines pushBack [_vehicle,grpNull,0];
true

View File

@ -1,16 +0,0 @@
/*
by Ghostrider [GRG]
Copyright 20167
--------------------------
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["_group"];
blck_sm_scubaGroups pushBack [_group,grpNull,0];
//diag_log format["_sm_AddScubaGroup:: blck_sm_scubaGroups = %1",blck_sm_scubaGroups];
true

View File

@ -1,15 +0,0 @@
/*
by Ghostrider [GRG]
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["_vehicle"];
blck_sm_surfaceShips pushBack [_vehicle,grpNull,0];
true

View File

@ -15,10 +15,23 @@ private ["_staticMissions"];
_staticMissions = [
// [mod (Epoch, Exile), map (Altis, Tanoa etc), mission center, eg [10445,2014,0], filename.sqf (name of static mission template for that mission)];
<<<<<<< Updated upstream
//["Epoch","Altis","template.sqf"],
//["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
//["Exile","Altis","staticMissionExample2_Exile.sqf"],
["newmission","newmap","somescript.sqf"]
=======
["Epoch","Altis","template.sqf"],
["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
//["Epoch","Altis","destroyer.sqf"],
["Exile","Altis","template.sqf"],
["Exile","Altis","staticMissionExample2_Exile.sqf"],
//["Epoch","Altis","chelnosiStatic.sqf"],
//#ifndef blck_milServer
["Exile","Altis","chelnosiStatic.sqf"],
//#endif
["newmission","newmap","somescript.sqf"] // Here just so you dont have to worry about all those commas
>>>>>>> Stashed changes
];
diag_log "[blckeagls] GMS_StaticMissions_Lists.sqf <Loaded>";

View File

@ -74,8 +74,8 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her
_missionLootVehicles = [ // Paste appropriate lines from the output of M3EDEN Editor here and add the loot crate type and loot counts at the end of each entry as shown in the example below.
// Many vehicles have less inventory capacity than crates so you may have to modify _lootcounts to avoid having stuff spawned all over the ground.
//["Exile_Car_Van_Box_Guerilla02",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]],
["Exile_Car_Van_Fuel_Guerilla02",[22919,16782.7,3.18132],[[0,1,0],[0.00129187,0,0.999999]],[true,false],_crateLoot, _lootCounts]
["C_Van_01_box_EPOCH",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]],
["C_Van_01_transport_EPOCH",[22919,16782.7,3.18132],[[0,1,0],[0.00129187,0,0.999999]],[true,false],_crateLoot, _lootCounts]
]; // [ ["vehicleClassName", [px, py, pz] /* possition at which to spawn*/, _loot /* pointer to array of loot (see below)];
// When blank nothing is spawned.
// You can use the same format used for _missionLootBoxes to add vehicles with/without loot.
@ -85,8 +85,8 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a num
// or _noEmplacedWeapons = 3; // a constant number of emplaced weps per misison
// Note that this value is ignored if you define static weapon positions and types in the array below.
_missionEmplacedWeapons = [
["B_G_Mortar_01_F",[22922.7,16763.9,6.30801],"red",0,0],
["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10]
["B_G_Mortar_01_F",[22867.3,16809.1,3.17968],"red",0,0],
["B_HMG_01_high_F",[22944.3,16820.5,3.14243],"green",0,0]
]; // example [ ["emplacedClassName",[px, py, pz] /* position to spawn weapon */, difficulty /* difficulty of AI manning weapon (blue, red etc)] ];
// can be used to define the precise placement of static weapons [[1,2,3] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
// If the number of possible locations exceeds the number of emplaced weapons specified above then only some of the locations in the array will have emplaced weapons spawned.
@ -102,8 +102,8 @@ _aiGroupParameters = [
//[[22947.8,16717,6.80305],"red",4, 75,900],
// [[22849,16720.4,7.33123],"red",4, 75,9000],
//[[22832.9,16805.6,4.59315],"red",4, 75,900],
//[[22909.8,16778.6,3.19144],"red",4, 75,900],
//[[22809.4,16929.5,5.33892],"blue",1, 75,0],
[[22909.8,16778.6,3.19144],"red",4, 75,900],
[[22809.4,16929.5,5.33892],"blue",1, 75,0],
[[22819.4,16929.5,0],"red",1, 75, 10, 1]
];
@ -111,7 +111,7 @@ _noVehiclePatrols = blck_SpawnVeh_Red; // Modified as needed; can be a numberic
// Note that this value is ignored if you define vehicle patrols in the array below.
_vehiclePatrolParameters = [
//["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"green",600,0],
["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10,1]
["B_G_Offroad_01_armed_EPOCH",[22809.5,16699.2,0],"blue",600,10,1]
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
// Allows you to define the location of the center of the patrol, vehicle type spawned, radius to patrol, and AI difficulty (blue, red, green etc).
@ -120,7 +120,7 @@ _aircraftTypes = blck_patrolHelisRed; // You can use one of the pre-defined li
_noAirPatrols = blck_noPatrolHelisRed; // You can use one of the pre-defined values or a custom one. acceptable values are integers (1,2,3) or a range such as [2,4];
// Note: this value is ignored if you specify air patrols in the array below.
_airPatrols = [
["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,10,1]//,
["C_Heli_Light_01_armed_EPOCH",[22923.4,16953,3.19],"red",1000,900]//,
//[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60]
];
// Change _useMines to true/false below to enable mission-specific settings.

View File

@ -16,7 +16,7 @@ private ["_staticMissions"];
_staticMissions = [
// [mod (Epoch, Exile), map (Altis, Tanoa etc), mission center, eg [10445,2014,0], filename.sqf (name of static mission template for that mission)];
//["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
//["Exile","Altis","staticMissionExample2_Exile.sqf"]
["Epoch","Altis","staticMissionExample2_Epoch.sqf"],
["Exile","Altis","staticMissionExample2_Exile.sqf"]
];

View File

@ -16,7 +16,7 @@
#define delayTime 1
private ["_abort","_crates","_aiGroup","_objects","_mines","_blck_AllMissionAI","_blck_localMissionMarker",
"_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned",
"_blck_AllMissionAI","_delayTime","_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_marker","_vehiclecrewcount"];
"_blck_AllMissionAI","_delayTime","_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_marker","_vehicleCrewCount"];
params["_coords","_mission",["_allowReinforcements",false]];
@ -75,10 +75,7 @@ if !(blck_preciseMapMarkers) then
_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name?
[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers;
_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (91) message players and spawn a mission marker";};
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (77) waiting for player to trigger the mission";};
#endif
////////
// All parameters are defined, let's wait until a player is nearby or the mission has timed out
////////
@ -89,29 +86,12 @@ _missionTimedOut = false;
_wait = true;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (90) starting mission trigger loop"};
if (blck_debugLevel > 2) then {_wait = false};
#endif
while {_wait} do
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) exitWith {_playerInRange = true;};
#endif
if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;};
if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;};
uiSleep 5;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords];
diag_log format["dynamicUMSspawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers];
diag_log format["dynamicUMSspawner:: Trigger Loop - timeout = %1", [_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut];
};
#endif
};
if (_missionTimedOut) exitWith
@ -127,12 +107,6 @@ if (_missionTimedOut) exitWith
////////
// Spawn the mission objects, loot chest, and AI
////////
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (142) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate
{
@ -167,14 +141,6 @@ if (typeName _temp isEqualTo "ARRAY") then
{
_objects append _temp;
};
//diag_log format["_fnc_dynamicUMSspawner:: (176)->> _objects = %1",_objects];
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (190) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
uiSleep delayTime;;
@ -184,159 +150,58 @@ _crates append _temp;
uiSleep _delayTime;
_abort = false;
_temp = [[],[],false];
//diag_log format["_fnc_dynamicUMSspawner: spawning infantry using data in _missionGroups with _missionGroups = %1",_missionGroups];
private _abort = false;
private _temp = [[],[],false];
diag_log format["_fnc_dynamicUMSspawner: spawning infantry using data in _missionGroups with _missionGroups = %1",_missionGroups];
// Require that the server admin define the location of any infantry patrols given that missions will be off-shore.
// AI could be spawned on a platform or floating structure.
if (count _missionGroups > 0) then
{
// params["_coords",["_minNoAI",3],["_maxNoAI",6],"_missionGroups",["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],["_vests",blck_vests],["_backpacks",[]],["_weapons",[]],["_sideArms",blck_Pistols],["_isScubaGroup",false]];
_temp = [_coords, _minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false] call blck_fnc_spawnMissionAI;
if (isNil "_noAIGroups") then {_noAIGroups = 1};
diag_log format["_fnc_dynamicUMSSpawner: _noAIGroups = %1",_noAIGroups];
// _temp = [_coords, _minNoAI,_maxNoAI,_noAIGroups,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionAI;
_temp = [_coords, _minNoAI,_maxNoAI,_noAIGroups,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionAI;
_blck_AllMissionAI append (_temp select 0);
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner :: (209) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1;
};
_abort = _temp select 1;
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
};
#endif
private "_temp";
if (count _scubaGroupParameters > 0) then
{
//diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters];
// params["_coords",["_minNoAI",3],["_maxNoAI",6],"_missionGroups",["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],["_vests",blck_vests],["_backpacks",[]],["_weapons",[]],["_sideArms",blck_Pistols],["_isScubaGroup",false]];
_temp = [_coords, _minNoAI,_maxNoAI,_scubaGroupParameters,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionAI;
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner :: (209) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1;
};
_abort = _temp select 1;
if (blck_debugLevel > 2) then
{
diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
};
#endif
if (_abort) exitWith
{
if (blck_debugLevel > 1) then {
diag_log "dynamicUMSspawner:: (220) grpNull returned, mission termination criteria met, calling blck_fnc_endMission"
};
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission;
};
if !(_abort) then
{
_temp = [_coords, _minNoAI,_maxNoAI,count _scubaGroupParameters,_scubaGroupParameters,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionAI;
_blck_AllMissionAI append (_temp select 0);
};
uiSleep _delayTime;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (235) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
uiSleep _delayTime;
_temp = [[],[],false];
_abort = false;
private["_patrolVehicles","_vehToSpawn"];
//diag_log format["_fnc_dynamicUMSspawner (258): _noVehiclePatrols = %1",_noVehiclePatrols];
_vehToSpawn = 0;
//diag_log format["_dynamicUMSspawner:: _vehToSpawn = %1",_vehToSpawn];
// Spawn any surface patrols
if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then
{
// params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]];
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_vehiclePatrolParameters,true,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {
diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
};
#endif
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
};
if !(_abort) then
{
_patrolVehicles = _temp select 0;
_blck_AllMissionAI append (_temp select 1);
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
};
_missionAIVehicles append (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
// Spawn any submarine patrols
if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then
{
// params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]];
_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_submarinePatrolParameters,true,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionVehiclePatrols;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {
diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
};
#endif
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
};
if !(_abort) then
{
_patrolVehicles = _temp select 0;
//diag_log format["[blckeagls] dynamicUMSspawner:: Patrol vehicles = %1",_patrolVehicles];
_blck_AllMissionAI append (_temp select 1);
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
};
};
if (_abort) exitWith
{
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {
diag_log "dynamicUMSspawner:: (279) grpNull returned, mission termination criteria met, calling blck_endMission";
};
#endif
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission;
_missionAIVehicles append (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
uiSleep delayTime;
_temp = [[],[],false];
_abort = false;
_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange;
_noPara = [_noPara] call blck_fnc_getNumberFromRange;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]};
#endif
if (_noChoppers > 0) then
{
for "_i" from 1 to (_noChoppers) do
@ -345,80 +210,24 @@ if (_noChoppers > 0) then
{
//_temp = [_coords,_missionHelis,spawnHeli,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionReinforcements;
_temp = [_coords,_aiDifficultyLevel,_missionHelis] call blck_fnc_spawnMissionHeli;
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
blck_monitoredVehicles pushBack (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
if (_abort) then
{
_objects pushback (_temp select 0);
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission;
};
blck_monitoredVehicles pushBack (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
};
};
//////////////////////////
// Spawn Crates and Emplaced Weapons Last to try to force them to correct positions relative to spawned buildinga or other objects.
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["dynamicUMSspawner:: (361) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];};
#endif
uiSleep 15;
private["_noEmplacedToSpawn"];
_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
//diag_log format["_dynamicUMSspawner:: _noEmplacedToSpawn = %1",_vehToSpawn];
if (blck_useStatic && ((_noEmplacedToSpawn > 0)) || count _missionEmplacedWeapons > 0) then
{
// params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"];
//_temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
_temp = [_coords,_missionEmplacedWeapons,true,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format ["dynamicUMSspawner:: (375) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp];
};
#endif
if (typeName _temp isEqualTo "ARRAY") then
{
_abort = _temp select 2;
};
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format ["dynamicUMSspawner:: (387) _abort = %1",_abort];
};
#endif
if !(_abort) then
{
_objects append (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (400) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
};
};
if (_abort) exitWith
{
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log "dynamicUMSspawner:: (410) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission";
};
#endif
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission;
_objects append (_temp select 0);
_blck_AllMissionAI append (_temp select 1);
};
uiSleep _delayTime;
@ -431,7 +240,6 @@ if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then
else
{
_crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
};
if (blck_cleanUpLootChests) then
@ -446,9 +254,6 @@ if (blck_cleanUpLootChests) then
};
if (_noPara > 0 && (random(1) < _chancePara) && _paraTriggerDistance == 0) then
{
//diag_log format["_fnc_missionSpawner (435): spawning %1 paraunits at mission spawn",_noPara];
//private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits;
// blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission
private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits;
if !(isNull _paratroops) then
{
@ -464,30 +269,16 @@ if (_noPara > 0 && (random(1) < _chancePara) && _paraTriggerDistance == 0) then
};
};
//uisleep 2;
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
// Trigger for mission end
#ifdef blck_debugMode
diag_log format["[blckeagls] mission Spawner(436) _endCondition = %1",_endCondition];
#endif
private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"];
_missionComplete = -1;
_startTime = diag_tickTime;
if (blck_showCountAliveAI) then
{
//diag_log format["_dynamicUMSspawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName];
//diag_log format["_dynamicUMSspawner(442): Alive AI = %1 | Current Marker Text = %2",{alive _x} count _blck_AllMissionAI, markerText _marker];
if !(_marker isEqualTo "") then
{
[_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount;
blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI];
//diag_log format["_dynamicUMSspawner: blck_missionMarkers = %1",blck_missionMarkers];
};
};
switch (_endCondition) do
@ -496,22 +287,13 @@ switch (_endCondition) do
case "allUnitsKilled": {_endIfPlayerNear = false;_endIfAIKilled = true;};
case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;};
};
#ifdef blck_debugMode
diag_log format["dynamicUMSspawner :: (449) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
#endif
private["_locations"];
_locations = [_coords];
{
_locations pushback (getPos _x);
_x setVariable["crateSpawnPos", (getPos _x)];
} forEach _crates;
#ifdef blck_debugMode
diag_log format["dynamicUMSspawner (458):: _coords = %1 | _crates = %2 | _locations = %3",_coords,_crates,_locations];
#endif
private _crateStolen = false;
#ifdef blck_debugMode
diag_log format["dynamicUMSspawner(462):: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled];
#endif
if (blck_showCountAliveAI) then
{
@ -526,9 +308,6 @@ private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
_missionComplete = -1;
while {_missionComplete isEqualTo -1} do
{
#ifdef blck_debugMode
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 10; diag_log "_fnc_dynamicUMSSpawner (574): scripted mission end";};
#endif
if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {};
if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1) exitWith {};
@ -587,18 +366,10 @@ if (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then
_crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming,_spawnCratesTiming, "end", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["_fnc_dynamicUMSspawner (531): _crates = %1", _crates]};
#endif
if (blck_cleanUpLootChests) then
{
_objects append _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] dynamicUMSspawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]};
#endif
};
if (_spawnCratesTiming isEqualTo "atMissionSpawnGround" && _loadCratesTiming isEqualTo "atMissionCompletion") then
@ -608,14 +379,6 @@ if (_spawnCratesTiming isEqualTo "atMissionSpawnGround" && _loadCratesTiming isE
} forEach _crates;
};
#ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["[blckeagls] dynamicUMSspawner:: (496) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
diag_log format["dynamicUMSspawner :: (497) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
diag_log format["[blckeagls] dynamicUMSspawner:: (498) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif
private["_result"];
// Force passing the mission name for informational purposes.
_blck_localMissionMarker set [2, _markerMissionName];
@ -629,8 +392,5 @@ if (blck_showCountAliveAI) then
// params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_endCondition",0],["_vehicles",[]],["_isScubaMission",false]];
_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,0,_missionAIVehicles,isScubaMission] call blck_fnc_endMission;
#ifdef blck_debugMode
diag_log format["[blckeagls] dynamicUMSspawner:: (559) end of mission: blck_fnc_endMission has returned control to _fnc_dynamicUMSspawner"];
#endif
blck_missionsRun = blck_missionsRun + 1;
diag_log format["[blckeagls] dynamicUMSspawner:: Total Dyanamic Land and UMS Run = %1", blck_missionsRun];

View File

@ -1,71 +0,0 @@
/*
by Ghostrider [GRG]
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";
private["_mapCenter","_waterPos","_priorUMSpositions"];
switch (toLower worldName) do
{
case "altis": {_mapCenter = [15000,19000,0];_maxDistance = 20000};
case "tanoa": {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 10000};
case "malden": {_mapCenter = [6000,7000,0];_maxDistance = 5500};
case "namalsk": {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 5000};
case "taviana": {_mapCenter = [12000,12000,0];_maxDistance = 12000};
case "napf" : {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 12000};
case "lythium": {_mapCenter = [10000,10000,0]; _maxDistance = 6000;};
default {_mapCenter = [6000,6000,0]; _maxDistance = 6000;};
};
_evaluate = true;
while {_evaluate} do
{
_waterPos = [
_mapCenter, // center of search area
2, // min distance to search
20000, // max distance to search
0, // distance to nearest object
2, // water mode [2 = water only]
25, // max gradient
0 // shoreMode [0 = anywhere]
] call BIS_fnc_findSafePos;
/*
_priorUMSpositions = +blck_priorDynamicUMS_Missions;
{
if (diag_tickTime > ((_x select 1) + 1800) then
{
blck_priorDynamicUMS_Missions = blck_priorDynamicUMS_Missions - _x;
} else {
if (_waterPos distance2D (_x select 0) < 2000) exitWith {_evaluate = false};
};
} forEach _priorUMSpositions;
*/
if (_evaluate) then
{
if (abs(getTerrainHeightASL _waterPos) < 30) then
{
if (abs(getTerrainHeightASL _waterPos) > 1) then
{
//_waterMarker = createMarker [format["water mission %1",getTerrainHeightASL _waterPos],_waterPos];
//_waterMarker setMarkerColor "ColorRed";
//_waterMarker setMarkerType "mil_triangle";
//_waterMarker setMarkerText format["Depth %1",getTerrainHeightASL _waterPos];
_evaluate = false;
};
};
};
};
_waterPos

View File

@ -1,23 +0,0 @@
/*
by Ghostrider [GRG]
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";
private["_depth"];
params["_pos"];
_depth = (getTerrainHeightASL _pos);
//diag_log format["_fnc_findWaterDepth: _depth = %1",_depth];
_depth

View File

@ -1,16 +0,0 @@
/*
by Ghostrider [GRG]
Copyright 20167
--------------------------
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";
blck_fnc_findShoreLocation = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_UMS_fnc_findShoreLocation.sqf";
blck_fnc_addDyanamicUMS_Mission = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_addDynamicUMS_Mission.sqf";
blck_fnc_findWaterDepth = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_UMS_fnc_findWaterDepth.sqf";
diag_log "[blckeagls] UMS functions Functions compiled";

View File

@ -1,33 +0,0 @@
/*
by Ghostrider [GRG]
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["_pos"];
private["_UMS_mission","_waitTime","_mission","_pos"];
if (count blck_dynamicUMS_MissionList == 0) exitWith
{
blck_numberUnderwaterDynamicMissions = -1;
diag_log "No Dynamic UMS Missions Listed <spawning disabled>";
};
_UMS_mission = selectRandom blck_dynamicUMS_MissionList;
_waitTime = (blck_TMin_UMS) + random(blck_TMax_UMS - blck_TMin_UMS);
_mission = format["%1%2","Mafia Pirates",floor(random(1000000))];
_pos = call blck_fnc_findShoreLocation;
#ifdef blck_debugMode
if (blck_debugLevel >= 2) then {diag_log format["_fnc_addDynamicUMS_Mission: blck_dynamicUMS_MissionsRuning = %1 | blck_missionsRunning = %2 | blck_UMS_ActiveDynamicMissions = %3",blck_dynamicUMS_MissionsRuning,blck_missionsRunning,blck_UMS_ActiveDynamicMissions]};;
#endif
blck_UMS_ActiveDynamicMissions pushBack _pos;
blck_missionsRunning = blck_missionsRunning + 1;
blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning + 1;
//diag_log format["[blckeagls] UMS Spawner:-> waiting for %1",_waitTime];
uiSleep _waitTime;
//diag_log format["[blckeagls] UMS Spawner:-> spawning mission %1",_UMS_mission];
[_pos,_mission] call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1",_UMS_mission];

View File

@ -8,7 +8,11 @@ private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_marke
"_chanceReinforcements","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_missionCenter",
"_missionGroups","_scubaGroupParameters","_vehiclePatrolParameters","_submarinePatrolParameters","_aircraftTypes","_noAirPatrols","_airPatrols",
"_vests","_backpacks","_weaponList","_sideArms","_uniforms","_headGear","_chanceHeliPatrol","_noChoppers","_chancePara","_missionHelis","_noPara",
<<<<<<< Updated upstream
"_chanceLoot","_paraTriggerDistance","_paraLoot","_paraLootCounts","_vehiclecrewcount"];
=======
"_chanceLoot","_paraTriggerDistance","_paraLoot","_paraLootCounts"];
>>>>>>> Stashed changes
params["_missionCenter","_mission"];
//_mission = "UMS mission example #2"; // Included for additional documentation. Not intended to be spawned as a mission per se.
//_missionCenter = [22584.9,15304.8,0]; // I pulled this from the position of the marker.
@ -48,6 +52,7 @@ _lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts
// values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively.
// blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange
_startMsg = "Pirates were spotted off the coast - intercept them and collect the loot";
_endMsg = "The pirates were defeated";
_markerLabel = "";
@ -60,7 +65,6 @@ _missionLandscapeMode = "precise"; // acceptable values are "random","precise"
// In precise mode objects will be spawned at the relative positions specified.
// In the random mode, objects will be randomly spawned within the mission area.
_missionLandscape = [ // Paste appropriate lines from M3EDEN output here.
// ["Land_Cargo_HQ_V2_F",[22894.7,16766,3.19],[[0,1,0],[0,0,1]],[true,false]],
["Land_Boat_05_wreck_F",[1,1,0],0,[true,false]]
]; // list of objects to spawn as landscape using output from M3EDEN editor.
@ -69,7 +73,6 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her
// where _customLootArray follows the same format as blck_BoxLoot_Red and the other pre-defined arrays and
// where _customlootcountsarray1 also follows the same format as the predefined arrays like blck_lootCountsRed
// ["Box_NATO_Ammo_F",[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts],
//["Exile_Container_SupplyBox",[1.91016,-3.85352,-3.54709],0,[true,false], _crateLoot, _lootCounts]
//[selectRandom blck_UMS_crates,[0,0,0],_crateLoot, _lootCounts]
]; // If this array is empty a single loot chest will be added at the center. If you add items loot chest(s) will be spawned in specific positions.
@ -77,8 +80,12 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her
_missionLootVehicles = [ // Paste appropriate lines from the output of M3EDEN Editor here and add the loot crate type and loot counts at the end of each entry as shown in the example below.
// Many vehicles have less inventory capacity than crates so you may have to modify _lootcounts to avoid having stuff spawned all over the ground.
<<<<<<< Updated upstream
//["Exile_Car_Van_Box_Guerilla02",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]],
["I_Boat_Transport_01_F",[3,3,0],_crateLoot, _lootCounts]
=======
["I_Boat_Transport_01_F",[3,3,0],0,_crateLoot, _lootCounts]
>>>>>>> Stashed changes
]; // [ ["vehicleClassName", [px, py, pz] /* possition at which to spawn*/, _loot /* pointer to array of loot (see below)];
// When blank nothing is spawned.
// You can use the same format used for _missionLootBoxes to add vehicles with/without loot.
@ -102,16 +109,12 @@ _scubaGroupParameters = [
//_noVehiclePatrols = blck_SpawnVeh_Red; // Not useful for marine missions which we assume need pre-defined positions for vehicles.
// These are surface patrols.
_vehiclePatrolParameters = [
// ["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
["B_Boat_Armed_01_minigun_F",[2,2,0],0]
//["B_T_Boat_Transport_01_F",[16.7676,43.083,-0.00134277],"red",4, 75,60]
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
// Allows you to define the location of the center of the patrol, vehicle type spawned, radius to patrol, and AI difficulty (blue, red, green etc).
_submarinePatrolParameters = [
//
//["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0],
["B_SDV_01_F",[-2,-2,-1.5],0]
];

View File

@ -80,8 +80,12 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her
_missionLootVehicles = [ // Paste appropriate lines from the output of M3EDEN Editor here and add the loot crate type and loot counts at the end of each entry as shown in the example below.
// Many vehicles have less inventory capacity than crates so you may have to modify _lootcounts to avoid having stuff spawned all over the ground.
<<<<<<< Updated upstream
//["Exile_Car_Van_Box_Guerilla02",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]],
["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],[[0,1,0],[0,0,1]],[true,false],_crateLoot, _lootCounts]
=======
["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],0,_crateLoot, _lootCounts]
>>>>>>> Stashed changes
]; // [ ["vehicleClassName", [px, py, pz] /* possition at which to spawn*/, _loot /* pointer to array of loot (see below)];
// When blank nothing is spawned.
// You can use the same format used for _missionLootBoxes to add vehicles with/without loot.
@ -107,31 +111,54 @@ _aiGroupParameters = [
];
_aiScubaGroupParameters = [
<<<<<<< Updated upstream
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/]
//[[22584.9,15304.8,-4.27578],"red",4, 75,0],
[[22613.5,15269.1,-4.28332],"red",3, 75,900],
[[22549,15288.9,0],"red",1, 75,0]
=======
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, seconds to wait after all units killed before respawning the group (set to 0 to disable respawns)]
[[22549,15288.9,0],"red",3, 75,900]
>>>>>>> Stashed changes
];
_noVehiclePatrols = blck_SpawnVeh_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4];
// Note that this value is ignored if you define vehicle patrols in the array below.
_vehiclePatrolParameters = [
<<<<<<< Updated upstream
//["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],"red",75,60],
["B_T_Boat_Armed_01_minigun_F",[22578.6,15273.3,-0.0354593],"red",75,0]
=======
//["Vehicle Class Name",Position [22570.1,15235.3,-4.49949],AI Difficulty "red",4 (Units to spawn into vehicle), 75 (radius of patrol area),60 (seconds to wait after all units dead before respawning)],
["B_T_Boat_Armed_01_minigun_F",[22578.6,15273.3,-0.0354593],"red",3, 75,0]
>>>>>>> Stashed changes
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
// Allows you to define the location of the center of the patrol, vehicle type spawned, radius to patrol, and AI difficulty (blue, red, green etc).
_submarinePatrolParameters = [
<<<<<<< Updated upstream
//["B_SDV_01_F",[22584.9,15304.8,-1],"red",75,0],
["B_SDV_01_F",[22609.9,15299.8,-1],"red",75,0]
=======
////["Vehicle Class Name",Position [22570.1,15235.3,-4.49949],AI Difficulty "red",4 (Units to spawn into vehicle), 75 (radius of patrol area),60 (seconds to wait after all units dead before respawning)],
["B_SDV_01_F",[22607.9,15299.8,-1],"red",3, 75,0],
["B_SDV_01_F",[22609.9,15297.8,-1],"red",3, 75,0]
>>>>>>> Stashed changes
];
_aircraftTypes = blck_patrolHelisRed; // You can use one of the pre-defined lists in blck_configs or your own custom array.
_noAirPatrols = blck_noPatrolHelisRed; // You can use one of the pre-defined values or a custom one. acceptable values are integers (1,2,3) or a range such as [2,4];
// Note: this value is ignored if you specify air patrols in the array below.
_airPatrols = [
<<<<<<< Updated upstream
//["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0],
//[selectRandom _aircraftTypes,_missionCenter,"green",1000,0]
=======
//["Vehicle Class Name",Position [22570.1,15235.3,-4.49949],AI Difficulty "red", 75 (radius of patrol area),60 (seconds to wait after all units dead before respawning)],
["selectRandom _aircraftTypes",[22578.4,15273,50],"red",1000,0]
>>>>>>> Stashed changes
];
// Change _useMines to true/false below to enable mission-specific settings.

View File

@ -1,7 +1,10 @@
/*
Define loot crate configurations for Epoch.
for ghostridergaming
By Ghostrider [GRG]
Copyright 2016
Last Modified 3-14-17
--------------------------
License
@ -13,29 +16,92 @@
//diag_log "Loading Static Loot Container Spawning System for Epoch";
_lootBoxes =
[
/*[
#ifdef GRG_TestServer
["altis","APTrader",10,
[
[[14658.1, 16790.9, 18.3795],0,false,false],
[[14660, 16788.5, 18.3795],0,false,false],
[[17518.4,13260.7,12.7337],0,false,false],
[[17528.1,13270.2,12.725],0,false,false],
[[17537.4,13278.2,12.706],0,false,false],
[[17547.9,13286,12.6121],0,false,false],
[[17599.5,13240.5,13.327],0,false,false],
[[17593.1,13231.9,13.4375],0,false,false],
[[17586.5,13224.6,13.5832],0,false,false],
[[17580.5,13217.8,13.6708],0,false,false]
]
],
#endif
"altis", // map name
"Camp1", // a name for this region for logging and debuging purpses and to help identify the definition down the road when changing things on the server
2, // number of locations specified from the list below at which to spawn crates
[ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false]
[[23555.9,18422.7,0.730287],0,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
[[23542.1,18435.9,0.00143886],0,true, false],
[[23514,18452.5,0.00143886],0,true, false],
[[23534.2,18418.8,0.00143886],0,false, true]
]
],
[ "altis",
"refuel",
2,
[ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false]
[[22963.8,17041.3,0.00143886],0,false, false],
[[22942.8,17038,0.00143886],0,false, false],
[[22948.7,17054,0.00143886],0,false, false]
] // No comma after this last one
] // No comma after this last one
*/
// Ferres
/*
["altis","Ferres", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[21693.887,7731.0264,13.955027],0,true, true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[21850.063,7504.3203,14.677059],0,true, true],
[[21693.674,7431.4141,15.578629],0,true, true],
[[21631.227,7773.9927,14.149431],0,true, true],
[[21572.559,7462.2661,17.827536],0,true, true],
[[21801.348,7631.4448,13.80711],0,true, true],
[[21508.932,7585.6309,15.844649],0,true, true],
[[21547.027,7695.6738,15.754698],0,true, true]
]
],*/
// Dump
["altis","Dump", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[5791,20314.5,0],0,false, true,true], // crate position 1, loadout (0-4), false=random placement near position, true = show smoke at position
[[5902.33,20272.7,0],0,false, true,true],
[[5955.21,20136.2,0],0,false, true,true],
[[5908.32,20088.3,0],0,false, true,true],
[[55843.54,20171.6,0],0,false, true,true],
[[5775.42,20163.3,0],0,false, true,true],
[[5979.18,20206.5,0],0,false, true,true],
[[5943.89,20076.7,0],0,false, false,true]
]
],
// Beach #1
["altis","Beach", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[22769.8,7051.28,0],0,false, true,true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[22934.3,6990.53,0],0,false, true,true],
[[22831.7,7003.24,0],0,false, true,true],
[[22666.6,7009.22,0],0,false, true,true],
[[22634.6,6985.3,0],0,false, true,true],
[[22583.4,6935.63,0],0,false, true,true],
[[22651.1,7060.75,0],0,false, true,true]
]
],
["altis","Pack-1", 1, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[14269.6,13016.2,0],0,false,false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[14359.9,13047.7,0],0,false,false],
[[14293.5,12956.9,0],0,false,false]
]
]
/*,
["altis","Pack-2", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[26810,24557.2,0.00140762],0,false,false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[26746,24652.6,0.520973],0,false,false],
[[26798.1,24668.3,0.001297],0,false,false],
[[26873,24635.1,17.4495],0,false,false],
[[26940.7,24642.2,0.732187],0,false,false],
[[26955.5,24658.4,0.739138],0,false,false],
[[26943.8,24666.2,0.722866],0,false,false],
[[26930.2,24651.9,0.727114],0,false,false],
[[26965.5,24684.1,7.63653],0,false,false],
[[26928.3,24714.8,7.63206],0,false,false],
[[26940.7,24730.5,7.76619],0,false,false],
[[26952,24750.5,0.602812],0,false,false],
[[26932.7,24730.8,0.635454],0,false,false],
[[26931.2,24739,0.724504],0,false,false],
[[26968.1,24700.1,0.599913],0,false,false],
[[26847.9,24821.4,0.340788],0,false,false],
[[26783.4,24788.2,12.5849],0,false,false],
[[26729.8,24759.1,0.296225],0,false,false]
]
]*/
];
private["_loot_uniforms","_loot_pistols","_loot_rifles","_loot_snipers","_loot_LMG","_loot_silencers"];

View File

@ -14,23 +14,7 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
_lootBoxes =
[
#ifdef GRG_TestServer
["altis","APTrader",10,
[
[[14658.1, 16790.9, 18.3795],0,false,false],
[[14660, 16788.5, 18.3795],0,false,false],
[[17518.4,13260.7,12.7337],0,false,false],
[[17528.1,13270.2,12.725],0,false,false],
[[17537.4,13278.2,12.706],0,false,false],
[[17547.9,13286,12.6121],0,false,false],
[[17599.5,13240.5,13.327],0,false,false],
[[17593.1,13231.9,13.4375],0,false,false],
[[17586.5,13224.6,13.5832],0,false,false],
[[17580.5,13217.8,13.6708],0,false,false]
]
],
#endif
// Examples for Altis and bornholm are provided here
// Ferres
/*
["altis","Ferres", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
@ -45,112 +29,13 @@ _lootBoxes =
[[21547.027,7695.6738,15.754698],0,true, true]
]
],*/
#ifndef blck_milServer
// Dump
["altis","Dump", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[5791,20314.5,0],0,false,true], // crate position 1, loadout (0-4), false=random placement near position, true = show smoke at position
[[5902.33,20272.7,0],0,false,true],
[[5955.21,20136.2,0],0,false,true],
[[5908.32,20088.3,0],0,false,true],
[[55843.54,20171.6,0],0,false,true],
[[5775.42,20163.3,0],0,false,true],
[[5979.18,20206.5,0],0,false,true],
[[5943.89,20076.7,0],0,false,true]
]
],
// Beach #1
["altis","Beach", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[22769.8,7051.28,0],0,false,true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[22934.3,6990.53,0],0,false,true],
[[22831.7,7003.24,0],0,false,true],
[[22666.6,7009.22,0],0,false,true],
[[22634.6,6985.3,0],0,false,true],
[[22583.4,6935.63,0],0,false,true],
[[22651.1,7060.75,0],0,false,true]
]
],
["altis","Pack-1", 1, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[14269.6,13016.2,0],0,false,false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[14359.9,13047.7,0],0,false,false],
[[14293.5,12956.9,0],0,false,false]
]
],
["altis","Pack-2", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[26810,24557.2,0.00140762],0,false,false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[26746,24652.6,0.520973],0,false,false],
[[26798.1,24668.3,0.001297],0,false,false],
[[26873,24635.1,17.4495],0,false,false],
[[26940.7,24642.2,0.732187],0,false,false],
[[26955.5,24658.4,0.739138],0,false,false],
[[26943.8,24666.2,0.722866],0,false,false],
[[26930.2,24651.9,0.727114],0,false,false],
[[26965.5,24684.1,7.63653],0,false,false],
[[26928.3,24714.8,7.63206],0,false,false],
[[26940.7,24730.5,7.76619],0,false,false],
[[26952,24750.5,0.602812],0,false,false],
[[26932.7,24730.8,0.635454],0,false,false],
[[26931.2,24739,0.724504],0,false,false],
[[26968.1,24700.1,0.599913],0,false,false],
[[26847.9,24821.4,0.340788],0,false,false],
[[26783.4,24788.2,12.5849],0,false,false],
[[26729.8,24759.1,0.296225],0,false,false]
]
],
#endif
["taviana","Zoo", 3, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[18614.1,3029.22,0],0,false, true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[19215.7,2260.17,0],0,false, true],
[[19073.2,2775.83,0],0,false, true],
[[18632.1,2967.54,0],0,false, true],
[[18671.2,2869.73,0],0,false, true]
]
],
// Power Plant
["taviana","NPP", 3, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type.
[
[[9478.98,4481.12,0],0,false, false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position
[[9584.39,4474.86,0],0,false, false],
[[9485.74,4303.65,0],0,false, false],
[[9549.64,4236.95,0],0,false, false],
[[9347.52,4656.96,0],0,false, false],
[[9427.53,4585.94,0],0,false, false],
[[9542.42,4603.89,0],0,false, false]
]
],
["bornholm","Stronghold1",4,
// Stronghold 1
[
[[16776.3,2841.59,0.115455],2,true, false],
[[16885.1,2763.64,0.0635304],4,true, false],
[[16953.7,2588.12,0.0866053],2,true, false],
[[17028.5,2645.56,0.0632489],4,true, false],
[[16818.7,2627.68,0.0635295],2,true, false],
[[16828.1,2794.94,0.086482],4,true, false],
[[16776.8,2842.19,0.115454],2,true, false]
]
],
["bornholm","Stronghold2", 4,
// Stronghold 2
[
[[4342.52,19974.5,1.5059],2,false, false],
[[4364.01,19957.2,1.7643],4,false, false],
[[4337.55,19886.1,0.923979],2,false, false],
[[4317.76,19915.3,0.336912],4,false, false],
[[4261.73,19957,0.0783005],2,false, false],
[[4280.66,19961.2,0.180275],4,false, false],
[[4318.1,19916.5,0.514435],2,false, false]
]
],
["bornholm","Object99",4,// ** Note that there is no comma after the last entry.
/*
["bornholm","Object99",4,// ** Note that there is no comma after the last entry. // for darth_rogues Object99 addon
// Object 99 blah blah
[
/*
// Darthrogues Obj 99
// Darthrogues Obj 99
[[7231.91,11975.8,0.836342],2,false, false],
[[7266.08,11981.6,1.0471],4,false, false],
[[7337.64,12011.6,12.7679],2,false, false],
@ -166,108 +51,7 @@ _lootBoxes =
[[7137.67,12110.8,4.0068],2,false, false],
[[7166,12138,3.86438],4,false, false],
[[7130.52,12207.9,0.56971],4,false, false]
*/
// Mr. Squirrel's Obj 69
[[7253.48,12101.4,0],2,false, false],
[[7276.15,12118.1,0],4,false, false],
[[7158.4,12068.5,0],2,false, false],
[[7128.27,12206.9,0],4,false, false],
[[7167.57,12218.9,0],2,false, false],
[[7218.71,12188.5,0],4,false, false],
[[7209.02,12166.9,0],2,false, false],
[[7233.2,12067.5,0],4,false, false],
[[7167.75,12038.4,0],2,false, false],
[[7106.96,12119.2,0],4,false, false],
[[7161.82,12126.7,0],2,false, false],
[[7096.61,12195.9,0],4,false, false],
[[7083.88,12141.1,0],2,false, false],
[[7060.33,12146.2,0],4,false, false],
[[7135.81,12168.1,0],2,false, false],
[[7055.72,12159.2,0.38678],4,false, false],
[[7119.19,12100.2,0.801155],2,false, false],
[[7124.51,12095.7,1.16968],4,false, false]
]
],
["bornholm","Mafia Island", 4,
[// Mafia Island
[[19296.5, 22308.8, 0],2,false, false],
[[19279, 22352.2, 0],4,false, false],
[[19213.8, 22358.6, 0],2,false, false],
[[19190.4, 22367.4, 0],4,false, false],
[[19204.3, 22314.9, 0],2,false, false],
[[19368.7, 22347.3, 0],4,false, false],
[[19462.8, 22306.1, 0],2,false, false],
[[19321.4, 22240.1, 3.46751],4,false, false]
]
],
["bornholm","Science Compound", 4,
[// Science Compound
[[7922.43,7347, 0],2,false, false],
[[7926.59,7427.49, 0],4,false, false],
[[7929.08,7421.45, 0],2,false, false],
[[7984.89,7474.71, 0],4,false, false],
[[7974.01,7472.63, 0],2,false, false],
[[7934.56,7572.23, 0],4,false, false],
[[7945.09,7587.68, 0],2,false, false],
[[7949.19,7567.18,0],4,false, false]
]
],
//[[21572.559,7462.2661,17.827536],4,true, true]
//[[21801.348,7631.4448,13.80711],1,true, true],
//[[21508.932,7585.6309,15.844649],2,true, true],
//[[21547.027,7695.6738,15.754698],3,true, true]
[ "lythium", "RaiderBase", 3,
[
[[18950.6,13115.8,233.078],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
[[18958,13095.9,231.687],2,true, false],
[[19048.7,13134,229.004],2,true, false],
[[19062.3,13126.6,229.646],1,true, false],
[[19032.2,13087.3,227.428],3,true, false],
[[18988,13192.7,223.058],1,true, false],
[[19076.2,13105.2,231.051],3,true, false]
]
],
[ "lythium","chemical", 4,
[
[[9081.29,19774.8,704.102],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
[[9081.29,19774.8,704.102],2,true, false],
[[8926.25,19856.5,728.456],2,true, false],
[[8999.95,19917.9,714.447],1,true, false],
[[9391.22,19888,713.624],3,true, false],
[[9026.12,20360,687.103],1,true, false],
[[8972.81,20222.4,714.263],3,true, false],
[[9406.59,19506.8,635.903],3,true, false],
[[7715.5,20352.6,822.616],3,true, false]
]
],
[ "lythium","nwaste", 4,
[
[[19123.5,1726.78,77.169],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
[[19000.5,1657.84,79.3068],2,true, false],
[[19028.6,1525.28,80.0602],2,true, false],
[[19076.7,1536.15,78.7828],1,true, false],
[[19393.5,1784.66,32.3623],3,true, false],
[[19391,1783.63,32.5241],1,true, false],
[[19255.1,2204.95,46.3486],3,true, false],
[[19398.7,2323,42.8409],3,true, false]
]
],
[ "lythium","mine", 4,
[
[[4114.84,905.004,357.621],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
[[3714.22,760.414,383.659],2,true, false],
[[3774.63,684.883,384.924],2,true, false],
[[3747.2,777.427,384.203],1,true, false],
[[3761.07,611.827,383.125],3,true, false],
[[3709.12,780.889,383.27],1,true, false],
[[3712.96,805.05,382.848],3,true, false],
[[3688.47,713.877,382.692],3,true, false],
[[4373.19,607.184,370.77],3,true, false]
]
]
]*/
];

View File

@ -1,12 +0,0 @@
Todo:
For V 6.90:
2. Test new unlock fix on HC
3. Write a claim vehicle function.
4. End of development most likely.
5. be sure AI do heal when wounded but not killed.
Event handler is triggered but does not seem to call the script to deal with everything.
6. test that ai toss smoke when healing
7. Check that functions for allerting units, groups and vehicles function properly in all situations.
☐ Item: add check for empty crew slots and delete excess crew: note - use BIS_fnc_crewCount to get the number of slots.

View File

@ -0,0 +1,663 @@
/*
blck Mission system by Ghostrider [GRG]
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 He-Man, Vampire and KiloSwiss have been used for certain functions.
Many thanks for new Coding and ideas from Grahame.
Significant Changes:
=====================
6.96 Build 197
Sorted some wisses with the dynamic UMS spawner.
Removing debugging info
TODO: come back to grpNull detection
6092 Build 196
sorted issues with markers
and added new findSafeLocation
6.92 Build 194
Added _noAIGroups to parameter list for _spawnMissionAI
Other minor changes to delete logging.
6.92 Build 193
Updates to scripts to see if player(s) are near locations.
Updates to scripts to delete alive and dead AI.
Updates to simulation managers.
6.92 Guild 192
All actions on dead AI are handled throug units blck_graveyardGroup
All use of blck_deadAI has been deleted.
6.92 Build 184
Fixed an issues that caused blckeagls to load before exile servers were ready to accept players.
Added checks that ensure that live AI and mission scenery do not despawn when players are nearby.
Decreased the frequency with which some checks (dead AI, live AI, scenery at completed missions) is checked.
Redid a few lops that should be using the more speedy deleteAt rather than forEach methods.
worked on killed and hit EH so that these can run on the client owning the unit and server with each having a specific role
- note that this requires that the code be streamed to clients and compiled on the HC.
Updates to client to reduce logging
Added a firedNear EH
Redid system for setting up combatmode and behavior to be context dependent
Redid setNextWaypont to include an antiStuck check and implement the above checks on behavior and combat mode.
Support for claim-vehicle scripts is now built-in
blck_allowClaimVehicle = true; // To allow players to claim vehicles (Exile only).
Added a setting to disable having AI toss smoke before healing. Set:
blck_useSmokeWhenHealing=false; // to disable this
Added an option to display kill notices using Toasts
blck_aiKillUseToast=true; // in blckClient.sqf in the debug folder of your mission.pbo to enable these.
Added offloading of AI to clients
////////
// Client Offloading and Headless Client Configurations
blck_useHC = true; // Experimental (death messages and rewards not yet working).
// Credit to Defent and eraser for their excellent work on scripts to transfer AI to clients for which these settings are required.
blck_ai_offload_to_client = true; // forces AI to be transfered to player's PCs. Disable if you have players running slow PCs.
blck_ai_offload_notifyClient = false; // Set true if you want notifications when AI are offloaded to a client PC. Only for testing/debugging purposes.
// TODO: set to false before release
blck_limit_ai_offload_to_blckeagls = true; // when true, only groups spawned by blckeagls are evaluated.
Fixed - Vehicle unlock when empty of crew through adding a getOut event handler.
Code for spawning vehicles redone to reduced redundancy.
Monitoring of groups refined to route mission groups that have left the mission area back to it.
V 6.90 Build 175
1. Added new settings to specify the number of crew per vehhicle to blck_config.sqf and blck_config_mil.sqf
// global settings for this parameters
// Determine the number of crew plus driver per vehicle; excess crew are ignored.
// This can be a value or array of [_min, _max];
blck_vehCrew_blue = 3;
blck_vehCrew_red = 3;
blck_vehCrew_green = 3;
blck_vehCrew_orange = 3;
You can also define this value in missions by adding the following variable definition to the mission template:
_vehicleCrewCount = [3,6]; // min/max number of AI to load including driver. see the missions\blue\template.sqf and blck_configs.sqf for more info.
2. Lists of items to be excluded from dynamically generated loadouts has been moved to:
blck_config.sqf
blck_config_mil.sqf
3. Added a new setting that specifies whether logging of blacklisted items is done (handy for debugging)
blck_logBlacklistedItems = true; // set to false to disable logging
4. Hit and Killed event handlers extensively reworked. Methods for notification of nearby AI and Vehicles of the killers whereabouts were revised to be more inclusive of neighboring AI.
5. Issues with AIHit events fixed; AI now deploy smoke and heal.
6. Added constraints on aircraft patrols to keep them in the mission area.
7. Removed some unnecessary logging.
8. Other minor coding fixes and optimizations.
6.88
This update consists primarily of a set of bug fixes and code tweaks.
Many thanks to HeMan for his time in effort spent going through the scripts to troublehsoot and improve them.
6.86 Build 156
Added support for spawning infantry and statics inside buildings for forming a garrison using either of two methods.
1. by placing a marker object such as a sphere in the building you define it as having units/statics inside
2. by placing units or statics in it you determine the garrison to be placed at mission spawn.
Added tools to facilitate grabbing data from missions in the editor (see the new TOOLS folders for more information).
Added additional error checks for missing mission parameters.
Fixed: issues that prevented completion of capture/hostage missions on exile servers
Added: code that forces air, land and sea vehicles to detect nearby players which should help with frozen AI _noChoppers
Changed: code for blckeagls simulation manager to force simulation when groups are awoken.
Added: additional settings for simulation management (see blck_configs.sqf for details)
Changed: Simulation management is now set using the new variable blck_simulationManager which is defined in blck_configs.sqf
Fixed: Heli's just hovered over missions.
Fixed: GRG code that locked up the mission system was removed from the public RC.
6.84 Build 145
Added Option to load weapons, pistols, uniforms, headgear, vests and backpacks from CfgPricing (Epoch) or the Arsenal (Exile) and exclude items above a certain price
Add details on configs for enabling this and setting the maximum price
To use this new feature
Set blck_useConfigsGeneratedLoadouts = true;
To specify the maximum price for items added to AI, change:
blck_maximumItemPriceInAI_Loadouts = 100;
NOTE: this function overides any loadouts you specify in blck_config.sqf etc.
Added functions to despawn static patrols of all types when no players are nearby. This tracks the number of infantry alive in a group and respawns only the number alive when the group was despawned.
Added: Static units will now be spawned with gear specific to difficulty level (blue, red, green, orange) as specified in blck_config.sqf etc.
Added: AI now have a chance of spawning with binocs or range finders.
Added: a lit road cone spawns at the center of the mission to help find it and aid in triggering mission completion.
Changed: Hostage missions redesigned to reduce chances of AI being glitched into containers and of mission objects flying about when spawned in.
Changed: Units are spawned with greater dispersion.
Changed: method for spawning random landscapes has been changed. Note the added randomization in missions\blue\default.sqf
Fixed: Collisions between objects at missions caused issues.
Fixed: Attempted a fix to reduce the chance that AI will spawn inside or under objects like rocks or containers.
Fixed: Captive missions now complete properly.
Fixed: Hostage missions now complete properly.
Fixed: Paratroops spawned at UMS missions now spawn with scuba gear.
Version 1.82 Build 134
Added: configs for blue, red, green and orange pistol, vest, backpack and uniforms (with thanks to Grahame for suggesting this change and doing most of the coding)
Changes:
Commented out all configs in missions for uniforms, headgear, backpacks and uniforms.
Commented out most configs for helis, paratroops and supplemental loot dropped by paratroops.
Removed some logging that is not required.
Version 1.82 Build 132
Added: blck_killPercentage = 0.9; // The mission will complete if this fraction of the total AI spawned has been killed.
// This facilitates mission completion when one or two AI are spawned into objects.
Added: Male and Female uniforms are separated and can be used alone or together for specific missiosn (Epoch Only).
Added: Loot tables updated to include food and supplies as of Epoch 1.1.0.
Added: Setting that configures vehicles to be sold at Black Market Traders.
blck_allowSalesAtBlackMktTraders = true; // Allow vehicles to be sold at Halve's black market traders.
Added: Support for hostage rescue missions.
The hostage can be spawned at any location relative to the mission center.
The mission aborts if the hostage is killed; all loot is deleted.
To complete the mission, a player must approach the hostage and execute the rescue action.
The hostage then runs away, and loot becomes available to the player.
See missions\blue\hostage.sqf for an example mission.
***** PLEASE READ - IMPORTANT ****
Please update the blck_client.sqf in your mission.pbo or you will not be able to interact with or see animations of the new AI characters.
Added: Support for Arrest Leader missions.
These are similar to the rescue hostage mission except that the leader, when arrested, will sites
awaiting arrival of imaginary survivor forces.
See missions\blue\capture.sqf for an example mission
Added: blck_missionEndCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
which provides a simple way to define the default conditions under which the mission ends for all missions.
You can of course define _endCondition in the specific mission file if you wish.
Added: A new mission completion condition for hostage and captive missions.
_endCondition = "assetSecured";
Added: Mission crates can now be spawned on the ground or in the air at mission completion.
blck_spawnCratesTiming sets the default for all missions.
blck_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir".
Define _spawnCratesTiming to set this parameter for a particular mission.
_spawnCratesTiming = "atMissionEndAir";
See the hostage1.sqf mission as an example.
Added: Crates spawn with tabs or crypto. Set the values in the mod-specific configs.
For Epoch, the crypto can be accessed by pressing space bar.
Added: Additional documentation for those who wish to design their own missions.
See \missions\blue\default.sqf and default2.sqf for details.
Added: greater control over AI loadouts.
For land-based dynamic missions you can now specify for each mission:
Uniforms
Headgear
Vests
Weapons allowed
Sidearms allows.
(See \Missions\Blue\default2.sqf for examples).
[Still to do: upgrade statics for the same functionality; doable but will require adding these parameters to the spawn info for the groups of infantry, vehicle, submerged and air units];
Added: greater control of mission helis - you can now set variables in the mission file (see examples below).
when these are not defined in the mission file, defaults are used.
_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
Added: default minimun and maximum radius for groups to patrol.
blck_minimumPatrolRadius = 22; // AI will patrol within a circle with radius of approximately min-max meters. note that because of the way waypoints are completed they may more more or less than this distance.
blck_maximumPatrolRadius = 35;
Changed: **** VERY IMPORTANT ******
The definitions of private variables used in missions in now read in through an include statement (see Missions\Blue\default.sqf for an example)
Please update any custom mission you have generated accordingly.
This should save quite a bit of editing going forward.
Please note that if you do not update the private variables definitions list certain features of the mission spawner may not work due to issues with scope of variables.
Changed: Each mission is now compiled at server startup which I hope will save a little server resource between restarts.
A few variables that were not used were eliminated.
Some declarations of private variables were consolidated.
Together these changes should be worth a small performance bump.
Changed: Code for Heli Patrols redone.
Code that spawns paratroops moved to a separate function that is called when a player is within a certain radius of the mission.
Code that spawns a supplemental loot chest added - this will be spawned along with the paratroop reinforcements, if desired.
This crate can have customized loot (think ammo, building supplies, tools and food, ala Exile/Epoch airdrops).
Changed: Logic for spawning paratroops was redone so it is more clear.
When helis are spawned the paratroops will spawn at the heli location at the location at which the heli spawn based on probability set in _chancePara in the mission file or the default for that mission difficulty.
When no helies are to be spawned, paratroops will spawn at the mission center when it spawns based on probability set in _chancePara in the mission file or the default for that mission difficulty.
A delay was added so that paratroops spawn when players are nearby for more drama !!
Changed: Methods for detecting NULL Groups (rarely a problem with arma these days) simplified.
Still more work to be done here.
Changed: Methods for defining mission crate loot were relaxed.
You can define each item either with the old method ["Item Name", minimun number, maximum number] or just "Item name".
Fixed: disabled some logging that is not required except when debugging.
Fixed: AI Counts were not being shown at dynamic UMS.
Fixed: AI were glitching through walls.
Fixed: Emplaced weapons are now spawned at correct locations when their positions are defined in an array in the mission file.
Fixed: an issue with the experimental build whereby the number of dynamically tracked missions was not correctly spawned.
Fixed: Dead Ai in vehicles were sometimes detected as alive. Dead AI are now ejected.
Fixed: Vehicles are now properly released to players when all AI inside are killed when an HC is connected.
Version 1.80 Build 118
Added: you can now determine whether objects spawned at dynamic missions have simulation or damage enabled.
See the medicalCamp.sqf mission for an example of how this is done.
Added: you can now spawn simple objects as part of your mission landscape. Useful for STATIC missions only.
Added: lists of armed vehicles from which you can choose those you wish to spawn at vehicles broken down by category (wheeled, traced APC, Tank, etc)
Added: Three constants that define how far away missions are from players when they spawn.
blck_minDistanceToBases = 900; Minimum distance from any freq jammer or flag
blck_minDistanceToPlayer = 900; Minimum distance from any player
blck_minDistanceFromTowns = 300; Minimum distance from cites or towns.
Changed: Default missions reworked to support the above.
Version 1.79, Build 116
Added: Map-specific information for Lythium.
Added: New configuration setting: blck_showCountAliveAI = true; When = true, the number of alive AI at a mission will be displayed by the mission marker.
Added: You can now define the types of patrol vehicles spawned based on AI difficulty.
Fixed: Setting blck_useTimeAcceleration = false; now disables the time acceleration module.
Fixed: several issues with dynamic UMS missions.
Fixed: AI Heli's at missions should now be released to players when all AI are dead.
Fixed: script errors when dynamic simulation off.
Changed: Code for checking the state of AI vehicles and releasing them to players was re-written.
Changed: Eliminated useless files from the debug folder (mission.pbo).
Please replace the debug folder in your mission PBO with the updated one found on the github.
[removed all scripts for markers from mission\debug. These are now located in custom_server\compiles\functions.]
Version 6.78 Build 107
Fixed: blck_baseSkill is now used properly to set skill of units.
Added: Units assemble in formation when spawned.
Version 6.78 build 106
Changed how event handlers are handled.
bug fixes
Removed lines specific to GRG servers.
Version 6.76 Build 104
Added: A new timer that determines the time after which Vehicles are deleted once all AI are dead if no player has entered the driver's seat.
Added: an optional variable in the template for missions called _missionGroups by which you can define the parameters (position, skill level, number, patrol radius) for each group spawned.
See the default2.sqf mission under custom_server\Missions\blue for an example
Changed: The method by which the server handles AI damage was changed to use MPHit.
Added: an MPKilled event handler for vehicles.
Fixed: Static Vehicles were being spawned repeatedly.
Fixed: _missionGroups parameters were not being handled correctly.
Fixed: sever FPS was not being logged by GMS_passToHCs
Fixed: crate marker was not shown when in debug mode.
Known Issues: Vehicles are not unlocked when released to players if an HC is connected.
Version 6.74 Build 97
Added Core Code for spawning dynamic underwater missions.
Added Core Code for spawning scuba units and surface and SDV patrols.
Added Code to spawn static underwater missions.
Note: support for scuba AI required a significant re-write of the code for spawning AI groups and units.
Changed static missions so that AI are spawned only when players are within 2000 meter.
Added optional respawn to static AI groups, vehicles, emplaced weaps and aircraft.
Added four functions that support spawning of static AI with setting for difficulty, patrol radius, and respawn time.
For examples, see the updated static eample mission
and blck_custom_config.sqf and the examples below:
position difficulty radius respawn
[[[22920.4,16887.3,3.19144],"red",[1,2], 75, 120]] call blck_fnc_sm_AddGroup;
weapon position difficulty radius (not used) respawn time
[["B_G_Mortar_01_F",[22867.3,16809.1,3.17968],"red",0,0]] call blck_fnc_sm_AddEmplaced;
vehicle position difficulty radius respawn
[["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red", 600, 0]] call blck_fnc_sm_AddVehicle;
aircraft position difficulty radius respawn
[["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red", 1000, 0]] call blck_fnc_sm_AddAircraft;
Re-did event handlers for compatability with Arma 1.78+, and moved most code into pre-compiled functions that execute on the server.
======================
Version 6.72 Build 81
[Added] Support for headless clients. This functionality works for one HC regardless of the name used for HCs.
[Added] Added an optional variable for mission patrol vehicles: _missionPatrolVehicles
One can use this variable to defin the spawn position and types of vehicles spawned at missions.
note: one can still have the type of vehicle randomized by using selectRandom and pointing it to either the default list of patrol vehicles for the mission system or providing a custom array of vehicle class names.
I added this because on some of our GRG missions the vehicles were being destroyed at the time they were spawned.
[Changed] Crates can now be lifted only AFTER a mission is completed.
[Changed] The client is now activated using remoteExec instead of a public variable.
**** Please be sure to update the files in the debug folder on your client.
=====================
Version 6.71 Build 77
[Added] HandleDamage Event Handler for Armed Vehicles to increase their interaction with players.
[Fixed] Mission name was not displayed with start or end messages when the mission marker labels were disabled.
[Fixed] the mission system would hang in some situations due to an undefined global variable in SLS.
============================
8/13/17 Version 6.61 Build 71
[Added] Most parameters for numbers of loot, AI, and vehicle patrols can be defined as either a scalar value or range.
Note that there is backwards compatability to prior versions so you need make no changes to your configs if you do not wish to.
The major reason to include this feature is so that players to do not go looking for that third static weapon at an orange mission. They have to scope out the situation.
[Added] options to have multiple aircraft spawn per mission.
[Note that if you spawn more than one aircraft I recommend that you disable the paratroop spawns to avoid spawning more than 124 groups].
[Added] an optional militarized setting whereby missions use a full complement of Arma air and ground vehicles including fighter jets and tanks. This is OFF by default.
Uncomment #define blck_milServer in custom_server\Configs\blck_defines to enable this.
[ Note!!! There are both general and mod-specific configs for the militarized missions.]
[Added] Support for setting a range for certain configurations rather than setting a single value.
This should make missions a little more varied in that players will no longer be looking for the 4 statics that always spawn at an orange mission.
This pertains to:
Numbers of Emplaced Weapons
Numbers of Vehicles Patrols
Numbers of Air Patrols
AI Skills; for example you can now set ["aimingAccuracy",[0.08,16]],["aimingShake",[0.25,0.35]],["aimingSpeed",0.5],["endurance",0.50], .... ];
Numbers of Items to load into Mission and Static loot crates; for example, for the orange level of difficulty item counts could be revised as follows:
blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1];
7/27/17 Version 6.59 Build 60
[added] AI units in mission vehicles and emplaced weapons are notified of the location of the shooter when an AI unit is hit or killed. Location of the unit is revealed gradually between 0.1 and 4 where 4 is precise. Increments increase with increasing mission difficulty.
6/1/17 Version 6.59 Build 59
[changed] Players are no longer given crypto for each AI kill. Crypto added to AI Bodies was increased.
[fixed] error in GMS_fnc_setupWaypoints wherein _arc was not defined early enough in the script.
[fixed] Exile Respect Loss bug (temporary fix only).
5/21/17 Version 6.58 build 58
[Fixed] typos for blck_epochValuables.
[Fixed] All loot was removed from AI vehicles at the time a mission was completed.
[Fixed] When mission completion criteria included killing all AI, missions could be completed with alive AI in vehicles.
4/6/17 Version 6.58 Build 54
[Added] A FAQ presenting an overview of the mission system and addons.
[Changed] Helicopter crew waypoint system reverted to that from Build 46.
[Fixed] Mission timouts would prevent new missions from spawning after a while.
[Fixed] blck_timeAcceleration now determines if time acceleration is activated.
[Fixed] Missions did not complete correctly under certain circumstances.
[Fixed] Mission vehicles were not properly deleted, unlocked or otherwise handled at misison end or when AI crew were killed.
[Fixed] Throws errors when evaluating errors related to certain disallowed types of kills.
Known errors: throws errors with certain loot crate setups (Exile)
3/23/17 Verision 6.58 build 48
Turned debugging off
Added some preprocessor commands to minimize the use of if()then for debugging purposes when running without any debugging settings on.
Teaks to heli patrol waypoint system.
bugfixes.
3/21/17 Version 6.58 Build 44
[Added] Each mission now has a setting for mines which is set to false. To use the global setting in blck_config for yoru mission just change this to read:
_useMines = blck_useMines;
[Fixed] Logging by the time acceleration module was disabled.
[Fixed] Emplaced weapons now spawn in the correct locations.
[Fixed] Missions end correctly when all AI are dead and _endCondition = "allKilledOrPlayerNear";
[changed] Reverted to the waypoint system from build 42.
3/18/17 Version 6.58 Build 44
[Fixed] Time acceleration was not working.
[Fixed] blck_timeAcceleration now determines if time acceleration is activated.
[Fixed] The mission described by default2 in the blue missions folder now spawns correctly.
You can use this as a guide for how to place loot crates or static weapons at specific locations like inside or on top of structures.
Loot vehicles are now spawned correctly.
Loot crates positioned at specific locations are now spawned correctely.
static weapons to be spawned at specified positions are now spawned correctly.
That mission is disabled by default.
[Added] option to disable time acceleration (blck_timeAcceleration = true; line 30 of blck_config.sqf)
[Added] options to have armed heli's patrolling the missions and for them to drop AI.
[Added] options to have paratroops drop over missions as an alternative to the above.
[Added] Code optimization for GMS_fnc_spawnMissionAI.sqf and several other AI spawning scripts.
Added] Formalizing exception handling for the case in which a createGroup request returns grpNull.
If this happens during mission spawning the mission will be aborted and all mission objects and AI will be deleted.
This should prevent the mission system from crashing causing no further missions to spawn.
[Added] a new configuration that sets a cap on the maximum number of spawned missions.
blck_maxSpawnedMissions = 4; // Line 181 of blck_configs.sqf
[Added] a function blck_fnc_allPlayers which returns an array of allPlayers (as a temporizing fix till BIS patches the allPlayers function.
[Changed] Coding improvements for waypoint generation.
Tried a new approach to generating waypoints to make AI more aggressive without the overhead of the last method.
[Changed] Redid the mission spawner to spawn one random mission every 1 min for mission for which timers say they can be spoawned.
This will continue until the cap is reached then randomly select a mission from those that are ready to be respawned to be spawned next.
If you want the various missions to have an equal chance of being spawned at all times, give the the timers for blue, red, green and red timers the same values for Min and Max.
[Chaged] logic for detecting whether a player is near the mission center or loot crates to test if a player is near any of an array of location or objects.
[Added] a function blck_fnc_allPlayers which returns an array of allPlayers (as a temporizing fix till BIS patches the allPlayers function.
To Do - consider moving back to storing AI in a group-based manner (doable easily, needs testing).
Build a template for static missions (planned for Ver 6.60).
Write a static mission spawning routine (planned for Ver 6.60).
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.
[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 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. 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 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 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 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 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.
Added additional reporting as to the mission type for which AI, statics and vehicle patrols are being spawned.
Continued switching from blck_debugOn to blck_debugLevel.
Continued work to move much of the code from GMS_fnc_missionSpawner to precompiled functions.
- tested and working for all but the emplaced weapons module.
Removed old code that had been commented out from GMS_missionSpawner.
deactivated the 'fired' event handler
added an 'reloaded' event handler to units that adds a magazin of the type used to reload the weapon to prevent units running out of ammo. this also provides a break in firing and is more realistic.
Added a check to GMS_fnc_vehicleMonitor that addes ammo to vehicle cargo when stores are low. Removed the infinite ammo script for static and vehicle weapons, again for greater realism.
Increased number of rounds of ammo added to AI units for primary and secondary weapons.
Tweaked code in GMS_fnc_spawnUnit to increase efficiency.
Attempted a fix for occaisional issues with missions not triggering or ending by changing from distance to distance2D.
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. 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.
Ensured that the array used to store the location(s) of active or recent missions is properly updated.
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 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.
changed - several other minor performance tweaks were made server side.
changed - small changes were made the the loop in blck_client.sqf
Tweaked debugging information to reduced unnecessary logging when not in debug-mode.
Disabled the loop sending server fps client-side
fixed - GMS_fnc_updateMissionQue was not correctly updating mission information after mission completion.
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 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
Added a setting blck_useIEDMessages = true/false; // when true players will receive a message that their vehicle was damaged when AI are killed in a forbidden way (Run over Or Killed with vehicle-mounted weapons)
Fixed: Messages that a nearby IED was detonated are now properly displayed when players illegally kill AI.
Added a way to easily include / exclude APEX items. To exclude them comment out the line
#define useAPEX 1
at approximately line 219 in the config.
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 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 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 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.
blck_blacklistSpawns = true; // Locations of Exile spawns will be pulled from the config. No missions will spawn within 1000 m of these locations.
Added: the main thread now runs a function that checks for empty groups.
Fixed: The mission system would hang on epoch after a while because createGroup returned nullGroup. this appeared to occur because the maximum number of active groups had been reached. Deleting empty groups periodically solved the issue on a test machine.
Teaked: code to check whether a possible mission spawn location is near a flag or plot pole. Still needs work.
Added: Completed adding EDEN weapons, optics, bipods, optics to AI configurations and mission loot crates.
Added APEX headgear and uniforms. (Note, you would need to add any of these you wished for players to sell to Epoch\<Map Name>\epoch_config\CfgPricing.hpp on Epoch)
Changed: Definitions of blacklist locations such as spawns moved from GMS_findWorld.sqf to the blck_configs_(epoch|exile).
Changed: Divided rifles and optics into subcategories to better enable assigning weapons to AI difficulties in a sort of class-based way, e.g., 556, 6.5, or LMG are separate classes.
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 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 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 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.
Added new parameter blck_removeNVG which when true will cause NVG to be deleted from AI bodies.
Fixed: launchers and rounds should now be deleted when blck_removeLaunchers = true;
Fixed: All AI should spawn with a uniform.
More bug fixes and correction of typos.
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 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 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 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 Added a time acceleration function
1) Added back the time acceleration module
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 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 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 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 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
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).
4) Re-did all code to automatically select correct parameters to run correctly on either exile or epoch servers.
5) Added the Exile Static Loot Crate Spawner; Re-did this to load either an exile or epoch version as needed since a lot of the variables and also the locations tables are unique.
6) Added the Dynamic Loot system from Exile again with Exile and Epoch specific configurations; here the difference is only in the location tables.
7) Pulled the map addons function from the Exile build and added a functionality to spawn addons appropriately for map and mod type.
8) Helicrashes redone to provide more variability in the types of wrecks, loot and challenge. These are spawned by a new file Crashes2.sqf
9) Added a setting to determine the number of crash sites spawned at any one time: blck_maxCrashSites. Set to -1 to disable altogether.
10) Added settings to enable / disable specific mission classes, e.g., blck_enableOrangeMissions. Set to 1 to enable, -1 to disable.
8-14-16
Added mission timout feature, set blck_MissionTimeout = -1 to disble;
Changed to use of params for all .sqf which also eliminated calls to BIS_fnc_params
changed to selectRandom for all .sqf
some changes to client side functions to eliminate the public variable event handler (credits to IT07 for showing the way)
Added the armed powerler to the list of default mission vehicles.
2/28/16
1) Bug fixes completed. Cleanup of bodies is now properly separated from cleanup of live AI. Cleanup of vehicles with live AI is now working correctly.
2) Released to servers this morning.
3) Next step will be to add in the heli reinforcements for ver 5.2.
2/20/16
Bugfixes and enhancements.
1) added checks for nearby bases or nearby players when spawning missions.
2) Fixed typos in Medical Camp missions.
3) Added two new modes for completing mission: 1) mission is complete when all AI are killed; 2) mission is complete when player reaches the crate OR when all AI are killed.
In Progress
1) Mission timouts
2) Added optional reinforcments via helicopters which can then patrol the mission area.
2/11/16
Major Update to Build 5.0
1) All missions but heli crashes are spawned using a single mission timer and mission spawner
2) The mission timer now calles a file containing the mission parameters. The mission spawner is included and run from that file.
3) A kill feed was added reporting each AI kill.
4) AI kills are now handled via an event handler run on the server for forward compatability with headless clients.
5) Multiple minor errors and bug fixes related to mission difficulty, AI loadouts, loot and other parameters were included.
6) The first phase of restructuring of the file structure has been completed. Most code for functions and units has been moved to a compiles directory in Compiles\Units and Compiles\Functions.
7) Some directionality and randomness was added where mission objects are spawned at random locations from an array of objects to give the missions more of a feeling of a perimeter defense where H-barrier and other objects were added.
8) As part of the restructuing, variables were moved from AIFunctions to a separate file.
9) Bugs in routines for cleanup of dead and live AI were fixed. A much simpler system for tracking live AI, dead AI, locations of active and recent missions, was implemented because of the centralization of the mission spawning to a single script

View File

@ -16,6 +16,7 @@ if ((tolower blck_modType) isEqualTo "epoch") then
private _config = configFile >> "CfgEpoch";
private _configWorld = _config >> worldname;
private _telePos = getArray(configFile >> "CfgEpoch" >> worldName >> "telePos" );
diag_log format["_fnc_getTraderCities: _telePos = %1",_telePos];
{
blck_locationBlackList pushback [_x select 3, 1000];
} foreach _telePos;
@ -23,11 +24,8 @@ if ((tolower blck_modType) isEqualTo "epoch") then
if ((tolower blck_modType) isEqualTo "exile") then
{
if (blck_blacklistTraderCities || blck_blacklistSpawns || blck_listConcreteMixerZones) then
private _traderCites = allMapMarkers;
{
private _traderCites = allMapMarkers;
private _tc = [];
{
if (getMarkerType _x isEqualTo "ExileTraderZone" && blck_blacklistTraderCities) then {
blck_locationBlackList pushback [(getMarkerPos _x),1000];
};
@ -39,6 +37,5 @@ if ((tolower blck_modType) isEqualTo "exile") then
if (getMarkerType _x isEqualTo "ExileConcreteMixerZone" && blck_listConcreteMixerZones) then {
blck_locationBlackList pushback [(getMarkerPos _x),1000];
};
}forEach _traderCites;
};
}forEach _traderCites;
};

View File

@ -10,12 +10,32 @@
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
<<<<<<< Updated upstream
=======
diag_log format["[blckeagls] blck_init_server started"];
// Only run this on a dedicated server
>>>>>>> Stashed changes
if ( !(isServer) || hasInterface) exitWith{};
// Only run this once
if !(isNil "blck_Initialized") exitWith{};
<<<<<<< Updated upstream
=======
// This is just a flag so we know if blckeagls has been started or not.
blck_Initialized = true;
>>>>>>> Stashed changes
// find and set Mod
blck_modType = if (!isNull (configFile >> "CfgPatches" >> "exile_server")) then {"Exile"} else {if (!isnull (configFile >> "CfgPatches" >> "a3_epoch_server")) then {"Epoch"} else {""}};
publicVariable "blck_modType";
<<<<<<< Updated upstream
=======
// This block waits for the mod to start but is disabled for now
>>>>>>> Stashed changes
if ((tolower blck_modType) isEqualto "epoch") then {
diag_log "[blckeagls] Waiting until EpochMod is ready...";
waituntil {!isnil "EPOCH_SERVER_READY"};
@ -26,10 +46,12 @@ if ((toLower blck_modType) isEqualTo "exile") then
waitUntil {!isNil "PublicServerIsLoaded"};
};
// Just some housekeeping for ghost.
private _blck_loadingStartTime = diag_tickTime;
#include "\q\addons\custom_server\init\build.sqf";
diag_log format["[blckeagls] Loading Server Mission System"];
// compile functions
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_functions.sqf";
diag_log format["[blckeagls] functions compiled"];
@ -39,7 +61,9 @@ waitUntil{(!isNil "blck_useHC") && (!isNil "blck_simulationManager") && (!isNil
diag_log format["[blckeagls] blck_useHC = %1 | blck_simulationManager = %2 ",blck_useHC,blck_simulationManager];
diag_log format["[blckeagls] debug mode settings:blck_debugON = %1 blck_debugLevel = %2",blck_debugON,blck_debugLevel];
// Load any user-defined specifications or overrides
<<<<<<< Updated upstream
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf";
//diag_log format["[blckeagls] configurations loaded at %1",diag_tickTime];
@ -47,6 +71,17 @@ call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\bl
uiSleep 15;
=======
[] call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf";
diag_log format["[blckeagls] Custom Configurations Loaded at %1",diag_tickTime];
diag_log format["[blckeagls] debug mode settings:blck_debugON = %1 | blck_debugLevel = %3",blck_debugON,blck_debugLevel];
// Load vaariables used to store information for the mission system.
[] call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf";
diag_log format["[blckeagls] Variables loaded at %1",diag_tickTime];
// configure dynamic simulation management is this is being used.
>>>>>>> Stashed changes
if (blck_simulationManager == 2) then
{
"Group" setDynamicSimulationDistance 1800;
@ -61,13 +96,19 @@ if (blck_spawnMapAddons) then
diag_log "[blckeagls] Map Addons disabled";
};
<<<<<<< Updated upstream
=======
>>>>>>> Stashed changes
// find and set Mapcenter and size
diag_log "[blckeagls] Loading Map-specific information";
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\init\GMS_fnc_findWorld.sqf";
// set up the lists of available missions for each mission category
<<<<<<< Updated upstream
//diag_log "[blckeagls] Loading Mission Lists";
=======
>>>>>>> Stashed changes
#include "\q\addons\custom_server\Missions\GMS_missionLists.sqf";
diag_log "[blckeagls] Mission Lists Loaded Successfully";
@ -95,7 +136,7 @@ if ( !(blck_debugON) && (blck_debugLevel isEqualTo 0)) then
if (blck_spawnStaticLootCrates) then
{
call compile preprocessfilelinenumbers "\q\addons\custom_server\SLS\SLS_init.sqf";
[] spawn compile preprocessfilelinenumbers "\q\addons\custom_server\SLS\SLS_init.sqf";
diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner Done";
}else{
diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner disabled";
@ -103,7 +144,7 @@ if (blck_spawnStaticLootCrates) then
if (blck_blacklistTraderCities) then
{
call compile preprocessfilelinenumbers "\q\addons\custom_server\init\GMS_fnc_getTraderCites.sqf";
[] spawn compile preprocessfilelinenumbers "\q\addons\custom_server\init\GMS_fnc_getTraderCites.sqf";
};
if (blck_ai_offload_to_client) then
@ -112,7 +153,37 @@ if (blck_ai_offload_to_client) then
//publicVariable "blck_fnc_changeToMoveWaypoint";
//publicVariable "blck_fnc_changeToSADWaypoint";
publicVariable "blck_EH_unitWeaponReloaded";
<<<<<<< Updated upstream
};
=======
publicVariable "blck_EH_AIfiredNear";
publicVariable "blck_fnc_processAIfiredNear";
publicVariable "blck_EH_vehicleGetOut";
publicVariable "blck_fnc_handleVehicleGetOut";
publicVariable "blck_EH_vehicleManGetOut";
publicVariable "blck_fnc_checkForEmptyVehicle";
publicVariable "blck_fnc_handleEmptyVehicle";
publicVariable "blck_fnc_unlockVehicle";
publicVariable "blck_EH_AIKilled";
publicVariable "blck_fnc_processAIKill";
};
_fn_setupLocationType = {
params[ "_locationType"];
private _locations = nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), [_locationType], worldSize];
_locations
};
private _villages = ["NameVillage"] call _fn_setupLocationType;
private _cites = ["NameCity"] call _fn_setupLocationType;
private _capitals = ["NameCityCapital"] call _fn_setupLocationType;
private _marine = ["NameMarine"] call _fn_setupLocationType;
private _other = ["NameLocal"] call _fn_setupLocationType;
private _airport = ["Airport"] call _fn_setupLocationType;
blck_townLocations = _villages + _cites + _capitals + _marine + _other + _airport;
diag_log format["_init_server: count blck_townLocations = %1 || blck_townLocations = %2",count blck_townLocations, blck_townLocations];
>>>>>>> Stashed changes
//Start the mission timers
if (blck_enableOrangeMissions > 0) then
@ -136,8 +207,21 @@ if (blck_enableBlueMissions > 0) then
[_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue,blck_enableBlueMissions] call blck_fnc_addMissionToQue;
};
<<<<<<< Updated upstream
=======
// Setup a group for AI corpses
blck_graveyardGroup = createGroup [blck_AI_Side,false];
blck_graveyardGroup setGroupId ["blck_graveyard"];
blck_graveyardGroup setVariable ["blck_group",1];
>>>>>>> Stashed changes
// start the main thread for the mission system which monitors missions running and stuff to be cleaned up
[] spawn blck_fnc_mainThread;
blck_pvs_version = blck_versionNumber;
publicVariable "blck_pvs_version";
<<<<<<< Updated upstream
diag_log "[blckeagls] < MISSION SYSTEM FULLY INITIALIZED AND RUNNING >";
=======
diag_log format["[blckeagls] version %1 Build %2 Loaded in %3 seconds",blck_versionNumber,blck_buildNumber,diag_tickTime - _blck_loadingStartTime]; //,blck_modType];
>>>>>>> Stashed changes

View File

@ -1,4 +1,10 @@
<<<<<<< Updated upstream
#define blck_buildNumber 182
#define blck_versionNumber 6.92
#define blck_buildDate "9-13-19"
=======
#define blck_buildNumber 196
#define blck_versionNumber 6.96
#define blck_buildDate "1-29-20"
>>>>>>> Stashed changes