diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf new file mode 100644 index 0000000..81941ad --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf @@ -0,0 +1,45 @@ +/* + for ghostridergaming + 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["_obj","_difficulty"]; +private _mod = [] call blck_fnc_getModType; +//diag_log format["_fnc_addMoneyToObject: _this = %1",_this]; +#ifdef blck_debugMode +{ + diag_log format["_fnc_addMoneyToOject: _this select %1 = %2",_foreachindex, _this select _foreachindex]; +}forEach _this; +#endif +if (_mod isEqualTo "Exile") then +{ + switch (_difficulty) do + { + case "blue":{_obj setVariable["ExileMoney", floor(random([blck_crateMoneyBlue] call blck_fnc_getNumberFromRange)),true];}; + case "red":{_obj setVariable["ExileMoney", floor(random([blck_crateMoneyRed] call blck_fnc_getNumberFromRange)),true];}; + case "green":{_obj setVariable["ExileMoney", floor(random([blck_crateMoneyGreen] call blck_fnc_getNumberFromRange)),true];}; + case "orange":{_obj setVariable["ExileMoney", floor(random([blck_crateMoneyGreen] call blck_fnc_getNumberFromRange)),true];}; + #ifdef blck_debugMode + diag_log format["_fnc_addMoneyToOject: ExileMoney set to %1", _obj getVariable "ExileMoney"]; + #endif + }; +}; + +if (_mod isEqualTo "Epoch") then +{ + switch (_difficulty) do + { + case "blue":{_obj setVariable["Crypto", floor(random([blck_crateMoneyBlue] call blck_fnc_getNumberFromRange)),true];}; + case "red":{_obj setVariable["Crypto", floor(random([blck_crateMoneyRed] call blck_fnc_getNumberFromRange)),true];}; + case "green":{_obj setVariable["Crypto", floor(random([blck_crateMoneyGreen] call blck_fnc_getNumberFromRange)),true];}; + case "orange":{_obj setVariable["Crypto", floor(random([blck_crateMoneyGreen] call blck_fnc_getNumberFromRange)),true];}; + }; +}; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_countAliveAI.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_countAliveAI.sqf new file mode 100644 index 0000000..828532c --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_countAliveAI.sqf @@ -0,0 +1,27 @@ +/* + 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 ["_AIList",["_returnMode",0]]; +private["_alive","_total","_return"]; + +_total = count _AIList; +_alive = {alive _x} count _AIList; +switch (_returnMode) do +{ + case 0:{_return = (_alive / _total)}; + case 1:{_return = [_alive,_total]}; +}; +//diag_log format["_fnc_countAliveAI: _alive = %1 | _total = %2 | _return = %3",_alive,_total,_return]; +_return + + diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn-128.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn-128.sqf new file mode 100644 index 0000000..10fad2c --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn-128.sqf @@ -0,0 +1,210 @@ +/* + + 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"; +/* + Tasks + 1. avoid water (weight 100%, min distance 50 meters). + 2. avoid sites of active heli, UMS or land dynamic missions. (weight sliding down to 50%, min distance 1000 meters). + 3. avoid players and player bases (weight 100%, 1000 meters min distance). + 4. avoid cites and towns (weight 20%, min distance according to settings). + +*/ +private["_findNew","_tries","_coords","_dist","_xpos","_ypos","_newPos","_townPos","_pole","_oldPos","_ignore"]; + +_fnc_getNewPosition = { + //[_centerForSearch,_minDistFromCenter,_maxDistanceFromCenter,_minDistanceFromNearestObj,_waterMode,_maxTerainGradient,_shoreMode] call BIS_fnc_findSafePos + // https://community.bistudio.com/wiki/BIS_fnc_findSafePos + _coords = [blck_mapCenter,0,blck_mapRange,30,0,5,0] call BIS_fnc_findSafePos; + //diag_log format["<<--->> _coords = %1",_coords]; + _coords +}; + +_fnc_excludeBlacklistedLocations = { + private _coords = _this select 0; + private _findNew = false; + { + if ( ((_x select 0) distance2D _coords) < (_x select 1)) exitWith + { + _findNew = true; + }; + } forEach blck_locationBlackList; + _findNew +}; + +_fnc_excludeNearbyMissions = { + private _coords = _this select 0; + private _findNew = false; + { + if ((_x distance2D _coords) < blck_MinDistanceFromMission) then { + _findNew = true; + }; + }forEach DBD_HeliCrashSites; + //diag_log format["#- findSafePosn -# blck_ActiveMissionCoords isEqualTo %1", blck_ActiveMissionCoords]; + { + //diag_log format["#- findSafePosn -# blck_ActiveMissionCoords active mission item is %1", _x]; + if ( (_x distance2D _coords) < blck_MinDistanceFromMission) exitWith + { + _FindNew = true; + }; + } forEach blck_ActiveMissionCoords; + _findNew +}; + +_fnc_excludeRecentMissionCoords = { + private _coords = _this select 0; + private _findNew = false; + { + _ignore = false; + //diag_log format["-# findSafePosn.sqf -# Old Mission element is %1", _x]; + if (diag_tickTime > ((_x select 1) + 1200)) then // if the prior mission was completed more than 20 min ago then delete it from the list and ignore the check for this location. + { + _ignore = true; + blck_recentMissionCoords= blck_recentMissionCoords - _x; + //diag_log format["-# findSafePosn.sqf -# Removing Old Mission element: %1", _x]; + }; + if !(_ignore) then + { + //diag_log format["-# findSafePosn.sqf -# testing _coords against Old Mission coords is %1", _x select 0]; + if ( ((_x select 0) distance2D _coords) < blck_MinDistanceFromMission) then + { + _findNew = true; + //diag_log format["-# findSafePosn.sqf -# Too Close to Old Mission element: %1", _x]; + }; + }; + } forEach blck_recentMissionCoords; + _findNew +}; + +_fnc_excludeSitesAtShore = { + private _coords = _this select 0; + private _findNew = false; + // test for water nearby + _dist = 50; + for [{_i=0}, {_i<360}, {_i=_i+20}] do + { + _xpos = (_coords select 0) + sin (_i) * _dist; + _ypos = (_coords select 1) + cos (_i) * _dist; + _newPos = [_xpos,_ypos,0]; + if (surfaceIsWater _newPos) then + { + _findNew = true; + _i = 361; + }; + }; + _findNew +}; + +_fnc_excludeCitiesAndTowns = { + private _coords = _this select 0; + private _findNew = false; + // check that missions spawn at least 1 kkm from towns + { + _townPos = [((locationPosition _x) select 0), ((locationPosition _x) select 1), 0]; + if (_townPos distance2D _coords < blck_minDistanceFromTowns) exitWith { + _findNew = true; + }; + } forEach blck_townLocations; + _findNew +}; + +_fnc_excludeSpawnsNearPlayers = { + private _coords = _this select 0; + private _findNew = false; + // check to be sure we do not spawn a mission on top of a player. + { + if (isPlayer _x && (_x distance2D _coords) < blck_minDistanceToPlayer) then + { + _findNew = true; + }; + }forEach playableUnits; + _findNew +}; + +_fnc_mapSpecificExclusions = { + private _coords = _this select 0; + private _findNew = false; + if (toLower(worldName) in ["taviana","napf"]) then + { + _tavTest = createVehicle ["SmokeShell",_coords,[], 0, "CAN_COLLIDE"]; + _tavHeight = (getPosASL _tavTest) select 2; + deleteVehicle _tavTest; + if (_tavHeight > 100) then {_FindNew = true;}; + }; + _findNew +}; + +_fnc_excludeSitesNearBases = { + private _coords = _this select 0; + private _findNew = false; + // check for nearby plot pole/freq jammer within 800 meters + _mod = call blck_fnc_getModType; + _pole = ""; + if (_mod isEqualTo "Epoch") then {_pole = "PlotPole_EPOCH"}; + if (_mod isEqualTo "Exile") then {_pole = "Exile_Construction_Flag_Static"}; + //diag_log format["_fnc_findSafePosn:: -- >> _mod = %1 and _pole = %2",_mod,_pole]; + { + if ((_x distance2D _coords) < blck_minDistanceToBases) then + { + _findNew = true; + }; + }forEach nearestObjects[blck_mapCenter, [_pole], blck_minDistanceToBases]; + _findNew +}; + +private _findNew = true; +private _tries = 0; +while {_findNew} do { + _findNew = false; + _coords = call _fnc_getNewPosition; + + _findNew = [_coords] call _fnc_mapSpecificExclusions; + + if !(_findNew) then + { + _findNew [_coords] call _fnc_excludeSitesAtShore; + }; + if !(_findNew) then + { + _findNew = [_coords] call _fnc_excludeBlacklistedLocations; + }; + if !(_findNew) then + { + _findNew = [_coords] call _fnc_excludeNearbyMissions; + }; + if !(_findNew) then + { + _findNew = [_coords] call _fnc_excludeSpawnsNearPlayers; + }; + if !(_findNew) then + { + _findNew = [_coords] call _fnc_excludeSitesNearBases; + }; + if !(_findNew) then + { + + }; + if !(_findNew) then + { + + }; + + _tries = _tries + 1; +}; + +if ((count _coords) > 2) then +{ + private["_temp"]; + _temp = [_coords select 0, _coords select 1]; + _coords = _temp; +}; +_coords; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf index 191b07e..b07d9d9 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf @@ -15,7 +15,7 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private["_findNew","_tries","_coords","_dist","_xpos","_ypos","_newPos","_townPos","_pole"]; +private["_findNew","_tries","_coords","_dist","_xpos","_ypos","_newPos","_townPos","_pole","_oldPos","_ignore"]; _findNew = true; _tries = 0; @@ -50,7 +50,6 @@ while {_findNew} do { //diag_log format["#- findSafePosn -# blck_recentMissionCoords isEqualTo %1", blck_recentMissionCoords]; { - private["_oldPos","_ignore"]; _ignore = false; //diag_log format["-# findSafePosn.sqf -# Old Mission element is %1", _x]; if (diag_tickTime > ((_x select 1) + 1200)) then // if the prior mission was completed more than 20 min ago then delete it from the list and ignore the check for this location. @@ -71,7 +70,6 @@ while {_findNew} do { } forEach blck_recentMissionCoords; // test for water nearby - private ["_i"]; _dist = 100; for [{_i=0}, {_i<360}, {_i=_i+20}] do { diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf index f7933eb..6490eed 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -16,45 +16,49 @@ diag_log "running GRGserver version of _fnc_mainThread"; #endif -private["_modType","_timer1sec","_timer5sec","_timer20sec","_timer5min","_timer5min"]; +private["_timer1sec","_timer5sec","_timer20sec","_timer5min","_timer5min"]; _timer1sec = diag_tickTime; _timer5sec = diag_tickTime; _timer20sec = diag_tickTime; _timer1min = diag_tickTime; _timer5min = diag_tickTime; -_modType = [] call blck_fnc_getModType; + while {true} do { uiSleep 1; //diag_log format["mainThread:: -- > time = %1",diag_tickTime]; - if (diag_tickTime - _timer1sec > 1) then + if (diag_tickTime > _timer1sec) then { [] call blck_fnc_vehicleMonitor; #ifdef GRGserver [] call blck_fnc_broadcastServerFPS; #endif - _timer1sec = diag_tickTime; + _timer1sec = diag_tickTime + 1; + //diag_log format["[blckeagls] _fnc_mainThread 1 Second Timer Handled | Timstamp %1",diag_tickTime]; }; - if (diag_tickTime - _timer5sec > 5) then + if (diag_tickTime > _timer5sec) then { - _timer5sec = diag_tickTime; + _timer5sec = diag_tickTime + 5; [] call blck_fnc_missionGroupMonitor; [] call blck_fnc_sm_monitorStaticMissionUnits; //[] call blck_fnc_sm_checkForPlayerNearMission; + //diag_log format["[blckeagls] _fnc_mainThread 5 Second Timer Handled | Timstamp %1",diag_tickTime]; }; - if (diag_tickTime - _timer20sec > 20) then + if (diag_tickTime > _timer20sec) then { [] call blck_fnc_cleanupAliveAI; [] call blck_fnc_cleanupObjects; [] call blck_fnc_cleanupDeadAI; - _timer20sec = diag_tickTime; - //diag_log format["_mainThread::-->> 20 second events run: diag_tickTime = %1",diag_tickTime]; + _timer20sec = diag_tickTime + 20; + //diag_log format["[blckeagls] _fnc_mainThread 20 Second Timer Handled | Timstamp %1",diag_tickTime]; }; - if ((diag_tickTime - _timer1min) > 60) then + if ((diag_tickTime > _timer1min)) then { //diag_log format["_fnc_mainThread: 60 second events run at %1",diag_tickTime]; - _timer1min = diag_tickTime; + _timer1min = diag_tickTime + 60; + //diag_log format["_fnc_mainThread: blck_missionsRunning = %1 | blck_maxSpawnedMissions = %2", blck_missionsRunning,blck_maxSpawnedMissions]; [] call blck_fnc_spawnPendingMissions; +<<<<<<< HEAD diag_log format["_fnc_mainThrea: blck_numberUnderwaterDynamicMissions = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_numberUnderwaterDynamicMissions,blck_dynamicUMS_MissionsRuning]; if (blck_dynamicUMS_MissionsRuning < blck_numberUnderwaterDynamicMissions) then { @@ -64,32 +68,33 @@ while {true} do //[_spawnPos] spawn blck_fnc_addDyanamicUMS_Mission; [] spawn blck_fnc_addDyanamicUMS_Mission; //_spawnPos call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissiones\%1.sqf"; +======= + //diag_log format["_fnc_mainThread: blck_numberUnderwaterDynamicMissions = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_numberUnderwaterDynamicMissions,blck_dynamicUMS_MissionsRuning]; + if (blck_dynamicUMS_MissionsRuning < blck_numberUnderwaterDynamicMissions) then + { + //diag_log "Adding dynamic UMS Mission"; + [] spawn blck_fnc_addDyanamicUMS_Mission; +>>>>>>> Experimental }; //diag_log format["_fnc_mainThread: control returned to _fnc_mainThread from _fnc_addDynamicUMS_Mission at %1",diag_tickTime]; if (blck_useHC) then { //diag_log format["_mainThread:: calling blck_fnc_passToHCs at diag_tickTime = %1",diag_tickTime]; - [] call blck_fnc_passToHCs; + [] call blck_fnc_HC_passToHCs; }; - //[] call blck_fnc_missionGroupMonitor; - /* - // No longer needed - if (_modType isEqualTo "Epoch") then + if (blck_useTimeAcceleration) then { - [] call blck_fnc_cleanEmptyGroups; - }; // Exile cleans up empty groups automatically so this should not be needed with that mod. - */ + [] call blck_fnc_timeAcceleration; + }; #ifdef blck_debugMode //diag_log format["_fnc_mainThread: active SQFscripts include: %1",diag_activeSQFScripts]; diag_log format["_fnc_mainThread: active scripts include: %1",diag_activeScripts]; #endif + //diag_log format["[blckeagls] _fnc_mainThread 60 Second Timer Handled | Timstamp %1",diag_tickTime]; }; - if (diag_tickTime - _timer5min > 300) then + if (diag_tickTime > _timer5min) then { - if (blck_useTimeAcceleration) then - { - _timer5min = diag_tickTime; - [] call blck_fnc_timeAcceleration; - }; + diag_log format["[blckeagls] Timstamp %8 |Dynamic Missions Running %1 | UMS Running %2 | Vehicles %3 | Groups %4 | Server FPS %5 | Server Uptime %6 Min | Missions Run %7",blck_missionsRunning,blck_dynamicUMS_MissionsRuning,count blck_monitoredVehicles,count blck_monitoredMissionAIGroups,diag_FPS,floor(diag_tickTime/60),blck_missionsRun, diag_tickTime]; + _timer5min = diag_tickTime + 300; }; }; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf index 4dcf03b..7eea2d0 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf @@ -4,8 +4,6 @@ ////////////////////////////////////////// // spawn a round marker of a size and color specified in passed parameters -private["_blck_fn_configureRoundMarker"]; - private["_blck_fn_configureRoundMarker"]; _blck_fn_configureRoundMarker = { private["_name","_pos","_color","_size","_MainMarker","_arrowMarker","_labelMarker","_labelType"]; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf index a4aae78..d60a6dd 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf @@ -15,8 +15,8 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; ///////////////////////////////////////////////////// -params["_startTime"]; +params["_startTime",["_timeoutTime",blck_MissionTimeout]]; private["_return"]; -if ((diag_tickTime - _startTime) > blck_MissionTimout ) then {_return = true} else {_return = false}; -//diag_log format["fnc_timedOut:: blck_MissionTimout = %2 || _return = %1",_return,blck_MissionTimout]; +if ((diag_tickTime - _startTime) > _timeoutTime) then {_return = true} else {_return = false}; +//diag_log format["fnc_timedOut:: blck_MissionTimeout = %2 || _return = %1",_return,blck_MissionTimeout]; _return; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_passToHCs.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_passToHCs.sqf index 43d1790..ebe26ab 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_passToHCs.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_passToHCs.sqf @@ -28,7 +28,7 @@ private["_numTransfered","_clientId","_allGroups","_groupsOwned","_idHC","_id"," { if !(_x in blck_connectedHCs) then {blck_connectedHCs pushBack _x}; }forEach 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 ((count blck_connectedHCs) > 0) then { _idHC = [blck_connectedHCs] call blck_fnc_leastBurdened; @@ -38,6 +38,11 @@ if ((count blck_connectedHCs) > 0) then _numTransfered = 0; if (_x getVariable["blck_group",false]) then { + if ((leader _x) != vehicle (leader _x)) then + { + private _v = vehicle (leader _x); + blck_monitoredVehicles = blck_monitoredVehicles - [_v]; + ]; //diag_log format["group belongs to blckeagls mission system so time to transfer it"]; if ((typeName _x) isEqualTo "GROUP") then { @@ -55,9 +60,9 @@ if ((count blck_connectedHCs) > 0) then if ( _rc ) then { _numTransfered = _numTransfered + 1; - //diag_log format["group %1 transferred to %2",_x, groupOwner _x]; + diag_log format["group %1 transferred to %2",_x, groupOwner _x]; } else { - //diag_log format["something went wrong with the transfer of group %1",_x]; + diag_log format["something went wrong with the transfer of group %1",_x]; }; }; }; @@ -68,31 +73,10 @@ if ((count blck_connectedHCs) > 0) then } forEach (allGroups); diag_log format["_passToHCs:: %1 groups transferred to HC %2",_numTransfered,_idHC]; _numTransfered = 0; - /* - { - if (typeName _x isEqualTo "GROUP") then {_idHC = groupOwner _x}; - if (typeName _x isEqualTo "OBJECT") then {_idHC = owner _x}; - if (_idHC > 2) then - { - //diag_log format["vehicle %1 is already assigned to an HC with _id of %2",_x,_id]; - _swap = false; - } else { - //diag_log format["vehicle %1 should be moved to an HC",_x]; - _x setVariable["owner",_idHC]; - if (typeOf _x isEqualTo "GROUP") then {_rc = _x setGroupOwner _idHC}; - if (typeOf _x isEqualTo "OBJECT") then {_rc = _x setOwner _idHC}; - [_x] remoteExec["blck_fnc_HC_XferVehicle",_idHC]; - if ( _rc ) then - { - _numTransfered = _numTransfered + 1; - //diag_log format["group %1 transferred to %2",_x, groupOwner _x]; - } else { - //diag_log format["something went wrong with the transfer of group %1",_x]; - }; - }; - }forEach blck_monitoredVehicles; - */ - //diag_log format["_passToHCs:: %1 vehicles transferred",_numTransfered]; + // Note : the owner of a vehicle is the owner of the driver so vehicles are automatically transferred to the HC when the group to which the driver is assigned is transferred. + } else { - diag_log "_fnc_passToHCs:: No headless clients connected"; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log "_fnc_passToHCs:: No headless clients connected"}; + #endif }; diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf index 420edcf..5621221 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf @@ -64,7 +64,7 @@ if (blck_debugLevel > 2) then if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then { #ifdef blck_debugMode - if (blck_debugLevel > 1) then + if (blck_debugLevel > 2) then { diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SAD Mode",_group]; }; @@ -76,7 +76,7 @@ if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then { #ifdef blck_debugMode - if (blck_debugLevel > 1) then + if (blck_debugLevel > 2) then { diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SENTRY Mode",_group]; }; @@ -86,7 +86,7 @@ if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then #endif }; #ifdef blck_debugMode -if (blck_debugLevel > 1) then +if (blck_debugLevel > 2) then { diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; }; diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf index 5caa3ba..be19d08 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf @@ -33,13 +33,13 @@ _wp setWaypointCombatMode "RED"; _wp setWaypointTimeout [10,15,20]; #ifdef blck_debugMode -_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"]; +if (blck_debugLevel > 2) then {_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"]}; #else _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"]; #endif #ifdef blck_debugMode -if (blck_debugLevel > 1) then +if (blck_debugLevel > 2) then { private ["_marker"]; _marker = _group getVariable["wpMarker",""]; diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf new file mode 100644 index 0000000..64b3d83 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf @@ -0,0 +1,33 @@ +/* + 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["_groupSpawned"]; + +_groupSpawned = createGroup [blck_AI_Side, true]; +_groupSpawned setVariable["groupVehicle",objNull]; +#ifdef useDynamicSimulation +_groupSpawned enableDynamicSimulation true; +#endif +_groupSpawned setcombatmode "RED"; +_groupSpawned setBehaviour "COMBAT"; +_groupSpawned allowfleeing 0; +_groupSpawned setspeedmode "FULL"; +_groupSpawned setFormation blck_groupFormation; +_groupSpawned setVariable ["blck_group",true,true]; + +#ifdef blck_debugMode +diag_log format["_fnc_create_AI_Group: _groupSpawned = %1",_groupSpawned]; +#endif + +_groupSpawned \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf index 2da1ea2..70c92d3 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf @@ -11,11 +11,10 @@ */ params["_pos"]; -private["_nearestGroup","_modType"]; +private["_nearestGroup"]; -_modType = call blck_fnc_getModType; -if (_modType == "Epoch") then {_units = (_pos) nearEntities ["I_Soldier_EPOCH", 100]}; -if (_modType == "Exile") then {_units = (_pos) nearEntities ["i_g_soldier_unarmed_f", 100]}; +if (blck_modType == "Epoch") then {_units = (_pos) nearEntities ["I_Soldier_EPOCH", 100]}; +if (blck_modType == "Exile") then {_units = (_pos) nearEntities ["i_g_soldier_unarmed_f", 100]}; _nearestGroup = group (_units select 0); { diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf index 66cdcb8..b4cb621 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf @@ -156,10 +156,9 @@ _fn_monitorGroupWaypoints = { }; _fn_simulationMonitor = { - private["_playerType","_modType","_players"]; - _modType = call blck_fnc_getModType; - //diag_log format["_fn_simulationMonitor"" _modType = %1",_modType]; - if (_modType isEqualTo "Exile") then + private["_playerType","_players"]; + + if (blck_modType isEqualTo "Exile") then { _playerType = ["Exile_Unit_Player"]; }else{ diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf index 92d5911..68a34c1 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf @@ -1,9 +1,7 @@ /* - Spawn and configure a group - for ghostridergaming + blck_fnc_spawnGroup By Ghostrider [GRG] Copyright 2016 - Last modified 11/12/17 -------------------------- License @@ -13,19 +11,20 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private["_numbertospawn","_groupSpawned","_safepos","_useLauncher","_launcherType"]; +// _newGroup = [_groupSpawnPos,_minAI,_maxAI,_skillLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,true,_isScubaGroup] +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] ]; + #ifdef blck_debugMode -if (blck_debugLevel >=2) then +if (blck_debugLevel >= 2) then { - diag_log format["_fnc_spawnGroup: _this = %1",_this]; + private _params = ["_pos","_center","_numai1","_numai2","_skillLevel","_minDis","_maxDist","_configureWaypoints","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms","_scuba"]; + { + diag_log format["_fnc_spawnGroup: param %1 | value %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex,_forEachIndex]; + }forEach _this; }; #endif -private["_numbertospawn","_groupSpawned","_safepos","_weaponList","_useLauncher","_launcherType"]; - -params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true],["_weaponList",[]],["_vests",blck_vests],["_scuba",false] ]; -if (blck_debugLevel >= 1) then -{ - diag_log format["[blckeagls] _fnc_spawnGroup called parameters: _numai1 %1, _numbai2 %2, _skillLevel %3, _center %4",_numai1,_numai2,_skillLevel,_center]; -}; //Spawns correct number of AI if (_numai2 > _numai1) then { @@ -41,8 +40,9 @@ if (blck_debugLevel >= 1) then }; #endif -_groupSpawned = createGroup [blck_AI_Side, true]; // true here causes any empty group to be automatically deleted within 1 sec or so. https://community.bistudio.com/wiki/createGroup - +//_groupSpawned = createGroup [blck_AI_Side, true]; // true here causes any empty group to be automatically deleted within 1 sec or so. https://community.bistudio.com/wiki/createGroup +_groupSpawned = call blck_fnc_create_AI_Group; + #ifdef blck_debugMode if (blck_debugLevel >= 1) then { @@ -51,25 +51,10 @@ if (blck_debugLevel >= 1) then #endif if !(isNull _groupSpawned) then { - #ifdef blck_debugMode - if (blck_debugLevel >= 1) then {diag_log format["_fnc_spawnGroup:: -- >> Group created = %1",_groupSpawned]}; - #endif - _groupSpawned setVariable["groupVehicle",objNull]; - - #ifdef useDynamicSimulation - _groupSpawned enableDynamicSimulation true; - #endif - - _groupSpawned setcombatmode "RED"; - _groupSpawned setBehaviour "COMBAT"; - _groupSpawned allowfleeing 0; - _groupSpawned setspeedmode "FULL"; - _groupSpawned setFormation blck_groupFormation; - _groupSpawned setVariable ["blck_group",true,true]; //diag_log format["spawnGroup:: group is %1",_groupSpawned]; _useLauncher = blck_useLaunchers; - if (count _weaponList == 0) then + if (_weaponList isEqualTo []) then { _weaponList = [_skillLevel] call blck_fnc_selectAILoadout; }; @@ -96,8 +81,8 @@ if !(isNull _groupSpawned) then diag_log format["spawnGroup:: spawning unit #%1",_i]; }; #endif - // params["_pos","_weaponList","_aiGroup",["_skillLevel","red"],["_Launcher","none"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; - [_pos,_weaponList,_groupSpawned,_skillLevel,_launcherType,_uniforms,_headGear,_vests,_scuba] call blck_fnc_spawnAI; + //params["_pos","_aiGroup",_skillLevel,_uniforms, _headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms,_scuba]; + [_pos,_groupSpawned,_skillLevel,_uniforms,_headGear,_vests,_backpacks,_launcherType, _weaponList, _sideArms, _scuba] call blck_fnc_spawnUnit; }; _groupSpawned selectLeader (units _groupSpawned select 0); // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]]; @@ -115,7 +100,8 @@ if !(isNull _groupSpawned) then }; #endif -} else { +} else +{ diag_log "_fnc_spawnGroup:: ERROR CONDITION : NULL GROUP CREATED"; }; _groupSpawned diff --git a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_XferGroup.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_XferGroup.sqf index b1c5100..86076dc 100644 --- a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_XferGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_XferGroup.sqf @@ -1,6 +1,7 @@ diag_log format["_fnc_HC_XferGroup:: _this = %1",_this]; private["_group","_client","_unit","_tempEH"]; _group = _this select 0; +blck_HC_monitoredGroups pushBack _group; _client = clientOwner; { _unit = _x; @@ -8,4 +9,11 @@ _client = clientOwner; _tempEH = ["reloaded",_unit addEventHandler ["reloaded", {_this call compile preprocessfilelinenumbers blck_EH_unitWeaponReloaded;}]]; _localEH pushBack _tempEH; _x setVariable["localEH",_localEH,true]; -}forEach (units _group); \ No newline at end of file + if(_unit != vehicle _unit) then + { + //diag_log format["_fnc_HC_XferGroup: _unit %1 is in vehicle %2",_unit, vehicle _unit]; + blck_HC_monitoredVehicles pushBack (vehicle _unit); + //diag_log format["_fnc_HC_XferGroup: blck_HC_monitoredVehicles = %1", blck_HC_monitoredVehicles]; + }; +}forEach (units _group); +diag_log format["blckHC:: group %1 transferred to HC %1",_group,_client]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_countGroupsAssigned.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_countGroupsAssigned.sqf new file mode 100644 index 0000000..495823c --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_countGroupsAssigned.sqf @@ -0,0 +1,22 @@ + +/* +blck_fnc_HC_XferGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferGroup.sqf"; +//blck_fnc_HC_XferVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferVehicle.sqf"; +blck_fnc_onPlayerDisconnected = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_onPlayerDisconnected.sqf"; +//blck_fnc_HC_groupsAssigned = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_groupsAssigned.sqf"; +blck_fnc_HCmonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HCmonitor.sqf"; +blck_fnc_HC_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_vehicleMonitor.sqf"; +blck_fnc_monitorHC = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_monitorHC.sqf"; +blck_fnc_passToHCs = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_passToHCs.sqf"; +blck_fnc_HC_getListConnected = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_getListConnected.sqf"; +blck_fnc_HC_leastBurdened = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_leastBurdened.sqf"; +blck_fnc_HC_countGroupsAssigned = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_countGroupsAssigned.sqf"; + +*/ +//blck_fnc_HC_countGroupsAssigned = + +params["_HC"]; +private["_result"]; +_result = {(groupOwner _x) == (owner _HC)} count allGroups; +//diag_log format["_fnc_countGroupsAssigned = %1",_result]; +_result diff --git a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_getListConnected.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_getListConnected.sqf new file mode 100644 index 0000000..08e7e94 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_getListConnected.sqf @@ -0,0 +1,9 @@ + + +//blck_fnc_HC_getListConnected = + +private _hcs = []; +{ + if !(_x in _hcs) then {_hcs pushBack _x}; +}forEach entities "HeadlessClient_F"; +_hcs \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_leastBurdened.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_leastBurdened.sqf new file mode 100644 index 0000000..cb9b396 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_leastBurdened.sqf @@ -0,0 +1,32 @@ + +/* +blck_fnc_HC_XferGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferGroup.sqf"; +//blck_fnc_HC_XferVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferVehicle.sqf"; +blck_fnc_onPlayerDisconnected = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_onPlayerDisconnected.sqf"; +//blck_fnc_HC_groupsAssigned = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_groupsAssigned.sqf"; +blck_fnc_HCmonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HCmonitor.sqf"; +blck_fnc_HC_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_vehicleMonitor.sqf"; +blck_fnc_monitorHC = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_monitorHC.sqf"; +blck_fnc_passToHCs = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_passToHCs.sqf"; +blck_fnc_HC_getListConnected = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_getListConnected.sqf"; +blck_fnc_HC_leastBurdened = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_leastBurdened.sqf"; +blck_fnc_HC_countGroupsAssigned = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_countGroupsAssigned.sqf"; + +*/ +//blck_fnc_HC_leastBurdened = + +params["_HC_List"]; +private["_result","_fewestGroupsAssigned","_leastBurdened","_groupsAssigned"]; +if (count _HC_List == 0) exitWith {_result = objNull; _result}; +_fewestGroupsAssigned = [_HC_List select 0] call blck_fnc_HC_countGroupsAssigned; +_leastBurdened = _HC_List select 0; +{ + _groupsAssigned = [_x] call blck_fnc_HC_countGroupsAssigned; + if (_groupsAssigned < _fewestGroupsAssigned) then + { + _leastBurdened = _x; + _fewestGroupsAssigned = _groupsAssigned; + }; +}forEach _HC_List; +//diag_log format["_fnc_leastBurdened:: _fewestGroupsAssigned = %1 and _leastBurdened = %2",_fewestGroupsAssigned,_leastBurdened]; +_leastBurdened diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddVehicle.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_returnVehicleMonitoringToServer.sqf similarity index 65% rename from @GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddVehicle.sqf rename to @GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_returnVehicleMonitoringToServer.sqf index f7c5c9b..ea97113 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_returnVehicleMonitoringToServer.sqf @@ -1,14 +1,15 @@ /* + 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/ + 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]; -true \ No newline at end of file + +[_vehicle] remoteExec ["blck_fnc_monitorVehicleStatus",2]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_vehicleMonitor.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_vehicleMonitor.sqf new file mode 100644 index 0000000..a3a9fd9 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_vehicleMonitor.sqf @@ -0,0 +1,108 @@ +/* + 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_vehicleMonitor: starting function at diag_tickTime = %1",diag_tickTime]; + +#ifdef blck_debugMode + //diag_log format["_fnc_vehicleMonitor:: blck_debugMode defined"]; +#endif + +private ["_vehList","_veh","_isEmplaced","_ownerIsPlayer","_allCrewDead","_deleteNow","_missionCompleted","_evaluate","_cleanupTimer"]; +_vehList = +blck_HC_monitoredVehicles; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: function called at %1 with _vehList %2 and blck_HC_monitoredVehicles %3",diag_tickTime,_vehList,blck_HC_monitoredVehicles];}; +#endif +//diag_log format["_fnc_vehicleMonitor:: function called at %1 with _vehList %2 and blck_HC_monitoredVehicles %3",diag_tickTime,_vehList,blck_HC_monitoredVehicles]; + //blck_fnc_releaseVehicleToPlayers +{ + /* + Determine state of vehicle + _isEmplaced + _ownerIsPlayer + _allCrewDead + _deleteNow + */ + //diag_log format["_fnc_vehicleMonitor: evaluating vehicle %1",_x]; + _veh = _x; // (purely for clarity at this point, _x could be used just as well) + _isEmplaced = _veh getVariable["GRG_vehType","none"] isEqualTo "emplaced"; + _ownerIsPlayer = if (owner _veh > 2 && !(owner _veh in blck_connectedHCs)) then {true} else {false}; + { + //diag_log format["_fnc_vehicleMonitor: vehicle %1 crew %2 alive = %3",_veh,_x, alive _x]; + }forEach (crew _veh); + _allCrewDead = if (({alive _x} count (crew _veh)) == 0) then {true} else {false}; + //diag_log format["_fnc_vehicleMonitor: _allCrewDead = %1",_allCrewDead]; + _deletenow = false; + if ( (_veh getVariable["blck_DeleteAt",0] > 0) && (diag_tickTime > (_veh getVariable "blck_DeleteAt"))) then {_deleteNow = true}; + _missionCompleted = if (_veh getVariable["missionCompleted",0] != 0) then {true} else {false}; + _evaluate = true; + + if (_ownerIsPlayer) then + { + // disable further monitoring and mark to never be deleted. + _evaluate = false; + _veh setVariable["blck_DeleteAt",0]; + blck_HC_monitoredVehicles = blck_HC_monitoredVehicles - [_veh]; + //diag_log format["_fnc_vehicleMonitor: vehicle %1 now owned by player %2",_veh, owner _veh]; + }; + + if (_allCrewDead && _evaluate) then + { + if (_isEmplaced) then + { + if (blck_killEmptyStaticWeapons) then + { + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];}; + #endif + _veh setDamage 1; + _veh setVariable["blck_DeleteAt",diag_tickTime + 60]; + }else { + [_veh] call blck_fnc_releaseVehicleToPlayers; + }; + _evaluate = false; + } else { + if (blck_killEmptyAIVehicles) then + { + _veh setDamage 0.7; + _veh setVariable["blck_DeleteAt",diag_tickTime + 60]; + } else { + //diag_log format["_fnc_vehicleMonitor:: case of RELEASE where vehicle = %1 and Vehicle is typeOf %2",_veh, typeOf _veh]; + [_veh] call blck_fnc_releaseVehicleToPlayers; + }; + _evaluate = false; + }; + }; + + if (_missionCompleted && !(_allCrewDead)) then + { + //diag_log format["_fnc_vehicleMonitor:: case of mission vehicle with AI alive at mission end: schedule destruction with _veh = %1 and typeOf _veh = %2",_veh, typeOf _veh]; + _cleanupTimer = _veh getVariable["blck_DeleteAt",0]; // The time delete to deleting any alive AI units + if (_cleanupTimer == 0) then {_veh setVariable["blck_DeleteAt",diag_tickTime + blck_vehicleDeleteTimer]}; + _evaluate = false; + }; + + if (_evaluate) then + { + [_veh] call blck_fnc_reloadVehicleAmmo; + }; + + if (_deleteNow) then + { + [_veh] call blck_fnc_destroyVehicleAndCrew; + _evaluate = false; + }; + +}forEach _vehList; + + + diff --git a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HCmonitor.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HCmonitor.sqf index 2310b6c..9dc9531 100644 --- a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HCmonitor.sqf +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HCmonitor.sqf @@ -1,16 +1,38 @@ /* + vehicles = count blck_HC_monitoredVehicles; */ -diag_log "_fnc_HCmonitor.sqf"; +diag_log "_fnc_HC_monitor.sqf"; _blckGroups = 0; _otherGroups = 0; _totalGroups = 0; - + _timerOneSec =0; + _timerSixtySec = 0; + _timer3min = 0; while {true} do { - _blckGroups = {_x getVariable["blck_group",false] && (groupOwner _x isEqualTo clientOwner)} count allGroups; - _totalGroups = {(groupOwner _x) isEqualTo clientOwner} count allGroups; - _totalGroups = _blckGroups + _otherGroups; - diag_log format["blckHC:: headless client %1 at diag_tickTime running %3 fps",clientOwner,diag_tickTime,diag_fps]; - uiSleep 60; + if (diag_tickTime > _timerOneSec) then + { + _timerOneSec = diag_tickTime + 1; + [] call blck_fnc_HC_vehicleMonitor; + }; + if (diag_tickTime > _timerSixtySec) then + { + _timerSixtySec = diag_tickTime + 60; + private _theGroups = blck_HC_monitoredGroups; + { + if (isNull _x) then {blck_HC_monitoredGroups = blck_HC_monitoredGroups - [_x]}; + if ( {alive _x} count (units _x) == 0) then { blck_HC_monitoredGroups = blck_HC_monitoredGroups - [_x]}; + } forEach _theGroups; + //_blckGroups = count blck_HC_monitoredGroups; + //_totalGroups = {(groupOwner _x) isEqualTo clientOwner} count allGroups; + //_totalGroups = _blckGroups + _otherGroups; + //diag_log format["blckHC:: headless client %1 ",_blckGroups,_otherGroups]; + }; + if (diag_tickTime > _timer3min) then + { + _timer3min = diag_tickTime + 300; + diag_log format["blckHC:: headless client %1 | time stamp %2 | %3 fps | _blckGroups = %4 _otherGroups = %5 | vehicles %6",clientOwner,diag_tickTime,diag_fps, count blck_HC_monitoredGroups,{ ((groupOwner _x) isEqualTo clientOwner) && !(_x getVariable["blck_group",true])} count allGroups, count blck_HC_monitoredVehicles ]; + }; + uiSleep 1; }; diff --git a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_onPlayerDisconnected.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_onPlayerDisconnected.sqf index ced4606..38f60a1 100644 --- a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_onPlayerDisconnected.sqf +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_onPlayerDisconnected.sqf @@ -1,10 +1,10 @@ params["_name","_owner"]; -diag_log format["_fnc_onPlayerDisconnected triggered with _name = %1 and _owner = %2",_name,_owner]; +//diag_log format["_fnc_onPlayerDisconnected triggered with _name = %1 and _owner = %2",_name,_owner]; private["_HCownerids","_groupLocalEH","_vehicleLocalEH"]; // Remove the name of the HC from the list of active, connected HCs if (toLower(_name) isEqualTo "headlessclient") then { - diag_log "_fnc_onPlayerDisconnected: a headless client disconnected, time to deal with the damage"; + //diag_log "_fnc_onPlayerDisconnected: a headless client disconnected, time to deal with the damage"; _entities = entities "Headlessclient_F"; _blck_connectedHCs = +blck_connectedHCs; _HCownerids = []; @@ -23,7 +23,7 @@ if (toLower(_name) isEqualTo "headlessclient") then { if !(_x getVariable["owner",0] in _HCownerids) then { - diag_log format["_fnc_onPlayerDisconnected:: reseting eventHandlers for group %1",_x]; + //diag_log format["_fnc_onPlayerDisconnected:: reseting eventHandlers for group %1",_x]; // do any cleanup; at present this is simply removing locally added event handlers _groupLocalEH = _x getVariable["localEH",[]]; private _group = _x; @@ -36,7 +36,7 @@ if (toLower(_name) isEqualTo "headlessclient") then { if !(_x getVariable["owner",0] in _HCownerids) then { - diag_log format["_fnc_onPlayerDisconnected:: reseting eventHandlers for vehicle %1",_x]; + //diag_log format["_fnc_onPlayerDisconnected:: reseting eventHandlers for vehicle %1",_x]; // do any cleanup; at present this is simply removing locally added event handlers _vehicleLocalEH = _x getVariable["localEH",[]]; { diff --git a/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_passToHCs.sqf b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_passToHCs.sqf new file mode 100644 index 0000000..4c56ada --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_passToHCs.sqf @@ -0,0 +1,56 @@ + +//diag_log format["_fnc_passToHCs:: function called at server time %1",diag_tickTime]; +private["_numTransfered","_clientId","_allGroups","_groupsOwned","_idHC","_id","_swap","_rc"]; +blck_connectedHCs = call blck_fnc_HC_getListConnected; +diag_log format["_fnc_passToHCs:: blck_connectedHCs = %1 | count _HCs = %2 | server FPS = %3",blck_connectedHCs,count blck_connectedHCs,diag_fps]; +if ( (count blck_connectedHCs) > 0) then +{ + _idHC = [blck_connectedHCs] call blck_fnc_HC_leastBurdened; + diag_log format["passToHCs: evaluating passTos for HC %1 || owner HC = %2",_idHC, owner _idHC]; + { + // Pass the AI + _numTransfered = 0; + if (_x getVariable["blck_group",false]) then + { + if ((leader _x) != vehicle (leader _x)) then + { + private _v = vehicle (leader _x); + blck_monitoredVehicles = blck_monitoredVehicles - [_v]; + blck_HC_monitoredVehicles pushBack _v; + }; + //diag_log format["group belongs to blckeagls mission system so time to transfer it"]; + if ((typeName _x) isEqualTo "GROUP") then + { + _id = groupOwner _x; + //diag_log format["Owner of group %1 is %2",_x,_id]; + if (_id > 2) then + { + //diag_log format["group %1 is already assigned to an HC with _id of %2",_x,_id]; + _swap = false; + } else { + //diag_log format["group %1 should be moved to HC %2 with _idHC %3",_x,_idHC]; + _x setVariable["owner",owner _idHC]; + _rc = _x setGroupOwner (owner _idHC); + [_x] remoteExec["blck_fnc_HC_XferGroup",_idHC]; + if ( _rc ) then + { + _numTransfered = _numTransfered + 1; + //diag_log format["group %1 transferred to %2",_x, groupOwner _x]; + } else { + //diag_log format["something went wrong with the transfer of group %1",_x]; + }; + }; + }; + } else { + //diag_log format["group %1 does not belong to blckeagls mission system",_x]; + }; + } forEach (allGroups); + //diag_log format["_passToHCs:: %1 groups transferred to HC %2",_numTransfered,_idHC]; + _numTransfered = 0; + // Note : the owner of a vehicle is the owner of the driver so vehicles are automatically transferred to the HC when the group to which the driver is assigned is transferred. + +} else { + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log "_fnc_passToHCs:: No headless clients connected"}; + #endif +}; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf index 15bccd7..fa9eb2f 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf @@ -12,26 +12,30 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - -//private _mission = _this; -//diag_log format["_fnc_addMissionToQue:: -- >> _mission - %1",_mission]; -// 0 1 2 3 4 5 -// [_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange,] -params["_missionList","_path","_marker","_difficulty","_tMin","_tMax",["_noMissions",1],["_allowReinforcements",true]]; - +//params["_missionList","_compiledMission","_compiledMissionsList","_waitTime","_mission","_path","_marker","_difficulty","_tMin","_tMax",["_noMissions",1]]; +params["_missionList","_path","_marker","_difficulty","_tMin","_tMax",["_noMissions",1]]; +private["_compiledMission","_compiledMissionsList"]; +_compiledMissionsList = []; for "_i" from 1 to _noMissions do { - private _waitTime = diag_tickTime + (_tMin) + random((_tMax) - (_tMin)); + _waitTime = diag_tickTime + (_tMin) + random((_tMax) - (_tMin)); // 0 1 2 3 4 5 6 7 8 - private _mission = [_missionList,_path,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0],_allowReinforcements]; - + //_mission = [_missionList,_path,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0],_allowReinforcements]; + { + //diag_log format["_fnc_addMissionToQue: _x = %1",_x]; + _compiledMission = compilefinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\%1\%2.sqf",_path,_x]; + _compiledMissionsList pushBack _compiledMission; + }forEach _missionList; + _mission = [_compiledMissionsList,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]]; #ifdef blck_debugMode - if (blck_debugLevel > 0) then {diag_log format["-fnc_addMissionToQue::-->> _mission = %1",_mission];}; + if (blck_debugLevel >= 2) then { + diag_log format["-fnc_addMissionToQue::-->> _mission = %1",[/*_mission select 0, */_mission select 1, _mission select 2, _mission select 3, _mission select 4, _mission select 5, _mission select 6]]; + }; #endif - + //diag_log format["-fnc_addMissionToQue::-->> _mission = %1",[ _mission select 1, _mission select 2, _mission select 3, _mission select 4, _mission select 5, _mission select 6]]; blck_pendingMissions pushback _mission; }; #ifdef blck_debugMode -if (blck_debugLevel > 1) then {diag_log format["_fnc_addMissionToQue:: -- >> Result - blck_pendingMissions = %1",blck_pendingMissions];}; +if (blck_debugLevel >= 4) then {diag_log format["_fnc_addMissionToQue:: -- >> Result - blck_pendingMissions = %1",blck_pendingMissions];}; #endif \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMapMarker.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMapMarker.sqf new file mode 100644 index 0000000..0e5ca32 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMapMarker.sqf @@ -0,0 +1,43 @@ +/* +Dynamic Loot Crate Spaw System for Exile Mod for Arma 3 +by +Ghostrider [GRG] +for ghostridergaming +4-6-16 + +Spawn a crate on land or in the air + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private["_crate","_light","_beacon","_start","_maxHeight","_bbr","_p1","_p2"]; +params["_crate"]; +//_crate = _this select 0; +_start = diag_tickTime; +// If night, attach a chemlight +_signal = "SmokeShellOrange"; +if (sunOrMoon < 0.2) then +{ + _signal = "FlareYellow_F"; +}; + +_bbr = boundingBoxReal _crate; +_p1 = _bbr select 0; +_p2 = _bbr select 1; +_maxHeight = abs ((_p2 select 2) - (_p1 select 2)); + +while {(diag_tickTime - _start) < 3*60} do +{ + _beacon = _signal createVehicle getPosATL _crate; + _beacon setPos (getPos _crate); + _beacon attachTo [_crate,[0,0,(_maxHeight + 0.05)]]; + uiSleep 30; + deleteVehicle _beacon; +}; +true \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf new file mode 100644 index 0000000..0e5ca32 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf @@ -0,0 +1,43 @@ +/* +Dynamic Loot Crate Spaw System for Exile Mod for Arma 3 +by +Ghostrider [GRG] +for ghostridergaming +4-6-16 + +Spawn a crate on land or in the air + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private["_crate","_light","_beacon","_start","_maxHeight","_bbr","_p1","_p2"]; +params["_crate"]; +//_crate = _this select 0; +_start = diag_tickTime; +// If night, attach a chemlight +_signal = "SmokeShellOrange"; +if (sunOrMoon < 0.2) then +{ + _signal = "FlareYellow_F"; +}; + +_bbr = boundingBoxReal _crate; +_p1 = _bbr select 0; +_p2 = _bbr select 1; +_maxHeight = abs ((_p2 select 2) - (_p1 select 2)); + +while {(diag_tickTime - _start) < 3*60} do +{ + _beacon = _signal createVehicle getPosATL _crate; + _beacon setPos (getPos _crate); + _beacon attachTo [_crate,[0,0,(_maxHeight + 0.05)]]; + uiSleep 30; + deleteVehicle _beacon; +}; +true \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf new file mode 100644 index 0000000..46c187d --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider + + -------------------------- + 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["_crate"]; +private _result = (_x distance (_x getVariable["crateSpawnPos",[0,0,0]])) > 10; +//diag_log format["_fn_crateMoved:: _result = %1",_result]; +_result; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf index daa02cd..301bd0d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf @@ -1,11 +1,8 @@ /* - - [_mines,_objects,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,_isScubaMission] call blck_fnc_endMission; schedules deletion of all remaining alive AI and mission objects. Updates the mission que. Updates mission markers. By Ghostrider GRG - 12/18/17 -------------------------- License @@ -19,18 +16,17 @@ private["_cleanupAliveAITimer","_cleanupCompositionTimer","_isScubaMission"]; _fn_missionCleanup = { params["_mines","_objects","_blck_AllMissionAI","_mission","_cleanupAliveAITimer","_cleanupCompositionTimer",["_isScubaMission",false]]; - [_mines] spawn blck_fnc_clearMines; - //diag_log format["_fnc_endMission: (103) _objects = %1",_objects]; - [_objects, _cleanupCompositionTimer] spawn blck_fnc_addObjToQue; - //diag_log format["_fnc_endMission:: (106) _blck_AllMissionAI = %1",_blck_AllMissionAI]; - [_blck_AllMissionAI, (_cleanupAliveAITimer)] spawn blck_fnc_addLiveAItoQue; + //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; blck_missionsRunning = blck_missionsRunning - 1; + //diag_log format["_fn_missionCleanup: blck_missionsRunning reset to %1", blck_missionsRunning]; blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords]; if !(_isScubaMission) then { blck_recentMissionCoords pushback [_coords,diag_tickTime]; [_mission,"inactive",[0,0,0]] call blck_fnc_updateMissionQue; - //diag_log format["_fnc_endMission:: (109) _mission = %1",_mission]; }; if (_isScubaMission) then { @@ -43,34 +39,39 @@ _fn_missionCleanup = { /////////////////////////////////////////////////////////////////////// // MAIN FUNCTION STARTS HERE ////////////////////////////////////////////////////////////////////// + #ifdef blck_debugMode diag_log format["_fnc_endMission: _this = %1",_this]; - params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_vehicles",[]],["_isScubaMission",false]]; - + #endif + params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_endCondition",0],["_vehicles",[]],["_isScubaMission",false]]; + diag_log format["_fnc_endMission (44): _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _endCondition %4",_blck_localMissionMarker,_coords,_mission,_endCondition]; #ifdef blck_debugMode if (blck_debugLevel > 0) then { - diag_log format["_fnc_endMission: _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _aborted %4",_blck_localMissionMarker,_coords,_mission,_aborted]; - diag_log format["_fnc_endMission: _aborted = %1",_aborted]; + diag_log format["_fnc_endMission: _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _endCondition %4",_blck_localMissionMarker,_coords,_mission,_endCondition]; + diag_log format["_fnc_endMission: _endCondition = %1",_endCondition]; diag_log format["_fnc_endMission: _isScubaMission = %1",_isScubaMission]; diag_log format["_fnc_endMission: prior to running mission end functions -> blck_missionsRunning = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_missionsRunning,blck_dynamicUMS_MissionsRuning]; }; #endif - if (_aborted > 0) exitWith + if (_endCondition > 0) exitWith // Mision aborted for some reason { + diag_log format["_fnc_endMission: mission end condition > 0 | setting all timers to 0"]; #ifdef blck_debugMode if (blck_debugLevel > 0) then { diag_log format["_fnc_endMission: Mission Aborted, setting all timers to 0"]; }; #endif - if (_aborted == 2) then + + if (_endCondition == 2) then { - [["abort",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers; + [["warning",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers; }; + [_blck_localMissionMarker select 0] call blck_fnc_deleteMarker; _cleanupCompositionTimer = 0; _cleanupAliveAITimer = 0; - // params["_mines","_objects","_blck_AllMissionAI","_mission","_cleanupAliveAITimer","_cleanupCompositionTimer",["_isScubaMission",false]]; + [_mines,_objects,_blck_AllMissionAI,_mission,_cleanupAliveAITimer,_cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup; { deleteVehicle _x; @@ -79,8 +80,9 @@ _fn_missionCleanup = { deleteVehicle _x; }forEach _vehicles; }; - if (_aborted == 0) then + if (_endCondition == 0) then // Normal Mission End State { + //diag_log format["_fnc_endMission: mission end condition == 0 | setting all timers to 0"]; private["_cleanupAliveAITimer","_cleanupCompositionTimer"]; if (blck_useSignalEnd) then { @@ -109,7 +111,6 @@ _fn_missionCleanup = { // Using a variable attached to the crate rather than the global setting to be sure we do not fill a crate twice. // the "lootLoaded" loaded should be set to true by the crate filler script so we can use that for our check. { - //diag_log format["_fnc_endMission (82): for crate %1 lootLoaded = %2",_x,_x getVariable["lootLoaded",false]]; if !(_x getVariable["lootLoaded",false]) then { // _crateLoot,_lootCounts are defined above and carry the loot table to be used and the number of items of each category to load @@ -121,7 +122,9 @@ _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 { + #ifdef blck_debugMode diag_log format["_fnc_endMission: setting missionCompleted for vehicle %1 to %2",_x,diag_tickTime]; + #endif (blck_monitoredVehicles select _posnVeh) setVariable ["missionCompleted", diag_tickTime]; } else { _x setVariable ["missionCompleted", diag_tickTime]; @@ -133,4 +136,5 @@ _fn_missionCleanup = { #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 - _aborted \ No newline at end of file + diag_log format["_fnc_endMission (138): after to running mission end functions -> blck_missionsRunning = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_missionsRunning,blck_dynamicUMS_MissionsRuning]; + _endCondition \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf index bc18901..7b7e2ed 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf @@ -2,8 +2,6 @@ /* for ghostridergaming By Ghostrider [GRG] - Copyright 2016 - Last Modified 8-13-17 Fill a crate with items -------------------------- @@ -17,15 +15,22 @@ private["_a1","_item","_diff","_tries"]; params["_crate","_boxLoot","_itemCnts"]; - + //diag_log format["_fnc_fillBoxes: _this = %1",_this]; + #ifdef blck_debugMode + { + diag_log format["_fnc_fillBoxes: _this select %1 = %2",_foreachindex, _this select _foreachindex]; + }foreach _this; + #endif _itemCnts params["_wepCnt","_magCnt","_opticsCnt","_materialsCnt","_itemCnt","_bkcPckCnt"]; _tries = [_wepCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (26): loading %1 weapons",_wepCnt]; if (_tries > 0) then { _a1 = _boxLoot select 0; // choose the subarray of weapons and corresponding magazines // Add some randomly selected weapons and corresponding magazines for "_i" from 1 to _tries do { _item = selectRandom _a1; + //diag_log format["_fnc_fillBoxes: _item = %1",_item]; if (typeName _item isEqualTo "ARRAY") then // Check whether weapon name is part of an array that might also specify an ammo to use { _crate addWeaponCargoGlobal [_item select 0,1]; // if yes then assume the first element in the array is the weapon name @@ -44,56 +49,103 @@ }; }; _tries = [_magCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (26): loading %1 magazines",_magCnt]; if (_tries > 0) then { // Add Magazines, grenades, and 40mm GL shells _a1 = _boxLoot select 1; for "_i" from 1 to _tries do { _item = selectRandom _a1; - _diff = (_item select 2) - (_item select 1); // Take difference between max and min number of items to load and randomize based on this value - _crate addMagazineCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + //diag_log format["_fnc_fillBoxes: _item = %1",_item]; + if (typeName _item isEqualTo "ARRAY") then + { + _diff = (_item select 2) - (_item select 1); // Take difference between max and min number of items to load and randomize based on this value + _crate addMagazineCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + }; + if (typeName _item isEqualTo "STRING") then + { + _crate addMagazineCargoGlobal [_item, 1]; + }; }; }; _tries = [_opticsCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (72): loading %1 weapons",_wepCnt]; if (_tries > 0) then { // Add Optics _a1 = _boxLoot select 2; for "_i" from 1 to _tries do { _item = selectRandom _a1; - _diff = (_item select 2) - (_item select 1); - _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + //diag_log format["_fnc_fillBoxes: _item = %1",_item]; + if (typeName _item isEqualTo "ARRAY") then + { + _diff = (_item select 2) - (_item select 1); + _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + }; + if (typeName _item isEqualTo "STRING") then + { + _crate addItemCargoGlobal [_item,1]; + }; }; }; _tries = [_materialsCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (92): loading %1 materials",_materialsCnt]; if (_tries > 0) then { // Add materials (cindar, mortar, electrical parts etc) _a1 = _boxLoot select 3; for "_i" from 1 to _tries do { _item = selectRandom _a1; - _diff = (_item select 2) - (_item select 1); - _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + //diag_log format["_fnc_fillBoxes: _item = %1",_item]; + if (typeName _item isEqualTo "ARRAY") then + { + _diff = (_item select 2) - (_item select 1); + _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + }; + if (typeName _item isEqualTo "STRING") then + { + _crate addItemCargoGlobal [_item, 1]; + }; }; }; _tries = [_itemCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (112): loading %1 items",_itemCnt]; if (_tries > 0) then { // Add Items (first aid kits, multitool bits, vehicle repair kits, food and drinks) _a1 = _boxLoot select 4; for "_i" from 1 to _tries do { _item = selectRandom _a1; - _diff = (_item select 2) - (_item select 1); - _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + //diag_log format["_fnc_fillBoxes: _item = %1",_item]; + if (typeName _item isEqualTo "ARRAY") then + { + _diff = (_item select 2) - (_item select 1); + _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + }; + if (typeName _item isEqualTo "STRING") then + { + _crate addItemCargoGlobal [_item, 1]; + }; }; }; _tries = [_bkcPckCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (132): loading %1 backpacs",_bkcPckCnt]; if (_tries > 0) then { _a1 = _boxLoot select 5; for "_i" from 1 to _tries do { _item = selectRandom _a1; - _diff = (_item select 2) - (_item select 1); - _crate addbackpackcargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + //diag_log format["_fnc_fillBoxes: _item = %1",_item]; + if (typeName _item isEqualTo "ARRAY") then + { + _diff = (_item select 2) - (_item select 1); + _crate addbackpackcargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; + }; + if (typeName _item isEqualTo "STRING") then + { + _crate addbackpackcargoGlobal [_item, 1]; + }; }; }; + + //diag_log "_fnc_fillBoxes "; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf new file mode 100644 index 0000000..4855358 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf @@ -0,0 +1,15 @@ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private _crate = _this select 0; +#ifdef blck_debugMode +diag_log format["_fnc_loadMisionLootcrate: _this = %1",_this]; +diag_log format["_fnc_loadMisionLootcrate: difficulty = %1", _crate getVariable "difficulty"]; +diag_log format["_fnc_loadMisionLootcrate: lootCounts = %1", _crate getVariable "lootCounts"]; +diag_log format["_fnc_loadMisionLootcrate: lootArray = %1",_crate getVariable "lootArray"]; +#endif +[_crate,(_crate getVariable "lootArray"),(_crate getVariable "lootCounts")] call blck_fnc_fillBoxes; +[_crate, _crate getVariable "difficulty"] call blck_fnc_addMoneyToObject; +_crate setVariable["lootLoaded",true]; + + + + diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index 30ef5a2..81c1007 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -1,8 +1,7 @@ /* - Generic Mission Spawner + Dynamic Mission Spawner (over-ground missions) By Ghostrider GRG Copyright 2016 - Last modified 10/9/17 -------------------------- License @@ -13,9 +12,12 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; #define delayTime 1 -private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups"]; -params["_coords","_mission",["_allowReinforcements",true]]; -//diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements]; +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", + "_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_marker"]; + +params["_coords","_markerClass","_aiDifficultyLevel"]; //////// // set all variables needed for the missions @@ -23,28 +25,95 @@ params["_coords","_mission",["_allowReinforcements",true]]; // Deal with situations where some of these variables might not be defined as well. //////// -// _mission params[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange]; -_markerClass = _mission select 2; -_aiDifficultyLevel = _mission select 3; +// _mission params["OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange]; +//_markerClass = _mission select 0; +// _aiDifficultyLevel = _mission select 1; -[_mission,"active",_coords] call blck_fnc_updateMissionQue; +[_markerClass, "active",_coords] call blck_fnc_updateMissionQue; blck_ActiveMissionCoords pushback _coords; + blck_missionsRunning = blck_missionsRunning + 1; diag_log format["[blckeagls] missionSpawner (17):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; -private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"]; - -if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; -if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +if (isNil "_assetKilledMsg") then {_assetKilledMsg = ""}; +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; //if (isNil "_timeOut") then {_timeOut = -1;}; -if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn"; -if (isNil "_missionPatrolVehicles") then { - //diag_log format["_missionSpawner (44):: _missionPatrolVehicles isNil, Definining it as an empty array"]; - _missionPatrolVehicles = []; - //diag_log format["_missionSpawner (46):: _missionPatrolVehicles is %1",_missionPatrolVehicles]; +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"; +if (isNil "_missionPatrolVehicles") then {_missionPatrolVehicles = []}; +if (isNil "_missionGroups") then {_missionGroups = []}; +if (isNil "_hostageConfig") then {_hostageConfig = []}; +if (isNil "_enemyLeaderConfig") then {_enemyLeaderConfig = []}; +if (isNil "_useMines") then {_useMines = blck_useMines;}; +if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (isNil "_sideArms") then {_sideArms = blck_Pistols}; +if (isNil "_vests") then {_vests = blck_vests}; +if (isNil "_backpacks") then {_backpacks = blck_backpacks}; +//diag_log format["_fnc_missionSpawner: -> blck_backpacks = %1", blck_backpacks]; +//diag_log format["_fnc_missionSpawner: -> _backpacks = %1",_backpacks]; +if (isNil "_uniforms") then {_uniforms = blck_SkinList}; +if (isNil "_headGear") then {_headgear = blck_headgear}; + +if (isNil "_chanceHeliPatrol") then +{ + switch (toLower(_aiDifficultyLevel)) do + { + case "blue": {_chanceHeliPatrol = blck_chanceHeliPatrolBlue}; + case "red": {_chanceHeliPatrol = blck_chanceHeliPatrolRed}; + case "green": {_chanceHeliPatrol = blck_chanceHeliPatrolGreen}; + case "orange": {_chanceHeliPatrol = blck_chanceHeliPatrolOrange}; + default {_chanceHeliPatrol = 0}; + }; }; -if (isNil "_missionGroups") then {_missionGroups = []}; -private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"]; -if (isNil "_useMines") then {_useMines = blck_useMines;}; +if (isNil "_noChoppers") then +{ + switch (toLower(_aiDifficultyLevel)) do + { + case "blue": {_noChoppers = blck_noPatrolHelisBlue}; + case "red": {_noChoppers = blck_noPatrolHelisRed}; + case "green": {_noChoppers = blck_noPatrolHelisGreen}; + case "orange": {_noChoppers = blck_noPatrolHelisOrange}; + default {_noChoppers = 0}; + }; +}; +if (isNil "_chancePara") then +{ + switch (toLower (_aiDifficultyLevel)) do + { + case "blue": {_chancePara = blck_chanceParaBlue}; + case "red": {_chancePara = blck_chanceParaRed}; + case "green": {_chancePara = blck_chanceParaGreen}; + case "orange": {_chancePara = blck_chanceParaOrange}; + default {_chancePara = 0}; + }; +}; +if (isNil "_missionHelis") then +{ + switch (toLower (_aiDifficultyLevel)) do + { + case "blue": {_missionHelis = blck_patrolHelisBlue}; + case "red": {_missionHelis = blck_patrolHelisRed}; + case "green": {_missionHelis = blck_patrolHelisGreen}; + case "orange": {_missionHelis = blck_patrolHelisOrange}; + default {_missionHelis = blck_patrolHelisBlue}; + }; +}; +if (isNil "_noPara") then +{ + switch (toLower (_aiDifficultyLevel)) do + { + case "blue": {_noPara = blck_noParaBlue}; + case "red": {_noPara = blck_noParaRed}; + case "green": {_noPara = blck_noParaGreen}; + case "orange": {_noPara = blck_noParaOrange}; + default {_noPara = 0}; + }; +}; +if (isNil "_chanceLoot") then {_chanceLoot = 1.0}; //0.5}; +if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;}; +if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Red}; +if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed}; _objects = []; _mines = []; @@ -54,8 +123,12 @@ _missionAIVehicles = []; _blck_AllMissionAI = []; _AI_Vehicles = []; _blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType]; -_delayTime = 1; -_groupPatrolRadius = 50; +#define delayTime 1 +//_groupPatrolRadius = 50; + +#ifdef blck_debugMode +diag_log "_missionSpawner: All variables initialized"; +#endif if (blck_labelMapMarkers select 0) then { @@ -69,36 +142,37 @@ 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; -private _marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker; +_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker; #ifdef blck_debugMode -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (77) message players and spawn a mission marker";}; -if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (77) _marker = %1",_marker];}; -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (77) waiting for player to trigger the mission";}; +if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (145) message players and spawn a mission marker";}; +if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (146) _marker = %1",_marker];}; +if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (147) waiting for player to trigger the mission";}; #endif //////// // All parameters are defined, lets wait until a player is nearby or the mission has timed out //////// -private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"]; _missionStartTime = diag_tickTime; _playerInRange = false; _missionTimedOut = false; _wait = true; #ifdef blck_debugMode -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (90) starting mission trigger loop"}; +if (blck_debugLevel > 0) then { + diag_log "missionSpawner:: (90) starting mission trigger loop"}; + diag_log format["missionSpawner (163) blck_MissionTimeout = %1", blck_MissionTimeout]; #endif while {_wait} do { #ifdef blck_debugMode //diag_log "missionSpawner:: top of mission trigger loop"; - if (blck_debugLevel > 2) exitWith {_playerInRange = true;}; + if (blck_debugLevel > 2) exitWith {_playerInRange = true;diag_log "_fnc_missionSpawner (168): player trigger loop triggered by scripting";}; #endif if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; - if ([_missionStartTime] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; + if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; uiSleep 5; #ifdef blck_debugMode @@ -106,33 +180,15 @@ while {_wait} do { diag_log format["missionSpawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords]; diag_log format["missionSpawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers]; - diag_log format["missionSpawner:: Trigger Loop - timeout = %1", [_missionStartTime] call blck_fnc_timedOut]; + diag_log format["missionSpawner:: Trigger Loop - timeout = %1", [_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut]; }; #endif }; if (_missionTimedOut) exitWith { -/* - -*/ - // Deal with the case in which the mission timed out. - //["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers; - blck_recentMissionCoords pushback [_coords,diag_tickTime]; - blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords]; - [_mission,"inactive",[0,0,0]] call blck_fnc_updateMissionQue; - blck_missionsRunning = blck_missionsRunning - 1; - [_blck_localMissionMarker select 0] call blck_fnc_deleteMarker; - //_blck_localMissionMarker set [1,[0,0,0]]; - //_blck_localMissionMarker set [2,""]; - [_objects, 0.1] spawn blck_fnc_cleanupObjects; - - #ifdef blck_debugMode - if (blck_debugLevel > 0) then - { - diag_log format["[blckeagls] missionSpawner:: (133) Mission Timed Out: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; - }; - #endif + diag_log format["_fnc_missionSpawner (187): mission timed out"]; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; }; //////// @@ -141,11 +197,10 @@ if (_missionTimedOut) exitWith #ifdef blck_debugMode if (blck_debugLevel > 0) then { - diag_log format["[blckeagls] missionSpawner:: (142) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + diag_log format["[blckeagls] missionSpawner:: (200) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; }; #endif -private ["_temp"]; if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate { _temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates; @@ -155,65 +210,72 @@ if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crat }; }; -uiSleep _delayTime; +uiSleep delayTime; if (_useMines) then { _mines = [_coords] call blck_fnc_spawnMines; - //uiSleep _delayTime;; + }; -uiSleep _delayTime; +uiSleep delayTime; _temp = []; -//diag_log format["_missionSpawner"" _missionLandscape = %1",_missionLandscape]; + if (_missionLandscapeMode isEqualTo "random") then { _temp = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape; } else { params["_center","_objects"]; _temp = [_coords, _missionLandscape] call blck_fnc_spawnCompositionObjects; - //uiSleep 1; }; if (typeName _temp isEqualTo "ARRAY") then { _objects append _temp; }; -//diag_log format["_fnc_missionSpawner:: (181)->> _objects = %1",_objects]; #ifdef blck_debugMode if (blck_debugLevel > 0) then { - diag_log format["[blckeagls] missionSpawner:: (190) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + diag_log format["[blckeagls] missionSpawner:: (237) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; }; #endif -uiSleep _delayTime;; +uiSleep delayTime;; _temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles; //uisleep 1; _crates append _temp; -uiSleep _delayTime; +uiSleep delayTime; _abort = false; _temp = [[],[],false]; -_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear,_missionGroups] call blck_fnc_spawnMissionAI; + +// params["_coords",_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests",_backpacks,_weapons,sideArms,_isScubaGroup]; +#ifdef blck_debugMode +private _params = [_coords,_minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms]; +{ + diag_log format["_fnc_missionSpawner: _param %1 label %2 = %3",_forEachIndex, _x, _params select _forEachIndex]; +}forEach ["_coords","_minNoAI","_maxNoAI","_missionGroups","_aiDifficultyLevel","_uniforms","_headgear","_vests","_backpacks","_weaponList","_sideArms"]; +#endif + +_temp = [_coords, _minNoAI,_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionAI; #ifdef blck_debugMode if (blck_debugLevel > 2) then { - diag_log format["missionSpawner :: (209) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1; + diag_log format["missionSpawner :: (264) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1; }; _abort = _temp select 1; if (blck_debugLevel > 2) then { - diag_log format["missionSpawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; + diag_log format["missionSpawner :: (269) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; }; #endif if (_abort) exitWith { if (blck_debugLevel > 1) then { - diag_log "missionSpawner:: (220) grpNull returned, mission termination criteria met, calling blck_fnc_endMission" + diag_log "missionSpawner:: (277) grpNull returned, mission termination criteria met, calling blck_fnc_endMission" }; - [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1] call blck_fnc_endMission; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; }; if !(_abort) then { @@ -223,26 +285,42 @@ if !(_abort) then #ifdef blck_debugMode if (blck_debugLevel > 0) then { - diag_log format["[blckeagls] missionSpawner:: (235) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + diag_log format["[blckeagls] missionSpawner:: (288) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; }; #endif -uiSleep _delayTime; +_assetSpawned = objNull; +if !(_hostageConfig isEqualTo []) then +{ + _assetSpawned = [_coords,_hostageConfig] call blck_fnc_spawnHostage; + //diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned]; + _blck_AllMissionAI pushBack _assetSpawned; +}; + +if !(_enemyLeaderConfig isEqualTo []) then +{ + _assetSpawned = [_coords,_enemyLeaderConfig] call blck_fnc_spawnLeader; + //diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned]; + _blck_AllMissionAI pushBack _assetSpawned; +}; + +#ifdef blck_debugMode + if (blck_debugLevel >= 1) then { + diag_log format["_fnc_missionSpawner: _assetSpawned = %1",_assetSpawned]; + }; +#endif + +uiSleep delayTime; _temp = [[],[],false]; _abort = false; -private["_patrolVehicles","_vehToSpawn"]; + _vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange; -//diag_log format["_missionSpawner:: _vehToSpawn = %1",_vehToSpawn]; -//diag_log format["_missionSpawner (245):: _missionPatrolVehicles = %1",_missionPatrolVehicles]; if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then { - _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_missionPatrolVehicles] call blck_fnc_spawnMissionVehiclePatrols; - //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; - #ifdef blck_debugMode - if (blck_debugLevel > 1) then { - diag_log format["missionSpawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; - }; - #endif + #define useRelativePos true + //params[_coords,_noVehiclePatrols,_aiDifficultyLevel,_missionPatrolVehicles,_useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms, _isScubaGroup]; + //_temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_missionPatrolVehicles] call blck_fnc_spawnMissionVehiclePatrols; + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionVehiclePatrols; if (typeName _temp isEqualTo "ARRAY") then { @@ -252,271 +330,331 @@ if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles { _patrolVehicles = _temp select 0; _blck_AllMissionAI append (_temp select 1); - - #ifdef blck_debugMode - if (blck_debugLevel > 0) then - { - diag_log format["[blckeagls] missionSpawner:: (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 "missionSpawner:: (279) grpNull returned, mission termination criteria met, calling blck_endMission"; - }; - #endif - - [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1] call blck_fnc_endMission; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; }; -uiSleep _delayTime; +uiSleep delayTime; _temp = [[],[],false]; _abort = false; -if (_allowReinforcements) then -{ - _weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout; - _temp = []; +// Deal with helicopter patrols +_temp = []; - #ifdef blck_debugMode - if (blck_debugLevel > 1) then - { - diag_log format["[blckeagls] missionSpawner:: (298) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; - }; - #endif - private _noChoppers = 0; - private _chancePara = 0.5; - switch (toLower _aiDifficultyLevel) do - { - case "blue":{ - _noChoppers = [blck_noPatrolHelisBlue] call blck_fnc_getNumberFromRange; - _chancePara = [blck_chanceParaBlue] call blck_fnc_getNumberFromRange; - }; - case "red":{ - _noChoppers = [blck_noPatrolHelisRed] call blck_fnc_getNumberFromRange; - _chancePara = [blck_chanceParaRed] call blck_fnc_getNumberFromRange; - }; - case "green":{ - _noChoppers = [blck_noPatrolHelisGreen] call blck_fnc_getNumberFromRange; - _chancePara = [blck_chanceParaGreen] call blck_fnc_getNumberFromRange; - }; - case "orange":{ - _noChoppers = [blck_noPatrolHelisOrange] call blck_fnc_getNumberFromRange; - _chancePara = [blck_chanceParaOrange] call blck_fnc_getNumberFromRange; - }; - }; - #ifdef blck_debugMode - diag_log format["_missionSpawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]; - #endif +#ifdef blck_debugMode +if (blck_debugLevel > 1) then +{ + diag_log format["[blckeagls] missionSpawner:: (351) calling in heli patrol: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange; +//_noPara = [_noPara] call blck_fnc_getNumberFromRange; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["_missionSpawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]}; +#endif +if (_noChoppers > 0) then +{ for "_i" from 1 to (_noChoppers) do { - //params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"]; - - _temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear,_chancePara] call blck_fnc_spawnMissionReinforcements; + if (random(1) < _chanceHeliPatrol) then + { + //_temp = [_coords,_missionHelis,spawnHeli,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionReinforcements; + _temp = [_coords,_aiDifficultyLevel,_missionHelis,_uniforms,_headGear,_vests,_backpacks,"none",_weaponList, _sideArms] call blck_fnc_spawnMissionHeli; - #ifdef blck_debugMode - if (blck_debugLevel >= 2) then - { - diag_log format["missionSpawner(334):: blck_fnc_spawnMissionReinforcements call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers]; - diag_log format["missionSpawner(335):: _temp = %1",_temp]; - }; - #endif - - 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 - { - #ifdef blck_debugMode - if (blck_debugLevel > 2) then + if (typeName _temp isEqualTo "ARRAY") then { - diag_log "missionSpawner:: (349) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission"; + _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; }; - #endif - _objects pushback (_temp select 0); - [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1] call blck_fnc_endMission; }; }; }; + + ////////////////////////// // 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["missionSpawner:: (361) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];}; +if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (389) 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["_missionSpawner:: _noEmplacedToSpawn = %1",_vehToSpawn]; +//diag_log format["_fnc_missionSpawner: -> _noEmplacedToSpawn = %1 | blck_useStatic = %2",_noEmplacedToSpawn,blck_useStatic]; if (blck_useStatic && (_noEmplacedToSpawn > 0)) then { - // params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; - _temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; - - #ifdef blck_debugMode - if (blck_debugLevel > 2) then - { - diag_log format ["missionSpawner:: (375) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp]; - }; - #endif + // _params = ["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms"]; + // _temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; + _temp = [_coords,_missionEmplacedWeapons,useRelativePos,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray; if (typeName _temp isEqualTo "ARRAY") then { _abort = _temp select 2; }; - #ifdef blck_debugMode - if (blck_debugLevel > 2) then - { - diag_log format ["missionSpawner:: (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] missionSpawner:: (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 + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; +}; +uiSleep delayTime; +if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then +{ + if (count _missionLootBoxes > 0) then { - diag_log "missionSpawner:: (410) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission"; + _crates = [_coords,_missionLootBoxes,_loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + } + else + { + _crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + }; - #endif - [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1] call blck_fnc_endMission; + if (blck_cleanUpLootChests) then + { + _objects append _crates; + }; +}; +if (_noPara > 0 && (random(1) < _chancePara) && _paraTriggerDistance == 0) then +{ + diag_log format["_fnc_missionSpawner (436): spawning %1 paraunits at mission spawn",_noPara]; + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _blck_AllMissionAI append (units _paratroops); + }; + if (random(1) < _chanceLoot) then + { + diag_log format["_fnc_missionSpawner (446): spawning supplemental loot with _chanceLoot = %1",_chanceLoot]; + private _extraCrates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_paraLoot,_paraLootCounts]], "atMissionSpawn","atMissionStartAir", "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + if (blck_cleanUpLootChests) then + { + _objects append _extraCrates; + }; + }; }; -uiSleep _delayTime; -if (count _missionLootBoxes > 0) then -{ - _crates = [_coords,_missionLootBoxes,_loadCratesTiming] call blck_fnc_spawnMissionCrates; -} -else -{ - _crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming] call blck_fnc_spawnMissionCrates; - -}; - -if (blck_cleanUpLootChests) then -{ - _objects append _crates; -}; - -#ifdef blck_debugMode -if (blck_debugLevel > 0) then -{ - diag_log format["[blckeagls] missionSpawner:: (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"]; +// Define Triggers for mission end +private["_missionComplete","_endIfPlayerNear","_endIfAIKilled","_secureAsset","_crateStolen","_locations"]; _missionComplete = -1; _startTime = diag_tickTime; +switch (_endCondition) do +{ + case "playerNear": {_secureAsset = false; _endIfPlayerNear = true;_endIfAIKilled = false;}; + case "allUnitsKilled": {_secureAsset = false; _endIfPlayerNear = false;_endIfAIKilled = true;}; + case "allKilledOrPlayerNear": {_secureAsset = false; _endIfPlayerNear = true;_endIfAIKilled = true;}; + case "assetSecured": {_secureAsset = true; _endIfPlayerNear = false; _endIfAIKilled = false;}; +}; +//diag_log format["_fnc_missionSpawner: _secureAsset = %1",_secureAsset]; if (blck_showCountAliveAI) then { - //diag_log format["_missionSpawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName]; - //diag_log format["_missionSpawner(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["_missionSpawner: blck_missionMarkers = %1",blck_missionMarkers]; }; }; -switch (_endCondition) do -{ - case "playerNear": {_endIfPlayerNear = true;_endIfAIKilled = false;}; - case "allUnitsKilled": {_endIfPlayerNear = false;_endIfAIKilled = true;}; - case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;}; -}; -#ifdef blck_debugMode -diag_log format["missionSpawner :: (449) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled]; -#endif -private["_locations"]; + +_crateStolen = false; _locations = [_coords]; +private _spawnPara = if (random(1) < _chancePara) then {true} else {false}; { _locations pushback (getPos _x); _x setVariable["crateSpawnPos", (getPos _x)]; } forEach _crates; -#ifdef blck_debugMode -diag_log format["missionSpawner (458):: _coords = %1 | _crates = %2 | _locations = %3",_coords,_crates,_locations]; -#endif -private _crateStolen = false; -#ifdef blck_debugMode -diag_log format["missionSpawner(462):: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled]; -#endif -_fn_crateMoved = { - params["_crate"]; - private _result = (_x distance (_x getVariable["crateSpawnPos",[0,0,0]])) > 10; - //diag_log format["_fn_crateMoved:: _result = %1",_result]; - _result; -}; + +private["_thresholdPercentageKilled","_result","_minPercentageKilled"]; +_thresholdPercentageKilled = (1-blck_killPercentage); while {_missionComplete isEqualTo -1} do { - //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180}; - if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {}; - if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1) exitWith {}; - + #ifdef blck_debugMode + if (blck_debugLevel > 2) exitWith {uiSleep blck_triggerLoopCompleteTime;diag_log "_missionSpawner (492) scripted Mission End blck_debugLevel = 3";}; + #endif + if (_endIfPlayerNear) then + { + if ([_locations,20,true] call blck_fnc_playerInRangeArray) then {_missionComplete = 1}; + }; + + if (_endIfAIKilled) then + { + _result = [_blck_AllMissionAI,1] call blck_fnc_countAliveAI; + // _result is an array of [no alive, total spawned]; + //private _noneAlive = if (_result select 0 isEqualTo 0) then {true} else {false}; + //private _aiCountBelowThreshold = if ( (_result select 0)/(_result select 1) < _thresholdPercentageKilled) then {true} else {false}; + //diag_log format["_fnc_missionSpawner: _noneAlive = %1 | _result = %2 | PercentageKilled = %3",_noneAlive,_result,(_result select 0)/(_result select 1)]; + if ((_result select 0) < 1 || ((_result select 0)/(_result select 1)) < _thresholdPercentageKilled ) then {_missionComplete = 1}; + }; + if (_spawnCratesTiming isEqualTo "atMissionSpawn") then { - if ({[_x] call _fn_crateMoved} count _crates > 0) exitWith { - _missionComplete = 1; - _crateStolen = true; + if ({[_x] call blck_fnc_crateMoved} count _crates > 0) exitWith + { + _missionComplete = 1; + _crateStolen = true; + }; + }forEach _crates; + }; + if (_secureAsset) then + { + if !(alive _assetSpawned) then + { + _missionComplete = 1 + } else { + //if (_assetSpawned getVariable["blck_AIState",0] > 0 && (({alive _x} count _blck_AllMissionAI) isEqualTo 1)) then {_missionComplete = 1}; + _result = [_blck_AllMissionAI, 1] call blck_fnc_countAliveAI; + // _result is an array of [no alive, total spawned]; + //private _noneAlive = if (_result select 0 isEqualTo 0) then {true} else {false}; + //private _aiCountBelowThreshold = if ((_result select 0)/(_result select 1) < _thresholdPercentageKilled) then {true} else {false}; + //diag_log format["_fnc_missionSpawner: _noneAlive = %1 | _result = %2 | PercentageKilled = %3",_noneAlive,_result,(_result select 0)/(_result select 1)]; + if (((_result select 0)/(_result select 1)) < 0.18) then + { + if (_assetSpawned getVariable["blck_unguarded",0] isEqualTo 0) then {_assetSpawned setVariable["blck_unguarded",1,true]}; + if ((_assetSpawned getVariable["blck_AIState",0] > 0)) then { + _missionComplete = 1: + _assetSpawned allowdamage false; + }; + }; }; - }forEach _crates; - //diag_log format["missionSpawner:: (483) missionCompleteLoop - > players near = %1 and ai alive = %2 and crates stolen = %3",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI, _crateStolen]; - uiSleep 4; + }; + if (_spawnPara) then + { + + if ([_coords,_paraTriggerDistance,true] call blck_fnc_playerInRange) then + { + _spawnPara = false; // The player gets one try to spawn these. + if (random(1) < _chancePara) then // + { + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _blck_AllMissionAI append (units _paratroops); + }; + if (random(1) < _chanceLoot) then + { + private _extraCrates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_paraLoot,_paraLootCounts]], "atMissionSpawn","atMissionStartAir", "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + if (blck_cleanUpLootChests) then + { + _objects append _extraCrates; + }; + }; + }; + }; + }; + uiSleep 1; }; + if (_crateStolen) exitWith { - diag_log format["missionSpawner:: (491) Crate Stolen Callening _fnc_endMission - > players near = %1 and ai alive = %2 and crates stolen = %3",[_locations,10,true] call blck_fnc_playerInRangeArray, {alive _x} count _blck_AllMissionAI, _crateStolen]; - [_mines,_objects,_crates, _blck_AllMissionAI,"Crate Removed from Mission Site Before Mission Completion: Mission Aborted",_blck_localMissionMarker,_coords,_mission,2] call blck_fnc_endMission; + diag_log format["missionSpawner:: (542) Crate Stolen Callening _fnc_endMission - > players near = %1 and ai alive = %2 and crates stolen = %3",[_locations,10,true] call blck_fnc_playerInRangeArray, {alive _x} count _blck_AllMissionAI, _crateStolen]; + [_mines,_objects,_crates, _blck_AllMissionAI,"Crate Removed from Mission Site Before Mission Completion: Mission Aborted",_blck_localMissionMarker,_coords,_markerClass, 2] call blck_fnc_endMission; }; + +if ((_secureAsset) && !(alive _assetSpawned)) exitWith +{ + [_mines,_objects,_crates, _blck_AllMissionAI,_assetKilledMsg,_blck_localMissionMarker,_coords,_markerClass, 2] call blck_fnc_endMission; +}; + +if (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then +{ + if (count _missionLootBoxes > 0) then + { + _crates = [_coords,_missionLootBoxes,_loadCratesTiming,_spawnCratesTiming, "end", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + } + else + { + _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_missionSpawner (531): _crates = %1", _crates]}; + #endif + + if (blck_cleanUpLootChests) then + { + _objects append _crates; + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log format["[blckeagls] missionSpawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]}; + #endif +}; + +if (_spawnCratesTiming isEqualTo "atMissionSpawnGround" && _loadCratesTiming isEqualTo "atMissionCompletion") then +{ + { + [_x] call blck_fnc_loadMissionCrate; + } forEach _crates; +}; + #ifdef blck_debugMode if (blck_debugLevel > 0) then { - diag_log format["[blckeagls] missionSpawner:: (496) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; - diag_log format["missionSpawner :: (497) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled]; - diag_log format["[blckeagls] missionSpawner:: (498) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + diag_log format["[blckeagls] missionSpawner:: (586) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + diag_log format["missionSpawner :: (587) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled]; + diag_log format["[blckeagls] missionSpawner:: (588) 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]; if (blck_showCountAliveAI) then { _marker setMarkerText format["%1: All AI Dead",_markerMissionName]; - // blck_missionMarkers pushBack [_marker, _markerMissionName, _blck_AllMissionAI]; { if ((_x select 1) isEqualTo _markerMissionName) exitWith{blck_missionMarkers deleteAt _forEachIndex}; }forEach blck_missionMarkers; }; -_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,0] call blck_fnc_endMission; +//diag_log format["_fnc_missionSpawner (557) Build 123: _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]]; -diag_log format["[blckeagls] missionSpawner:: (507)end of mission: blck_fnc_endMission has returned control to _fnc_missionSpawner"]; +if (_assetSpawned getVariable["assetType",0] isEqualTo 1) then +{ + //diag_log "Processing Mission End for Hostage Rescue"; + _assetSpawned setCaptive false; + _assetSpawned setVariable["GMSAnimations",[""],true]; + [_assetSpawned,""] remoteExec["switchMove",-2];; + uiSleep 0.1; + _assetSpawned enableAI "ALL"; + private _newPos = (getPos _assetSpawned) getPos [1000, random(360)]; + //diag_log format["processing domove for hostage with current pos = %1 and new pos = %2",getPos _assetSpawned, _newPos]; + (group _assetSpawned) setCurrentWaypoint [group _assetSpawned, 0]; + [group _assetSpawned,0] setWaypointPosition [_newPos,0]; + [group _assetSpawned,0] setWaypointType "MOVE"; +}; +if (_assetSpawned getVariable["assetType",0] isEqualTo 2) then +{ + //diag_log format["Processing Mission End for Arrest of Leader %1 with endAnimation %2",_assetSpawned,_assetSpawned getVariable["endAnimation",""]]; + [_assetSpawned,""] remoteExec["switchMove",-2]; + _assetSpawned setVariable["GMSAnimations",_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]],true]; + [_assetSpawned,selectRandom(_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]])] remoteExec["switchMove",-2]; +}; + +//diag_log format["_fnc_missionSpawner (579) Build 123: _secureAsset = %1 | {alive _assetSpawned} = %2 | assetType = %3",_secureAsset,alive _assetSpawned, _assetSpawned getVariable["assetType",-1]]; + +_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 0] call blck_fnc_endMission; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then {diag_log format["[blckeagls] missionSpawner:: (507)end of mission: blck_fnc_endMission has returned control to _fnc_missionSpawner"]}; +#endif +//diag_log format["_fnc_missionSpawner (643) Mission Completed | _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +blck_missionsRun = blck_missionsRun + 1; +diag_log format["_fnc_missionSpawner (644): Total Dyanamic Land and UMS Run = %1", blck_missionsRun]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_paraDropObject.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_paraDropObject.sqf new file mode 100644 index 0000000..6f9fb5e --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_paraDropObject.sqf @@ -0,0 +1,24 @@ +/* + for ghostridergaming + 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","_crate",["_crateVisualMarker",true],["_dropHeight", 150]]; +private _chute = createVehicle ["I_Parachute_02_F", _pos, [], 0, "FLY"]; +[_chute] call blck_fnc_protectVehicle; +_crate setVariable["chute",_chute]; +_chute setPos [getPos _chute select 0, getPos _chute select 1, _dropHeight]; +_crate setPos (getPos _chute); +_crate attachTo [_chute, [0,0,0]]; +if (_crateVisualMarker) then {[_crate] spawn blck_fnc_crateMarker}; + diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects - Copy.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects - Copy.sqf deleted file mode 100644 index 23c5277..0000000 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects - Copy.sqf +++ /dev/null @@ -1,49 +0,0 @@ -/* - Spawn objects from an array using offsects from a central location. - The code provided by M3Editor EDEN has been addapted to add checks for vehicles, should they be present. - Returns an array of spawned objects. - version of 10/13/17 - - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; - -params["_center","_objects"]; -if (count _center == 2) then {_center pushBack 0}; -//diag_log format["_spawnBaseObjects:: -> _objects = %1",_objects]; -private ["_newObjs"]; - -_newObjs = []; - -{ - //diag_log format["_fnc_spawnBaseObjects::-->> _x = %1",_x]; - private _obj = (_x select 0) createVehicle [0,0,0]; - //diag_log format["_fnc_spawnBaseObjects: _obj = %1",_obj]; - _newObjs pushback _obj; - //diag_log format["_fnc_spawnBaseObjects: _center = %1 and _x select 1 = %2",_center,_x select 1]; - private _spawnPos = (_center vectorAdd (_x select 1)); - if (surfaceIsWater _spawnPos) then - { - _obj setPosASL _spawnPos; - //diag_log "_fnc_spawnBaseObjects: detected surface == water"; - } else { - _obj setPosATL _spawnPos; - //diag_log "_fnc_spawnBaseObjects: detected surface = Land"; - }; - _obj setDir (_x select 2); - _obj enableDynamicSimulation true; - _obj allowDamage true; - // Lock any vehicles placed as part of the mission landscape. Note that vehicles that can be taken by players can be added via the mission template. - if ( (typeOf _obj) isKindOf "LandVehicle" || (typeOf _obj) isKindOf "Air" || (typeOf _obj) isKindOf "Sea") then - { - [_obj] call blck_fnc_configureMissionVehicle; - }; -} forEach _objects; -//diag_log format["_fnc_spawnBaseObjects: _newObjs = 51",_newObjs]; -_newObjs - diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf index 72cb429..d069c65 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf @@ -16,7 +16,7 @@ params["_center","_objects"]; if (count _center == 2) then {_center pushBack 0}; //diag_log format["_spawnBaseObjects:: -> _objects = %1",_objects]; -private ["_newObjs","_simDam"]; +private ["_newObjs","_simDam","_obj","_spawnPos"]; _newObjs = []; // Assume that the list of objects to spawn has each object defined using one of two methods where parameters for simulation and damage are optional with default settings. @@ -32,11 +32,11 @@ _newObjs = []; { _simDam = _x select 3; }; - private _obj = (_x select 0) createVehicle [0,0,0]; + _obj = (_x select 0) createVehicle [0,0,0]; //diag_log format["_fnc_spawnBaseObjects: _obj = %1",_obj]; _newObjs pushback _obj; //diag_log format["_fnc_spawnBaseObjects: _center = %1 and _x select 1 = %2",_center,_x select 1]; - private _spawnPos = (_center vectorAdd (_x select 1)); + _spawnPos = (_center vectorAdd (_x select 1)); if (surfaceIsWater _spawnPos) then { _obj setPosASL _spawnPos; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate - Copy.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate - Copy.sqf new file mode 100644 index 0000000..8232b18 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate - Copy.sqf @@ -0,0 +1,47 @@ +/* + spawn a crate at a specific location + returns the object (crate) that was created. + for ghostridergaming + By Ghostrider [GRG] + Copyright 2016 + Last updated 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 ["_crate"]; +params["_coords",["_crateType","Box_NATO_Wps_F"]]; + +_crate = createVehicle [_crateType,_coords,[], 0, "CAN_COLLIDE"]; +_crate setVariable ["LAST_CHECK", 100000]; +_crate allowDamage false; +_crate enableRopeAttach false; +[_crate] call blck_fnc_emptyObject; +_crate setPosATL _coords; +_crate setVectorUp [0,0,0]; +if ((_coords select 2) < 0 || surfaceIsWater (_coords)) then +{ + + private["_lantern","_bbr","_p1","_p2","_maxHeight"]; + //_lantern = createVehicle ["PortableHelipadLight_01_red_F", [0,0,0],[],0,"CAN_COLLIDE"];// Land_Camping_Light_F + //_lantern enableSimulationGlobal true; + //_lantern switchLight "on"; + _light = "#lightpoint" createVehicle (getPos _crate); + _light setLightDayLight true; + _light setLightBrightness 1.0; + _light setLightAmbient [0.0, 1.0, 0.0]; + _light setLightColor [0.0, 1.0, 0.0]; + _bbr = boundingBoxReal _crate; + _p1 = _bbr select 0; + _p2 = _bbr select 1; + _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); + //diag_log format["_fnc_spawnCrate: _bbr = %1 | _maxHeight = %2",_bbr,_maxHeight]; + _light attachTo [_crate, [0,0,(_maxHeight + 0.5)]]; +}; +_crate; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf index e7c7693..4ca34cb 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf @@ -13,8 +13,16 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; -//diag_log format["_fnc_spawnEmplacedWeaponArray:: _this = %1",_this]; +params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]]; +#ifdef blck_debugMode +if (blck_debugLevel >=2) then +{ + private _params = ["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms"]; + { + diag_log format["blck_fnc_spawnEmplacedWeaponArray:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex]; + }forEach _this; +}; +#endif private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode","_useRelativePos","_useRelativePos"]; _emplacedWeps = []; @@ -30,7 +38,6 @@ _pos = []; // Define _missionEmplacedWeapons if not already configured. if (_missionEmplacedWeapons isEqualTo []) then { - _useRelativePos = false; _missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius; #ifdef blck_debugMode if (blck_debugLevel > 1) then @@ -44,9 +51,8 @@ if (_missionEmplacedWeapons isEqualTo []) then _missionEmplacedWeapons pushback [_static,_x]; //diag_log format["_fnc_spawnEmplacedWeaponArray: _mi updated to %1",_missionEmplacedWeapons]; } forEach _missionEmplacedWeaponPositions; -} else { - _useRelativePos = true; -};; + _useRelativePos = false; +}; #ifdef blck_debugMode if (blck_debugLevel > 1) then @@ -69,9 +75,14 @@ if (blck_debugLevel > 1) then diag_log format["_fnc_spawnEmplacedWeaponArray(67):: _coords = %1 | offset = %2 | final _pos = %3",_coords,_x select 1, _pos]; }; #endif + #define configureWaypoints false + #define minAI 1 + #define maxAI 1 + #define minDist 1 + #define maxDist 2 - // params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ]; - _empGroup = [_pos,1,1,_aiDifficultyLevel,(_x select 1),1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; + /// // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ]; + _empGroup = [(_x select 1),_pos,minAI,maxAI,_aiDifficultyLevel,minDist,maxDist,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnGroup; _empGroup setcombatmode "RED"; _empGroup setBehaviour "COMBAT"; @@ -86,7 +97,7 @@ if (blck_debugLevel > 1) then #endif // params["_vehType","_pos",["_clearInventory",true]]; - _wep = [(_x select 0),[0,0,0],false] call blck_fnc_spawnVehicle; + _wep = [(_x select 0),[0,0,0],false,true] call blck_fnc_spawnVehicle; //_wep addEventHandler["HandleDamage",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}]; _wep addMPEventHandler["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}]; _empGroup setVariable["groupVehicle",_wep]; @@ -98,7 +109,7 @@ if (blck_debugLevel > 1) then }; #endif - _wep setVariable["DBD_vehType","emplaced"]; + _wep setVariable["GRG_vehType","emplaced"]; _wep setPos _pos; [_wep,false] call blck_fnc_configureMissionVehicle; _emplacedWeps pushback _wep; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf index 256d858..d84ba3d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf @@ -1,14 +1,7 @@ /* blck_fnc_spawnMissionAI by Ghostrider [GRG] - 8/13/17 - [_coords, // center of the area within which to spawn AI - _minNoAI, // minimum number of AI to spawn - _maxNoAI, // Max number of AI to spawn - _aiDifficultyLevel, // AI level [blue, red, etc] - _uniforms, // Uniforms to use - note default is blck_sSkinList - _headGear // headgear to use - blck_BanditHeager is the default - ] call blck_fnc_spawnMissionAI + returns an array of the units spawned -------------------------- @@ -19,22 +12,30 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#define configureWaypoints true + +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]]; #ifdef blck_debugMode if (blck_debugLevel >=2) then { - diag_log format["_fnc_spawnMissionAI: _this = %1",_this]; + private _params = ["_coords","_minNoAI","_maxNoAI","_missionGroups","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weapons","_sideArms","_isScubaGroup"]; { - diag_log format["_fnc_spawnMissionAI:: _this select %1 = %2",_forEachIndex,_x]; + diag_log format["_fnc_spawnMissionAI:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex]; }forEach _this; }; #endif -// [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,_scubaGroupParameters,blck_UMS_weapons,blck_UMS_vests,isScubaGroup] -params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],"_missionGroups",["_weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]]; -private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAI","_abort"]; + +private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAI","_abort","_return","_adjusttedGroupSize","_minDist","_maxDist"]; +_unitsToSpawn = 0; +_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); +}; _blck_AllMissionAI = []; _abort = false; if (count _weapons == 0) then @@ -49,11 +50,11 @@ if (blck_debugLevel >= 2) then #endif if ( (count _missionGroups > 0) && _noAIGroups > 0) then { - { //[[-98.9121,-35.9824,-1.20243],5,7,"Green",5,12],[[1,-1,-1],"red",4, 5,10] + { _x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; _groupSpawnPos = _coords vectorAdd _position; - // params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true],["_weaponList",[]],["_vests",blck_vests],["_scuba",false] ]; - _newGroup = [_groupSpawnPos,_minAI,_maxAI,_skillLevel,_coords,_minPatrolRadius,_maxPatrolRadius,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; + + _newGroup = [_groupSpawnPos,_coords,_minAI,_maxAI,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; #ifdef blck_debugMode if (blck_debugLevel >= 2) then @@ -84,21 +85,21 @@ if ( (count _missionGroups > 0) && _noAIGroups > 0) then }; if (_missionGroups isEqualTo [] && _noAIGroups > 0) then { + private _minPatrolRadius = blck_minimumPatrolRadius; + private _maxPatrolRadius = blck_maximumPatrolRadius; + switch (_noAIGroups) do { case 1: { // spawn the group near the mission center #ifdef blck_debugMode - //params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true],["_weaponList",[]],["_vests",blck_vests],["_scuba",false] ]; if (blck_debugLevel >= 2) then { diag_log format["missionSpawner: Spawning Groups: _noAIGroups=1"]; }; #endif - _minDist = 20; - _maxDist = 35; - _newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; + _newGroup = [_coords,_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; #ifdef blck_debugMode if (blck_debugLevel >= 2) then { @@ -133,11 +134,8 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then diag_log format["_fnc_spawnMissionAI(47): Spawning Groups: _noAIGroups=2"]; // spawn groups on either side of the mission area }; #endif - _minDist = 20; - _maxDist = 35; _groupLocations = [_coords,_noAIGroups,15,30] call blck_fnc_findPositionsAlongARadius; { - private["_adjusttedGroupSize"]; if (_ResidualUnits > 0) then { _adjusttedGroupSize = _unitsPerGroup + _ResidualUnits; @@ -145,8 +143,7 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then } else { _adjusttedGroupSize = _unitsPerGroup; }; - _newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; - + _newGroup = [_x,_coords,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; if (isNull _newGroup) then { _abort = true; @@ -175,10 +172,7 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then diag_log format["_fnc_spawnMissionAI (68): Spawning Groups: _noAIGroups=3"]; }; #endif - _minDist = 20; - _maxDist = 35; - _newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; - + _newGroup = [_coords,_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; if (isNull _newGroup) then { _abort = true; @@ -198,7 +192,7 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then _groupLocations = [_coords,2,20,35] call blck_fnc_findPositionsAlongARadius; { - _newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; + _newGroup = [_x,_coords,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; if (isNull _newGroup) then { _abort = true; @@ -224,11 +218,11 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then #ifdef blck_debugMode if (blck_debugLevel >= 2) then { - diag_log format["_fnc_spawnMissionAI (88): case 4:"]; + diag_log format["_fnc_spawnMissionAI (88): default:"]; }; #endif - _newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; + _newGroup = [_coords,_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; if (isNull _newGroup) then { _abort = true; @@ -245,9 +239,7 @@ if (_missionGroups isEqualTo [] && _noAIGroups > 0) then _blck_AllMissionAI append _newAI; _groupLocations = [_coords,(_noAIGroups - 1),20,40] call blck_fnc_findPositionsAlongARadius; { - _minDist = 20; - _maxDist = 35; - _newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; + _newGroup = [_x,_coords,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; if (isNull _newGroup) then { _abort = true; @@ -274,6 +266,5 @@ if (blck_debugLevel >= 1) then }; #endif -private["_return"]; _return = [_blck_AllMissionAI,_abort]; _return diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf index 02981f4..9cacf21 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf @@ -1,8 +1,6 @@ /* - Spawn some crates using an array containing crate types and their offsets relative to a reference position and prevent their cleanup. By Ghostrider [GRG] - Copyright 2016 - Last updated 3-20-17 + Copyright 2018 -------------------------- License @@ -13,40 +11,101 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private ["_objs","_pos","_offset"]; -params[ ["_coords", [0,0,0]], ["_crates",[]], ["_loadCrateTiming","atMissionSpawn"] ]; +private ["_cratesSpawned","_pos","_crate"]; +params[ ["_coords", [0,0,0]], ["_cratesToSpawn",[]], ["_loadCrateTiming","atMissionSpawn"],["_spawnCrateTiming","atMissionSpawn"],["_missionState","start"], ["_difficulty","red"] ]; + +#ifdef blck_debugMode +if (blck_debugLevel >= 2) then +{ + private _params = ["_coords","_cratesToSpawn","_loadCrateTiming","_spawnCrateTiming","_missionState","_difficulty"]; + { + diag_log format["_fnc_spawnMissionCrates: %1 = %2 with _foreachindex = %3",_params select _foreachindex, _this select _foreachindex, _foreachindex]; + }forEach _this; +}; +#endif //diag_log format["_fnc_spawnMissionLootcrates: _this = %1",_this]; + if ((count _coords) == 2) then // assume only X and Y offsets are provided { _coords pushback 0;; // calculate the world coordinates }; -_objs = []; +_cratesSpawned = []; + { _x params["_crateType","_crateOffset","_lootArray","_lootCounts"]; //_pos = [(_coords select 0)+(_crateOffset select 0),(_coords select 1) + (_crateOffset select 1),(_coords select 2)+(_crateOffset select 2)]; // calculate the world coordinates - + private _xParams = ["_crateType","_crateOffset","_lootArray","_lootCounts"]; + { + private _item = _x; + //diag_log format["_fnc_spawnMissionCrates: _cratesToSpawn Loop| %1 = %2",_foreachindex, _item select _foreachindex]; + }forEach _x; _pos = _coords vectorAdd _crateOffset; _crate = [_pos,_crateType] call blck_fnc_spawnCrate; - _objs pushback _crate; + _crate setVariable["lootArray",_lootArray]; + _crate setVariable["lootCounts",_lootCounts]; + _crate setVariable["difficulty",_difficulty]; + if (_loadCrateTiming isEqualTo "atMissionSpawn" || _missionState isEqualTo "end") then + { + //diag_log format["_fnc_spawnMissionCrates: calling blck_fnc_loadMissionCrate for _crate = %1",_crate]; + [_crate] call blck_fnc_loadMissionCrate; + }; + _cratesSpawned pushback _crate; #ifdef blck_debugMode - if (blck_debugLevel > 1) then + if (blck_debugLevel >= 2) then { diag_log format["_fnc_spawnMissionCrates: _crateType = %1 | _crateOffset = %2 | _lootArray = %3 | _lootCounts = %4",_crateType,_crateOffset,_lootArray,_lootCounts]; _marker = createMarker [format["crateMarker%1",random(1000000)], _pos]; _marker setMarkerType "mil_triangle"; - _marker setMarkerColor "colorGreen"; + _marker setMarkerColor "colorGreen"; + _crate setVariable["crateMarker",_marker]; }; #endif - if (_loadCrateTiming isEqualTo "atMissionSpawn") then - { - //diag_log format["_fnc_spawnMissionCrates::-> loading loot at mission spawn for crate %1",_x]; - [_crate,_lootArray,_lootCounts] call blck_fnc_fillBoxes; - _crate setVariable["lootLoaded",true]; - } - else - { - //diag_log format["_fnc_spawnMissionCrates::-> not loading crate loot at this time for crate %1",_x]; - }; -}forEach _crates; +}forEach _cratesToSpawn; -_objs +_fnc_dropMissionCrates = { + private ["_crates","_marker","_markers","_blck_localMissionMarker","_location","_airborneCrates","_curPosCrate"]; + _crates = _this select 0; + _markers = []; + + { + // params["_pos","_crate",["_crateVisualMarker",true],["_dropHeight", 150]]; + [(getPos _x), _x, true, 150] call blck_fnc_paraDropObject; + } forEach _crates; + + _airborneCrates = _crates; + while {count _airborneCrates > 0} do + { + uiSleep 1; + { + // (((getPos _crate) select 2) < 3) + if ((getPos _x) select 2 < 5) then + { + _airborneCrates = _airborneCrates - [_x]; + _chute = _x getVariable["chute",objNull]; + detach _x; + deleteVehicle _chute; + _location = getPos _x; + _blck_localMissionMarker = [format["crateMarker%1%2",_location select 0, _location select 1],_location,"","","ColorBlack",["mil_dot",[]]]; + _marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker; + _markers pushBack _marker; + uiSleep 0.5; + _curPosCrate = getPos _x; + _x setPos [_curPosCrate select 0, _curPosCrate select 1, 0.3]; + //_x setVectorDirAndUp[[0,1,0],[0,0,1]]; + }; + } forEach _crates; + }; + + uisleep 300; + + { + deleteMarker _x; + }forEach _markers +}; + +if (_spawnCrateTiming in ["atMissionEndAir","atMissionStartAir"]) then +{ + [_cratesSpawned] spawn _fnc_dropMissionCrates; +}; + +_cratesSpawned diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf index 8c370ca..b0731fd 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf @@ -1,8 +1,6 @@ /* - [_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles; - returns _vehs, an array of vehicles spawned. - by Ghostridere-DbD- - 3/20/17 + by Ghostridere-GRG- + Copyright 2016 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionParatroops.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionParatroops.sqf new file mode 100644 index 0000000..a5cc262 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionParatroops.sqf @@ -0,0 +1,53 @@ +/* + Author: Ghostrider [GRG] + Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP + License: Attribution-NonCommercial-ShareAlike 4.0 International + 3/17/17 + + This is basically a container that determines whether a paragroop group should be created and if so creates a group and passes it off to the routine that spawns the paratroops. + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_coords",["_grpParatroops",grpNull],"_skillAI","_noPara",["_uniforms",blck_SkinList],["_headGear",blck_headgearList],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weapons",[]],["_sideArms",blck_Pistols],["_isScuba",false]]; +#ifdef blck_debugMode +if (blck_debugLevel >=2) then +{ + private _params = ["_coords","_skillAI","_chancePara","_uniforms","_headGear","_vests","_backpacks","_weapons","_sideArms","_grpParatroops","_heli"]; + { + diag_log format["_fnc_spawnMissionParatroops:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex]; + }forEach _this; +}; + +private["_grpParatroops","_chanceParatroops","_aborted","_return"]; + +_skillAI = toLower _skillAI; +_aborted = false; + +_grpParatroops = createGroup blck_AI_Side; + //params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]]; + _aborted = [_coords,_grpParatroops,_noPara,_skillAI,_weapons,_uniforms,_headGear,_heli] call blck_fnc_spawnParaUnits; + diag_log format["_fnc_spawnMissionParatroops: blck_fnc_spawnParaUnits returned a value of %1",_aborted]; +}; +#ifdef blck_debugMode +diag_log format["_fnc_spawnMissionParatroops: _aborted = %1",_aborted]; +#endif +if (_aborted) then +{ + _return = [[],true]; +} else { + _return = [(units _grpParatroops),false]; +}; + +#ifdef blck_debugMode +diag_log format["_fnc_spawnMissionParatroops:-> _return = %1 | _abort = %2",_return,_aborted]; +#endif + +_return + diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf index d6179f4..58aa4ae 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf @@ -1,5 +1,5 @@ /* - [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionVehiclePatrols + blck_fnc_spawnMissionVehiclePatrols by Ghostrider [GRG] 3/17/17 returns [] if no groups could be created @@ -13,18 +13,20 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - -params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true],["_weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]]; -if (count _weapons == 0) then {_weapons = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +// 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] ]; +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]]; +if (count _weaponList == 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; #ifdef blck_debugMode -if (blck_debugLevel > 1) then +if (blck_debugLevel >=2) then { - diag_log format["_fnc_spawnMissionVehiclePatrols: _this = %1",_this]; - diag_log format["_fnc_spawnMissionVehiclePatrols:: _coords = %1 | _noVehiclePatrols = %2 | _aiDifficultyLevel = %3",_coords,_noVehiclePatrols,_aiDifficultyLevel]; + private _params = ["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles","_useRelativePos","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms","_isScubaGroup"]; + { + diag_log format["_fnc_spawnMissionVehiclePatrols:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex]; + }forEach _this; }; #endif -private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_vehicle","_return","_abort"]; +private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_vehicle","_return","_abort","_spawnPos","_v"]; _vehicles = []; _missionAI = []; _abort = false; @@ -34,13 +36,12 @@ if (_missionPatrolVehicles isEqualTo []) then _useRelativePos = false; _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius; { - //private _v = selectRandom blck_AIPatrolVehicles; - private _v = [_aiDifficultyLevel] call blck_fnc_selectPatrolVehicle; + _v = [_aiDifficultyLevel] call blck_fnc_selectPatrolVehicle; //diag_log format["_fnc_spawnMissionVehiclePatrols (36):: position = %1 and vehicle = %2",_x, _v]; _missionPatrolVehicles pushBack [_v, _x]; }forEach _vehiclePatrolSpawns; }; - +#define configureWaypoints false { #ifdef blck_debugMode if (blck_debugLevel > 1) then @@ -48,7 +49,7 @@ if (_missionPatrolVehicles isEqualTo []) then diag_log format["_fnc_spawnMissionVehiclePatrols:: _x = %1 and _coords = %2",_x,_coords]; }; #endif - private ["_spawnPos"]; + if (_useRelativePos) then { _spawnPos = _coords vectorAdd (_x select 1) @@ -56,8 +57,8 @@ if (_missionPatrolVehicles isEqualTo []) then _spawnPos = _x select 1; }; _vehicle = _x select 0; - - _vehGroup = [_spawnPos,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear,false,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; + // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ]; + _vehGroup = [_spawnPos,_coords,3,3,_aiDifficultyLevel,1,2,false,_uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; if (isNull _vehGroup) exitWith { _abort = true; @@ -84,7 +85,7 @@ if (_missionPatrolVehicles isEqualTo []) then #endif //params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]]; - _patrolVehicle = [_coords,_spawnPos,_vehicle,30,45,_vehGroup] call blck_fnc_spawnVehiclePatrol; + _patrolVehicle = [_coords,_spawnPos,_vehicle,30,45,_vehGroup,true] call blck_fnc_spawnVehiclePatrol; _vehGroup setVariable["groupVehicle",_vehicle]; #ifdef blck_debugMode if (blck_debugLevel > 1) then diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf index 04b9a06..8cdebd8 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf @@ -16,53 +16,63 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; #ifdef blck_debugMode -if (blck_debugLevel > 0) then { - diag_log format["_fnc_spawnPendingMissions:: blck_pendingMissions = %1", blck_pendingMissions]; +if (blck_debugLevel >= 2) then { + diag_log format["_fnc_spawnPendingMissions:: count blck_pendingMissions = %1", count blck_pendingMissions]; }; #endif if (blck_missionsRunning >= blck_maxSpawnedMissions) exitWith { #ifdef blck_debugMode - if (blck_debugLevel > 0) then { + if (blck_debugLevel > 2) then { diag_log "_fnc_spawnPendingMissions:: --- >> Maximum number of missions is running; function exited without attempting to find a new mission to spawn"; }; #endif }; -private["_coords","_missionName","_missionPath","_search","_readyToSpawnQue","_missionToSpawn","_allowReinforcements"]; +private["_coords","_compiledMission","_search","_readyToSpawnQue","_missionToSpawn","_allowReinforcements"]; _readyToSpawnQue = []; -{ - if ( (diag_tickTime > (_x select 6)) && ((_x select 6) > 0) ) then +{ // 0 1 2 3 3 5 6 + // _mission = [_compiledMissionsList,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]]; + //diag_log format["_fnc_spawnPendingMissions: diag_tickTime %6 _marker %1 _difficulty %2 _tMin %3 _tMax %4 _waitTime %5",_x select 1, _x select 2, _x select 3, _x select 4, _x select 5, diag_tickTime]; + if ( (diag_tickTime > (_x select 5)) && ((_x select 5) > 0) ) then { _readyToSpawnQue pushback _x; + //diag_log format["_fnc_spawnPendingMissions: adding mission with _marker %1 _difficulty %2",_x select 1, _x select 2]; + //diag_log format["_fnc_spawnPendingMissions: count _readyToSpawnQue = %1",count _readyToSpawnQue]; }; } forEach blck_pendingMissions; #ifdef blck_debugMode -if (blck_debugLevel > 0) then +if (blck_debugLevel > 2) then { - diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue = %1",_readyToSpawnQue]; + diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue diag_tickTime %6 _marker %1 _difficulty %2 _tMin %3 _tMax %4 _waitTime %5",_readyToSpawnQue select 1, _readyToSpawnQue select 2, _readyToSpawnQue select 3, _readyToSpawnQue select 4, _readyToSpawnQue select 5, diag_tickTime]; }; #endif +//diag_log format["_fnc_spawnPendingMissions: count _readyToSpawnQue = %1", count _readyToSpawnQue]; if (count _readyToSpawnQue > 0) then { _missionToSpawn = selectRandom _readyToSpawnQue; #ifdef blck_debugMode - if (blck_debugLevel > 0) then { - diag_log format["_fnc_spawnPendingMissions:: -- >> blck_missionsRunning = %1 and blck_maxSpawnedMissions = %2 so _canSpawn = %3",blck_missionsRunning,blck_maxSpawnedMissions, (blck_maxSpawnedMissions - blck_missionsRunning)]; - }; + if (blck_debugLevel > 2) then + { + if (_foreachindex > 0) then {diag_log format["_fnc_spawnPendingMissions: _missionToSpawn %1 = %2",_foreachindex, _missionToSpawn select _foreachindex]}; + }; + }forEach _missionToSpawn; #endif _coords = [] call blck_fnc_FindSafePosn; _coords pushback 0; - _missionName = selectRandom (_missionToSpawn select 0); - _missionPath = _missionToSpawn select 1; - _allowReinforcements = _missionToSpawn select 8; - //[_coords,_missionToSpawn,_allowReinforcements] execVM format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName]; - [_coords,_missionToSpawn,_allowReinforcements] spawn compileFinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName]; - blck_missionsRunning = blck_missionsRunning + 1; + _compiledMission = selectRandom (_missionToSpawn select 0); + // _mission = [_compiledMissionsList,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]]; + _missionMarker = _missionToSpawn select 1; + _missionDifficulty = _missionToSpawn select 2; + //diag_log format["_fnc_spawnPendingMissions: _missionMarker %1",_missionMarker]; + //diag_log format["_fnc_spawnPendingMissions: _missionDifficulty %1",_missionDifficulty]; + //diag_log format["_fnc_spawnPendingMissions: _compiledMission %1",_compiledMission]; + [_coords,_missionMarker,_missionDifficulty] spawn _compiledMission; + //diag_log format["_fnc_spawnPendingMissions: blck_missionsRunning = %1", blck_missionsRunning]; }; true diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf index ba0f5c1..bdc238d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf @@ -1,7 +1,6 @@ /* spawn a group of objects in random locations aligned with the radial from the center of the region to the object. By Ghostrider [GRG] - Last modified 1/22/17 copyright 2016 -------------------------- @@ -14,9 +13,10 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; params["_coords","_missionLandscape",["_min",3],["_max",15],["_nearest",1]]; -private["_objects"]; +private["_objects","_wreck","_dir","_dirOffset"]; _objects = []; - +_wreck = createVehicle ["Flag_AAF_F", _coords, [], 25, "NONE"]; +_objects pushBack _wreck; { //Random Position Objects based on distance in array // https://community.bistudio.com/wiki/BIS_fnc_findSafePos @@ -26,10 +26,6 @@ _objects = []; _wreck enableSimulation false; _wreck enableSimulationGlobal false; _wreck enableDynamicSimulation false; - _wreck setVariable ["LAST_CHECK", (diag_tickTime + 100000)]; - - private["_dir","_dirOffset"]; - _dirOffset = random(30) * ([1,-1] call BIS_fnc_selectRandom); _dir = _dirOffset +([_wreck,_coords] call BIS_fnc_dirTo); _wreck setDir _dir; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf index 944da00..3718ae4 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf @@ -14,14 +14,20 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; params["_mission","_status",["_coords",[0,0,0]] ]; - +// _mission is the name used to identify the marker associated with that particular mission. it is a unique identifier. #ifdef blck_debugMode if (blck_debugLevel > 0) then {diag_log format["_fnc_updateMissionQue :: _mission = %1 | _status = %2 | _coords = %3",_mission,_status,_coords];}; #endif - +_index = -1; private["_index","_element","_waitTime"]; - -_index = blck_pendingMissions find _mission; +{ + if (_mission isEqualTo (_x select 1)) exitWith + { + _index = _forEachIndex; + //diag_log format["_fnc_updateMissionQue: match found at _forEachIndex %1 for _mission with _x = %2",_forEachIndex,_x select 1]; + }; +}forEach blck_pendingMissions; +//_index = blck_pendingMissions find _mission; if (_index > -1) then { #ifdef blck_debugMode @@ -33,16 +39,17 @@ if (_index > -1) then #ifdef blck_debugMode if (blck_debuglevel > 0) then {diag_log format["_fnc_updateMissionQue:: -- >> _element before update = %1",_element];}; #endif - + // 0 1 2 3 4 5 6 + //_mission = [_missionList,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]]; if (toLower(_status) isEqualTo "active") then { - _element set[6, -1]; - _element set[7,_coords]; + _element set[5, -1]; + _element set[6,_coords]; }; if (toLower(_status) isEqualTo "inactive") then { - _waitTime = (_element select 4) + random((_element select 5) - (_element select 4)); - _element set[6, diag_tickTime + _waitTime]; - _element set [7,[0,0,0]]; + _waitTime = (_element select 3) + random((_element select 4) - (_element select 3)); + _element set[5, diag_tickTime + _waitTime]; + _element set [6,[0,0,0]]; }; #ifdef blck_debugMode diff --git a/@GMS/addons/custom_server/Compiles/Reinforcements/GMS_fnc_spawnParaCrate.sqf b/@GMS/addons/custom_server/Compiles/Reinforcements/GMS_fnc_spawnParaCrate.sqf index e7d04e0..8681e55 100644 --- a/@GMS/addons/custom_server/Compiles/Reinforcements/GMS_fnc_spawnParaCrate.sqf +++ b/@GMS/addons/custom_server/Compiles/Reinforcements/GMS_fnc_spawnParaCrate.sqf @@ -12,13 +12,13 @@ params["_supplyHeli","_lootCounts"]; -private ["_chute","_crate"]; +private ["_chute","_crate","_crateSelected","_dir","_offset"]; _crate = ""; _chute = ""; diag_log "_fnc_spawnParaCrate:: spawning crate"; -private["_dir","_offset"]; + _dir = getDir _supplyHeli; _dir = if (_dir < 180) then {_dir + 210} else {_dir - 210}; _offset = _supplyHeli getPos [10, _dir]; @@ -31,7 +31,6 @@ _chute setPos [_offset select 0, _offset select 1, 100 ]; //(_offset select 2) diag_log format["_fnc_spawnParaCrate:: chute spawned yielding object %1 at postion %2", _chute, getPos _chute]; //create the parachute and crate -private["_crateSelected"]; _crateSelected = selectRandom["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_IND_AmmoVeh_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F"]; _crate = [getPos _chute, _crateSelected] call blck_fnc_spawnCrate; //_crate = createVehicle [_crateSelected, position _chute, [], 0, "CAN_COLLIDE"]; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf index 2eef01d..9963218 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf @@ -9,7 +9,9 @@ */ if (isServer) then { - diag_log format["_EH_AHit: _this = %1",_this]; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then {diag_log format["_EH_AHit: _this = %1",_this]}; + #endif _this remoteExec["blck_fnc_processAIHit",2]; }; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddGroup.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_animDone.sqf similarity index 68% rename from @GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddGroup.sqf rename to @GMS/addons/custom_server/Compiles/Units/GMS_EH_animDone.sqf index cc6c594..82299bf 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_animDone.sqf @@ -1,14 +1,16 @@ /* + by Ghostrider + -------------------------- 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/ + 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]; -true \ No newline at end of file +_this call blck_fnc_nextAnim; + + + diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf index 450839a..099109b 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf @@ -4,11 +4,10 @@ */ params["_group"]; -private["_nearestGroup","_modType"]; +private["_nearestGroup"]; -_modType = call blck_fnc_getModType; -if (_modType == "Epoch") then {_units = _group nearEntities ["I_Soldier_EPOCH", 100]}; -if (_modType == "Exile") then (_units = _group nearEntities ["i_g_soldier_unarmed_f", 100]}; +if (blck_modType == "Epoch") then {_units = _group nearEntities ["I_Soldier_EPOCH", 100]}; +if (blck_modType == "Exile") then (_units = _group nearEntities ["i_g_soldier_unarmed_f", 100]}; _nearestGroup = group _units select 0; { if (group _x != _group && _x distance (leader _group) < ((leader _nearestGroup) distance (leader _group))) then {_nearestGroup = group _x}; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf index b904443..5e841cd 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf @@ -51,7 +51,7 @@ for "_i" from 1 to (count blck_liveMissionAI) do if ((alive _x) && !(isNull objectParent _x)) then // mark the vehicle for deletion { //diag_log format["_fnc_cleanupAliveAI: deleteing objectParent %1 [%3] for unit %2",objectParent _x, _x, typeName (objectParent _x), typeOf (objectParent _x)]; - [objectParent _x] call blck_fn_deleteAIvehicle; + [objectParent _x] call blck_fnc_deleteAIvehicle; }; [_x] call blck_fnc_deleteAI; }forEach (_units select 0); diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf index 402aae7..3d70ec4 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf @@ -22,7 +22,7 @@ params["_unit"]; { _unit removeAllMPEventHandlers _x; } forEach ["MPKilled","MPHit"]; -private _group = (group _unit); +_group = (group _unit); [_unit] joinSilent grpNull; deleteVehicle _unit; if (count units _group isEqualTo 0) then diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddAircraft.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_nextAnim.sqf similarity index 63% rename from @GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddAircraft.sqf rename to @GMS/addons/custom_server/Compiles/Units/GMS_fnc_nextAnim.sqf index bcc5eef..6b0d9e7 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddAircraft.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_nextAnim.sqf @@ -1,14 +1,16 @@ /* + by Ghostrider + -------------------------- 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/ + http://creativecommons.org/licenses/by-nc-sa/4.0/ */ - #include "\q\addons\custom_server\Configs\blck_defines.hpp"; +(_this select 0) switchMove selectRandom (_unit getVariable["GMSAnimations",[]]); + + + -params["_aircraftPatrol"]; -blck_sm_Aircraft pushBack [_aircraftPatrol,grpNull,0]; -true diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf index e0109ea..924029b 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf @@ -12,46 +12,46 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -diag_log format["_fnc_processAIHit::-->> _this = %1",_this]; -if (isServer) then -{ - private ["_unit","_instigator","_group","_wp"]; - _unit = _this select 0 select 0; - _instigator = _this select 0 select 3; +private ["_unit","_instigator","_group","_wp"]; +_unit = _this select 0 select 0; +_instigator = _this select 0 select 3; + +#ifdef blck_debugMode +if (blck_debugLevel >= 2) then +{ + diag_log format["_fnc_processAIHit::-->> _this = %1",_this]; + diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit]; +}; +#endif + +if (!(alive _unit)) exitWith {[_unit, _instigator] call blck_fnc_processAIKill}; +if (damage _unit > 0.95) exitWith {_unit setDamage 1.2; [_unit, _instigator] call blck_fnc_processAIKill}; + +if (!(isPlayer _instigator)) exitWith {}; +[_unit,_instigator] call blck_fnc_alertGroupUnits; +[_instigator] call blck_fnc_alertNearbyVehicles; +_group = group _unit; +//_group setBehavior "COMBAT"; +_wp = [_group, currentWaypoint _group]; +_wp setWaypointBehaviour "COMBAT"; +_group setCombatMode "RED"; +_wp setWaypointCombatMode "RED"; + +if (_unit getVariable ["hasHealed",false]) exitWith {}; +if ((damage _unit) > 0.1 ) then +{ #ifdef blck_debugMode if (blck_debugLevel >= 2) then { - diag_log format["_fnc_processAIHit::-->> _this = %1",_this]; - diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit]; - }; - #endif - - if (!(alive _unit)) exitWith {}; - if (!(isPlayer _instigator)) exitWith {}; - [_unit,_instigator] call blck_fnc_alertGroupUnits; - [_instigator] call blck_fnc_alertNearbyVehicles; - _group = group _unit; - //_group setBehavior "COMBAT"; - _wp = [_group, currentWaypoint _group]; - _wp setWaypointBehaviour "COMBAT"; - _group setCombatMode "RED"; - _wp setWaypointCombatMode "RED"; - - if (_unit getVariable ["hasHealed",false]) exitWith {}; - if ((damage _unit) > 0.1 ) then - { - #ifdef blck_debugMode - if (blck_debugLevel >= 2) then - { - diag_log format["_EH_AIHit::-->> Healing unit %1",_unit]; - }; - _unit setVariable["hasHealed",true,true]; - _unit addMagazine "SmokeShellOrange"; - _unit fire "SmokeShellMuzzle"; - _unit addItem "FAK"; - _unit action ["HealSoldierSelf", _unit]; - _unit setDamage 0; - _unit removeItem "FAK"; + diag_log format["_EH_AIHit::-->> Healing unit %1",_unit]; }; + _unit setVariable["hasHealed",true,true]; + _unit addMagazine "SmokeShellOrange"; + _unit fire "SmokeShellMuzzle"; + _unit addItem "FAK"; + _unit action ["HealSoldierSelf", _unit]; + _unit setDamage 0; + _unit removeItem "FAK"; }; + diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf index 27ca0f2..5c8bc29 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf @@ -14,9 +14,26 @@ private["_group","_isLegal","_weapon","_lastkill","_kills","_message","_killstreakMsg"]; params["_unit","_killer","_isLegal"]; + +// if blck_cleanupAt > 0 then the death was already processed. +if (_unit getVariable["blck_cleanupAt",-1] > 0) exitWith {}; + //diag_log format["_fnc_processAIKills:: function called with _this = %1",_this]; _unit setVariable ["blck_cleanupAt", (diag_tickTime) + blck_bodyCleanUpTimer, true]; - +//diag_log format["_fnc_processAIKills: _unit = %1 | vehicle unit = %2",_unit, vehicle _unit]; +/* +if (_unit != (vehicle _unit) then +{ + diag_log format["_fnc_processAIKills: evaluating status of crew of vehicle %1",vehicle _unit] + if ( {alive _x} count (crew (vehicle _unit)) < 1) then + { + diag_log format["_fnc_processAIKills: all crew dead, releasing vehicle"]; + [vehicle _unit] call blck_fnc_releaseVehicleToPlayers; + } else { + diag_log format["_fnc_processAIKills: vehicle %1 still has %2 crew alive",vehicle _unit, {alive _x} crew (vehicle _unit)]; + }; +}; +*/ blck_deadAI pushback _unit; _group = group _unit; [_unit] joinSilent grpNull; @@ -48,6 +65,8 @@ if ((diag_tickTime - _lastkill) < 240) then _killer setVariable["blck_kills",0]; }; +_unit action ["Eject", vehicle _unit]; + if (blck_useKillMessages) then { _weapon = currentWeapon _killer; @@ -63,6 +82,7 @@ if (blck_useKillMessages) then //diag_log format["[blck] unit killed message is %1",_message,""]; [["aikilled",_message,"victory"],playableUnits] call blck_fnc_messageplayers; }; + [_unit,_killer] call blck_fnc_rewardKiller; if (blck_showCountAliveAI) then { diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf index 8d3c0d6..0bec3ce 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf @@ -12,7 +12,9 @@ private["_missionType","_wasRunover","_launcher","_legal"]; params["_unit","_killer"]; -diag_log format["##-processIlleagalAIKills.sqf-## processing illeagal kills for unit %1",_unit]; +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["##-processIlleagalAIKills.sqf-## processing illeagal kills for unit %1",_unit]}; +#endif _launcher = _unit getVariable ["Launcher",""]; _legal = true; @@ -77,18 +79,19 @@ if ( blck_VK_GunnerDamage ) then else { if ((currentWeapon _killer) in blck_forbidenVehicleGuns) then { _legal = false;}; }; - #ifdef blck_debugMode - if (blck_debugLevel > 2) then - { - diag_log format["!!---!! Unit was killed by a forbidden vehicle or gun",_unit]; - }; - #endif + if (blck_VK_Gear) then {[_unit] call _fn_deleteAIGear;}; if !(_legal) then { [_unit, vehicle _killer] call _fn_targetVehicle; [vehicle _killer] call _fn_applyVehicleDamage; [_killer] call _fn_msgIED; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["!!---!! Unit was killed by a forbidden vehicle or gun",_unit]; + }; + #endif }; }; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf index e818124..beafa5c 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_rewardKiller.sqf @@ -16,13 +16,12 @@ params["_unit","_killer"]; //diag_log format["rewardKiller:: _unit = %1 and _killer %2",_unit,_killer]; -private["_modType","_reward","_maxReward","_dist","_killstreakReward","_distanceBonus","_newKillerScore","_newKillerFrags","_money"]; -_modType = call blck_fnc_getModType; +private["_reward","_maxReward","_dist","_killstreakReward","_distanceBonus","_newKillerScore","_newKillerFrags","_money"]; //diag_log format["[blckeagles] rewardKiller:: - _modType = %1",_modType]; //if (_modType isEqualTo "Epoch") exitWith {}; // Have players pull crypto from AI bodies now that this feature is available. -if (_modType isEqualTo "Epoch") then +if (blck_modType isEqualTo "Epoch") then { //diag_log "calculating reward for Epoch"; @@ -63,7 +62,7 @@ _player setVariable ["ExileTemperature", _data select 44]; _player setVariable ["ExileWetness", _data select 45]; */ -if (_modType isEqualTo "Exile") then +if (blck_modType isEqualTo "Exile") then { private["_distanceBonus","_overallRespectChange","_newKillerScore","_newKillerFrags","_maxReward","_money","_message"]; /* diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf new file mode 100644 index 0000000..a1a6d02 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf @@ -0,0 +1,56 @@ +/* + by Ghostrider + + -------------------------- + 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","_charConfigs"]; +private["_char","_charGroup"]; +_charConfigs params["_classname","_posn","_dir","_simDamg","_animations","_headgear","_uniforms"]; + +#ifdef blck_debugMode +{ + diag_log format["_fnc_spawnchar: _forEachIndex = %1 | _x = %2",_forEachIndex,_x]; +}forEach _charConfigs; +diag_log format["_fnc_spawnchar: _this = %1",_this]; +diag_log format["_fnc_spawnchar _classname = %1 | _posn = %2 | _dir = %3 | _animations = %4",_classname,_posn,_dir,_animations]; +#endif + +_charGroup = createGroup [blck_AI_Side, true]; +_char = _charGroup createUnit [_classname,[0,0,0], [], 0, "NONE"]; +_char setCaptive true; +if (count _headgear > 0) then +{ + _char addHeadgear (selectRandom(_headgear)); +}; +if (count _uniforms > 0) then +{ + _char forceAddUniform selectRandom(_uniforms); +}; +_posn = (_coords vectorAdd _posn); +_char setPos [_posn select 0, _posn select 1, 0]; + +#ifdef blck_debugMode +diag_log format["_fnc_spawnchar _char = %1 at Position = %2 | _coords = %3",_char, getPos _char,_coords]; +#endif + +if (blck_modType isEqualTo "Epoch") then {_char setVariable ["LAST_CHECK",28800,true]}; +_char setPos (_posn); +_char setDir (_dir); +removeAllWeapons _char; +_char setVariable ["BIS_enableRandomization", false]; +_char setVariable ["BIS_fnc_animalBehaviour_disable", true]; +_char disableAI "ALL"; +_char enableAI "ANIM"; +_char enableAI "MOVE"; +_char allowDamage true; +_char enableSimulationGlobal true; +_char setVariable["GMSAnimations",_animations,true]; +_char setUnitPos "UP"; + +_char \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf new file mode 100644 index 0000000..7b11760 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf @@ -0,0 +1,26 @@ +/* + by Ghostrider + + -------------------------- + 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","_hostageConfigs"]; +private["_hostageGroup","_hostage"]; +_hostage = [_coords,_hostageConfigs] call blck_fnc_spawnCharacter; +_hostage remoteExec["GMS_fnc_initHostage", -2, true]; +_hostage setVariable["assetType",1,true]; +/* +private _marker = createMarker [format["hostageMarger%1",getPos _hostage], getPos _hostage]; +_marker setMarkerColor "ColorBlack"; +_marker setMarkerType "mil_dot"; +_marker setMarkerText "Hostage"; +*/ +_hostage + + diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf new file mode 100644 index 0000000..418cf8a --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf @@ -0,0 +1,27 @@ +/* + by Ghostrider + + -------------------------- + 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","_leaderConfigs"]; +private["_leader"]; +_leader = [_coords, _leaderConfigs] call blck_fnc_spawnCharacter; +_leader remoteExec["GMS_fnc_initLeader", -2, true]; +_leader setVariable["assetType",2,true]; +_leader setVariable["endAnimation",["Acts_CivilShocked_1"],true]; +/* +private _marker = createMarker [format["hostageMarger%1",getPos _leader], getPos _leader]; +_marker setMarkerColor "ColorBlack"; +_marker setMarkerType "mil_dot"; +_marker setMarkerText "Hostage"; +*/ +_leader + + diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf new file mode 100644 index 0000000..5eafb0e --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf @@ -0,0 +1,62 @@ +/* + Author: Ghostrider [GRG] + Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP + License: Attribution-NonCommercial-ShareAlike 4.0 International + 3/17/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ + -------------------------- + 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","_numAI","_skillAI",["_uniforms",blck_SkinList],["_headGear",blck_headgearList],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weapons",[]],["_sideArms",blck_Pistols],["_isScuba",false]]; +private["_arc","_dir","_spawnPos","_chute","_unit","_return","_paraGroup"]; +private _params = ["_pos","_numAI","_skillAI"]; +{ + diag_log format["_fnc_spawnParaUnits: %1 = %2",_x, _this select _forEachIndex]; +}forEach _params; +_paraGroup = call blck_fnc_create_AI_Group; +//diag_log format["_fnc_spawnParaUnits: _paraGroup = %1",_paraGroup]; +// [_pos,_minDist,_maxDist,_groupSpawned,"random","SAD"] spawn blck_fnc_setupWaypoints; +[_pos,20,30,_paraGroup,"random","SAD","paraUnits"] call blck_fnc_setupWaypoints; + +#define launcherType "none" +private ["_arc","_spawnPos"]; +_arc = 45; +_dir = 0; + +for "_i" from 1 to _numAI do +{ + _spawnPos = _pos getPos[1,_dir]; + _chute = createVehicle ["Steerable_Parachute_F", [_spawnPos select 0, _spawnPos select 1, 250], [], 0, "FLY"]; + [_chute] call blck_fnc_protectVehicle; + // ["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]]; + _unit = [getPos _chute,_paraGroup,_skillAI,_uniforms,_headGear,_vests,_backpacks,launcherType,_weapons] call blck_fnc_spawnUnit; + + #ifdef blck_debugMode + diag_log format["_fnc_spawnParaUnits: unit %1 = %2 dropping in chute %3",_i,_unit,_chute]; + #endif + + //_chute setPos [_spawnPos select 0, _spawnPos select 1, 125]; //(_offset select 2) - 10]; + _unit assignAsDriver _chute; + _unit moveInDriver _chute; + //_unit allowDamage true; + _unit setVariable["chute",_chute]; + _dir = _dir + _arc; + + uiSleep 2; +}; + + +blck_monitoredMissionAIGroups pushback _paraGroup; + +_paraGroup diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf index 35df2db..4d53f0b 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf @@ -1,4 +1,5 @@ /* + blck_fnc_spawnUnit Original Code by blckeagls Modified by Ghostrider @@ -11,114 +12,109 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private ["_i","_weap","_skin","_ai1","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices"]; -params["_pos","_weaponList","_aiGroup",["_skillLevel","red"],["_Launcher","none"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_scuba",false]]; +private ["_i","_weap","_skin","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"]; +params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]]; + #ifdef blck_debugMode -if (blck_debugLevel > 2) then +if (blck_debugLevel >= 2) then { - private _params = ["_pos","_weaponList","_aiGroup","_skillLevel","_Launcher","_uniforms","_headGear","_vests","_scuba"]; + private _params = ["_pos","_aiGroup","_skillLevel","_uniforms","_headGear","_vests","_backpacks","_Launcher","_weaponList","_sideArms","_scuba"]; //"_weaponList", "_Launcher" { diag_log format["_fnc_spawnUnit::-> _this select %1 (%2) = %3",_forEachIndex, _params select _forEachIndex, _this select _forEachIndex]; }forEach _this; - //_pos = _this select 0; // Position at which to spawn AI - //_weaponList = _this select 1; // List of weapons with which to arm the AI - //_aiGroup = _this select 2; // Group to which AI belongs - //_skillLevel = [_this,3,"red"] call BIS_fnc_param; // Assign a skill level in case one was not passed."blue", "red", "green", "orange" - //_Launcher = [_this, 4, "none"] call BIS_fnc_param; // Set launchers to "none" if no setting was passed. - //_uniforms = [_this, 5, blck_SkinList] call BIS_fnc_param; // skins to add to AI - //_headGear = [_this, 6, _shemag] call BIS_fnc_param;// headGear to add to AI - { - diag_log format["_fnc_spawnUnit:: _this select %1 = %2",_forEachIndex,_x]; - }forEach _this; }; #endif if (isNull _aiGroup) exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnUnit"}; -_ai1 = ObjNull; -private _modType = call blck_fnc_getModType; -if (_modType isEqualTo "Epoch") then +_unit = ObjNull; + +if (blck_modType isEqualTo "Epoch") then { - "I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"]; - // _unit = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"]; - //_ai1 = _aiGroup createUnit ["I_Soldier_EPOCH", _pos, [], blck_baseSkill, "FORM"]; + "I_Soldier_EPOCH" createUnit [[0,0,0], _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"]; + _unit setVariable ["LAST_CHECK",28800,true]; switch(_skillLevel) do { - case "blue":{_ai1 setVariable["Crypto",1 + floor(random(blck_maxMoneyBlue)),true];}; - case "red":{_ai1 setVariable["Crypto",2 + floor(random(blck_maxMoneyRed)),true];}; - case "green":{_ai1 setVariable["Crypto",3 + floor(random(blck_maxMoneyGreen)),true];}; - case "orange":{_ai1 setVariable["Crypto",4 + floor(random(blck_maxMoneyOrange)),true];}; + case "blue":{_unit setVariable["Crypto",2 + floor(random(blck_maxMoneyBlue)),true];}; + case "red":{_unit setVariable["Crypto",4 + floor(random(blck_maxMoneyRed)),true];}; + case "green":{_unit setVariable["Crypto",6 + floor(random(blck_maxMoneyGreen)),true];}; + case "orange":{_unit setVariable["Crypto",8 + floor(random(blck_maxMoneyOrange)),true];}; }; }; -if (_modType isEqualTo "Exile") then +if (blck_modType isEqualTo "Exile") then { - "i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"]; - //_ai1 = _aiGroup createUnit ["i_g_soldier_unarmed_f", _pos, [], blck_baseSkill, "FORM"]; + "i_g_soldier_unarmed_f" createUnit [[0,0,0], _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"]; switch(_skillLevel) do { - case "blue":{_ai1 setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];}; - case "red":{_ai1 setVariable["ExileMoney",4 + floor(random(blck_maxMoneyRed)),true];}; - case "green":{_ai1 setVariable["ExileMoney",6 + floor(random(blck_maxMoneyGreen)),true];}; - case "orange":{_ai1 setVariable["ExileMoney",8 + floor(random(blck_maxMoneyOrange)),true];}; + case "blue":{_unit setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];}; + case "red":{_unit setVariable["ExileMoney",4 + floor(random(blck_maxMoneyRed)),true];}; + case "green":{_unit setVariable["ExileMoney",6 + floor(random(blck_maxMoneyGreen)),true];}; + case "orange":{_unit setVariable["ExileMoney",8 + floor(random(blck_maxMoneyOrange)),true];}; }; }; +// findEmptyPosition [minDistance, maxDistance, vehicleType] + +_unit setPos ( _pos findEmptyPosition [0.1,3,(typeOf _unit)]); +_posUnit = getPosATL _unit; +_start = +_posUnit; +_start set [2, 100]; +while { (lineIntersects [ATLToASL _start, ATLToASL _posUnit]) } do { + _pos set [2, ((_pos select 2) + 0.25)]; + _posUnit set[1,((_posUnit select 1) + 0.25)]; +}; +_unit setPosATL _pos; + #ifdef blck_debugMode if (blck_debugLevel >= 2) then { - diag_log format["_fnc_spawnUnit::-->> unit spawned = %1",_ai1]; + diag_log format["_fnc_spawnUnit::-->> unit spawned = %1",_unit]; }; #endif -[_ai1] call blck_fnc_removeGear; +[_unit] call blck_fnc_removeGear; if (_scuba) then { - _ai1 swiminDepth (_pos select 2); + _unit swiminDepth (_pos select 2); #ifdef blck_debugMode if (blck_debugLevel >= 2) then { - diag_log format["_fnc_spawnUnit:: -- >> unit depth = %1 and underwater for unit = %2",_pos select 2, underwater _ai1]; + diag_log format["_fnc_spawnUnit:: -- >> unit depth = %1 and underwater for unit = %2",_pos select 2, underwater _unit]; }; #endif }; _skin = ""; _counter = 1; +//diag_log format["_fnc_spawnUnit: _uniforms = %1",_uniforms]; while {_skin isEqualTo "" && _counter < 10} do { - _skin = selectRandom _uniforms; - _ai1 forceAddUniform _skin; - _skin = uniform _ai1; + _unit forceAddUniform (selectRandom _uniforms); + _skin = uniform _unit; #ifdef blck_debugMode if (blck_debugLevel > 2) then { - diag_log format["_fnc_spawnUnit::-->> for unit _ai1 % uniform is %2",_ai1, uniform _ai1]; + diag_log format["_fnc_spawnUnit::-->> for unit _unit % uniform is %2",_unit, uniform _unit]; }; #endif _counter =+1; }; //Sets AI Tactics -_ai1 enableAI "TARGET"; -_ai1 enableAI "AUTOTARGET"; -_ai1 enableAI "MOVE"; -_ai1 enableAI "ANIM"; -_ai1 enableAI "FSM"; -_ai1 allowDammage true; -_ai1 setBehaviour "COMBAT"; -_ai1 setunitpos "AUTO"; +_unit enableAI "ALL"; +_unit allowDammage true; +_unit setBehaviour "COMBAT"; +_unit setunitpos "AUTO"; -if (_modType isEqualTo "Epoch") then +if !(_headGear isEqualTo []) then { - // do this so the AI or corpse hangs around on Epoch servers. - _ai1 setVariable ["LAST_CHECK",28800,true]; + _unit addHeadgear (selectRandom _headGear); + //diag_log format["Headgear for unit %1 = %2",_unit, headgear _unit]; }; -_ai1 addHeadgear (selectRandom _headGear); -_ai1 addVest selectRandom _vests; - -if ( random (1) < blck_chanceBackpack) then -{ - _ai1 addBackpack selectRandom blck_backpacks; +if !(_vests isEqualTo []) then +{ + _unit addVest (selectRandom _vests); + //diag_log format["Vest for unit %1 = %2",_unit, vest _unit]; }; +if (_weaponList isEqualTo []) then {_weaponList = call blck_fnc_selectAILoadout}; _weap = selectRandom _weaponList; -private["_optics","_pointers","_muzzles","_underbarrel","_legalOptics"]; -_ai1 addWeaponGlobal _weap; +_unit addWeaponGlobal _weap; _ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines"); _optics = getArray (configfile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems"); _pointers = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "PointerSlot" >> "compatibleItems"); @@ -126,69 +122,74 @@ _muzzles = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> _underbarrel = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "UnderBarrelSlot" >> "compatibleItems"); _legalOptics = _optics - blck_blacklistedOptics; -_ai1 addMagazines [selectRandom _ammoChoices, 3]; +_unit addMagazines [selectRandom _ammoChoices, 3]; -if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _muzzles)}; -if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _legalOptics);}; -if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _pointers);}; -if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _muzzles);}; -if (random 1 < 0.4) then {_ai1 addPrimaryWeaponItem (selectRandom _underbarrel);}; +if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)}; +if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _legalOptics)}; +if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _pointers)}; +if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)}; +if (random 1 < 0.4) then {_unit addPrimaryWeaponItem (selectRandom _underbarrel)}; if ((count(getArray (configFile >> "cfgWeapons" >> _weap >> "muzzles"))) > 1) then { - _ai1 addMagazine "1Rnd_HE_Grenade_shell"; + _unit addMagazine "1Rnd_HE_Grenade_shell"; }; -_weap = selectRandom blck_Pistols; -//diag_log format["[spawnUnit.sqf] _weap os %1",_weap]; -_ai1 addWeaponGlobal _weap; -_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines"); -_ai1 addMagazines [selectRandom _ammoChoices, 2]; - -for "_i" from 1 to (1+floor(random(3))) do +if !(_sideArms isEqualTo []) then { - _ai1 addItem (selectRandom blck_ConsumableItems); + _weap = selectRandom _sideArms; + //diag_log format["[spawnUnit.sqf] _weap os %1",_weap]; + _unit addWeaponGlobal _weap; + _ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines"); + _unit addMagazines [selectRandom _ammoChoices, 2]; +}; +for "_i" from 1 to (1+floor(random(4))) do +{ + _unit addItem (selectRandom blck_ConsumableItems); }; // Add First Aid or Grenade 50% of the time if (round(random 10) <= 5) then { - //_item = selectRandom blck_specialItems; //diag_log format["spawnUnit.sqf] -- Item is %1", _item]; - _ai1 addItem selectRandom blck_specialItems; + _unit addItem selectRandom blck_specialItems; }; - -if (_Launcher != "none") then +//diag_log format["_spawnUnit: _Launcher = %1",_Launcher]; +if ( !(_Launcher isEqualTo "none") && !(_backpacks isEqualTo [])) then { - private["_bpck"]; - _ai1 addWeaponGlobal _Launcher; + _unit addWeaponGlobal _Launcher; + _unit addBackpack (selectRandom _backpacks); for "_i" from 1 to 3 do { - _ai1 addItemToBackpack (getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0); // call BIS_fnc_selectRandom; + _unit addItemToBackpack (getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0); // call BIS_fnc_selectRandom; + }; + _unit setVariable["Launcher",_launcher,true]; +} else { + if ( random (1) < blck_chanceBackpack && !(_backpacks isEqualTo [])) then + { + _unit addBackpack selectRandom _backpacks; }; - _ai1 setVariable["Launcher",_launcher,true]; }; if(sunOrMoon < 0.2 && blck_useNVG)then { - _ai1 addWeapon selectRandom blck_NVG; - _ai1 setVariable ["hasNVG", true,true]; - + _unit addWeapon selectRandom blck_NVG; + _unit setVariable ["hasNVG", true,true]; } else { - _ai1 setVariable ["hasNVG", false,true]; + _unit setVariable ["hasNVG", false,true]; }; #ifdef blck_debugMode if (blck_debugLevel > 2) then { - diag_log format["_fnc_spawnUnit:: --> unit loadout = %1", getUnitLoadout _ai1]; + diag_log format["_fnc_spawnUnit:: --> unit loadout = %1", getUnitLoadout _unit]; }; #endif -_ai1 addEventHandler ["Reloaded", {_this call compile preprocessfilelinenumbers blck_EH_unitWeaponReloaded;}]; -_ai1 addMPEventHandler ["MPKilled", {[(_this select 0), (_this select 1)] call compile preprocessfilelinenumbers blck_EH_AIKilled;}]; // changed to reduce number of concurrent threads, but also works as spawn blck_AIKilled; }]; -_ai1 addMPEventHandler ["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIHit;}]; +_unit addEventHandler ["Reloaded", {_this call compile preprocessfilelinenumbers blck_EH_unitWeaponReloaded;}]; +_unit addMPEventHandler ["MPKilled", {[(_this select 0), (_this select 1)] call compile preprocessfilelinenumbers blck_EH_AIKilled;}]; // changed to reduce number of concurrent threads, but also works as spawn blck_AIKilled; }]; +_unit addMPEventHandler ["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIHit;}]; switch (_skillLevel) do { @@ -199,14 +200,11 @@ switch (_skillLevel) do default {_index = 0;_aiSkills = blck_SkillsBlue;}; }; -//_alertDist = blck_AIAlertDistance select _index; -//_intelligence = blck_AIIntelligence select _index; +[_unit,_aiSkills] call blck_fnc_setSkill; +_unit setVariable ["alertDist",blck_AIAlertDistance select _index,true]; +_unit setVariable ["intelligence",blck_AIIntelligence select _index,true]; +_unit setVariable ["GMS_AI",true,true]; -[_ai1,_aiSkills] call blck_fnc_setSkill; -_ai1 setVariable ["alertDist",blck_AIAlertDistance select _index,true]; -_ai1 setVariable ["intelligence",blck_AIIntelligence select _index,true]; -_ai1 setVariable ["GMS_AI",true,true]; - -_ai1 +_unit diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddEmplaced.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_addMonitoredVehicle.sqf similarity index 60% rename from @GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddEmplaced.sqf rename to @GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_addMonitoredVehicle.sqf index 3edeb81..9023e81 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddEmplaced.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_addMonitoredVehicle.sqf @@ -1,14 +1,14 @@ /* + By Ghostrider [GRG] + Copyright 2016 + Scans vehicles local to the machine the script is run on. -------------------------- 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/ + 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]; -true \ No newline at end of file +params["_vehicle"]; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf index 60ed82f..b3e0b87 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf @@ -22,14 +22,22 @@ if (_clearInventory) then [_veh] call blck_fnc_emptyObject; }; _veh setVehicleLock "LOCKEDPLAYER"; +if (blck_modType isEqualTo "Epoch") then +{ + if (blck_allowSalesAtBlackMktTraders) then {_veh setVariable["HSHALFPRICE",1,true]}; +}; _veh addEventHandler ["GetIn",{ // Note: only fires when vehicle is local to player private["_unit","_veh"]; - _unit = _this select 2; - _veh = _this select 0; - if (isPlayer _unit) then + if (_veh getVariable["blck_releasedAt",0] > 0) then {{ _veh removeAllEventHandlers _x} forEach["getin","getout"]}; + if !(_veh getVariable["blck_releasedAt",0] > 0) then { - _unit action ["eject",_veh]; - titleText ["You are not allowed to enter that vehicle at this time","PLAIN DOWN"]; + _unit = _this select 2; + _veh = _this select 0; + if (isPlayer _unit) then + { + _unit action ["eject",_veh]; + titleText ["You are not allowed to enter that vehicle at this time","PLAIN DOWN"]; + }; }; }]; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_decomissionAIVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_decomissionAIVehicle.sqf index 297e3a3..890b1e0 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_decomissionAIVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_decomissionAIVehicle.sqf @@ -17,7 +17,7 @@ diag_log "Vehicle Decommisioning handler activated"; params["_veh"]; -if (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") then // Deal with a static weapon +if (_veh getVariable["GRG_vehType","none"] isEqualTo "emplaced") then // Deal with a static weapon { if (blck_killEmptyStaticWeapons) then { diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf new file mode 100644 index 0000000..4846a5c --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf @@ -0,0 +1,9 @@ + + + params["_veh"]; + //diag_log format["blck_fnc_deleteAIvehicle: _veh %1 deleted",_veh]; + { + _veh removeAllEventHandlers _x; + }forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear","HandleDamage","Reloaded"]; + blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; + deleteVehicle _veh; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf new file mode 100644 index 0000000..369aca5 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf @@ -0,0 +1,8 @@ + +//_fn_destroyVehicleAndCrew = { + params["_veh"]; + //private["_crew"]; + //_crew = crew _veh; + //diag_log format["_fn_destroyVehicleAndCrew: called for _veh = %1",_veh]; + {[_x] call blck_fnc_deleteAI;} forEach (crew _veh); + [_veh] call blck_fnc_deleteAIvehicle; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf index dc8f480..3ffa1ef 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf @@ -12,9 +12,7 @@ params["_Vehicle"]; -private["_modType"]; -_modType = call blck_fnc_getModType; -switch (_ModType) do { +switch (blck_modType) do { case "Epoch": { #ifdef blck_debugMode diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf index 5480421..f181b96 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf @@ -1,45 +1,23 @@ -/* - Handle the case that all AI assigned to a vehicle are dead. - Allows players to enter and use the vehicle. - - By Ghostrider [GRG] - Copyright 2016 - Last updated 3-24-17 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; - params["_v"]; - //diag_log format["_fnc_releastVehicletoPlayers.sqf: removing vehicle %1 from ",_v,blck_monitoredVehicles]; - //blck_monitoredVehicles = blck_monitoredVehicles - [_v]; - _v removeAllEventHandlers "GetIn"; - _v removeAllEventHandlers "GetOut"; - _v removeAllEventHandlers "Fired"; - _v removeAllEventHandlers "Reloaded"; - _v removeAllMPEventHandlers "MPHit"; - _v removeAllMPEventHandlers "MPKilled"; - _v setVehicleLock "UNLOCKED" ; - _v setVariable["releasedToPlayers",true]; - [_v] call blck_fnc_emptyObject; - - - //{ - //_v removealleventhandlers _x; - //}forEach["Fired","Hit","HitPart","Reloaded","Dammaged","HandleDamage","GetIn","GetOut"]; - - + params["_veh"]; + //blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; + _veh setVehicleLock "UNLOCKED" ; + //_v setVariable["releasedToPlayers",true]; + //[_v] call blck_fnc_emptyObject; + { + _veh removealleventhandlers _x; + } forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; + { + _veh removeAllMPEventHandlers _x; + } forEach ["MPHit","MPKilled"]; + _veh setVariable["blck_releasedAt",diag_tickTime,true]; + _veh setVariable["blck_DeleteAt",diag_tickTime + blck_vehicleDeleteTimer,true]; + if ((damage _veh) > 0.5) then {_veh setDamage 0.5}; + //diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1 and blck_deleteAT = %2",_veh, _veh getVariable["blck_DeleteAt",0]]; #ifdef blck_debugMode if (blck_debugLevel > 2) then { - diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_v]; + diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_veh]; }; #endif - - - - diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf new file mode 100644 index 0000000..088472c --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf @@ -0,0 +1,29 @@ + + +//_fn_reloadAmmo = { + params["_veh"]; + private ["_crew","_mag","_allMags","_cnt"]; + // https://community.bistudio.com/wiki/fullCrew + // 0 1 2 3 4 + // returns Array - format [[unit,role,cargoIndex,turretPath,personTurret], ...] + //diag_log format["_fnc_vehicleMonitor:: (65) _veh = %1",_veh]; + if ({alive _x and !(isPlayer _x)} count (crew _veh) > 0) then + { + _crew = fullCrew _veh; + //diag_log format["_fnc_vehicleMonitor:: (67) _crew = %1",_crew]; + { + //diag_log format ["_fnc_vehicleMonitor:: (69) _x = %1",_x]; + _mag = _veh currentMagazineTurret (_x select 3); + if (count _mag > 0) then + { + //diag_log format["_fnc_vehicleMonitor:: (71) _mag is typeName %1", typeName _mag]; + //diag_log format ["_fnc_vehicleMonitor:: (71) length _mag = %2 and _mag = %1",_mag,count _mag]; + _allMags = magazinesAmmo _veh; + //diag_log format["_fnc_vehicleMonitor:: (71) _allMags = %1",_allMags]; + _cnt = ( {_mag isEqualTo (_x select 0)}count _allMags); + //diag_log format["_fnc_vehicleMonitor:: (75) _cnt = %1",_cnt]; + if (_cnt < 2) then {_veh addMagazineCargo [_mag,2]}; + }; + } forEach _crew; + }; +//}; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf index 3a7bcc3..e1d800c 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf @@ -12,7 +12,7 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private["_veh","_modType"]; +private["_veh"]; params["_vehType","_pos",["_clearInventory",true]]; #ifdef blck_debugMode diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf index b76133e..3739d2d 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf @@ -1,8 +1,7 @@ /* - for ghostridergaming + By Ghostrider [GRG] Copyright 2016 - Last Modified 8-15-17 -------------------------- License @@ -12,29 +11,9 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort","_supplyHeli"]; +params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]], ["_sideArms",[]] ]; -params["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]]; -/* -_coords = _this select 0; -_skillAI = _this select 1; -_weapons = _this select 2; -_uniforms = _this select 3; -_headGear = _this select 4; -_helis = _this select 5; -*/ -//diag_log format["_fnc_spawnMissionHeli:: _this = %1",_this]; -//diag_log format["_fnc_spawnMissionHeli:: _helis = %1 && _chanceParas = %2",_helis,_chanceParas]; -/* - Handles upper level functions of reinforcements utilizing helicoptor patrols and/or spawned from a helicopter. - Calls on functions that spawn paratroops and/or loot chests at the heli's location. - - Tasks are: - 1) spawn a heli over the mission center. - 2) add crew and gunners - 3) spawn paratroops if needed - 4) configure waypointScript - 5) return the _heli that was spawned. -*/ #ifdef blck_debugMode if (blck_debugLevel > 0) then { @@ -42,9 +21,7 @@ if (blck_debugLevel > 0) then }; #endif -private["_grpPilot","_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort"]; _abort = false; -_grpParatroops = grpNull; _grpPilot = createGroup blck_AI_Side; if (isNull _grpPilot) then { @@ -66,16 +43,18 @@ if !(isNull _grpPilot) then _grpPilot setVariable["wpRadius",30]; _grpPilot setVariable["wpMode","SAD"]; - private["_supplyHeli"]; //create helicopter and spawn it - if (( typeName _helis) isEqualTo "ARRAY") then {_chopperType = selectRandom _helis} - else - {_chopperType = _helis}; + if (( typeName _helis) isEqualTo "ARRAY") then + { + _chopperType = selectRandom _helis + } else { + _chopperType = _helis + }; #ifdef blck_debugMode if (blck_debugLevel > 1) then { - diag_log format["_fnc_spawnMissionHeli (78):: _chopperType seleted = %1",_chopperType]; + diag_log format["_fnc_spawnMissionHeli (78):: _chopperType selected = %1",_chopperType]; }; #endif @@ -86,7 +65,7 @@ if !(isNull _grpPilot) then _patrolHeli engineOn true; _patrolHeli flyInHeight 100; _patrolHeli setVehicleLock "LOCKED"; - _patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}]; + //_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}]; #ifdef blck_debugMode if (blck_debugLevel > 1) then @@ -98,8 +77,8 @@ if !(isNull _grpPilot) then [_patrolHeli] call blck_fnc_emptyObject; _launcherType = "none"; - _unitPilot = _grpPilot createUnit ["I_helipilot_F", getPos _patrolHeli, [], 0, "FORM"]; - _unitPilot = [[100,100,100],_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI; + //params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]]; + _unitPilot = [[100,100,100],_grpPilot,_skillAI,_uniforms,_headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms] call blck_fnc_spawnUnit; _unitPilot setSkill 1; _unitPilot assignAsDriver _patrolHeli; _unitPilot moveInDriver _patrolHeli; @@ -138,8 +117,9 @@ if !(isNull _grpPilot) then } else { - // B_helicrew_F - _unitCrew = [(getPosATL _patrolHeli),_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI; + //params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]]; + //_unitCrew = [(getPosATL _patrolHeli),_grpPilot,_skillAI,_uniforms,_headGear] call blck_fnc_spawnUnit; + _unitCrew = [(getPosATL _patrolHeli),_grpPilot,_skillAI,_uniforms,_headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms] call blck_fnc_spawnUnit; _unitCrew assignAsTurret [_patrolHeli, _x]; _unitCrew moveInTurret [_patrolHeli, _x]; @@ -156,48 +136,10 @@ if !(isNull _grpPilot) then }; #endif - if (random(1) < _chanceParas) then - { - _grpParatroops = createGroup blck_AI_Side; - if (isNull _grpParatroops) then - { - diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpParatroops"; - _abort = true; - }; - // params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull],_grpParatroops]; - //params["_coords","_skillAI","_weapons","_uniforms","_headGear",["_grpParatroops",grpNull],["_heli",objNull]]; - if !(isNull _grpParatroops) then - { - [_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops; - }; - }; - //set waypoint for helicopter - [_coords,30,35,_grpPilot,"random","SAD"] spawn blck_fnc_setupWaypoints; - blck_monitoredMissionAIGroups pushBack _grpPilot; - #ifdef blck_debugMode - if (blck_debugLevel > 1) then - { - diag_log format["_fnc_spawnMissionHeli (153):: initial pilot waypoints set"]; - [_patrolHeli] spawn { - params["_patrolHeli"]; - diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop"; - while {!isNull _patrolHeli} do - { - uiSleep 120; - diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli]; - diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli]; - }; - }; - }; - #endif - }; -private["_ai"]; -_ai = (units _grpPilot); -if !(isNull _grpParatroops) then {_ai = _ai + (units _grpParatroops);}; - -_return = [_patrolHeli,_ai,_abort]; +//diag_log format["[blckeagls] _fnc_spawnMissionHeli:: _patrolHeli %1 | _grpPilot %2 | _abort %3",_patrolHeli,_grpPilot,_abort]; +_return = [_patrolHeli,units _grpPilot,_abort]; #ifdef blck_debugMode if (blck_debugLevel > 0) then @@ -205,5 +147,5 @@ if (blck_debugLevel > 0) then diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return]; }; #endif - +//diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return]; _return; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf new file mode 100644 index 0000000..f35e671 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf @@ -0,0 +1,88 @@ +/* + + By Ghostrider [GRG] + Copyright 2016 + Last Modified 8-16-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,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] +params["_coords","_missionHelis","_spawnHeli",["_aiSkillsLevel","Red"],["_chancePara",0],["_noPara",0],["_uniforms",blck_SkinList],["_headGear",blck_headgearList],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weapons",[]],["_sideArms",blck_Pistols]]; +#ifdef blck_debugMode +if (blck_debugLevel >=2) then +{ + private _params = ["_coords","_missionHelis","_spawnHeli","_aiSkillsLevel","_chancePara","_noPara","_uniforms","_headGear","_vests","_backpacks","_weapons","_sideArms"]; + { + diag_log format["_fnc_spawnMissionReinforcements:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex]; + }forEach _this; +}; +#endif + +private["_return","_temp","_missionHelis"]; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log format["_fnc_spawnMissionReinforcements (25): Script Starting with _aiSkillsLevel = %1",_aiSkillsLevel]}; +#endif + +_aiSkillsLevel = toLower _aiSkillsLevel; + +if ( _spawnHeli ) then // if helipatrols are 'enabled' then paratroops will only drop if a heli spawns. + // The chance that they drop is linked to the value for them for that difficulty _aiSkillsLevel + //see _fnc_spannMissionParatroops for how this is handled. +{ + _temp = [objNull,[],false]; + //params["_coords","_aiSkillsLevel",,"_weapons","_uniforms","_headgear""_helis"]; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log "_fnc_spawnMissionReinforcements (64): calling _fnc_spawnMissionHeli to spawn heli and paratroops"; + }; + #endif + // params["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]]; + _temp = [_coords,_missionHelis,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionHeli; + if (typeName _temp isEqualTo "ARRAY") then + { + _return = [_temp select 0, _temp select 1, _temp select 2]; + } + else + { + _return = [objNull, [], true]; + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnMissionReinforcements (66): blck_fnc_spawnMissionHeli returned value of %1 for _return",_return];}; + #endif + +} else { + if (blck_debugLevel > 2) then {diag_log "_fnc_spawnMissionReinforcements (68): calling _fnc_spawnMissionParatroops to spawn para reinforcements";}; + _temp = [objNull,[],false]; + + _temp = [_coords,_aiSkillsLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionParatroops; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then { + diag_log format["_fnc_spawnMissionReinforcements (71):: blck_fnc_spawnMissionParatroops returned value for _paratroops of %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _return = [objNull, _temp select 0 /*units*/, _temp select 1 /*true/false*/]; + } else { + _return = [objNull, [],true]; + }; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (74):: _return = %1",_return];}; +#endif + +_return \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf index 3a7bcc3..e1d800c 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf @@ -12,7 +12,7 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private["_veh","_modType"]; +private["_veh"]; params["_vehType","_pos",["_clearInventory",true]]; #ifdef blck_debugMode diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf index 4b192ef..2435b33 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf @@ -12,7 +12,7 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private["_veh","_modType"]; +private["_veh"]; params["_vehType","_pos",["_clearInventory",true]]; #ifdef blck_debugMode diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf index 69fb7c3..3124f14 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf @@ -14,9 +14,17 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private["_vehType","_safepos","_veh"]; +private["_vehType","_safepos","_veh","_unitNumber"]; params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull],["_setWaypoints",true]]; - +#ifdef blck_debugMode +if (blck_debugLevel > 1) then +{ + private _params = ["_center","_pos","_vehType","_minDis","_maxDis","_group","_setWaypoints"]; + { + diag_log format["_fnc_spawnMissionVehiclePatrol:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex]; + }forEach _this; +}; +#endif //_center Center of the mission area - this is usuall the position treated as the center by the mission spawner. Vehicles will patrol the perimeter of the mission area. // _pos the approximate spawn point for the vehicle @@ -25,12 +33,7 @@ params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_ //_maxDis = maximum distance from the center of the mission for vehicle waypoints //_groupForVehiclePatrol = The group with which to man the vehicle -#ifdef blck_debugMode -if (blck_debugLevel > 1) then -{ - diag_log format["_fnc_spawnVehiclePatrol:: _center = %1 | _pos = %2 | _vehType = %3 | _group = %4",_center,_pos,_vehType,_group]; -}; -#endif + if !(isNull _group) then { // exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnVehiclePatrol"; objNull;}; @@ -38,14 +41,13 @@ if !(isNull _group) then // _veh addEventHandler["HandleDamage",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}]; _veh addMPEventHandler["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleHit}]; _group setVariable["groupVehicle",_veh]; - //#ifdef blck_debugMode + #ifdef blck_debugMode if (blck_debugLevel > 1) then { diag_log format["spawnVehiclePatrol:: vehicle spawned is %1 of typeof %2",_veh, typeOf _veh]; }; - //#endif + #endif - private["_unitNumber"]; _unitNumber = 0; { diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf index c2828db..48e9289 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf @@ -1,6 +1,7 @@ /* By Ghostrider [GRG] Copyright 2016 + -------------------------- License -------------------------- @@ -16,82 +17,24 @@ //diag_log format["_fnc_vehicleMonitor:: blck_debugMode defined"]; #endif -_fn_releaseVehicle = { - params["_veh"]; - //blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; - _veh setVehicleLock "UNLOCKED" ; - //_v setVariable["releasedToPlayers",true]; - //[_v] call blck_fnc_emptyObject; - { - _veh removealleventhandlers _x; - } forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; - { - _veh removeAllMPEventHandlers _x; - } forEach ["MPHit","MPKilled"]; - _veh setVariable["blck_DeleteAt",diag_tickTime + blck_vehicleDeleteTimer,true]; - if ((damage _veh) > 0.5) then {_veh setDamage 0.5}; - //diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1 and blck_deleteAT = %2",_veh, _veh getVariable["blck_DeleteAt",0]]; - #ifdef blck_debugMode - if (blck_debugLevel > 0) then - { - diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_veh]; - }; - #endif -}; - -_fn_destroyVehicleAndCrew = { - params["_veh"]; - //private["_crew"]; - //_crew = crew _veh; - //diag_log format["_fn_destroyVehicleAndCrew: called for _veh = %1",_veh]; - {[_x] call blck_fnc_deleteAI;} forEach (crew _veh); - [_veh] call blck_fn_deleteAIvehicle; -}; - -_fn_reloadAmmo = { - params["_veh"]; - private ["_crew","_mag","_allMags","_cnt"]; - // https://community.bistudio.com/wiki/fullCrew - // 0 1 2 3 4 - // returns Array - format [[unit,role,cargoIndex,turretPath,personTurret], ...] - //diag_log format["_fnc_vehicleMonitor:: (65) _veh = %1",_veh]; - if ({alive _x and !(isPlayer _x)} count (crew _veh) > 0) then - { - _crew = fullCrew _veh; - //diag_log format["_fnc_vehicleMonitor:: (67) _crew = %1",_crew]; - { - //diag_log format ["_fnc_vehicleMonitor:: (69) _x = %1",_x]; - _mag = _veh currentMagazineTurret (_x select 3); - if (count _mag > 0) then - { - //diag_log format["_fnc_vehicleMonitor:: (71) _mag is typeName %1", typeName _mag]; - //diag_log format ["_fnc_vehicleMonitor:: (71) length _mag = %2 and _mag = %1",_mag,count _mag]; - _allMags = magazinesAmmo _veh; - //diag_log format["_fnc_vehicleMonitor:: (71) _allMags = %1",_allMags]; - _cnt = ( {_mag isEqualTo (_x select 0)}count _allMags); - //diag_log format["_fnc_vehicleMonitor:: (75) _cnt = %1",_cnt]; - if (_cnt < 2) then {_veh addMagazineCargo [_mag,2]}; - }; - } forEach _crew; - }; -}; - -blck_fn_deleteAIvehicle = { - params["_veh"]; - //diag_log format["blck_fn_deleteAIvehicle: _veh %1 deleted",_veh]; - { - _veh removeAllEventHandlers _x; - }forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear","HandleDamage","Reloaded"]; - blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; - deleteVehicle _veh; -}; - -private _vehList = +blck_monitoredVehicles; +private ["_vehList","_veh","_isEmplaced","_ownerIsPlayer","_allCrewDead","_deleteNow","_missionCompleted","_evaluate","_cleanupTimer"]; +_vehList = +blck_monitoredVehicles; #ifdef blck_debugMode -if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: function called at %1 with _vehList %2 and blck_monitoredVehicles %3",diag_tickTime,_vehList,blck_monitoredVehicles];}; +if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: function called at %1 with _vehList %2 and blck_monitoredVehicles %3",diag_tickTime,_vehList,blck_monitoredVehicles];}; #endif - //blck_fnc_releaseVehicleToPlayers +//diag_log format["_fnc_vehicleMonitor:: function called at %1 with _vehList %2 and blck_monitoredVehicles %3",diag_tickTime,_vehList,blck_monitoredVehicles]; + +// Check for any vehicles no longer on an HC +{ + if ( (owner _x) == 2) then + { + // vehicle no longer on headless client + blck_HC_monitoredVehicles - blck_HC_monitoredVehicles - [_x]; + blck_monitoredVehicles pushBack _x; + }; +} forEach blck_HC_monitoredVehicles; + { /* Determine state of vehicle @@ -101,71 +44,74 @@ if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: function c _deleteNow */ //diag_log format["_fnc_vehicleMonitor: evaluating vehicle %1",_x]; - private _veh = _x; // (purely for clarity at this point, _x could be used just as well) - private _isEmplaced = _veh getVariable["DBD_vehType","none"] isEqualTo "emplaced"; - private _ownerIsPlayer = if (owner _veh > 2 && !(owner _veh in blck_connectedHCs)) then {true} else {false}; - private _allCrewDead = if (({alive _x} count (crew _veh)) == 0) then {true} else {false}; - private _deletenow = false; - if ( (_veh getVariable["blck_DeleteAt",0] > 0) && (diag_tickTime > (_veh getVariable "blck_DeleteAt"))) then {_deleteNow = true}; - private _missionCompleted = if (_veh getVariable["missionCompleted",0] != 0) then {true} else {false}; - private _evaluate = true; + if (local _x) then + { + _veh = _x; // (purely for clarity at this point, _x could be used just as well) + _isEmplaced = _veh getVariable["GRG_vehType","none"] isEqualTo "emplaced"; + _ownerIsPlayer = if (owner _veh > 2 && !(owner _veh in blck_connectedHCs)) then {true} else {false}; + _allCrewDead = if (({alive _x} count (crew _veh)) == 0) then {true} else {false}; + //diag_log format["_fnc_vehicleMonitor: _allCrewDead = %1",_allCrewDead]; + _deletenow = false; + if ( (_veh getVariable["blck_DeleteAt",0] > 0) && (diag_tickTime > (_veh getVariable "blck_DeleteAt"))) then {_deleteNow = true}; + _missionCompleted = if (_veh getVariable["missionCompleted",0] != 0) then {true} else {false}; + _evaluate = true; - if (_ownerIsPlayer) then - { - // disable further monitoring and mark to never be deleted. - _evaluate = false; - _veh setVariable["blck_DeleteAt",0]; - blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; - //diag_log format["_fnc_vehicleMonitor: vehicle %1 now owned by player %2",_veh, owner _veh]; - }; - - if (_allCrewDead && _evaluate) then - { - if (_isEmplaced) then + if (_ownerIsPlayer) then { - if (blck_killEmptyStaticWeapons) then + // disable further monitoring and mark to never be deleted. + _evaluate = false; + _veh setVariable["blck_DeleteAt",0]; + blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; + //diag_log format["_fnc_vehicleMonitor: vehicle %1 now owned by player %2",_veh, owner _veh]; + }; + + if (_allCrewDead && _evaluate) then + { + if (_isEmplaced) then { - #ifdef blck_debugMode - if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];}; - #endif - _veh setDamage 1; - _veh setVariable["blck_DeleteAt",diag_tickTime + 60]; - }else { - [_veh] call _fn_releaseVehicle; - }; - _evaluate = false; - } else { - if (blck_killEmptyAIVehicles) then - { - _veh setDamage 0.7; - _veh setVariable["blck_DeleteAt",diag_tickTime + 60]; + if (blck_killEmptyStaticWeapons) then + { + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];}; + #endif + _veh setDamage 1; + _veh setVariable["blck_DeleteAt",diag_tickTime + 60]; + }else { + [_veh] call blck_fnc_releaseVehicleToPlayers; + }; + _evaluate = false; } else { - //diag_log format["_fnc_vehicleMonitor:: case of RELEASE where vehicle = %1 and Vehicle is typeOf %2",_veh, typeOf _veh]; - [_veh] call _fn_releaseVehicle; + if (blck_killEmptyAIVehicles) then + { + _veh setDamage 0.7; + _veh setVariable["blck_DeleteAt",diag_tickTime + 60]; + } else { + //diag_log format["_fnc_vehicleMonitor:: case of RELEASE where vehicle = %1 and Vehicle is typeOf %2",_veh, typeOf _veh]; + [_veh] call blck_fnc_releaseVehicleToPlayers; + }; + _evaluate = false; }; - _evaluate = false; + }; + + if (_missionCompleted && !(_allCrewDead)) then + { + //diag_log format["_fnc_vehicleMonitor:: case of mission vehicle with AI alive at mission end: schedule destruction with _veh = %1 and typeOf _veh = %2",_veh, typeOf _veh]; + _cleanupTimer = _veh getVariable["blck_DeleteAt",0]; // The time delete to deleting any alive AI units + if (_cleanupTimer == 0) then {_veh setVariable["blck_DeleteAt",diag_tickTime + blck_vehicleDeleteTimer]}; + _evaluate = false; + }; + + if (_evaluate) then + { + [_veh] call blck_fnc_reloadVehicleAmmo; + }; + + if (_deleteNow) then + { + [_veh] call blck_fnc_destroyVehicleAndCrew; + _evaluate = false; }; }; - - if (_missionCompleted && !(_allCrewDead)) then - { - //diag_log format["_fnc_vehicleMonitor:: case of mission vehicle with AI alive at mission end: schedule destruction with _veh = %1 and typeOf _veh = %2",_veh, typeOf _veh]; - private _cleanupTimer = _veh getVariable["blck_DeleteAt",0]; // The time delete to deleting any alive AI units - if (_cleanupTimer == 0) then {_veh setVariable["blck_DeleteAt",diag_tickTime + blck_vehicleDeleteTimer]}; - _evaluate = false; - }; - - if (_evaluate) then - { - [_veh] call _fn_reloadAmmo; - }; - - if (_deleteNow) then - { - [_veh] call _fn_destroyVehicleAndCrew; - _evaluate = false; - }; - }forEach _vehList; diff --git a/@GMS/addons/custom_server/Compiles/blck_functions.sqf b/@GMS/addons/custom_server/Compiles/blck_functions.sqf index 851c270..a84e418 100644 --- a/@GMS/addons/custom_server/Compiles/blck_functions.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_functions.sqf @@ -20,7 +20,6 @@ blck_fnc_FindSafePosn = compileFinal preprocessFileLineNumbers "\q\addons\custo blck_fnc_randomPosition = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_randomPosn.sqf";// find a randomPosn. see script for details. blck_fnc_findPositionsAlongARadius = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_findPositionsAlongARadius.sqf"; blck_fnc_giveTakeCrypto = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_giveTakeCrypto.sqf"; -blck_fnc_monitorHC = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_monitorHC.sqf"; blck_fnc_timeAcceleration = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\TimeAccel\GMS_fnc_Time.sqf"; blck_fnc_getModType = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getModType.sqf"; // Test if Epoch or Exile is loaded blck_fnc_groupsOnAISide = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_GroupsOnAISide.sqf"; // Returns the number of groups on the side used by AI @@ -32,11 +31,12 @@ blck_fnc_allPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_ blck_fnc_addItemToCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_addItemToCrate.sqf"; blck_fnc_loadLootItemsFromArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_loadLootItemsFromArray.sqf"; blck_fnc_getNumberFromRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getNumberFromRange.sqf"; -blck_fnc_passToHCs = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_passToHCs.sqf"; blck_fnc_spawnMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnMarker.sqf"; blck_fnc_missionCompleteMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_missionCompleteMarker.sqf"; blck_fnc_deleteMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_deleteMarker.sqf"; blck_fnc_updateMarkerAliveCount = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_updateMarkerAliveCount.sqf"; +blck_fnc_addMoneyToObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_addMoneyToObject.sqf"; + // GMS_fnc_addMoneyToObject //blck_fnc_updateAllMarkerAliveCounts = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\updateAllMarkerAliveCounts.sqf"; // GMS_fnc_updateAllMarkerAliveCounts #ifdef GRGserver @@ -71,7 +71,13 @@ blck_fnc_spawnMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_s blck_fnc_clearMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"; // clears mines in an array passed as a parameter blck_fnc_signalEnd = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_signalEnd.sqf"; // deploy smoke grenades at loot crates at the end of the mission. blck_fnc_endMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_endMission.sqf"; -blck_fnc_missionAIareDead = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionAIareDead.sqf"; +//blck_fnc_missionAIareDead = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionAIareDead.sqf"; +blck_fnc_countAliveAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_countAliveAI.sqf"; +blck_fnc_paraDropObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_paraDropObject.sqf"; +blck_fnc_loadMissionCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_loadMissionCrate.sqf"; +blck_fnc_crateMoved = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMoved.sqf"; +blck_fnc_crateMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMarker.sqf"; +//blck_fnc_crateMapMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMapMarker.sqf"; // Group-related functions blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units] @@ -83,31 +89,37 @@ blck_fnc_changeToSentryWaypoint = compileFinal preprocessFileLineNumbers "\q\ad //blck_fnc_setNextWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setNextWaypoint.sqf"; blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"; // GMS_fnc_cleanEmptyGroups blck_fnc_findNearestInfantryGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_findNearestInfantryGroup.sqf"; - +blck_fnc_create_AI_Group = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_create_AI_Group.sqf"; // create a group for which other functions spawn AI. + // Functions specific to vehicles, whether wheeled, aircraft or static blck_fnc_spawnVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf"; blck_fnc_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehiclePatrol.sqf"; blck_fnc_protectVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_protectVehicle.sqf"; blck_fnc_configureMissionVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_configureMissionVehicle.sqf"; blck_fnc_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf"; -blck_fnc_spawnMissionReinforcements = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnReinforcements.sqf"; +blck_fnc_spawnMissionReinforcements = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionReinforcements.sqf"; blck_fnc_spawnMissionHeli = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf"; -blck_fnc_spawnMissionParatroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionParatroops.sqf"; // Lumped here because these 'jump' from aircraft -blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnParaUnits.sqf"; // Lumped here because these 'jump' from aircraft +//blck_fnc_spawnMissionParatroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionParatroops.sqf"; // Lumped here because these 'jump' from aircraft +//blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnParaUnits.sqf"; // Lumped here because these 'jump' from aircraft //blck_fnc_releaseVehicleToPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"; // GMS_fnc_releaseVehicleToPlayers blck_EH_AIVehicle_HandleHit = "\q\addons\custom_server\Compiles\Vehicles\GMS_EH_AIVehicle_Hit.sqf"; blck_fnc_HandleAIVehicleHit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_HandleAIVehicleHit.sqf"; blck_EH_VehicleKilled = "\q\addons\custom_server\Compiles\Vehicles\GMS_EH_VehicleKilled.sqf"; blck_fnc_processAIVehicleKill = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_processAIVehicleKill.sqf"; blck_fnc_selectPatrolVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_selectPatrolVehicle.sqf"; +blck_fnc_releaseVehicleToPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"; +blck_fnc_deleteAIVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_deleteAIVehicle.sqf"; +blck_fnc_destroyVehicleAndCrew = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_destroyVehicleAndCrew.sqf"; +blck_fnc_reloadVehicleAmmo = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_reloadVehicleAmmo.sqf"; // functions to support Units blck_fnc_removeGear = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"; // Strip an AI unit of all gear. -blck_fnc_spawnAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnUnit.sqf"; // spawn individual AI +blck_fnc_spawnUnit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnUnit.sqf"; // spawn individual AI blck_EH_AIKilled = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIKilled.sqf"; // Event handler to process AI deaths blck_EH_AIHit = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIHit.sqf"; blck_EH_AIFiredNear = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIFiredNear.sqf"; blck_EH_unitWeaponReloaded = "\q\addons\custom_server\Compiles\Units\GMS_EH_unitWeaponReloaded.sqf"; +blck_EH_animDone = "\q\addons\custom_server\Compiles\Units\GMS_EH_animDone.sqf"; blck_fnc_processAIKill = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIKill.sqf"; blck_fnc_removeLaunchers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeLaunchers.sqf"; blck_fnc_removeNVG = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeNVG.sqf"; @@ -120,13 +132,25 @@ blck_fnc_setSkill = compileFinal preprocessFileLineNumbers "\q\addons\custom_se blck_fnc_cleanupAliveAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupAliveAI.sqf"; blck_fnc_deleteAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_deleteAI.sqf"; blck_fnc_processAIHit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIHit.sqf"; +blck_fnc_spawnHostage = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnHostage.sqf"; +blck_fnc_spawnLeader = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnLeader.sqf"; +blck_fnc_spawnCharacter = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnCharacter.sqf"; +blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnParaUnits.sqf"; +blck_fnc_nextAnim = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_nextAnim.sqf"; // HC support functions blck_fnc_HC_XferGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferGroup.sqf"; -blck_fnc_HC_XferVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferVehicle.sqf"; +//blck_fnc_HC_XferVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferVehicle.sqf"; blck_fnc_onPlayerDisconnected = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_onPlayerDisconnected.sqf"; //blck_fnc_HC_groupsAssigned = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_groupsAssigned.sqf"; -blck_fnc_HCmonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HCmonitor.sqf"; +blck_fnc_HC_monitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HCmonitor.sqf"; +blck_fnc_HC_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_vehicleMonitor.sqf"; +//blck_fnc_HC_monitorHC = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_monitorHC.sqf"; +blck_fnc_HC_passToHCs = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_passToHCs.sqf"; +blck_fnc_HC_getListConnected = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_getListConnected.sqf"; +blck_fnc_HC_leastBurdened = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_leastBurdened.sqf"; +blck_fnc_HC_countGroupsAssigned = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_countGroupsAssigned.sqf"; + onPlayerDisconnected {[_name,_owner] call blck_fnc_onPlayerDisconnected;}; diag_log "[blckeagls] Functions Loaded"; blck_functionsCompiled = true; diff --git a/@GMS/addons/custom_server/Compiles/blck_variables.sqf b/@GMS/addons/custom_server/Compiles/blck_variables.sqf index 58cbf3b..ec691b9 100644 --- a/@GMS/addons/custom_server/Compiles/blck_variables.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_variables.sqf @@ -29,10 +29,15 @@ blck_monitoredMissionAIGroups = []; // Used to track groups in active missions blck_oldMissionObjects = []; blck_pendingMissions = []; blck_missionsRunning = 0; +blck_missionsRun = 0; blck_activeMissions = []; blck_deadAI = []; blck_connectedHCs = []; blck_missionMarkers = []; +blck_groupsOnHC = []; +blck_vehiclesOnHC = []; +blck_HC_monitoredVehicles = []; +blck_HC_monitoredGroups = []; #ifdef useDynamicSimulation "Group" setDynamicSimulationDistance 1800; enableDynamicSimulationSystem true; diff --git a/@GMS/addons/custom_server/Configs/armed_vics_notes.txt b/@GMS/addons/custom_server/Configs/armed_vics_notes.txt new file mode 100644 index 0000000..199a327 --- /dev/null +++ b/@GMS/addons/custom_server/Configs/armed_vics_notes.txt @@ -0,0 +1,91 @@ + +_blck_lightlyArmed_ARMA3 = [ + "B_G_Offroad_01_armed_F", + "O_G_Offroad_01_armed_F", + "B_MRAP_01_gmg_F", + "B_MRAP_01_hmg_F", + "O_MRAP_02_gmg_F", + "O_MRAP_02_hmg_F", + "I_MRAP_03_hmg_F", + "I_MRAP_03_gmg_F", + "B_APC_Wheeled_01_cannon_F", + "I_APC_Wheeled_03_cannon_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_TUSK_F", + "O_MBT_02_cannon_F", + //"O_MBT_02_arty_F", + "I_MBT_03_cannon_F" +]; +_blck_APC_CUP = [ + "CUP_B_Mastiff_GMG_GB_D", + "CUP_B_Mastiff_HMG_GB_D", + "CUP_B_Ridgback_HMG_GB_D", + "CUP_B_Ridgback_GMG_GB_D", + "CUP_B_M1128_MGS_Desert", + "CUP_B_M1135_ATGMV_Desert_Slat", + "CUP_B_M1133_MEV_Desert_Slat", + "CUP_B_LAV25M240_desert_USMC", + "CUP_B_M1129_MC_MK19_Desert_Slat", + "CUP_B_LAV25_HQ_desert_USMC", + "CUP_B_BRDM2_ATGM_CDF", + "CUP_B_BTR60_CDF", + "CUP_B_M1130_CV_M2_Desert_Slat", + "CUP_B_M1126_ICV_MK19_Desert_Slat", + "CUP_O_BTR90_RU", + "CUP_O_GAZ_Vodnik_BPPU_RU", + "CUP_B_M1126_ICV_M2_Desert", + "CUP_B_M1126_ICV_MK19_Desert", + "CUP_B_M1130_CV_M2_Desert", + "CUP_B_M1126_ICV_M2_Desert_Slat", + "CUP_B_M1133_MEV_Desert", + "CUP_O_GAZ_Vodnik_AGS_RU", + "CUP_O_GAZ_Vodnik_PK_RU" +]; + +_blck_Tanks_CUP = [ + "CUP_B_M2A3Bradley_USA_D", + "CUP_B_M113_desert_USA", + "CUP_B_M163_USA", + "CUP_B_M6LineBacker_USA_D", + "CUP_B_M1A1_DES_US_Army", + "CUP_B_M1A2_TUSK_MG_DES_US_Army", + "CUP_B_AAV_USMC", + "CUP_B_M270_DPICM_USA", + "CUP_B_ZSU23_CDF", + "CUP_B_BMP2_CDF", + "CUP_B_T72_CDF", + "CUP_I_T34_NAPA", + "CUP_B_Challenger2_NATO", + "CUP_B_FV432_Bulldog_GB_D_RWS", + "CUP_B_FV432_Bulldog_GB_D", + "CUP_B_FV510_GB_D_SLAT", + "CUP_B_MCV80_GB_D_SLAT", + "CUP_O_2S6_RU", + "CUP_O_BMP3_RU", + "CUP_O_T90_RU", + "CUP_O_T55_SLA", + "CUP_O_BMP1P_TKA", + "CUP_B_M270_DPICM_USA", + "CUP_B_M2Bradley_USA_W", + "CUP_B_FV510_GB_D", + "CUP_B_MCV80_GB_D", + "CUP_B_M7Bradley_USA_D", + "CUP_O_2S6_RU", + "CUP_O_BMP1_TKA" +]; + diff --git a/@GMS/addons/custom_server/Configs/blck_configs.sqf b/@GMS/addons/custom_server/Configs/blck_configs.sqf index aff33d5..acb1622 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs.sqf @@ -69,7 +69,11 @@ // When set to true,"dot", ext will be to the right of a black dot at the center the mission marker. blck_labelMapMarkers = [true,"center"]; blck_preciseMapMarkers = true; // Map markers are/are not centered at the loot crate +<<<<<<< HEAD blck_showCountAliveAI = true; +======= + blck_showCountAliveAI = false; +>>>>>>> Experimental //Minimum distance between missions blck_MinDistanceFromMission = 1500; @@ -86,8 +90,21 @@ // It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission. blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether. blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion. - blck_loadCratesTiming = "atMissionCompletion"; // valid choices are "atMissionCompletion" and "atMissionSpawn"; - + blck_missionEndCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + 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. + blck_spawnCratesTiming = "atMissionSpawnGround"; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. + blck_loadCratesTiming = "atMissionSpawn"; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. /////////////////////////////// // PLAYER PENALTIES /////////////////////////////// @@ -100,7 +117,7 @@ blck_forbidenVehicles = ["B_MRAP_01_hmg_F","O_MRAP_02_hmg_F","I_MRAP_03_hmg_F","B_MRAP_01_hmg_F","O_MRAP_02_hmg_F"]; // Add any vehicles for which you wish to forbid vehicle kills // For a listing of the guns mounted on various land vehicles see the following link: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Vehicle_Weapons // HMG_M2 is mounted on the armed offroad that is spawned by Epoch - blck_forbidenVehicleGuns = [/*"LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC","HMG_M2","HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","HMG_127_LSV_01"*/]; // Add any vehicles for which you wish to forbid vehicle kills, o + blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC","HMG_M2","HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","HMG_127_LSV_01"]; // Add any vehicles for which you wish to forbid vehicle kills, o /////////////////////////////// @@ -110,7 +127,7 @@ blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Turn this off if you have vehicle patrols. blck_cleanupCompositionTimer = 60*30; // Mission objects will be deleted after the mission is completed after a deley set by this timer. blck_cleanUpLootChests = false; // when true, loot crates will be deleted together with other mission objects. - blck_MissionTimout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting. + blck_MissionTimeout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting. /////////////////////////////// // Paratroop Settings @@ -180,6 +197,7 @@ // Enable / Disable Missions //////////////////// +<<<<<<< HEAD // Maximum number of missions shown on the map at any one time. blck_maxSpawnedMissions = 9; // This determins the total number of missions spawned of all types. set this to the total of missions to be spawned to be sure all are always spawned. set this to less than that total // to force spawning more limited missions like having only 2 on th emap at any one time. @@ -189,6 +207,17 @@ blck_enableRedMissions = 1; blck_enableBlueMissions = 1; blck_numberUnderwaterDynamicMissions = 1; // Values from 0 (no UMS) to N (N Underwater missions will be spawned; static UMS units and subs will be spawned. +======= + // Change this value to reduce the number of spawned missions at any one time. + blck_maxSpawnedMissions = 4; + + //Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission - this feature is not recommended because you may run out of available groups. + blck_enableOrangeMissions = 1; + blck_enableGreenMissions = 1; + blck_enableRedMissions = 2; + blck_enableBlueMissions = 2; + blck_numberUnderwaterDynamicMissions = 3; // Values from -1 (no UMS) to N (N Underwater missions will be spawned; static UMS units and subs will be spawned. +>>>>>>> Experimental //////////////////// // MISSION TIMERS @@ -214,7 +243,7 @@ blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area. blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten outor been killed. - blck_vehicleDeleteTimer = 60*60; + blck_vehicleDeleteTimer = 120*60; //////////////////// // Mission Vehicle Settings //////////////////// @@ -238,7 +267,7 @@ // Defines how many static weapons to spawn. Set this to -1 to disable spawning blck_SpawnEmplaced_Orange = [3,4]; // Number of static weapons at Orange Missions - blck_SpawnEmplaced_Green = 3; // Number of static weapons at Green Missions + blck_SpawnEmplaced_Green = [2,3]; // Number of static weapons at Green Missions blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions blck_SpawnEmplaced_Red = 1; // Number of static weapons at Red Missions @@ -262,7 +291,9 @@ blck_launcherTypes = ["launch_RPG32_F"]; blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI. - + 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; + //This defines how long after an AI dies that it's body disappears. blck_bodyCleanUpTimer = 60*40; // time in seconds after which dead AI bodies are deleted // Each time an AI is killed, the location of the killer will be revealed to all AI within this range of the killed AI, set to -1 to disable @@ -322,7 +353,7 @@ blck_maxMoneyGreen = 20; blck_maxMoneyRed = 15; blck_maxMoneyBlue = 10; - + private["_modType"]; _modType = [] call blck_fnc_getModType; if (_modType isEqualTo "Epoch") then diff --git a/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf b/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf index 2c791ac..34ca9db 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf @@ -39,7 +39,105 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR **********************************************************************************/ blck_AI_Side = RESISTANCE; - blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases + + blck_crateMoneyBlue = [100,250]; + blck_crateMoneyRed = [175, 300]; + blck_crateMoneyGreen = [300, 500]; + blck_crateMoneyOrange = [500, 750]; + + 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", + "B_MRAP_01_gmg_F", + "B_MRAP_01_hmg_F", + "O_MRAP_02_gmg_F", + "O_MRAP_02_hmg_F", + "I_MRAP_03_hmg_F", + "I_MRAP_03_gmg_F", + "B_APC_Wheeled_01_cannon_F", + "I_APC_Wheeled_03_cannon_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_TUSK_F", + "O_MBT_02_cannon_F", + //"O_MBT_02_arty_F", + "I_MBT_03_cannon_F" + ]; + + _blck_APC_CUP = [ + "CUP_B_Mastiff_GMG_GB_D", + "CUP_B_Mastiff_HMG_GB_D", + "CUP_B_Ridgback_HMG_GB_D", + "CUP_B_Ridgback_GMG_GB_D", + "CUP_B_M1128_MGS_Desert", + "CUP_B_M1135_ATGMV_Desert_Slat", + "CUP_B_M1133_MEV_Desert_Slat", + "CUP_B_LAV25M240_desert_USMC", + "CUP_B_M1129_MC_MK19_Desert_Slat", + "CUP_B_LAV25_HQ_desert_USMC", + "CUP_B_BRDM2_ATGM_CDF", + "CUP_B_BTR60_CDF", + "CUP_B_M1130_CV_M2_Desert_Slat", + "CUP_B_M1126_ICV_MK19_Desert_Slat", + "CUP_O_BTR90_RU", + "CUP_O_GAZ_Vodnik_BPPU_RU", + "CUP_B_M1126_ICV_M2_Desert", + "CUP_B_M1126_ICV_MK19_Desert", + "CUP_B_M1130_CV_M2_Desert", + "CUP_B_M1126_ICV_M2_Desert_Slat", + "CUP_B_M1133_MEV_Desert", + "CUP_O_GAZ_Vodnik_AGS_RU", + "CUP_O_GAZ_Vodnik_PK_RU" + ]; + + _blck_Tanks_CUP = [ + "CUP_B_M2A3Bradley_USA_D", + "CUP_B_M113_desert_USA", + "CUP_B_M163_USA", + "CUP_B_M6LineBacker_USA_D", + "CUP_B_M1A1_DES_US_Army", + "CUP_B_M1A2_TUSK_MG_DES_US_Army", + "CUP_B_AAV_USMC", + "CUP_B_M270_DPICM_USA", + "CUP_B_ZSU23_CDF", + "CUP_B_BMP2_CDF", + "CUP_B_T72_CDF", + "CUP_I_T34_NAPA", + "CUP_B_Challenger2_NATO", + "CUP_B_FV432_Bulldog_GB_D_RWS", + "CUP_B_FV432_Bulldog_GB_D", + "CUP_B_FV510_GB_D_SLAT", + "CUP_B_MCV80_GB_D_SLAT", + "CUP_O_2S6_RU", + "CUP_O_BMP3_RU", + "CUP_O_T90_RU", + "CUP_O_T55_SLA", + "CUP_O_BMP1P_TKA", + "CUP_B_M270_DPICM_USA", + "CUP_B_M2Bradley_USA_W", + "CUP_B_FV510_GB_D", + "CUP_B_MCV80_GB_D", + "CUP_B_M7Bradley_USA_D", + "CUP_O_2S6_RU", + "CUP_O_BMP1_TKA" + ]; + + blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F","I_C_Offroad_02_LMG_F","B_T_LSV_01_armed_black_F","B_T_LSV_01_armed_olive_F","B_T_LSV_01_armed_sand_F"]; // Type of vehicle spawned to defend AI bases blck_AIPatrolVehiclesBlue = blck_AIPatrolVehicles; blck_AIPatrolVehiclesRed = blck_AIPatrolVehicles; blck_AIPatrolVehiclesGreen = blck_AIPatrolVehicles; @@ -290,7 +388,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR ]; blck_headgearList = blck_headgear + blck_helmets; //This defines the skin list, some skins are disabled by default to permit players to have high visibility uniforms distinct from those of the AI. - blck_SkinList = [ + blck_SkinList_Male = [ //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Equipment "U_AntigonaBody", "U_AttisBody", @@ -380,7 +478,14 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "U_B_CTRG_Soldier_urb_2_F", "U_B_CTRG_Soldier_urb_3_F" ]; - + blck_femaleUniformsEpoch = [ + "U_CamoBlue_uniform", "U_CamoBrn_uniform", "U_CamoPinkPolka_uniform","U_CamoPink_uniform","U_CamoOutback_uniform", + "U_CamoBubblegum_uniform","U_CamoBiker_uniform","U_CamoAloha_uniform","U_CamoRed_uniform" + ]; + blck_femaleWetsuitsEpoch = [ + "U_Wetsuit_uniform","U_Wetsuit_White","U_Wetsuit_Blue","U_Wetsuit_Purp","U_Wetsuit_Camo" + ]; + blck_SkinList = blck_femaleUniformsEpoch + blck_femaleWetsuitsEpoch + blck_SkinList_Male; blck_vests = [ "V_1_EPOCH","V_2_EPOCH","V_3_EPOCH","V_4_EPOCH","V_5_EPOCH","V_6_EPOCH","V_7_EPOCH","V_8_EPOCH","V_9_EPOCH","V_10_EPOCH","V_11_EPOCH","V_12_EPOCH","V_13_EPOCH","V_14_EPOCH","V_15_EPOCH","V_16_EPOCH","V_17_EPOCH","V_18_EPOCH","V_19_EPOCH","V_20_EPOCH", "V_21_EPOCH","V_22_EPOCH","V_23_EPOCH","V_24_EPOCH","V_25_EPOCH","V_26_EPOCH","V_27_EPOCH","V_28_EPOCH","V_29_EPOCH","V_30_EPOCH","V_31_EPOCH","V_32_EPOCH","V_33_EPOCH","V_34_EPOCH","V_35_EPOCH","V_36_EPOCH","V_37_EPOCH","V_38_EPOCH","V_39_EPOCH","V_40_EPOCH", @@ -511,7 +616,7 @@ for examples of how you can do this see \Major\Compositions.sqf [// Materials and supplies ["CinderBlocks",5,15], ["jerrycan_epoch",1,2], - //["lighter_epoch",0,1], + ["lighter_epoch",1,2], ["CircuitParts",2,3], ["WoodLog_EPOCH",5,10], ["ItemCorrugatedLg",1,6], @@ -524,7 +629,26 @@ for examples of how you can do this see \Major\Compositions.sqf ["ItemCables",1,2], ["ItemBattery",1,2], ["Pelt_EPOCH",1,2], - ["EnergyPackLg",1,3] + ["EnergyPackLg",1,3], + ["ItemCopperBar",1,3], + ["ItemGoldBar",1,3], + ["ItemAluminumBar",1,3], + ["ItemTinBar",1,3], + ["ItemCanvas",2,4], + //"SeedPacket_Hemp","SeedPacket_GoldenSeal","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower" + ["ItemKiloHemp",1,3], + ["ItemRope",1,3], + ["ItemBurlap",1,3], + ["ItemCanvas",1,3], + ["ItemCorrugated",1,3], + ["VehicleRepairLg",1,3], + ["EngineParts",1,3], + ["FuelTank",1,3], + ["CSGAS",1,2], + ["SpareTire",2,4], + ["ItemRotor",1,2], + ["EngineBlock",1,2], + ["ItemDuctTape",1,3] ], [//Items ["Heal_EPOCH",1,2],["Defib_EPOCH",1,2],["Repair_EPOCH",1,4],["FAK",1,4],["VehicleRepair",1,3],["Rangefinder",1,3],["ItemJade",1,2],["ItemQuartz",1,2],["ItemRuby",1,2],["ItemSapphire",1,2], @@ -613,22 +737,41 @@ for examples of how you can do this see \Major\Compositions.sqf ["optic_AMS_khk",1,3],["optic_AMS_snd",1,3],["optic_KHS_blk",1,3],["optic_KHS_hex",1,3],["optic_KHS_old",1,3],["optic_KHS_tan",1,3] ], [ - ["CinderBlocks",4,12], + ["CinderBlocks",5,15], ["jerrycan_epoch",1,2], - ["lighter_epoch",1,1], - ["CircuitParts",2,5], - ["WoodLog_EPOCH",10,20], - ["ItemCorrugatedLg",1,3], - ["ItemCorrugated",2,9], + ["lighter_epoch",1,2], + ["CircuitParts",2,3], + ["WoodLog_EPOCH",5,10], + ["ItemCorrugatedLg",1,6], + ["ItemCorrugated",3,10], ["ItemMixOil",1,2], - ["MortarBucket",3,6], - ["PartPlankPack",10,12], - ["ItemLockbox",1,3], + ["MortarBucket",5,10], + ["PartPlankPack",10,19], + ["ItemLockbox",1,2], ["ItemSolar",1,2], ["ItemCables",1,2], ["ItemBattery",1,2], ["Pelt_EPOCH",1,2], - ["EnergyPackLg",1,3] + ["EnergyPackLg",1,3], + ["ItemCopperBar",1,3], + ["ItemGoldBar",1,3], + ["ItemAluminumBar",1,3], + ["ItemTinBar",1,3], + ["ItemCanvas",2,4], + //"SeedPacket_Hemp","SeedPacket_GoldenSeal","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower" + ["ItemKiloHemp",1,3], + ["ItemRope",1,3], + ["ItemBurlap",1,3], + ["ItemCanvas",1,3], + ["ItemCorrugated",1,3], + ["VehicleRepairLg",1,3], + ["EngineParts",1,3], + ["FuelTank",1,3], + ["CSGAS",1,2], + ["SpareTire",2,4], + ["ItemRotor",1,2], + ["EngineBlock",1,2], + ["ItemDuctTape",1,3] ], [//Items // Format is ["Item name, Minimum number to add, Maximum number to add], @@ -717,18 +860,41 @@ for examples of how you can do this see \Major\Compositions.sqf ["optic_AMS_khk",1,3],["optic_AMS_snd",1,3],["optic_KHS_blk",1,3],["optic_KHS_hex",1,3],["optic_KHS_old",1,3],["optic_KHS_tan",1,3] ], [ - ["CinderBlocks",2,6], - ["jerrycan_epoch",1,3], - ["lighter_epoch",1,1], + ["CinderBlocks",5,15], + ["jerrycan_epoch",1,2], + ["lighter_epoch",1,2], ["CircuitParts",2,3], - ["WoodLog_EPOCH",10,20], - ["ItemCorrugatedLg",0,4], - ["ItemCorrugated",3,6], + ["WoodLog_EPOCH",5,10], + ["ItemCorrugatedLg",1,6], + ["ItemCorrugated",3,10], ["ItemMixOil",1,2], - ["MortarBucket",1,8], - ["PartPlankPack",10,12], + ["MortarBucket",5,10], + ["PartPlankPack",10,19], ["ItemLockbox",1,2], - ["EnergyPackLg",0,1] + ["ItemSolar",1,2], + ["ItemCables",1,2], + ["ItemBattery",1,2], + ["Pelt_EPOCH",1,2], + ["EnergyPackLg",1,3], + ["ItemCopperBar",1,3], + ["ItemGoldBar",1,3], + ["ItemAluminumBar",1,3], + ["ItemTinBar",1,3], + ["ItemCanvas",2,4], + //"SeedPacket_Hemp","SeedPacket_GoldenSeal","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower" + ["ItemKiloHemp",1,3], + ["ItemRope",1,3], + ["ItemBurlap",1,3], + ["ItemCanvas",1,3], + ["ItemCorrugated",1,3], + ["VehicleRepairLg",1,3], + ["EngineParts",1,3], + ["FuelTank",1,3], + ["CSGAS",1,2], + ["SpareTire",2,4], + ["ItemRotor",1,2], + ["EngineBlock",1,2], + ["ItemDuctTape",1,3] ], [//Items ["Heal_EPOCH",1,2],["Defib_EPOCH",1,2],["Repair_EPOCH",1,2],["FAK",1,5],["VehicleRepair",1,5], @@ -811,23 +977,48 @@ for examples of how you can do this see \Major\Compositions.sqf ["optic_AMS_khk",1,3],["optic_KHS_blk",1,3],["optic_KHS_hex",1,3],["optic_KHS_old",1,3],["optic_KHS_tan",1,3] ], [ - ["CinderBlocks",2,7], - ["jerrycan_epoch",1,3], - ["lighter_epoch",1,1], - ["CircuitParts",2,6], - ["WoodLog_EPOCH",10,20], - ["ItemCorrugatedLg",0,5], - ["ItemCorrugated",3,7], + ["CinderBlocks",5,15], + ["jerrycan_epoch",1,2], + ["lighter_epoch",1,2], + ["CircuitParts",2,3], + ["WoodLog_EPOCH",5,10], + ["ItemCorrugatedLg",1,6], + ["ItemCorrugated",3,10], ["ItemMixOil",1,2], - ["MortarBucket",2,5], - ["PartPlankPack",10,12], + ["MortarBucket",5,10], + ["PartPlankPack",10,19], ["ItemLockbox",1,2], - ["EnergyPackLg",0,1] + ["ItemSolar",1,2], + ["ItemCables",1,2], + ["ItemBattery",1,2], + ["Pelt_EPOCH",1,2], + ["EnergyPackLg",1,3], + ["ItemCopperBar",1,3], + ["ItemGoldBar",1,3], + ["ItemAluminumBar",1,3], + ["ItemTinBar",1,3], + ["ItemCanvas",2,4], + //"SeedPacket_Hemp","SeedPacket_GoldenSeal","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower" + ["ItemKiloHemp",1,3], + ["ItemRope",1,3], + ["ItemBurlap",1,3], + ["ItemCanvas",1,3], + ["ItemCorrugated",1,3], + ["VehicleRepairLg",1,3], + ["EngineParts",1,3], + ["FuelTank",1,3], + ["CSGAS",1,2], + ["SpareTire",2,4], + ["ItemRotor",1,2], + ["EngineBlock",1,2], + ["ItemDuctTape",1,3] ], [//Items ["Heal_EPOCH",1,2],["Defib_EPOCH",1,2],["Repair_EPOCH",1,2],["FAK",1,2],["VehicleRepair",1,3], - ["ItemSodaRbull",1,3],["ItemSodaOrangeSherbet",1,3],["ItemSodaPurple",1,3],["ItemSodaMocha",1,3],["ItemSodaBurst",1,3], - ["CookedChicken_EPOCH",1,3],["CookedGoat_EPOCH",1,3],["CookedSheep_EPOCH",1,3],["FoodSnooter",1,3],["FoodMeeps",1,3],["FoodBioMeat",1,3],["ItemTuna",1,3],["ItemSeaBass",1,3],["ItemTrout",1,3] + ["ItemSodaRbull",1,3],["ItemSodaOrangeSherbet",1,3],["ItemSodaPurple",1,3],["ItemSodaMocha",1,3],["ItemSodaBurst",1,3],["ItemSodaAlpineDude",1,3], + ["CookedChicken_EPOCH",1,3],["CookedGoat_EPOCH",1,3],["CookedSheep_EPOCH",1,3], + ["FoodSnooter",1,3],["FoodMeeps",1,3],["FoodBioMeat",1,3],["ItemTuna",1,3],["ItemSeaBass",1,3],["ItemTrout",1,3],["ItemPowderMilk",1,3],["ItemRicebox",1,3], + ["ItemCereals",1,3],["krypto_candy_epoch",1,3],["ItemBakedBeans",1,3],["HotAxeSauce_epoch",1,3] ], [ // Backpacks ["B_AssaultPack_dgtl",0,2],["B_AssaultPack_khk",0,2],["B_AssaultPack_mcamo",0,2],["B_AssaultPack_ocamo",0,2],["B_AssaultPack_rgr",0,2],["B_AssaultPack_sgg",0,2], @@ -838,8 +1029,10 @@ for examples of how you can do this see \Major\Compositions.sqf ] ]; +blck_contructionLoot = blck_BoxLoot_Orange; +blck_highPoweredLoot = blck_BoxLoot_Orange; +blck_supportLoot = blck_BoxLoot_Orange; - // Time the marker remains after completing the mission in seconds - experimental not yet implemented blck_crateTypes = ["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F","Box_NATO_Wps_F","I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F"]; // Default crate type. diff --git a/@GMS/addons/custom_server/Configs/blck_configs_epoch_mil.sqf b/@GMS/addons/custom_server/Configs/blck_configs_epoch_mil.sqf index a2a7453..84188ea 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_epoch_mil.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_epoch_mil.sqf @@ -40,6 +40,103 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR **********************************************************************************/ blck_AI_Side = RESISTANCE; + + blck_crateMoneyBlue = [100,250]; + blck_crateMoneyRed = [175, 300]; + blck_crateMoneyGreen = [300, 500]; + blck_crateMoneyOrange = [500, 750]; + 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", + "B_MRAP_01_gmg_F", + "B_MRAP_01_hmg_F", + "O_MRAP_02_gmg_F", + "O_MRAP_02_hmg_F", + "I_MRAP_03_hmg_F", + "I_MRAP_03_gmg_F", + "B_APC_Wheeled_01_cannon_F", + "I_APC_Wheeled_03_cannon_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_TUSK_F", + "O_MBT_02_cannon_F", + //"O_MBT_02_arty_F", + "I_MBT_03_cannon_F" + ]; + + _blck_APC_CUP = [ + "CUP_B_Mastiff_GMG_GB_D", + "CUP_B_Mastiff_HMG_GB_D", + "CUP_B_Ridgback_HMG_GB_D", + "CUP_B_Ridgback_GMG_GB_D", + "CUP_B_M1128_MGS_Desert", + "CUP_B_M1135_ATGMV_Desert_Slat", + "CUP_B_M1133_MEV_Desert_Slat", + "CUP_B_LAV25M240_desert_USMC", + "CUP_B_M1129_MC_MK19_Desert_Slat", + "CUP_B_LAV25_HQ_desert_USMC", + "CUP_B_BRDM2_ATGM_CDF", + "CUP_B_BTR60_CDF", + "CUP_B_M1130_CV_M2_Desert_Slat", + "CUP_B_M1126_ICV_MK19_Desert_Slat", + "CUP_O_BTR90_RU", + "CUP_O_GAZ_Vodnik_BPPU_RU", + "CUP_B_M1126_ICV_M2_Desert", + "CUP_B_M1126_ICV_MK19_Desert", + "CUP_B_M1130_CV_M2_Desert", + "CUP_B_M1126_ICV_M2_Desert_Slat", + "CUP_B_M1133_MEV_Desert", + "CUP_O_GAZ_Vodnik_AGS_RU", + "CUP_O_GAZ_Vodnik_PK_RU" + ]; + + _blck_Tanks_CUP = [ + "CUP_B_M2A3Bradley_USA_D", + "CUP_B_M113_desert_USA", + "CUP_B_M163_USA", + "CUP_B_M6LineBacker_USA_D", + "CUP_B_M1A1_DES_US_Army", + "CUP_B_M1A2_TUSK_MG_DES_US_Army", + "CUP_B_AAV_USMC", + "CUP_B_M270_DPICM_USA", + "CUP_B_ZSU23_CDF", + "CUP_B_BMP2_CDF", + "CUP_B_T72_CDF", + "CUP_I_T34_NAPA", + "CUP_B_Challenger2_NATO", + "CUP_B_FV432_Bulldog_GB_D_RWS", + "CUP_B_FV432_Bulldog_GB_D", + "CUP_B_FV510_GB_D_SLAT", + "CUP_B_MCV80_GB_D_SLAT", + "CUP_O_2S6_RU", + "CUP_O_BMP3_RU", + "CUP_O_T90_RU", + "CUP_O_T55_SLA", + "CUP_O_BMP1P_TKA", + "CUP_B_M270_DPICM_USA", + "CUP_B_M2Bradley_USA_W", + "CUP_B_FV510_GB_D", + "CUP_B_MCV80_GB_D", + "CUP_B_M7Bradley_USA_D", + "CUP_O_2S6_RU", + "CUP_O_BMP1_TKA" + ]; + blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases blck_AIPatrolVehiclesBlue = blck_AIPatrolVehicles; blck_AIPatrolVehiclesRed = blck_AIPatrolVehicles; @@ -862,8 +959,9 @@ for examples of how you can do this see \Major\Compositions.sqf ] ]; - - // Time the marker remains after completing the mission in seconds - experimental not yet implemented + blck_contructionLoot = blck_BoxLoot_Orange; + blck_highPoweredLoot = blck_BoxLoot_Orange; + blck_supportLoot = blck_BoxLoot_Orange; blck_crateTypes = ["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F","Box_NATO_Wps_F","I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F"]; // Default crate type. diff --git a/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf b/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf index 6301f56..8a80982 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf @@ -49,6 +49,152 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR blck_blacklistSpawns = true; blck_listConcreteMixerZones = true; blck_AI_Side = EAST; +<<<<<<< HEAD +======= + + blck_crateMoneyBlue = [100,250]; + blck_crateMoneyRed = [175, 300]; + blck_crateMoneyGreen = [300, 500]; + blck_crateMoneyOrange = [500, 750]; + + _blck_armed_vehicles_Exile = [ + "Exile_Car_BTR40_MG_Green", + "Exile_Car_HMMWV_M134_Green", + "Exile_Car_HMMWV_M2_Green", + "B_LSV_01_armed_F", + "Exile_Car_Offroad_Armed_Guerilla01" + ]; + + _blck_lightlyArmed_ARMA3 = [ + "B_G_Offroad_01_armed_F", + "O_G_Offroad_01_armed_F", + "B_MRAP_01_gmg_F", + "B_MRAP_01_hmg_F", + "O_MRAP_02_gmg_F", + "O_MRAP_02_hmg_F", + "I_MRAP_03_hmg_F", + "I_MRAP_03_gmg_F", + "B_APC_Wheeled_01_cannon_F", + "I_APC_Wheeled_03_cannon_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_TUSK_F", + "O_MBT_02_cannon_F", + //"O_MBT_02_arty_F", + "I_MBT_03_cannon_F" + ]; + + _blck_APC_CUP = [ + "CUP_B_Mastiff_GMG_GB_D", + "CUP_B_Mastiff_HMG_GB_D", + "CUP_B_Ridgback_HMG_GB_D", + "CUP_B_Ridgback_GMG_GB_D", + "CUP_B_M1128_MGS_Desert", + "CUP_B_M1135_ATGMV_Desert_Slat", + "CUP_B_M1133_MEV_Desert_Slat", + "CUP_B_LAV25M240_desert_USMC", + "CUP_B_M1129_MC_MK19_Desert_Slat", + "CUP_B_LAV25_HQ_desert_USMC", + "CUP_B_BRDM2_ATGM_CDF", + "CUP_B_BTR60_CDF", + "CUP_B_M1130_CV_M2_Desert_Slat", + "CUP_B_M1126_ICV_MK19_Desert_Slat", + "CUP_O_BTR90_RU", + "CUP_O_GAZ_Vodnik_BPPU_RU", + "CUP_B_M1126_ICV_M2_Desert", + "CUP_B_M1126_ICV_MK19_Desert", + "CUP_B_M1130_CV_M2_Desert", + "CUP_B_M1126_ICV_M2_Desert_Slat", + "CUP_B_M1133_MEV_Desert", + "CUP_O_GAZ_Vodnik_AGS_RU", + "CUP_O_GAZ_Vodnik_PK_RU" + ]; + + _blck_Tanks_CUP = [ + "CUP_B_M2A3Bradley_USA_D", + "CUP_B_M113_desert_USA", + "CUP_B_M163_USA", + "CUP_B_M6LineBacker_USA_D", + "CUP_B_M1A1_DES_US_Army", + "CUP_B_M1A2_TUSK_MG_DES_US_Army", + "CUP_B_AAV_USMC", + "CUP_B_M270_DPICM_USA", + "CUP_B_ZSU23_CDF", + "CUP_B_BMP2_CDF", + "CUP_B_T72_CDF", + "CUP_I_T34_NAPA", + "CUP_B_Challenger2_NATO", + "CUP_B_FV432_Bulldog_GB_D_RWS", + "CUP_B_FV432_Bulldog_GB_D", + "CUP_B_FV510_GB_D_SLAT", + "CUP_B_MCV80_GB_D_SLAT", + "CUP_O_2S6_RU", + "CUP_O_BMP3_RU", + "CUP_O_T90_RU", + "CUP_O_T55_SLA", + "CUP_O_BMP1P_TKA", + "CUP_B_M270_DPICM_USA", + "CUP_B_M2Bradley_USA_W", + "CUP_B_FV510_GB_D", + "CUP_B_MCV80_GB_D", + "CUP_B_M7Bradley_USA_D", + "CUP_O_2S6_RU", + "CUP_O_BMP1_TKA" + ]; + + blck_AIPatrolVehicles = + [ + //"Exile_Car_Offroad_Armed_Guerilla01", + //"Exile_Car_Offroad_Armed_Guerilla02", + //"Exile_Car_BTR40_MG_Green", + //"Exile_Car_BTR40_MG_Camo", + //"Exile_Car_HMMWV_M134_Green", + //"Exile_Car_HMMWV_M134_Desert", + //"Exile_Car_HMMWV_M134_Desert", + "Exile_Car_HMMWV_M2_Desert", + "B_LSV_01_armed_F", + //"_MRAP_02_gmg_ghex_F", + //"O_MRAP_02_hmg_ghex_F", + //"O_MRAP_03_gmg_ghex_F", + //"O_MRAP_03_hmg_ghex_F", + "B_MBT_01_cannon_F", + "B_MBT_01_cannon_F", // Duplicate to increase chance that these will spawn relative to others + //"B_MBT_01_mlrs_base_F", + //"B_MBT_01_mlrs_F", + "B_MBT_01_TUSK_F", + "B_MBT_01_TUSK_F",// Duplicate to increase chance that these will spawn relative to others + "B_APC_Tracked_01_AA_F", + "B_APC_Tracked_01_AA_F",// Duplicate to increase chance that these will spawn relative to others + "B_APC_Tracked_01_AA_F",// Duplicate to increase chance that these will spawn relative to others + "B_APC_Tracked_01_CRV_F", + "B_APC_Tracked_01_rcws_F" + ]; // Type of vehicle spawned to defend AI bases + + blck_AIPatrolVehiclesBlue = [ + "Exile_Car_Offroad_Armed_Guerilla01", + "Exile_Car_Offroad_Armed_Guerilla02", + "Exile_Car_BTR40_MG_Green", + "Exile_Car_BTR40_MG_Camo", + "Exile_Car_HMMWV_M134_Green", + "Exile_Car_HMMWV_M134_Desert", + "Exile_Car_HMMWV_M134_Desert", + "Exile_Car_HMMWV_M2_Desert", + "B_LSV_01_armed_F" + ]; +>>>>>>> Experimental blck_AIPatrolVehicles = ["Exile_Car_Offroad_Armed_Guerilla01","Exile_Car_Offroad_Armed_Guerilla02","Exile_Car_BTR40_MG_Green","Exile_Car_BTR40_MG_Camo","Exile_Car_HMMWV_M134_Green","Exile_Car_HMMWV_M134_Desert",/*"Exile_Car_HMMWV_M134_Desert","Exile_Car_HMMWV_M2_Desert",*/"B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases blck_AIPatrolVehiclesBlue = blck_AIPatrolVehicles; @@ -848,7 +994,128 @@ for examples of how you can do this see \Major\Compositions.sqf ] ]; - // Time the marker remains after completing the mission in seconds - experimental not yet implemented + +blck_contructionLootExile = [ + [// Weapons + + ], + [//Magazines + + ], + [ // Optics + + ], + [// Materials and supplies + + // + ["Exile_Item_Matches",1,2],["Exile_Item_CookingPot",1,2],["Exile_Item_Rope",1,2],["Exile_Item_DuctTape",1,8],["Exile_Item_ExtensionCord",1,8],["Exile_Item_FuelCanisterEmpty",1,2], + ["Exile_Item_JunkMetal",4,10],["Exile_Item_LightBulb",1,10],["Exile_Item_MetalBoard",4,10],["Exile_Item_MetalPole",4,10],["Exile_Item_CamoTentKit",1,3],["Exile_Item_MetalScrews",3,10], + ["Exile_Item_Sand",4,10],["Exile_Item_Cement",4,10],["Exile_Item_WaterCanisterDirtyWater",1,3],["Exile_Item_FuelCanisterFull",1,3] + ], + [//Items + ["Exile_Item_Matches","Exile_Item_CookingPot","Exile_Item_CanOpener","Exile_Item_Handsaw","Exile_Item_Pliers","Exile_Item_Grinder","Exile_Item_Foolbox","Exile_Item_Hammer", + "Exile_Item_CordlessScrewdriver","Exile_Item_FireExtinguisher","Exile_Item_OilCanister","Exile_Item_Screwdriver","Exile_Item_Shovel","Exile_Item_Wrench","Exile_Item_CordlessScrewdriver", + "Exile_Item_FireExtinguisher","Exile_Item_OilCanister","Exile_Item_Screwdriver","Exile_Item_DuctTape","Binocular","Rangefinder","ItemGPS","ItemMap","ItemCompass","ItemRadio","ItemWatch", + "Exile_Item_XM8"] + ], + [ // Backpacks + + ] +]; +blck_contructionLoot = blck_contructionLootExile; +blck_supportLootExile = [ + [// Weapons + + ], + [//Magazines + + ], + [ // Optics + + ], + [// Materials and supplies + + ], + [//Items + ["Exile_Item_Matches",2,4],["Exile_Item_CookingPot",2,4],["Exile_Item_CanOpener",2,4], + ["Exile_Item_InstaDoc",1,2],["NVGoggles",1,2],["Rangefinder",1,2],["Exile_Item_Bandage",1,3],["Exile_Item_Vishpirin",1,3], + ["Exile_Item_Catfood",1,3],["Exile_Item_Surstromming",1,3],["Exile_Item_BBQSandwich",1,3],["Exile_Item_ChristmasTinner",1,3],["Exile_Item_SausageGravy",1,3],["Exile_Item_GloriousKnakworst",1,3], + ["Exile_Item_BeefParts",1,3],["Exile_Item_Cheathas",1,3],["Exile_Item_Noodles",1,3],["Exile_Item_SeedAstics",1,3],["Exile_Item_Raisins",1,3],["Exile_Item_Moobar",1,3],["Exile_Item_InstantCoffee",1,3],["Exile_Item_EMRE",1,3], + ["Exile_Item_PlasticBottleCoffee",1,3],["Exile_Item_PowerDrink",1,3],["Exile_Item_PlasticBottleFreshWater",1,3],["Exile_Item_Beer",1,3],["Exile_Item_EnergyDrink",1,3],["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + + ] +]; + +blck_supportLoot = blck_supportLootExile; + +blck_highPoweredLoot = [ + [// Weapons + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["MMG_01_tan_F","150Rnd_93x64_Mag"], + ["MMG_02_black_F","150Rnd_93x64_Mag"], + ["MMG_02_camo_F","150Rnd_93x64_Mag"], + ["MMG_02_sand_F","150Rnd_93x64_Mag"], + ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], + ["srifle_DMR_02_F","10Rnd_338_Mag"], + ["srifle_DMR_02_sniper_F","10Rnd_338_Mag"], + ["srifle_DMR_03_F","10Rnd_338_Mag"], + ["srifle_DMR_03_tan_F","10Rnd_338_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], + ["srifle_DMR_05_tan_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"], + ["srifle_DMR_04_F","10Rnd_127x54_Mag"], + ["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"], + ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] //, + /* + ["launch_NLAW_F","NLAW_F"], + ["launch_RPG32_F","RPG7_F"], + ["launch_B_Titan_F","Titan_AT"], + ["launch_I_Titan_F","Titan_AT"], + ["launch_O_Titan_F","Titan_AP"], + ["launch_B_Titan_short_F","Titan_AA"], + ["launch_I_Titan_short_F","Titan_AA"], + ["launch_O_Titan_short_F","Titan_AA"], + ["launch_RPG7_F","RPG32_F"], + ["launch_O_Vorona_brown_F","vorona_HEAT"], + ["launch_O_Vorona_green_F","Vorona_HE"] + */ + ], + [//Magazines + /* + ["NLAW_F",1,3], + ["RPG32_F",1,3], + ["RPG32_HE_F",1,3], + ["Titan_AA",1,3], + ["Titan_AT",1,3], + ["Titan_AP",1,3], + ["RPG7_F",1,3], + ["vorona_HEAT",1,3], + ["Vorona_HE",1,3], + */ + //["10Rnd_338_Mag",1,5], + ["10Rnd_338_Mag",3,5], + //["10Rnd_127x54_Mag" ,1,5], + ["10Rnd_127x54_Mag",3,5], + ["10Rnd_93x64_DMR_05_Mag" ,3,5], + //["10Rnd_93x64_DMR_05_Mag" ,1,5], + ["150Rnd_93x64_Mag",2,5], + ["130Rnd_338_Mag",3,5] + ], + [ // Optics + + ], + [// Materials and supplies + + ], + [//Items + ], + [ // Backpacks + + ] +]; blck_crateTypes = ["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F","Box_NATO_Wps_F","I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F"]; // Default crate type. diff --git a/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf b/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf index 86f935d..ba07764 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf @@ -41,6 +41,110 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR blck_blacklistSpawns = false; blck_listConcreteMixerZones = false; blck_AI_Side = EAST; + + blck_crateMoneyBlue = [100,250]; + blck_crateMoneyRed = [175, 300]; + blck_crateMoneyGreen = [300, 500]; + blck_crateMoneyOrange = [500, 750]; + + _blck_armed_vehicles_Exile = [ + "Exile_Car_BTR40_MG_Green", + "Exile_Car_HMMWV_M134_Green", + "Exile_Car_HMMWV_M2_Green", + "B_LSV_01_armed_F", + "Exile_Car_Offroad_Armed_Guerilla01" + ]; + + _blck_lightlyArmed_ARMA3 = [ + "B_G_Offroad_01_armed_F", + "O_G_Offroad_01_armed_F", + "B_MRAP_01_gmg_F", + "B_MRAP_01_hmg_F", + "O_MRAP_02_gmg_F", + "O_MRAP_02_hmg_F", + "I_MRAP_03_hmg_F", + "I_MRAP_03_gmg_F", + "B_APC_Wheeled_01_cannon_F", + "I_APC_Wheeled_03_cannon_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_TUSK_F", + "O_MBT_02_cannon_F", + //"O_MBT_02_arty_F", + "I_MBT_03_cannon_F" + ]; + + _blck_APC_CUP = [ + "CUP_B_Mastiff_GMG_GB_D", + "CUP_B_Mastiff_HMG_GB_D", + "CUP_B_Ridgback_HMG_GB_D", + "CUP_B_Ridgback_GMG_GB_D", + "CUP_B_M1128_MGS_Desert", + "CUP_B_M1135_ATGMV_Desert_Slat", + "CUP_B_M1133_MEV_Desert_Slat", + "CUP_B_LAV25M240_desert_USMC", + "CUP_B_M1129_MC_MK19_Desert_Slat", + "CUP_B_LAV25_HQ_desert_USMC", + "CUP_B_BRDM2_ATGM_CDF", + "CUP_B_BTR60_CDF", + "CUP_B_M1130_CV_M2_Desert_Slat", + "CUP_B_M1126_ICV_MK19_Desert_Slat", + "CUP_O_BTR90_RU", + "CUP_O_GAZ_Vodnik_BPPU_RU", + "CUP_B_M1126_ICV_M2_Desert", + "CUP_B_M1126_ICV_MK19_Desert", + "CUP_B_M1130_CV_M2_Desert", + "CUP_B_M1126_ICV_M2_Desert_Slat", + "CUP_B_M1133_MEV_Desert", + "CUP_O_GAZ_Vodnik_AGS_RU", + "CUP_O_GAZ_Vodnik_PK_RU" + ]; + + _blck_Tanks_CUP = [ + "CUP_B_M2A3Bradley_USA_D", + //"CUP_B_M113_desert_USA", + //"CUP_B_M163_USA", + "CUP_B_M6LineBacker_USA_D", + "CUP_B_M1A1_DES_US_Army", + "CUP_B_M1A2_TUSK_MG_DES_US_Army", + //"CUP_B_AAV_USMC", + //"CUP_B_M270_DPICM_USA", + "CUP_B_ZSU23_CDF", + //"CUP_B_BMP2_CDF", + "CUP_B_T72_CDF", + //"CUP_I_T34_NAPA", + "CUP_B_Challenger2_NATO", + //"CUP_B_FV432_Bulldog_GB_D_RWS", + //"CUP_B_FV432_Bulldog_GB_D", + "CUP_B_FV510_GB_D_SLAT", + //"CUP_B_MCV80_GB_D_SLAT", + //"CUP_O_2S6_RU", + "CUP_O_BMP3_RU", + "CUP_O_T90_RU", + "CUP_O_T55_SLA" //, + //"CUP_O_BMP1P_TKA", + //"CUP_B_M270_DPICM_USA", + //"CUP_B_M2Bradley_USA_W", + //"CUP_B_FV510_GB_D", + //"CUP_B_MCV80_GB_D", + //"CUP_B_M7Bradley_USA_D", + //"CUP_O_2S6_RU", + //"CUP_O_BMP1_TKA"" + ]; + blck_AIPatrolVehicles = [ //"Exile_Car_Offroad_Armed_Guerilla01", @@ -68,10 +172,42 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "B_APC_Tracked_01_CRV_F", "B_APC_Tracked_01_rcws_F" ]; // Type of vehicle spawned to defend AI bases - blck_AIPatrolVehiclesBlue = blck_AIPatrolVehicles; - blck_AIPatrolVehiclesRed = blck_AIPatrolVehicles; - blck_AIPatrolVehiclesGreen = blck_AIPatrolVehicles; - blck_AIPatrolVehiclesOrange = blck_AIPatrolVehicles; + + blck_AIPatrolVehiclesBlue = [ + "Exile_Car_Offroad_Armed_Guerilla01", + "Exile_Car_Offroad_Armed_Guerilla02", + "Exile_Car_BTR40_MG_Green", + "Exile_Car_BTR40_MG_Camo", + "Exile_Car_HMMWV_M134_Green", + "Exile_Car_HMMWV_M134_Desert", + "Exile_Car_HMMWV_M134_Desert", + "Exile_Car_HMMWV_M2_Desert", + "B_LSV_01_armed_F" + ]; + + 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", + "B_MRAP_01_hmg_F", + //"O_MRAP_02_gmg_F", + "O_MRAP_02_hmg_F", + "I_MRAP_03_hmg_F" + //"I_MRAP_03_gmg_F", + //"B_APC_Wheeled_01_cannon_F", + //"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_AIPatrolVehiclesGreen = blck_AIPatrolVehiclesRed; + blck_AIPatrolVehiclesOrange = blck_AIPatrolVehiclesRed; + }; // Blacklisted itesm blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"]; @@ -176,6 +312,8 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR blck_WeaponList_Green = blck_WeaponList_Green + blck_apexWeapons; #endif + + blck_baseBackpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ]; #ifdef useAPEX @@ -511,6 +649,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "Exile_Item_Moobar", "Exile_Item_InstantCoffee" ]; + blck_ConsumableItems = blck_Meats + blck_Drink + blck_Food; blck_throwableExplosives = ["HandGrenade","MiniGrenade"]; blck_otherExplosives = ["1Rnd_HE_Grenade_shell","3Rnd_HE_Grenade_shell","DemoCharge_Remote_Mag","SatchelCharge_Remote_Mag"]; @@ -587,12 +726,14 @@ for examples of how you can do this see \Major\Compositions.sqf ["3rnd_HE_Grenade_Shell",1,3], ["HandGrenade",1,5], // Marksman Pack Ammo - ["10Rnd_338_Mag",1,5], - ["10Rnd_338_Mag",1,5], - ["10Rnd_127x54_Mag" ,1,5], - ["10Rnd_127x54_Mag",1,5], - ["10Rnd_93x64_DMR_05_Mag" ,1,5], - ["10Rnd_93x64_DMR_05_Mag" ,1,5] + ["10Rnd_338_Mag",3,5], + ["10Rnd_338_Mag",3,5], + ["10Rnd_127x54_Mag" ,3,5], + ["10Rnd_127x54_Mag",3,5], + ["10Rnd_93x64_DMR_05_Mag" ,3,5], + ["10Rnd_93x64_DMR_05_Mag" ,3,5], + ["150Rnd_93x64_Mag",3,5], + ["130Rnd_338_Mag",3,5] ], [ // Optics ["optic_SOS",1,2],["optic_LRPS",1,2],["optic_DMS",1,2], @@ -679,7 +820,8 @@ for examples of how you can do this see \Major\Compositions.sqf ["10Rnd_127x54_Mag" ,1,4], ["10Rnd_127x54_Mag",1,4], ["10Rnd_93x64_DMR_05_Mag" ,1,4], - ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + ["130Rnd_338_Mag",3,5] ], [ // Optics ["optic_SOS",1,2],["optic_LRPS",1,2],["optic_DMS",1,2],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Holosight",1,3],["acc_flashlight",1,3],["acc_pointer_IR",1,3], @@ -865,6 +1007,124 @@ for examples of how you can do this see \Major\Compositions.sqf ] ]; + + +blck_contructionLootExile = [ + [// Weapons + + ], + [//Magazines + + ], + [ // Optics + + ], + [// Materials and supplies + + // + ["Exile_Item_Matches",1,2],["Exile_Item_CookingPot",1,2],["Exile_Item_Rope",1,2],["Exile_Item_DuctTape",1,8],["Exile_Item_ExtensionCord",1,8],["Exile_Item_FuelCanisterEmpty",1,2], + ["Exile_Item_JunkMetal",1,10],["Exile_Item_LightBulb",1,10],["Exile_Item_MetalBoard",1,10],["Exile_Item_MetalPole",1,10],["Exile_Item_CamoTentKit",1,10],["Exile_Item_MetalScrews",3,10] + ], + [//Items + ["Exile_Item_Matches","Exile_Item_CookingPot","Exile_Item_CanOpener","Exile_Item_Handsaw","Exile_Item_Pliers","Exile_Item_Grinder","Exile_Item_Foolbox","Exile_Item_Hammer", + "Exile_Item_CordlessScrewdriver","Exile_Item_FireExtinguisher","Exile_Item_OilCanister","Exile_Item_Screwdriver","Exile_Item_Shovel","Exile_Item_Wrench","Exile_Item_CordlessScrewdriver", + "Exile_Item_FireExtinguisher","Exile_Item_OilCanister","Exile_Item_Screwdriver","Exile_Item_DuctTape","Binocular","Rangefinder","ItemGPS","ItemMap","ItemCompass","ItemRadio","ItemWatch", + "Exile_Item_XM8"] + ], + [ // Backpacks + + ] +]; +blck_contructionLoot = blck_contructionLootExile; +blck_supportLootExile = [ + [// Weapons + + ], + [//Magazines + + ], + [ // Optics + + ], + [// Materials and supplies + + ], + [//Items + ["Exile_Item_Matches",2,4],["Exile_Item_CookingPot",2,4],["Exile_Item_CanOpener",2,4], + ["Exile_Item_InstaDoc",1,2],["NVGoggles",1,2],["Rangefinder",1,2],["Exile_Item_Bandage",1,3],["Exile_Item_Vishpirin",1,3], + ["Exile_Item_Catfood",1,3],["Exile_Item_Surstromming",1,3],["Exile_Item_BBQSandwich",1,3],["Exile_Item_ChristmasTinner",1,3],["Exile_Item_SausageGravy",1,3],["Exile_Item_GloriousKnakworst",1,3], + ["Exile_Item_BeefParts",1,3],["Exile_Item_Cheathas",1,3],["Exile_Item_Noodles",1,3],["Exile_Item_SeedAstics",1,3],["Exile_Item_Raisins",1,3],["Exile_Item_Moobar",1,3],["Exile_Item_InstantCoffee",1,3],["Exile_Item_EMRE",1,3], + ["Exile_Item_PlasticBottleCoffee",1,3],["Exile_Item_PowerDrink",1,3],["Exile_Item_PlasticBottleFreshWater",1,3],["Exile_Item_Beer",1,3],["Exile_Item_EnergyDrink",1,3],["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + + ] +]; + +blck_supportLoot = blck_supportLootExile; + +blck_highPoweredLoot = [ + [// Weapons + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["MMG_01_tan_F","150Rnd_93x64_Mag"], + ["MMG_02_black_F","150Rnd_93x64_Mag"], + ["MMG_02_camo_F","150Rnd_93x64_Mag"], + ["MMG_02_sand_F","150Rnd_93x64_Mag"], + ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], + ["srifle_DMR_02_F","10Rnd_338_Mag"], + ["srifle_DMR_02_sniper_F","10Rnd_338_Mag"], + ["srifle_DMR_03_F","10Rnd_338_Mag"], + ["srifle_DMR_03_tan_F","10Rnd_338_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], + ["srifle_DMR_05_tan_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"], + ["srifle_DMR_04_F","10Rnd_127x54_Mag"], + ["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"], + ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"], + ["launch_NLAW_F","NLAW_F"], + ["launch_RPG32_F","RPG7_F"], + ["launch_B_Titan_F","Titan_AT"], + ["launch_I_Titan_F","Titan_AT"], + ["launch_O_Titan_F","Titan_AP"], + ["launch_B_Titan_short_F","Titan_AA"], + ["launch_I_Titan_short_F","Titan_AA"], + ["launch_O_Titan_short_F","Titan_AA"], + ["launch_RPG7_F","RPG32_F"], + ["launch_O_Vorona_brown_F","vorona_HEAT"], + ["launch_O_Vorona_green_F","Vorona_HE"] + ], + [//Magazines + ["NLAW_F",1,3], + ["RPG32_F",1,3], + ["RPG32_HE_F",1,3], + ["Titan_AA",1,3], + ["Titan_AT",1,3], + ["Titan_AP",1,3], + ["RPG7_F",1,3], + ["vorona_HEAT",1,3], + ["Vorona_HE",1,3], + //["10Rnd_338_Mag",1,5], + ["10Rnd_338_Mag",3,5], + //["10Rnd_127x54_Mag" ,1,5], + ["10Rnd_127x54_Mag",3,5], + ["10Rnd_93x64_DMR_05_Mag" ,3,5], + //["10Rnd_93x64_DMR_05_Mag" ,1,5], + ["150Rnd_93x64_Mag",2,5], + ["130Rnd_338_Mag",3,5] + ], + [ // Optics + + ], + [// Materials and supplies + + ], + [//Items + ], + [ // Backpacks + + ] +]; // Time the marker remains after completing the mission in seconds - experimental not yet implemented blck_crateTypes = ["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F","Box_NATO_Wps_F","I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F"]; // Default crate type. diff --git a/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf b/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf index 568e067..dba74d4 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf @@ -29,7 +29,7 @@ // Note that you can define map-specific variants in custom_server\configs\blck_custom_config.sqf blck_useTimeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. - blck_timeAccelerationDay = 1; // Daytime time accelearation + blck_timeAccelerationDay = 2; // Daytime time accelearation blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation blck_timeAccelerationNight = 8; // Nighttim time acceleration @@ -64,7 +64,7 @@ // When set to true,"dot", ext will be to the right of a black dot at the center the mission marker. blck_labelMapMarkers = [true,"center"]; blck_preciseMapMarkers = false; // Map markers are/are not centered at the loot crate - blck_showCountAliveAI = true; + blck_showCountAliveAI = false; //Minimum distance between missions blck_MinDistanceFromMission = 1500; @@ -81,7 +81,15 @@ // It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission. blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether. blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion. - blck_loadCratesTiming = "atMissionCompletion"; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + blck_missionEndCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + 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. + blck_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. + blck_loadCratesTiming = "atMissionSpawn"; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming /////////////////////////////// // PLAYER PENALTIES @@ -103,9 +111,9 @@ /////////////////////////////// blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player, distance and name of AI unit killed are shown. blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Turn this off if you have vehicle patrols. - blck_cleanupCompositionTimer = 20*60; // Mission objects will be deleted after the mission is completed after a deley set by this timer. + blck_cleanupCompositionTimer = 30*60; // Mission objects will be deleted after the mission is completed after a deley set by this timer. blck_cleanUpLootChests = false; // when true, loot crates will be deleted together with other mission objects. - blck_MissionTimout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting. + blck_MissionTimeout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting. blck_AliveAICleanUpTimer = 60*20; // Time after mission completion at which any remaining live AI are deleted. /////////////////////////////// @@ -165,9 +173,9 @@ // Heli Patrol Settings /////////////////////////////// - blck_chanceHeliPatrolBlue = 0.2; //[0 - 1] Set to 0 to deactivate and 1 to always have a heli spawn over the mission center and patrol the mission area. The chance of paratroops dropping from the heli is defined by blck_chancePara(Blue|Red|Green|Orange) above. + blck_chanceHeliPatrolBlue = 0.8; //[0 - 1] Set to 0 to deactivate and 1 to always have a heli spawn over the mission center and patrol the mission area. The chance of paratroops dropping from the heli is defined by blck_chancePara(Blue|Red|Green|Orange) above. blck_patrolHelisBlue = _blck_littleBirds; - blck_noPatrolHelisBlue = 1; + blck_noPatrolHelisBlue = 0; blck_chanceHeliPatrolRed = 0.8; // 0.4; blck_patrolHelisRed = _blck_armed_hellcats; @@ -178,24 +186,31 @@ blck_noPatrolHelisGreen = [1,3]; blck_chanceHeliPatrolOrange = 0.9999; - blck_patrolHelisOrange = _blck_armed_attackHelis + _blck_armed_heavyAttackHelis + _blck_fighters; + blck_patrolHelisOrange = _blck_armed_attackHelis + _blck_armed_heavyAttackHelis; // + _blck_fighters; blck_noPatrolHelisOrange = [2,4]; + if (toLower(worldName) isEqualTo "namalsk") then + { + blck_patrolHelisRed = _blck_littleBirds + _blck_armed_hellcats; + blck_patrolHelisGreen = _blck_armed_hellcats + _blck_armed_ghosthawks; + blck_noPatrolHelisGreen = 1; + blck_patrolHelisOrange = _blck_armed_ghosthawks; + blck_noPatrolHelisOrange = 1; + }; //////////////////// // Enable / Disable Missions //////////////////// // Maximum number of missions shown on the map at any one time. // Change this value to reduce the number of spawned missions at any one time. - blck_maxSpawnedMissions = 9; - + blck_maxSpawnedMissions = 4; + //Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission - this feature is not recommended because you may run out of available groups. blck_enableOrangeMissions = 1; blck_enableGreenMissions = 1; - blck_enableRedMissions = 1; - blck_enableBlueMissions = 1; - blck_numberUnderwaterDynamicMissions = 5; // Values from 0 (no UMS) to N (N Underwater missions will be spawned; static UMS units and subs will be spawned. - + blck_enableRedMissions = 2; + blck_enableBlueMissions = 2; + blck_numberUnderwaterDynamicMissions = 2; // Values from 0 (no UMS) to N (N Underwater missions will be spawned; static UMS units and subs will be spawned. //////////////////// // MISSION TIMERS @@ -220,19 +235,19 @@ /////////////////////////////// blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area. - blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten outor been killed. - blck_vehicleDeleteTimer = 60*60; + blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out or been killed. + blck_vehicleDeleteTimer = 90*60; //60*60; //////////////////// // Mission Vehicle Settings //////////////////// - //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high - blck_SpawnVeh_Orange = [3,5]; // Number of static weapons at Orange Missions - blck_SpawnVeh_Green = [3,4]; // Number of static weapons at Green Missions - blck_SpawnVeh_Blue = 1; // Number of static weapons at Blue Missions - blck_SpawnVeh_Red = 2; // Number of static weapons at Red Missions + //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of vehicles. To discourage players running over AI with with vehicles, spawn more B_GMG_01_high + blck_SpawnVeh_Orange = [3,5]; // Number of vehicles at Orange Missions + blck_SpawnVeh_Green = [3,4]; // Number of vehicles at Green Missions + blck_SpawnVeh_Blue = 1; // Number of vehicles at Blue Missions + blck_SpawnVeh_Red = 2; // Number of vehicles at Red Missions /////////////////////////////// - // AI STATIC WEAPON PARAMETERS + // AI STATIC WEAPON Settings /////////////////////////////// blck_useStatic = true; // When true, AI will man static weapons spawned 20-30 meters from the mission center. These are very effective against most vehicles @@ -240,10 +255,6 @@ // B_Mortar_01_F, B_HMG_01_F, B_GMG_01_F blck_staticWeapons = ["B_HMG_01_high_F","B_GMG_01_high_F"]; // [0.50 cal, grenade launcher, AT Launcher] - //////////////////// - // Mission Static Weapon Settings - //////////////////// - // Defines how many static weapons to spawn. Set this to -1 to disable spawning blck_SpawnEmplaced_Orange = [3,5]; // Number of static weapons at Orange Missions blck_SpawnEmplaced_Green = [3,4]; // Number of static weapons at Green Missions @@ -270,7 +281,9 @@ //blck_launcherTypes = ["launch_RPG32_F"]; blck_launchersPerGroup = 5; // Defines the number of AI per group spawned with a launcher blck_launcherCleanup = false;// When true, launchers and launcher ammo are removed from dead AI. - + 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; + //This defines how long after an AI dies that it's body disappears. blck_bodyCleanUpTimer = 40*60; // time in seconds after which dead AI bodies are deleted @@ -331,7 +344,7 @@ blck_maxMoneyGreen = 40; blck_maxMoneyRed = 30; blck_maxMoneyBlue = 20; - + private["_modType"]; _modType = [] call blck_fnc_getModType; if (_modType isEqualTo "Epoch") then diff --git a/@GMS/addons/custom_server/Configs/blck_custom_config.sqf b/@GMS/addons/custom_server/Configs/blck_custom_config.sqf index f30cd6c..bacffde 100644 --- a/@GMS/addons/custom_server/Configs/blck_custom_config.sqf +++ b/@GMS/addons/custom_server/Configs/blck_custom_config.sqf @@ -26,6 +26,7 @@ switch (_world) do { case "napf":{_nightAccel = 12; _dayAccel = 2;_duskAccel = 6;}; case "namalsk":{_nightAccel = 12; _dayAccel = 2;_duskAccel = 6;}; case "tanoa":{_nightAccel = 12; _dayAccel = 3.2;_duskAccel = 6;}; + case "namalsk":{_nightAccel = 12; _dayAccel = 2; _duskAccel = 6;}; }; switch (toLower (worldName)) do @@ -39,23 +40,37 @@ switch (toLower (worldName)) do _daylight = _sunset - _sunrise; _nightTime = abs(24 - _daylight); _time = dayTime; - - //blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. - //blck_timeAccelerationDay = (_daylight)/6; // Daytime time accelearation - //blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation - //blck_timeAccelerationNight = _nightTime / 6; // Nighttim time acceleration - blck_maxCrashSites = 3; + #ifdef blck_milServer + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = (_daylight)/3; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = _nightTime / 6; // Nighttim time acceleration + #else + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = (_daylight)/8; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = _nightTime / 8; // Nighttim time acceleration + #endif + //blck_maxCrashSites = 3; }; case"tanoa": { blck_maxCrashSites = 2; - //blck_timeAcceleration = 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.4; // Daytime time accelearation - //blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation - //blck_timeAccelerationNight = 8; // Nighttim time acceleration + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1.4; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 8; // Nighttim time acceleration }; case"namalsk": { + private ["_arr","_sunrise","_sunset","_time"]; + _arr = date call BIS_fnc_sunriseSunsetTime; + _sunrise = _arr select 0; + _sunset = _arr select 1; + _daylight = _sunset - _sunrise; + _nightTime = abs(24 - _daylight); + _time = dayTime; + _serverUpTime = 8; blck_enableOrangeMissions = 1; blck_enableGreenMissions = -1; blck_enableRedMissions = 1; @@ -64,10 +79,10 @@ switch (toLower (worldName)) do blck_enableScoutsMissions = -1; blck_maxCrashSites = 1; // recommended settings: 3 for Altis, 2 for Tanoa, 1 for smaller maps. Set to -1 to disable - //blck_timeAcceleration = 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 + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 2; // Daytime time accelearation + blck_timeAccelerationDusk = 6; // Dawn/dusk time accelearation + blck_timeAccelerationNight = (12); // Nighttim time acceleration }; case "esseker": { @@ -79,18 +94,18 @@ switch (toLower (worldName)) do blck_enableScoutsMissions = -1; blck_maxCrashSites = 1; - //blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. - //blck_timeAccelerationDay = 1; // Daytime time accelearation - //blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation - //blck_timeAccelerationNight = 6; // Nighttim time acceleration + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1; // Daytime time accelearation + blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 6; // Nighttim time acceleration }; case "panthera3": { blck_maxCrashSites = 2; - //blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. - //blck_timeAccelerationDay = 1.4; // Daytime time accelearation - //blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation - //blck_timeAccelerationNight = 8; // Nighttim time acceleration + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1.4; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 8; // Nighttim time acceleration }; case "malden": { @@ -100,10 +115,18 @@ switch (toLower (worldName)) do _time = dayTime; _daylight = _sunset - _sunrise; - //blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. blck_timeAccelerationDay = (_daylight / 2.5); // Daytime time accelearation blck_timeAccelerationDusk = 8; // Dawn/dusk time accelearation - blck_timeAccelerationNight = ((24 - _daylight) / 1.5); // Nighttim time acceleration + blck_timeAccelerationNight = ((24 - _daylight) / 1.5); // Nighttim time acceleration + blck_enableOrangeMissions = -1; + blck_enableGreenMissions = -1; + blck_enableRedMissions = -2; + blck_enableBlueMissions = -1; + blck_numberUnderwaterDynamicMissions = -3; + blck_enableHunterMissions = -1; + blck_enableScoutsMissions = -1; + blck_maxCrashSites = 3; }; }; @@ -117,37 +140,53 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in //blck_timeAccelerationDusk = 18; // Dawn/dusk time accelearation //blck_timeAccelerationNight = 24; // Nighttim time acceleration - //blck_useHC = true; - blck_maxSpawnedMissions = 10; + blck_useHC = true; + + blck_maxSpawnedMissions = 15; blck_mainThreadUpdateInterval = 10; blck_enableOrangeMissions = 1; blck_enableGreenMissions = 1; +<<<<<<< HEAD blck_enableRedMissions = -2; blck_enableBlueMissions = -2; blck_numberUnderwaterDynamicMissions = 3; blck_enableHunterMissions = -1; blck_enableScoutsMissions = -1; blck_maxCrashSites = 0; +======= + blck_enableRedMissions = 1; + blck_enableBlueMissions = 1; + blck_numberUnderwaterDynamicMissions = -1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = 1; + blck_maxCrashSites = 1; +>>>>>>> Experimental - //blck_enabeUnderwaterMissions = 1; + blck_cleanupCompositionTimer = 20; // Time after mission completion at which items in the composition are deleted. + blck_AliveAICleanUpTimer = 20; // Time after mission completion at which any remaining live AI are deleted. + blck_bodyCleanUpTimer = 20; + blck_vehicleDeleteTimer = 20; + //blck_MissionTimeout = 30; - blck_cleanupCompositionTimer = 10; // Time after mission completion at which items in the composition are deleted. - blck_AliveAICleanUpTimer = 10; // Time after mission completion at which any remaining live AI are deleted. - blck_bodyCleanUpTimer = 10; - blck_vehicleDeleteTimer = 60; + blck_noPatrolHelisOrange = 1; + blck_chanceHeliPatrolOrange = 1; + blck_chanceParaOrange = 1; + blck_chanceHeliPatrolBlue = -1; + blck_noPatrolHelisBlue = -1; + blck_chanceParaBlue = -1; // [0 - 1] set to 0 to deactivate and 1 to always have paratroops spawn over the center of the mission. This value can be a range as well [0.1,0.3] + blck_noParaBlue = 3; // [1-N] + blck_paraTriggerDistanceBlue = 400; - blck_noPatrolHelisOrange = 0; - //blck_chanceHeliPatrolBlue = 1; - blck_SpawnEmplaced_Orange = 0; // Number of static weapons at Orange Missions - blck_SpawnEmplaced_Green = 0; // Number of static weapons at Green Missions - blck_SpawnEmplaced_Blue = 0; // Number of static weapons at Blue Missions - blck_SpawnEmplaced_Red = 0; + blck_SpawnEmplaced_Orange = 1; // Number of static weapons at Orange Missions + blck_SpawnEmplaced_Green = 1; // Number of static weapons at Green Missions + blck_SpawnEmplaced_Blue = -1; // Number of static weapons at Blue Missions + blck_SpawnEmplaced_Red = 1; - blck_SpawnVeh_Orange = [2,4]; // Number of static weapons at Orange Missions - blck_SpawnVeh_Green = 3; // Number of static weapons at Green Missions - blck_SpawnVeh_Blue = 1; // Number of static weapons at Blue Missions - blck_SpawnVeh_Red = 2; + blck_SpawnVeh_Orange = 1; // Number of vehicles at Orange Missions + blck_SpawnVeh_Green = 1; // Number of vehicles at Green Missions + blck_SpawnVeh_Blue = -4; // Number of vehicles at Blue Missions + blck_SpawnVeh_Red = 1; blck_TMin_Blue = 7; blck_TMin_Red = 10; @@ -166,12 +205,16 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in blck_TMax_Scouts = 22; blck_TMax_Crashes = 15; blck_TMax_UMS = 25; - //blck_MissionTimout = 360; // 40 min - /* - blck_MinAI_Blue = 3; - blck_MaxAI_Blue = 5; + + //blck_MinAI_Orange = 1; + //blck_MaxAI_Orange = 2; + //blck_AIGrps_Orange = 1; + + blck_MinAI_Blue = 1; + blck_MaxAI_Blue = 2; blck_AIGrps_Blue = 1; - */ + + blck_AIPatrolVehicles = ["Exile_Car_MB4WDOpen"]; /* blck_SkillsBlue = [ ["aimingAccuracy",0.01], @@ -188,5 +231,1131 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in */ }; +blck_CUPWeapons = [ + "CUP_lmg_L7A2", + "CUP_lmg_L110A1", + "CUP_lmg_M240", + "CUP_lmg_M249", + "CUP_lmg_M249_ElcanM145_Laser", + "CUP_lmg_Mk48_des", + "CUP_lmg_Mk48_wdl", + "CUP_lmg_PKM", + "CUP_lmg_UK59", + "CUP_lmg_Pecheneg", + "CUP_arifle_AK74", + "CUP_arifle_AK107", + "CUP_arifle_AK107_GL", + "CUP_arifle_AKS74", + "CUP_arifle_AKS74U", + "CUP_arifle_AK74_GL", + "CUP_arifle_AKM", + "CUP_arifle_AKS", + "CUP_arifle_AKS_Gold", + "CUP_arifle_RPK74", + "CUP_arifle_CZ805_A2", + "CUP_arifle_FNFAL", + "CUP_arifle_G36A", + "CUP_arifle_G36A_camo", + "CUP_arifle_G36K", + "CUP_arifle_G36K_camo", + "CUP_arifle_G36C", + "CUP_arifle_G36C_camo", + "CUP_arifle_MG36", + "CUP_arifle_MG36_camo", + "CUP_arifle_L85A2", + "CUP_arifle_L85A2_GL", + "CUP_arifle_L86A2", + "CUP_arifle_M16A2", + "CUP_arifle_M16A2_GL", + "CUP_arifle_M4A1", + "CUP_arifle_M4A1_camo", + "CUP_arifle_M4A3_desert_Aim_Flashlight", + "CUP_arifle_M16A4_Base", + "CUP_arifle_M4A1_BUIS_GL", + "CUP_arifle_M4A1_BUIS_camo_GL", + "CUP_arifle_M4A1_BUIS_desert_GL", + "CUP_arifle_M4A1_desert", + "CUP_arifle_Sa58P", + "CUP_arifle_Sa58V", + "CUP_arifle_Mk16_CQC", + "CUP_arifle_XM8_Railed", + "CUP_arifle_XM8_Carbine", + "CUP_arifle_XM8_Carbine_FG", + "CUP_arifle_XM8_Carbine_GL", + "CUP_arifle_XM8_Compact", + "CUP_arifle_xm8_SAW", + "CUP_arifle_xm8_sharpshooter", + "CUP_arifle_CZ805_A1", + "CUP_arifle_CZ805_GL", + "CUP_arifle_CZ805_B_GL", + "CUP_arifle_CZ805_B", + "CUP_arifle_Sa58P_des", + "CUP_arifle_Sa58V_camo", + "CUP_arifle_Sa58RIS1", + "CUP_arifle_Sa58RIS2", + "CUP_arifle_Mk16_CQC_FG", + "CUP_arifle_Mk16_CQC_SFG", + "CUP_arifle_Mk16_CQC_EGLM", + "CUP_arifle_Mk16_STD", + "CUP_arifle_Mk16_STD_FG", + "CUP_arifle_Mk16_STD_SFG", + "CUP_arifle_Mk16_STD_EGLM", + "CUP_arifle_Mk16_SV", + "CUP_arifle_Mk17_CQC", + "CUP_arifle_Mk17_CQC_FG", + "CUP_arifle_Mk17_CQC_SFG", + "CUP_arifle_Mk17_CQC_EGLM", + "CUP_arifle_Mk17_STD", + "CUP_arifle_Mk17_STD_FG", + "CUP_arifle_Mk17_STD_SFG", + "CUP_arifle_Mk17_STD_EGLM", + "CUP_arifle_Mk20", + "CUP_srifle_AWM_des", + "CUP_srifle_AWM_wdl", + "CUP_srifle_CZ750", + "CUP_srifle_DMR", + "CUP_srifle_CZ550", + "CUP_srifle_LeeEnfield", + "CUP_srifle_M14", + "CUP_srifle_Mk12SPR", + "CUP_srifle_M24_des", + "CUP_srifle_M24_wdl", + "CUP_srifle_M24_ghillie", + "CUP_srifle_M40A3", + "CUP_srifle_M107_Base", + "CUP_srifle_M110", + "CUP_srifle_SVD", + "CUP_srifle_SVD_des", + "CUP_srifle_SVD_wdl_ghillie", + "CUP_srifle_SVD_NSPU", + "CUP_srifle_ksvk", + "CUP_srifle_VSSVintorez", + "CUP_srifle_AS50" +]; +blck_CUPUniforms = [ + "CUP_U_B_CZ_WDL_TShirt", + "CUP_U_I_GUE_Anorak_01", + "CUP_U_I_GUE_Anorak_03", + "CUP_U_I_GUE_Anorak_02", + "CUP_U_B_BAF_DDPM_S2_UnRolled", + "CUP_U_B_BAF_DDPM_S1_RolledUp", + "CUP_U_B_BAF_DDPM_Tshirt", + "CUP_U_B_BAF_DPM_S2_UnRolled", + "CUP_U_B_BAF_DPM_S1_RolledUp", + "CUP_U_B_BAF_DPM_Tshirt", + "CUP_U_B_BAF_MTP_S2_UnRolled", + "CUP_U_B_BAF_MTP_S1_RolledUp", + "CUP_U_B_BAF_MTP_Tshirt", + "CUP_U_B_BAF_MTP_S4_UnRolled", + "CUP_U_B_BAF_MTP_S3_RolledUp", + "CUP_U_B_BAF_MTP_S5_UnRolled", + "CUP_U_B_BAF_MTP_S6_UnRolled", + "CUP_U_O_CHDKZ_Bardak", + "CUP_U_O_CHDKZ_Lopotev", + "CUP_U_O_CHDKZ_Kam_03", + "CUP_U_O_CHDKZ_Kam_01", + "CUP_U_O_CHDKZ_Kam_04", + "CUP_U_O_CHDKZ_Kam_02", + "CUP_U_O_CHDKZ_Commander", + "CUP_U_O_CHDKZ_Kam_08", + "CUP_U_O_CHDKZ_Kam_05", + "CUP_U_O_CHDKZ_Kam_07", + "CUP_U_O_CHDKZ_Kam_06", + "CUP_U_C_Citizen_02", + "CUP_U_C_Citizen_01", + "CUP_U_C_Citizen_04", + "CUP_U_C_Citizen_03", + "CUP_U_C_Fireman_01", + "CUP_U_B_GER_Flecktarn_2", + "CUP_U_B_GER_Tropentarn_2", + "CUP_U_B_GER_Flecktarn_1", + "CUP_U_B_GER_Tropentarn_1", + "CUP_O_TKI_Khet_Jeans_04", + "CUP_O_TKI_Khet_Jeans_02", + "CUP_O_TKI_Khet_Jeans_01", + "CUP_O_TKI_Khet_Jeans_03", + "CUP_O_TKI_Khet_Partug_04", + "CUP_O_TKI_Khet_Partug_02", + "CUP_O_TKI_Khet_Partug_01", + "CUP_O_TKI_Khet_Partug_07", + "CUP_O_TKI_Khet_Partug_08", + "CUP_O_TKI_Khet_Partug_05", + "CUP_O_TKI_Khet_Partug_06", + "CUP_O_TKI_Khet_Partug_03", + "CUP_U_C_Labcoat_02", + "CUP_U_C_Labcoat_03", + "CUP_U_C_Labcoat_01", + "CUP_U_B_USMC_Officer", + "CUP_U_B_USMC_MARPAT_WDL_RollUpKneepad", + "CUP_U_B_USMC_MARPAT_WDL_RolledUp", + "CUP_U_B_USMC_MARPAT_WDL_Kneepad", + "CUP_U_B_USMC_MARPAT_WDL_TwoKneepads", + "CUP_U_B_USMC_MARPAT_WDL_Sleeves", + "CUP_U_C_Mechanic_02", + "CUP_U_C_Mechanic_03", + "CUP_U_C_Mechanic_01", + "CUP_U_I_GUE_Flecktarn2", + "CUP_U_I_GUE_Flecktarn3", + "CUP_U_I_GUE_Flecktarn", + "CUP_U_I_GUE_Woodland1", + "CUP_B_USMC_Navy_Blue", + "CUP_B_USMC_Navy_Brown", + "CUP_B_USMC_Navy_Green", + "CUP_B_USMC_Navy_Red", + "CUP_B_USMC_Navy_Violet", + "CUP_B_USMC_Navy_White", + "CUP_B_USMC_Navy_Yellow", + "CUP_U_C_Rescuer_01", + "CUP_U_O_Partisan_TTsKO", + "CUP_U_O_Partisan_TTsKO_Mixed", + "CUP_U_O_Partisan_VSR_Mixed1", + "CUP_U_O_Partisan_VSR_Mixed2", + "CUP_U_C_Pilot_01", + "CUP_U_C_Policeman_01", + "CUP_U_C_Priest_01", + "CUP_U_C_Profiteer_02", + "CUP_U_C_Profiteer_03", + "CUP_U_C_Profiteer_01", + "CUP_U_C_Profiteer_04", + "CUP_U_I_RACS_Desert_2", + "CUP_U_I_RACS_Urban_2", + "CUP_U_I_RACS_PilotOverall", + "CUP_U_I_RACS_Desert_1", + "CUP_U_I_RACS_Urban_1", + "CUP_U_C_Rocker_01", + "CUP_U_C_Rocker_03", + "CUP_U_C_Rocker_02", + "CUP_U_C_Rocker_04", + "CUP_U_O_RUS_Gorka_Green", + "CUP_U_O_RUS_Gorka_Partizan_A", + "CUP_U_O_RUS_Gorka_Partizan", + "CUP_U_O_RUS_EMR_1_VDV", + "CUP_U_O_RUS_EMR_1", + "CUP_U_O_RUS_Flora_1_VDV", + "CUP_U_O_RUS_Flora_1", + "CUP_U_O_RUS_Commander", + "CUP_U_O_RUS_EMR_2_VDV", + "CUP_U_O_RUS_EMR_2", + "CUP_U_O_RUS_Flora_2_VDV", + "CUP_U_O_RUS_Flora_2", + "CUP_U_O_SLA_Officer_Suit", + "CUP_U_O_SLA_Overalls_Pilot", + "CUP_U_O_SLA_Overalls_Tank", + "CUP_U_O_SLA_MixedCamo", + "CUP_U_O_SLA_Desert", + "CUP_U_O_SLA_Green", + "CUP_U_O_SLA_Urban", + "CUP_U_B_FR_SpecOps", + "CUP_U_B_FR_Officer", + "CUP_U_B_FR_DirAction", + "CUP_U_B_FR_DirAction2", + "CUP_U_B_FR_Corpsman", + "CUP_U_B_FR_Light", + "CUP_U_B_FR_Scout1", + "CUP_U_B_FR_Scout2", + "CUP_U_B_FR_Scout3", + "CUP_U_B_FR_Scout", + "CUP_U_C_Suit_01", + "CUP_U_C_Suit_02", + "CUP_U_O_TK_Officer", + "CUP_U_O_SLA_Officer", + "CUP_U_O_TK_Green", + "CUP_U_O_TK_MixedCamo", + "CUP_U_B_USArmy_TwoKnee", + "CUP_U_B_USArmy_Base", + "CUP_U_B_USArmy_Soft", + "CUP_U_B_USArmy_UBACS", + "CUP_U_B_USArmy_PilotOverall", + "CUP_U_B_USMC_PilotOverall", + "CUP_U_C_Villager_01", + "CUP_U_C_Villager_04", + "CUP_U_C_Villager_02", + "CUP_U_C_Villager_03", + "CUP_U_C_Woodlander_01", + "CUP_U_C_Woodlander_02", + "CUP_U_C_Woodlander_03", + "CUP_U_C_Woodlander_04", + "CUP_U_C_Worker_03", + "CUP_U_C_Worker_04", + "CUP_U_C_Worker_02", + "CUP_U_C_Worker_01", + "CUP_U_B_BAF_DDPM_Ghillie", + "CUP_U_B_BAF_MTP_Ghillie", + "CUP_U_B_BAF_DPM_Ghillie", + "CUP_U_B_GER_Ghillie", + "CUP_U_B_GER_Fleck_Ghillie", + "CUP_U_B_USMC_Ghillie_WDL", + "CUP_U_I_Ghillie_Top", + "CUP_U_O_RUS_Ghillie", + "CUP_U_O_TK_Ghillie", + "CUP_U_O_TK_Ghillie_Top", + "CUP_U_B_USArmy_Ghillie" +]; +blck_CUPVests = [ + "CUP_V_BAF_Osprey_Mk2_DDPM_Grenadier", + "CUP_V_BAF_Osprey_Mk2_DDPM_Medic", + "CUP_V_BAF_Osprey_Mk2_DDPM_Officer", + "CUP_V_BAF_Osprey_Mk2_DDPM_Sapper", + "CUP_V_BAF_Osprey_Mk2_DDPM_Scout", + "CUP_V_BAF_Osprey_Mk2_DDPM_Soldier1", + "CUP_V_BAF_Osprey_Mk2_DDPM_Soldier2", + "CUP_V_BAF_Osprey_Mk2_DPM_Grenadier", + "CUP_V_BAF_Osprey_Mk2_DPM_Medic", + "CUP_V_BAF_Osprey_Mk2_DPM_Officer", + "CUP_V_BAF_Osprey_Mk2_DPM_Sapper", + "CUP_V_BAF_Osprey_Mk2_DPM_Scout", + "CUP_V_BAF_Osprey_Mk2_DPM_Soldier1", + "CUP_V_BAF_Osprey_Mk2_DPM_Soldier2", + "CUP_V_BAF_Osprey_Mk4_MTP_Grenadier", + "CUP_V_BAF_Osprey_Mk4_MTP_MachineGunner", + "CUP_V_BAF_Osprey_Mk4_MTP_Rifleman", + "CUP_V_BAF_Osprey_Mk4_MTP_SquadLeader", + "CUP_V_B_GER_Carrier_Rig", + "CUP_V_B_GER_Carrier_Rig_2", + "CUP_V_B_GER_Carrier_Vest", + "CUP_V_B_GER_Carrier_Vest_2", + "CUP_V_B_GER_Carrier_Vest_3", + "CUP_V_B_GER_Vest_1", + "CUP_V_B_GER_Vest_2", + "CUP_V_B_LHDVest_Blue", + "CUP_V_B_LHDVest_Brown", + "CUP_V_B_LHDVest_Green", + "CUP_V_B_LHDVest_Red", + "CUP_V_B_LHDVest_Violet", + "CUP_V_B_LHDVest_White", + "CUP_V_B_LHDVest_Yellow", + "CUP_V_B_MTV", + "CUP_V_B_MTV_LegPouch", + "CUP_V_B_MTV_MG", + "CUP_V_B_MTV_Marksman", + "CUP_V_B_MTV_Mine", + "CUP_V_B_MTV_Patrol", + "CUP_V_B_MTV_PistolBlack", + "CUP_V_B_MTV_Pouches", + "CUP_V_B_MTV_TL", + "CUP_V_B_MTV_noCB", + "CUP_V_B_PilotVest", + "CUP_V_B_RRV_DA1", + "CUP_V_B_RRV_DA2", + "CUP_V_B_RRV_Light", + "CUP_V_B_RRV_MG", + "CUP_V_B_RRV_Medic", + "CUP_V_B_RRV_Officer", + "CUP_V_B_RRV_Scout", + "CUP_V_B_RRV_Scout2", + "CUP_V_B_RRV_Scout3", + "CUP_V_B_RRV_TL", + "CUP_V_I_Carrier_Belt", + "CUP_V_I_Guerilla_Jacket", + "CUP_V_I_RACS_Carrier_Vest", + "CUP_V_I_RACS_Carrier_Vest_2", + "CUP_V_I_RACS_Carrier_Vest_3", + "CUP_V_OI_TKI_Jacket1_01", + "CUP_V_OI_TKI_Jacket1_02", + "CUP_V_OI_TKI_Jacket1_03", + "CUP_V_OI_TKI_Jacket1_04", + "CUP_V_OI_TKI_Jacket1_05", + "CUP_V_OI_TKI_Jacket1_06", + "CUP_V_OI_TKI_Jacket2_01", + "CUP_V_OI_TKI_Jacket2_02", + "CUP_V_OI_TKI_Jacket2_03", + "CUP_V_OI_TKI_Jacket2_04", + "CUP_V_OI_TKI_Jacket2_05", + "CUP_V_OI_TKI_Jacket2_06", + "CUP_V_OI_TKI_Jacket3_01", + "CUP_V_OI_TKI_Jacket3_02", + "CUP_V_OI_TKI_Jacket3_03", + "CUP_V_OI_TKI_Jacket3_04", + "CUP_V_OI_TKI_Jacket3_05", + "CUP_V_OI_TKI_Jacket3_06", + "CUP_V_OI_TKI_Jacket4_01", + "CUP_V_OI_TKI_Jacket4_02", + "CUP_V_OI_TKI_Jacket4_03", + "CUP_V_OI_TKI_Jacket4_04", + "CUP_V_OI_TKI_Jacket4_05", + "CUP_V_OI_TKI_Jacket4_06", + "CUP_V_O_SLA_Carrier_Belt", + "CUP_V_O_SLA_Carrier_Belt02", + "CUP_V_O_SLA_Carrier_Belt03", + "CUP_V_O_SLA_Flak_Vest01", + "CUP_V_O_SLA_Flak_Vest02", + "CUP_V_O_SLA_Flak_Vest03", + "CUP_V_O_TK_CrewBelt", + "CUP_V_O_TK_OfficerBelt", + "CUP_V_O_TK_OfficerBelt2", + "CUP_V_O_TK_Vest_1", + "CUP_V_O_TK_Vest_2" +]; + +blck_CUPBackpacks = [ + "CUP_B_ACRPara_m95", + "CUP_B_AssaultPack_ACU", + "CUP_B_AssaultPack_Black", + "CUP_B_AssaultPack_Coyote", + "CUP_B_Bergen_BAF", + "CUP_B_CivPack_WDL", + "CUP_B_GER_Pack_Flecktarn", + "CUP_B_GER_Pack_Tropentarn", + "CUP_B_HikingPack_Civ", + "CUP_B_MOLLE_WDL", + "CUP_B_RUS_Backpack", + "CUP_B_USMC_AssaultPack", + "CUP_B_USMC_MOLLE", + "CUP_B_USPack_Black", + "CUP_B_USPack_Coyote" +]; + +blck_CUPHeadgear = [ + "CUP_H_BAF_Helmet_1_DDPM", + "CUP_H_BAF_Helmet_1_DPM", + "CUP_H_BAF_Helmet_1_MTP", + "CUP_H_BAF_Helmet_2_DDPM", + "CUP_H_BAF_Helmet_2_DPM", + "CUP_H_BAF_Helmet_2_MTP", + "CUP_H_BAF_Helmet_3_DDPM", + "CUP_H_BAF_Helmet_3_DPM", + "CUP_H_BAF_Helmet_3_MTP", + "CUP_H_BAF_Helmet_4_DDPM", + "CUP_H_BAF_Helmet_4_DPM", + "CUP_H_BAF_Helmet_4_MTP", + "CUP_H_BAF_Officer_Beret_PRR_O", + "CUP_H_C_Beanie_01", + "CUP_H_C_Beanie_02", + "CUP_H_C_Beanie_03", + "CUP_H_C_Beanie_04", + "CUP_H_C_Beret_01", + "CUP_H_C_Beret_02", + "CUP_H_C_Beret_03", + "CUP_H_C_Beret_04", + "CUP_H_C_Ushanka_01", + "CUP_H_C_Ushanka_02", + "CUP_H_C_Ushanka_03", + "CUP_H_C_Ushanka_04", + "CUP_H_FR_BandanaGreen", + "CUP_H_FR_BandanaWdl", + "CUP_H_FR_Bandana_Headset", + "CUP_H_FR_BeanieGreen", + "CUP_H_FR_BoonieMARPAT", + "CUP_H_FR_BoonieWDL", + "CUP_H_FR_Cap_Headset_Green", + "CUP_H_FR_Cap_Officer_Headset", + "CUP_H_FR_ECH", + "CUP_H_FR_Headband_Headset", + "CUP_H_FR_Headset", + "CUP_H_FR_PRR_BoonieWDL", + "CUP_H_GER_Boonie_Flecktarn", + "CUP_H_GER_Boonie_desert", + "CUP_H_NAPA_Fedora", + "CUP_H_Navy_CrewHelmet_Blue", + "CUP_H_Navy_CrewHelmet_Brown", + "CUP_H_Navy_CrewHelmet_Green", + "CUP_H_Navy_CrewHelmet_Red", + "CUP_H_Navy_CrewHelmet_Violet", + "CUP_H_Navy_CrewHelmet_White", + "CUP_H_Navy_CrewHelmet_Yellow", + "CUP_H_PMC_Cap_Grey", + "CUP_H_PMC_Cap_PRR_Grey", + "CUP_H_PMC_Cap_PRR_Tan", + "CUP_H_PMC_Cap_Tan", + "CUP_H_PMC_EP_Headset", + "CUP_H_PMC_PRR_Headset", + "CUP_H_RACS_Beret_Blue", + "CUP_H_RACS_Helmet_DPAT", + "CUP_H_RACS_Helmet_Des", + "CUP_H_RACS_Helmet_Goggles_DPAT", + "CUP_H_RACS_Helmet_Goggles_Des", + "CUP_H_RACS_Helmet_Headset_DPAT", + "CUP_H_RACS_Helmet_Headset_Des", + "CUP_H_SLA_BeenieGreen", + "CUP_H_SLA_Beret", + "CUP_H_SLA_Boonie", + "CUP_H_SLA_Helmet", + "CUP_H_SLA_OfficerCap", + "CUP_H_SLA_Pilot_Helmet", + "CUP_H_SLA_SLCap", + "CUP_H_SLA_TankerHelmet", + "CUP_H_TKI_Lungee_01", + "CUP_H_TKI_Lungee_02", + "CUP_H_TKI_Lungee_03", + "CUP_H_TKI_Lungee_04", + "CUP_H_TKI_Lungee_05", + "CUP_H_TKI_Lungee_06", + "CUP_H_TKI_Lungee_Open_01", + "CUP_H_TKI_Lungee_Open_02", + "CUP_H_TKI_Lungee_Open_03", + "CUP_H_TKI_Lungee_Open_04", + "CUP_H_TKI_Lungee_Open_05", + "CUP_H_TKI_Lungee_Open_06", + "CUP_H_TKI_Pakol_1_01", + "CUP_H_TKI_Pakol_1_02", + "CUP_H_TKI_Pakol_1_03", + "CUP_H_TKI_Pakol_1_04", + "CUP_H_TKI_Pakol_1_05", + "CUP_H_TKI_Pakol_1_06", + "CUP_H_TKI_Pakol_2_01", + "CUP_H_TKI_Pakol_2_02", + "CUP_H_TKI_Pakol_2_03", + "CUP_H_TKI_Pakol_2_04", + "CUP_H_TKI_Pakol_2_05", + "CUP_H_TKI_Pakol_2_06", + "CUP_H_TKI_SkullCap_01", + "CUP_H_TKI_SkullCap_02", + "CUP_H_TKI_SkullCap_03", + "CUP_H_TKI_SkullCap_04", + "CUP_H_TKI_SkullCap_05", + "CUP_H_TKI_SkullCap_06", + "CUP_H_TK_Beret", + "CUP_H_TK_Helmet", + "CUP_H_TK_Lungee", + "CUP_H_TK_PilotHelmet", + "CUP_H_TK_TankerHelmet", + "CUP_H_USMC_Crew_Helmet", + "CUP_H_USMC_Goggles_HelmetWDL", + "CUP_H_USMC_HeadSet_GoggleW_HelmetWDL", + "CUP_H_USMC_HeadSet_HelmetWDL", + "CUP_H_USMC_HelmetWDL", + "CUP_H_USMC_Helmet_Pilot", + "CUP_H_USMC_Officer_Cap" +]; +blck_RHS_Weapons = [ + "rhs_weap_hk416d10", + "rhs_weap_hk416d10_LMT", + "rhs_weap_hk416d10_m320", + "rhs_weap_hk416d145", + "rhs_weap_hk416d145_m320", + "rhs_weap_m16a4", + "rhs_weap_m16a4_carryhandle", + "rhs_weap_m16a4_carryhandle_M203", + "rhs_weap_m16a4_carryhandle_pmag", + "rhs_weap_m4_carryhandle", + "rhs_weap_m4_carryhandle_pmag", + "rhs_weap_m4_m203", + "rhs_weap_m4_m320", + "rhs_weap_m4a1", + "rhs_weap_m4a1_blockII", + "rhs_weap_m4a1_blockII_KAC", + "rhs_weap_m4a1_blockII_KAC_bk", + "rhs_weap_m4a1_blockII_KAC_d", + "rhs_weap_m4a1_blockII_KAC_wd", + "rhs_weap_m4a1_blockII_M203", + "rhs_weap_m4a1_blockII_M203_bk", + "rhs_weap_m4a1_blockII_M203_d", + "rhs_weap_m4a1_blockII_M203_wd", + "rhs_weap_m4a1_blockII_bk", + "rhs_weap_m4a1_blockII_d", + "rhs_weap_m4a1_blockII_wd", + "rhs_weap_m4a1_carryhandle", + "rhs_weap_m4a1_carryhandle_m203", + "rhs_weap_m4a1_carryhandle_pmag", + "rhs_weap_m4a1_m203", + "rhs_weap_m4a1_m320", + "rhs_weap_mk18", + "rhs_weap_mk18", + "rhs_weap_mk18_KAC", + "rhs_weap_mk18_KAC_bk", + "rhs_weap_mk18_KAC_d", + "rhs_weap_mk18_KAC_wd", + "rhs_weap_mk18_bk", + "rhs_weap_mk18_d", + "rhs_weap_mk18_m320", + "rhs_weap_mk18_wd", + "rhs_weap_m249_pip_L", + "rhs_weap_m249_pip_L_para", + "rhs_weap_m249_pip_L_vfg", + "rhs_weap_m249_pip_S", + "rhs_weap_m249_pip_S_para", + "rhs_weap_m249_pip_S_vfg", + "rhs_weap_m240B", + "rhs_weap_m240B_CAP", + "rhs_weap_m240G", + "rhs_weap_pkm", + "rhs_weap_pkp", + // Added by ElShotte - 1 Item + "rhs_weap_m27iar" +]; + +blck_RHS_UniformsUSAF = [ + "rhs_uniform_FROG01_m81", + "rhs_uniform_FROG01_d", + "rhs_uniform_FROG01_wd", + "rhs_uniform_cu_ocp", + "rhs_uniform_cu_ucp", + "rhs_uniform_cu_ocp_101st", + "rhs_uniform_cu_ocp_10th", + "rhs_uniform_cu_ocp_1stcav", + "rhs_uniform_cu_ocp_82nd", + "rhs_uniform_cu_ucp_101st", + "rhs_uniform_cu_ucp_10th", + "rhs_uniform_cu_ucp_1stcav", + "rhs_uniform_cu_ucp_82nd", + "rhs_uniform_cu_ocp_patchless", + "rhs_uniform_cu_ucp_patchless", + // Added by ElShotte - 5 Items + "rhs_uniform_g3_m81", + "rhs_uniform_g3_blk", + "rhs_uniform_g3_mc", + "rhs_uniform_g3_rgr", + "rhs_uniform_g3_tan" + +]; + +blck_RHS_VestsUSAF = [ + "rhsusf_iotv_ucp", + "rhsusf_iotv_ucp_grenadier", + "rhsusf_iotv_ucp_medic", + "rhsusf_iotv_ucp_repair", + "rhsusf_iotv_ucp_rifleman", + "rhsusf_iotv_ucp_SAW", + "rhsusf_iotv_ucp_squadleader", + "rhsusf_iotv_ucp_teamleader", + "rhsusf_iotv_ocp", + "rhsusf_iotv_ocp_grenadier", + "rhsusf_iotv_ocp_medic", + "rhsusf_iotv_ocp_repair", + "rhsusf_iotv_ocp_rifleman", + "rhsusf_iotv_ocp_SAW", + "rhsusf_iotv_ocp_squadleader", + "rhsusf_iotv_ocp_teamleader", + //added by chainsaw - 2 + "rhsusf_spc", + "rhsusf_spc_mg", + // Added by ElShotte - 12 Items + "rhsusf_spc_marksman", + "rhsusf_spc_corpsman", + "rhsusf_spc_patchless", + "rhsusf_spc_squadleader", + "rhsusf_spc_teamleader", + "rhsusf_spc_light", + "rhsusf_spc_rifleman", + "rhsusf_spc_iar", + "rhsusf_spcs_ocp_rifleman", + "rhsusf_spcs_ocp", + "rhsusf_spcs_ucp_rifleman", + "rhsusf_spcs_ucp" + +]; + +blck_RHS_BackpacksUSAF = [ + "rhsusf_assault_eagleaiii_coy", + "rhsusf_assault_eagleaiii_ocp", + "rhsusf_assault_eagleaiii_ucp", + "rhsusf_falconii_coy", + "rhsusf_falconii_mc", + "rhsusf_falconii", + "RHS_M2_Gun_Bag" + +]; + +blck_RHS_HeadgearUSAF = [ + "rhs_Booniehat_m81", + "rhs_Booniehat_marpatd", + "rhs_Booniehat_marpatwd", + "rhs_Booniehat_ocp", + "rhs_Booniehat_ucp", + "rhsusf_Bowman", + "rhsusf_ach_bare", + "rhsusf_ach_bare_des", + "rhsusf_ach_bare_des_ess", + "rhsusf_ach_bare_des_headset", + "rhsusf_ach_bare_des_headset_ess", + "rhsusf_ach_bare_ess", + "rhsusf_ach_bare_headset", + "rhsusf_ach_bare_headset_ess", + "rhsusf_ach_bare_semi", + "rhsusf_ach_bare_semi_ess", + "rhsusf_ach_bare_semi_headset", + "rhsusf_ach_bare_semi_headset_ess", + "rhsusf_ach_bare_tan", + "rhsusf_ach_bare_tan_ess", + "rhsusf_ach_bare_tan_headset", + "rhsusf_ach_bare_tan_headset_ess", + "rhsusf_ach_bare_wood", + "rhsusf_ach_bare_wood_ess", + "rhsusf_ach_bare_wood_headset", + "rhsusf_ach_bare_wood_headset_ess", + "rhsusf_ach_helmet_ESS_ocp", + "rhsusf_ach_helmet_ESS_ucp", + "rhsusf_ach_helmet_M81", + "rhsusf_ach_helmet_camo_ocp", + "rhsusf_ach_helmet_headset_ess_ocp", + "rhsusf_ach_helmet_headset_ess_ucp", + "rhsusf_ach_helmet_headset_ocp", + "rhsusf_ach_helmet_headset_ucp", + "rhsusf_ach_helmet_ocp", + "rhsusf_ach_helmet_ocp_norotos", + "rhsusf_ach_helmet_ucp", + "rhsusf_ach_helmet_ucp_norotos", + "rhsusf_bowman_cap", + "rhsusf_lwh_helmet_M1942", + "rhsusf_lwh_helmet_marpatd", + "rhsusf_lwh_helmet_marpatd_ess", + "rhsusf_lwh_helmet_marpatd_headset", + "rhsusf_lwh_helmet_marpatwd", + "rhsusf_lwh_helmet_marpatwd_ess", + "rhsusf_lwh_helmet_marpatwd_headset", + "rhsusf_mich_bare", + "rhsusf_mich_bare_alt", + "rhsusf_mich_bare_alt_semi", + "rhsusf_mich_bare_alt_tan", + "rhsusf_mich_bare_headset", + "rhsusf_mich_bare_norotos", + "rhsusf_mich_bare_norotos_alt", + "rhsusf_mich_bare_norotos_alt_headset", + "rhsusf_mich_bare_norotos_alt_semi", + "rhsusf_mich_bare_norotos_alt_semi_headset", + "rhsusf_mich_bare_norotos_alt_tan", + "rhsusf_mich_bare_norotos_alt_tan_headset", + "rhsusf_mich_bare_norotos_arc", + "rhsusf_mich_bare_norotos_arc_alt", + "rhsusf_mich_bare_norotos_arc_alt_headset", + "rhsusf_mich_bare_norotos_arc_alt_semi", + "rhsusf_mich_bare_norotos_arc_alt_semi_headset", + "rhsusf_mich_bare_norotos_arc_alt_tan", + "rhsusf_mich_bare_norotos_arc_alt_tan_headset", + "rhsusf_mich_bare_norotos_arc_headset", + "rhsusf_mich_bare_norotos_arc_semi", + "rhsusf_mich_bare_norotos_arc_semi_headset", + "rhsusf_mich_bare_norotos_arc_tan", + "rhsusf_mich_bare_norotos_headset", + "rhsusf_mich_bare_norotos_semi", + "rhsusf_mich_bare_norotos_semi_headset", + "rhsusf_mich_bare_norotos_tan", + "rhsusf_mich_bare_norotos_tan_headset", + "rhsusf_mich_bare_semi", + "rhsusf_mich_bare_semi_headset", + "rhsusf_mich_bare_tan", + "rhsusf_mich_bare_tan_headset", + "rhsusf_mich_helmet_marpatd_alt_headset", + "rhsusf_mich_helmet_marpatd_headset", + "rhsusf_mich_helmet_marpatd_norotos", + "rhsusf_mich_helmet_marpatd_norotos_arc", + "rhsusf_mich_helmet_marpatd_norotos_arc_headset", + "rhsusf_mich_helmet_marpatd_norotos_headset", + "rhsusf_mich_helmet_marpatwd", + "rhsusf_mich_helmet_marpatwd_alt", + "rhsusf_mich_helmet_marpatwd_alt_headset", + "rhsusf_mich_helmet_marpatwd_headset", + "rhsusf_mich_helmet_marpatwd_norotos", + "rhsusf_mich_helmet_marpatwd_norotos_arc", + "rhsusf_mich_helmet_marpatwd_norotos_arc_headset", + "rhsusf_mich_helmet_marpatwd_norotos_headset", + // added by chainsaw - 13 + "rhsusf_patrolcap_ocp", + "rhsusf_patrolcap_ucp", + "rhsusf_opscore_01", + "rhsusf_opscore_01_tan", + "rhsusf_opscore_02_tan", + "rhsusf_opscore_03_ocp", + "rhsusf_opscore_04_ocp", + "rhsusf_cvc_helmet", + "rhsusf_cvc_ess", + "rhsusf_hgu56p", + "rhsusf_hgu56p_mask", + "rhsusf_cvc_green_helmet", + "rhsusf_cvc_green_ess", + // Added by ElShotte - 41 Items + "rhsusf_opscore_bk_pelt", + "rhsusf_opscore_bk", + "rhsusf_opscore_coy_cover", + "rhsusf_opscore_coy_cover_pelt", + "rhsusf_opscore_fg", + "rhsusf_opscore_fg_pelt", + "rhsusf_opscore_fg_pelt_cam", + "rhsusf_opscore_fg_pelt_nsw", + "rhsusf_opscore_mc", + "rhsusf_opscore_mc_pelt", + "rhsusf_opscore_mc_pelt_nsw", + "rhsusf_opscore_mc_cover", + "rhsusf_opscore_mc_cover_pelt", + "rhsusf_opscore_mc_cover_pelt_nsw", + "rhsusf_opscore_mc_cover_pelt_cam", + "rhsusf_opscore_paint", + "rhsusf_opscore_paint_pelt", + "rhsusf_opscore_paint_pelt_nsw", + "rhsusf_opscore_paint_pelt_nsw_cam", + "rhsusf_opscore_rg_cover", + "rhsusf_opscore_rg_cover_pelt", + "rhsusf_opscore_ut", + "rhsusf_opscore_ut_pelt", + "rhsusf_opscore_ut_pelt_cam", + "rhsusf_opscore_ut_pelt_nsw", + "rhsusf_opscore_ut_pelt_nsw_cam", + "rhsusf_opscore_mar_ut_pelt", + "rhsusf_opscore_mar_ut", + "rhsusf_opscore_mar_fg_pelt", + "rhsusf_opscore_mar_fg", + "rhsusf_protech_helmet", + "rhsusf_protech_helmet_ess", + "rhsusf_protech_helmet_rhino", + "rhsusf_protech_helmet_rhino_ess" +]; + +blck_RHS_UniformsGREF = [ + "rhsgref_uniform_alpenflage", + "rhsgref_uniform_flecktarn", + "rhsgref_uniform_para_ttsko_mountain", + "rhsgref_uniform_para_ttsko_oxblood", + "rhsgref_uniform_para_ttsko_urban", + "rhsgref_uniform_reed", + "rhsgref_uniform_specter", + "rhsgref_uniform_tigerstripe", + "rhsgref_uniform_ttsko_forest", + "rhsgref_uniform_ttsko_mountain", + "rhsgref_uniform_ttsko_urban", + "rhsgref_uniform_vsr", + "rhsgref_uniform_woodland", + "rhsgref_uniform_woodland_olive" +]; + +blck_RHS_VestsGREF = [ + "rhsgref_6b23", + "rhsgref_6b23_khaki", + "rhsgref_6b23_khaki_medic", + "rhsgref_6b23_khaki_nco", + "rhsgref_6b23_khaki_officer", + "rhsgref_6b23_khaki_rifleman", + "rhsgref_6b23_khaki_sniper", + "rhsgref_6b23_ttsko_digi", + "rhsgref_6b23_ttsko_digi_medic", + "rhsgref_6b23_ttsko_digi_nco", + "rhsgref_6b23_ttsko_digi_officer", + "rhsgref_6b23_ttsko_digi_rifleman", + "rhsgref_6b23_ttsko_digi_sniper", + "rhsgref_6b23_ttsko_forest", + "rhsgref_6b23_ttsko_forest_rifleman", + "rhsgref_6b23_ttsko_mountain", + "rhsgref_6b23_ttsko_mountain_medic", + "rhsgref_6b23_ttsko_mountain_nco", + "rhsgref_6b23_ttsko_mountain_officer", + "rhsgref_6b23_ttsko_mountain_rifleman", + "rhsgref_6b23_ttsko_mountain_sniper", + "rhsgref_otv_digi", + "rhsgref_otv_khaki" +]; + +blck_RHS_HeadgearGREF = [ + "rhsgref_6b27m", + "rhsgref_6b27m_ttsko_digi", + "rhsgref_6b27m_ttsko_forest", + "rhsgref_6b27m_ttsko_mountain", + "rhsgref_6b27m_ttsko_urban", + "rhsgref_Booniehat_alpen", + "rhsgref_fieldcap", + "rhsgref_fieldcap_ttsko_digi", + "rhsgref_fieldcap_ttsko_forest", + "rhsgref_fieldcap_ttsko_mountain", + "rhsgref_fieldcap_ttsko_urban", + "rhsgref_patrolcap_specter", + "rhsgref_ssh68", + "rhsgref_ssh68_emr", + "rhsgref_ssh68_ttsko_digi", + "rhsgref_ssh68_ttsko_forest", + "rhsgref_ssh68_ttsko_mountain", + "rhsgref_ssh68_un" +]; +blck_RHS_WeaponsGREF = [ + "rhs_weap_kar98k", + "rhs_weap_m21a", + "rhs_weap_m21a_fold", + "rhs_weap_m21a_pr", + "rhs_weap_m21s", + "rhs_weap_m21s_fold", + "rhs_weap_m21s_pr", + "rhs_weap_m38", + "rhs_weap_m70ab2", + "rhs_weap_m70ab2_fold", + "rhs_weap_m70b1", + "rhs_weap_m76", + "rhs_weap_m92", + "rhs_weap_m92_fold" +]; + +blck_RHS_HeadgearSAF = [ + "rhssaf_helmet_m59_85_nocamo", + "rhssaf_helmet_m59_85_oakleaf", + "rhssaf_helmet_m97_olive_nocamo", + "rhssaf_helmet_m97_olive_nocamo_black_ess", + "rhssaf_helmet_m97_olive_nocamo_black_ess_bare", + "rhssaf_helmet_m97_black_nocamo", + "rhssaf_helmet_m97_black_nocamo_black_ess", + "rhssaf_helmet_m97_black_nocamo_black_ess_bare", + "rhssaf_Helmet_m97_woodland", + "rhssaf_Helmet_m97_digital", + "rhssaf_Helmet_m97_md2camo", + "rhssaf_Helmet_m97_oakleaf", + "rhssaf_helmet_m97_nostrap_blue", + "rhssaf_helmet_m97_nostrap_blue_tan_ess", + "rhssaf_helmet_m97_nostrap_blue_tan_ess_bare", + "rhssaf_helmet_m97_woodland_black_ess", + "rhssaf_helmet_m97_woodland_black_ess_bare", + "rhssaf_helmet_m97_digital_black_ess", + "rhssaf_helmet_m97_digital_black_ess_bare", + "rhssaf_helmet_m97_md2camo_black_ess", + "rhssaf_helmet_m97_md2camo_black_ess_bare", + "rhssaf_helmet_m97_oakleaf_black_ess", + "rhssaf_helmet_m97_oakleaf_black_ess_bare", + "rhssaf_helmet_hgu56p", + "rhssaf_beret_green", + "rhssaf_beret_red", + "rhssaf_beret_black", + "rhssaf_beret_blue_un", + "rhssaf_booniehat_digital", + "rhssaf_booniehat_md2camo", + "rhssaf_booniehat_woodland" +]; + +blck_RHS_UniformsSAF = [ + "rhssaf_uniform_m10_digital", + "rhssaf_uniform_m10_digital_summer", + "rhssaf_uniform_m10_digital_desert", + "rhssaf_uniform_m10_digital_tan_boots", + "rhssaf_uniform_m93_oakleaf", + "rhssaf_uniform_m93_oakleaf_summer", + "rhssaf_uniform_heli_pilot" +]; + +blck_RHS_VestsSAF = [ + "rhssaf_vest_md98_woodland", + "rhssaf_vest_md98_md2camo", + "rhssaf_vest_md98_digital", + "rhssaf_vest_md98_officer", + "rhssaf_vest_md98_rifleman", + "rhssaf_vest_otv_md2camo", + "rhssaf_vest_md99_md2camo_rifleman", + "rhssaf_vest_md99_digital_rifleman", + "rhssaf_vest_md99_woodland_rifleman", + "rhssaf_vest_md99_md2camo", + "rhssaf_vest_md99_digital", + "rhssaf_vest_md99_woodland" +]; + +blck_RHS_BackpacksSAF = [ + "rhssaf_30rnd_556x45_EPR_G36", + "rhssaf_30rnd_556x45_SOST_G36", + "rhssaf_100rnd_556x45_EPR_G36", + "rhssaf_30rnd_556x45_SPR_G36", + "rhssaf_30rnd_556x45_Tracers_G36", + "rhssaf_30rnd_556x45_MDIM_G36", + "rhssaf_30rnd_556x45_TDIM_G36", + "150Rnd_556x45_Drum_Mag_F", + "150Rnd_556x45_Drum_Mag_Tracer_F", + "rhs_30Rnd_762x39mm", + "rhs_30Rnd_762x39mm_tracer", + "rhs_30Rnd_762x39mm_89", + "rhs_30Rnd_762x39mm_U", + "rhsgref_30rnd_556x45_m21", + "rhsgref_30rnd_556x45_m21_t", + "rhs_100Rnd_762x54mmR", + "rhs_100Rnd_762x54mmR_green", + "rhssaf_250Rnd_762x54R" +]; + +blck_RHS_WeaponsSAF = [ + "rhs_weap_m70ab2_fold", + "rhs_weap_m70b1", + "rhs_weap_m70b1n", + "rhs_weap_m70b3n", + "rhs_weap_m70b3n_pbg40", + "rhs_weap_m92", + "rhs_weap_m92_fold", + "rhs_weap_m76", + "rhs_weap_m21a", + "rhs_weap_m21a_pr", + "rhs_weap_m21a_pr_pbg40", + "rhs_weap_m21a_fold", + "rhs_weap_m21a_pbg40", + "rhs_weap_m21s", + "rhs_weap_m21s_pr", + "rhs_weap_m21s_fold", + "rhs_weap_m82a1", + "rhs_weap_minimi_para_railed", + "rhs_weap_g36c", + "rhs_weap_g36kv", + "rhs_weap_g36kv_ag36", + "rhs_weap_m84" +]; + +blck_NIA_WeaponsLMG = [ + "hlc_lmg_M249E2", + "hlc_lmg_M249E2", + "hlc_lmg_M60E4", + "hlc_lmg_MG3KWS_b", + "hlc_lmg_MG3KWS_g", + "hlc_lmg_MG42", + "hlc_lmg_MG42KWS_t", + "hlc_lmg_m249para", + "hlc_lmg_m249para", + "hlc_lmg_m60", + "hlc_lmg_mg42kws_b", + "hlc_lmg_mg42kws_g", + "hlc_lmg_minimi", + "hlc_lmg_minimi_railed", + "hlc_lmg_minimipara", + "hlc_lmg_mk48", + "hlc_m249_pip1", + "hlc_m249_pip2", + "hlc_m249_pip3", + "hlc_m249_pip4", + "hlc_rifle_rpk", + "hlc_rifle_rpk12", + "hlc_rifle_rpk74n" +]; + +blck_NIA_WeaponsSMG = [ + "hlc_smg_9mmar", + "hlc_smg_MP5N", + "hlc_smg_mp510", + "hlc_smg_mp5a2", + "hlc_smg_mp5a3", + "hlc_smg_mp5a4", + "hlc_smg_mp5k", + "hlc_smg_mp5k_PDW", + "hlc_smg_mp5sd5", + "hlc_smg_mp5sd6" +]; + +blck_NIA_WeaponsAR = [ + "HLC_Rifle_g3ka4_GL", + "hlc_barrel_carbine", + "hlc_barrel_hbar", + "hlc_barrel_standard", + "hlc_rifle_Bushmaster300", + "hlc_rifle_Colt727", + "hlc_rifle_Colt727_GL", + "hlc_rifle_FAL5000", + "hlc_rifle_FAL5000Rail", + "hlc_rifle_FAL5000_RH", + "hlc_rifle_FAL5061", + "hlc_rifle_FAL5061Rail", + "hlc_rifle_G36A1", + "hlc_rifle_G36A1AG36", + "hlc_rifle_G36C", + "hlc_rifle_G36CMLIC", + "hlc_rifle_G36CTAC", + "hlc_rifle_G36CV", + "hlc_rifle_G36E1", + "hlc_rifle_G36E1AG36", + "hlc_rifle_G36KA1", + "hlc_rifle_G36KE1", + "hlc_rifle_G36KMLIC", + "hlc_rifle_G36KTAC", + "hlc_rifle_G36KV", + "hlc_rifle_G36MLIAG36", + "hlc_rifle_G36MLIC", + "hlc_rifle_G36TAC", + "hlc_rifle_G36V", + "hlc_rifle_G36VAG36", + "hlc_rifle_LAR", + "hlc_rifle_M14", + "hlc_rifle_M14DMR", + "hlc_rifle_M21", + "hlc_rifle_MG36", + "hlc_rifle_RK62", + "hlc_rifle_RU556", + "hlc_rifle_RU5562", + "hlc_rifle_SAMR", + "hlc_rifle_SLR", + "hlc_rifle_SLRchopmod", + "hlc_rifle_STG58F", + "hlc_rifle_STGW57", + "hlc_rifle_aek971", + "hlc_rifle_aek971_mtk", + "hlc_rifle_ak12", + "hlc_rifle_ak12gl", + "hlc_rifle_ak47", + "hlc_rifle_ak74", + "hlc_rifle_ak74_MTK", + "hlc_rifle_ak74_dirty", + "hlc_rifle_ak74_dirty2", + "hlc_rifle_ak74m", + "hlc_rifle_ak74m_MTK", + "hlc_rifle_ak74m_gl", + "hlc_rifle_akm", + "hlc_rifle_akm_MTK", + "hlc_rifle_akmgl", + "hlc_rifle_aks74", + "hlc_rifle_aks74_GL", + "hlc_rifle_aks74_MTK", + "hlc_rifle_aks74u", + "hlc_rifle_aks74u_MTK", + "hlc_rifle_aku12", + "hlc_rifle_amt", + "hlc_rifle_aug", + "hlc_rifle_auga1_B", + "hlc_rifle_auga1_t", + "hlc_rifle_auga1carb", + "hlc_rifle_auga1carb_b", + "hlc_rifle_auga1carb_t", + "hlc_rifle_auga2", + "hlc_rifle_auga2_b", + "hlc_rifle_auga2_t", + "hlc_rifle_auga2carb", + "hlc_rifle_auga2carb_b", + "hlc_rifle_auga2carb_t", + "hlc_rifle_auga2lsw", + "hlc_rifle_auga2lsw_b", + "hlc_rifle_auga2lsw_t", + "hlc_rifle_auga3", + "hlc_rifle_auga3_GL", + "hlc_rifle_auga3_GL_B", + "hlc_rifle_auga3_GL_BL", + "hlc_rifle_auga3_b", + "hlc_rifle_auga3_bl", + "hlc_rifle_aughbar", + "hlc_rifle_aughbar_b", + "hlc_rifle_aughbar_t", + "hlc_rifle_augsr", + "hlc_rifle_augsr_b", + "hlc_rifle_augsr_t", + "hlc_rifle_augsrcarb", + "hlc_rifle_augsrcarb_b", + "hlc_rifle_augsrcarb_t", + "hlc_rifle_augsrhbar", + "hlc_rifle_augsrhbar_b", + "hlc_rifle_augsrhbar_t", + "hlc_rifle_bcmblackjack", + "hlc_rifle_bcmjack", + "hlc_rifle_c1A1", + "hlc_rifle_falosw", + "hlc_rifle_g3a3", + "hlc_rifle_g3a3ris", + "hlc_rifle_g3a3v", + "hlc_rifle_g3ka4", + "hlc_rifle_g3sg1", + "hlc_rifle_hk33a2", + "hlc_rifle_hk33a2RIS", + "hlc_rifle_hk51", + "hlc_rifle_hk53", + "hlc_rifle_hk53RAS", + "hlc_rifle_honeybadger", + "hlc_rifle_l1a1slr", + "hlc_rifle_m14sopmod", + "hlc_rifle_osw_GL", + "hlc_rifle_rpk74n", + "hlc_rifle_sig5104", + "hlc_rifle_slr107u", + "hlc_rifle_slr107u_MTK", + "hlc_rifle_stgw57_RIS", + "hlc_rifle_stgw57_commando", + "hlc_rifle_vendimus" +]; + +blck_NIA_WeaponsSniper = [ + "hlc_rifle_M1903A1", + "hlc_rifle_M1903A1OMR", + "hlc_rifle_M1903A1_unertl", + "hlc_rifle_PSG1A1_RIS", + "hlc_rifle_awMagnum_BL_ghillie", + "hlc_rifle_awMagnum_FDE_ghillie", + "hlc_rifle_awMagnum_OD_ghillie", + "hlc_rifle_awcovert", + "hlc_rifle_awcovert_BL", + "hlc_rifle_awcovert_FDE", + "hlc_rifle_awmagnum", + "hlc_rifle_awmagnum_BL", + "hlc_rifle_awmagnum_FDE", + "hlc_rifle_psg1", + "hlc_rifle_psg1A1" +]; diff --git a/@GMS/addons/custom_server/Configs/blck_custom_config_rc.sqf b/@GMS/addons/custom_server/Configs/blck_custom_config_rc.sqf new file mode 100644 index 0000000..f1540cb --- /dev/null +++ b/@GMS/addons/custom_server/Configs/blck_custom_config_rc.sqf @@ -0,0 +1,1269 @@ + +/* + for ghostridergaming + 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 "[blckeagls] Loading Configuration Overides"; + +/* + See the examples below as a guide for adding configs that are unique for each of several servers. +*/ +/* +private["_startTime"]; +_startTime = diag_tickTime; +_world = toLower format ["%1", worldName]; +private["_nightAccel","_dayAccel","_duskAccel"]; +switch (_world) do { + case "altis":{_nightAccel = 3;_dayAccel=0.5; _duskAccel = 3;}; + case "napf":{_nightAccel = 12; _dayAccel = 2;_duskAccel = 6;}; + case "namalsk":{_nightAccel = 12; _dayAccel = 2;_duskAccel = 6;}; + case "tanoa":{_nightAccel = 12; _dayAccel = 3.2;_duskAccel = 6;}; +}; + +switch (toLower (worldName)) do +{ + case "altis": + { + private ["_arr","_sunrise","_sunset","_time"]; + _arr = date call BIS_fnc_sunriseSunsetTime; + _sunrise = _arr select 0; + _sunset = _arr select 1; + _daylight = _sunset - _sunrise; + _nightTime = abs(24 - _daylight); + _time = dayTime; + #ifdef blck_milServer + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = (_daylight)/3; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = _nightTime / 6; // Nighttim time acceleration + #else + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = (_daylight)/8; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = _nightTime / 8; // Nighttim time acceleration + #endif + //blck_maxCrashSites = 3; + }; + case"tanoa": + { + blck_maxCrashSites = 2; + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1.4; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 8; // Nighttim time acceleration + }; + case"namalsk": + { + private ["_arr","_sunrise","_sunset","_time"]; + _arr = date call BIS_fnc_sunriseSunsetTime; + _sunrise = _arr select 0; + _sunset = _arr select 1; + _daylight = _sunset - _sunrise; + _nightTime = abs(24 - _daylight); + _time = dayTime; + _serverUpTime = 8; + blck_enableOrangeMissions = 1; + blck_enableGreenMissions = -1; + blck_enableRedMissions = 1; + blck_enableBlueMissions = -1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = -1; + blck_maxCrashSites = 1; // recommended settings: 3 for Altis, 2 for Tanoa, 1 for smaller maps. Set to -1 to disable + + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = ((_serverUpTime + 2)/_daylight); // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = (3/_nightTime); // Nighttim time acceleration + }; + case "esseker": + { + blck_enableOrangeMissions = 1; + blck_enableGreenMissions = -1; + blck_enableRedMissions = 1; + blck_enableBlueMissions = -1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = -1; + blck_maxCrashSites = 1; + + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1; // Daytime time accelearation + blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 6; // Nighttim time acceleration + }; + case "panthera3": + { + blck_maxCrashSites = 2; + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = 1.4; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 8; // Nighttim time acceleration + }; + case "malden": + { + _arr = date call BIS_fnc_sunriseSunsetTime; + _sunrise = _arr select 0; + _sunset = _arr select 1; + _time = dayTime; + _daylight = _sunset - _sunrise; + + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + blck_timeAccelerationDay = (_daylight / 2.5); // Daytime time accelearation + blck_timeAccelerationDusk = 8; // Dawn/dusk time accelearation + blck_timeAccelerationNight = ((24 - _daylight) / 1.5); // Nighttim time acceleration + blck_enableOrangeMissions = -1; + blck_enableGreenMissions = -1; + blck_enableRedMissions = -2; + blck_enableBlueMissions = -1; + blck_numberUnderwaterDynamicMissions = -3; + blck_enableHunterMissions = -1; + blck_enableScoutsMissions = -1; + blck_maxCrashSites = 3; + }; +}; +*/ + + +/* + You can define configs for additional mods or loadouts here +*/ +/* +blck_CUPWeapons = [ + "CUP_lmg_L7A2", + "CUP_lmg_L110A1", + "CUP_lmg_M240", + "CUP_lmg_M249", + "CUP_lmg_M249_ElcanM145_Laser", + "CUP_lmg_Mk48_des", + "CUP_lmg_Mk48_wdl", + "CUP_lmg_PKM", + "CUP_lmg_UK59", + "CUP_lmg_Pecheneg", + "CUP_arifle_AK74", + "CUP_arifle_AK107", + "CUP_arifle_AK107_GL", + "CUP_arifle_AKS74", + "CUP_arifle_AKS74U", + "CUP_arifle_AK74_GL", + "CUP_arifle_AKM", + "CUP_arifle_AKS", + "CUP_arifle_AKS_Gold", + "CUP_arifle_RPK74", + "CUP_arifle_CZ805_A2", + "CUP_arifle_FNFAL", + "CUP_arifle_G36A", + "CUP_arifle_G36A_camo", + "CUP_arifle_G36K", + "CUP_arifle_G36K_camo", + "CUP_arifle_G36C", + "CUP_arifle_G36C_camo", + "CUP_arifle_MG36", + "CUP_arifle_MG36_camo", + "CUP_arifle_L85A2", + "CUP_arifle_L85A2_GL", + "CUP_arifle_L86A2", + "CUP_arifle_M16A2", + "CUP_arifle_M16A2_GL", + "CUP_arifle_M4A1", + "CUP_arifle_M4A1_camo", + "CUP_arifle_M4A3_desert_Aim_Flashlight", + "CUP_arifle_M16A4_Base", + "CUP_arifle_M4A1_BUIS_GL", + "CUP_arifle_M4A1_BUIS_camo_GL", + "CUP_arifle_M4A1_BUIS_desert_GL", + "CUP_arifle_M4A1_desert", + "CUP_arifle_Sa58P", + "CUP_arifle_Sa58V", + "CUP_arifle_Mk16_CQC", + "CUP_arifle_XM8_Railed", + "CUP_arifle_XM8_Carbine", + "CUP_arifle_XM8_Carbine_FG", + "CUP_arifle_XM8_Carbine_GL", + "CUP_arifle_XM8_Compact", + "CUP_arifle_xm8_SAW", + "CUP_arifle_xm8_sharpshooter", + "CUP_arifle_CZ805_A1", + "CUP_arifle_CZ805_GL", + "CUP_arifle_CZ805_B_GL", + "CUP_arifle_CZ805_B", + "CUP_arifle_Sa58P_des", + "CUP_arifle_Sa58V_camo", + "CUP_arifle_Sa58RIS1", + "CUP_arifle_Sa58RIS2", + "CUP_arifle_Mk16_CQC_FG", + "CUP_arifle_Mk16_CQC_SFG", + "CUP_arifle_Mk16_CQC_EGLM", + "CUP_arifle_Mk16_STD", + "CUP_arifle_Mk16_STD_FG", + "CUP_arifle_Mk16_STD_SFG", + "CUP_arifle_Mk16_STD_EGLM", + "CUP_arifle_Mk16_SV", + "CUP_arifle_Mk17_CQC", + "CUP_arifle_Mk17_CQC_FG", + "CUP_arifle_Mk17_CQC_SFG", + "CUP_arifle_Mk17_CQC_EGLM", + "CUP_arifle_Mk17_STD", + "CUP_arifle_Mk17_STD_FG", + "CUP_arifle_Mk17_STD_SFG", + "CUP_arifle_Mk17_STD_EGLM", + "CUP_arifle_Mk20", + "CUP_srifle_AWM_des", + "CUP_srifle_AWM_wdl", + "CUP_srifle_CZ750", + "CUP_srifle_DMR", + "CUP_srifle_CZ550", + "CUP_srifle_LeeEnfield", + "CUP_srifle_M14", + "CUP_srifle_Mk12SPR", + "CUP_srifle_M24_des", + "CUP_srifle_M24_wdl", + "CUP_srifle_M24_ghillie", + "CUP_srifle_M40A3", + "CUP_srifle_M107_Base", + "CUP_srifle_M110", + "CUP_srifle_SVD", + "CUP_srifle_SVD_des", + "CUP_srifle_SVD_wdl_ghillie", + "CUP_srifle_SVD_NSPU", + "CUP_srifle_ksvk", + "CUP_srifle_VSSVintorez", + "CUP_srifle_AS50" +]; + +blck_CUPUniforms = [ + "CUP_U_B_CZ_WDL_TShirt", + "CUP_U_I_GUE_Anorak_01", + "CUP_U_I_GUE_Anorak_03", + "CUP_U_I_GUE_Anorak_02", + "CUP_U_B_BAF_DDPM_S2_UnRolled", + "CUP_U_B_BAF_DDPM_S1_RolledUp", + "CUP_U_B_BAF_DDPM_Tshirt", + "CUP_U_B_BAF_DPM_S2_UnRolled", + "CUP_U_B_BAF_DPM_S1_RolledUp", + "CUP_U_B_BAF_DPM_Tshirt", + "CUP_U_B_BAF_MTP_S2_UnRolled", + "CUP_U_B_BAF_MTP_S1_RolledUp", + "CUP_U_B_BAF_MTP_Tshirt", + "CUP_U_B_BAF_MTP_S4_UnRolled", + "CUP_U_B_BAF_MTP_S3_RolledUp", + "CUP_U_B_BAF_MTP_S5_UnRolled", + "CUP_U_B_BAF_MTP_S6_UnRolled", + "CUP_U_O_CHDKZ_Bardak", + "CUP_U_O_CHDKZ_Lopotev", + "CUP_U_O_CHDKZ_Kam_03", + "CUP_U_O_CHDKZ_Kam_01", + "CUP_U_O_CHDKZ_Kam_04", + "CUP_U_O_CHDKZ_Kam_02", + "CUP_U_O_CHDKZ_Commander", + "CUP_U_O_CHDKZ_Kam_08", + "CUP_U_O_CHDKZ_Kam_05", + "CUP_U_O_CHDKZ_Kam_07", + "CUP_U_O_CHDKZ_Kam_06", + "CUP_U_C_Citizen_02", + "CUP_U_C_Citizen_01", + "CUP_U_C_Citizen_04", + "CUP_U_C_Citizen_03", + "CUP_U_C_Fireman_01", + "CUP_U_B_GER_Flecktarn_2", + "CUP_U_B_GER_Tropentarn_2", + "CUP_U_B_GER_Flecktarn_1", + "CUP_U_B_GER_Tropentarn_1", + "CUP_O_TKI_Khet_Jeans_04", + "CUP_O_TKI_Khet_Jeans_02", + "CUP_O_TKI_Khet_Jeans_01", + "CUP_O_TKI_Khet_Jeans_03", + "CUP_O_TKI_Khet_Partug_04", + "CUP_O_TKI_Khet_Partug_02", + "CUP_O_TKI_Khet_Partug_01", + "CUP_O_TKI_Khet_Partug_07", + "CUP_O_TKI_Khet_Partug_08", + "CUP_O_TKI_Khet_Partug_05", + "CUP_O_TKI_Khet_Partug_06", + "CUP_O_TKI_Khet_Partug_03", + "CUP_U_C_Labcoat_02", + "CUP_U_C_Labcoat_03", + "CUP_U_C_Labcoat_01", + "CUP_U_B_USMC_Officer", + "CUP_U_B_USMC_MARPAT_WDL_RollUpKneepad", + "CUP_U_B_USMC_MARPAT_WDL_RolledUp", + "CUP_U_B_USMC_MARPAT_WDL_Kneepad", + "CUP_U_B_USMC_MARPAT_WDL_TwoKneepads", + "CUP_U_B_USMC_MARPAT_WDL_Sleeves", + "CUP_U_C_Mechanic_02", + "CUP_U_C_Mechanic_03", + "CUP_U_C_Mechanic_01", + "CUP_U_I_GUE_Flecktarn2", + "CUP_U_I_GUE_Flecktarn3", + "CUP_U_I_GUE_Flecktarn", + "CUP_U_I_GUE_Woodland1", + "CUP_B_USMC_Navy_Blue", + "CUP_B_USMC_Navy_Brown", + "CUP_B_USMC_Navy_Green", + "CUP_B_USMC_Navy_Red", + "CUP_B_USMC_Navy_Violet", + "CUP_B_USMC_Navy_White", + "CUP_B_USMC_Navy_Yellow", + "CUP_U_C_Rescuer_01", + "CUP_U_O_Partisan_TTsKO", + "CUP_U_O_Partisan_TTsKO_Mixed", + "CUP_U_O_Partisan_VSR_Mixed1", + "CUP_U_O_Partisan_VSR_Mixed2", + "CUP_U_C_Pilot_01", + "CUP_U_C_Policeman_01", + "CUP_U_C_Priest_01", + "CUP_U_C_Profiteer_02", + "CUP_U_C_Profiteer_03", + "CUP_U_C_Profiteer_01", + "CUP_U_C_Profiteer_04", + "CUP_U_I_RACS_Desert_2", + "CUP_U_I_RACS_Urban_2", + "CUP_U_I_RACS_PilotOverall", + "CUP_U_I_RACS_Desert_1", + "CUP_U_I_RACS_Urban_1", + "CUP_U_C_Rocker_01", + "CUP_U_C_Rocker_03", + "CUP_U_C_Rocker_02", + "CUP_U_C_Rocker_04", + "CUP_U_O_RUS_Gorka_Green", + "CUP_U_O_RUS_Gorka_Partizan_A", + "CUP_U_O_RUS_Gorka_Partizan", + "CUP_U_O_RUS_EMR_1_VDV", + "CUP_U_O_RUS_EMR_1", + "CUP_U_O_RUS_Flora_1_VDV", + "CUP_U_O_RUS_Flora_1", + "CUP_U_O_RUS_Commander", + "CUP_U_O_RUS_EMR_2_VDV", + "CUP_U_O_RUS_EMR_2", + "CUP_U_O_RUS_Flora_2_VDV", + "CUP_U_O_RUS_Flora_2", + "CUP_U_O_SLA_Officer_Suit", + "CUP_U_O_SLA_Overalls_Pilot", + "CUP_U_O_SLA_Overalls_Tank", + "CUP_U_O_SLA_MixedCamo", + "CUP_U_O_SLA_Desert", + "CUP_U_O_SLA_Green", + "CUP_U_O_SLA_Urban", + "CUP_U_B_FR_SpecOps", + "CUP_U_B_FR_Officer", + "CUP_U_B_FR_DirAction", + "CUP_U_B_FR_DirAction2", + "CUP_U_B_FR_Corpsman", + "CUP_U_B_FR_Light", + "CUP_U_B_FR_Scout1", + "CUP_U_B_FR_Scout2", + "CUP_U_B_FR_Scout3", + "CUP_U_B_FR_Scout", + "CUP_U_C_Suit_01", + "CUP_U_C_Suit_02", + "CUP_U_O_TK_Officer", + "CUP_U_O_SLA_Officer", + "CUP_U_O_TK_Green", + "CUP_U_O_TK_MixedCamo", + "CUP_U_B_USArmy_TwoKnee", + "CUP_U_B_USArmy_Base", + "CUP_U_B_USArmy_Soft", + "CUP_U_B_USArmy_UBACS", + "CUP_U_B_USArmy_PilotOverall", + "CUP_U_B_USMC_PilotOverall", + "CUP_U_C_Villager_01", + "CUP_U_C_Villager_04", + "CUP_U_C_Villager_02", + "CUP_U_C_Villager_03", + "CUP_U_C_Woodlander_01", + "CUP_U_C_Woodlander_02", + "CUP_U_C_Woodlander_03", + "CUP_U_C_Woodlander_04", + "CUP_U_C_Worker_03", + "CUP_U_C_Worker_04", + "CUP_U_C_Worker_02", + "CUP_U_C_Worker_01", + "CUP_U_B_BAF_DDPM_Ghillie", + "CUP_U_B_BAF_MTP_Ghillie", + "CUP_U_B_BAF_DPM_Ghillie", + "CUP_U_B_GER_Ghillie", + "CUP_U_B_GER_Fleck_Ghillie", + "CUP_U_B_USMC_Ghillie_WDL", + "CUP_U_I_Ghillie_Top", + "CUP_U_O_RUS_Ghillie", + "CUP_U_O_TK_Ghillie", + "CUP_U_O_TK_Ghillie_Top", + "CUP_U_B_USArmy_Ghillie" +]; + +blck_CUPVests = [ + "CUP_V_BAF_Osprey_Mk2_DDPM_Grenadier", + "CUP_V_BAF_Osprey_Mk2_DDPM_Medic", + "CUP_V_BAF_Osprey_Mk2_DDPM_Officer", + "CUP_V_BAF_Osprey_Mk2_DDPM_Sapper", + "CUP_V_BAF_Osprey_Mk2_DDPM_Scout", + "CUP_V_BAF_Osprey_Mk2_DDPM_Soldier1", + "CUP_V_BAF_Osprey_Mk2_DDPM_Soldier2", + "CUP_V_BAF_Osprey_Mk2_DPM_Grenadier", + "CUP_V_BAF_Osprey_Mk2_DPM_Medic", + "CUP_V_BAF_Osprey_Mk2_DPM_Officer", + "CUP_V_BAF_Osprey_Mk2_DPM_Sapper", + "CUP_V_BAF_Osprey_Mk2_DPM_Scout", + "CUP_V_BAF_Osprey_Mk2_DPM_Soldier1", + "CUP_V_BAF_Osprey_Mk2_DPM_Soldier2", + "CUP_V_BAF_Osprey_Mk4_MTP_Grenadier", + "CUP_V_BAF_Osprey_Mk4_MTP_MachineGunner", + "CUP_V_BAF_Osprey_Mk4_MTP_Rifleman", + "CUP_V_BAF_Osprey_Mk4_MTP_SquadLeader", + "CUP_V_B_GER_Carrier_Rig", + "CUP_V_B_GER_Carrier_Rig_2", + "CUP_V_B_GER_Carrier_Vest", + "CUP_V_B_GER_Carrier_Vest_2", + "CUP_V_B_GER_Carrier_Vest_3", + "CUP_V_B_GER_Vest_1", + "CUP_V_B_GER_Vest_2", + "CUP_V_B_LHDVest_Blue", + "CUP_V_B_LHDVest_Brown", + "CUP_V_B_LHDVest_Green", + "CUP_V_B_LHDVest_Red", + "CUP_V_B_LHDVest_Violet", + "CUP_V_B_LHDVest_White", + "CUP_V_B_LHDVest_Yellow", + "CUP_V_B_MTV", + "CUP_V_B_MTV_LegPouch", + "CUP_V_B_MTV_MG", + "CUP_V_B_MTV_Marksman", + "CUP_V_B_MTV_Mine", + "CUP_V_B_MTV_Patrol", + "CUP_V_B_MTV_PistolBlack", + "CUP_V_B_MTV_Pouches", + "CUP_V_B_MTV_TL", + "CUP_V_B_MTV_noCB", + "CUP_V_B_PilotVest", + "CUP_V_B_RRV_DA1", + "CUP_V_B_RRV_DA2", + "CUP_V_B_RRV_Light", + "CUP_V_B_RRV_MG", + "CUP_V_B_RRV_Medic", + "CUP_V_B_RRV_Officer", + "CUP_V_B_RRV_Scout", + "CUP_V_B_RRV_Scout2", + "CUP_V_B_RRV_Scout3", + "CUP_V_B_RRV_TL", + "CUP_V_I_Carrier_Belt", + "CUP_V_I_Guerilla_Jacket", + "CUP_V_I_RACS_Carrier_Vest", + "CUP_V_I_RACS_Carrier_Vest_2", + "CUP_V_I_RACS_Carrier_Vest_3", + "CUP_V_OI_TKI_Jacket1_01", + "CUP_V_OI_TKI_Jacket1_02", + "CUP_V_OI_TKI_Jacket1_03", + "CUP_V_OI_TKI_Jacket1_04", + "CUP_V_OI_TKI_Jacket1_05", + "CUP_V_OI_TKI_Jacket1_06", + "CUP_V_OI_TKI_Jacket2_01", + "CUP_V_OI_TKI_Jacket2_02", + "CUP_V_OI_TKI_Jacket2_03", + "CUP_V_OI_TKI_Jacket2_04", + "CUP_V_OI_TKI_Jacket2_05", + "CUP_V_OI_TKI_Jacket2_06", + "CUP_V_OI_TKI_Jacket3_01", + "CUP_V_OI_TKI_Jacket3_02", + "CUP_V_OI_TKI_Jacket3_03", + "CUP_V_OI_TKI_Jacket3_04", + "CUP_V_OI_TKI_Jacket3_05", + "CUP_V_OI_TKI_Jacket3_06", + "CUP_V_OI_TKI_Jacket4_01", + "CUP_V_OI_TKI_Jacket4_02", + "CUP_V_OI_TKI_Jacket4_03", + "CUP_V_OI_TKI_Jacket4_04", + "CUP_V_OI_TKI_Jacket4_05", + "CUP_V_OI_TKI_Jacket4_06", + "CUP_V_O_SLA_Carrier_Belt", + "CUP_V_O_SLA_Carrier_Belt02", + "CUP_V_O_SLA_Carrier_Belt03", + "CUP_V_O_SLA_Flak_Vest01", + "CUP_V_O_SLA_Flak_Vest02", + "CUP_V_O_SLA_Flak_Vest03", + "CUP_V_O_TK_CrewBelt", + "CUP_V_O_TK_OfficerBelt", + "CUP_V_O_TK_OfficerBelt2", + "CUP_V_O_TK_Vest_1", + "CUP_V_O_TK_Vest_2" +]; + +blck_CUPBackpacks = [ + "CUP_B_ACRPara_m95", + "CUP_B_AssaultPack_ACU", + "CUP_B_AssaultPack_Black", + "CUP_B_AssaultPack_Coyote", + "CUP_B_Bergen_BAF", + "CUP_B_CivPack_WDL", + "CUP_B_GER_Pack_Flecktarn", + "CUP_B_GER_Pack_Tropentarn", + "CUP_B_HikingPack_Civ", + "CUP_B_MOLLE_WDL", + "CUP_B_RUS_Backpack", + "CUP_B_USMC_AssaultPack", + "CUP_B_USMC_MOLLE", + "CUP_B_USPack_Black", + "CUP_B_USPack_Coyote" +]; + +blck_CUPHeadgear = [ + "CUP_H_BAF_Helmet_1_DDPM", + "CUP_H_BAF_Helmet_1_DPM", + "CUP_H_BAF_Helmet_1_MTP", + "CUP_H_BAF_Helmet_2_DDPM", + "CUP_H_BAF_Helmet_2_DPM", + "CUP_H_BAF_Helmet_2_MTP", + "CUP_H_BAF_Helmet_3_DDPM", + "CUP_H_BAF_Helmet_3_DPM", + "CUP_H_BAF_Helmet_3_MTP", + "CUP_H_BAF_Helmet_4_DDPM", + "CUP_H_BAF_Helmet_4_DPM", + "CUP_H_BAF_Helmet_4_MTP", + "CUP_H_BAF_Officer_Beret_PRR_O", + "CUP_H_C_Beanie_01", + "CUP_H_C_Beanie_02", + "CUP_H_C_Beanie_03", + "CUP_H_C_Beanie_04", + "CUP_H_C_Beret_01", + "CUP_H_C_Beret_02", + "CUP_H_C_Beret_03", + "CUP_H_C_Beret_04", + "CUP_H_C_Ushanka_01", + "CUP_H_C_Ushanka_02", + "CUP_H_C_Ushanka_03", + "CUP_H_C_Ushanka_04", + "CUP_H_FR_BandanaGreen", + "CUP_H_FR_BandanaWdl", + "CUP_H_FR_Bandana_Headset", + "CUP_H_FR_BeanieGreen", + "CUP_H_FR_BoonieMARPAT", + "CUP_H_FR_BoonieWDL", + "CUP_H_FR_Cap_Headset_Green", + "CUP_H_FR_Cap_Officer_Headset", + "CUP_H_FR_ECH", + "CUP_H_FR_Headband_Headset", + "CUP_H_FR_Headset", + "CUP_H_FR_PRR_BoonieWDL", + "CUP_H_GER_Boonie_Flecktarn", + "CUP_H_GER_Boonie_desert", + "CUP_H_NAPA_Fedora", + "CUP_H_Navy_CrewHelmet_Blue", + "CUP_H_Navy_CrewHelmet_Brown", + "CUP_H_Navy_CrewHelmet_Green", + "CUP_H_Navy_CrewHelmet_Red", + "CUP_H_Navy_CrewHelmet_Violet", + "CUP_H_Navy_CrewHelmet_White", + "CUP_H_Navy_CrewHelmet_Yellow", + "CUP_H_PMC_Cap_Grey", + "CUP_H_PMC_Cap_PRR_Grey", + "CUP_H_PMC_Cap_PRR_Tan", + "CUP_H_PMC_Cap_Tan", + "CUP_H_PMC_EP_Headset", + "CUP_H_PMC_PRR_Headset", + "CUP_H_RACS_Beret_Blue", + "CUP_H_RACS_Helmet_DPAT", + "CUP_H_RACS_Helmet_Des", + "CUP_H_RACS_Helmet_Goggles_DPAT", + "CUP_H_RACS_Helmet_Goggles_Des", + "CUP_H_RACS_Helmet_Headset_DPAT", + "CUP_H_RACS_Helmet_Headset_Des", + "CUP_H_SLA_BeenieGreen", + "CUP_H_SLA_Beret", + "CUP_H_SLA_Boonie", + "CUP_H_SLA_Helmet", + "CUP_H_SLA_OfficerCap", + "CUP_H_SLA_Pilot_Helmet", + "CUP_H_SLA_SLCap", + "CUP_H_SLA_TankerHelmet", + "CUP_H_TKI_Lungee_01", + "CUP_H_TKI_Lungee_02", + "CUP_H_TKI_Lungee_03", + "CUP_H_TKI_Lungee_04", + "CUP_H_TKI_Lungee_05", + "CUP_H_TKI_Lungee_06", + "CUP_H_TKI_Lungee_Open_01", + "CUP_H_TKI_Lungee_Open_02", + "CUP_H_TKI_Lungee_Open_03", + "CUP_H_TKI_Lungee_Open_04", + "CUP_H_TKI_Lungee_Open_05", + "CUP_H_TKI_Lungee_Open_06", + "CUP_H_TKI_Pakol_1_01", + "CUP_H_TKI_Pakol_1_02", + "CUP_H_TKI_Pakol_1_03", + "CUP_H_TKI_Pakol_1_04", + "CUP_H_TKI_Pakol_1_05", + "CUP_H_TKI_Pakol_1_06", + "CUP_H_TKI_Pakol_2_01", + "CUP_H_TKI_Pakol_2_02", + "CUP_H_TKI_Pakol_2_03", + "CUP_H_TKI_Pakol_2_04", + "CUP_H_TKI_Pakol_2_05", + "CUP_H_TKI_Pakol_2_06", + "CUP_H_TKI_SkullCap_01", + "CUP_H_TKI_SkullCap_02", + "CUP_H_TKI_SkullCap_03", + "CUP_H_TKI_SkullCap_04", + "CUP_H_TKI_SkullCap_05", + "CUP_H_TKI_SkullCap_06", + "CUP_H_TK_Beret", + "CUP_H_TK_Helmet", + "CUP_H_TK_Lungee", + "CUP_H_TK_PilotHelmet", + "CUP_H_TK_TankerHelmet", + "CUP_H_USMC_Crew_Helmet", + "CUP_H_USMC_Goggles_HelmetWDL", + "CUP_H_USMC_HeadSet_GoggleW_HelmetWDL", + "CUP_H_USMC_HeadSet_HelmetWDL", + "CUP_H_USMC_HelmetWDL", + "CUP_H_USMC_Helmet_Pilot", + "CUP_H_USMC_Officer_Cap" +]; +blck_RHS_Weapons = [ + "rhs_weap_hk416d10", + "rhs_weap_hk416d10_LMT", + "rhs_weap_hk416d10_m320", + "rhs_weap_hk416d145", + "rhs_weap_hk416d145_m320", + "rhs_weap_m16a4", + "rhs_weap_m16a4_carryhandle", + "rhs_weap_m16a4_carryhandle_M203", + "rhs_weap_m16a4_carryhandle_pmag", + "rhs_weap_m4_carryhandle", + "rhs_weap_m4_carryhandle_pmag", + "rhs_weap_m4_m203", + "rhs_weap_m4_m320", + "rhs_weap_m4a1", + "rhs_weap_m4a1_blockII", + "rhs_weap_m4a1_blockII_KAC", + "rhs_weap_m4a1_blockII_KAC_bk", + "rhs_weap_m4a1_blockII_KAC_d", + "rhs_weap_m4a1_blockII_KAC_wd", + "rhs_weap_m4a1_blockII_M203", + "rhs_weap_m4a1_blockII_M203_bk", + "rhs_weap_m4a1_blockII_M203_d", + "rhs_weap_m4a1_blockII_M203_wd", + "rhs_weap_m4a1_blockII_bk", + "rhs_weap_m4a1_blockII_d", + "rhs_weap_m4a1_blockII_wd", + "rhs_weap_m4a1_carryhandle", + "rhs_weap_m4a1_carryhandle_m203", + "rhs_weap_m4a1_carryhandle_pmag", + "rhs_weap_m4a1_m203", + "rhs_weap_m4a1_m320", + "rhs_weap_mk18", + "rhs_weap_mk18", + "rhs_weap_mk18_KAC", + "rhs_weap_mk18_KAC_bk", + "rhs_weap_mk18_KAC_d", + "rhs_weap_mk18_KAC_wd", + "rhs_weap_mk18_bk", + "rhs_weap_mk18_d", + "rhs_weap_mk18_m320", + "rhs_weap_mk18_wd", + "rhs_weap_m249_pip_L", + "rhs_weap_m249_pip_L_para", + "rhs_weap_m249_pip_L_vfg", + "rhs_weap_m249_pip_S", + "rhs_weap_m249_pip_S_para", + "rhs_weap_m249_pip_S_vfg", + "rhs_weap_m240B", + "rhs_weap_m240B_CAP", + "rhs_weap_m240G", + "rhs_weap_pkm", + "rhs_weap_pkp", + // Added by ElShotte - 1 Item + "rhs_weap_m27iar" +]; + +blck_RHS_UniformsUSAF = [ + "rhs_uniform_FROG01_m81", + "rhs_uniform_FROG01_d", + "rhs_uniform_FROG01_wd", + "rhs_uniform_cu_ocp", + "rhs_uniform_cu_ucp", + "rhs_uniform_cu_ocp_101st", + "rhs_uniform_cu_ocp_10th", + "rhs_uniform_cu_ocp_1stcav", + "rhs_uniform_cu_ocp_82nd", + "rhs_uniform_cu_ucp_101st", + "rhs_uniform_cu_ucp_10th", + "rhs_uniform_cu_ucp_1stcav", + "rhs_uniform_cu_ucp_82nd", + "rhs_uniform_cu_ocp_patchless", + "rhs_uniform_cu_ucp_patchless", + // Added by ElShotte - 5 Items + "rhs_uniform_g3_m81", + "rhs_uniform_g3_blk", + "rhs_uniform_g3_mc", + "rhs_uniform_g3_rgr", + "rhs_uniform_g3_tan" + +]; + +blck_RHS_VestsUSAF = [ + "rhsusf_iotv_ucp", + "rhsusf_iotv_ucp_grenadier", + "rhsusf_iotv_ucp_medic", + "rhsusf_iotv_ucp_repair", + "rhsusf_iotv_ucp_rifleman", + "rhsusf_iotv_ucp_SAW", + "rhsusf_iotv_ucp_squadleader", + "rhsusf_iotv_ucp_teamleader", + "rhsusf_iotv_ocp", + "rhsusf_iotv_ocp_grenadier", + "rhsusf_iotv_ocp_medic", + "rhsusf_iotv_ocp_repair", + "rhsusf_iotv_ocp_rifleman", + "rhsusf_iotv_ocp_SAW", + "rhsusf_iotv_ocp_squadleader", + "rhsusf_iotv_ocp_teamleader", + //added by chainsaw - 2 + "rhsusf_spc", + "rhsusf_spc_mg", + // Added by ElShotte - 12 Items + "rhsusf_spc_marksman", + "rhsusf_spc_corpsman", + "rhsusf_spc_patchless", + "rhsusf_spc_squadleader", + "rhsusf_spc_teamleader", + "rhsusf_spc_light", + "rhsusf_spc_rifleman", + "rhsusf_spc_iar", + "rhsusf_spcs_ocp_rifleman", + "rhsusf_spcs_ocp", + "rhsusf_spcs_ucp_rifleman", + "rhsusf_spcs_ucp" + +]; + +blck_RHS_BackpacksUSAF = [ + "rhsusf_assault_eagleaiii_coy", + "rhsusf_assault_eagleaiii_ocp", + "rhsusf_assault_eagleaiii_ucp", + "rhsusf_falconii_coy", + "rhsusf_falconii_mc", + "rhsusf_falconii", + "RHS_M2_Gun_Bag" + +]; + +blck_RHS_HeadgearUSAF = [ + "rhs_Booniehat_m81", + "rhs_Booniehat_marpatd", + "rhs_Booniehat_marpatwd", + "rhs_Booniehat_ocp", + "rhs_Booniehat_ucp", + "rhsusf_Bowman", + "rhsusf_ach_bare", + "rhsusf_ach_bare_des", + "rhsusf_ach_bare_des_ess", + "rhsusf_ach_bare_des_headset", + "rhsusf_ach_bare_des_headset_ess", + "rhsusf_ach_bare_ess", + "rhsusf_ach_bare_headset", + "rhsusf_ach_bare_headset_ess", + "rhsusf_ach_bare_semi", + "rhsusf_ach_bare_semi_ess", + "rhsusf_ach_bare_semi_headset", + "rhsusf_ach_bare_semi_headset_ess", + "rhsusf_ach_bare_tan", + "rhsusf_ach_bare_tan_ess", + "rhsusf_ach_bare_tan_headset", + "rhsusf_ach_bare_tan_headset_ess", + "rhsusf_ach_bare_wood", + "rhsusf_ach_bare_wood_ess", + "rhsusf_ach_bare_wood_headset", + "rhsusf_ach_bare_wood_headset_ess", + "rhsusf_ach_helmet_ESS_ocp", + "rhsusf_ach_helmet_ESS_ucp", + "rhsusf_ach_helmet_M81", + "rhsusf_ach_helmet_camo_ocp", + "rhsusf_ach_helmet_headset_ess_ocp", + "rhsusf_ach_helmet_headset_ess_ucp", + "rhsusf_ach_helmet_headset_ocp", + "rhsusf_ach_helmet_headset_ucp", + "rhsusf_ach_helmet_ocp", + "rhsusf_ach_helmet_ocp_norotos", + "rhsusf_ach_helmet_ucp", + "rhsusf_ach_helmet_ucp_norotos", + "rhsusf_bowman_cap", + "rhsusf_lwh_helmet_M1942", + "rhsusf_lwh_helmet_marpatd", + "rhsusf_lwh_helmet_marpatd_ess", + "rhsusf_lwh_helmet_marpatd_headset", + "rhsusf_lwh_helmet_marpatwd", + "rhsusf_lwh_helmet_marpatwd_ess", + "rhsusf_lwh_helmet_marpatwd_headset", + "rhsusf_mich_bare", + "rhsusf_mich_bare_alt", + "rhsusf_mich_bare_alt_semi", + "rhsusf_mich_bare_alt_tan", + "rhsusf_mich_bare_headset", + "rhsusf_mich_bare_norotos", + "rhsusf_mich_bare_norotos_alt", + "rhsusf_mich_bare_norotos_alt_headset", + "rhsusf_mich_bare_norotos_alt_semi", + "rhsusf_mich_bare_norotos_alt_semi_headset", + "rhsusf_mich_bare_norotos_alt_tan", + "rhsusf_mich_bare_norotos_alt_tan_headset", + "rhsusf_mich_bare_norotos_arc", + "rhsusf_mich_bare_norotos_arc_alt", + "rhsusf_mich_bare_norotos_arc_alt_headset", + "rhsusf_mich_bare_norotos_arc_alt_semi", + "rhsusf_mich_bare_norotos_arc_alt_semi_headset", + "rhsusf_mich_bare_norotos_arc_alt_tan", + "rhsusf_mich_bare_norotos_arc_alt_tan_headset", + "rhsusf_mich_bare_norotos_arc_headset", + "rhsusf_mich_bare_norotos_arc_semi", + "rhsusf_mich_bare_norotos_arc_semi_headset", + "rhsusf_mich_bare_norotos_arc_tan", + "rhsusf_mich_bare_norotos_headset", + "rhsusf_mich_bare_norotos_semi", + "rhsusf_mich_bare_norotos_semi_headset", + "rhsusf_mich_bare_norotos_tan", + "rhsusf_mich_bare_norotos_tan_headset", + "rhsusf_mich_bare_semi", + "rhsusf_mich_bare_semi_headset", + "rhsusf_mich_bare_tan", + "rhsusf_mich_bare_tan_headset", + "rhsusf_mich_helmet_marpatd_alt_headset", + "rhsusf_mich_helmet_marpatd_headset", + "rhsusf_mich_helmet_marpatd_norotos", + "rhsusf_mich_helmet_marpatd_norotos_arc", + "rhsusf_mich_helmet_marpatd_norotos_arc_headset", + "rhsusf_mich_helmet_marpatd_norotos_headset", + "rhsusf_mich_helmet_marpatwd", + "rhsusf_mich_helmet_marpatwd_alt", + "rhsusf_mich_helmet_marpatwd_alt_headset", + "rhsusf_mich_helmet_marpatwd_headset", + "rhsusf_mich_helmet_marpatwd_norotos", + "rhsusf_mich_helmet_marpatwd_norotos_arc", + "rhsusf_mich_helmet_marpatwd_norotos_arc_headset", + "rhsusf_mich_helmet_marpatwd_norotos_headset", + // added by chainsaw - 13 + "rhsusf_patrolcap_ocp", + "rhsusf_patrolcap_ucp", + "rhsusf_opscore_01", + "rhsusf_opscore_01_tan", + "rhsusf_opscore_02_tan", + "rhsusf_opscore_03_ocp", + "rhsusf_opscore_04_ocp", + "rhsusf_cvc_helmet", + "rhsusf_cvc_ess", + "rhsusf_hgu56p", + "rhsusf_hgu56p_mask", + "rhsusf_cvc_green_helmet", + "rhsusf_cvc_green_ess", + // Added by ElShotte - 41 Items + "rhsusf_opscore_bk_pelt", + "rhsusf_opscore_bk", + "rhsusf_opscore_coy_cover", + "rhsusf_opscore_coy_cover_pelt", + "rhsusf_opscore_fg", + "rhsusf_opscore_fg_pelt", + "rhsusf_opscore_fg_pelt_cam", + "rhsusf_opscore_fg_pelt_nsw", + "rhsusf_opscore_mc", + "rhsusf_opscore_mc_pelt", + "rhsusf_opscore_mc_pelt_nsw", + "rhsusf_opscore_mc_cover", + "rhsusf_opscore_mc_cover_pelt", + "rhsusf_opscore_mc_cover_pelt_nsw", + "rhsusf_opscore_mc_cover_pelt_cam", + "rhsusf_opscore_paint", + "rhsusf_opscore_paint_pelt", + "rhsusf_opscore_paint_pelt_nsw", + "rhsusf_opscore_paint_pelt_nsw_cam", + "rhsusf_opscore_rg_cover", + "rhsusf_opscore_rg_cover_pelt", + "rhsusf_opscore_ut", + "rhsusf_opscore_ut_pelt", + "rhsusf_opscore_ut_pelt_cam", + "rhsusf_opscore_ut_pelt_nsw", + "rhsusf_opscore_ut_pelt_nsw_cam", + "rhsusf_opscore_mar_ut_pelt", + "rhsusf_opscore_mar_ut", + "rhsusf_opscore_mar_fg_pelt", + "rhsusf_opscore_mar_fg", + "rhsusf_protech_helmet", + "rhsusf_protech_helmet_ess", + "rhsusf_protech_helmet_rhino", + "rhsusf_protech_helmet_rhino_ess" +]; + +blck_RHS_UniformsGREF = [ + "rhsgref_uniform_alpenflage", + "rhsgref_uniform_flecktarn", + "rhsgref_uniform_para_ttsko_mountain", + "rhsgref_uniform_para_ttsko_oxblood", + "rhsgref_uniform_para_ttsko_urban", + "rhsgref_uniform_reed", + "rhsgref_uniform_specter", + "rhsgref_uniform_tigerstripe", + "rhsgref_uniform_ttsko_forest", + "rhsgref_uniform_ttsko_mountain", + "rhsgref_uniform_ttsko_urban", + "rhsgref_uniform_vsr", + "rhsgref_uniform_woodland", + "rhsgref_uniform_woodland_olive" +]; + +blck_RHS_VestsGREF = [ + "rhsgref_6b23", + "rhsgref_6b23_khaki", + "rhsgref_6b23_khaki_medic", + "rhsgref_6b23_khaki_nco", + "rhsgref_6b23_khaki_officer", + "rhsgref_6b23_khaki_rifleman", + "rhsgref_6b23_khaki_sniper", + "rhsgref_6b23_ttsko_digi", + "rhsgref_6b23_ttsko_digi_medic", + "rhsgref_6b23_ttsko_digi_nco", + "rhsgref_6b23_ttsko_digi_officer", + "rhsgref_6b23_ttsko_digi_rifleman", + "rhsgref_6b23_ttsko_digi_sniper", + "rhsgref_6b23_ttsko_forest", + "rhsgref_6b23_ttsko_forest_rifleman", + "rhsgref_6b23_ttsko_mountain", + "rhsgref_6b23_ttsko_mountain_medic", + "rhsgref_6b23_ttsko_mountain_nco", + "rhsgref_6b23_ttsko_mountain_officer", + "rhsgref_6b23_ttsko_mountain_rifleman", + "rhsgref_6b23_ttsko_mountain_sniper", + "rhsgref_otv_digi", + "rhsgref_otv_khaki" +]; + +blck_RHS_HeadgearGREF = [ + "rhsgref_6b27m", + "rhsgref_6b27m_ttsko_digi", + "rhsgref_6b27m_ttsko_forest", + "rhsgref_6b27m_ttsko_mountain", + "rhsgref_6b27m_ttsko_urban", + "rhsgref_Booniehat_alpen", + "rhsgref_fieldcap", + "rhsgref_fieldcap_ttsko_digi", + "rhsgref_fieldcap_ttsko_forest", + "rhsgref_fieldcap_ttsko_mountain", + "rhsgref_fieldcap_ttsko_urban", + "rhsgref_patrolcap_specter", + "rhsgref_ssh68", + "rhsgref_ssh68_emr", + "rhsgref_ssh68_ttsko_digi", + "rhsgref_ssh68_ttsko_forest", + "rhsgref_ssh68_ttsko_mountain", + "rhsgref_ssh68_un" +]; +blck_RHS_WeaponsGREF = [ + "rhs_weap_kar98k", + "rhs_weap_m21a", + "rhs_weap_m21a_fold", + "rhs_weap_m21a_pr", + "rhs_weap_m21s", + "rhs_weap_m21s_fold", + "rhs_weap_m21s_pr", + "rhs_weap_m38", + "rhs_weap_m70ab2", + "rhs_weap_m70ab2_fold", + "rhs_weap_m70b1", + "rhs_weap_m76", + "rhs_weap_m92", + "rhs_weap_m92_fold" +]; + +blck_RHS_HeadgearSAF = [ + "rhssaf_helmet_m59_85_nocamo", + "rhssaf_helmet_m59_85_oakleaf", + "rhssaf_helmet_m97_olive_nocamo", + "rhssaf_helmet_m97_olive_nocamo_black_ess", + "rhssaf_helmet_m97_olive_nocamo_black_ess_bare", + "rhssaf_helmet_m97_black_nocamo", + "rhssaf_helmet_m97_black_nocamo_black_ess", + "rhssaf_helmet_m97_black_nocamo_black_ess_bare", + "rhssaf_Helmet_m97_woodland", + "rhssaf_Helmet_m97_digital", + "rhssaf_Helmet_m97_md2camo", + "rhssaf_Helmet_m97_oakleaf", + "rhssaf_helmet_m97_nostrap_blue", + "rhssaf_helmet_m97_nostrap_blue_tan_ess", + "rhssaf_helmet_m97_nostrap_blue_tan_ess_bare", + "rhssaf_helmet_m97_woodland_black_ess", + "rhssaf_helmet_m97_woodland_black_ess_bare", + "rhssaf_helmet_m97_digital_black_ess", + "rhssaf_helmet_m97_digital_black_ess_bare", + "rhssaf_helmet_m97_md2camo_black_ess", + "rhssaf_helmet_m97_md2camo_black_ess_bare", + "rhssaf_helmet_m97_oakleaf_black_ess", + "rhssaf_helmet_m97_oakleaf_black_ess_bare", + "rhssaf_helmet_hgu56p", + "rhssaf_beret_green", + "rhssaf_beret_red", + "rhssaf_beret_black", + "rhssaf_beret_blue_un", + "rhssaf_booniehat_digital", + "rhssaf_booniehat_md2camo", + "rhssaf_booniehat_woodland" +]; + +blck_RHS_UniformsSAF = [ + "rhssaf_uniform_m10_digital", + "rhssaf_uniform_m10_digital_summer", + "rhssaf_uniform_m10_digital_desert", + "rhssaf_uniform_m10_digital_tan_boots", + "rhssaf_uniform_m93_oakleaf", + "rhssaf_uniform_m93_oakleaf_summer", + "rhssaf_uniform_heli_pilot" +]; + +blck_RHS_VestsSAF = [ + "rhssaf_vest_md98_woodland", + "rhssaf_vest_md98_md2camo", + "rhssaf_vest_md98_digital", + "rhssaf_vest_md98_officer", + "rhssaf_vest_md98_rifleman", + "rhssaf_vest_otv_md2camo", + "rhssaf_vest_md99_md2camo_rifleman", + "rhssaf_vest_md99_digital_rifleman", + "rhssaf_vest_md99_woodland_rifleman", + "rhssaf_vest_md99_md2camo", + "rhssaf_vest_md99_digital", + "rhssaf_vest_md99_woodland" +]; + +blck_RHS_BackpacksSAF = [ + "rhssaf_30rnd_556x45_EPR_G36", + "rhssaf_30rnd_556x45_SOST_G36", + "rhssaf_100rnd_556x45_EPR_G36", + "rhssaf_30rnd_556x45_SPR_G36", + "rhssaf_30rnd_556x45_Tracers_G36", + "rhssaf_30rnd_556x45_MDIM_G36", + "rhssaf_30rnd_556x45_TDIM_G36", + "150Rnd_556x45_Drum_Mag_F", + "150Rnd_556x45_Drum_Mag_Tracer_F", + "rhs_30Rnd_762x39mm", + "rhs_30Rnd_762x39mm_tracer", + "rhs_30Rnd_762x39mm_89", + "rhs_30Rnd_762x39mm_U", + "rhsgref_30rnd_556x45_m21", + "rhsgref_30rnd_556x45_m21_t", + "rhs_100Rnd_762x54mmR", + "rhs_100Rnd_762x54mmR_green", + "rhssaf_250Rnd_762x54R" +]; + +blck_RHS_WeaponsSAF = [ + "rhs_weap_m70ab2_fold", + "rhs_weap_m70b1", + "rhs_weap_m70b1n", + "rhs_weap_m70b3n", + "rhs_weap_m70b3n_pbg40", + "rhs_weap_m92", + "rhs_weap_m92_fold", + "rhs_weap_m76", + "rhs_weap_m21a", + "rhs_weap_m21a_pr", + "rhs_weap_m21a_pr_pbg40", + "rhs_weap_m21a_fold", + "rhs_weap_m21a_pbg40", + "rhs_weap_m21s", + "rhs_weap_m21s_pr", + "rhs_weap_m21s_fold", + "rhs_weap_m82a1", + "rhs_weap_minimi_para_railed", + "rhs_weap_g36c", + "rhs_weap_g36kv", + "rhs_weap_g36kv_ag36", + "rhs_weap_m84" +]; + +blck_NIA_WeaponsLMG = [ + "hlc_lmg_M249E2", + "hlc_lmg_M249E2", + "hlc_lmg_M60E4", + "hlc_lmg_MG3KWS_b", + "hlc_lmg_MG3KWS_g", + "hlc_lmg_MG42", + "hlc_lmg_MG42KWS_t", + "hlc_lmg_m249para", + "hlc_lmg_m249para", + "hlc_lmg_m60", + "hlc_lmg_mg42kws_b", + "hlc_lmg_mg42kws_g", + "hlc_lmg_minimi", + "hlc_lmg_minimi_railed", + "hlc_lmg_minimipara", + "hlc_lmg_mk48", + "hlc_m249_pip1", + "hlc_m249_pip2", + "hlc_m249_pip3", + "hlc_m249_pip4", + "hlc_rifle_rpk", + "hlc_rifle_rpk12", + "hlc_rifle_rpk74n" +]; + +blck_NIA_WeaponsSMG = [ + "hlc_smg_9mmar", + "hlc_smg_MP5N", + "hlc_smg_mp510", + "hlc_smg_mp5a2", + "hlc_smg_mp5a3", + "hlc_smg_mp5a4", + "hlc_smg_mp5k", + "hlc_smg_mp5k_PDW", + "hlc_smg_mp5sd5", + "hlc_smg_mp5sd6" +]; + +blck_NIA_WeaponsAR = [ + "HLC_Rifle_g3ka4_GL", + "hlc_barrel_carbine", + "hlc_barrel_hbar", + "hlc_barrel_standard", + "hlc_rifle_Bushmaster300", + "hlc_rifle_Colt727", + "hlc_rifle_Colt727_GL", + "hlc_rifle_FAL5000", + "hlc_rifle_FAL5000Rail", + "hlc_rifle_FAL5000_RH", + "hlc_rifle_FAL5061", + "hlc_rifle_FAL5061Rail", + "hlc_rifle_G36A1", + "hlc_rifle_G36A1AG36", + "hlc_rifle_G36C", + "hlc_rifle_G36CMLIC", + "hlc_rifle_G36CTAC", + "hlc_rifle_G36CV", + "hlc_rifle_G36E1", + "hlc_rifle_G36E1AG36", + "hlc_rifle_G36KA1", + "hlc_rifle_G36KE1", + "hlc_rifle_G36KMLIC", + "hlc_rifle_G36KTAC", + "hlc_rifle_G36KV", + "hlc_rifle_G36MLIAG36", + "hlc_rifle_G36MLIC", + "hlc_rifle_G36TAC", + "hlc_rifle_G36V", + "hlc_rifle_G36VAG36", + "hlc_rifle_LAR", + "hlc_rifle_M14", + "hlc_rifle_M14DMR", + "hlc_rifle_M21", + "hlc_rifle_MG36", + "hlc_rifle_RK62", + "hlc_rifle_RU556", + "hlc_rifle_RU5562", + "hlc_rifle_SAMR", + "hlc_rifle_SLR", + "hlc_rifle_SLRchopmod", + "hlc_rifle_STG58F", + "hlc_rifle_STGW57", + "hlc_rifle_aek971", + "hlc_rifle_aek971_mtk", + "hlc_rifle_ak12", + "hlc_rifle_ak12gl", + "hlc_rifle_ak47", + "hlc_rifle_ak74", + "hlc_rifle_ak74_MTK", + "hlc_rifle_ak74_dirty", + "hlc_rifle_ak74_dirty2", + "hlc_rifle_ak74m", + "hlc_rifle_ak74m_MTK", + "hlc_rifle_ak74m_gl", + "hlc_rifle_akm", + "hlc_rifle_akm_MTK", + "hlc_rifle_akmgl", + "hlc_rifle_aks74", + "hlc_rifle_aks74_GL", + "hlc_rifle_aks74_MTK", + "hlc_rifle_aks74u", + "hlc_rifle_aks74u_MTK", + "hlc_rifle_aku12", + "hlc_rifle_amt", + "hlc_rifle_aug", + "hlc_rifle_auga1_B", + "hlc_rifle_auga1_t", + "hlc_rifle_auga1carb", + "hlc_rifle_auga1carb_b", + "hlc_rifle_auga1carb_t", + "hlc_rifle_auga2", + "hlc_rifle_auga2_b", + "hlc_rifle_auga2_t", + "hlc_rifle_auga2carb", + "hlc_rifle_auga2carb_b", + "hlc_rifle_auga2carb_t", + "hlc_rifle_auga2lsw", + "hlc_rifle_auga2lsw_b", + "hlc_rifle_auga2lsw_t", + "hlc_rifle_auga3", + "hlc_rifle_auga3_GL", + "hlc_rifle_auga3_GL_B", + "hlc_rifle_auga3_GL_BL", + "hlc_rifle_auga3_b", + "hlc_rifle_auga3_bl", + "hlc_rifle_aughbar", + "hlc_rifle_aughbar_b", + "hlc_rifle_aughbar_t", + "hlc_rifle_augsr", + "hlc_rifle_augsr_b", + "hlc_rifle_augsr_t", + "hlc_rifle_augsrcarb", + "hlc_rifle_augsrcarb_b", + "hlc_rifle_augsrcarb_t", + "hlc_rifle_augsrhbar", + "hlc_rifle_augsrhbar_b", + "hlc_rifle_augsrhbar_t", + "hlc_rifle_bcmblackjack", + "hlc_rifle_bcmjack", + "hlc_rifle_c1A1", + "hlc_rifle_falosw", + "hlc_rifle_g3a3", + "hlc_rifle_g3a3ris", + "hlc_rifle_g3a3v", + "hlc_rifle_g3ka4", + "hlc_rifle_g3sg1", + "hlc_rifle_hk33a2", + "hlc_rifle_hk33a2RIS", + "hlc_rifle_hk51", + "hlc_rifle_hk53", + "hlc_rifle_hk53RAS", + "hlc_rifle_honeybadger", + "hlc_rifle_l1a1slr", + "hlc_rifle_m14sopmod", + "hlc_rifle_osw_GL", + "hlc_rifle_rpk74n", + "hlc_rifle_sig5104", + "hlc_rifle_slr107u", + "hlc_rifle_slr107u_MTK", + "hlc_rifle_stgw57_RIS", + "hlc_rifle_stgw57_commando", + "hlc_rifle_vendimus" +]; + +blck_NIA_WeaponsSniper = [ + "hlc_rifle_M1903A1", + "hlc_rifle_M1903A1OMR", + "hlc_rifle_M1903A1_unertl", + "hlc_rifle_PSG1A1_RIS", + "hlc_rifle_awMagnum_BL_ghillie", + "hlc_rifle_awMagnum_FDE_ghillie", + "hlc_rifle_awMagnum_OD_ghillie", + "hlc_rifle_awcovert", + "hlc_rifle_awcovert_BL", + "hlc_rifle_awcovert_FDE", + "hlc_rifle_awmagnum", + "hlc_rifle_awmagnum_BL", + "hlc_rifle_awmagnum_FDE", + "hlc_rifle_psg1", + "hlc_rifle_psg1A1" +]; +*/ \ No newline at end of file diff --git a/@GMS/addons/custom_server/Configs/blck_defines.hpp b/@GMS/addons/custom_server/Configs/blck_defines.hpp index 7c356ea..66cfed1 100644 --- a/@GMS/addons/custom_server/Configs/blck_defines.hpp +++ b/@GMS/addons/custom_server/Configs/blck_defines.hpp @@ -2,7 +2,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last Modified 6/7/17 -------------------------- License @@ -12,8 +11,14 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -#define wpModeMove #define useAPEX //#define useDynamicSimulation //#define blck_debugMode +<<<<<<< HEAD //#define blck_milServer +======= +//#define blck_triggerLoopCompleteTime 40*60 +//#define blck_milServer + + +>>>>>>> Experimental diff --git a/@GMS/addons/custom_server/Missions/Blue/captive1.sqf b/@GMS/addons/custom_server/Missions/Blue/captive1.sqf new file mode 100644 index 0000000..bbe1902 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Blue/captive1.sqf @@ -0,0 +1,130 @@ +/* + Mission Template 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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Blue Mission with template = default2"; + +_crateLoot = blck_BoxLoot_Blue; +_lootCounts = blck_lootCountsBlue; +_startMsg = "A local Mafia Don has been spotted! Capture him and earn a reward!"; +_endMsg = "The Maria Don was captured and the area is under survivor control!"; +_assetKilledMsg = "Enemy Leader Killed and Bandits Fled with All Loot: Mission Aborted"; +_markerLabel = ""; +_markerType = ["ELIPSE",[175,175],"GRID"]; +_markerColor = "ColorBlue"; +_markerMissionName = "Capture Don"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[-1.44531,-21.2148,0],0,[true,false]], + ["Land_u_Barracks_V2_F",[-3.79102,2.56055,0],0,[true,false]], + ["Land_BagBunker_Small_F",[33.8457,18.2461,0],51.9209,[true,false]], + ["Land_BagBunker_Small_F",[-30.4336,22.9043,0],321.242,[true,false]], + ["Land_BagBunker_Small_F",[-35.3164,-29.9648,0],237.265,[true,false]], + ["Land_BagBunker_Small_F",[37.4551,-29.8672,0],128.253,[true,false]], + ["Land_BagBunker_Large_F",[-30.4082,-6.65039,0],180,[true,false]], + ["Land_BagBunker_Large_F",[-2.81836,19.4668,0],0,[true,false]], + ["Land_BagBunker_Large_F",[-2.14063,-18.4355,0],0,[true,false]], + ["Land_BagBunker_Large_F",[26.1328,-10.252,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-19.707,30.0078,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-11.0742,30.209,0],0,[true,false]], + ["Land_HBarrier_Big_F",[18.541,31.125,0],0,[true,false]], + ["Land_HBarrier_Big_F",[0.0703125,30.6699,0],0,[true,false]], + ["Land_HBarrier_Big_F",[8.79102,31.0273,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-19.0938,-36.0176,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-10.4609,-35.8164,0],0,[true,false]], + ["Land_HBarrier_Big_F",[19.1543,-34.9004,0],0,[true,false]], + ["Land_HBarrier_Big_F",[0.683594,-35.3555,0],0,[true,false]], + ["Land_HBarrier_Big_F",[9.4043,-34.998,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-47.6211,19.666,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[-47.6777,11.0313,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[-47.6465,-18.5977,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[-47.5508,-0.123047,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[-47.4531,-8.84961,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[47.5098,-22.1211,0],270.496,[true,false]], + ["Land_HBarrier_Big_F",[47.3848,-13.4863,0],270.496,[true,false]], + ["Land_HBarrier_Big_F",[46.7246,16.1348,0],270.496,[true,false]], + ["Land_HBarrier_Big_F",[47.0195,-2.33789,0],270.496,[true,false]], + ["Land_HBarrier_Big_F",[46.7363,6.38477,0],270.496,[true,false]], + ["Land_ChairPlastic_F",[-6.06445,10.7129,0],185.284,[true,false]], + ["Land_CampingChair_V2_F",[0.222656,8.24219,0],0,[true,false]], + ["Campfire_burning_F",[0.591797,9.47266,0],0,[true,false]], + ["Land_HBarrier_3_F",[-10.3887,10.209,0],88.6077,[true,false]], + ["Land_HBarrier_3_F",[8.12109,10.4063,0],88.6077,[true,false]], + ["Land_HBarrier_3_F",[8.17383,13.5781,0],88.6077,[true,false]], + ["Land_HBarrier_3_F",[8.11914,16.957,0.0400085],88.6077,[true,false]] + ]; // list of objects to spawn as landscape; // list of objects to spawn as landscape + +_enemyLeaderConfig = + ["I_G_resistanceLeader_F",[-7.83789,13.1465,-0.00143886],126.345,[true,false], + ["Acts_B_briefings"], // Use the animation viewer to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/ + ["H_Beret_Colonel"], // array of headgear choices + ["U_OrestesBody"] // array of uniform choices + ]; +_enemyLeaderConfig set[ + 1, selectRandom [[-7.83789,13.1465,-0.00143886]] + ]; + // This allows us to place the antagonist to be arrested in one of several random locations. +_missionLootBoxes = [ + //["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout + //["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks + //["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]] + ]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. + + // blck_lootCountsBlue= [4,12,3,6,6,1]; +_missionLootVehicles = [ + //["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]], + //["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]] + ]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array. + // ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; + + /* + ["B_G_Soldier_AR_F",[-19.5156,25.2598,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[-27.7676,-24.5508,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[32.4883,-23.4609,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[36.6914,12.1836,-0.00143886],0,[true,false]] + */ +_missionGroups = + [ + //_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; + [[-19.5156,25.2598,-0.00143886],3,3,"Blue",10,20], + [[-27.7676,-24.5508,-0.00143886],3,3,"Blue",10,20], + [[32.4883,-23.4609,-0.00143886],3,3,"Blue",10,20], + [[36.6914,12.1836,-0.00143886],3,3,"Blue",10,20] + ]; // Can be used to define spawn positions of AI patrols + +_missionEmplacedWeapons = [ + //["B_HMG_01_high_F",[-10,-15,0]], + //["B_GMG_01_high_F",[10,12,0]], + //["O_static_AT_F",[-10,10,0]] + ]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used + +_missionPatrolVehicles = [ + //["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]], + //["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]], + //["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]] +]; +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Blue; +_maxNoAI = blck_MaxAI_Blue; +_noAIGroups = blck_AIGrps_Blue; +_noVehiclePatrols = blck_SpawnVeh_Blue; +_noEmplacedWeapons = blck_SpawnEmplaced_Blue; +_uniforms = blck_SkinList; +_headgear = blck_headgear; +_chanceReinforcements = blck_chanceParaBlue; +_noPara = blck_noParaBlue; +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; +_spawnCratesTiming = "atMissionEndAir"; +_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured" +//_timeOut = -1; +#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Blue/default.sqf b/@GMS/addons/custom_server/Missions/Blue/default.sqf index ede9c78..ee6b769 100644 --- a/@GMS/addons/custom_server/Missions/Blue/default.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/default.sqf @@ -11,52 +11,126 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_chanceHeliPatrol","_endCondition","_chanceHeliLootDropped","_chanceLoot","_markerColor","_markerType","_useMines"]; + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Blue Mission with template = default"; private["_missionEnabled"]; -_crateLoot = blck_BoxLoot_Blue; +_crateLoot = blck_BoxLoot_Blue; + /* + You can use a customized loot array if you like. The format is as follows. note that for each category you can give a number or a range. + _crateLoot = [ + [// Weapons + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"] + ], + [//Magazines + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // Optics + ["optic_KHS_tan",1,3] + ], + [// Materials and supplies + ["Exile_Item_CamoTentKit",1,6] + ], + [//Items + ["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + ["B_OutdoorPack_tan",1,2] + ] + ]; + */ + _lootCounts = blck_lootCountsBlue; + /* + You can use a customized array here if you like; note that you can give a value or a range. + // 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], // Weapons + [24,32], // Magazines + [5,10], // Optics + [25,35], // materials(cinder etc) + 16, // items (food etc) + 1 // backpacks + ]; // Orange + */ _startMsg = "A group of Bandits was sighted in a nearby sector! Check the Blue marker on your map for the location!"; _endMsg = "The Sector at the Blue Marker is under survivor control!"; _markerLabel = ""; _markerType = ["ELIPSE",[175,175],"GRID"]; + // The mission system supports circular or square mission markers as well as typical Arma icon-style (triangle, dot, flag etc) markers. + // to have an icon define the map marker as follows: + // ["mil_triangle",[0,0]]; + // Just replace the icon name with the one you want to spawn. _markerColor = "ColorBlue"; _markerMissionName = "Bandit Patrol"; _missionLandscapeMode = "random"; // acceptable values are "none","random","precise" + // Note that the format for the _missionLandscape is different for the two modes. + // In random, the objects are randomly arrayed around the mission center. + // In precise, the objects are spawned as closely as possible to the x,y,z offset from mission center specified. + // See default2.sqf for an example of the use of precise base objects. _missionLandscape = ["Land_WoodPile_F","Land_BagFence_Short_F","Land_WoodPile_F","Land_BagFence_Short_F","Land_WoodPile_F","Land_BagFence_Short_F","Land_FieldToilet_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_CargoBox_V1_F","Land_CargoBox_V1_F"]; // list of objects to spawn as landscape _missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. + // when empty, a single loot container will be spawned at the center of the mission. + // Use this to specify exact spots to spawn crates; see default2.seq for an example. +//_missionGroups = []; // Not required. + // When present and empty the mission spawner evaluates the minAI, maxAI, noAIGroups settings + // When present with values these override the defaults. + // See default2.sqf for an example of the use of this variable. _missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. + + // when the array is empty this parameter is ignored. + // You can have vehicles serve as loot containiners by defining them here. + // see default2.sqf for an example _missionEmplacedWeapons = []; // 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 -_minNoAI = blck_MinAI_Blue; -_maxNoAI = blck_MaxAI_Blue; -_noAIGroups = blck_AIGrps_Blue; -_noVehiclePatrols = blck_SpawnVeh_Blue; -_noEmplacedWeapons = blck_SpawnEmplaced_Blue; + // When the array is empty emplaced (static) weapons will be spawned randomly based on the setings in the configs that specify the number, AI difficulty and type of static weapons. + // you can specify the location relative to mission center, type of weapon etc. + // this information overides the defaults that that mission difficulty. + // See default2.sqf for an example of how one uses this. +_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue +_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults +_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults +_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults +_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults // Change _useMines to true/false below to enable mission-specific settings. -_useMines = blck_useMines; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -_chanceReinforcements = blck_chanceParaBlue; -_noPara = blck_noParaBlue; -_chanceHeliPatrol = blck_chanceHeliPatrolBlue; -_chanceLoot = 0.992; -private["_weap","_mags","_backpacks","_optics","_loadout","_reinforcementLootCounts"]; -_weap = 3 + floor(random(4)); -_mags = 8 + floor(random(6)); -_backpacks = 1 + floor(random(2)); -_optics = 1 + floor(random(6)); -_loadout = 1 + floor(random(3)); -_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks]; - -////diag_log format["blueDefault:: _chanceReinforcements = %1 and _chanceLoot = %2", _chanceReinforcements, _chanceLoot]; -////diag_log format["blueDefault:: default reinforcement settings are %1",blck_reinforcementsBlue]; +/* +_useMines = blck_useMines; // Setting this in the mission file overrides the defaults +_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults +_headgear = blck_headgear; // Setting this in the mission file overrides the defaults +_vests = blck_vests; +_backpacks = blck_backpacks; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +_sideArms = blck_Pistols; +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisBlue; +_missionHelis = blck_patrolHelisBlue; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults +_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. +_chanceLoot = 0.0; +_paraLoot = blck_BoxLoot_Blue; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults ////_timeOut = -1; +*/ #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Blue/default2.sqf b/@GMS/addons/custom_server/Missions/Blue/default2.sqf index d8e19fe..1ad8e72 100644 --- a/@GMS/addons/custom_server/Missions/Blue/default2.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/default2.sqf @@ -9,14 +9,48 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Blue Mission with template = default2"; -_crateLoot = blck_BoxLoot_Blue; +_crateLoot = blck_BoxLoot_Blue; + /* + You can use a customized loot array if you like. The format is as follows. note that for each category you can give a number or a range. + _crateLoot = [ + [// Weapons + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"] + ], + [//Magazines + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // Optics + ["optic_KHS_tan",1,3] + ], + [// Materials and supplies + ["Exile_Item_CamoTentKit",1,6] + ], + [//Items + ["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + ["B_OutdoorPack_tan",1,2] + ] + ]; + */ _lootCounts = blck_lootCountsBlue; + /* + You can use a customized array here if you like; note that you can give a value or a range. + // 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], // Weapons + [24,32], // Magazines + [5,10], // Optics + [25,35], // materials(cinder etc) + 16, // items (food etc) + 1 // backpacks + ]; // Orange + */ _startMsg = "A group of Bandits was sighted in a nearby sector! Check the Blue marker on your map for the location!"; _endMsg = "The Sector at the Blue Marker is under survivor control!"; _markerLabel = ""; @@ -26,22 +60,22 @@ _markerMissionName = "Bandit Patrol"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ ["Flag_AAF_F",[0,0,0],0,[false,false]], - ["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,1,0,[],"","",true,false], - ["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,0.00819469,0.830999,[],"","",true,false], - ["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,1,0,[],"","",true,false], - ["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,1,0,[],"","",true,false], - ["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,1,0,[],"","",true,false], - ["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,1,0,[],"","",true,false], - ["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,1,0,[],"","",true,false], - ["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,1,0,[],"","",true,false], - ["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,1,0,[],"","",true,false], - ["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,1,0,[],"","",true,false], - ["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,1,0,[],"","",true,false], - ["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,1,0,[],"","",true,false], - ["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,1,0,[],"","",true,false], - ["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,1,0,[],"","",true,false], - ["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,1,0,[],"","",true,false], - ["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,1,0,[],"","",true,false] + ["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,[true,false]], + ["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,[true,false]], + ["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,[true,false]], + ["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,1,0,[],"","",true,false]], + ["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,false]], + ["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,false]], + ["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[true,false]], + ["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[true,false]], + ["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[true,false]], + ["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[true,false]], + ["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[true,false]], + ["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[true,false]], + ["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[true,false]], + ["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[true,false]], + ["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[true,false]], + ["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[true,false]] ]; // list of objects to spawn as landscape; // list of objects to spawn as landscape _missionLootBoxes = [ @@ -52,12 +86,16 @@ _missionLootBoxes = [ // blck_lootCountsBlue= [4,12,3,6,6,1]; _missionLootVehicles = [ - //["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]], - //["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]] + ["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]], + ["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]] ]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array. // ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; +<<<<<<< HEAD _missionGroups = +======= +_missionGroups = +>>>>>>> Experimental [ //_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; [[-10.9121,-10.9824,-1.20243],5,7,"Green",5,12], @@ -72,7 +110,11 @@ _missionEmplacedWeapons = [ ["O_static_AT_F",[-10,10,0]] ]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used +<<<<<<< HEAD _missionPatrolVehicles = [ +======= +_missionPatrolVehicles = [ +>>>>>>> Experimental ["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]], ["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]], ["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]] @@ -84,11 +126,37 @@ _maxNoAI = blck_MaxAI_Blue; _noAIGroups = blck_AIGrps_Blue; _noVehiclePatrols = blck_SpawnVeh_Blue; _noEmplacedWeapons = blck_SpawnEmplaced_Blue; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -_chanceReinforcements = blck_chanceParaBlue; -_noPara = blck_noParaBlue; -_chanceHeliPatrol = blck_chanceHeliPatrolBlue; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +//_uniforms = blck_SkinList; + +_uniforms = ["U_OrestesBody","U_NikosAgedBody","U_NikosBody"]; + +_headgear = ["H_StrawHat_dark","H_StrawHat","H_Hat_brown","H_Hat_grey"]; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +/* +_weaponList = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F", + "LMG_Mk200_F","LMG_Zafir_F" + ]; +*/ +_sideArms = blck_Pistols; +_vests = blck_vests; +/* +_vests = [ + "V_PlateCarrierSpec_blk","V_PlateCarrierSpec_mtp","V_PlateCarrierGL_blk","V_PlateCarrierGL_mtp","V_PlateCarrierIAGL_oli" + }; +*/ +_backpacks = blck_backpacks; +/* +_backpacks = +{ + +}; +*/ +//_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; +_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf b/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf new file mode 100644 index 0000000..84bea35 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf @@ -0,0 +1,127 @@ +/* + Mission Template 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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Blue Mission with template = default2"; + +_crateLoot = blck_BoxLoot_Blue; +_lootCounts = blck_lootCountsBlue; +_startMsg = "A local town mayor is being held hostage! Free him and earn a reward!"; +_endMsg = "The Mayor Was Rescued!"; +_assetKilledMsg = "The Hostage Was Killed and Bandits Fled with All Loot: Mission Aborted"; +_markerLabel = ""; +_markerType = ["ELIPSE",[175,175],"GRID"]; +_markerColor = "ColorBlue"; +_markerMissionName = "Rescue Hostage"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[-10.6914,-10.541,0],0,[true,false]], + ["Land_SM_01_shelter_wide_F",[-6.29883,9.57617,0],0,[true,false]], + ["Land_ContainerLine_01_F",[-5.54492,40.8184,0],0,[true,false]], + ["Land_ContainerLine_01_F",[-6.92578,-38.2188,0],0,[true,false]], + ["Land_ContainerLine_01_F",[-65.8438,-28.4023,0],90,[true,false]], + ["Land_ContainerLine_01_F",[-66.0664,21.3496,0],90,[true,false]], + ["Land_ContainerLine_01_F",[195.047,-23.9395,0],87.9345,[true,false]], + ["Land_ContainerLine_01_F",[42.6172,-23.9395,0],90.5197,[true,false]], + ["Land_ContainerLine_01_F",[42.8398,27.5977,0],270,[true,false]], + //["B_G_Soldier_AR_F",[-6.74219,-78.625,-0.00143886],0,[true,false]], + //["B_G_Soldier_AR_F",[-86.3281,-5.14453,-0.00143886],0,[true,false]], + //["B_G_Soldier_AR_F",[61.4609,-1.92773,-0.00143838],0,[true,false]], + //["B_G_Soldier_AR_F",[-43.3359,54.0898,-0.00143838],0,[true,false]], + //["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]], + //["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]], + //["B_MRAP_01_hmg_F",[70.5156,-90.3867,4.76837e-007],0,[true,false]], + //["B_Soldier_F",[-78.834,72.0566,-2.20595],0,[true,false]], + //["B_MRAP_01_F",[-78.834,72.0566,4.76837e-007],0,[true,false]], + ["Campfire_burning_F",[-8.68555,-2.57813,0],0,[true,false]], + ["Land_ChairPlastic_F",[-2.36719,16.1875,0],0,[true,false]], + ["Land_ChairPlastic_F",[-2.99609,13.2813,0],0,[true,false]], + ["Land_ChairPlastic_F",[-2.84766,10.3398,0],0,[true,false]], + ["Land_ChairPlastic_F",[-3.06055,8.08203,0],0,[true,false]], + ["Land_ChairPlastic_F",[-2.70313,5.98047,0],0,[true,false]], + ["Land_Stone_4m_F",[-5.71484,21.2051,0],0,[true,false]], + ["Land_Stone_4m_F",[-1.30469,21.2266,0],0,[true,false]], + ["Land_Stone_4m_F",[-10.1836,21.166,0],0,[true,false]], + ["Land_Stone_4m_F",[3.01953,10.2051,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[2.97656,5.79492,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[3.04492,14.6738,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[-6.16992,-0.855469,0],0,[true,false]], + ["Land_Stone_4m_F",[-1.75977,-0.833984,0],0,[true,false]], + ["Land_Stone_4m_F",[-10.6387,-0.894531,0],0,[true,false]], + ["Land_Stone_4m_F",[-15.4609,9.93164,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[-15.5039,5.52148,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[-15.4355,14.4004,0],90.8324,[true,false]] + ]; // list of objects to spawn as landscape; // list of objects to spawn as landscape + +_hostageConfig = ["C_man_polo_6_F", + [-7.08594,9.5957,-0.299652], + 126.345,[true,false], + ["AmovPercMstpSnonWnonDnon_Scared"], + ["H_Cap_red"], // array of headgear choices + ["U_NikosBody"] // array of uniform choices + ]; // Sitting Animation + // Use the animation view to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/ +_missionLootBoxes = [ + //["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout + //["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks + //["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]] + ]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. + + // blck_lootCountsBlue= [4,12,3,6,6,1]; +_missionLootVehicles = [ + //["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]], + //["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]] + ]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array. + // ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; + + /* + ["B_G_Soldier_AR_F",[26.9961,-29.9551,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[32.2461,33.0605,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[-35.6035,32.1855,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[-47.4219,-19.8906,-0.00143886],0,[true,false]] + */ +_missionGroups = + [ + //_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; + [[26.9961,-29.9551,-0.00143886],3,3,"Blue",10,20], + [[32.2461,33.0605,-0.00143886],3,3,"Blue",10,20], + [[-35.6035,32.1855,-0.00143886],3,3,"Blue",10,20], + [[-47.4219,-19.8906,-0.00143886],3,3,"Blue",10,20] + ]; // Can be used to define spawn positions of AI patrols + +_missionEmplacedWeapons = [ + //["B_HMG_01_high_F",[-10,-15,0]], + //["B_GMG_01_high_F",[10,12,0]], + //["O_static_AT_F",[-10,10,0]] + ]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used + +_missionPatrolVehicles = [ + //["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]], + //["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]], + //["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]] +]; +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Blue; +_maxNoAI = blck_MaxAI_Blue; +_noAIGroups = blck_AIGrps_Blue; +_noVehiclePatrols = blck_SpawnVeh_Blue; +_noEmplacedWeapons = blck_SpawnEmplaced_Blue; +_uniforms = blck_SkinList; +_headgear = blck_headgear; + +_noPara = blck_noParaBlue; +//_chanceHeliPatrol = blck_chanceHeliPatrolBlue; +_spawnCratesTiming = "atMissionEndAir"; +_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured" +//_timeOut = -1; +#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf b/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf index 48f8e9a..dceb8bf 100644 --- a/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf @@ -11,9 +11,9 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Blue Mission with template = medicalCamp"; _crateLoot = blck_BoxLoot_Blue; @@ -54,13 +54,38 @@ _maxNoAI = blck_MaxAI_Blue; _noAIGroups = blck_AIGrps_Blue; _noVehiclePatrols = blck_SpawnVeh_Blue; _noEmplacedWeapons = blck_SpawnEmplaced_Blue; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -_chanceReinforcements = blck_chanceParaBlue; -_noPara = blck_noParaBlue; -_chanceHeliPatrol = blck_chanceHeliPatrolBlue; -_chanceLoot = 0; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults +_headgear = blck_headgear; // Setting this in the mission file overrides the defaults +_vests = blck_vests; +_backpacks = blck_backpacks; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +_sideArms = blck_Pistols; +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisBlue; +_missionHelis = blck_patrolHelisBlue; + +_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults +_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. +_chanceLoot = 0.0; +_paraLoot = blck_BoxLoot_Blue; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf b/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf index f5b96f4..5b4af98 100644 --- a/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf @@ -11,9 +11,9 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Blue Mission with template = redCamp"; _crateLoot = blck_BoxLoot_Blue; @@ -79,13 +79,38 @@ _maxNoAI = blck_MaxAI_Blue; _noAIGroups = blck_AIGrps_Blue; _noVehiclePatrols = blck_SpawnVeh_Blue; _noEmplacedWeapons = blck_SpawnEmplaced_Blue; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -_chanceReinforcements = blck_chanceParaBlue; -_noPara = blck_noParaBlue; -_chanceHeliPatrol = blck_chanceHeliPatrolBlue; -_chanceLoot = 0; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults +_headgear = blck_headgear; // Setting this in the mission file overrides the defaults +_vests = blck_vests; +_backpacks = blck_backpacks; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +_sideArms = blck_Pistols; +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisBlue; +_missionHelis = blck_patrolHelisBlue; + +_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults +_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. +_chanceLoot = 0.0; +_paraLoot = blck_BoxLoot_Blue; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf b/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf index 83c17d7..ed6c24e 100644 --- a/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Blue Mission with template = resupplyCamp"; _crateLoot = blck_BoxLoot_Blue; @@ -45,12 +44,38 @@ _maxNoAI = blck_MaxAI_Blue; _noAIGroups = blck_AIGrps_Blue; _noVehiclePatrols = blck_SpawnVeh_Blue; _noEmplacedWeapons = blck_SpawnEmplaced_Blue; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -_chanceReinforcements = blck_chanceParaBlue; -_noPara = blck_noParaBlue; -_chanceHeliPatrol = blck_chanceHeliPatrolBlue; -_chanceLoot = 0; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults +_headgear = blck_headgear; // Setting this in the mission file overrides the defaults +_vests = blck_vests; +_backpacks = blck_backpacks; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +_sideArms = blck_Pistols; +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisBlue; +_missionHelis = blck_patrolHelisBlue; + +_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults +_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. +_chanceLoot = 0.0; +_paraLoot = blck_BoxLoot_Blue; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults + //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Blue/template.sqf b/@GMS/addons/custom_server/Missions/Blue/template.sqf index 665384d..6b1a1c2 100644 --- a/@GMS/addons/custom_server/Missions/Blue/template.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/template.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Green Mission with template = default"; _crateLoot = blck_BoxLoot_Green; @@ -92,11 +91,44 @@ _maxNoAI = blck_MaxAI_Green; _noAIGroups = blck_AIGrps_Green; _noVehiclePatrols = blck_SpawnVeh_Green; _noEmplacedWeapons = blck_SpawnEmplaced_Green; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -_chanceReinforcements = blck_chanceParaGreen; -_noPara = blck_noParaGreen; -_helipatrol = blck_chanceHeliPatrolGreen; -_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue +_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults +_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults +_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults +_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; // Setting this in the mission file overrides the defaults +_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults +_headgear = blck_headgear; // Setting this in the mission file overrides the defaults +_vests = blck_vests; +_backpacks = blck_backpacks; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +_sideArms = blck_Pistols; +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisBlue; +_missionHelis = blck_patrolHelisBlue; + +_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults +_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. +_chanceLoot = 0.0; +_paraLoot = blck_BoxLoot_Blue; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Green/default.sqf b/@GMS/addons/custom_server/Missions/Green/default.sqf index 0ec05e4..a6b5cf3 100644 --- a/@GMS/addons/custom_server/Missions/Green/default.sqf +++ b/@GMS/addons/custom_server/Missions/Green/default.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Green Mission with template = default"; _crateLoot = blck_BoxLoot_Green; @@ -38,9 +37,12 @@ _noVehiclePatrols = blck_SpawnVeh_Green; _noEmplacedWeapons = blck_SpawnEmplaced_Green; _uniforms = blck_SkinList; _headgear = blck_headgear; -//_chanceReinforcements = blck_chanceParaGreen; -//_noPara = blck_noParaGreen; -//_helipatrol = blck_chanceHeliPatrolGreen; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_chanceLoot = 0.6; +private _lootIndex = selectRandom[1,2,3,4]; +private _paralootChoices = [blck_contructionLoot,blck_contructionLoot,blck_highPoweredLoot,blck_supportLoot]; +private _paralootCountsChoices = [[0,0,0,8,8,0],[0,0,0,8,8,0],[8,8,0,0,0,0],[0,0,0,0,12,0]]; +_paraLoot = _paralootChoices select _lootIndex; +_paraLootCounts = _paralootCountsChoices select _lootIndex; // Throw in something more exotic than found at a normal blue mission. +//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf b/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf index 60744c3..d66a53b 100644 --- a/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Green Mission with template = medicalCamp"; @@ -57,20 +56,13 @@ _noVehiclePatrols = blck_SpawnVeh_Green; _noEmplacedWeapons = blck_SpawnEmplaced_Green; _uniforms = blck_SkinList; _headgear = blck_headgear; -//_chanceReinforcements = blck_chanceParaGreen; -//_noPara = blck_noParaGreen; -//_helipatrol = blck_chanceHeliPatrolGreen; -//_chanceLoot = 0.33; //blck_reinforcementsBlue select 3; - -private["_weap","_mags","_backpacks","_optics","_loadout"]; -_weap = 3 + floor(random(4)); -_mags = 8 + floor(random(6)); -_backpacks = 1 + floor(random(2)); -_optics = 3 + floor(random(6)); - -_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks]; - -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_chanceLoot = 1; //0.6; +private _lootIndex = selectRandom[1,2,3,4]; +private _paralootChoices = [blck_contructionLoot,blck_contructionLoot,blck_highPoweredLoot,blck_supportLoot]; +private _paralootCountsChoices = [[0,0,0,8,8,0],[0,0,0,8,8,0],[8,8,0,0,0,0],[0,0,0,0,12,0]]; +_paraLoot = _paralootChoices select _lootIndex; +_paraLootCounts = _paralootCountsChoices select _lootIndex; // Throw in something more exotic than found at a normal blue mission. +//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Green/redCamp.sqf b/@GMS/addons/custom_server/Missions/Green/redCamp.sqf index 15de286..c85a57d 100644 --- a/@GMS/addons/custom_server/Missions/Green/redCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Green/redCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Green Mission with template = redCamp"; _crateLoot = blck_BoxLoot_Green; @@ -81,10 +80,13 @@ _noVehiclePatrols = blck_SpawnVeh_Green; _noEmplacedWeapons = blck_SpawnEmplaced_Green; _uniforms = blck_SkinList; _headgear = blck_headgear; -//_chanceReinforcements = blck_chanceParaGreen; -//_noPara = blck_noParaGreen; -//_helipatrol = blck_chanceHeliPatrolGreen; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_chanceLoot = 1; //0.6; +private _lootIndex = selectRandom[1,2,3,4]; +private _paralootChoices = [blck_contructionLoot,blck_contructionLoot,blck_highPoweredLoot,blck_supportLoot]; +private _paralootCountsChoices = [[0,0,0,8,8,0],[0,0,0,8,8,0],[8,8,0,0,0,0],[0,0,0,0,12,0]]; +_paraLoot = _paralootChoices select _lootIndex; +_paraLootCounts = _paralootCountsChoices select _lootIndex; // Throw in something more exotic than found at a normal blue mission. +//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf b/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf index 0d60ff9..aa282b3 100644 --- a/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Green Mission with template = resupplyCamp"; _crateLoot = blck_BoxLoot_Green; @@ -47,9 +46,12 @@ _noVehiclePatrols = blck_SpawnVeh_Green; _noEmplacedWeapons = blck_SpawnEmplaced_Green; _uniforms = blck_SkinList; _headgear = blck_headgear; -//_chanceReinforcements = blck_chanceParaGreen; -//_noPara = blck_noParaGreen; -//_helipatrol = blck_chanceHeliPatrolGreen; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_chanceLoot = 1; //0.6; +private _lootIndex = selectRandom[1,2,3,4]; +private _paralootChoices = [blck_contructionLoot,blck_contructionLoot,blck_highPoweredLoot,blck_supportLoot]; +private _paralootCountsChoices = [[0,0,0,8,8,0],[0,0,0,8,8,0],[8,8,0,0,0,0],[0,0,0,0,12,0]]; +_paraLoot = _paralootChoices select _lootIndex; +_paraLootCounts = _paralootCountsChoices select _lootIndex; // Throw in something more exotic than found at a normal blue mission. +//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Green/template.sqf b/@GMS/addons/custom_server/Missions/Green/template.sqf index 24b7069..d32e721 100644 --- a/@GMS/addons/custom_server/Missions/Green/template.sqf +++ b/@GMS/addons/custom_server/Missions/Green/template.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Green Mission with template = default"; _crateLoot = blck_BoxLoot_Green; @@ -94,9 +93,7 @@ _noVehiclePatrols = blck_SpawnVeh_Green; _noEmplacedWeapons = blck_SpawnEmplaced_Green; _uniforms = blck_SkinList; _headgear = blck_headgear; -_chanceReinforcements = blck_chanceParaGreen; -_noPara = blck_noParaGreen; -_helipatrol = blck_chanceHeliPatrolGreen; -_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + +//_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Orange/default.sqf b/@GMS/addons/custom_server/Missions/Orange/default.sqf index 910e73b..ad418e5 100644 --- a/@GMS/addons/custom_server/Missions/Orange/default.sqf +++ b/@GMS/addons/custom_server/Missions/Orange/default.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Orange Mission with template = default"; //diag_log "[blckeagls] Spawning Orange Mission with template = default"; _crateLoot = blck_BoxLoot_Orange; @@ -38,9 +37,16 @@ _noVehiclePatrols = blck_SpawnVeh_Orange; _noEmplacedWeapons = blck_SpawnEmplaced_Orange; _uniforms = blck_SkinList; _headgear = blck_headgear; -//_chanceReinforcements = blck_reinforcementsOrange select 0; -//_noPara = blck_reinforcementsOrange select 1; -//_helipatrol = blck_reinforcementsOrange select 2; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + +_chancePara = 0.5; // Setting this in the mission file overrides the defaults +_noPara = 5; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "orange"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. + +_chanceLoot = 0.5; +_paraLoot = blck_BoxLoot_Orange; +_paraLootCounts = blck_lootCountsOrange; // Throw in something more exotic than found at a normal blue mission. + +//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf b/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf index cf889da..08589b3 100644 --- a/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; ////diag_log "[blckeagls] Spawning Orange Mission with template = medicalCamp"; _crateLoot = blck_BoxLoot_Orange; @@ -57,10 +56,20 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Orange; _useMines = blck_useMines; _uniforms = blck_SkinList; _headgear = blck_headgear; -//_chanceReinforcements = blck_reinforcementsOrange select 0; -//_noPara = blck_reinforcementsOrange select 1; -//_helipatrol = blck_reinforcementsOrange select 2; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + +_chancePara = 0.75; // Setting this in the mission file overrides the defaults +_noPara = 5; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "orange"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. + +_chanceLoot = 0.7; +private _lootIndex = selectRandom[1,2,3,4]; +private _paralootChoices = [blck_contructionLoot,blck_contructionLoot,blck_highPoweredLoot,blck_supportLoot]; +private _paralootCountsChoices = [[0,0,0,10,10,0],[0,0,0,10,10,0],[10,10,0,0,0,0],[0,0,0,0,15,0]]; +_paraLoot = _paralootChoices select _lootIndex; +_paraLootCounts = _paralootCountsChoices select _lootIndex; // Throw in something more exotic than found at a normal blue mission. + +//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" ////_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf b/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf index bf1ad32..a45cdee 100644 --- a/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; ////diag_log "[blckeagls] Spawning Orange Mission with template = redCamp"; _crateLoot = blck_BoxLoot_Orange; @@ -81,10 +80,20 @@ _noVehiclePatrols = blck_SpawnVeh_Orange; _noEmplacedWeapons = blck_SpawnEmplaced_Orange; _uniforms = blck_SkinList; _headgear = blck_headgear; -//_chanceReinforcements = blck_reinforcementsOrange select 0; -//_noPara = blck_reinforcementsOrange select 1; -//_helipatrol = blck_reinforcementsOrange select 2;; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + +_chancePara = 0.75; // Setting this in the mission file overrides the defaults +_noPara = 5; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "orange"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. + +_chanceLoot = 1; //0.7; +private _lootIndex = selectRandom[1,2,3,4]; +private _paralootChoices = [blck_contructionLoot,blck_contructionLoot,blck_highPoweredLoot,blck_supportLoot]; +private _paralootCountsChoices = [[0,0,0,10,10,0],[0,0,0,10,10,0],[10,10,0,0,0,0],[0,0,0,0,15,0]]; +_paraLoot = _paralootChoices select _lootIndex; +_paraLootCounts = _paralootCountsChoices select _lootIndex; // Throw in something more exotic than found at a normal blue mission. + +//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" ////_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf b/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf index 4af73bb..5158a3b 100644 --- a/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Orange Mission with template = resupplyCamp"; @@ -49,17 +48,17 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Orange; _uniforms = blck_SkinList; _headgear = blck_headgear; -_chanceReinforcements = 0; -_noPara = 5; -_chanceHeliPatrol = 0; -_chanceLoot = 0.33; +_chancePara = 0.75; // Setting this in the mission file overrides the defaults +_noPara = 5; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "orange"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. -private["_weap","_mags","_backpacks","_optics","_loadout"]; -_weap = 4 + floor(random(4)); -_mags = 12 + floor(random(6)); -_backpacks = 1 + floor(random(2)); -_optics = 5 + floor(random(6)); -//_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks]; +_chanceLoot = 0.7; +private _lootIndex = selectRandom[1,2,3,4]; +private _paralootChoices = [blck_contructionLoot,blck_contructionLoot,blck_highPoweredLoot,blck_supportLoot]; +private _paralootCountsChoices = [[0,0,0,10,10,0],[0,0,0,10,10,0],[10,10,0,0,0,0],[0,0,0,0,15,0]]; +_paraLoot = _paralootChoices select _lootIndex; +_paraLootCounts = _paralootCountsChoices select _lootIndex; // Throw in something more exotic than found at a normal blue mission. _endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; diff --git a/@GMS/addons/custom_server/Missions/Red/captive1.sqf b/@GMS/addons/custom_server/Missions/Red/captive1.sqf new file mode 100644 index 0000000..8602164 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Red/captive1.sqf @@ -0,0 +1,131 @@ +/* + Mission Template 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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Blue Mission with template = default2"; + +_crateLoot = blck_BoxLoot_Red; +_lootCounts = blck_lootCountsRed; +_startMsg = "A local Enemy Leader's Camp has been spotted! Capture him and earn a reward!"; +_endMsg = "The Leader was captured ! A reward has been sent by survivors"; +_assetKilledMsg = "The Leader Was Killed and Bandits Fled with All Loot: Mission Aborted"; +_markerLabel = ""; +_markerType = ["ELIPSE",[175,175],"GRID"]; +_markerColor = "ColorRed"; +_markerMissionName = "Capture Leader"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[-1.44531,-21.2148,0],0,[true,false]], + ["Land_u_Barracks_V2_F",[-3.79102,2.56055,0],0,[true,false]], + ["Land_BagBunker_Small_F",[33.8457,18.2461,0],51.9209,[true,false]], + ["Land_BagBunker_Small_F",[-30.4336,22.9043,0],321.242,[true,false]], + ["Land_BagBunker_Small_F",[-35.3164,-29.9648,0],237.265,[true,false]], + ["Land_BagBunker_Small_F",[37.4551,-29.8672,0],128.253,[true,false]], + ["Land_BagBunker_Large_F",[-30.4082,-6.65039,0],180,[true,false]], + ["Land_BagBunker_Large_F",[-2.81836,19.4668,0],0,[true,false]], + ["Land_BagBunker_Large_F",[-2.14063,-18.4355,0],0,[true,false]], + ["Land_BagBunker_Large_F",[26.1328,-10.252,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-19.707,30.0078,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-11.0742,30.209,0],0,[true,false]], + ["Land_HBarrier_Big_F",[18.541,31.125,0],0,[true,false]], + ["Land_HBarrier_Big_F",[0.0703125,30.6699,0],0,[true,false]], + ["Land_HBarrier_Big_F",[8.79102,31.0273,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-19.0938,-36.0176,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-10.4609,-35.8164,0],0,[true,false]], + ["Land_HBarrier_Big_F",[19.1543,-34.9004,0],0,[true,false]], + ["Land_HBarrier_Big_F",[0.683594,-35.3555,0],0,[true,false]], + ["Land_HBarrier_Big_F",[9.4043,-34.998,0],0,[true,false]], + ["Land_HBarrier_Big_F",[-47.6211,19.666,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[-47.6777,11.0313,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[-47.6465,-18.5977,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[-47.5508,-0.123047,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[-47.4531,-8.84961,0],91.713,[true,false]], + ["Land_HBarrier_Big_F",[47.5098,-22.1211,0],270.496,[true,false]], + ["Land_HBarrier_Big_F",[47.3848,-13.4863,0],270.496,[true,false]], + ["Land_HBarrier_Big_F",[46.7246,16.1348,0],270.496,[true,false]], + ["Land_HBarrier_Big_F",[47.0195,-2.33789,0],270.496,[true,false]], + ["Land_HBarrier_Big_F",[46.7363,6.38477,0],270.496,[true,false]], + ["Land_ChairPlastic_F",[-6.06445,10.7129,0],185.284,[true,false]], + ["Land_CampingChair_V2_F",[0.222656,8.24219,0],0,[true,false]], + ["Campfire_burning_F",[0.591797,9.47266,0],0,[true,false]], + ["Land_HBarrier_3_F",[-10.3887,10.209,0],88.6077,[true,false]], + ["Land_HBarrier_3_F",[8.12109,10.4063,0],88.6077,[true,false]], + ["Land_HBarrier_3_F",[8.17383,13.5781,0],88.6077,[true,false]], + ["Land_HBarrier_3_F",[8.11914,16.957,0.0400085],88.6077,[true,false]] + ]; // list of objects to spawn as landscape; // list of objects to spawn as landscape + +_enemyLeaderConfig = + ["I_G_resistanceLeader_F",[-7.83789,13.1465,-0.00143886],126.345,[true,false], + ["Acts_B_briefings"], // Use the animation viewer to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/ + ["H_Beret_Colonel"], // array of headgear choices + ["U_OrestesBody"] // array of uniform choices + ]; +_enemyLeaderConfig set[ + 1, selectRandom [[-7.83789,13.1465,-0.00143886]] + ]; + // This allows us to place the antagonist to be arrested in one of several random locations. +_missionLootBoxes = [ + //["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout + //["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks + //["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]] + ]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. + + // blck_lootCountsBlue= [4,12,3,6,6,1]; +_missionLootVehicles = [ + //["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]], + //["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]] + ]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array. + // ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; + + /* + ["B_G_Soldier_AR_F",[-19.5156,25.2598,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[-27.7676,-24.5508,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[32.4883,-23.4609,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[36.6914,12.1836,-0.00143886],0,[true,false]] + */ +_missionGroups = + [ + //_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; + [[-19.5156,25.2598,-0.00143886],3,3,"Red",10,20], + [[-27.7676,-24.5508,-0.00143886],3,3,"Red",10,20], + [[32.4883,-23.4609,-0.00143886],3,3,"Red",10,20], + [[36.6914,12.1836,-0.00143886],3,3,"Red",10,20] + ]; // Can be used to define spawn positions of AI patrols + +_missionEmplacedWeapons = [ + //["B_HMG_01_high_F",[-10,-15,0]], + //["B_GMG_01_high_F",[10,12,0]], + //["O_static_AT_F",[-10,10,0]] + ]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used + +_missionPatrolVehicles = [ + //["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]], + //["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]], + //["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]] +]; +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Red; +_maxNoAI = blck_MaxAI_Red; +_noAIGroups = blck_AIGrps_Red; +_noVehiclePatrols = blck_SpawnVeh_Red; +_noEmplacedWeapons = blck_SpawnEmplaced_Red; +_uniforms = blck_SkinList; +_headgear = blck_headgear; +_chanceReinforcements = blck_chanceParaRed; +_noPara = blck_noParaRed; +_chanceHeliPatrol = blck_chanceHeliPatrolRed; +_spawnCratesTiming = "atMissionEndAir"; +_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured" +//_timeOut = -1; +#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Red/default.sqf b/@GMS/addons/custom_server/Missions/Red/default.sqf index d94059a..8bfba20 100644 --- a/@GMS/addons/custom_server/Missions/Red/default.sqf +++ b/@GMS/addons/custom_server/Missions/Red/default.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Red Mission with template = default"; _crateLoot = blck_BoxLoot_Red; @@ -37,11 +36,40 @@ _noVehiclePatrols = blck_SpawnVeh_Red; _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Change _useMines to true/false below to enable mission-specific settings. _useMines = blck_useMines; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -//_chanceReinforcements = blck_reinforcementsRed select 0; -//_noPara = blck_reinforcementsRed select 1; -//_helipatrol = blck_reinforcementsRed select 2; -_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults +_headgear = blck_headgear; // Setting this in the mission file overrides the defaults +_vests = blck_vests; +_backpacks = blck_backpacks; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +_sideArms = blck_Pistols; +_chanceHeliPatrol = blck_chanceHeliPatrolRed; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisRed; +_missionHelis = blck_patrolHelisRed; + +//_chancePara = 0.0; // Setting this in the mission file overrides the defaults +_noPara = 3; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. + +//_chanceLoot = 0.999999990; +_paraLoot = blck_BoxLoot_Red; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults + +//_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Red/hostage1.sqf b/@GMS/addons/custom_server/Missions/Red/hostage1.sqf new file mode 100644 index 0000000..1c6b209 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Red/hostage1.sqf @@ -0,0 +1,127 @@ +/* + Mission Template 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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Blue Mission with template = default2"; + +_crateLoot = blck_BoxLoot_Red; +_lootCounts = blck_lootCountsRed; +_startMsg = "A local town official is being held hostage! Free him and earn a reward!"; +_endMsg = "The official was freed! A reward has been sent by the local townsfolk"; +_assetKilledMsg = "The Hostage Was Killed and Bandits Fled with All Loot: Mission Aborted"; +_markerLabel = ""; +_markerType = ["ELIPSE",[175,175],"GRID"]; +_markerColor = "ColorRed"; +_markerMissionName = "Rescue Hostage"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[-10.6914,-10.541,0],0,[true,false]], + ["Land_SM_01_shelter_wide_F",[-6.29883,9.57617,0],0,[true,false]], + ["Land_ContainerLine_01_F",[-5.54492,40.8184,0],0,[true,false]], + ["Land_ContainerLine_01_F",[-6.92578,-38.2188,0],0,[true,false]], + ["Land_ContainerLine_01_F",[-65.8438,-28.4023,0],90,[true,false]], + ["Land_ContainerLine_01_F",[-66.0664,21.3496,0],90,[true,false]], + ["Land_ContainerLine_01_F",[195.047,-23.9395,0],87.9345,[true,false]], + ["Land_ContainerLine_01_F",[42.6172,-23.9395,0],90.5197,[true,false]], + ["Land_ContainerLine_01_F",[42.8398,27.5977,0],270,[true,false]], + //["B_G_Soldier_AR_F",[-6.74219,-78.625,-0.00143886],0,[true,false]], + //["B_G_Soldier_AR_F",[-86.3281,-5.14453,-0.00143886],0,[true,false]], + //["B_G_Soldier_AR_F",[61.4609,-1.92773,-0.00143838],0,[true,false]], + //["B_G_Soldier_AR_F",[-43.3359,54.0898,-0.00143838],0,[true,false]], + //["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]], + //["B_Soldier_F",[70.5156,-90.3867,-2.75806],0,[true,false]], + //["B_MRAP_01_hmg_F",[70.5156,-90.3867,4.76837e-007],0,[true,false]], + //["B_Soldier_F",[-78.834,72.0566,-2.20595],0,[true,false]], + //["B_MRAP_01_F",[-78.834,72.0566,4.76837e-007],0,[true,false]], + ["Campfire_burning_F",[-8.68555,-2.57813,0],0,[true,false]], + ["Land_ChairPlastic_F",[-2.36719,16.1875,0],0,[true,false]], + ["Land_ChairPlastic_F",[-2.99609,13.2813,0],0,[true,false]], + ["Land_ChairPlastic_F",[-2.84766,10.3398,0],0,[true,false]], + ["Land_ChairPlastic_F",[-3.06055,8.08203,0],0,[true,false]], + ["Land_ChairPlastic_F",[-2.70313,5.98047,0],0,[true,false]], + ["Land_Stone_4m_F",[-5.71484,21.2051,0],0,[true,false]], + ["Land_Stone_4m_F",[-1.30469,21.2266,0],0,[true,false]], + ["Land_Stone_4m_F",[-10.1836,21.166,0],0,[true,false]], + ["Land_Stone_4m_F",[3.01953,10.2051,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[2.97656,5.79492,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[3.04492,14.6738,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[-6.16992,-0.855469,0],0,[true,false]], + ["Land_Stone_4m_F",[-1.75977,-0.833984,0],0,[true,false]], + ["Land_Stone_4m_F",[-10.6387,-0.894531,0],0,[true,false]], + ["Land_Stone_4m_F",[-15.4609,9.93164,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[-15.5039,5.52148,0],90.8324,[true,false]], + ["Land_Stone_4m_F",[-15.4355,14.4004,0],90.8324,[true,false]] + ]; // list of objects to spawn as landscape; // list of objects to spawn as landscape + +_hostageConfig = ["C_man_polo_6_F", + [-7.08594,9.5957,-0.299652], + 126.345,[true,false], + ["AmovPercMstpSnonWnonDnon_Scared"], + ["H_Cap_red"], // array of headgear choices + ["U_NikosBody"] // array of uniform choices + ]; // Sitting Animation + // Use the animation view to see other choices: http://killzonekid.com/arma-3-animation-viewer-jumping-animation/ +_missionLootBoxes = [ + //["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout + //["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks + //["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]] + ]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. + + // blck_lootCountsBlue= [4,12,3,6,6,1]; +_missionLootVehicles = [ + //["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]], + //["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]] + ]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array. + // ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/]; + + /* + ["B_G_Soldier_AR_F",[26.9961,-29.9551,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[32.2461,33.0605,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[-35.6035,32.1855,-0.00143886],0,[true,false]], + ["B_G_Soldier_AR_F",[-47.4219,-19.8906,-0.00143886],0,[true,false]] + */ +_missionGroups = + [ + //_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; + [[26.9961,-29.9551,-0.00143886],3,3,"Red",10,20], + [[32.2461,33.0605,-0.00143886],3,3,"Red",10,20], + [[-35.6035,32.1855,-0.00143886],3,3,"Red",10,20], + [[-47.4219,-19.8906,-0.00143886],3,3,"Red",10,20] + ]; // Can be used to define spawn positions of AI patrols + +_missionEmplacedWeapons = [ + //["B_HMG_01_high_F",[-10,-15,0]], + //["B_GMG_01_high_F",[10,12,0]], + //["O_static_AT_F",[-10,10,0]] + ]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used + + _missionPatrolVehicles = [ + //["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]], + //["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]], + //["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]] +]; +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Red; +_maxNoAI = blck_MaxAI_Red; +_noAIGroups = blck_AIGrps_Red; +_noVehiclePatrols = blck_SpawnVeh_Red; +_noEmplacedWeapons = blck_SpawnEmplaced_Red; +_uniforms = blck_SkinList; +_headgear = blck_headgear; +_noPara = blck_noParaRed; +_chanceHeliPatrol = blck_chanceHeliPatrolRed; +_spawnCratesTiming = "atMissionEndAir"; +_endCondition = "assetSecured"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear", "assetSecured" +//_timeOut = -1; +#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf b/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf index 1a35928..63c8530 100644 --- a/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Red Mission with template = medicalCamp"; _crateLoot = blck_BoxLoot_Red; @@ -26,7 +25,11 @@ _markerColor = "ColorRed"; _markerMissionName = "Medical Camp"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ +<<<<<<< HEAD ["Flag_AAF_F",[3,3,0],0,[false,false]], +======= + ["Flag_AAF_F",[0,0,0],0,[false,false]], +>>>>>>> Experimental ["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,[true,true]], ["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,[true,true]], ["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,[true,true]], @@ -54,11 +57,40 @@ _noVehiclePatrols = blck_SpawnVeh_Red; _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Change _useMines to true/false below to enable mission-specific settings. _useMines = blck_useMines; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -//_chanceReinforcements = blck_reinforcementsRed select 0; -//_noPara = blck_reinforcementsRed select 1; -//_helipatrol = blck_reinforcementsRed select 2; +_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults +_headgear = blck_headgear; // Setting this in the mission file overrides the defaults +_vests = blck_vests; +_backpacks = blck_backpacks; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +_sideArms = blck_Pistols; +_chanceHeliPatrol = blck_chanceHeliPatrolRed; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisRed; +_missionHelis = blck_patrolHelisRed; + +//_chancePara = 0.0; // Setting this in the mission file overrides the defaults +_noPara = 3; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. + +//_chanceLoot = 0.999999990; +_paraLoot = blck_BoxLoot_Red; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults + _endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Red/redCamp.sqf b/@GMS/addons/custom_server/Missions/Red/redCamp.sqf index e34c6c1..e2fc6ce 100644 --- a/@GMS/addons/custom_server/Missions/Red/redCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Red/redCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Red Mission with template = redCamp"; @@ -27,6 +26,10 @@ _markerColor = "ColorRed"; _markerMissionName = "Bandit Camp"; _missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" _missionLandscape = [ +<<<<<<< HEAD +======= + ["Flag_AAF_F",[0,0,0],0,[false,false]], +>>>>>>> Experimental ["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,false]], ["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,false]], ["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,false]], @@ -80,21 +83,34 @@ _noVehiclePatrols = blck_SpawnVeh_Red; _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Change _useMines to true/false below to enable mission-specific settings. _useMines = blck_useMines; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -//_chanceReinforcements = 0.10; //blck_reinforcementsBlue select 0; -//_noPara = 2; //blck_reinforcementsBlue select 1; -//_chanceHeliPatrol = 0;//blck_reinforcementsBlue select 2; -//_chanceLoot = 0.10; //blck_reinforcementsBlue select 3; +_chanceHeliPatrol = blck_chanceHeliPatrolRed; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisRed; +_missionHelis = blck_patrolHelisRed; -private["_weap","_mags","_backpacks","_optics","_loadout"]; -_weap = 3 + floor(random(4)); -_mags = 8 + floor(random(6)); -_backpacks = 1 + floor(random(2)); -_optics = 1 + floor(random(6)); -_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks]; +//_chancePara = 0.0; // Setting this in the mission file overrides the defaults +_noPara = 3; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. +//_chanceLoot = 0.999999990; +_paraLoot = blck_BoxLoot_Red; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults _endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Red/resupplyCamp.sqf b/@GMS/addons/custom_server/Missions/Red/resupplyCamp.sqf index 39de854..47c6571 100644 --- a/@GMS/addons/custom_server/Missions/Red/resupplyCamp.sqf +++ b/@GMS/addons/custom_server/Missions/Red/resupplyCamp.sqf @@ -11,9 +11,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; //diag_log "[blckeagls] Spawning Red Mission with template = resupplyCamp"; _crateLoot = blck_BoxLoot_Red; @@ -45,11 +44,40 @@ _noVehiclePatrols = blck_SpawnVeh_Red; _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Change _useMines to true/false below to enable mission-specific settings. _useMines = blck_useMines; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -//_chanceReinforcements = blck_reinforcementsRed select 0; -//_noPara = blck_reinforcementsRed select 1; -//_helipatrol = blck_reinforcementsRed select 2; +_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults +_headgear = blck_headgear; // Setting this in the mission file overrides the defaults +_vests = blck_vests; +_backpacks = blck_backpacks; +_weaponList = ["blue"] call blck_fnc_selectAILoadout; +_sideArms = blck_Pistols; +_chanceHeliPatrol = blck_chanceHeliPatrolRed; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisRed; +_missionHelis = blck_patrolHelisRed; + +//_chancePara = 0.0; // Setting this in the mission file overrides the defaults +_noPara = 3; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. + +//_chanceLoot = 0.999999990; +_paraLoot = blck_BoxLoot_Red; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + +_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + // Setting this in the mission file overrides the defaults + _endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" //_timeOut = -1; #include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf index 76daef9..2aed2f4 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf index 169a50d..b65137f 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- @@ -13,5 +12,5 @@ params["_emplacedWeapon"]; blck_sm_Emplaced pushBack [_emplacedWeapon,grpNull,0]; -diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced]; +//diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced]; true \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf index de6979b..3112aaa 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf index 214cf81..cb53c50 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_checkForPlayerNearMission.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_checkForPlayerNearMission.sqf deleted file mode 100644 index c5318f9..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_checkForPlayerNearMission.sqf +++ /dev/null @@ -1,19 +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 ["_missionCenter"]; - _missionCenter = _x select 0; - if ([_missionCenter,2000] call blck_fnc_playerInRange then ([_missionCenter] execVM format["%1", _x select 1]; -} forEach blck_staticMissions; - - diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf index ca78cdb..c17a717 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- @@ -10,7 +9,7 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -diag_log "[blckeagls] GMS_fnc_init_functions.sqf "; +diag_log "[blckeagls] GMS_fnc_sm_init_functions.sqf "; blck_sm_Groups = []; blck_sm_Vehicles = []; blck_sm_Aircraft = []; @@ -26,13 +25,13 @@ blck_fnc_sm_AddVehicle = compileFinal preprocessFileLineNumbers "\q\addons\cust 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"; -//blck_fnc_sm_monitorStaticUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.sqf"; +blck_fnc_sm_monitorStaticUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticUnits.sqf"; blck_fnc_sm_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrol.sqf"; blck_fnc_sm_spawnAirPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrol.sqf"; blck_fnc_sm_spawnEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf"; //blck_fnc_sm_spawnInfantryPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf"; blck_fnc_sm_monitorStaticMissionUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticUnits.sqf"; -//blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\StaticMissions_checkForPlayerNearMission.sqf"; +blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_checkForPlayerNearMission.sqf"; blck_fnc_sm_spawnAirPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrols.sqf"; blck_fnc_sm_spawnEmplaceds = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf"; blck_fnc_sm_spawnInfantryPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnInfantryPatrols.sqf"; @@ -40,6 +39,6 @@ blck_fnc_sm_spawnLootContainers = compileFinal preprocessFileLineNumbers "\q\ad blck_fnc_sm_spawnObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjects.sqf"; blck_fnc_sm_spawnVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrols.sqf"; -diag_log "[blckeagls] GMS_sm_init_functions.sqf "; +diag_log "[blckeagls] GMS_sm_init_functions.sqf "; -blck_sm_functionsLoaded = true; \ No newline at end of file +blck_sm_functionsLoaded = true; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf index b1fbd8a..fb4c3ac 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- @@ -51,6 +50,6 @@ _blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow uiSleep 30; // spawn loot chests [_missionLootBoxes,_missionCenter] call blck_fnc_sm_spawnLootContainers; - +[_missionLootVehicles,_missionCenter] call blck_fnc_sm_spawnLootContainers; diag_log format["[blckeagls] Static Mission Spawner: Mission %1 spawned",_mission]; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf index 098923b..b96f16d 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf @@ -38,8 +38,8 @@ _sm_groups = +blck_sm_Groups; //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", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ]; - _group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius-2,_patrolRadius,blck_SkinList,blck_headgear,true] call blck_fnc_spawnGroup; + // // 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]; @@ -62,7 +62,7 @@ _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_monitorStaticUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex]; + //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 { @@ -92,16 +92,16 @@ _sm_scubaGroups = +blck_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_monitorStaticUnits::-> _x = %1",_x]; + //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. { - //params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; //diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; - _group = [[_groupParameters],1,_difficulty,_pos,blck_SkinList,blck_headgear,true] call blck_fnc_spawnEmplacedWeaponArray; + // 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]; }; @@ -121,15 +121,15 @@ _sm_Emplaced = +blck_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","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true],["weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]]; - //diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; - _return = [_pos,1,_difficulty,blck_SkinList,blck_headgear,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + //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; @@ -156,9 +156,8 @@ _sm_surfaceVehicles = +blck_sm_surfaceShips; { if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one. { - // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true]]; //diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; - _return = [_pos,1,_difficulty,blck_SkinList,blck_headgear,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + [_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; @@ -185,9 +184,9 @@ _sm_SDVVehicles = +blck_sm_submarines; { if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one. { - // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true]]; //diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; - _return = [_pos,1,_difficulty,blck_SkinList,blck_headgear,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + //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; @@ -215,16 +214,17 @@ _sm_Aircraft = +blck_sm_Aircraft; 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","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]]; + //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,_weapon,blck_SkinList,blck_headgear,[_aircraftType],0] call blck_fnc_spawnMissionHeli; + _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 ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead + 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]; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf index 30cca9a..eeed003 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf @@ -37,8 +37,8 @@ if (_missionEmplacedWeapons isEqualTo []) then _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; + /// 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; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnInfantryPatrols.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnInfantryPatrols.sqf index a2aa71c..e99242a 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnInfantryPatrols.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnInfantryPatrols.sqf @@ -18,6 +18,7 @@ params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel", if (_patrols isEqualTo []) then { // 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] call blck_fnc_spawnMissionAI } else { { @@ -30,7 +31,7 @@ if (_patrols isEqualTo []) then _noAI = _x select 2; // Number of AI to spawn with the group _patrolRadius = _x select 3; // Radius within which AI should patrol // params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ]; - [_pos,_noAI,_noAI,_difficulty,_pos,_patrolRadius,_patrolRadius,_uniforms,_headGear,true] call blck_fnc_spawnGroup; + [_pos,_pos,_noAI,_noAI,_difficulty,_patrolRadius,_patrolRadius,true,_uniforms,_headGear] call blck_fnc_spawnGroup; }forEach _patrols; }; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf index 3f6c40b..e736aab 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf index 4bdf849..51dde96 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/13/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf index 5c52f0f..59b3163 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf @@ -15,7 +15,7 @@ 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"]; @@ -33,7 +33,8 @@ if (_vehiclePatrolSpawns isEqualTo []) then _spawnPos = _x select 1; _difficulty = _x select 2; _patrolRadius = _x select 3; - _vehGroup = [_spawnPos,3,3,_difficulty,_spawnPos,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; + //_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; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_checkForPlayerNearMission.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_checkForPlayerNearMission.sqf deleted file mode 100644 index b24b4ef..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_checkForPlayerNearMission.sqf +++ /dev/null @@ -1,23 +0,0 @@ -/* - Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons. - Add addons to the arrays for Epoch or Exile as appropriate. - Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"] - by Ghostrider-DbD- - for DBD Clan - 11/12/16 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ - -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; -{ - private ["_missionCenter"]; - _missionCenter = _x select 0; - if ([_missionCenter,2000] call blck_fnc_playerInRange then ([_missionCenter] execVM format["%1", _x select 1]; -} forEach blck_staticMissions; - - diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_init_functions.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_init_functions.sqf index b28e7c5..81d9fe0 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_init_functions.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_init_functions.sqf @@ -1,10 +1,7 @@ /* - Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons. - Add addons to the arrays for Epoch or Exile as appropriate. - Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"] - by Ghostrider-DbD- - for DBD Clan - 11/12/16 + by Ghostridere-GRG- + Copyright 2016 + -------------------------- License -------------------------- @@ -24,19 +21,21 @@ blck_fnc_sm_AddGroup = compileFinal preprocessFileLineNumbers "\q\addons\custo blck_fnc_sm_AddVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddVehicle.sqf"; blck_fnc_sm_AddAircraft = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddAircraft.sqf"; blck_fnc_sm_AddEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddEmplaced.sqf"; -blck_fnc_sm_monitorStaticUnit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.sqf"; -blck_fnc_sm_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrol.sqf"; -blck_fnc_sm_spawnAirPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnAirPatrol.sqf"; -blck_fnc_sm_spawnEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnEmplaced.sqf"; -blck_fnc_sm_spawnInfantryPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf"; blck_fnc_sm_monitorStaticMissionUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.sqf"; -//blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\StaticMissions_checkForPlayerNearMission.sqf"; -blck_fnc_sm_spawnAirPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnAirPatrols.sqf"; -blck_fnc_sm_spawnEmplaceds = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnEmplaced.sqf"; -blck_fnc_sm_spawnInfantryPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrols.sqf"; blck_fnc_sm_spawnLootContainers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnLootContainers.sqf"; blck_fnc_sm_spawnObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnObjects.sqf"; -blck_fnc_sm_spawnVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrols.sqf"; + +//blck_fnc_sm_monitorStaticUnit = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_monitorStaticUnits.sqf"; +//blck_fnc_sm_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrol.sqf"; +//blck_fnc_sm_spawnAirPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnAirPatrol.sqf"; +//blck_fnc_sm_spawnEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnEmplaced.sqf"; +//blck_fnc_sm_spawnInfantryPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf"; +//blck_fnc_sm_checkForPlayerNearMission = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\StaticMissions_checkForPlayerNearMission.sqf"; +//blck_fnc_sm_spawnAirPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnAirPatrols.sqf"; +//blck_fnc_sm_spawnEmplaceds = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnEmplaced.sqf"; +//blck_fnc_sm_spawnInfantryPatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrols.sqf"; + +//blck_fnc_sm_spawnVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnVehiclePatrols.sqf"; diag_log "[blckeagls] GMS_sm_init_functions.sqf "; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_monitorStaticUnits.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_monitorStaticUnits.sqf deleted file mode 100644 index e448de4..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_monitorStaticUnits.sqf +++ /dev/null @@ -1,119 +0,0 @@ -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private["_group","_groupParameters","_numAI","_return"]; -private _triggerRange = 2000; -_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"]; - diag_log format["<_sm_monitorStaticUnits:: _group = %1 | _x = %2",_group,_x]; - 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", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ]; - _group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius-2,_patrolRadius,blck_SkinList,blck_headgear,true] call blck_fnc_spawnGroup; - diag_log format["[blckeagls static group spawner] _group - 1",_group]; - _x set[1,_group]; - _x set[2,-1]; - }; - }; - if ( (isNull _group) && (_spawnAt == -1) && (_respawnTime > 0)) then // a group was spawned and all units are dead - { - _x set [2, (diag_tickTime + _respawnTime)]; - }; - if ( (isNull _group) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead - { - blck_sm_Groups = blck_sm_Groups - _x; - }; -}forEach _sm_groups; - -_sm_Emplaced = +blck_sm_Emplaced; -{ - // ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,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. - { - //params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; - diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; - _group = [[_groupParameters],1,_difficulty,_pos,blck_SkinList,blck_headgear,true] call blck_fnc_spawnEmplacedWeaponArray; - _x set[1,_group]; - _x set[2,-1]; - }; - }; - if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead - { - _x set [2, (diag_tickTime + _respawnTime)]; - }; - if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0)) then // a group was spawned and all units are dead - { - blck_sm_Emplaced = blck_sm_Emplaced - _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], - _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. - { - // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true]]; - diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; - _return = [_pos,1,_difficulty,blck_SkinList,blck_headgear,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; - _return params ["_vehicles", "_missionAI", "_abort"]; - _group = group (_missionAI select 0); - _x set[1,_group]; - _x set[2,-1]; - }; - }; - if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead - { - _x set [2, (diag_tickTime + _respawnTime)]; - }; - if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead - { - blck_sm_Vehicles = blck_sm_Vehicles - _x; - }; -}forEach _sm_Vehicles; - -_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. - { - //params["_coords","_skillAI","_weapons","_uniforms","_headGear","_helis",["_chanceParas",0]]; - diag_log format["[blckeagls static aircragePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; - _return = [_pos,_difficulty,[toLower _difficulty] call blck_fnc_selectAILoadout,blck_SkinList,blck_headgear,[_aircraftType],0] call blck_fnc_spawnMissionHeli; - _return params ["_patrolHeli","_ai","_abort"]; - _group = group (_ai select 0); - _x set[1,_group]; - _x set[2,-1]; - }; - }; - if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead - { - _x set [2, (diag_tickTime + _respawnTime)]; - }; - if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead - { - blck_sm_Aircraft = blck_sm_Aircraft - _x; - }; -}forEach _sm_Aircraft; - -//diag_log "[blckeagls] GMS_sm_monitorStaticUnits.sqf "; - -blck_sm_functionsLoaded = true; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnAirPatrol.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnAirPatrol.sqf deleted file mode 100644 index edc15f5..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnAirPatrol.sqf +++ /dev/null @@ -1,29 +0,0 @@ -/* - -------------------------- - 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}; -}; -_return = [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli; -_group = group (_return select 1 select 0); -_group - diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnAirPatrols.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnAirPatrols.sqf deleted file mode 100644 index 422affe..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnAirPatrols.sqf +++ /dev/null @@ -1,54 +0,0 @@ -/* - Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons. - Add addons to the arrays for Epoch or Exile as appropriate. - Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"] - by Ghostrider-DbD- - for DBD Clan - 11/12/16 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ - -#include "\q\addons\custom_server\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; -}; - diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnEmplaced.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnEmplaced.sqf deleted file mode 100644 index 2747727..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnEmplaced.sqf +++ /dev/null @@ -1,62 +0,0 @@ -/* - Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons. - Add addons to the arrays for Epoch or Exile as appropriate. - Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"] - by Ghostrider-DbD- - for DBD Clan - 11/12/16 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ - -#include "\q\addons\custom_server\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 :: _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:: _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["DBD_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 diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnEmplaceds.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnEmplaceds.sqf deleted file mode 100644 index 2747727..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnEmplaceds.sqf +++ /dev/null @@ -1,62 +0,0 @@ -/* - Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons. - Add addons to the arrays for Epoch or Exile as appropriate. - Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"] - by Ghostrider-DbD- - for DBD Clan - 11/12/16 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ - -#include "\q\addons\custom_server\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 :: _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:: _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["DBD_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 diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnInfantryPatrols.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnInfantryPatrols.sqf deleted file mode 100644 index eb0aa5d..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnInfantryPatrols.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - - Spawns infantry patrols for static missions. - - by Ghostrider-DbD- - 8/15/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",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; -params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_weapons",blck_WeaponList_Orange],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; -//diag_log format["_sm_spawnInfantryPatrols:: _this = %1",_this]; -//diag_log format["_sm_spawnInfantryPatrols:: patrols = %1",_patrols]; -if (_patrols isEqualTo []) then -{ - // Use the random spawn logic from the regular dyanmic mission system. - [_coords,_minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI -} else { - { - //diag_log format["_sm_spawnInfantryPatrols.sqf:: _x = %1",_x]; - // Use the pre-defined spawn positions and other parameters for each group. - // [[22819.4,16929.5,5.33892],"red",4, 75] - private["_pos","_difficulty","_noAI","_patrolRadius"]; - _pos = _x select 0; // Position at which to spawn the group - _difficulty = _x select 1; // AI difficulty setting (blue, green etc) - _noAI = _x select 2; // Number of AI to spawn with the group - _patrolRadius = _x select 3; // Radius within which AI should patrol - // params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ]; - [_pos,_noAI,_noAI,_difficulty,_pos,_patrolRadius,_patrolRadius,_uniforms,_headGear,true] call blck_fnc_spawnGroup; - }forEach _patrols; -}; - diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnLootContainers.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnLootContainers.sqf deleted file mode 100644 index f8ad82e..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnLootContainers.sqf +++ /dev/null @@ -1,45 +0,0 @@ -/* - Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons. - Add addons to the arrays for Epoch or Exile as appropriate. - Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"] - by Ghostrider-DbD- - for DBD Clan - 11/12/16 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ - -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; - -params["_objects","_coords","_loot","_lootCounts"]; -private["_object"]; -//diag_log format["_sm_spawnLootContainers:: _this = %1",_this]; -//diag_log format["_sm_spawnLootContainers:: _objects = %1",_objects]; - -if !(_objects isEqualTo []) exitWith -{ // Spawn loot crates where specified in _objects using the information for loot parameters provided for each location. - { - 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); - _loot = _x select 4; // A bit slower this way because you have to allocate memory and transfer the information but more clear for coding. - _lootCounts = _x select 5; - [_object, _loot, _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,_loot,_lootCounts] call blck_fnc_fillBoxes; -}; - diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnObjects.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnObjects.sqf deleted file mode 100644 index ad688cd..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnObjects.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons. - Add addons to the arrays for Epoch or Exile as appropriate. - Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"] - by Ghostrider-DbD- - for DBD Clan - 11/12/16 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ - -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; - -params["_objects"]; -diag_log format["_sm_spawnObjects:: _objects = %1",_objects]; -private["_objects","_object"]; - -{ - //diag_log format["_sm_spawnObjects:: spawning object of type %1 with parameters of %2",_x select 0, _x]; - 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; - - -/* -if (_objects isEqualTo [] and (count _this isEqualTo 4) then -{ - -} else { - _crateType = selectRandom blck_crateTypes; - _crate = [_coords,_crateType] call blck_fnc_spawnCrate; - [_crate,_loot,_lootCounts] call blck_fnc_fillBoxes; -}; - diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnVehiclePatrol.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnVehiclePatrol.sqf deleted file mode 100644 index 7e0242d..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnVehiclePatrol.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - -------------------------- - 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 - diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnVehiclePatrols.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnVehiclePatrols.sqf deleted file mode 100644 index cfa574f..0000000 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_spawnVehiclePatrols.sqf +++ /dev/null @@ -1,55 +0,0 @@ -/* - Run scripts exported from M3EDEN Editor plug in for Arma 3 or other map addons. - Add addons to the arrays for Epoch or Exile as appropriate. - Arrays should contain ["mapname", "name of folder within mapaddons","name of file to execute"] - by Ghostrider-DbD- - for DBD Clan - 11/12/16 - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ - -#include "\q\addons\custom_server\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 (_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; - _vehType = [_aiDifficultyLevel] call blck_fnc_selectPatrolVehicle; - _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; - _vehGroup = [_spawnPos,3,3,_difficulty,_spawnPos,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 - - diff --git a/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf b/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf index 563f9ec..d492bcc 100644 --- a/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf +++ b/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf @@ -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"] + ["Exile","Altis","staticMissionExample2_Exile.sqf"] ]; diag_log "[blckeagls] GMS_StaticMissions_Lists.sqf "; diff --git a/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf b/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf index 3ecb128..d030c92 100644 --- a/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf +++ b/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf @@ -46,5 +46,5 @@ _map = toLower worldName; uiSleep 1; }forEach _staticMissions; -diag_log "[blckeagls] GMS_StaticMissions_init.sqf "; +diag_log "[blckeagls] GMS_StaticMissions Initialized.sqf "; diff --git a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf index 35415d5..98a4ea3 100644 --- a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf +++ b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf @@ -5,7 +5,7 @@ */ private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; + "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_weapons","_sideArms","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; _mission = "static mission example #2"; // Included for additional documentation. Not intended to be spawned as a mission per se. _missionCenter = [22907,16789,0]; // I pulled this from the position of the marker. @@ -125,11 +125,14 @@ _airPatrols = [ //[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"green",1000,0] ]; // Change _useMines to true/false below to enable mission-specific settings. -_useMines = blck_useMines; // Set to false if you have vehicles patrolling nearby. -_uniforms = blck_SkinList; // You can replace this list with a custom list of uniforms if you like. -_headgear = blck_headgear; // You can replace this list with a custom list of headgear. -_weapons = blck_WeaponList_Orange; // You can replace this list with a customized list of weapons, or another predifined list from blck_configs_epoch or blck_configs_exile as appropriate. +_useMines = blck_useMines; // Set to false if you have vehicles patrolling nearby. +_uniforms = blck_SkinList; // You can replace this list with a custom list of uniforms if you like. +_headgear = blck_headgear; // You can replace this list with a custom list of headgear. +_vests = blck_vests; // You can replace this list with a custom list of vests. +_backpacks = blck_backpacks; // You can replace this list with a custom list of backpacks. +_weapons = blck_WeaponList_Orange; // You can replace this list with a customized list of weapons, or another predifined list from blck_configs_epoch or blck_configs_exile as appropriate. +_sideArms = blck_pistols; // You can replace this list with a custom list of sidearms. #include "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_initializeMission.sqf"; -diag_log format["[blckeagls static missions] COMPLETED initializing middions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; \ No newline at end of file +diag_log format["[blckeagls static missions] COMPLETED initializing middions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; diff --git a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf index 96ec45b..e5bb931 100644 --- a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf +++ b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf @@ -3,14 +3,25 @@ See the accompanying example mission in the exampleMission folder to get an idea how I laid this out. Note that I exported the mission using the exportAll function of M3EDEN editor. */ +/* + by Ghostridere-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/ +*/ private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; + "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_weapons","_sideArms","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; _mission = "static mission example #2"; // Included for additional documentation. Not intended to be spawned as a mission per se. _missionCenter = [22907,16789,0]; // I pulled this from the position of the marker. _difficulty = "red"; // Skill level of AI (blue, red, green etc) -diag_log format["[blckeagls static missions] STARTED initializing middions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; +diag_log format["[blckeagls static missions] STARTED initializing mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; _crateLoot = blck_BoxLoot_Orange; // You can use a customized _crateLoot configuration by defining an array here. It must follow the following format shown for a hypothetical loot array called _customLootArray /* _customLootArray = @@ -75,8 +86,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] + ["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] ]; // [ ["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. @@ -86,8 +97,9 @@ _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",[22867.3,16809.1,3.17968],"red",0,0], - //["B_HMG_01_high_F",[22944.3,16820.5,3.14243],"green",0,0] + // ["Weapon Class Name", position[x,y,z], AI Skill [blue, red, green, orange],patrol radius [0 for static units], respawn time [seconds]] + ["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. @@ -97,13 +109,13 @@ _minNoAI = blck_MinAI_Red; // Modify as needed _maxNoAI = blck_MaxAI_Red; // Modify as needed. _noAIGroups = blck_AIGrps_Red; // Modify as needed; note that these values are ignored of you specify AI patrols in the array below. _aiGroupParameters = [ - // [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/] + // [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, 120 /* seconds to wait to respawn after all units dead */] //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], //[[22993.3,16830.8,5.6292],"red",4, 75,9000], //[[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], + //[[22909.8,16778.6,3.19144],"red",4, 75,900], //[[22819.4,16929.5,5.33892],"red",4, 75,900], [[22819.4,16929.5,5.33892],"red",4, 75,900] ]; @@ -111,7 +123,7 @@ _aiGroupParameters = [ _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 = [ - ["Exile_Car_Offroad_Armed_Guerilla01",[22819.4,16929.5,3.17413],"red", 600,900], + //// ["Vehicle Class Name", position[x,y,z], AI Skill [blue, red, green, orange],patrol radius [0 for static units], respawn time [seconds]] ["Exile_Car_Offroad_Armed_Guerilla02",[22809.5,16699.2,8.78706],"green", 600,90] ]; //[ ["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. @@ -121,6 +133,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 = [ + // // ["Aircraft Class Name", position[x,y,z], AI Skill [blue, red, green, orange],patrol radius [0 for static units], respawn time [seconds]] ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,900]//, //[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"green",1000,0] ]; @@ -128,8 +141,11 @@ _airPatrols = [ _useMines = blck_useMines; // Set to false if you have vehicles patrolling nearby. _uniforms = blck_SkinList; // You can replace this list with a custom list of uniforms if you like. _headgear = blck_headgear; // You can replace this list with a custom list of headgear. +_vests = blck_vests; // You can replace this list with a custom list of vests. +_backpacks = blck_backpacks; // You can replace this list with a custom list of backpacks. _weapons = blck_WeaponList_Orange; // You can replace this list with a customized list of weapons, or another predifined list from blck_configs_epoch or blck_configs_exile as appropriate. +_sideArms = blck_pistols; // You can replace this list with a custom list of sidearms. #include "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_initializeMission.sqf"; -diag_log format["[blckeagls static missions] COMPLETED initializing missions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; \ No newline at end of file +diag_log format["[blckeagls static missions] COMPLETED initializing missions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; diff --git a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_Lists.sqf b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_Lists.sqf index 95c064e..e02d067 100644 --- a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_Lists.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_Lists.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- @@ -18,7 +17,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"] + ["Exile","Altis","staticMissionExample2_Exile.sqf"] ]; diag_log "[blckeagls] GMS_UMS_StaticMissions_Lists.sqf "; diff --git a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_init.sqf b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_init.sqf index 5be3f79..2a252c6 100644 --- a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_init.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_init.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- @@ -10,9 +9,9 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -if (!isServer) exitWith{}; +//if (!isServer) exitWith{}; -//diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf "; +diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf "; //static mission descriptor for code: [position,level, numAI or [min,maxAI],patrolRadius, respawn, group[groupNull],spawnedAt[0],respawn[0]] #include "\q\addons\custom_server\Configs\blck_defines.hpp"; @@ -23,14 +22,14 @@ uiSleep 3; private["_mod","_map","_missionMod","_missionMap","_missionLocation","_missionDataFile"]; //diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf "; _mod = toLower(call blck_fnc_getModType); -//diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_mod]; -//diag_log format["[blckeagls] GMS__UMS_StaticMissions_init <_staticMissions> = %1",_staticMissions]; -//diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf "; +diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_mod]; +diag_log format["[blckeagls] GMS__UMS_StaticMissions_init <_staticMissions> = %1",_staticMissions]; +diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf "; _map = toLower worldName; -//diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_map]; +diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_map]; { - //diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_x]; - //diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_map,_mod]; + diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_x]; + diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_map,_mod]; if ((_map) isEqualTo toLower(_x select 1)) then { if ((_mod isEqualTo "epoch") && (toLower(_x select 0) isEqualTo "epoch")) then @@ -47,5 +46,5 @@ _map = toLower worldName; uiSleep 1; }forEach _staticMissions; -diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf "; +diag_log "[blckeagls] GMS__UMS_StaticMissions_init.sqf "; diff --git a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_configurations.sqf b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_configurations.sqf index 1c80082..6ac7d6b 100644 --- a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_configurations.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_configurations.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_dynamicMissionList.sqf b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_dynamicMissionList.sqf index 5acb1c0..bdb3b7b 100644 --- a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_dynamicMissionList.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_dynamicMissionList.sqf @@ -1,8 +1,6 @@ /* - Mission Template by Ghostrider [GRG] - Mission Compositions by Bill prepared for ghostridergaming + Ghostrider [GRG] Copyright 2016 - Last modified 3/20/17 -------------------------- License @@ -12,3 +10,4 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ blck_dynamicUMS_MissionList = ["default.sqf"]; +diag_log "[blckeagls] Dynamic UMS Mission List "; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_init.sqf b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_init.sqf index c3a04c9..d163365 100644 --- a/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_init.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_init.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + -------------------------- License -------------------------- @@ -9,6 +8,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ +diag_log "[blckeagls] Initializing UMS"; + #include "\q\addons\custom_server\Configs\blck_defines.hpp"; blck_dynamicUMS_MissionsRuning = 0; blck_priorDynamicUMS_Missions = []; @@ -19,5 +20,7 @@ blck_UMS_ActiveDynamicMissions = []; #include "code\GMS_UMS_functions.sqf"; #include "GMS_UMS_dynamicMissionList.sqf"; [] execVM "q\addons\custom_server\Missions\UMS\GMS_UMS_StaticMissions_init.sqf"; + +diag_log "[blckeagls] UMS "; diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findShoreLocation.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findShoreLocation.sqf index 81cbc53..1297ea8 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findShoreLocation.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findShoreLocation.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- @@ -29,7 +28,7 @@ _evaluate = true; { _waterPos = [ _mapCenter, // center of search area - 1, // min distance to search + 2, // min distance to search 20000, // max distance to search 0, // distance to nearest object 2, // water mode [2 = water only] diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findWaterDepth.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findWaterDepth.sqf index cf3011d..c5e0d0c 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findWaterDepth.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findWaterDepth.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_functions.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_functions.sqf index 5a4d959..2ce413c 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_functions.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_functions.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 20167 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_UMS_missionSpawner.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_UMS_missionSpawner.sqf deleted file mode 100644 index d4bc943..0000000 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_UMS_missionSpawner.sqf +++ /dev/null @@ -1,61 +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["_pos"]; -if (!isServer) exitWith{}; -params["_mission"]; -// Spawn landscape -// params["_objects"]; -if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; -if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; -_markerClass = format["static%1",floor(random(1000000))]; -_blck_localMissionMarker = [_markerClass,_missionCenter,"","",_markerColor,_markerType]; -if (blck_labelMapMarkers select 0) then -{ - _blck_localMissionMarker set [2, _markerMissionName]; -}; -if !(blck_preciseMapMarkers) then -{ - _blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition]; -}; -_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name? -[_blck_localMissionMarker] call blck_fnc_spawnMarker; - -[_missionLandscape] call blck_fnc_sm_spawnObjects; - -{ - [_x] call blck_fnc_sm_AddAircraft; - -}forEach _airPatrols; -//uiSleep 1; - -{ - [_x] call blck_fnc_sm_AddScubaGroup; -}forEach _aiGroupParameters; - -{ - [_x] call blck_fnc_sm_AddEmplaced; -}forEach _missionEmplacedWeapons; - -{ - [_x] call blck_fnc_sm_AddSurfaceVehicle; -}forEach _vehiclePatrolParameters; - -{ - [_x] call blck_fnc_sm_AddSDVVehicle; -} forEach _submarinePatrolParameters; - -uiSleep 30; -// spawn loot chests -[_missionLootBoxes,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers; - -diag_log format["[blckeagls] UMS Mission Spawner: Static UMS Mission %1 spawned",_mission]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_addDynamicUMS_Mission.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_addDynamicUMS_Mission.sqf index 0baa949..28f37dc 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_addDynamicUMS_Mission.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_addDynamicUMS_Mission.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- @@ -12,15 +11,34 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; //params["_pos"]; private["_UMS_mission","_waitTime","_mission","_pos"]; +<<<<<<< HEAD +======= + +if (count blck_dynamicUMS_MissionList == 0) exitWith +{ + blck_numberUnderwaterDynamicMissions = -1; + diag_log "No Dynamic UMS Missions Listed "; +}; +>>>>>>> Experimental _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; +<<<<<<< HEAD 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]; +======= +#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 +>>>>>>> Experimental 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]; \ No newline at end of file +<<<<<<< HEAD +[_pos,_mission] call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1",_UMS_mission]; +======= +[_pos,_mission] call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1",_UMS_mission]; +>>>>>>> Experimental diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission - Copy.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission - Copy.sqf deleted file mode 100644 index 669d2a7..0000000 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission - Copy.sqf +++ /dev/null @@ -1,563 +0,0 @@ -/* - Generic Mission Spawner - By Ghostrider GRG - Copyright 2016 - Last modified 12/14/17 - - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; -#define isScubaMission true -private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups"]; -params["_coords","_mission",["_allowReinforcements",false]]; -//diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements]; - -//////// -// set all variables needed for the missions -// data is pulled either from the mission description or from the _mission variable passsed as a parameter -// Deal with situations where some of these variables might not be defined as well. -//////// - -// _mission params[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange]; -_markerClass = _mission; -_aiDifficultyLevel = _difficulty; // _difficulty is defined in the mission description file. see \addons\custom_server\Missions\UMS\dynamicMissions\default.sqf for an example - -blck_ActiveMissionCoords pushback _coords; -blck_UMS_ActiveDynamicMissions pushBack _coords; -blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning + 1; -blck_missionsRunning = blck_missionsRunning + 1; - -diag_log format["[blckeagls] missionSpawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; - -private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"]; - -if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; -if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; -//if (isNil "_timeOut") then {_timeOut = -1;}; -if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn"; -if (isNil "_missionGroups") then {_missionGroups = []}; -private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"]; -if (isNil "_useMines") then {_useMines = blck_useMines;}; - -_objects = []; -_mines = []; -_crates = []; -_aiGroup = []; -_missionAIVehicles = []; -_blck_AllMissionAI = []; -_AI_Vehicles = []; -_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType]; -_delayTime = 1; -_groupPatrolRadius = 50; - -if (blck_labelMapMarkers select 0) then -{ - //diag_log "labeling map markers *****"; - _blck_localMissionMarker set [2, _markerMissionName]; -}; -if !(blck_preciseMapMarkers) then -{ - //diag_log "Map marker will be OFFSET from the mission position"; - _blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition]; -}; -_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name? -[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers; -[_blck_localMissionMarker] call blck_fnc_spawnMarker; -#ifdef blck_debugMode -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (91) message players and spawn a mission marker";}; -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (77) waiting for player to trigger the mission";}; -#endif -//////// -// All parameters are defined, lets wait until a player is nearby or the mission has timed out -//////// - -private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"]; -_missionStartTime = diag_tickTime; -_playerInRange = false; -_missionTimedOut = false; - -_wait = true; - -#ifdef blck_debugMode -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (90) starting mission trigger loop"}; -if (blck_debugLevel > 2) then {_wait = false}; -#endif - -while {_wait} do -{ - #ifdef blck_debugMode - //diag_log "missionSpawner:: top of mission trigger loop"; - if (blck_debugLevel > 2) exitWith {_playerInRange = true;}; - #endif - - if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; - if ([_missionStartTime] 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] call blck_fnc_timedOut]; - }; - #endif -}; - -if (_missionTimedOut) exitWith -{ -/* - -*/ - // Deal with the case in which the mission timed out. - //["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers; - blck_priorDynamicUMS_Missions pushback [_coords,diag_tickTime]; - blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords]; - blck_missionsRunning = blck_missionsRunning - 1; - blck_UMS_ActiveDynamicMissions = blck_UMS_ActiveDynamicMissions - [_coords]; - blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning - 1; - - [_blck_localMissionMarker select 0] call blck_fnc_deleteMarker; - //_blck_localMissionMarker set [1,[0,0,0]]; - //_blck_localMissionMarker set [2,""]; - [_objects, 0.1] spawn blck_fnc_cleanupObjects; - - #ifdef blck_debugMode - if (blck_debugLevel > 0) then - { - diag_log format["[blckeagls] dynamicUMSspawner:: (133) Mission Timed Out: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; - }; - #endif -}; - -//////// -// 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 - -private ["_temp"]; -if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate -{ - _temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates; - if (typeName _temp isEqualTo "ARRAY") then - { - _objects append _temp; - }; -}; - -uiSleep _delayTime; -if (_useMines) then -{ - _mines = [_coords] call blck_fnc_spawnMines; - //uiSleep _delayTime;; -}; -uiSleep _delayTime; -_temp = []; -//diag_log format["_dynamicUMSspawner"" _missionLandscape = %1 | _missionLandscapeMode = %2",_missionLandscape, _missionLandscapeMode]; -if (_missionLandscapeMode isEqualTo "random") then -{ - _temp = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape; -}; -if (_missionLandscapeMode isEqualTo "precise") then -{ - //params["_center","_objects"]; - _temp = [_coords, _missionLandscape] call blck_fnc_spawnCompositionObjects; - //uiSleep 1; -}; -//diag_log format["_fnc_dynamicUMSspawner: _temp = %1, typeName _temp = %2",_temp, typeName _temp]; -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;; - -_temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles; -//uisleep 1; -_crates append _temp; - -uiSleep _delayTime; - -_abort = false; -_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 -{ - _temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear,_missionGroups] 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 - -//diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters]; -// params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],"_missionGroups",["weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]]; -_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,_scubaGroupParameters,blck_UMS_weapons,blck_UMS_vests,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 -{ - _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","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true],["_weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]]; - _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vehiclePatrolParameters,true /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols; - //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] 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 - - }; -}; -// Spawn any submarine patrols -if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then -{ - _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_submarinePatrolParameters,true,blck_UMS_weapons,blck_UMS_vests,isScubaMission] call blck_fnc_spawnMissionVehiclePatrols; - //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] 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 - - }; -}; - -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; -}; - -uiSleep _delayTime; -_temp = [[],[],false]; -_abort = false; - -if (_allowReinforcements) then -{ - _weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout; - _temp = []; - - #ifdef blck_debugMode - if (blck_debugLevel > 1) then - { - diag_log format["[blckeagls] dynamicUMSspawner:: (298) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; - }; - #endif - private _noChoppers = 0; - private _chancePara = 0; - switch (toLower _aiDifficultyLevel) do - { - case "blue":{ - _noChoppers = [blck_noPatrolHelisBlue] call blck_fnc_getNumberFromRange; - //_chancePara = [blck_chanceParaBlue] call blck_fnc_getNumberFromRange; - }; - case "red":{ - _noChoppers = [blck_noPatrolHelisRed] call blck_fnc_getNumberFromRange; - //_chancePara = [blck_chanceParaRed] call blck_fnc_getNumberFromRange; - }; - case "green":{ - _noChoppers = [blck_noPatrolHelisGreen] call blck_fnc_getNumberFromRange; - //_chancePara = [blck_chanceParaGreen] call blck_fnc_getNumberFromRange; - }; - case "orange":{ - _noChoppers = [blck_noPatrolHelisOrange] call blck_fnc_getNumberFromRange; - //_chancePara = [blck_chanceParaOrange] call blck_fnc_getNumberFromRange; - }; - }; - #ifdef blck_debugMode - diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]; - #endif - for "_i" from 1 to (_noChoppers) do - { - //params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"]; - - _temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear,_chancePara] call blck_fnc_spawnMissionReinforcements; - - #ifdef blck_debugMode - if (blck_debugLevel >= 2) then - { - diag_log format["dynamicUMSspawner(334):: blck_fnc_spawnMissionReinforcements call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers]; - diag_log format["dynamicUMSspawner(335):: _temp = %1",_temp]; - }; - #endif - - if (typeName _temp isEqualTo "ARRAY") then - { - _abort = _temp select 2; - _objects pushback (_temp select 0); - _blck_AllMissionAI append (_temp select 1); - }; - if (_abort) then - { - #ifdef blck_debugMode - if (blck_debugLevel > 2) then - { - diag_log "dynamicUMSspawner:: (349) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission"; - }; - #endif - - [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; - }; - }; -}; -////////////////////////// -// 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; - - #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; -}; - -uiSleep _delayTime; -if (count _missionLootBoxes > 0) then -{ - _crates = [_coords,_missionLootBoxes,_loadCratesTiming] call blck_fnc_spawnMissionCrates; -} -else -{ - _crates = [_coords,[[selectRandom blck_UMS_crates,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming] call blck_fnc_spawnMissionCrates; - -}; - -if (blck_cleanUpLootChests) then -{ - _objects append _crates; -}; - - -//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; - -switch (_endCondition) do -{ - case "playerNear": {_endIfPlayerNear = true;_endIfAIKilled = false;}; - 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 -_fn_crateMoved = { - params["_crate"]; - private _result = (_x distance (_x getVariable["crateSpawnPos",[0,0,0]])) > 10; - //diag_log format["_fn_crateMoved:: _result = %1",_result]; - _result; -}; -_missionComplete = -1; -while {_missionComplete isEqualTo -1} do -{ - //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180}; - if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {}; - if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1) exitWith {}; - - { - if ({[_x] call _fn_crateMoved} count _crates > 0) exitWith - { - _missionComplete = 1; - _crateStolen = true; - }; - }forEach _crates; - //diag_log format["dynamicUMSspawner:: (483) missionCompleteLoop - > players near = %1 and ai alive = %2 and crates stolen = %3",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI, _crateStolen]; - uiSleep 4; -}; -if (_crateStolen) exitWith -{ - diag_log format["dynamicUMSspawner:: (542) Crate Stolen Callening _fnc_endMission - > players near = %1 and ai alive = %2 and crates stolen = %3",[_locations,10,true] call blck_fnc_playerInRangeArray, {alive _x} count _blck_AllMissionAI, _crateStolen]; - [_mines,_objects,_crates, _blck_AllMissionAI,"Crate Removed from Mission Site Before Mission Completion: Mission Aborted",_blck_localMissionMarker,_coords,_mission,2,isScubaMission] call blck_fnc_endMission; -}; -#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]; -// params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_vehicles",[]],["_isScubaMission",false]]; -_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,0,_missionAIVehicles,isScubaMission] call blck_fnc_endMission; - -//diag_log format["[blckeagls] dynamicUMSspawner:: (559) end of mission: blck_fnc_endMission has returned control to _fnc_dynamicUMSspawner"]; - diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf index db45187..4c1eb7f 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf @@ -1,8 +1,7 @@ /* - Generic Mission Spawner + Dynamic Underwater Mission Spawner By Ghostrider GRG Copyright 2016 - Last modified 12/14/17 -------------------------- License @@ -12,32 +11,96 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; + #define isScubaMission true -private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups"]; +#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"]; + params["_coords","_mission",["_allowReinforcements",false]]; -//diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements]; -//////// -// set all variables needed for the missions -// data is pulled either from the mission description or from the _mission variable passsed as a parameter -// Deal with situations where some of these variables might not be defined as well. -//////// - -// _mission params[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange]; _markerClass = _mission; _aiDifficultyLevel = _difficulty; // _difficulty is defined in the mission description file. see \addons\custom_server\Missions\UMS\dynamicMissions\default.sqf for an example -diag_log format["[blckeagls] missionSpawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +diag_log format["[blckeagls Dynamic UMS] dynamicUMSspawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; -private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"]; - -if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; -if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; //if (isNil "_timeOut") then {_timeOut = -1;}; -if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn"; -if (isNil "_missionGroups") then {_missionGroups = []}; -private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"]; -if (isNil "_useMines") then {_useMines = blck_useMines;}; +if (isNil "_missionGroups") then {_missionGroups = []}; +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"; +if (isNil "_useMines") then {_useMines = blck_useMines;}; +if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (isNil "_sideArms") then {_sideArms = blck_Pistols}; +if (isNil "_vests") then {_vests = blck_vests}; +if (isNil "_backpacks") then {_backpacks = blck_backpacks}; +//diag_log format["_fnc_missionSpawner: -> blck_backpacks = %1", blck_backpacks]; +//diag_log format["_fnc_missionSpawner: -> _backpacks = %1",_backpacks]; +if (isNil "_uniforms") then {_uniforms = blck_SkinList}; +if (isNil "_headGear") then {_headgear = blck_headgear}; + +if (isNil "_chanceHeliPatrol") then +{ + switch (toLower(_aiDifficultyLevel)) do + { + case "blue": {_chanceHeliPatrol = blck_chanceHeliPatrolBlue}; + case "red": {_chanceHeliPatrol = blck_chanceHeliPatrolRed}; + case "green": {_chanceHeliPatrol = blck_chanceHeliPatrolGreen}; + case "orange": {_chanceHeliPatrol = blck_chanceHeliPatrolOrange}; + default {_chanceHeliPatrol = 0}; + }; +}; +if (isNil "_noChoppers") then +{ + switch (toLower(_aiDifficultyLevel)) do + { + case "blue": {_noChoppers = blck_noPatrolHelisBlue}; + case "red": {_noChoppers = blck_noPatrolHelisRed}; + case "green": {_noChoppers = blck_noPatrolHelisGreen}; + case "orange": {_noChoppers = blck_noPatrolHelisOrange}; + default {_noChoppers = 0}; + }; +}; +if (isNil "_chancePara") then +{ + switch (toLower (_aiDifficultyLevel)) do + { + case "blue": {_chancePara = blck_chanceParaBlue}; + case "red": {_chancePara = blck_chanceParaRed}}; + case "green": {_chancePara = blck_chanceParaGreen}; + case "orange": {_chancePara = blck_chanceParaOrange; + default {_chancePara = 0}; + }; +}; +if (isNil "_missionHelis") then +{ + switch (toLower (_aiDifficultyLevel)) do + { + case "blue": {_missionHelis = blck_patrolHelisBlue}; + case "red": {_missionHelis = blck_patrolHelisRed}; + case "green": {_missionHelis = blck_patrolHelisGreen}; + case "orange": {_missionHelis = blck_patrolHelisOrange}; + default {_missionHelis = blck_patrolHelisBlue}; + }; +}; +if (isNil "_noPara") then +{ + switch (toLower (_aiDifficultyLevel)) do + { + case "blue": {_noPara = blck_noParaBlue}; + case "red": {_noPara = blck_noParaRed}; + case "green": {_noPara = blck_noParaGreen}; + case "orange": {_noPara = blck_noParaOrange}; + default {_noPara = 0}; + }; +}; +if (isNil "_chanceLoot") then {_chanceLoot = 0}; +if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;}; +if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Blue}; +if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed}; _objects = []; _mines = []; @@ -52,26 +115,23 @@ _groupPatrolRadius = 50; if (blck_labelMapMarkers select 0) then { - //diag_log "labeling map markers *****"; _blck_localMissionMarker set [2, _markerMissionName]; }; if !(blck_preciseMapMarkers) then { - //diag_log "Map marker will be OFFSET from the mission position"; _blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition]; }; _blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name? [["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers; -[_blck_localMissionMarker] call blck_fnc_spawnMarker; +_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker; #ifdef blck_debugMode -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (91) message players and spawn a mission marker";}; -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (77) waiting for player to trigger the mission";}; +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, lets wait until a player is nearby or the mission has timed out +// All parameters are defined, let's wait until a player is nearby or the mission has timed out //////// -private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"]; _missionStartTime = diag_tickTime; _playerInRange = false; _missionTimedOut = false; @@ -79,19 +139,18 @@ _missionTimedOut = false; _wait = true; #ifdef blck_debugMode -if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (90) starting mission trigger loop"}; +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 - //diag_log "missionSpawner:: top of mission trigger loop"; if (blck_debugLevel > 2) exitWith {_playerInRange = true;}; #endif if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; - if ([_missionStartTime] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; + if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; uiSleep 5; #ifdef blck_debugMode @@ -99,35 +158,19 @@ while {_wait} do { 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] call blck_fnc_timedOut]; + diag_log format["dynamicUMSspawner:: Trigger Loop - timeout = %1", [_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut]; }; #endif }; if (_missionTimedOut) exitWith { -/* - -*/ // Deal with the case in which the mission timed out. - //["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers; blck_priorDynamicUMS_Missions pushback [_coords,diag_tickTime]; - blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords]; - blck_missionsRunning = blck_missionsRunning - 1; blck_UMS_ActiveDynamicMissions = blck_UMS_ActiveDynamicMissions - [_coords]; - blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning - 1; - - [_blck_localMissionMarker select 0] call blck_fnc_deleteMarker; - //_blck_localMissionMarker set [1,[0,0,0]]; - //_blck_localMissionMarker set [2,""]; - [_objects, 0.1] spawn blck_fnc_cleanupObjects; - - #ifdef blck_debugMode - if (blck_debugLevel > 0) then - { - diag_log format["[blckeagls] dynamicUMSspawner:: (133) Mission Timed Out: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; - }; - #endif + blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning - 1; + diag_log format["_fnc_dynamicUMSSpawner (187): mission timed out"]; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; }; //////// @@ -140,7 +183,6 @@ if (blck_debugLevel > 0) then }; #endif -private ["_temp"]; if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate { _temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates; @@ -150,13 +192,13 @@ if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crat }; }; -uiSleep _delayTime; +uiSleep delayTime; if (_useMines) then { _mines = [_coords] call blck_fnc_spawnMines; //uiSleep _delayTime;; }; -uiSleep _delayTime; +uiSleep delayTime; _temp = []; //diag_log format["_dynamicUMSspawner"" _missionLandscape = %1 | _missionLandscapeMode = %2",_missionLandscape, _missionLandscapeMode]; if (_missionLandscapeMode isEqualTo "random") then @@ -183,7 +225,7 @@ if (blck_debugLevel > 0) then }; #endif -uiSleep _delayTime;; +uiSleep delayTime;; _temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles; //uisleep 1; @@ -198,31 +240,39 @@ _temp = [[],[],false]; // AI could be spawned on a platform or floating structure. if (count _missionGroups > 0) then { - _temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear,_missionGroups] call blck_fnc_spawnMissionAI; + // 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; }; #ifdef blck_debugMode -if (blck_debugLevel > 2) then { +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 { +if (blck_debugLevel > 2) then +{ diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; }; #endif -//diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters]; -// params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],"_missionGroups",["weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]]; -_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,_scubaGroupParameters,blck_UMS_weapons,blck_UMS_vests,isScubaMission] call blck_fnc_spawnMissionAI; +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 { +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 { +if (blck_debugLevel > 2) then +{ diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; }; #endif @@ -258,9 +308,8 @@ _vehToSpawn = 0; // Spawn any surface patrols if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then { - // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear","_missionPatrolVehicles",["_useRelativePos",true],["_weapons",[]],["_vests",blck_vests],["_isScubaGroup",false]]; - _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vehiclePatrolParameters,true /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols; - //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; + // 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 /*,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]; @@ -288,8 +337,8 @@ if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then // Spawn any submarine patrols if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then { - _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_submarinePatrolParameters,true,blck_UMS_weapons,blck_UMS_vests,isScubaMission] call blck_fnc_spawnMissionVehiclePatrols; - //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; + // 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]; @@ -303,6 +352,7 @@ if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then 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 @@ -326,78 +376,40 @@ if (_abort) exitWith [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; }; -uiSleep _delayTime; +uiSleep delayTime; _temp = [[],[],false]; _abort = false; -if (_allowReinforcements) then -{ - _weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout; - _temp = []; +_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange; +_noPara = [_noPara] call blck_fnc_getNumberFromRange; - #ifdef blck_debugMode - if (blck_debugLevel > 1) then - { - diag_log format["[blckeagls] dynamicUMSspawner:: (298) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; - }; - #endif - private _noChoppers = 0; - private _chancePara = 0; - switch (toLower _aiDifficultyLevel) do - { - case "blue":{ - _noChoppers = [blck_noPatrolHelisBlue] call blck_fnc_getNumberFromRange; - //_chancePara = [blck_chanceParaBlue] call blck_fnc_getNumberFromRange; - }; - case "red":{ - _noChoppers = [blck_noPatrolHelisRed] call blck_fnc_getNumberFromRange; - //_chancePara = [blck_chanceParaRed] call blck_fnc_getNumberFromRange; - }; - case "green":{ - _noChoppers = [blck_noPatrolHelisGreen] call blck_fnc_getNumberFromRange; - //_chancePara = [blck_chanceParaGreen] call blck_fnc_getNumberFromRange; - }; - case "orange":{ - _noChoppers = [blck_noPatrolHelisOrange] call blck_fnc_getNumberFromRange; - //_chancePara = [blck_chanceParaOrange] call blck_fnc_getNumberFromRange; - }; - }; - #ifdef blck_debugMode - diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]; - #endif +#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 { - //params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"]; - - _temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear,_chancePara] call blck_fnc_spawnMissionReinforcements; + if (random(1) < _chanceHeliPatrol) then + { + //_temp = [_coords,_missionHelis,spawnHeli,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionReinforcements; + _temp = [_coords,_aiDifficultyLevel,_missionHelis,_uniforms,_headGear,_vests,_backpacks,"none",_weaponList, _sideArms] call blck_fnc_spawnMissionHeli; - #ifdef blck_debugMode - if (blck_debugLevel >= 2) then - { - diag_log format["dynamicUMSspawner(334):: blck_fnc_spawnMissionReinforcements call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers]; - diag_log format["dynamicUMSspawner(335):: _temp = %1",_temp]; - }; - #endif - - if (typeName _temp isEqualTo "ARRAY") then - { - _abort = _temp select 2; - _objects pushback (_temp select 0); - _blck_AllMissionAI append (_temp select 1); - }; - if (_abort) then - { - #ifdef blck_debugMode - if (blck_debugLevel > 2) then + if (typeName _temp isEqualTo "ARRAY") then { - diag_log "dynamicUMSspawner:: (349) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission"; + _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; }; - #endif - - [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; }; }; }; + ////////////////////////// // Spawn Crates and Emplaced Weapons Last to try to force them to correct positions relative to spawned buildinga or other objects. #ifdef blck_debugMode @@ -410,7 +422,8 @@ _noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange; 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 = [_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 @@ -458,21 +471,45 @@ if (_abort) exitWith }; uiSleep _delayTime; -if (count _missionLootBoxes > 0) then +if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then { - _crates = [_coords,_missionLootBoxes,_loadCratesTiming] call blck_fnc_spawnMissionCrates; -} -else -{ - _crates = [_coords,[[selectRandom blck_UMS_crates,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming] call blck_fnc_spawnMissionCrates; - + if (count _missionLootBoxes > 0) then + { + _crates = [_coords,_missionLootBoxes,_loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + } + else + { + _crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming, _spawnCratesTiming, "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + + }; + + if (blck_cleanUpLootChests) then + { + _objects append _crates; + }; }; if (blck_cleanUpLootChests) then { _objects append _crates; }; - +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; + if !(isNull _paratroops) then + { + _blck_AllMissionAI append (units _paratroops); + }; + if (random(1) < _chanceLoot) then + { + private _extraCrates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_paraLoot,_paraLootCounts]], "atMissionSpawn","atMissionStartAir", "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + if (blck_cleanUpLootChests) then + { + _objects append _extraCrates; + }; + }; +}; //uisleep 2; #ifdef blck_debugMode @@ -491,13 +528,13 @@ _missionComplete = -1; _startTime = diag_tickTime; if (blck_showCountAliveAI) then { - //diag_log format["_missionSpawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName]; - //diag_log format["_missionSpawner(442): Alive AI = %1 | Current Marker Text = %2",{alive _x} count _blck_AllMissionAI, markerText _marker]; + //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["_missionSpawner: blck_missionMarkers = %1",blck_missionMarkers]; + //diag_log format["_dynamicUMSspawner: blck_missionMarkers = %1",blck_missionMarkers]; }; }; switch (_endCondition) do @@ -522,34 +559,101 @@ 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 -_fn_crateMoved = { - params["_crate"]; - private _result = (_x distance (_x getVariable["crateSpawnPos",[0,0,0]])) > 10; - //diag_log format["_fn_crateMoved:: _result = %1",_result]; - _result; + +if (blck_showCountAliveAI) then +{ + if !(_marker isEqualTo "") then + { + [_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount; + blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI]; + }; }; + +private _spawnPara = if (random(1) < _chancePara) then {true} else {false}; _missionComplete = -1; while {_missionComplete isEqualTo -1} do { - //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180}; + #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 {}; + if (_spawnCratesTiming isEqualTo "atMissionSpawn") then { - if ({[_x] call _fn_crateMoved} count _crates > 0) exitWith { - _missionComplete = 1; - _crateStolen = true; - }; - }forEach _crates; + if ({[_x] call blck_fnc_crateMoved} count _crates > 0) exitWith + { + _missionComplete = 1; + _crateStolen = true; + }; + }forEach _crates; + }; + if (_spawnPara) then + { + + if ([_coords,_paraTriggerDistance,true] call blck_fnc_playerInRange) then + { + _spawnPara = false; // The player gets one try to spawn these. + if (random(1) < _chancePara) then // + { + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,true] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _blck_AllMissionAI append (units _paratroops); + }; + if (random(1) < _chanceLoot) then + { + private _extraCrates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_paraLoot,_paraLootCounts]], "atMissionSpawn","atMissionStartAir", "start", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + if (blck_cleanUpLootChests) then + { + _objects append _extraCrates; + }; + }; + }; + }; + }; //diag_log format["dynamicUMSspawner:: (483) missionCompleteLoop - > players near = %1 and ai alive = %2 and crates stolen = %3",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI, _crateStolen]; uiSleep 4; }; if (_crateStolen) exitWith { - diag_log format["dynamicUMSspawner:: (542) Crate Stolen Callening _fnc_endMission - > players near = %1 and ai alive = %2 and crates stolen = %3",[_locations,10,true] call blck_fnc_playerInRangeArray, {alive _x} count _blck_AllMissionAI, _crateStolen]; + //diag_log format["dynamicUMSspawner:: (542) Crate Stolen Callening _fnc_endMission - > players near = %1 and ai alive = %2 and crates stolen = %3",[_locations,10,true] call blck_fnc_playerInRangeArray, {alive _x} count _blck_AllMissionAI, _crateStolen]; [_mines,_objects,_crates, _blck_AllMissionAI,"Crate Removed from Mission Site Before Mission Completion: Mission Aborted",_blck_localMissionMarker,_coords,_mission,2,isScubaMission] call blck_fnc_endMission; }; + +if (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then +{ + if (count _missionLootBoxes > 0) then + { + _crates = [_coords,_missionLootBoxes,_loadCratesTiming,_spawnCratesTiming, "end", _aiDifficultyLevel] call blck_fnc_spawnMissionCrates; + } + else + { + _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 +{ + { + [_x] call blck_fnc_loadMissionCrate; + } forEach _crates; +}; + #ifdef blck_debugMode if (blck_debugLevel > 0) then { @@ -561,8 +665,18 @@ if (blck_debugLevel > 0) then private["_result"]; // Force passing the mission name for informational purposes. _blck_localMissionMarker set [2, _markerMissionName]; -// params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_vehicles",[]],["_isScubaMission",false]]; +if (blck_showCountAliveAI) then +{ + //_marker setMarkerText format["%1: All AI Dead",_markerMissionName]; + { + if ((_x select 1) isEqualTo _markerMissionName) exitWith{blck_missionMarkers deleteAt _forEachIndex}; + }forEach blck_missionMarkers; +}; +// 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; -//diag_log format["[blckeagls] dynamicUMSspawner:: (559) end of mission: blck_fnc_endMission has returned control to _fnc_dynamicUMSspawner"]; - +#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]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnPendingUMSMissions.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnPendingUMSMissions.sqf deleted file mode 100644 index 6d4cf81..0000000 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnPendingUMSMissions.sqf +++ /dev/null @@ -1,17 +0,0 @@ -#define tMin 600 -#define tMax 900 - -params["_pos","_mission","_startTime"]; - -private["_dynamicMissions"]; -_dynamicMissions = + blck_UMS_dynamicMissions; -{ - if (diag_tickTime > _timeAdded + round( tMin + (tMax - tMin) ) then - { - _pos = _x select 0; - _mission = _x select 1; - _timeAdded = _x select 2; - blck_UMS_dynamicMissions = blck_UMS_dynamicMissions - _x; - _pos call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1.sqf",_mission]; - }; -} forEach _dynamicMissions; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnSDVPatrol.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnSDVPatrol.sqf index 7cf0526..49a418e 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnSDVPatrol.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnSDVPatrol.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- @@ -12,7 +11,7 @@ #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]; +//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; diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnScubaGroup.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnScubaGroup.sqf index f0162c6..b9d40c1 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnScubaGroup.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnScubaGroup.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- @@ -17,8 +16,8 @@ params["_pos",["_skillLevel","red"],["_numUnits",6],["_patrolRadius",15]]; //diag_log format["_fnc_spawnScubaGroup: _this = %1",_this]; private["_group","_diveDepth"]; _group = grpNull; -// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true],["_weaponList",[]],["_vests",blck_vests],["_scuba",false] ]; -_group = [_pos,_numUnits,_numUnits,_skillLevel,_pos, _patrolRadius - 2, _patrolRadius, blck_UMS_uniforms, blck_UMS_headgear, configureWaypoints, blck_UMS_weapons, blck_UMS_vests, isScubaGroup] call blck_fnc_spawnGroup; +//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; @@ -36,4 +35,4 @@ if (blck_debugLevel > 1) then diag_log format["_fnc_spawnScubaGroup:: -->> group spawned = %1",_group]; }; #endif -_group; \ No newline at end of file +_group; diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnSurfacePatrol.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnSurfacePatrol.sqf index 70842f1..c2a6612 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnSurfacePatrol.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnSurfacePatrol.sqf @@ -1,8 +1,7 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- @@ -13,7 +12,7 @@ #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]; +//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]]; diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddSDVVehicle.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddSDVVehicle.sqf index 6023bc5..49581d0 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddSDVVehicle.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddSDVVehicle.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddScubaGroup.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddScubaGroup.sqf index 19000e9..3b73fdc 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddScubaGroup.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddScubaGroup.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 20167 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddSurfaceVehicle.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddSurfaceVehicle.sqf index e698d31..3150815 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddSurfaceVehicle.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_sm_AddSurfaceVehicle.sqf @@ -1,7 +1,6 @@ /* by Ghostrider [GRG] - for ghostridergaming - 12/5/17 + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf b/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf index 39bb10e..08390a9 100644 --- a/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf @@ -11,7 +11,7 @@ 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. _difficulty = "red"; // Skill level of AI (blue, red, green etc) -diag_log format["[blckeagls UMS missions] STARTED initializing dynamic mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; +//diag_log format["[blckeagls UMS missions] STARTED initializing dynamic mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; _crateLoot = blck_BoxLoot_Orange; // You can use a customized _crateLoot configuration by defining an array here. It must follow the following format shown for a hypothetical loot array called _customLootArray /* _customLootArray = @@ -68,7 +68,7 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her // 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] + //[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. @@ -101,7 +101,7 @@ _scubaGroupParameters = [ // These are surface patrols. _vehiclePatrolParameters = [ // ["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]], - ["B_T_Boat_Armed_01_minigun_F",[2,2,0],0] + ["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. @@ -140,8 +140,32 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Blue; // These are defined here because they are needed for any calls used to spawn non-scuba AI _uniforms = blck_SkinList; _headgear = blck_headgear; -_endCondition = "playerNear"; -diag_log "[blckeagls] initialized variables for dynamic UMS mission default.sqf"; -diag_log format["[blckeagls static missions] COMPLETED initializing mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; +_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". + // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. + // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. +_loadCratesTiming = "atMissionSpawn"; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + // Pertains only to crates spawned at mission spawn. + // This sets the default but can be overridden for specific missions by defining _loadCratesTiming + + // Examples: + // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" + // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" + // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. + // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. +_endCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + +_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults +_noChoppers = blck_noPatrolHelisBlue; +_missionHelis = blck_patrolHelisBlue; + +_chancePara = 0.9999990; // Setting this in the mission file overrides the defaults +_noPara = 3; // Setting this in the mission file overrides the defaults +_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. +_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. + +_chanceLoot = 0.999999990; +_paraLoot = blck_BoxLoot_Blue; +_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. + #include "\q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnDynamicUMSMission.sqf"; diff --git a/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf b/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf index 81ae730..9af21f0 100644 --- a/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf @@ -3,6 +3,16 @@ See the accompanying example mission in the exampleMission folder to get an idea how I laid this out. Note that I laid out the mission in EDEN editor, exported the mission using the exportAll function of M3EDEN editor. then copied, pasted and apporpriately edidet the specific categories of items to be spawned. */ +/* + 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/ +*/ private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"]; diff --git a/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf b/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf index 791c56c..a28a235 100644 --- a/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf @@ -3,9 +3,19 @@ See the accompanying example mission in the exampleMission folder to get an idea how I laid this out. Note that I laid out the mission in EDEN editor, exported the mission using the exportAll function of M3EDEN editor. then copied, pasted and apporpriately edidet the specific categories of items to be spawned. */ +/* + 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/ +*/ private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"]; + "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"]; _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. @@ -82,6 +92,7 @@ _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 = [ + // ["Weapon class name", position[xy,z], AI Difficulty [blue, red, green, orange], patrol radius [0 for static weapons], seconds to wait before respawning (set to 0 to disable respawns)] //["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] ]; @@ -98,7 +109,7 @@ _aiGroupParameters = [ ]; _aiScubaGroupParameters = [ - // [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/] + // [ [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)] //[[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",3, 75,900] @@ -106,22 +117,23 @@ _aiScubaGroupParameters = [ _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 = [ - //["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],"red",4, 75,60], - //["B_T_Boat_Armed_01_minigun_F",[22578.6,15273.3,-0.0354593],"red",3, 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] ]; //[ ["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,-1],"red",4, 75,0], - //["B_SDV_01_F",[22609.9,15299.8,-1],"red",3, 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",[22609.9,15299.8,-1],"red",3, 75,0] ]; _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 = [ - //["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",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)], + ["Exile_Chopper_Huey_Armed_Green",[22578.4,15273,50],"red",1000,0] //, //[selectRandom _aircraftTypes,_missionCenter,"green",1000,0] ]; diff --git a/@GMS/addons/custom_server/Missions/privateVars.sqf b/@GMS/addons/custom_server/Missions/privateVars.sqf new file mode 100644 index 0000000..f9e31b5 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/privateVars.sqf @@ -0,0 +1,6 @@ + +private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", + "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", + "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_chancePara","_noPara","_chanceHeliPatrol","_noChoppers","_missionHelis", + "__noChoppers","_endCondition","_chanceHeliLootDropped","_chanceLoot","_paraTriggerDistance","_paraLootCounts","_paraLoot","_markerColor","_loadCratesTiming", + "_markerType","_useMines","_assetKilledMsg","_enemyLeaderConfig","_hostageConfig"]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/init/blck_init_HC.sqf b/@GMS/addons/custom_server/init/blck_init_HC.sqf index 928a2ec..4a3cb10 100644 --- a/@GMS/addons/custom_server/init/blck_init_HC.sqf +++ b/@GMS/addons/custom_server/init/blck_init_HC.sqf @@ -46,6 +46,9 @@ blck_configsLoaded = nil; // Load any user-defined specifications or overrides call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf"; +#ifdef GRGserver +diag_log "[blckegls] Running DBD Clan Version"; +#endif #ifdef useDynamicSimulation diag_log "[blckegls] dynamic simulation manager enabled"; #else @@ -55,4 +58,4 @@ diag_log "[blckegls] blckegls simulation manager enabled"; //_marker setMarkerColor "ColorBlack"; //_marker setMarkerType "hd_flag"; diag_log format["[blckeagls] for HC version %1 Build %2 Loaded in %3 seconds",_blck_versionDate,_blck_version,diag_tickTime - _blck_loadingStartTime]; //,blck_modType]; -[] spawn blck_fnc_HCmonitor; \ No newline at end of file +[] spawn blck_fnc_HCmonitor; diff --git a/@GMS/addons/custom_server/init/blck_init_server.sqf b/@GMS/addons/custom_server/init/blck_init_server.sqf index cba9c23..d49cc5d 100644 --- a/@GMS/addons/custom_server/init/blck_init_server.sqf +++ b/@GMS/addons/custom_server/init/blck_init_server.sqf @@ -121,10 +121,13 @@ if (blck_enableBlueMissions > 0) then [_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue,blck_enableBlueMissions] call blck_fnc_addMissionToQue; }; + +blck_modType = call blck_fnc_getModType; +publicVariable "blck_modType"; // start the main thread for the mission system which monitors missions running and stuff to be cleaned up [] spawn blck_fnc_mainThread; [] execVM "\q\addons\custom_server\Missions\Static\GMS_StaticMissions_init.sqf"; [] execVM "q\addons\custom_server\Missions\UMS\GMS_UMS_init.sqf"; // loads functions and spawns any static missions. diag_log "blck_init_server: ->> Static and UMS systems initialized."; -diag_log "[blckeagls] Mission spawner started"; \ No newline at end of file +diag_log "[blckeagls] Mission spawner started"; diff --git a/@GMS/addons/custom_server/init/build.sqf b/@GMS/addons/custom_server/init/build.sqf index 0db7ca8..3ae65d7 100644 --- a/@GMS/addons/custom_server/init/build.sqf +++ b/@GMS/addons/custom_server/init/build.sqf @@ -1,6 +1,10 @@ private ["_version","_versionDate"]; -blck_version = "6.80 Build 118"; +blck_version = "6.82 Build 133"; _blck_version = blck_version; +<<<<<<< HEAD _blck_versionDate = "3-5-18 7:00 AM"; +======= +_blck_versionDate = "6-2-18 4:00 PM"; +>>>>>>> Experimental blck_pvs_version = _blck_version; publicVariable blck_pvs_version; diff --git a/FAQ.txt b/FAQ.txt index c0bcc80..051b88e 100644 --- a/FAQ.txt +++ b/FAQ.txt @@ -1,8 +1,8 @@ This addon includes several modules which will be discussed in the following order: 1. The core, dynamic mission system -2. A static mission system (WIP) +2. A static mission system 3. A custom time acceleration module -4. A module to execute scripts for custom bases and so forths. +4. A module to execute scripts for custom bases (map addons) and so forths. 5. A module to spawn loot crates in specific locations at server startup. 1. Core Mission System. @@ -11,7 +11,7 @@ The core mission system is configured to run 4 different classes of mission (Blu 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, + 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; @@ -19,19 +19,21 @@ General settings include: Number and type of static weapons; Number and type of armed vehicle patrols. Presence of AI helicopter patrols. - Whether such patrols drop AI reinforcements. - Whether vehicles are destroyed when AI are killed + Whether such patrols drop AI reinforcements with additional loot crates. + Whether vehicles are available to players when AI are killed or destroyed Whether static weapons are destroyed when AI are killed. Whether AI spawn with NVG or launchers and what types they spawn with. - Whether NVG or launchers are deleted. - Whether players are penalized for running over AI. + Whether NVG or launchers are deleted at the time the AI is killed. + Whether players are penalized for running over AI or shootting them with OP weapons. - Loot can also be configured for each mission class. You can modify the number of weapons, magazines, items, construction materials, etc. + Loot can also be configured for each mission class or mission. 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. + The equipment selected for each class of mission can also be specified(uniforms, vests, headgear, backpcks, weapons, pistols). 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). + When and how the loot crate(s) are spawned: at the time of mission spawn or upon mission completion; in the air or in the ground. + When loot is added to chests (at the time crates are spawned or upon mission completion) 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. @@ -39,15 +41,15 @@ The missions themselves are spawned from templates which can be used to define m 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 + number of AI groups and number of AI and, if desired their spawn locations. (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 + number, type, and spawn location(s) 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 + export the base as an .sqf using Maca's EDEN PLuging uing relative positions. 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 @@ -59,10 +61,16 @@ Hence, performance penalties should be modest to none until players engage a mis There is some performance penalty to having a lot of dead AI on the server, or a lot of spawned objects used for scenery at AI missions. Hence, these are deleted after a certain time. You can shorten the time after which bodies or scenery are deleted if you believe performance is an issue. -2. Static Mission System (WIP). +2. Static Mission System. Additional Modules Available: +Suport is provided for groups of AI, vehicles, aircraft, static weapons, subs, surface vessels. +The positions of these is defined by templates (see custom_server\Missions\Static\Missions folder for examples) or by calls to functions to add these elements. +The recommended way to place static units of various types is to add their spawn information to a new template then add the name/mod to custom_server\Missions\Static\GMS_StaticMissions_Lists.sqf. +Alternatively you can set up calls to the functions that initialize spawns for these units in blck_custom_configs.sqf or an include that is incorporated into it. +See the directions for creating static missions for more information. + 3. Time Acceleration This provides an optional ability to accelerate time by user-specified factors. @@ -96,7 +104,7 @@ One enhancement is that I have written the code so that you do not need to sort 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 spawned at precise locations with / without a nearby smoking wreck to mark their location (which crates an apocalyptic 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 from one server restart to the next. diff --git a/INSTALLATION.txt b/INSTALLATION.txt index 4bd4c0e..4022e37 100644 --- a/INSTALLATION.txt +++ b/INSTALLATION.txt @@ -5,50 +5,24 @@ Installation: 1) Unpack the Zip file you downloaded from the Github to a folder in a convenient location. 2) Unpack your mission pbo (epoch.Altis.pbo or Exile.Altis.pbo). 3) Open the folder containing the unpacked mission. -4) Copy the debug folder from MPMissions\epoch.Altis +4) Copy the debug folder from your download (MPMissions\epoch.Altis or MPMissions\exile.Altis) 5) Merge the line in MPMissions\epoch.Altis\init.sqf with your init.sqf, or use the one provided if you do not have one. 6) Adjust settings for messages shown by the client by changing values in \debug\blckclient.sqf to suit your needs. (see blckClient.sqf for details) 7) Repack your mission.pbo. /////////////////////////// -// For epoch only -7) To permit you to loot crypto from dead AI on Epoch, Open Epoch.\epoch_config\CfgObjectInteractions.hpp - - Change - - class Epoch_Female_F : Default - { - interactMode = 2; - }; - class Epoch_Male_F : Default - { - interactMode = 2; - }; - - To - - class Epoch_Female_F : Default - { - interactMode = 2; - }; - class Epoch_Male_F : Default - { - interactMode = 2; - }; - class I_Soldier_EPOCH : Default - { - interactMode = 2; - }; - - - Save your changes, repack your mission file. - You should now get an option to take crypto when you press spacebar after hovering over a dead AI body. - /////////////////////////// // Server // //////////////////////// +Method 1. +Adjust settings in @GMS\addons\custom_server\Configs to suit your needs. +Pack custom_server. +Add the @GMS folder to the root directory of your server (the same location as your mods such as @Epoch or @Exile +Add "@GMS;" to -servermods in the startup parameters for your server. + +Method 2. // Epoch 1) Add the custom_server folder from @epochhive\addons to @epochhive\addons on your server. @@ -68,6 +42,7 @@ http://www.exilemod.com/topic/9779-releasetool-bem-battleye-filter-manager-by-th http://www.exilemod.com/topic/9256-battleye-filter-tool/ http://www.exilemod.com/topic/9708-battleye-filter-editor/ +If you would let me know what exceptions you need to add I will start a list in this document. 11) Start your server and join. By default missions will start spawning in around 5-10 min. @@ -97,7 +72,7 @@ Be careful about what you change in this file. Just about anything about the missions can be modified. The mission template (see Missions\Orange\supply_camp.sqf and Missions\Blue\default.sqf for examples) allows you to define mission specific parameters. To create a new mission, make a copy of a mission template (e.g., custom_server\Blue\default.sqf). Edit the parameters to your liking and rename to file appropriately. -To add a new mission, create a new mission template, then add the file name (e.g., "newmissions.sqf") tothe mission list found in custom_server\Missions. +To add a new mission, create a new mission template, then add the file name (e.g., "newmissions.sqf") to the mission list found in custom_server\Missions. That mission will now be spawned whenever it is selected from teh list. Please see the FAQ for more information diff --git a/KnownIssues.txt b/KnownIssues.txt index 4394f2d..1d8d130 100644 --- a/KnownIssues.txt +++ b/KnownIssues.txt @@ -2,4 +2,4 @@ Known issues -1. AI Vehicles are not unlocked when an HC is connected. +1. AI Vehicles MAY not be unlocked when an HC is connected. diff --git a/MPMissions/Exile.Altis/debug/blckClient.sqf b/MPMissions/Exile.Altis/debug/blckClient.sqf index fa8540e..7668374 100644 --- a/MPMissions/Exile.Altis/debug/blckClient.sqf +++ b/MPMissions/Exile.Altis/debug/blckClient.sqf @@ -1,3 +1,4 @@ +<<<<<<< HEAD //////////////////////////////////////////// // Start Server-side functions and Create, Display Mission Messages for blckeagls mission system for Arma 3 Epoch // Last Updated 1/11/17 @@ -6,6 +7,130 @@ //blck_fnc_spawnMarker = compileFinal preprocessfilelinenumbers "debug\spawnMarker.sqf"; //blck_fnc_deleteMarker = compileFinal preprocessfilelinenumbers "debug\deleteMarker.sqf"; //blck_fnc_missionCompleteMarker = compileFinal preprocessfilelinenumbers "debug\missionCompleteMarker.sqf"; +======= + #define hideOnUse true + #define showWindow true + + GMS_fnc_nextAnimation = { + _hostage = _this; + _hostage switchMove ""; + //uisleep 0.1; + _animations = _hostage getVariable["GMSAnimations",[""]]; + diag_log format["_fnc_nextAnimation: _hostage = %1 and _animations = %2",_hostage,_animations]; + _hostage switchMove (selectRandom _animations); + }; + + GMS_EH_onAnimationDone = { + diag_log format["GMS_EH_onAnimationDone: _this = %1",_this]; + private _hostage = _this select 0; + if (alive _hostage) then + { + diag_log format["GMS_EH_onAnimationDone: _animations = %1",_hostage getVariable["GMSAnimations",[""]]]; + _hostage call GMS_fnc_nextAnimation; + } else { + _hostage removeAllEventHandlers "AnimDone"; + }; + }; + + GMS_fnc_freeHostage = { + diag_log format["fn_freeHostage: _this = %1",_this]; + private _hostage = _this select 0; + if (_hostage getVariable["blck_unguarded",0] isEqualTo 1) then + { + _hostage setVariable["blck_AIState",1,true]; + private _msg = "Thank you For freeing me. I must return home."; + systemChat _msg; + if (blck_modType isEqualTo "Epoch") then + { + [_msg,5] call Epoch_message; + }; + if (blck_modType isEqualTo "Exile") then + { + ["InfoTitleAndText", ["The Hostage Says", _msg]] call ExileClient_gui_toaster_addTemplateToast; + }; + } else { + private _msg = "I am afraid, please kill more of the enemy!"; + systemChat _msg; + if (blck_modType isEqualTo "Epoch") then + { + [_msg,5] call Epoch_message; + }; + if (blck_modType isEqualTo "Exile") then + { + ["InfoTitleAndText", ["The Hostage Says", _msg]] call ExileClient_gui_toaster_addTemplateToast; + }; + }; + //diag_log _msg; + }; + + GMS_fnc_addHostageActions = { + private _hostage = _this; + //private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage}]; //,[],1,showWindow,hideOnUse,(alive _hostage)]; + private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)]; + }; + + GMS_fnc_addAssetAnimations = { + private _asset = _this; + _asset addEventHandler ["AnimDone", {_this call GMS_EH_onAnimationDone}]; + _asset call GMS_fnc_nextAnimation; + diag_log format["_fnc_addAssetAnimations: Animation and event handler added for asset %1",_asset]; + }; + + GMS_fnc_initHostage = { + private _hostage = _this; + if (blck_modType isEqualTo "Epoch") then {_hostage call GMS_fnc_addHostageActions}; + _hostage call GMS_fnc_addAssetAnimations; + diag_log format["_fnc_initHostage: hostage %1 initialized",_hostage]; + }; + + GMS_fnc_arrestLeader = { + diag_log format["GMS_fnc_arrestLeader: _this = %1",_this]; + private _leader = _this select 0; + if (_leader getVariable["blck_unguarded",0] isEqualTo 1) then + { + _leader setVariable["blck_AIState",1,true]; + private _msg = "I surrender."; + systemChat _msg; + if (blck_modType isEqualTo "Epoch") then + { + [_msg,5] call Epoch_message; + }; + if (blck_modType isEqualTo "Exile") then + { + ["InfoTitleAndText", ["The Leader Says", _msg]] call ExileClient_gui_toaster_addTemplateToast; + }; + } else { + private _msg = "I will resist arrest until all of my men are down!"; + systemChat _msg; + if (blck_modType isEqualTo "Epoch") then + { + [_msg,5] call Epoch_message; + }; + if (blck_modType isEqualTo "Exile") then + { + ["InfoTitleAndText", ["The Leader Says", _msg]] call ExileClient_gui_toaster_addTemplateToast; + }; + }; + //_leader setVariable["blck_AIState",1,true]; + //private _msg = "_fnc_arrestLeader: "; + //systemChat _msg; + //hint _msg; + //diag_log _msg; + }; + + GMS_fnc_addLeaderActions = { + private _leader = _this; + private _handle = _leader addAction ["Under Arrest",{_this call GMS_fnc_arrestLeader},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)]; + }; + + GMS_fnc_initLeader = { + private _leader = _this; + if (blck_modType isEqualTo "Epoch") then {_leader call GMS_fnc_addLeaderActions}; + _leader call GMS_fnc_addAssetAnimations; + diag_log format["_fnc_initLeader: Leader %1 initialized",_leader]; + }; + +>>>>>>> Experimental if !(isServer) then { //diag_log "[blckeagls] initializing client variables"; @@ -50,6 +175,52 @@ if !(isServer) then [parseText _msg2,[0.0823437 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0812109 * safezoneW,0.253 * safezoneH], nil, 7, 0.3, 0] spawn BIS_fnc_textTiles; }; + fn_dynamicWarning = { + private["_text","_screentime","_xcoord","_ycoord"]; + params["_mission","_message"]; + + waitUntil {blck_processingMsg < 0}; + blck_processingMsg = 1; + _screentime = 7; + _text = format[ + "%1

+ %2
", + _mission,_message + ]; + _ycoord = [safezoneY + safezoneH - 0.8,0.7]; + _xcoord = [safezoneX + safezoneW - 0.5,0.35]; + [_text,_xcoord,_ycoord,_screentime,0.5] spawn BIS_fnc_dynamicText; + uiSleep 3; // 3 second delay before the next message + blck_processingMsg = -1; + }; + fn_missionWarning = { + params["_event","_message","_mission"]; + + if (blck_useSystemChat) then {systemChat format["%1",_message];}; + if (blck_useHint) then { + hint parseText format[ + "%1
+ ______________

+ %2
+ ______________

+ Any loot you find is yours as payment for eliminating the threat!",_mission,_message + ]; + }; + if (blck_useDynamic) then { + [_mission,_message] call fn_dynamicWarning; + }; + if (blck_useTitleText) then { + [_message] spawn { + params["_msg"]; + titleText [_msg, "PLAIN DOWN",5];uiSleep 5; titleText ["", "PLAIN DOWN",5] + }; + }; + if (blck_useToast) then + { + ["InfoTitleAndText", [_mission, _message]] call ExileClient_gui_toaster_addTemplateToast; + }; + //diag_log format["_fn_missionNotification ====] Paremeters _event %1 _message %2 _mission %3",_event,_message,_mission]; + }; fn_dynamicNotification = { private["_text","_screentime","_xcoord","_ycoord"]; params["_mission","_message"]; @@ -168,22 +339,13 @@ if !(isServer) then { [_message select 0, _message select 1, _message select 2] call fn_killScoreNotification; }; + case "warning": + { + [_event,_message,_mission] spawn fn_missionWarning; + }; }; }; - - diag_log "blck client loaded ver 1/11/17 2.0 8 PM"; - - diag_log "[blckeagls] starting client loop"; - - while {true} do - { - waitUntil {!(blck_message isEqualTo "")}; - diag_log format["[blckClient] blck_Message = %1", blck_message]; - private["_message"]; - _message = blck_message; - _message spawn fn_handleMessage; - blck_Message = ""; - }; + diag_log "blck client loaded ver 4/2/18 for Version 6.81 8 PM"; }; \ No newline at end of file diff --git a/MPMissions/epoch.Altis/debug/blckClient.sqf b/MPMissions/epoch.Altis/debug/blckClient.sqf index fa8540e..7668374 100644 --- a/MPMissions/epoch.Altis/debug/blckClient.sqf +++ b/MPMissions/epoch.Altis/debug/blckClient.sqf @@ -1,3 +1,4 @@ +<<<<<<< HEAD //////////////////////////////////////////// // Start Server-side functions and Create, Display Mission Messages for blckeagls mission system for Arma 3 Epoch // Last Updated 1/11/17 @@ -6,6 +7,130 @@ //blck_fnc_spawnMarker = compileFinal preprocessfilelinenumbers "debug\spawnMarker.sqf"; //blck_fnc_deleteMarker = compileFinal preprocessfilelinenumbers "debug\deleteMarker.sqf"; //blck_fnc_missionCompleteMarker = compileFinal preprocessfilelinenumbers "debug\missionCompleteMarker.sqf"; +======= + #define hideOnUse true + #define showWindow true + + GMS_fnc_nextAnimation = { + _hostage = _this; + _hostage switchMove ""; + //uisleep 0.1; + _animations = _hostage getVariable["GMSAnimations",[""]]; + diag_log format["_fnc_nextAnimation: _hostage = %1 and _animations = %2",_hostage,_animations]; + _hostage switchMove (selectRandom _animations); + }; + + GMS_EH_onAnimationDone = { + diag_log format["GMS_EH_onAnimationDone: _this = %1",_this]; + private _hostage = _this select 0; + if (alive _hostage) then + { + diag_log format["GMS_EH_onAnimationDone: _animations = %1",_hostage getVariable["GMSAnimations",[""]]]; + _hostage call GMS_fnc_nextAnimation; + } else { + _hostage removeAllEventHandlers "AnimDone"; + }; + }; + + GMS_fnc_freeHostage = { + diag_log format["fn_freeHostage: _this = %1",_this]; + private _hostage = _this select 0; + if (_hostage getVariable["blck_unguarded",0] isEqualTo 1) then + { + _hostage setVariable["blck_AIState",1,true]; + private _msg = "Thank you For freeing me. I must return home."; + systemChat _msg; + if (blck_modType isEqualTo "Epoch") then + { + [_msg,5] call Epoch_message; + }; + if (blck_modType isEqualTo "Exile") then + { + ["InfoTitleAndText", ["The Hostage Says", _msg]] call ExileClient_gui_toaster_addTemplateToast; + }; + } else { + private _msg = "I am afraid, please kill more of the enemy!"; + systemChat _msg; + if (blck_modType isEqualTo "Epoch") then + { + [_msg,5] call Epoch_message; + }; + if (blck_modType isEqualTo "Exile") then + { + ["InfoTitleAndText", ["The Hostage Says", _msg]] call ExileClient_gui_toaster_addTemplateToast; + }; + }; + //diag_log _msg; + }; + + GMS_fnc_addHostageActions = { + private _hostage = _this; + //private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage}]; //,[],1,showWindow,hideOnUse,(alive _hostage)]; + private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)]; + }; + + GMS_fnc_addAssetAnimations = { + private _asset = _this; + _asset addEventHandler ["AnimDone", {_this call GMS_EH_onAnimationDone}]; + _asset call GMS_fnc_nextAnimation; + diag_log format["_fnc_addAssetAnimations: Animation and event handler added for asset %1",_asset]; + }; + + GMS_fnc_initHostage = { + private _hostage = _this; + if (blck_modType isEqualTo "Epoch") then {_hostage call GMS_fnc_addHostageActions}; + _hostage call GMS_fnc_addAssetAnimations; + diag_log format["_fnc_initHostage: hostage %1 initialized",_hostage]; + }; + + GMS_fnc_arrestLeader = { + diag_log format["GMS_fnc_arrestLeader: _this = %1",_this]; + private _leader = _this select 0; + if (_leader getVariable["blck_unguarded",0] isEqualTo 1) then + { + _leader setVariable["blck_AIState",1,true]; + private _msg = "I surrender."; + systemChat _msg; + if (blck_modType isEqualTo "Epoch") then + { + [_msg,5] call Epoch_message; + }; + if (blck_modType isEqualTo "Exile") then + { + ["InfoTitleAndText", ["The Leader Says", _msg]] call ExileClient_gui_toaster_addTemplateToast; + }; + } else { + private _msg = "I will resist arrest until all of my men are down!"; + systemChat _msg; + if (blck_modType isEqualTo "Epoch") then + { + [_msg,5] call Epoch_message; + }; + if (blck_modType isEqualTo "Exile") then + { + ["InfoTitleAndText", ["The Leader Says", _msg]] call ExileClient_gui_toaster_addTemplateToast; + }; + }; + //_leader setVariable["blck_AIState",1,true]; + //private _msg = "_fnc_arrestLeader: "; + //systemChat _msg; + //hint _msg; + //diag_log _msg; + }; + + GMS_fnc_addLeaderActions = { + private _leader = _this; + private _handle = _leader addAction ["Under Arrest",{_this call GMS_fnc_arrestLeader},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)]; + }; + + GMS_fnc_initLeader = { + private _leader = _this; + if (blck_modType isEqualTo "Epoch") then {_leader call GMS_fnc_addLeaderActions}; + _leader call GMS_fnc_addAssetAnimations; + diag_log format["_fnc_initLeader: Leader %1 initialized",_leader]; + }; + +>>>>>>> Experimental if !(isServer) then { //diag_log "[blckeagls] initializing client variables"; @@ -50,6 +175,52 @@ if !(isServer) then [parseText _msg2,[0.0823437 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0812109 * safezoneW,0.253 * safezoneH], nil, 7, 0.3, 0] spawn BIS_fnc_textTiles; }; + fn_dynamicWarning = { + private["_text","_screentime","_xcoord","_ycoord"]; + params["_mission","_message"]; + + waitUntil {blck_processingMsg < 0}; + blck_processingMsg = 1; + _screentime = 7; + _text = format[ + "%1

+ %2
", + _mission,_message + ]; + _ycoord = [safezoneY + safezoneH - 0.8,0.7]; + _xcoord = [safezoneX + safezoneW - 0.5,0.35]; + [_text,_xcoord,_ycoord,_screentime,0.5] spawn BIS_fnc_dynamicText; + uiSleep 3; // 3 second delay before the next message + blck_processingMsg = -1; + }; + fn_missionWarning = { + params["_event","_message","_mission"]; + + if (blck_useSystemChat) then {systemChat format["%1",_message];}; + if (blck_useHint) then { + hint parseText format[ + "%1
+ ______________

+ %2
+ ______________

+ Any loot you find is yours as payment for eliminating the threat!",_mission,_message + ]; + }; + if (blck_useDynamic) then { + [_mission,_message] call fn_dynamicWarning; + }; + if (blck_useTitleText) then { + [_message] spawn { + params["_msg"]; + titleText [_msg, "PLAIN DOWN",5];uiSleep 5; titleText ["", "PLAIN DOWN",5] + }; + }; + if (blck_useToast) then + { + ["InfoTitleAndText", [_mission, _message]] call ExileClient_gui_toaster_addTemplateToast; + }; + //diag_log format["_fn_missionNotification ====] Paremeters _event %1 _message %2 _mission %3",_event,_message,_mission]; + }; fn_dynamicNotification = { private["_text","_screentime","_xcoord","_ycoord"]; params["_mission","_message"]; @@ -168,22 +339,13 @@ if !(isServer) then { [_message select 0, _message select 1, _message select 2] call fn_killScoreNotification; }; + case "warning": + { + [_event,_message,_mission] spawn fn_missionWarning; + }; }; }; - - diag_log "blck client loaded ver 1/11/17 2.0 8 PM"; - - diag_log "[blckeagls] starting client loop"; - - while {true} do - { - waitUntil {!(blck_message isEqualTo "")}; - diag_log format["[blckClient] blck_Message = %1", blck_message]; - private["_message"]; - _message = blck_message; - _message spawn fn_handleMessage; - blck_Message = ""; - }; + diag_log "blck client loaded ver 4/2/18 for Version 6.81 8 PM"; }; \ No newline at end of file diff --git a/StaticMissions-HowTo.txt b/StaticMissions-HowTo.txt index 0b1df3c..2a15c85 100644 --- a/StaticMissions-HowTo.txt +++ b/StaticMissions-HowTo.txt @@ -8,7 +8,10 @@ I have provided one example editor mission (staticMissionExamples.Altis) which I have used to configure a static mission ( ). My approach to doing this as follows: -1) Start Arma with the following mods: @epoch;@exile;@m3eden editor. +1) Start Arma with the following mods: + @epoch;@exile;@m3eden editor. + (adjust to meet your specific needs; obviously any additional mods such as those from CUP can be included). + 2) Start the Eden Editor. 3) Lay out your static mission. You should: place a marker indicating where it will spawn (save your work) @@ -29,9 +32,15 @@ My approach to doing this as follows: Set the mission center to the position of your marker. Carefully copy the data for your structures into the appropriate array. Do the same for all other objects, vehicles, loot vehicles and so forth. - Note that for some things you will have to do a little editing to add or remove things from the data output by the editor. + Note that you will need to edit the fields for AI, vehicle patrols etc to ensure that all require information is present. Once you have done this, add the file to the custom_server\Missions\Static\missions directory then add an entry for your static mission to GMS_StaticMissionLists.sqf -in order to specify additional options. Use the information provided in the example static missions to guide you. \ No newline at end of file +in order to specify additional options. Use the information provided in the example static missions to guide you. + +OPTIONAL + +Directly call functions to add units, vehicle patrols, air patrols etc. + +More to come on this. \ No newline at end of file diff --git a/changeLog.sqf b/changeLog.sqf index 55fb415..3978d85 100644 --- a/changeLog.sqf +++ b/changeLog.sqf @@ -9,6 +9,7 @@ Ideas or code from that by Vampire and KiloSwiss have been used for certain func Significant Changes: ===================== <<<<<<< HEAD +<<<<<<< HEAD Version 1.80 Build 117 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. @@ -18,14 +19,126 @@ Changed: Default missions reworked to support the above. ======= Version 1.80 build 118 Added: The server now sets simulation on/off and damage on/off for objects at dynamic missions. default missions updated. +======= +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. +>>>>>>> Experimental 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 certain ingame bases, players and towns when they spawn. These were previously embedded in the code but not configurable. +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. -Fixed: Alive AI counts were not disabled by blck_showCountAliveAI. -Fixed: The number of dynamically spawned underwater missions was not correctly set by blck_numberUnderwaterDynamicMissions. +<<<<<<< HEAD +>>>>>>> Experimental +======= +Changed: Default missions reworked to support the above. + >>>>>>> Experimental Version 1.79, Build 116 Added: Map-specific information for Lythium. @@ -394,7 +507,7 @@ Inactivated a call to an exile function that had no value 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_missionTimout = -1 to disble; +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