diff --git a/Server/@GMS/addons/custom_server/$PBOPREFIX$ b/Server/@GMS/addons/custom_server/$PBOPREFIX$ new file mode 100644 index 0000000..f1604b0 --- /dev/null +++ b/Server/@GMS/addons/custom_server/$PBOPREFIX$ @@ -0,0 +1 @@ +q\addons\custom_server \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/$PREFIX$ b/Server/@GMS/addons/custom_server/$PREFIX$ new file mode 100644 index 0000000..f1604b0 --- /dev/null +++ b/Server/@GMS/addons/custom_server/$PREFIX$ @@ -0,0 +1 @@ +q\addons\custom_server \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/.vscode/ipch/6d9c138c9efd720f/mmap_address.bin b/Server/@GMS/addons/custom_server/.vscode/ipch/6d9c138c9efd720f/mmap_address.bin new file mode 100644 index 0000000..862b842 Binary files /dev/null and b/Server/@GMS/addons/custom_server/.vscode/ipch/6d9c138c9efd720f/mmap_address.bin differ diff --git a/Server/@GMS/addons/custom_server/Changelog 6.90.txt b/Server/@GMS/addons/custom_server/Changelog 6.90.txt new file mode 100644 index 0000000..a40b99c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Changelog 6.90.txt @@ -0,0 +1,28 @@ +1. Added new settings to specify the number of crew per vehhicle to blck_config.sqf and blck_config_mil.sqf + + // global settings for this parameters + // Determine the number of crew plus driver per vehicle; excess crew are ignored. + // This can be a value or array of [_min, _max]; + blck_vehCrew_blue = 3; + blck_vehCrew_red = 3; + blck_vehCrew_green = 3; + blck_vehCrew_orange = 3; + + You can also define this value in missions by adding the following variable definition to the mission template: + + _vehicleCrewCount = [3,6]; // min/max number of AI to load including driver. see the missions\blue\template.sqf and blck_configs.sqf for more info. + +2. Lists of items to be excluded from dynamically generated loadouts has been moved to: + blck_config.sqf + blck_config_mil.sqf + +3. Added a new setting that specifies whether logging of blacklisted items is done (handy for debugging) + blck_logBlacklistedItems = true; // set to false to disable logging + +4. Hit and Killed event handlers extensively reworked. Methods for notification of nearby AI and Vehicles of the killers whereabouts were revised to be more inclusive of neighboring AI. + +5. Issues with AIHit events fixed; AI now deploy smoke and heal. + +6. Removed some unnecessary logging. + +7. Other minor coding fixes and optimizations. \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findShoreLocation.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findShoreLocation.sqf new file mode 100644 index 0000000..1297ea8 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findShoreLocation.sqf @@ -0,0 +1,71 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_mapCenter","_waterPos","_priorUMSpositions"]; + +switch (toLower worldName) do +{ + case "altis": {_mapCenter = [15000,19000,0];_maxDistance = 20000}; + case "tanoa": {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 10000}; + case "malden": {_mapCenter = [6000,7000,0];_maxDistance = 5500}; + case "namalsk": {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 5000}; + case "taviana": {_mapCenter = [12000,12000,0];_maxDistance = 12000}; + case "napf" : {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 12000}; + case "lythium": {_mapCenter = [10000,10000,0]; _maxDistance = 6000;}; + default {_mapCenter = [6000,6000,0]; _maxDistance = 6000;}; +}; + +_evaluate = true; + while {_evaluate} do +{ + _waterPos = [ + _mapCenter, // center of search area + 2, // min distance to search + 20000, // max distance to search + 0, // distance to nearest object + 2, // water mode [2 = water only] + 25, // max gradient + 0 // shoreMode [0 = anywhere] + ] call BIS_fnc_findSafePos; + /* + _priorUMSpositions = +blck_priorDynamicUMS_Missions; + { + if (diag_tickTime > ((_x select 1) + 1800) then + { + blck_priorDynamicUMS_Missions = blck_priorDynamicUMS_Missions - _x; + } else { + if (_waterPos distance2D (_x select 0) < 2000) exitWith {_evaluate = false}; + }; + } forEach _priorUMSpositions; + */ + if (_evaluate) then + { + if (abs(getTerrainHeightASL _waterPos) < 30) then + { + if (abs(getTerrainHeightASL _waterPos) > 1) then + { + //_waterMarker = createMarker [format["water mission %1",getTerrainHeightASL _waterPos],_waterPos]; + //_waterMarker setMarkerColor "ColorRed"; + //_waterMarker setMarkerType "mil_triangle"; + //_waterMarker setMarkerText format["Depth %1",getTerrainHeightASL _waterPos]; + _evaluate = false; + }; + }; + }; +}; +_waterPos + + + + + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findWaterDepth.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findWaterDepth.sqf new file mode 100644 index 0000000..c5e0d0c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findWaterDepth.sqf @@ -0,0 +1,23 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_depth"]; +params["_pos"]; +_depth = (getTerrainHeightASL _pos); +//diag_log format["_fnc_findWaterDepth: _depth = %1",_depth]; +_depth + + + + + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf new file mode 100644 index 0000000..48c13ac --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf @@ -0,0 +1,23 @@ +//This script sends Message Information to allplayers +/* + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +if !(isServer) exitWith {}; +params["_msg",["_players",allplayers]]; +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["AIM.sqf ===] _this = %1 | _msg = %2 | _players = %3",_this,_msg, _players];}; +#endif +{ + if (isPlayer _x) then {_msg remoteExec["fn_handleMessage",(owner _x)]}; +} forEach _players; + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_GroupsOnAISide.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_GroupsOnAISide.sqf new file mode 100644 index 0000000..e34a389 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_GroupsOnAISide.sqf @@ -0,0 +1,23 @@ +/* + Determines the total number of spawned groups on the side used by the mission system and returns this value. + + 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 _groups_AI_Side = 0; + +{ + //if ( (side _x) isEqualTo blck_AI_Side) then {_Groups_AI_Side = _Groups_AI_Side + 1;}; + _groups_AI_Side = {(side _x) isEqualTo blck_AI_side} count allGroups; +}forEach allGroups; +//diag_log format["_fnc_groupsOnAISide:: -- >> allGroups = %1 | _Groups_AI_Side = %2",allGroups, _Groups_AI_Side]; + +_groups_AI_Side diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addItemToCrate.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addItemToCrate.sqf new file mode 100644 index 0000000..2ed4f00 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addItemToCrate.sqf @@ -0,0 +1,67 @@ +/* + [_item,_crate] call blck_addItemToCrate; + where + _crate is a container such as ammo box or vehicle + _item is a string or array. + If _item is a string then add 1 of that item to the container. + If _item is an array with 2 elements ["itemName",3] then assume that the first element is a string and is the name of the item, and the second is the number to add. + if _item is an array with 3 elements ["itemName",2,6] assume that the first element is the item name (string), the second the min # to add and the third the max # to add. + + + By Ghostrider [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["_itemInfo","_crate",["_addAmmo",0]]; + private["_isRifle","_isMagazine","_isBackpack"]; + _isWeapon = false; + _isMagazine = false; + _isBackpack = false; + _quant = 0; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["blck_addItemToCrate:: -- >> itemInfo = %1 | _crate %2 | _addAmmo %3",_itemInfo, _crate, _addAmmo]; + }; + #endif + if (typeName _itemInfo isEqualTo "STRING") then {_item = _itemInfo; _quant = 1}; // case where only the item descriptor was provided + if (typeName _itemInfo isEqualTo "ARRAY") then { + + if (count _itemInfo isEqualTo 2) then {_item = _itemInfo select 0; _quant = _itemInfo select 1;}; // case where item descriptor and quantity were provided + if (count _itemInfo isEqualto 3) then { + _item = _itemInfo select 0; + _quant = (_itemInfo select 1) + round(random((_itemInfo select 2) - (_itemInfo select 1))); + }; // case where item descriptor, min number and max number were provided. + }; + if (((typeName _item) isEqualTo "STRING") && (_item != "")) then + { + if (isClass(configFile >> "CfgWeapons" >> _item)) then { + _crate addWeaponCargoGlobal [_item,_quant]; + _isWeapon = true; + _count = 0; + if (typeName _addAmmo isEqualTo "SCALAR") then + { + _count = _addAmmo; + }; + if (typeName _addAmmo isEqualto "ARRAY") then + { + _count = (_addAmmo select 0) + (round(random((_addAmmo select 1) - (_addAmmo select 0)))); + }; + _ammo = getArray (configFile >> "CfgWeapons" >> _item >> "magazines"); + for "_i" from 1 to _count do + { + _crate addMagazineCargoGlobal [selectRandom _ammo,1]; + }; + }; + if (_item isKindOf ["Bag_Base", configFile >> "CfgVehicles"]) then {_crate addBackpackCargoGlobal [_item,_quant]; _isBackpack = true;}; + if (isClass(configFile >> "CfgMagazines" >> _item)) then {_crate addMagazineCargoGlobal [_item,_quant]; _isMagazine = true;}; + if (!_isWeapon && !_isMagazine && _isBackpack && isClass(configFile >> "CfgVehicles" >> _item)) then {_crate addItemCargoGlobal [_item,_quant]}; + }; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf new file mode 100644 index 0000000..4123b05 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf @@ -0,0 +1,47 @@ +/* + 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"]; + + +#ifdef blck_debugMode +{ + diag_log format["_fnc_addMoneyToOject: _this select %1 = %2",_foreachindex, _this select _foreachindex]; +}forEach _this; +#endif +if (blck_modType 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 + + //#endif + }; + //diag_log format["_fnc_addMoneyToOject: ExileMoney set to %1", _obj getVariable "ExileMoney"]; +}; + +if (blck_modType 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];}; + }; + //diag_log format["_fnc_addMoneyToOject: Crypto set to %1", _obj getVariable "Crypto"]; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_ai_offloadToClients.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_ai_offloadToClients.sqf new file mode 100644 index 0000000..3a511be --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_ai_offloadToClients.sqf @@ -0,0 +1,71 @@ +/* + blck_fnc_ai_offloadToClients + Addapted for blckeagls from: + DMS_fnc_AILocalityManager + Created by Defent and eraser1 + https://github.com/Defent/DMS_Exile/wiki/DMS_fnc_AILocalityManager + Offloads AI groups to a nearby client in order to improve server performance. +*/ +private ["_groups"]; +if (isNil "blck_ai_offload_to_client") exitWith {blck_ai_offload_to_client = false}; +if (!blck_ai_offload_to_client) exitWith {}; +if (blck_limit_ai_offload_to_blckeagls) then {_groups = blck_monitoredMissionAIGroups} else {_groups = allGroups}; + +#ifdef blck_debugMode +diag_log format[ + "_fnc_ai_offloadToClients: blck_ai_offload_to_client = %1 | blck_limit_ai_offload_to_blckeagls = %2 | count blck_monitoredMissionAIGroups = %3", + blck_ai_offload_to_client, + blck_limit_ai_offload_to_blckeagls, + count _groups + ]; +#endif + +{ + //diag_log format["_fnc_ai_offloadToClients(26): _x = %1 | units _x = %2 | blck_lockLocality = %3",_x, units _x, _x getVariable["blck_LockLocality",false]]; + if (((count (units _x))>1) && {!(_x getVariable ["blck_LockLocality",false])}) then + { + private _leader = leader _x; + private _group = _x; + //diag_log format["_fnc_ai_offloadToClients(31): evaluating group _x = %1 | leader _x = %2 | blck_lockLocality = %3",_x, leader _x, _x getVariable["blck_LockLocality",false]]; + if !(isPlayer _leader) then + { + // Ignore Exile flyovers. + //if (((side _group) isEqualTo independent) && {(count (units _group)) isEqualTo 1}) exitWith {}; + #ifdef blck_debugMode + if (blck_debugOn) then + { + (format ["AILocalityManager :: Finding owner for group: %1",_group]) call blck_fnc_DebugLog; + }; + #endif + //diag_log format["_fnc_ai_offloadToClients(42): _x =%1 with owner = %2 is not a player's group so look for a home for it if still on the server",_x, groupOwner _x]; + private _groupOwner = groupOwner _group; + private _ownerObj = objNull; + private _isLocal = local _group; + + if !(_isLocal) then // Only check for the group owner in players if it doesn't belong to the server. + { + { + if (_groupOwner isEqualTo (owner _x)) exitWith + { + _ownerObj = _x; + }; + } forEach allPlayers; + }; + //diag_log format["_fnc_ai_offloadToClients(56): _group = %1 | _groupOwner = %2 | _ownerObj = %3 | _isLocal = %4",_group,_groupOwner,_ownerObj,_isLocal]; + // If the owner doesn't exist or is too far away... Attempt to set a new player owner, and if none are found... and if the group doesn't belong to the server... + if (((isNull _ownerObj) || {(_ownerObj distance2D _leader)>3500}) && {!([_group,_leader] call blck_fnc_SetAILocality)} && {!_isLocal}) then + { + // Reset locality to the server + //diag_log format["_fnc_ai_offloadToClients: setting locality of group %1 to server",_group]; + _group setGroupOwner 2; + + #ifdef blck_debugMode + if (blck_debugOn) then + { + (format ["AILocalityManager :: Current owner of group %1 is too far away and no other viable owner found; resetting ownership to the server.",_group]) call DMS_fnc_DebugLog; + }; + #endif + }; + }; + }; +} forEach _groups; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf new file mode 100644 index 0000000..cc8b1eb --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf @@ -0,0 +1,16 @@ +/* + + 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 _result = allPlayers; +_result diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_broadcastServerFPS.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_broadcastServerFPS.sqf new file mode 100644 index 0000000..6d13fae --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_broadcastServerFPS.sqf @@ -0,0 +1,19 @@ + + +/* + 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"; + +blck_serverFPS = diag_FPS; +publicVariable "blck_serverFPS"; + + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanEmptyGroups.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanEmptyGroups.sqf new file mode 100644 index 0000000..2d1ac68 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanEmptyGroups.sqf @@ -0,0 +1,20 @@ +/* + call as [] call blck_fnc_cleanEmptyGroups; + Deletes any empty groups and thereby prevents errors resulting from createGroup returning nullGroup. + + 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 _grp = +allGroups; +{ + if ((count units _x) isEqualTo 0) then {deleteGroup _x}; +}forEach _grp; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanupTemporaryMarkers.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanupTemporaryMarkers.sqf new file mode 100644 index 0000000..8c06c72 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanupTemporaryMarkers.sqf @@ -0,0 +1,24 @@ +/* + 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/ +*/ +for "_i" from 1 to (count blck_temporaryMarkers) do +{ + if (_i > (count blck_temporaryMarkers)) exitWith {}; + private _m = blck_temporaryMarkers deleteAt 0; + _m params["_marker","_deleteAt"]; + //diag_log format["_cleanupTemporaryMarkers: _marker = %1 | _deleteAt = %2",_marker, _deleteAt]; + if (diag_tickTime > _deleteAt) then + { + deleteMarker _marker; + } else { + blck_temporaryMarkers pushBack _m; + //diag_log format["_cleanupTemporaryMarkers: wait longer before deleting _marker = %1 | _deleteAt = %2",_marker, _deleteAt]; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_countAliveAI.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_countAliveAI.sqf new file mode 100644 index 0000000..36c9e68 --- /dev/null +++ b/Server/@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]}; +}; + +_return + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_deleteMarker.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_deleteMarker.sqf new file mode 100644 index 0000000..6e31019 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_deleteMarker.sqf @@ -0,0 +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/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_markerName"]; +deleteMarker _markerName; +deleteMarker ("label" + _markerName); + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf new file mode 100644 index 0000000..e62ea23 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf @@ -0,0 +1,20 @@ + +/* + Remove all inventory from an object. + + 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["_veh"]; +clearWeaponCargoGlobal _veh; +clearMagazineCargoGlobal _veh; +clearBackpackCargoGlobal _veh; +clearItemCargoGlobal _veh; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findPositionsAlongARadius.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findPositionsAlongARadius.sqf new file mode 100644 index 0000000..4b2b3b3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findPositionsAlongARadius.sqf @@ -0,0 +1,34 @@ +/* + Generates an array of equidistant positions along the circle of diameter _radius + 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"; + +private["_locs","_startDir","_currentDir","_Arc","_dist","_newpos"]; +params["_center","_num","_minDistance","_maxDistance"]; + +_locs = []; +_startDir = round(random(360)); +_currentDir = _startDir; +_Arc = 360/_num; + +for "_i" from 1 to _num do +{ + _currentDir = _currentDir + _Arc; + _dist = round(_minDistance + (random(_maxDistance - _minDistance))); + _newpos = _center getPos [_dist, _currentDir]; + _locs pushback _newpos; +}; + +_locs + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findRandomLocationWithinCircle.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findRandomLocationWithinCircle.sqf new file mode 100644 index 0000000..477e5ea --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findRandomLocationWithinCircle.sqf @@ -0,0 +1,15 @@ +/* + blck_fnc_findRandomLocationWithinCircle + Params["_center","_min","_max"]; + _center = center of the circle + _min = minimum distance from center of the position + _max = radius of the circle + private _pos + Return: _pos, the position generated +*/ + +params["_center","_min","_max"]; +private _vector = random(359); +private _radius = _min + (_min + random(_max - _min)); +private _pos = _center getPos[_radius,_vector]; +_pos \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf new file mode 100644 index 0000000..7d75384 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf @@ -0,0 +1,135 @@ +// self explanatory. Checks to see if the position is in either a black listed location or near a player spawn. +// As written this relies on BIS_fnc_findSafePos to ensure that the spawn point is not on water or an excessively steep slope. +// +/* + 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"; + +private["_findNew","_tries","_coords","_dist","_xpos","_ypos","_newPos","_townPos","_pole"]; +private["_minDistFromBases","_minDistFromMission","_minDistanceFromTowns","_minSistanceFromPlayers","_weightBlckList","_weightBases","_weightMissions","_weightTowns","_weightPlayers"]; +_findNew = true; +_tries = 0; + +_minDistFromBases = blck_minDistanceToBases; +_minDistFromMission = blck_MinDistanceFromMission; +_minDistanceFromTowns = blck_minDistanceFromTowns; +_minSistanceFromPlayers = blck_minDistanceToPlayer; +_weightBlckList = 0.95; +_weightBases = 0.9; +_weightMissions = 0.8; +_weightTowns = 0.7; +_weightPlayers = 0.6; +if (blck_modType isEqualTo "Epoch") then {_pole = "PlotPole_EPOCH"}; +if (blck_modType isEqualTo "Exile") then {_pole = "Exile_Construction_Flag_Static"}; +_recentMissionCoords = +blck_recentMissionCoords; +{ + 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. + { + blck_recentMissionCoords deleteAt (blck_recentMissionCoords find _x); + }; +}forEach _recentMissionCoords; + +while {_findNew} do +{ + _findNew = false; + _coords = [blck_mapCenter,0,blck_mapRange,30,0,5,0] call BIS_fnc_findSafePos; + //diag_log format["_fnc_findSafePosn: _coords = %1 | _tries = %2",_coords,_tries]; + { + if ( ((_x select 0) distance2D _coords) < (_x select 1)) exitWith + { + _findNew = true; + }; + } forEach blck_locationBlackList; + if !(_findNew) then + { + { + if ((_x distance2D _coords) < _minDistFromMission) then { + _findNew = true; + }; + }forEach blck_heliCrashSites; + }; + if !(_findNew) then + { + { + if ( (_x distance2D _coords) < _minDistFromMission) exitWith + { + _FindNew = true; + }; + } forEach blck_ActiveMissionCoords; + }; + if !(_findNew) then + { + { + if ((_x distance2D _coords) < blck_minDistanceToBases) then + { + _findNew = true; + }; + }forEach nearestObjects[blck_mapCenter, [_pole], blck_minDistanceToBases]; + }; + if !(_findNew) then + { + { + _townPos = [((locationPosition _x) select 0), ((locationPosition _x) select 1), 0]; + if (_townPos distance2D _coords < blck_minDistanceFromTowns) exitWith { + _findNew = true; + }; + } forEach blck_townLocations; + }; + if !(_findNew) then + { + { + if (isPlayer _x && (_x distance2D _coords) < blck_minDistanceToPlayer) then + { + _findNew = true; + }; + }forEach playableUnits; + }; + if !(_findNew) then + { + // 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; + }; + }; + }; + if (_findNew) then + { + if (_tries in [3,6,9,12,15,18,21]) then + { + _minDistFromMission = _minDistFromMission * _weightMissions; + _minDistFromBases = _minDistFromBases * _weightBases; + _minSistanceFromPlayers = _minSistanceFromPlayers * _minSistanceFromPlayers; + _minDistanceFromTowns = _minDistanceFromTowns * _weightTowns; + }; + if (_tries > 25) then + { + _findNew = false; + }; + }; +}; +if ((count _coords) > 2) then +{ + private["_temp"]; + _temp = [_coords select 0, _coords select 1]; + _coords = _temp; +}; +_coords; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findWorld.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findWorld.sqf new file mode 100644 index 0000000..e9844cc --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findWorld.sqf @@ -0,0 +1,77 @@ +/* + Determine the map name, set the map center and size, and return the map name. + Trader coordinates were pulled from the config.cfg + Inspired by the Vampire and DZMS + + 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/ +*/ + -------------------------- + 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["_blck_WorldName"]; + +_blck_WorldName = toLower format ["%1", worldName]; +_blck_worldSize = worldSize; + +diag_log format["[blckeagls] Loading Map-specific settings with worldName = %1",_blck_WorldName]; + +switch (_blck_WorldName) do +{// These may need some adjustment - including a test for shore or water should help as well to avoid missions spawning on water. + case "altis":{ + diag_log "[blckeagls] Altis-specific settings for Epoch loaded"; + blck_mapCenter = [6322,7801,0]; + blck_mapRange = 21000; + }; + case "stratis":{ + diag_log "[blckeagls] Stratis-specific settings loaded"; + blck_mapCenter = [6322,7801,0]; + blck_mapRange = 4500; + }; // Add Central, East and West respawns/traders + case "chernarus":{ + diag_log "[blckeagls] Chernarus-specific settings loaded"; + blck_mapCenter = [7100, 7750, 0]; //centerPosition = {7100, 7750, 300}; + blck_mapRange = 5300; + }; + case "chernarus_summer":{blck_mapCenter = [7100, 7750, 0]; blck_mapRange = 6000;}; + case "bornholm":{ + //diag_log "Bornholm-specific settings loaded"; + blck_mapCenter = [11240, 11292, 0]; + blck_mapRange = 14400; + }; + case "esseker":{ + diag_log "Esseker-specific settings loaded"; + blck_mapCenter = [6049.26,6239.63,0]; //centerPosition = {7100, 7750, 300}; + blck_mapRange = 6000; + }; + case "taviana":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14400;}; + case "namalsk":{blck_mapCenter = [4352, 7348, 0];blck_mapRange = 10000;}; + case "napf": {blck_mapCenter = [10240,10240,0]; blck_mapRange = 14000}; // {_centerPos = [10240, 10240, 0];_isMountainous = true;_maxHeight = 50;}; + case "australia": {blck_mapCenter = [20480,20480, 150];blck_mapRange = 40960;}; + case "panthera3":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; + case "isladuala":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; + case "sauerland":{blck_mapCenter = [12800, 12800, 0];blck_mapRange = 12800;}; + case "trinity":{blck_mapCenter = [6400, 6400, 0];blck_mapRange = 6400;}; + case "utes":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;}; + case "zargabad":{blck_mapCenter = [4096, 4096, 0];blck_mapRange = 4096;}; + case "fallujah":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;}; + case "tavi":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14090;}; + case "lingor":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; + case "takistan":{blck_mapCenter = [5500, 6500, 0];blck_mapRange = 5000;}; + case "lythium":{blck_mapCenter = [10000,10000,0];blck_mapRange = 8500;}; + default {_blck_WorldName = "default";blck_mapCenter = [6322,7801,0]; blck_mapRange = 6000}; +}; + +blck_worldSet = true; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getModType.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getModType.sqf new file mode 100644 index 0000000..a78bfc3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getModType.sqf @@ -0,0 +1,19 @@ +/* + Based on code by IT07 written for VEMF_r + -------------------------- + 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 "_mod"; + +_mod = ""; + +if not ( isNull ( configFile >> "CfgPatches" >> "exile_server" ) ) then { _mod = "Exile" }; +if not ( isNull ( configFile >> "CfgPatches" >> "a3_epoch_server" ) ) then { _mod = "Epoch" }; + +_mod diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf new file mode 100644 index 0000000..e232a5e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf @@ -0,0 +1,32 @@ + +// Last modified 8/13/17 by Ghostrider [GRG] +/* + 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["_data"]; +_value = 0; +if (typeName _data isEqualTo "ARRAY") then +{ + _data params["_min","_max"]; + if (_max > _min) then + { + _value = _min + round(random(_max - _min)); + } else { + _value = _min; + }; +} else { + if (typeName _data isEqualTo "SCALAR") then + { + _value = _data; + }; +}; +_value \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesEpoch.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesEpoch.sqf new file mode 100644 index 0000000..f184f49 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesEpoch.sqf @@ -0,0 +1,24 @@ +// pull trader cities from config +/* + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +if !(blck_blacklistTraderCities) exitWith {}; +diag_log format["[blckeagls] Adding Trader Cities to blacklisted locations based on setting for blck_blacklistTraderCities = %1",blck_blacklistTraderCities]; +private _traderCites = allMapMarkers; + +{ + if (_x in ["center","respawn_east","respawn_west","respawn_north"] && blck_blacklistTraderCities) then + { + blck_locationBlackList pushback [getMarkerPos _x,1000]; + //if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getTraderCitiesEpoch:: -- >> Added epoch trader city location at %1", (getMarkerPos _x)];}; + }; +}forEach _traderCites; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesExile.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesExile.sqf new file mode 100644 index 0000000..cf5ae13 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesExile.sqf @@ -0,0 +1,31 @@ +// pull trader cities from config +/* + By Ghostrider [GRG] + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private _traderCites = allMapMarkers; +_tc = []; +{ + //if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getExileLocations :: -- >> Evaluating Markertype of %1", (getMarkerType _x)];}; + if (getMarkerType _x isEqualTo "ExileTraderZone" && blck_blacklistTraderCities) then { + blck_locationBlackList pushback [(getMarkerPos _x),1000]; + if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getExileLocations :: -- >> Added Exile Trader location at %1", (getMarkerPos _x)];}; + }; + + if ((getMarkerType _x isEqualTo "ExileSpawnZone") && blck_blacklistSpawns) then { + blck_locationBlackList pushback [(getMarkerPos _x),1000]; + if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getExileLocations :: -- >> Added Exile Spawn location at %1", (getMarkerPos _x)];}; + }; + // + if (getMarkerType _x isEqualTo "ExileConcreteMixerZone" && blck_listConcreteMixerZones) then { + blck_locationBlackList pushback [(getMarkerPos _x),1000]; + if (blck_debugON) then {diag_log format["[blckeagls] _fnc_getExileLocations :: -- >> Added Exile Concrete Mixer location at %1", (getMarkerPos _x)];}; + }; +}forEach _traderCites; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_giveTakeCrypto.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_giveTakeCrypto.sqf new file mode 100644 index 0000000..d5af8b5 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_giveTakeCrypto.sqf @@ -0,0 +1,11 @@ +/* + Credit for this method goes to He-Man who first suggested it. +*/ + +//_player = _this select 0; +if ((_this select 0) isKindOf "Man" && isPlayer (_this select 0)) then +{ + _this call EPOCH_server_effectCrypto; +}; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_isClass.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_isClass.sqf new file mode 100644 index 0000000..334f53c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_isClass.sqf @@ -0,0 +1,21 @@ +/* + GMS_fnc_isClass + + Purpose: determine if a string is a valid className + Parameters: _item, a string to be interrogated. + Returns: true if the string is a valid classname. +*/ +/* + 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 "GMSCore\init\GMS_defines.hpp" "\addons\GMSCore\init\GMS_defines.hpp" +params["_item"]; +private _result = if ([_item] call GMS_fnc_getCfgType isEqualTo "") then {false} else {true}; +_result \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf new file mode 100644 index 0000000..b03acb9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf @@ -0,0 +1,44 @@ +/* + Depends on blck_fnc_addItemToCrate + + call as: + + [_item,_crate] call blck_fnc_loadLootFromItemsArray; + + where + _crate is a container such as ammo box or vehicle + _loadout is an array containing either 2 or 3 elements. The first array is always an array of items to add. Items can be formated as ["item1","item1"], as [["item1",3],["item2",2]] or as [["item1",2,4],["item2",3,5]]. + See GMS_fnc_addItemToCrate for information about the acceptable formates for the items "item1" ... "itemN". + + The second and optional third element in the array specify the number of times the script will randomly select an item from the array of items and load it into the crate. + For example: + case 1: [["item1",...,"itemN"],6]; The script will randomly select from the array of item names 6 times and call the loot loader each time. + case 2: [["item1",...,"itemN"],6, 9]; As above except that an item will be selected a minimum of 6 and maximum of 9 times. + + + 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["_loadout","_crate",["_addAmmo",0]]; + if ((_loadout select 0) isEqualTo []) exitWith {}; + { + private["_tries","_q","_item"]; + _tries = 0; + _q = _x select 1; // this can be a number or array. + _tries = [_q] call blck_fnc_getNumberFromRange; + for "_i" from 1 to _tries do + { + _item = selectRandom (_x select 0); + [_item,_crate,_addAmmo] call blck_fnc_addItemToCrate; + }; + }forEach _loadout; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf new file mode 100644 index 0000000..c5f52ab --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -0,0 +1,84 @@ +/* + 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["starting _fnc_mainThread with time = %1",diag_tickTime]; + +private["_timer1sec","_timer5sec","_timer20sec","_timer5min","_timer5min"]; +_timer1sec = diag_tickTime; +_timer5sec = diag_tickTime; +_timer20sec = diag_tickTime; +_timer1min = diag_tickTime; +_timer5min = diag_tickTime; + +while {true} do +{ + uiSleep 1; + if (diag_tickTime > _timer1sec) then + { + #ifdef GRGserver + [] call blck_fnc_broadcastServerFPS; + #endif + _timer1sec = diag_tickTime + 1; + }; + if (diag_tickTime > _timer5sec) then + { + _timer5sec = diag_tickTime + 5; + if (blck_simulationManager isEqualTo blck_useBlckeaglsSimulationManagement) then {[] call blck_fnc_simulationManager}; + [] call blck_fnc_sm_staticPatrolMonitor; + [] call blck_fnc_vehicleMonitor; + }; + if (diag_tickTime > _timer20sec) then + { + [] call blck_fnc_cleanupAliveAI; + [] call blck_fnc_cleanupObjects; + [] call blck_fnc_cleanupDeadAI; + [] call blck_fnc_scanForPlayersNearVehicles; + [] call GMS_fnc_cleanupTemporaryMarkers; + [] call GMS_fnc_updateCrateSignals; + [] call blck_fnc_cleanEmptyGroups; + _timer20sec = diag_tickTime + 20; + }; + if ((diag_tickTime > _timer1min)) then + { + _timer1min = diag_tickTime + 60; + [] call blck_fnc_spawnPendingMissions; + [] call blck_fnc_cleanEmptyGroups; + [] call blck_fnc_groupWaypointMonitor; // TODO: Test implementation of this function. + if (blck_dynamicUMS_MissionsRuning < blck_numberUnderwaterDynamicMissions) then {[] spawn blck_fnc_addDyanamicUMS_Mission}; + if (blck_useHC) then {[] call blck_fnc_HC_passToHCs}; + if (blck_useTimeAcceleration) then {[] call blck_fnc_timeAcceleration}; + if (blck_ai_offload_to_client) then {[] call blck_fnc_ai_offloadToClients}; + #ifdef blck_debugMode + diag_log format["_fnc_mainThread: active scripts include: %1",diag_activeScripts]; + #endif + }; + if (diag_tickTime > _timer5min) then + { + 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]; + #ifdef blck_debugMode + /* + Syntax: + diag_activeSQFScripts + Return Value: + Array of Arrays - to format [[scriptName, fileName, isRunning, currentLine], ...]: + */ + //private _activeScripts = call diag_activeSQFScripts; + { + if (_x select 2 /* isRunning */) then + { + //diag_log format["script name %1",_x select 0]; + }; + } forEach diag_activeSQFScripts; + #endif + _timer5min = diag_tickTime + 300; + }; +}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_markerSetAliveAICount.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_markerSetAliveAICount.sqf new file mode 100644 index 0000000..da0ef82 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_markerSetAliveAICount.sqf @@ -0,0 +1,23 @@ +/* + 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["_mArray","_count"]; + +_mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"]; +_textPos = [(_pos select 0) + (count toArray (_text) * 12), (_pos select 1) + (_size select 0), 0]; +_MainMarker = createMarker ["ai_count" + _name, _textPos]; +_MainMarker setMarkerShape "Icon"; +_MainMarker setMarkerType "HD_Arrow"; +_MainMarker setMarkerColor "ColorBlack"; +_MainMarker setMarkerText format["% Alive",_count]; + +//_MainMarker setMarkerDir 37; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_missionCompleteMarker.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_missionCompleteMarker.sqf new file mode 100644 index 0000000..91077cb --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_missionCompleteMarker.sqf @@ -0,0 +1,25 @@ +/* + + 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["_location","_MainMarker","_name"]; +//diag_log format["blck_fnc_missionCompleteMarker:: _this = %1",_this]; +_location = _this select 0; +_name = str(random(1000000)) + "MarkerCleared"; +_MainMarker = createMarker [_name, _location]; +_MainMarker setMarkerColor "ColorBlack"; +_MainMarker setMarkerType "n_hq"; +_MainMarker setMarkerText "Mission Cleared"; +//uiSleep 300; +//deleteMarker _MainMarker; +blck_temporaryMarkers pushBack [_MainMarker, diag_tickTime + 300]; +//diag_log format["missionCompleteMarker complete script for _this = %1",_this]; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_monitorHC.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_monitorHC.sqf new file mode 100644 index 0000000..819e26a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_monitorHC.sqf @@ -0,0 +1,23 @@ +/* + Check if an HC is connected and if so transfer some AI to it. + + 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"; +// blck_connectedHCs // list of connected HCs at last check. +_HCs = entities "HeadlessClient_F"; // currently connected HCs. + +{ + if ([_x] call _fn_HC_disconnected) then + { + // Remove any event handlers added by the HC + + }; +}forEach blck_connectedHCs; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_msgIED.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_msgIED.sqf new file mode 100644 index 0000000..f82da39 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_msgIED.sqf @@ -0,0 +1,13 @@ +/* + 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/ +*/ + + params["_killer"]; + [["IED","",0,0],[_killer]] call blck_fnc_MessagePlayers; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf new file mode 100644 index 0000000..6ec7509 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf @@ -0,0 +1,21 @@ + +/* + 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 format["_fnc_nearestPlayers: _this = %1",_this]; +params["_coords","_range"]; +private["_return","_playerClassNames","_epochClasses","_exileClasses"]; +if (blck_modType isEqualTo "Epoch") then {_playerClassNames = ["Epoch_Female_F","Epoch_Male_F"]}; +if (blck_modType isEqualTo "Exile") then {_playerClassNames = ["Exile_Unit_Player"]}; +_return = nearestObjects[_coords,_playerClassNames,_range]; +_return \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRange.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRange.sqf new file mode 100644 index 0000000..c0b17da --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRange.sqf @@ -0,0 +1,29 @@ +////////////////////////////////////////////////////// +// Test whether one object (e.g., a player) is within a certain range of any of an array of other objects +/* + 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 ["_result","_players"]; +params["_pos","_dist",["_onFootOnly",false]]; +_players = call blck_fnc_allPlayers; +_result = false; +if !(_onFootOnly) then +{ + { + if ((_x distance2D _pos) < _dist) exitWith {_result = true;}; + } forEach _players; +} else { + { + if ( ((_x distance2D _pos) < _dist) && (vehicle _x isEqualTo _x)) exitWith {_result = true;}; + } forEach _players; +}; +_result diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRangeArray.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRangeArray.sqf new file mode 100644 index 0000000..8f8c171 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRangeArray.sqf @@ -0,0 +1,22 @@ +////////////////////////////////////////////////////// +// Test whether one object (e.g., a player) is within a certain range of any of an array of other objects +/* + 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 ["_result"]; +params["_locations","_dist",["_onFootOnly",false]]; +_result = false; +{ + _result = [_x,_dist,_onFootOnly] call blck_fnc_playerInRange; + if (_result) exitWith {}; +} forEach _locations; +_result diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_randomPosn.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_randomPosn.sqf new file mode 100644 index 0000000..fdd23f3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_randomPosn.sqf @@ -0,0 +1,22 @@ +////////////////////////////////////////////// +// returns a position array at random position within a radius of _range relative to _pos. +/* + 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["_newX","_newY"]; +params["_pos","_range"]; +_newX = ((_pos select 0) + (random(_range)) * (selectRandom [1,-1])); +_newY = ((_pos select 1) + (random(_range)) * (selectRandom [1,-1])); + +[_newX,_newY,0] + diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_setAILocality.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_setAILocality.sqf new file mode 100644 index 0000000..c5ca54a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_setAILocality.sqf @@ -0,0 +1,77 @@ + +/* + blck_fnc_setAILocality + Addapted for blckeagls from: + DMS_fnc_SetAILocality + Created by Defent and eraser1 + Usage: + [ + _groupOrUnit, + _posOrObject // Does not have to be defined if element 1 is a unit + ] call DMS_fnc_SetAILocality; + Makes a random player within 3 KM of the AI unit or group the owner. + Offloading AI will improve server performance, but the unit will no longer be local, which will limit the server's control over it. + Could however have negative effects if target player has a potato PC. + Returns true if a viable owner was found, false otherwise. +*/ + +private _AI = param [0,objNull,[objNull,grpNull]]; +//diag_log format["_fnc_setAILocality: _this = %1",_this]; +if (isNull _AI) exitWith +{ + diag_log format ["blckeagls ERROR :: Calling blck_fnc_SetAILocality with null parameter; _this: %1",_this]; +}; + +private _AIType = typeName _AI; + +private _pos = if (_AIType isEqualTo "OBJECT") then {_AI} else {param [1,"",[objNull,[]],[2,3]]}; + +if (_pos isEqualTo "") exitWith +{ + diag_log format ["blckeagls ERROR :: Calling blck_fnc_SetAILocality with invalid position; this: %1",_this]; +}; + + +private _client = objNull; + +{ + if ((alive _x) && {(_x distance2D _pos)<=3000}) exitWith + { + _client = _x; + }; +} forEach allPlayers; + + +if (!isNull _client) then +{ + private _swapped = if (_AIType isEqualTo "OBJECT") then {_AI setOwner (owner _client)} else {_AI setGroupOwner (owner _client)}; + + if (!_swapped) then + { + ExileServerOwnershipSwapQueue pushBack [_AI,_client]; + }; + + if (blck_ai_offload_notifyClient) then + { + private _msg = format ["blckeagls :: AI %1 |%2| has been offloaded to you.",_AIType,_AI]; + _msg remoteExecCall ["systemChat", _client]; + _msg remoteExecCall ["diag_log", _client]; + }; + #ifdef blck_debugMode + if (blck_debugOn) then + { + diag_log format ["SetAILocality :: Ownership swap of %1 (%4) to %2 (%3) is initialized. Initial swap attempt successful: %5",_AI, name _client, getPlayerUID _client, _AIType, _swapped]; + }; + #endif + true +} +else +{ + #ifdef blck_debugMode + if (blck_debugOn) then + { + diag_log format ["SetAILocality :: No viable client found for the ownership of %1! _pos: %2.",_AI,_pos]; + }; + #endif + false +}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf new file mode 100644 index 0000000..3286f3b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf @@ -0,0 +1,78 @@ +/* + 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["_blck_fn_configureRoundMarker"]; +_blck_fn_configureRoundMarker = { + private["_name","_pos","_color","_size","_MainMarker","_arrowMarker","_labelMarker","_labelType"]; + params["_name","_pos","_color","_text","_size","_labelType","_mShape","_mBrush"]; + if ((_pos distance [0,0,0]) < 10) exitWith {}; + + _MainMarker = createMarker [_name, _pos]; + _MainMarker setMarkerColor _color; + _MainMarker setMarkerShape "ELLIPSE"; + _MainMarker setMarkerBrush "Grid"; + _MainMarker setMarkerSize _size; // + if (count toArray(_text) > 0) then + { + switch (_labelType) do { + case "arrow": + { + _name = "label" + _name; + _textPos = [(_pos select 0) + (count toArray (_text) * 12), (_pos select 1) - (_size select 0), 0]; + _arrowMarker = createMarker [_name, _textPos]; + _arrowMarker setMarkerShape "Icon"; + _arrowMarker setMarkerType "HD_Arrow"; + _arrowMarker setMarkerColor "ColorBlack"; + _arrowMarker setMarkerText _text; + //_MainMarker setMarkerDir 37; + }; + case "center": + { + _name = "label" + _name; + _labelMarker = createMarker [_name, _pos]; + _labelMarker setMarkerShape "Icon"; + _labelMarker setMarkerType "mil_dot"; + _labelMarker setMarkerColor "ColorBlack"; + _labelMarker setMarkerText _text; + }; + }; + }; + if (isNil "_labelMarker") then {_labelMarker = ""}; + _labelMarker +}; + +_blck_fn_configureIconMarker = { + private["_MainMarker"]; + params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]]; + _name = "label" + _name; + _MainMarker = createMarker [_name, _pos]; + _MainMarker setMarkerShape "Icon"; + _MainMarker setMarkerType _icon; + _MainMarker setMarkerColor _color; + _MainMarker setMarkerText _text; + _MainMarker +}; + +params["_mArray"]; +private["_marker"]; +_mArray params["_missionMarkerName","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerTypeInfo"]; +_markerTypeInfo params["_mShape",["_mSize",[0,0]],["_mBrush","GRID"]]; +if (toUpper(_mShape) in ["ELIPSE","ELLIPSE","RECTANGLE"]) then // not an Icon .... +{ + _marker = [_missionMarkerName,_markerPos,_markerColor,_markerLabel, _mSize,_markerLabelType,_mShape,_mBrush] call _blck_fn_configureRoundMarker; +}; +if !(toUpper(_mShape) in ["ELIPSE","ELLIPSE","RECTANGLE"]) then +{ + _marker = [_missionMarkerName,_markerPos, _markerColor,_markerLabel,_mShape] call _blck_fn_configureIconMarker; +}; +if (isNil "_marker") then {_marker = ""}; +_marker diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf new file mode 100644 index 0000000..61bedf0 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf @@ -0,0 +1,22 @@ +////////////////////////////////////////////////////// +// test if a timeout condition exists. +// [_startTime] call blck_fnc_timedOut +// Returns true (timed out) or false (not timed out) +/* + 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["_startTime",["_timeoutTime",blck_MissionTimeout]]; +private["_return"]; +//if ((diag_tickTime - _startTime) > _timeoutTime) then {_return = true} else {_return = false}; +_return = ((diag_tickTime - _startTime) > _timeoutTime) ; +_return; diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateCrateSignals.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateCrateSignals.sqf new file mode 100644 index 0000000..6739b30 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateCrateSignals.sqf @@ -0,0 +1,49 @@ +/* + 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/ +*/ +for "_i" from 1 to (count blck_illuminatedCrates) do +{ + if (_i > (count blck_illuminatedCrates)) exitWith {}; + private _c = blck_illuminatedCrates deleteAt 0; + _c params["_crate","_smoke","_light","_smokeShell","_lightSource","_refreshTime","_endAt"]; + //diag_log format["_unpdateCrateSignals: [_crate %1 | _smoke %2 | _light %3 |_smokeShell %4 | _lightSource %5 | curr time %8 | _refreshTime %6 |_endAt %7",_crate,_smoke,_light,_smokeShell,_lightSource,_refreshTime,_endAt,diag_tickTime]; + if (diag_tickTime < _endAt) then + { + if (diag_tickTime > _refreshTime) then + { + if !(isNull _smoke) then + { + detach _smoke; + deleteVehicle _smoke; + }; + if !(isNull _light) then + { + detach _light; + deleteVehicle _light; + }; + _smoke = _smokeShell createVehicle getPosATL _crate; + _smoke setPosATL (getPosATL _crate); + _smoke attachTo [_crate,[0,0,(0.5)]]; // put the smoke a fixed distance above the top of any object to make it as visible as possible + if(sunOrMoon < 0.2) then + { + _light = _lightSource createVehicle getPosATL _crate; + _light setPosATL (getPosATL _crate); + _light attachTo [_crate,[0,0,(0.55)]]; + }; + blck_illuminatedCrates pushBack [_crate,_smoke,_light,_smokeShell,_lightSource,diag_tickTime + 120,_endAt]; + } else { + //diag_log format["_updateCrateSignals: refresh light at %1",_refreshTime]; + //blck_illuminatedCrates pushBack [_crate,_smoke,_light,_smokeShell,_lightSource,_refreshTime,_endAt]; + blck_illuminatedCrates pushBack _c; + }; + + } else { + //diag_log format["_updateCrateSignals: crate has been illuminated for enough time, no need to continue"]; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateMarkerAliveCount.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateMarkerAliveCount.sqf new file mode 100644 index 0000000..6e2f659 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateMarkerAliveCount.sqf @@ -0,0 +1,13 @@ +/* + 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["_marker","_rootText","_missionAI"]; +_marker setMarkerText format["%1 / %2 AI Alive",_rootText,{alive _x} count _missionAI]; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_waitTimer.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_waitTimer.sqf new file mode 100644 index 0000000..f2ff754 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_waitTimer.sqf @@ -0,0 +1,23 @@ +/* + for ghostridergaming + By Ghostrider [GRG] + Copyright 2016 + + Waits for a random period between _min and _max seconds + Call as + [_minTime, _maxTime] call blck_fnc_waitTimer + Returns true; +/* + By Ghostrider [GRG] + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_wait","_Tstart"]; +params["_min","_max"]; +uiSleep round( _min + (_max - _min) ); +true diff --git a/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_getModType.sqf b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_getModType.sqf new file mode 100644 index 0000000..0e5be23 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Functions/GMS_getModType.sqf @@ -0,0 +1,12 @@ +/* + Based on code by IT07 written for VEMF_r +*/ + +private "_mod"; + +_mod = ""; + +if not ( isNull ( configFile >> "CfgPatches" >> "exile_server" ) ) then { _mod = "Exile" }; +if not ( isNull ( configFile >> "CfgPatches" >> "a3_epoch_server" ) ) then { _mod = "Epoch" }; + +_mod diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_antiStickGroupy.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_antiStickGroupy.sqf new file mode 100644 index 0000000..b7a5ede --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_antiStickGroupy.sqf @@ -0,0 +1,98 @@ +// Changes type of waypont0 for the specified group to "MOVE" and updates time stamps, WP postion and Timout parameters accordinglyD. +/* + 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/ + + // TODO: used for 'unstuck' cases +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#ifdef blck_debugMode +//diag_log "_fnc_changeToMoveWaypoint: blck_debugMode enabled"; +#endif +private["_group","_wp","_wpPos","_dis","_arc","_dir","_newPos","_marker","_center","_minDis","_maxDis"]; + +_group = group _this; +_group setcombatmode "YELLOW"; +_group setBehaviour "COMBAT"; +_group setVariable["timeStamp",diag_tickTime]; +_wp = [_group, 0]; +_wpPos = getPos ((units _group) select 0); +_dir = _group getVariable["wpDir",0]; +_center = _group getVariable ["patrolCenter",_wpPos]; +if (_group getVariable["wpMode","random"] isEqualTo "random") then +{ + _dir = random(360); +} else { + _dir = (_group getVariable["wpDir",0]) + 70; + _group setVariable["wpDir",_dir]; +}; +_minDis = _group getVariable["minDis",25]; +_maxDis = _group getVariable["maxDis",30]; +_dis = (_minDis) + random( (_maxDis) - (_minDis) ); +_newPos = (_center) getPos[_dis,_dir]; +_wp setWPPos [_newPos select 0, _newPos select 1]; +_wp setWaypointCompletionRadius (_group getVariable["wpRadius",0]); +_wp setWaypointType "MOVE"; +_wp setWaypointName "move"; +_wp setWaypointBehaviour "COMBAT"; +_wp setWaypointCombatMode "RED"; +_wp setWaypointTimeout [10,15,20]; +_wp setWaypointLoiterRadius (_group getVariable["wpRadius",30]); +_wp setWaypointLoiterType "CIRCLE"; +_wp setWaypointSpeed "LIMITED"; +_group setCurrentWaypoint _wp; +diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp]; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_changeToMoveWaypoint (4/25/17): _this = %1", _this]; + diag_log format["_fnc_changeToMoveWaypoint: typeName _this = %1", typeName _this]; + diag_log format["_fnc_changeToMoveWaypoint:_group = %1",_group]; + diag_log format["_fnc_changeToMoveWaypoint:_group timestamp updated to %1", _group getVariable "timeStamp"]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> wpMode %1 _dir %2 _dis %3 _center %4",_group getVariable["wpMode","random"], _dir, _dis,_center]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new position is %2",_group, _newPos]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp]; + diag_log format["_fnc_changeToMoveWaypoint:_group %1 basic waypoint parameters updates", _group getVariable "timeStamp"]; + _marker =_group getVariable["wpMarker",""]; + _marker setMarkerColor "ColorBlue"; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"]; +}; +#endif +if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SAD Mode",_group]; + }; + _wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"]; + #else + _wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;"]; + #endif +}; +if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SENTRY Mode",_group]; + }; + _wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SENTRY Waypoint',group this];"]; + #else + _wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint;"]; + #endif +}; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; +}; +#endif diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf new file mode 100644 index 0000000..b7a5ede --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf @@ -0,0 +1,98 @@ +// Changes type of waypont0 for the specified group to "MOVE" and updates time stamps, WP postion and Timout parameters accordinglyD. +/* + 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/ + + // TODO: used for 'unstuck' cases +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#ifdef blck_debugMode +//diag_log "_fnc_changeToMoveWaypoint: blck_debugMode enabled"; +#endif +private["_group","_wp","_wpPos","_dis","_arc","_dir","_newPos","_marker","_center","_minDis","_maxDis"]; + +_group = group _this; +_group setcombatmode "YELLOW"; +_group setBehaviour "COMBAT"; +_group setVariable["timeStamp",diag_tickTime]; +_wp = [_group, 0]; +_wpPos = getPos ((units _group) select 0); +_dir = _group getVariable["wpDir",0]; +_center = _group getVariable ["patrolCenter",_wpPos]; +if (_group getVariable["wpMode","random"] isEqualTo "random") then +{ + _dir = random(360); +} else { + _dir = (_group getVariable["wpDir",0]) + 70; + _group setVariable["wpDir",_dir]; +}; +_minDis = _group getVariable["minDis",25]; +_maxDis = _group getVariable["maxDis",30]; +_dis = (_minDis) + random( (_maxDis) - (_minDis) ); +_newPos = (_center) getPos[_dis,_dir]; +_wp setWPPos [_newPos select 0, _newPos select 1]; +_wp setWaypointCompletionRadius (_group getVariable["wpRadius",0]); +_wp setWaypointType "MOVE"; +_wp setWaypointName "move"; +_wp setWaypointBehaviour "COMBAT"; +_wp setWaypointCombatMode "RED"; +_wp setWaypointTimeout [10,15,20]; +_wp setWaypointLoiterRadius (_group getVariable["wpRadius",30]); +_wp setWaypointLoiterType "CIRCLE"; +_wp setWaypointSpeed "LIMITED"; +_group setCurrentWaypoint _wp; +diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp]; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_changeToMoveWaypoint (4/25/17): _this = %1", _this]; + diag_log format["_fnc_changeToMoveWaypoint: typeName _this = %1", typeName _this]; + diag_log format["_fnc_changeToMoveWaypoint:_group = %1",_group]; + diag_log format["_fnc_changeToMoveWaypoint:_group timestamp updated to %1", _group getVariable "timeStamp"]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> wpMode %1 _dir %2 _dis %3 _center %4",_group getVariable["wpMode","random"], _dir, _dis,_center]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new position is %2",_group, _newPos]; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp]; + diag_log format["_fnc_changeToMoveWaypoint:_group %1 basic waypoint parameters updates", _group getVariable "timeStamp"]; + _marker =_group getVariable["wpMarker",""]; + _marker setMarkerColor "ColorBlue"; + diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"]; +}; +#endif +if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SAD Mode",_group]; + }; + _wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"]; + #else + _wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;"]; + #endif +}; +if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SENTRY Mode",_group]; + }; + _wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SENTRY Waypoint',group this];"]; + #else + _wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint;"]; + #endif +}; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; +}; +#endif diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf new file mode 100644 index 0000000..6687c1e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf @@ -0,0 +1,53 @@ +// Sets the WP type for WP for the specified group and updates other atributes accordingly. +/* + 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/ + + // TODO: Still needed? +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +#ifdef blck_debugMode +diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled"; +#endif + +private["_group","_wp"]; + +_group = group _this; +_group setVariable["timeStamp",diag_tickTime]; +_group setcombatmode "RED"; +_group setBehaviour "COMBAT"; +_wp = [_group, 0]; +_group setCurrentWaypoint _wp; +_wp setWaypointType "SAD"; +_wp setWaypointName "sad"; +_wp setWaypointBehaviour "COMBAT"; +_wp setWaypointCombatMode "RED"; +_wp setWaypointTimeout [10,15,20]; +diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this]; +#ifdef blck_debugMode +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 > 2) then +{ + private ["_marker"]; + _marker = _group getVariable["wpMarker",""]; + _marker setMarkerColor "ColorRed"; + diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; + diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; + diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; + diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"]; +}; +#endif diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf new file mode 100644 index 0000000..48106d4 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf @@ -0,0 +1,50 @@ +// Sets the WP type for WP for the specified group and updates other atributes accordingly. +// TODO: Not used? +// Keep in for now. +/* + 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"; +#ifdef blck_debugMode +diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled"; +#endif +private["_group","_wp"]; + +_group = group _this; +_group setVariable["timeStamp",diag_tickTime]; +_wp = [_group, 0]; +_group setCurrentWaypoint _wp; +_group setcombatmode "RED"; +_group setBehaviour "COMBAT"; +_wp setWaypointType "SENTRY"; +_wp setWaypointName "sentry"; +_wp setWaypointBehaviour "COMBAT"; +_wp setWaypointCombatMode "RED"; +_wp setWaypointTimeout [10,15,20]; +#ifdef blck_debugMode +_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"]; +#else +_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"]; +#endif + +#ifdef blck_debugMode +if (blck_debugLevel >1) then +{ + diag_log format["_fnc_changeToSentryWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; + diag_log format["_fnc_changeToSentryWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; + private ["_marker"]; + _marker = _group getVariable["wpMarker",""]; + _marker setMarkerColor "ColorYellow"; + diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; + diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"]; +}; +#endif diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_checkGroupWaypointStatus.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_checkGroupWaypointStatus.sqf new file mode 100644 index 0000000..b98f930 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_checkGroupWaypointStatus.sqf @@ -0,0 +1,23 @@ +/* + Checks for groups that have not reached their waypoints within a proscribed period + and redirects them. + + 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/ +*/ + +params["_group","_maxTime","_radius"]; +if (diag_tickTime > (_group getVariable "timeStamp") + _maxTime) then // || ( (getPos (leader)) distance2d (_group getVariable "patrolCenter") > _radius)) then +{ + (leader _group) call blck_fnc_setNextWaypoint; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then {diag_log format["_fnc_checkGroupWaypointStatus: group %1 stuck, waypoint reset",_group];}; + #endif +}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_cleanEmptyGroups.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_cleanEmptyGroups.sqf new file mode 100644 index 0000000..27bb043 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_cleanEmptyGroups.sqf @@ -0,0 +1,19 @@ +/* + removes empty or null groups from blck_monitoredMissionAIGroups + 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"; + +for "_i" from 0 to ((count blck_monitoredMissionAIGroups) - 1) do +{ + if (_i >= (count blck_monitoredMissionAIGroups)) exitWith {}; + _grp = blck_monitoredMissionAIGroups deleteat 0; + if ({alive _x} count units _grp > 0) then { blck_monitoredMissionAIGroups pushBack _grp}; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf new file mode 100644 index 0000000..aa13bc1 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf @@ -0,0 +1,32 @@ +/* + [] call blck_fnc_createGroup + 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[["_side",blck_AI_Side],["_deleteWhenEmpty",true]]; +// for information about the _deleteWhenEmpty parameter see: https://community.bistudio.com/wiki/createGroup + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["_fnc_createGroup: _this = %1",_this]}; +#endif + +private _groupSpawned = createGroup [_side, true]; +if (isNull _groupSpawned) exitWith{"ERROR:-> Null Group created by blck_fnc_spawnGroup";}; +if (blck_simulationManager == blck_useDynamicSimulationManagement) then +{ + _groupSpawned enableDynamicSimulation true; +}; +_groupSpawned setcombatmode "RED"; +_groupSpawned setBehaviour "COMBAT"; +_groupSpawned allowfleeing 0; +_groupSpawned setspeedmode "FULL"; +_groupSpawned setFormation blck_groupFormation; +_groupSpawned setVariable ["blck_group",true]; +_groupSpawned \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_emplacedWeaponWaypoint.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_emplacedWeaponWaypoint.sqf new file mode 100644 index 0000000..51ede76 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_emplacedWeaponWaypoint.sqf @@ -0,0 +1,21 @@ + +/* + 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"; + +private["_group","_wp"]; +_group = group _this; +_group setVariable["timeStamp",diag_tickTime]; +_wp = [_group, 0]; +_group setCurrentWaypoint _wp; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf new file mode 100644 index 0000000..a8650ed --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf @@ -0,0 +1,19 @@ + +/* + 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/ +*/ + +params["_pos"]; +private["_units"]; + +if (blck_modType == "Epoch") then {_units = (nearestObjects[_pos,["I_Soldier_EPOCH"], 1000]) select {vehicle _x isEqualTo _x}}; +if (blck_modType == "Exile") then {_units = (nearestObjects[_pos ,["i_g_soldier_unarmed_f"], 1000]) select {vehicle _x isEqualTo _x}}; +private _nearestGroup = group(_units select 0); +_nearestGroup diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_groupWaypointMonitor.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_groupWaypointMonitor.sqf new file mode 100644 index 0000000..3afc8d6 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_groupWaypointMonitor.sqf @@ -0,0 +1,54 @@ + +/* + Checks for groups that have not reached their waypoints within a proscribed period + and redirects them. + + 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"; +// TODO: Test functionality of this +_fn_waypointComplete = { + private _group = _this select 0; + private _wp = currentWaypoint _group; + private _done = if (currentWaypoint _group) > (count (waypoints _group)) then {true} else {false}; + _done +}; +//diag_log format["_fnc_groupWaypointMonitor called at %1 with %2 groups to monitor",diag_tickTime,count blck_monitoredMissionAIGroups]; +{ + private["_timeStamp","_index","_unit","_soldierType"]; + if ( !(_x isEqualTo grpNull) && ({alive _x} count (units _x) > 0) ) then + { + /* + #define blck_turnBackRadiusInfantry 800 + #define blck_turnBackRadiusVehicles 1000 + #define blck_turnBackRadiusHelis 1000 + #define blck_turnBackRadiusJets 1500 + */ + //diag_log format["_fn_monitorGroupWaypoints - radii: on foot %1 | vehicle %2 | heli %3 | jet %4",blck_turnBackRadiusInfantry,blck_turnBackRadiusVehicles,blck_turnBackRadiusHelis,blck_turnBackRadiusJets]; + _timeStamp = _x getVariable ["timeStamp",0]; + if (_timeStamp isEqualTo 0) then + { + _x setVariable["timeStamp",diag_tickTime]; + //diag_log format["_fn_monitorGroupWaypoints::--> updating timestamp for group %1 at time %2",_x,diag_tickTime]; + }; + _soldierType = _x getVariable["soldierType","null"]; + //diag_log format["_fn_monitorGroupWaypoints::--> soldierType for group %1 = %2 and timeStamp = %3",_x,_soldierType,_timeStamp]; + switch (_soldierType) do + { + case "infantry": {[_x, 60] call blck_fnc_checkgroupwaypointstatus;}; + case "vehicle": {[_x, 90, 800] call blck_fnc_checkgroupwaypointstatus;}; + case "aircraft": {[_x, 90, 1000] call blck_fnc_checkgroupwaypointstatus;}; + }; + }; + //private _updateNeeded = if (diag_tickTime > (_x getVariable "timeStamp") + 60) then +} forEach blck_monitoredMissionAIGroups; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf new file mode 100644 index 0000000..1311a7b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf @@ -0,0 +1,118 @@ +// Sets the WP type for WP for the specified group and updates other atributes accordingly. +/* + 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/ + + TODO: Replaces changeToMoveWaypoint + and + Replaces changeToSADWaypoint + +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private["_group","_wp","_index","_pattern","_mode","_arc","_dis","_wpPos"]; + +private _group = group _this; +private _leader = _this; +private _pos = _group getVariable "patrolCenter"; // Center of the area to be patroleld. +private _minDis = _group getVariable "minDis"; // minimum distance between waypoints +private _maxDis = _group getVariable "maxDis"; // maximum distance between waypoints +// _group getVariable "timeStamp"; // used to check that waypoints are being completed +//private _wpRadisu _group getVariable "wpRadius"; // Always set to 0 to force groups to move a bit +private _patrolRadius = _group getVariable "patrolRadius"; // radius of the area to be patrolled +private _wpMode = _group getVariable "wpMode"; // The default mode used when the waypoint becomes active https://community.bistudio.com/wiki/AI_Behaviour +//_group getVariable "wpPatrolMode"; // Not used; the idea is to allow two algorythms: randomly select waypoints so groups move back and forth along the perimiter of the patrool area or sequenctioal, hoping along the perimeter +private _wpTimeout = _group getVariable "wpTimeout"; // Here to alow you to have the game engine pause before advancing to the next waypoing. a timout of 10-20 sec is recommended for infantry and land vehicles, and 1 sec for aircraft +private _wpDir = _group getVariable "wpDir"; // Used to note the degrees along the circumference of the patrol area at which the last waypoint was positioned. +private _arc = _group getVariable "wpArc"; // Increment in degrees to be used when advancing the position of the patrol to the next position along the patrol perimeter +//_group getVariable "soldierType"; // infantry, vehicle, air or emplaced. Note that there is no need to have more than one waypoint for emplaced units. +private _wp = [_group,0]; +private _nearestEnemy = _leader findNearestEnemy (getPosATL _leader); +private _maxTime = _group getVariable["maxTime",300]; + +// Extricate stuck group. +if (diag_tickTime > (_group getVariable "timeStamp") + _maxTime) exitWith +{ // try to get unit to move and do antiStuck actions + _group setBehaviour "CARELESS"; // We need them to forget about enemies and move + _group setCombatMode "BLUE"; // We need them to disengage and move + private _vector = _wpDir + _arc + 180; // this should force units to cross back and forth across the zone being patrolled + _group setVariable["wpDir",_vector,true]; + private _newWPPos = _pos getPos[_patrolRadius,_vector]; + _wp setWaypointPosition [_newWPPos,0]; + _wp setWaypointBehaviour "SAFE"; + _wp setWaypointCompletionRadius 0; + _wp setWaypointTimeout _wpTimeout; + _wp setWaypointType "MOVE"; + _group setCurrentWaypoint _wp; + //diag_log format["_fnc_setNextWaypoint[antiSticking]: _group = %1 | _newPos = %2 | waypointStatements = %3",_group,_newWPPos,waypointStatements _wp]; +}; + +// Move when no enemies are nearby +if (isNull _nearestEnemy) then +{ + // Use standard waypoint algorythms + /* + Have groups zig-zag back and forth their patrol area + Setting more relaxed criteria for movement and rules of engagement + */ + private _vector = _wpDir + _arc + 180; // this should force units to cross back and forth across the zone being patrolled + _group setVariable["wpDir",_vector,true]; + _group setCombatMode "YELLOW"; + private _newWPPos = _pos getPos[_patrolRadius,_vector]; + _wp setWaypointPosition [_newWPPos,0]; + _group setBehaviour "SAFE"; // no enemies detected so lets put the group in a relaxed mode + _wp setWaypointBehaviour "SAFE"; + _wp setWaypointCombatMode "YELLOW"; + _wp setWaypointCompletionRadius 0; + _wp setWaypointTimeout _wpTimeout; + _group setCurrentWaypoint _wp; + //diag_log format["_fnc_setNextWaypoint[no enemies]: _group = %1 | _newPos = %2 | waypointStatements = %3",_group,_newWPPos,waypointStatements _wp]; +} else { + // move toward nearest enemy using hunting logic + // set mode to SAD / COMBAT + /* + _vector set to relative direction from leader to enemy +/- random adjustment of up to 33 degrees + _distance can be up to one patrol radius outside of the normal perimeter closer to enemy + _timout set to longer period + when coupled with SAD behavior should cause interesting behaviors + */ + // [point1, point2] call BIS_fnc_relativeDirTo + private _vector = ([_leader,_nearestEnemy] call BIS_fnc_relativeDirTo) + (random(33)*selectRandom[-1,1]); + _group setVariable["wpDir",_vector]; + private ["_huntDistance"]; + + if ((leader _group) distance _nearestEnemy > (_patrolRadius * 2)) then + { + if (((leader _group) distance _pos) > (2 * _patrolRadius)) then + { + _huntdistance = 0; + } else { + _huntDistance = _patrolRadius; + }; + } else { + _huntDistance = ((leader _group) distance _nearestEnemy) / 2; + }; + + private _newWPPos = _pos getPos[_huntDistance,_vector]; + //diag_log format["_fnc_setextWaypoint: _pos = %1 | _patrolRadius = %5 | _newWPPos = %2 | _huntDistance = %3 | _vector = %4",_pos,_newWPPos,_huntDistance,_vector,_patrolRadius]; + _wp setWaypointPosition [_newWPPos,0]; + _wp setWaypointBehaviour "SAD"; + _group setBehaviour "COMBAT"; + _wp setWaypointCombatMode "RED"; + _wp setWaypointTimeout[30,45,60]; + _wp setWaypointCompletionRadius 0; + _group setCurrentWaypoint _wp; + // Assume the same waypoint statement will be available + //diag_log format["_fnc_setNextWaypoint[enemies]t: _group = %1 | _newPos = %2 | _nearestEnemy = 54 | waypointStatements = %3",_group,_newWPPos,waypointStatements _wp,_nearestEnemy]; +}; + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf new file mode 100644 index 0000000..b252f53 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf @@ -0,0 +1,85 @@ +// Sets up waypoints for a specified group. +/* + 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"; +private["_dir","_arc","_noWp","_newpos","_wpradius","_wp"]; +params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAFE"],["_soldierType","null"],["_patrolRadius",30],["_wpTimeout",[5.0,7.5,10]]]; +_wp = [_group, 0]; +if !(_soldierType isEqualTo "emplaced") then +{ + _arc = 360/5; + _group setcombatmode "RED"; + _group setBehaviour "SAFE"; + _group setVariable["patrolCenter",_pos,true]; // Center of the area to be patroleld. + _group setVariable["minDis",_minDis,true]; // minimum distance between waypoints + _group setVariable["maxDis",_maxDis,true]; // maximum distance between waypoints + _group setVariable["timeStamp",diag_tickTime]; // used to check that waypoints are being completed + _group setVariable["wpRadius",0]; // Always set to 0 to force groups to move a bit + _group setVariable["patrolRadius",_patrolRadius,true]; // radius of the area to be patrolled + _group setVariable["wpMode",_mode,true]; // The default mode used when the waypoint becomes active https://community.bistudio.com/wiki/AI_Behaviour + _group setVariable["wpPatrolMode",_wpPatrolMode]; // Not used; the idea is to allow two algorythms: randomly select waypoints so groups move back and forth along the perimiter of the patrool area or sequenctioal, hoping along the perimeter + _group setVariable["wpTimeout",_wpTimeout,true]; // Here to alow you to have the game engine pause before advancing to the next waypoing. a timout of 10-20 sec is recommended for infantry and land vehicles, and 1 sec for aircraft + _group setVariable["wpDir",0,true]; // Used to note the degrees along the circumference of the patrol area at which the last waypoint was positioned. + _group setVariable["wpArc",_arc,true]; // Increment in degrees to be used when advancing the position of the patrol to the next position along the patrol perimeter + _group setVariable["soldierType",_soldierType]; // infantry, vehicle, air or emplaced. Note that there is no need to have more than one waypoint for emplaced units. + _dir = 0; + + _dis = (_minDis) + random( (_maxDis) - (_minDis) ); + _newPos = _pos getPos[_dis,_dir]; + _wp setWPPos [_newPos select 0, _newPos select 1]; + _wp setWaypointCompletionRadius 0; //(_group getVariable["wpRadius",30]); + _wp setWaypointType "MOVE"; + _wp setWaypointName "move"; + _wp setWaypointBehaviour "SAFE"; + _wp setWaypointCombatMode "RED"; + _wp setWaypointTimeout _wpTimeout; + _group setCurrentWaypoint _wp; + #ifdef blck_debugMode + _wp setWaypointStatements ["true","this call blck_fnc_setNextWaypoint; 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_setNextWaypoint;"]; + #endif + #ifdef blck_debugMode + if (blck_debugLevel >= 3) then + { + _marker = createMarker [format["GroupMarker%1",_group],_newPos]; + _group setVariable["wpMarker",_marker,true]; + _marker setMarkerColor "ColorBlue"; + _marker setMarkerText format["%1 %2",(_group getVariable["soldierType","null"]),_group]; + _marker setMarkerType "mil_triangle"; + //diag_log format["_fnc_setupWaypoints: configuring weapoints for group %2 mobile patrol with _soldierType = %1",_solderType,_group]; + diag_log format["_fnc_setupWaypoints: soldier type for mobile _group %1 set to %2",_group, (_group getVariable["soldierType","null"])]; + diag_log format["_fnc_setupWaypoints: all variables for the group have been set for group %1",_group]; + diag_log format["_fnc_setupWaypoints:: -- >> wpMode %1 _dir %2 _dis %3",_group getVariable["wpMode","random"], _dir, _dis]; + diag_log format["_fnc_setupWaypoints:: -- >> group to update is %1 and new position is %2",_group, _newPos]; + diag_log format["_fnc_setupWaypoints:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; + diag_log format["_fnc_setupWaypoints:: -- >> Waypoint marker for group %1 have been configured as %2 with text set to %3",_group, _group getVariable "wpMarker", markerText (_group getVariable "wpMarker")]; + }; + #endif +} else { + _wp setWaypointType "SENTRY"; + _wp setWPPos (getPos leader _group); + _wp setWaypointCompletionRadius 100; + _wp setWaypointBehaviour "COMBAT"; + _wp setWaypointCombatMode "RED"; + _wp setWaypointTimeout [1,1.1,1.2]; + //_wp setWaypointTimeout [0.1,0.1100,0.1200]; + _group setCurrentWaypoint _wp; + _group setVariable["soldierType",_soldierType,true]; + #ifdef blck_debugMode + _wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to an emplaced weapon Waypoint',group this];"]; + if (blck_debugLevel > 2) then {diag_log format["_fnc_setupWaypoints: configuring weapoints for group %2 for emplaced weapon with _soldierType = %1",_soldierType,_group];}; + #else + _wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint;"]; + #endif +}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_simulationMonitor.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_simulationMonitor.sqf new file mode 100644 index 0000000..a4958f8 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_simulationMonitor.sqf @@ -0,0 +1,65 @@ +/* + Managages simulation using blckeagls logic + By Ghostrider-GRG- + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_playerType","_players"]; +_playerType = ["LandVehicle","SHIP","AIR","TANK"]; +//diag_log format["_fnc_simulationMonitor Called at %1",diag_tickTime]; +// TODO: establish if vehicles are sometimes frozen because they are not properly activated. +switch (toLower(blck_modType)) do +{ + case "exile": {_playerType = _playerType + ["Exile_Unit_Player"]}; + case "epoch": {_playerType = _playerType + ["Epoch_Male_F","Epoch_Female_F"]}; +}; +{ + private _group = _x; + _players = ((leader _group) nearEntities [_playerType, blck_simulationEnabledDistance]) select {isplayer _x}; + + if !(_players isEqualTo []) then + { + { + if !(simulationEnabled _x) then + { + _x enableSimulationGlobal true; + (_players select 0) reveal _x; // Force simulation on + }; + }forEach (units _group); + }else{ + { + if (simulationEnabled _x) then + { + _x enableSimulationGlobal false; + }; + }forEach (units _x); + }; +} forEach blck_monitoredMissionAIGroups; +{ + if (simulationEnabled _x) then + { + if !([_x,25,true] call blck_fnc_playerInRange) then + { + #ifdef blck_debugMode + diag_log format['_fnc_simulationManager: disabling simulation for dead AI %1',_x]; + #endif + _x enableSimulationGlobal false; + }; + } else { + if ([_x,25,true] call blck_fnc_playerInRange) then + { + #ifdef blck_debugMode + diag_log format['_fnc_simulationManager: enabling simulation for dead AI %1',_x]; + #endif + _x enableSimulationGlobal true; + }; + }; +} forEach blck_deadAI; +// TODO: Add check for dead AI. +// TODO: Can this be run less often, say every 5 sec? \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf new file mode 100644 index 0000000..02de51c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf @@ -0,0 +1,86 @@ +/* + blck_fnc_spawnGroup + 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["_numbertospawn","_safepos","_launcherType","_infantryType"]; +params[["_group","Error"],"_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true], ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_scuba",false],["_patrolRadius",30]]; + +#ifdef blck_debugMode +if (blck_debugLevel > 3) then +{ + { + diag_log format["_fnc_spawnGroup: _this select %1 = %2",_forEachIndex,_this select _forEachIndex]; + }forEach _this; +}; +#endif + +if !(typeName _group isEqualTo "GROUP") exitWith { + if (_group isEqualTo "Error") exitWith {diag_log format["_fnc_spawnGroup [ERROR]: no parameter was passed for _group"]}; + diag_log format["_fnc_spawnGroup {ERROR]}: parameter %2 of type %1 passed, 'GROUP expected",typeName _group,_group]; +}; +//if (isNull _group) exitWith {diag_log format["ERROR: No valid value _group was passed to blck_fnc_spawnGroup"]}; +if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {_sideArms = [_skillLevel] call blck_fnc_selectAISidearms}; +if (_uniforms isEqualTo []) then {_uniforms = [_skillLevel] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_skillLevel] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_skillLevel] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_skillLevel] call blck_fnc_selectAIBackpacks}; + +_numbertospawn = [_numai1,_numai2] call blck_fnc_getNumberFromRange; + +if !(isNull _group) then +{ + if (_weaponList isEqualTo []) then + { + _weaponList = [_skillLevel] call blck_fnc_selectAILoadout; + }; + + //Spawns the correct number of AI Groups, each with the correct number of units + //Counter variable + _i = 0; + while {_i < _numbertospawn} do + { + _i = _i + 1; + if (blck_useLaunchers && _i <= blck_launchersPerGroup) then + { + _launcherType = selectRandom blck_launcherTypes; + } else { + _launcherType = "none"; + }; + private _unitPos = [_pos,3,6] call blck_fnc_findRandomLocationWithinCircle; + //params["_pos","_aiGroup",_skillLevel,_uniforms, _headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms,_scuba]; + [_unitPos,_group,_skillLevel,_uniforms,_headGear,_vests,_backpacks,_launcherType, _weaponList, _sideArms, _scuba] call blck_fnc_spawnUnit; + //private _unit = [_unitPos,_group,_skillLevel,_uniforms,_headGear,_vests,_backpacks,_launcherType, _weaponList, _sideArms, _scuba] call blck_fnc_spawnUnit; + //diag_log format["_fnc_spawnGroup: _unit %1 spawned at %2 at a distance from the group center of %3 and _vector of %4",_unit,_unitPos,_unitPos distance _pos,_pos getRelDir _unitPos]; + }; + _group selectLeader ((units _group) select 0); + // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]]; + if (_configureWaypoints) then + { + if (_scuba) then {_infantryType = "scuba"} else {_infantryType = "infantry"}; + // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAFE"],["_soldierType","null"],["_patrolRadius",30],["_wpTimeout",[5.0,7.5,10]]]; + #define infantryPatrolRadius 30 + #define infantryWaypointTimeout [5,7.5,10] + [_pos,_minDist,_maxDist,_group,"random","SAD",_infantryType,_patrolRadius,infantryWaypointTimeout] spawn blck_fnc_setupWaypoints; + }; +} else +{ + diag_log "_fnc_spawnGroup:: ERROR CONDITION : NULL GROUP CREATED"; +}; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_spawnGroup:_group = %1",_group]; +}; +#endif +_group diff --git a/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_XferGroup.sqf b/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_XferGroup.sqf new file mode 100644 index 0000000..b0bd5c9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_XferGroup.sqf @@ -0,0 +1,21 @@ +/* + 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/ + // todo: No longer needed ? +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private["_group","_unit","_tempEH"]; +_group = _this select 0; +{ + _unit = _x; + _tempEH = _unit addEventHandler ["Reloaded", {_this call blck_EH_unitWeaponReloaded;}]; //Fires locally so add this again. + diag_log format["blckHC:: reloaded EH added to unit %1 after transfer to HC %2",_x,clientOwner]; +}forEach (units _group); +diag_log format["blckHC:: group %1 transferred to HC %2",_group,clientOwner]; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_countGroupsAssigned.sqf b/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_countGroupsAssigned.sqf new file mode 100644 index 0000000..85ae40c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_countGroupsAssigned.sqf @@ -0,0 +1,18 @@ +/* + Killed handler for _units + By Ghostrider-GRG- + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +//#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_HC"]; +private["_result"]; +_result = {(groupOwner _x) == (owner _HC)} count allGroups; +//diag_log format["_fnc_countGroupsAssigned = %1",_result]; +_result diff --git a/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_leastBurdened.sqf b/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_leastBurdened.sqf new file mode 100644 index 0000000..e67aca3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_HC_leastBurdened.sqf @@ -0,0 +1,30 @@ +/* + Killed handler for _units + By Ghostrider-GRG- + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +//#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_HC_List"]; +if (count _HC_List == 0) exitWith {_result = objNull; _result}; +if (count _HC_List == 1) exitWith {_result = _HC_List select 0; _result}: +private["_result","_fewestGroupsAssigned","_leastBurdened","_groupsAssigned"]; +_fewestGroupsAssigned = 1000000; +{ + _ownerHC = owner _x; + _groupsAssigned = {(groupOwner _x) isEqualTo _ownerHC} count allGroups; + diag_log format["_fnc_HC_leastBurdened: HC %1 | groupsAssigned %2",_x,_groupsAssigned]; + if ([_x] call blck_fnc_HC_countGroupsAssigned < _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/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_passToHCs.sqf b/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_passToHCs.sqf new file mode 100644 index 0000000..09b77f1 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/HC/GMS_fnc_passToHCs.sqf @@ -0,0 +1,49 @@ +/* + 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"; + +if (!isServer) exitWith {}; +blck_fnc_countGroupsAssigned = { + params["_HC"]; + private["_result"]; + _result = {(groupOwner _x) == (owner _HC)} count allGroups; + //diag_log format["_fnc_countGroupsAssigned = %1",_result]; + _result +}; + +private["_numTransfered","_clientId","_allGroups","_groupsOwned","_groups","_idHC","_id","_swap","_rc"]; +_numTransfered = 0; +_idHC = -2; +if (blck_limit_ai_offload_to_blckeagls) then {_groups = blck_monitoredMissionAIGroups} else {_groups = allGroups}; +blck_connectedHCs = entities "HeadlessClient_F"; +diag_log format["_fnc_passToHCs:: blck_connectedHCs = %1 | count _HCs = %2 | server FPS = %3",blck_connectedHCs,count blck_connectedHCs,diag_fps]; +if !(blck_connectedHCs isEqualTo []) then +{ + _idHC = [blck_connectedHCs] call blck_fnc_HC_leastBurdened; + { + //diag_log format["_fnc_passToHCs: group = %1 | owner = %2 | blck_group = %3",_x, groupOwner _x, _x getVariable ["blck_group","undefined"]]; + //if (_x getVariable["blck_group",false]) then + //{ + if ((groupOwner _x) == 2) then + { + private _sgor = _x setGroupOwner (owner _idHC); + //diag_log format["_fnc_passToHCs: group = %1 | _sgor = %2 | _idHC = %3",_x,_sgor,_idHC]; + if (_sgor) then + { + [_x] remoteExec["blck_fnc_HC_XferGroup",_idHC]; + _numTransfered = _numTransfered + 1; + //diag_log format["_fnc_passToHCs: group %1 Passed to HC %2",_x,_idHC]; + }; + }; + //}; + } forEach (_groups); + //diag_log format["[blckeagls] _passToHCs:: %1 groups transferred to HC %2",_numTransfered,_idHC]; +}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc__loadLootItemsFromArray.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc__loadLootItemsFromArray.sqf new file mode 100644 index 0000000..adbfd60 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc__loadLootItemsFromArray.sqf @@ -0,0 +1,52 @@ +/* + Depends on blck_fnc_addItemToCrate + + call as: + + [_item,_crate] call blck_fnc_loadLootFromItemsArray; + + where + _crate is a container such as ammo box or vehicle + _loadout is an array containing either 2 or 3 elements. The first array is always an array of items to add. Items can be formated as ["item1","item1"], as [["item1",3],["item2",2]] or as [["item1",2,4],["item2",3,5]]. + See GMS_fnc_addItemToCrate for information about the acceptable formates for the items "item1" ... "itemN". + + The second and optional third element in the array specify the number of times the script will randomly select an item from the array of items and load it into the crate. + For example: + case 1: [["item1",...,"itemN"],6]; The script will randomly select from the array of item names 6 times and call the loot loader each time. + case 2: [["item1",...,"itemN"],6, 9]; As above except that an item will be selected a minimum of 6 and maximum of 9 times. + + 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["_loadout","_crate",["_addAmmo",0]]; + if ((_loadout select 0) isEqualTo []) exitWith {}; + { + private["_tries","_q","_item"]; + _tries = 0; + //diag_log format["_fn_loadLoot:: -- >> now loading for %1",_x]; + _q = _x select 1; // this can be a number or array. + if ( (typeName _q) isEqualTo "ARRAY") then // Assume the array contains a min/max number to add + { + if ((count _q) isEqualTo 2) then {_tries = (_q select 0) + round(random(((_q select 1) - (_q select 0))));} else {_tries = 0;}; + }; + if ((typeName _q) isEqualTo "SCALAR") then + { + _tries = _q; + }; + for "_i" from 1 to _tries do + { + _item = selectRandom (_x select 0); + [_item,_crate,_addAmmo] call blck_fnc_addItemToCrate; + }; + }forEach _loadout; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addDynamicUMS_Mission.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addDynamicUMS_Mission.sqf new file mode 100644 index 0000000..8c73e2e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addDynamicUMS_Mission.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"; +//params["_pos"]; +private["_UMS_mission","_waitTime","_mission","_pos"]; + +if (count blck_dynamicUMS_MissionList == 0) exitWith +{ + blck_numberUnderwaterDynamicMissions = -1; + diag_log "No Dynamic UMS Missions Listed "; +}; +_UMS_mission = selectRandom blck_dynamicUMS_MissionList; +_waitTime = (blck_TMin_UMS) + random(blck_TMax_UMS - blck_TMin_UMS); +_mission = format["%1%2","Mafia Pirates",floor(random(1000000))]; +_pos = call blck_fnc_findShoreLocation; +#ifdef blck_debugMode +if (blck_debugLevel >= 2) then {diag_log format["_fnc_addDynamicUMS_Mission: blck_dynamicUMS_MissionsRuning = %1 | blck_missionsRunning = %2 | blck_UMS_ActiveDynamicMissions = %3",blck_dynamicUMS_MissionsRuning,blck_missionsRunning,blck_UMS_ActiveDynamicMissions]};; +#endif +blck_UMS_ActiveDynamicMissions pushBack _pos; +blck_missionsRunning = blck_missionsRunning + 1; +blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning + 1; +//diag_log format["[blckeagls] UMS Spawner:-> waiting for %1",_waitTime]; +uiSleep _waitTime; +//diag_log format["[blckeagls] UMS Spawner:-> spawning mission %1",_UMS_mission]; +[_pos,_mission] call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1",_UMS_mission]; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addItemToCrate.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addItemToCrate.sqf new file mode 100644 index 0000000..7824516 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addItemToCrate.sqf @@ -0,0 +1,61 @@ +/* + [_item,_crate] call blck_addItemToCrate; + where + _crate is a container such as ammo box or vehicle + _item is a string or array. + If _item is a string then add 1 of that item to the container. + If _item is an array with 2 elements ["itemName",3] then assume that the first element is a string and is the name of the item, and the second is the number to add. + if _item is an array with 3 elements ["itemName",2,6] assume that the first element is the item name (string), the second the min # to add and the third the max # to add. + By Ghostrider-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["_itemInfo","_crate",["_addAmmo",0]]; + private["_isRifle","_isMagazine","_isBackpack"]; + _isWeapon = false; + _isMagazine = false; + _isBackpack = false; + _quant = 0; + //diag_log format["_fn_addItemToCrate:: -- >> itemInfor = %1",_itemInfo]; + if (typeName _itemInfo isEqualTo "STRING") then {_item = _itemInfo; _quant = 1}; // case where only the item descriptor was provided + if (typeName _itemInfo isEqualTo "ARRAY") then { + + if (count _itemInfo isEqualTo 2) then {_item = _itemInfo select 0; _quant = _itemInfo select 1;}; // case where item descriptor and quantity were provided + if (count _itemInfo isEqualto 3) then { + _item = _itemInfo select 0; + _quant = (_itemInfo select 1) + round(random((_itemInfo select 2) - (_itemInfo select 1))); + }; // case where item descriptor, min number and max number were provided. + }; + if (((typeName _item) isEqualTo "STRING") && (_item != "")) then + { + if (isClass(configFile >> "CfgWeapons" >> _item)) then { + _crate addWeaponCargoGlobal [_item,_quant]; + _isWeapon = true; + _count = 0; + if (typeName _addAmmo isEqualTo "SCALAR") then + { + _count = _addAmmo; + }; + if (typeName _addAmmo isEqualto "ARRAY") then + { + _count = (_addAmmo select 0) + (round(random((_addAmmo select 1) - (_addAmmo select 0)))); + }; + _ammo = getArray (configFile >> "CfgWeapons" >> _item >> "magazines"); + for "_i" from 1 to _count do + { + _crate addMagazineCargoGlobal [selectRandom _ammo,1]; + }; + }; + if (_item isKindOf ["Bag_Base", configFile >> "CfgVehicles"]) then {_crate addBackpackCargoGlobal [_item,_quant]; _isBackpack = true;}; + if (isClass(configFile >> "CfgMagazines" >> _item)) then {_crate addMagazineCargoGlobal [_item,_quant]; _isMagazine = true;}; + if (!_isWeapon && !_isMagazine && _isBackpack && isClass(configFile >> "CfgVehicles" >> _item)) then {_crate addItemCargoGlobal [_item,_quant]}; + }; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addLiveAItoQue.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addLiveAItoQue.sqf new file mode 100644 index 0000000..fb01566 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addLiveAItoQue.sqf @@ -0,0 +1,22 @@ +/* + Adds a list of live AI associated with a mission to a que of live AI that will be deleted at a later time by the main thread + call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs + + By Ghostrider-GRG- + Copyright 2016 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +//diag_log format["_fnc_addLiveAIToQue:: -> when called, blck_liveMissionAI = %1",blck_liveMissionAI]; +params["_aiList","_timeDelay"]; +//diag_log format["_fnc_addLiveAIToQue:: -->> _aiList = %1 || _timeDelay = %2",_aiList,_timeDelay]; +blck_liveMissionAI pushback [_aiList, (diag_tickTime + _timeDelay)]; +//diag_log format["_fnc_addLiveAIToQue:: -> blck_fnc_addLiveAI updated to %1",blck_liveMissionAI]; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf new file mode 100644 index 0000000..5d03d6b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf @@ -0,0 +1,41 @@ +/* + Adds the basic list of parameters that define a mission such as the marker name, mission list, mission path, AI difficulty, and timer settings, to the arrays that the main thread inspects. + + 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["_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 +{ + _waitTime = diag_tickTime + (_tMin) + random((_tMax) - (_tMin)); + // 0 1 2 3 4 5 6 7 8 + //_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 >= 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 >= 4) then {diag_log format["_fnc_addMissionToQue:: -- >> Result - blck_pendingMissions = %1",blck_pendingMissions];}; +#endif \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addObjToQue.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addObjToQue.sqf new file mode 100644 index 0000000..389be0d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addObjToQue.sqf @@ -0,0 +1,22 @@ +/* + Adds a list of live AI associated with a mission to a que of live AI that will be deleted at a later time by the main thread + call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs + + By Ghostrider-GRG- + Copyright 2016 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_objList","_timeDelay"]; +//diag_log format["_fnc_addObjToQue:: -- >> _objList = %1 || _timeDelay = %2",_objList,_timeDelay]; +//diag_log format["_fnc_addObjToQue:: (11) -- >> blck_oldMissionObjects prior to update = %1",blck_oldMissionObjects]; +blck_oldMissionObjects pushback [_objList, (diag_tickTime + _timeDelay)]; +//diag_log format["_fnc_addObjToQue:: (11) -- >> blck_oldMissionObjects after update = %1",blck_oldMissionObjects]; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf new file mode 100644 index 0000000..285ed87 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf @@ -0,0 +1,34 @@ + // Delete objects in a list after a certain time. + // code to delete any smoking or on fire objects adapted from kalania + //http://forums.bistudio.com/showthread.php?165184-Delete-Fire-Effect/page1 + // http://forums.bistudio.com/showthread.php?165184-Delete-Fire-Effect/page2 +/* + 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"; + +private["_oldObjs"]; +for "_i" from 1 to (count blck_oldMissionObjects) do { + if (_i <= count blck_oldMissionObjects) then { + _oldObjs = blck_oldMissionObjects deleteat 0; + _oldObjs params ["_objarr","_timer"]; + if (diag_tickTime > _timer) then { + { + deleteVehicle _x; + } forEach _objarr; + //uiSleep 0.1; + } + else { + blck_oldMissionObjects pushback _oldObjs; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_clearMines.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_clearMines.sqf new file mode 100644 index 0000000..4f4c72c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_clearMines.sqf @@ -0,0 +1,22 @@ +// removes mines in a region centered around a specific position. +/* + 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 ["_mines"]; +//_mines = _this select 0; // array containing the mines to be deleted +//diag_log format["deleting %1 mines----- >>>> ", count _mines]; +{ + deleteVehicle _x; +} forEach _mines; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf new file mode 100644 index 0000000..093c9c9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf @@ -0,0 +1,18 @@ +/* + 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"; + +// can probably hook this onto signalEnd as they do the same things +// Left here for legacy compatability with some GRG addons. +params["_crate"]; + +[_crate] call blck_fnc_signalEnd; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf new file mode 100644 index 0000000..b0b0d0e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf @@ -0,0 +1,17 @@ +/* + 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["_crate"]; +private _result = if ((_crate distance (_crate getVariable["crateSpawnPos",[0,0,0]])) > 10) then {true} else {false}; +//diag_log format["_fn_crateMoved:: _crate %1 | crateSpawnPos %2 | _result = %3",_crate,_result]; +_result; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf new file mode 100644 index 0000000..89ec9ef --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf @@ -0,0 +1,136 @@ +/* + schedules deletion of all remaining alive AI and mission objects. + Updates the mission que. + Updates mission markers. + 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["_cleanupAliveAITimer","_cleanupCompositionTimer","_isScubaMission"]; + +_fn_missionCleanup = { + params["_mines","_objects","_blck_AllMissionAI","_mission","_cleanupAliveAITimer","_cleanupCompositionTimer",["_isScubaMission",false]]; + //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; + }; + if (_isScubaMission) then + { + blck_priorDynamicUMS_Missions pushback [_coords,diag_tickTime]; + blck_UMS_ActiveDynamicMissions = blck_UMS_ActiveDynamicMissions - [_coords]; + blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning - 1; + }; +}; + +/////////////////////////////////////////////////////////////////////// +// MAIN FUNCTION STARTS HERE +////////////////////////////////////////////////////////////////////// + #ifdef blck_debugMode + diag_log format["_fnc_endMission: _this = %1",_this]; + #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 | _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 (_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 + [_blck_localMissionMarker select 0] call blck_fnc_deleteMarker; + _cleanupCompositionTimer = 0; + _cleanupAliveAITimer = 0; + + [_mines,_objects,_blck_AllMissionAI,_mission,_cleanupAliveAITimer,_cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup; + { + //if (local _x) then {deleteVehicle _x}; + }forEach _crates; + { + deleteVehicle _x; + }forEach _vehicles; + }; + 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 + { + [_crates select 0] spawn blck_fnc_signalEnd; + { + _x enableRopeAttach true; + }forEach _crates; + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] _fnc_endMission:: (18) SignalEnd called: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + }; + #ifdef blck_debugMode + if (blck_debugLevel > 0) then { + diag_log format["_fnc_endMission: Mission Completed without errors, setting all timers to default values"]; + }; + #endif + + _cleanupCompositionTimer = blck_cleanupCompositionTimer; + _cleanupAliveAITimer = blck_AliveAICleanUpTimer; + if (_endCondition == 0) then {[["end",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;}; + if (_endCondition == -1) then {[["warning",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;}; + [_blck_localMissionMarker select 0] call blck_fnc_deleteMarker; + [_blck_localMissionMarker select 1, _markerClass] spawn blck_fnc_missionCompleteMarker; + // 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. + { + if !(_x getVariable["lootLoaded",false]) then + { + // _crateLoot,_lootCounts are defined above and carry the loot table to be used and the number of items of each category to load + [_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes; + }; + }forEach _crates; + { + private ["_v","_posnVeh"]; + _posnVeh = blck_monitoredVehicles find _x; // returns -1 if the vehicle is not in the array else returns 0-(count blck_monitoredVehicles -1) + if (_posnVeh >= 0) then + { + #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]; + blck_monitoredVehicles pushback _x; + }; + } forEach _vehicles; + [_mines,_objects,_blck_AllMissionAI,_mission,_cleanupAliveAITimer,_cleanupCompositionTimer,_isScubaMission] call _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 + //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/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf new file mode 100644 index 0000000..02d4ccc --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf @@ -0,0 +1,164 @@ + +/* + 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["_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"]; + _boxLoot params["_weapons","_magazines","_optics","_materials","_items","_backpacks"]; + + //diag_log format["_fnc_fillBoxes: _weapons = %1",_weapons]; + if !(_weapons isEqualTo []) then + { + _tries = [_wepCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (31): loading %1 weapons",_tries]; + // Add some randomly selected weapons and corresponding magazines + for "_i" from 0 to (_tries - 1) do + { + _item = selectRandom _weapons; + //diag_log format["_fnc_fillBoxes with weapons: _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 + if (count _item >1) then { // if the array has more than one element assume the second is the ammo to use. + _crate addMagazineCargoGlobal [_item select 1, 1 + round(random(3))]; + } else { // if the array has only one element then lets load random ammo for it + _crate addMagazineCargoGlobal [selectRandom (getArray (configFile >> "CfgWeapons" >> (_item select 0) >> "magazines")), 1 + round(random(3))]; + }; + } else { + if (_item isKindOf ["Rifle", configFile >> "CfgWeapons"]) then + { + _crate addWeaponCargoGlobal [_item, 1]; + _crate addMagazineCargoGlobal [selectRandom (getArray (configFile >> "CfgWeapons" >> _item >> "magazines")), 1 + round(random(3))]; + }; + }; + }; + }; + + //diag_log format["_fnc_fillBoxes: _magazines = %1",_magazines]; + if !(_magazines isEqualTo []) then + { + _tries = [_magCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (26): loading %1 magazines",_tries]; + // Add Magazines, grenades, and 40mm GL shells + for "_i" from 0 to (_tries - 1) do + { + _item = selectRandom _magazines; + //diag_log format["_fnc_fillBoxes with magazines: _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]; + }; + }; + }; + + //diag_log format["_fnc_fillBoxes: _optics = %1",_optics]; + if !(_optics isEqualTo []) then + { + _tries = [_opticsCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (72): loading %1 optics",_tries]; + // Add Optics + for "_i" from 0 to (_tries - 1) do + { + _item = selectRandom _optics; + //diag_log format["_fnc_fillBoxes with optics: _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]; + }; + }; + }; + + //diag_log format["_fnc_fillBoxes: _materials = %1",_materials]; + if !(_materials isEqualTo []) then + { + _tries = [_materialsCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (92): loading %1 materials",_materialsCnt]; + // Add materials (cindar, mortar, electrical parts etc) + for "_i" from 0 to (_tries - 1) do + { + _item = selectRandom _materials; + //diag_log format["_fnc_fillBoxes with materials: _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]; + }; + }; + }; + + //diag_log format["_fnc_fillBoxes: _items = %1",_items]; + if !(_items isEqualTo []) then + { + _tries = [_itemCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (112): loading %1 items",_itemCnt]; + // Add Items (first aid kits, multitool bits, vehicle repair kits, food and drinks) + for "_i" from 0 to (_tries - 1) do + { + _item = selectRandom _items; + //diag_log format["_fnc_fillBoxes with items: _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]; + }; + }; + }; + + //diag_log format["_fnc_fillBoxes: _backpacks = %1",_backpacks]; + if !(_backpacks isEqualTo []) then + { + _tries = [_bkcPckCnt] call blck_fnc_getNumberFromRange; + //diag_log format["_fnc_fillBoxes (132): loading %1 backpacks",_tries]; + for "_i" from 0 to (_tries - 1) do + { + _item = selectRandom _backpacks; + //diag_log format["_fnc_fillBoxes with backpacks: _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 "; + //diag_log format["testCrateLoading: crate inventory = %1",getItemCargo _crate]; + //diag_log "_fnc_fillBoxes "; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf new file mode 100644 index 0000000..49c86f6 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf @@ -0,0 +1,65 @@ + +/* + 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["_center", + "_garrisonedBuilding_ATLsystem", + ["_aiDifficultyLevel","Red"], + ["_uniforms",[]], + ["_headGear",[]], + ["_vests",[]], + ["_backpacks",[]], + ["_weaponList",[]], + ["_sideArms",[]] +]; + +if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; + +/* +{ + diag_log format["_fnc_garrisonBuilding_ATLsystem: _this %1 = %2",_forEachIndex,_this select _forEachIndex]; +}forEach _this; +*/ + +private["_group","_buildingsSpawned","_staticsSpawned","_g","_building","_return"]; +_buildingsSpawned = []; +_staticsSpawned = []; +_group = [blck_AI_Side,true] call blck_fnc_createGroup; +if !(isNull _group) then +{ + { + _g = _x; + /* + { + diag_log format["_g %1 = %2",_forEachIndex,_g select _forEachIndex]; + }forEach _g; + */ + // ["Land_Unfinished_Building_02_F",[-28.3966,34.8145,-0.00268841],0,true,true,[["B_HMG_01_high_F",[-5.76953,1.16504,7.21168],360]],[]], + _x params["_bldClassName","_bldRelPos","_bldDir","_s","_d","_statics","_men"]; + //diag_log format["_bldClassName = %1 | _bldRelPos = %2 | _bldDir = %3",_bldClassName,_bldRelPos,_bldDir]; + _building = createVehicle[_bldClassName,[0,0,0],[],0,"CAN_COLLIDE"]; + _building setPosATL (_bldRelPos vectorAdd _center); + _building setDir _bldDir; + _buildingsSpawned pushBack _building; + // params["_building","_group","_statics","_men",["_aiDifficultyLevel","Red"], ["_uniforms",[]],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_launcher","none"],["_weaponList",[]],["_sideArms",[]]]; + _staticsSpawned = [_building,_group,_statics,_men,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,"none",_weaponList,_sideArms] call blck_fnc_spawnGarrisonInsideBuilding_ATL; + }forEach _garrisonedBuilding_ATLsystem; +}; +//{ + //diag_log format["__fnc_garrisonBuilding_ATLsystem: %2 = %1",_x select 1, _x select 0]; +//}forEach [ [_buildingsSpawned,"Buildings"],[_staticsSpawned,"Statics"]]; +_return = [_group,_buildingsSpawned,_staticsSpawned]; +_return diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf new file mode 100644 index 0000000..64aca66 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf @@ -0,0 +1,54 @@ + +/* + 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["_center","_garrisonedBuilding_relPosSystem", + ["_aiDifficultyLevel","Red"], + ["_uniforms",[]], + ["_headGear",[]], + ["_vests",[]], + ["_backpacks",[]], + ["_weaponList",[]], + ["_sideArms",[]] + ]; +/* +{ + diag_log format["_fnc_garrisonBuilding_relPosSystem: _this %1 = %2",_forEachIndex,_this select _forEachIndex]; +}forEach _this; +*/ +if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; +private["_group","_buildingsSpawned","_staticsSpawned","_g","_building","_return"]; +_buildingsSpawned = []; +_staticsSpawned = []; +_group = [blck_AI_Side,true] call blck_fnc_createGroup; +if !(isNull _group) then +{ + { + _g = _x; + // ["Land_Unfinished_Building_02_F",[-21.8763,-45.978,-0.00213432],0,true,true,0.67,3,[],4], + _g params["_bldClassName","_bldRelPos","_bldDir","_s","_d","_p","_noStatics","_typesStatics","_noUnits"]; + if (_typesStatics isEqualTo []) then {_typesStatics = ["B_HMG_01_high_F"]}; + _building = createVehicle[_bldClassName,[0,0,0],[],0,"CAN_COLLIDE"]; + _buildingsSpawned pushBack _building; + _building setPosATL (_bldRelPos vectorAdd _center); + _building setDir _bldDir; + _staticsSpawned = [_building,_group,_noStatics,_typesStatics,_noUnits,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,"none",_weaponList,_sideArms] call blck_fnc_spawnGarrisonInsideBuilding_relPos; + }forEach _garrisonedBuilding_relPosSystem; +}; +_return = [_group,_buildingsSpawned,_staticsSpawned]; +_return + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf new file mode 100644 index 0000000..103389d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf @@ -0,0 +1,19 @@ +/* + 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 _crate = _this select 0; +[_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/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf new file mode 100644 index 0000000..b31b6e3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -0,0 +1,597 @@ +/* + Dynamic Mission Spawner (over-ground missions) + By Ghostrider GRG + Copyright 2016 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#define delayTime 1 +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","_vehicleCrewCount"]; + +params["_coords","_markerClass","_aiDifficultyLevel"]; + +[_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]; + +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 "_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 = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; +if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol}; +if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols}; +if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops}; +if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis}; +if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops}; +if (isNil "_chanceLoot") then {_chanceLoot = 1.0}; //0.5}; +if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;}; +if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Green}; // Add diffiiculty based settings +if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed}; // Add difficulty based settings +if (isNil "_missionLootVehicles") then {_missionLootVehicles = []}; +if (isNil "_garrisonedBuilding_ATLsystem") then {_garrisonedBuilding_ATLsystem = []}; +if (isNil "_garrisonedBuildings_BuildingPosnSystem") then {_garrisonedBuildings_BuildingPosnSystem = []}; +if (isNil "_vehicleCrewCount") then {_vehicleCrewCount = [_aiDifficultyLevel] call GMS_fnc_selectVehicleCrewCount}; + +_objects = []; +_mines = []; +_crates = []; +_aiGroup = []; +_missionAIVehicles = []; +_blck_AllMissionAI = []; +_AI_Vehicles = []; +_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType]; +#define delayTime 1 +#define useRelativePos true + +#ifdef blck_debugMode +diag_log "_missionSpawner: All variables initialized"; +#endif + +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? +[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers; +_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker; + +#ifdef blck_debugMode +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 +//////// + +_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"}; + diag_log format["missionSpawner (163) blck_MissionTimeout = %1", blck_MissionTimeout]; +#endif + +while {_wait} do +{ + //ifdef blck_debugMode + 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,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; + uiSleep 5; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + 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,blck_MissionTimeout] call blck_fnc_timedOut]; + }; + #endif +}; + +if (_missionTimedOut) exitWith +{ + diag_log format["_fnc_missionSpawner (187): mission timed out"]; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; +}; + +//////////////////////////////////////////////// +// Spawn the mission objects, loot chest, and AI +/////////////////////////////////////////////// +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (200) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate +{ + _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; +_temp = []; + +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; +}; +if (typeName _temp isEqualTo "ARRAY") then +{ + _objects append _temp; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (237) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +uiSleep delayTime; + +_abort = false; +_temp = [[],[],false]; + +#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; + +_abort = _temp select 1; + +if !(_abort) then +{ + _blck_AllMissionAI append (_temp select 0); +}; + +#ifdef blck_debugMode +uiSleep 10; +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (288) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +_assetSpawned = objNull; +if !(_hostageConfig isEqualTo []) then +{ + _temp = [_coords,_hostageConfig] call blck_fnc_spawnHostage; + _assetSpawned = _temp select 0; + _objects pushBack (_temp select 1); + _blck_AllMissionAI pushBack _assetSpawned; +}; + +if !(_enemyLeaderConfig isEqualTo []) then +{ + _temp = [_coords,_enemyLeaderConfig] call blck_fnc_spawnLeader; + _assetSpawned = _temp select 0; + _objects pushBack (_temp select 1); + _blck_AllMissionAI pushBack _assetSpawned; +}; + +uiSleep delayTime; +_temp = [[],[],false]; +_abort = false; + +// Deal with helicopter patrols +_temp = []; +_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange; +if (_noChoppers > 0) then +{ + for "_i" from 1 to (_noChoppers) do + { + if (random(1) < _chanceHeliPatrol) then + { + _temp = [_coords,_aiDifficultyLevel,_missionHelis,_uniforms,_headGear,_vests,_backpacks,_weaponList, _sideArms,"none"] call blck_fnc_spawnMissionHeli; + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + if !(_abort) then + { + blck_monitoredVehicles pushBack (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + }; + }; + }; + }; +}; + +#ifdef blck_debugMode +uiSleep 10; +if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (256) helipatrols spawned"}; +#endif + +uisleep 3; +if (count _garrisonedBuilding_ATLsystem > 0) then +{ + _temp = [_coords, _garrisonedBuilding_ATLsystem, _aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_ATLsystem; + _objects append (_temp select 1); + blck_monitoredVehicles append (_temp select 2); + _blck_AllMissionAI append (units (_temp select 0)); +}; + + +#ifdef blck_debugMode +uiSleep 10; +if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (271) garrisons (ATL) spawned"}; +#endif + +uiSleep 3; +if (count _garrisonedBuildings_BuildingPosnSystem > 0) then +{ + _temp = [_coords, _garrisonedBuildings_BuildingPosnSystem, _aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_RelPosSystem; + _objects append (_temp select 1); + blck_monitoredVehicles append (_temp select 2); + _blck_AllMissionAI append (units (_temp select 0)); +}; + +#ifdef blck_debugMode +uiSleep 10; +if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (285) garrisons (building position system) spawned"}; +#endif + +uiSleep 15; +private["_noEmplacedToSpawn"]; +_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange; +if (blck_useStatic && (_noEmplacedToSpawn > 0)) then +{ + _temp = [_coords,_missionEmplacedWeapons,useRelativePos,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray; + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + + if !(_abort) then + { + _objects append (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + }; +}; + +#ifdef blck_debugMode +uiSleep 10; +if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (309) emplaced weapons spawned"}; +#endif + +_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange; +if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then +{ + //diag_log format["_missionSpawner(315): _vehToSpawn = %1 | _missionPatrolVehicles = %2",_vehToSpawn,_missionPatrolVehicles]; + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols; + //diag_log format["_missionSpawner(317): _temp = %1",_temp]; + 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 +uiSleep 10; +if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (330) vehicle patrols spawned"}; +#endif + +uiSleep delayTime; +if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then +{ + 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; + }; +}; +uiSleep delayTime;; + +#ifdef blck_debugMode +uiSleep 10; +if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (355) loot crate(s) spawned"}; +#endif + +if (count _missionLootVehicles > 0) then +{ + _temp = [_coords,_missionLootVehicles,_loadCratesTiming] call blck_fnc_spawnMissionLootVehicles; + _crates append _temp; +}; +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; + }; + }; +}; + +#ifdef blck_debugMode +uiSleep 10; +if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (384) mission loot vehicles spawned"}; +#endif + +private["_missionComplete","_endIfPlayerNear","_endIfAIKilled","_secureAsset","_crateStolen","_locations"]; +_missionComplete = -1; +_startTime = diag_tickTime; + +#ifdef blck_debugMode +uiSleep 10; +if (blck_debugLevel > 2) then {diag_log "_fnc_missionSpawner (393) waiting for mission end contitions to be met"}; +#endif + +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;}; +}; + +if (blck_showCountAliveAI) then +{ + if !(_marker isEqualTo "") then + { + [_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount; + blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI]; + }; +}; + +_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; + +private["_minNoAliveForCompletion","_result","_minPercentageKilled"]; +_minNoAliveForCompletion = (count _blck_AllMissionAI) - (round(blck_killPercentage * (count _blck_AllMissionAI))); +if (_secureAsset) then {_minNoAliveForCompletion = _minNoAliveForCompletion + 1}; + +while {_missionComplete isEqualTo -1} do +{ + #ifdef blck_debugMode + if (blck_debugLevel > 3) 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 + { + if (({alive _x} count _blck_AllMissionAI) <= _minNoAliveForCompletion) then {_missionComplete = 1}; + }; + + if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then + { + { + private _d = _x distance (_x getVariable ["crateSpawnPos",_coords]); + //diag_log format["crate %1 moved %2 at %3",_x,_d,diag_tickTime]; + if (_d > 25) exitWith + { + _missionComplete = 1; + _crateStolen = true; + }; + }forEach _crates; + }; + + if (_secureAsset) then + { + if !(alive _assetSpawned) then + { + _missionComplete = 1; + [_assetSpawned] remoteExec["GMS_fnc_clearAllActions",-2, true]; + } else { + + if (({alive _x} count _blck_AllMissionAI) <= _minNoAliveForCompletion) then + { + if ((_assetSpawned getVariable["blck_unguarded",0]) isEqualTo 0) then + { + _assetSpawned setVariable["blck_unguarded",1,true]; + }; + + if ((_assetSpawned getVariable["blck_AIState",0]) isEqualTo 1) then + { + _missionComplete = 1; + _assetSpawned allowdamage false; + [_assetSpawned] remoteExec["GMS_fnc_clearAllActions",-2, true]; + }; + + }; + }; + }; + 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 +{ + [_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 (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then +{ + if (!(_secureAsset) || (_secureAsset && (alive _assetSpawned))) 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 +{ + if (!(_secureAsset) || (_secureAsset && (alive _assetSpawned))) then + { + { + [_x] call blck_fnc_loadMissionCrate; + } forEach _crates; + }; +}; + +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]; + { + if ((_x select 1) isEqualTo _markerMissionName) exitWith{blck_missionMarkers deleteAt _forEachIndex}; + }forEach blck_missionMarkers; +}; + +if (_secureAsset && (alive _assetSpawned)) then +{ + if (_assetSpawned getVariable["assetType",0] isEqualTo 1) then + { + _assetSpawned setVariable["GMSAnimations",[""],true]; + [_assetSpawned,""] remoteExec["switchMove",-2];; + uiSleep 0.1; + _assetSpawned enableAI "ALL"; + private _newPos = (getPos _assetSpawned) getPos [1000, random(360)]; + (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 + { + [_assetSpawned,""] remoteExec["switchMove",-2]; + _assetSpawned setVariable["GMSAnimations",_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]],true]; + [_assetSpawned,selectRandom(_assetSpawned getVariable["endAnimation",["AidlPercMstpSnonWnonDnon_AI"]])] remoteExec["switchMove",-2]; + }; +}; +if (_secureAsset && !(alive _assetSpawned)) then +{ + _result = [_mines,_objects,_crates,_blck_AllMissionAI,_assetKilledMsg,_blck_localMissionMarker,_coords,_markerClass, -1] call blck_fnc_endMission; +}; + +if (!(_secureAsset) || (_secureAsset && (alive _assetSpawned))) then +{ + _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]; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_paraDropObject.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_paraDropObject.sqf new file mode 100644 index 0000000..f8023e5 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_paraDropObject.sqf @@ -0,0 +1,25 @@ +/* + 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}; +_chute + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selecctChanceParatroops.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selecctChanceParatroops.sqf new file mode 100644 index 0000000..4346e4e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selecctChanceParatroops.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_chancePara"]; +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 = blck_chanceParaRed}; +}; +_chancePara \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIBackpacks.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIBackpacks.sqf new file mode 100644 index 0000000..ac4493b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIBackpacks.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_backpacks"]; +switch (toLower (_aiDifficultyLevel)) do +{ + case "blue": {_backpacks = blck_backpacks_blue}; + case "red": {_backpacks = blck_backpacks_red}; + case "green": {_backpacks = blck_backpacks_green}; + case "orange": {_backpacks = blck_backpacks_orange}; + default {_backpacks = blck_backpacks}; +}; +_backpacks \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIHeadgear.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIHeadgear.sqf new file mode 100644 index 0000000..8f9b638 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIHeadgear.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_headgear"]; +switch (toLower (_aiDifficultyLevel)) do +{ + case "blue": {_headGear = blck_headgear_blue}; + case "red": {_headGear = blck_headgear_red}; + case "green": {_headGear = blck_headgear_green}; + case "orange": {_headGear = blck_headgear_orange}; + default {_headGear = blck_headgear}; +}; +_headgear \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAILoadout.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAILoadout.sqf new file mode 100644 index 0000000..db0f795 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAILoadout.sqf @@ -0,0 +1,29 @@ +/* + [ + _missionColor // ["blue","red","green","orange"] + ] call blck_fnc_selectAILoadout; + + returns: + _lootarray + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private["_weaponList","_missionColor"]; + +_missionColor = _this select 0; +switch (_missionColor) do { + case "blue": {_weaponList = blck_WeaponList_Blue;}; + case "red": {_weaponList = blck_WeaponList_Red;}; + case "green": {_weaponList = blck_WeaponList_Green;}; + case "orange": {_weaponList = blck_WeaponList_Orange;}; + default {_weaponList = blck_WeaponList_Blue;}; +}; +_weaponList diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAISidearms.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAISidearms.sqf new file mode 100644 index 0000000..b73689d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAISidearms.sqf @@ -0,0 +1,25 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; //[["_aiDifficultyLevel",selectRandom["Red","Green"]]]; +//diag_log format["_fnc_selectAISidearms: _aiDifficultyLevel = %1",_aiDifficultyLevel]; +private["_sideArms"]; +switch (toLower (_aiDifficultyLevel)) do +{ + case "blue": {_sideArms = blck_Pistols_blue}; + case "red": {_sideArms = blck_Pistols_red}; + case "green": {_sideArms = blck_Pistols_green}; + case "orange": {_sideArms = blck_Pistols_orange}; + default {_sideArms = blck_Pistols}; +}; +_sideArms \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIUniforms.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIUniforms.sqf new file mode 100644 index 0000000..e2e4ee6 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIUniforms.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_uniforms"]; + switch (toLower (_aiDifficultyLevel)) do + { + case "blue": {_uniforms = blck_SkinList_blue}; + case "red": {_uniforms = blck_SkinList_red}; + case "green": {_uniforms = blck_SkinList_green}; + case "orange": {_uniforms = blck_SkinList_orange}; + default {_uniforms = blck_SkinList}; + }; +_uniforms \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIVests.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIVests.sqf new file mode 100644 index 0000000..5c25fd9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAIVests.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_vests"]; +switch (toLower (_aiDifficultyLevel)) do +{ + case "blue": {_vests = blck_vests_blue}; + case "red": {_vests = blck_vests_red}; + case "green": {_vests = blck_vests_green}; + case "orange": {_vests = blck_vests_orange}; + default {_vests = blck_vests}; +}; +_vests \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectChanceHeliPatrol.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectChanceHeliPatrol.sqf new file mode 100644 index 0000000..f0363fa --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectChanceHeliPatrol.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_chanceHeliPatrol"]; + 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}; + }; +_chanceHeliPatrol \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectMissionHelis.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectMissionHelis.sqf new file mode 100644 index 0000000..637f3e6 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectMissionHelis.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_missionHelis"]; +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}; +}; +_missionHelis \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberAirPatrols.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberAirPatrols.sqf new file mode 100644 index 0000000..62434ef --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberAirPatrols.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_noChoppers"]; +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}; +}; +_noChoppers \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberParatroops.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberParatroops.sqf new file mode 100644 index 0000000..7ca0530 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectNumberParatroops.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_aiDifficultyLevel"]; +private["_noPara"]; +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}; +}; +_noPara \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectVehicleCrewCount.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectVehicleCrewCount.sqf new file mode 100644 index 0000000..1f34079 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectVehicleCrewCount.sqf @@ -0,0 +1,23 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_diff"]; +private ["_count"]; +switch (toLower(_diff)) do +{ + case "blue": {_count = blck_vehCrew_blue}; + case "red": {_count = blck_vehCrew_red}; + case "green": {_count = blck_vehCrew_green}; + case "orange": {_count = blck_vehCrew_orange}; +}; +///diag_log format["_fnc_selectVehicleCrewCount: _count set to %1",_count]; +_count diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_signalEnd.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_signalEnd.sqf new file mode 100644 index 0000000..99f19b9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_signalEnd.sqf @@ -0,0 +1,32 @@ +////////////////////////////////////////////////////// +// Attach a marker of type _marker to an object _crate +// by Ghostrider [GRG] based on code from Wicked AI for Arma 2 Dayz Epoch +///////////////////////////////////////////////////// +/* + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private ["_start","_maxHeight","_smokeShell","_light","_lightSource"]; +params[["_crate",objNull],["_time",60]]; +if (isNull _crate) exitWith {}; +_start = diag_tickTime; +//diag_log format["signalEnd.sqf: _this = %1, _crate = %2",_this, _crate]; +_smokeShell = selectRandom ["SmokeShellOrange","SmokeShellBlue","SmokeShellPurple","SmokeShellRed","SmokeShellGreen","SmokeShellYellow"]; +_lightSource = selectRandom ["Chemlight_green","Chemlight_red","Chemlight_yellow","Chemlight_blue"]; +_light = objNull; +_smoke = _smokeShell createVehicle getPosATL _crate; +_smoke setPosATL (getPosATL _crate); +_smoke attachTo [_crate,[0,0,(0.5)]]; // put the smoke a fixed distance above the top of any object to make it as visible as possible +if(sunOrMoon < 0.2) then +{ + _light = _lightSource createVehicle getPosATL _crate; + _light setPosATL (getPosATL _crate); + _light attachTo [_crate,[0,0,(0.55)]]; +}; +blck_illuminatedCrates pushBack [_crate,_smoke,_light,_smokeShell,_lightSource,diag_tickTime + 120, diag_tickTime + 300]; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddAircraft.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddAircraft.sqf new file mode 100644 index 0000000..2aed2f4 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddAircraft.sqf @@ -0,0 +1,17 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_sm_addAircraft: _this = %5",_this]; +params["_aircraftPatrol"]; +//diag_log format["_sm_addAircraft: _aircraftPatrol = %1",_aircraftPatrol]; +blck_sm_Aircraft pushBack [_aircraftPatrol,grpNull,0]; +//diag_log format["_sm_addAircraft: updated blck_sm_Aircraft = %1",blck_sm_Aircraft]; +true diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddEmplaced.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddEmplaced.sqf new file mode 100644 index 0000000..01d7722 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddEmplaced.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_emplacedWeapon"]; +blck_sm_Emplaced pushBack [_emplacedWeapon,grpNull,0]; +diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddGroup.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddGroup.sqf new file mode 100644 index 0000000..49abe09 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddGroup.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_group"]; +blck_sm_Groups pushBack [_group,grpNull,0]; +diag_log format["_sm_AddGroup:: blck_sm_Groups = %1",blck_sm_Groups]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddGroupToArray.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddGroupToArray.sqf new file mode 100644 index 0000000..4efaebc --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddGroupToArray.sqf @@ -0,0 +1,22 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_array","_patrolInformation",["_timesToRespawn",-1]]; +waitUntil {blck_sm_monitoring isEqualTo 0}; +_array pushBack [ + _patrolInformation, + grpNull, + 0, // groupSpawned + 0, // times Spawned + 0, // Respawn At + _timesToRespawn // Max Times to Respawn +]; +_array diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddVehicle.sqf new file mode 100644 index 0000000..47dd046 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_AddVehicle.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehicle"]; +blck_sm_Vehicles pushBack [_vehicle,grpNull,0]; +//diag_log format["_fnc_sm_AddVehicle: _vehicle = %1",_vehicle]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_init_functions.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_init_functions.sqf new file mode 100644 index 0000000..43476b7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_init_functions.sqf @@ -0,0 +1,81 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log "[blckeagls] GMS_fnc_sm_init_functions.sqf "; +//blck_sm_Groups = []; +blck_sm_Infantry = []; +blck_sm_Vehicles = []; +blck_sm_Aircraft = []; +blck_sm_Emplaced = []; +blck_sm_scubaGroups = []; +blck_sm_surfaceShips = []; +blck_sm_submarines = []; +blck_sm_lootContainers = []; +blck_sm_garrisonBuildings_ASL = []; +blcl_sm_garrisonBuilding_relPos = []; + +blck_fnc_sm_AddGroupToArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroupToArray.sqf"; + +/* +blck_fnc_sm_AddGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroup.sqf"; +blck_fnc_sm_AddVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddVehicle.sqf"; +blck_fnc_sm_AddAircraft = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddAircraft.sqf"; +blck_fnc_sm_AddEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddEmplaced.sqf"; +*/ +// TODO: Delte soon +private _functions = [ + //["blck_fnc_sm_monitorStaticUnits","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticPatrols.sqf"], + ["blck_fnc_sm_monitorInfantry","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorInfantry.sqf"], + ["blck_fnc_sm_monitorScuba","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorScuba.sqf"], + ["blck_fnc_sm_monitorVehicles","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorVehicles.sqf"], + ["blck_fnc_sm_monitorAircraft","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorAircraft.sqf"], + ["blck_fnc_sm_monitorShips","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorShips.sqf"], + ["blck_fnc_sm_monitorSubs","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorSubs.sqf"], + ["blck_fnc_sm_monitorEmplaced","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorEmplaced.sqf"], + ["blck_fnc_sm_monitorGarrisonsASL","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorGarrisonsASL.sqf"], + ["blck_fnc_sm_monitorGarrisons_relPos","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorGarrisons_relPos.sqf"], + ["blck_fnc_sm_spawnVehiclePatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrol.sqf"], + ["blck_fnc_sm_spawnAirPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrol.sqf"], + ["blck_fnc_sm_spawnEmplaced","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf"], +// ["blck_fnc_sm_spawnInfantryPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf"], + ["blck_fnc_sm_staticPatrolMonitor","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_staticPatrolMonitor.sqf"], +// ["blck_fnc_sm_checkForPlayerNearMission","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_checkForPlayerNearMission.sqf"], + ["blck_fnc_sm_spawnAirPatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrols.sqf"], + ["blck_fnc_sm_spawnEmplaceds","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf"], + ["blck_fnc_sm_spawnInfantryPatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnInfantryPatrols.sqf"], + ["blck_fnc_sm_spawnLootContainers","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnLootContainers.sqf"], + ["blck_fnc_sm_spawnObjects","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjects.sqf"], + ["blck_fnc_sm_spawnVehiclePatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrols.sqf"], + ["blck_fnc_sm_spawnBuildingGarrison_ASL","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnBuildingGarrisonASL.sqf"], + ["blck_fnc_sm_spawnBuildingGarrison_relPos","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf"], + ["blck_fnc_sm_spawnObjectASLVectorDirUp","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf"], + ["blck_fnc_spawnScubaGroup","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnScubaGroup.sqf"], + ["blck_fnc_spawnSDVPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnSDVPatrol.sqf"], + ["blck_fnc_spawnSurfacePatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnSurfacePatrol.sqf"], + //["blck_fnc_sm_AddScubaGroup","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddScubaGroup.sqf"], + //["blck_fnc_sm_AddSurfaceVehicle","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddSurfaceVehicle.sqf"], + ["blck_fnc_sm_AddSDVVehicle","\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddSDVVehicle.sqf"] +]; +{ + _x params ["_name","_path"]; + missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path]; +} foreach _functions; + +diag_log "[blckeagls] GMS_sm_init_functions.sqf "; + + +/* +blck_fnc_spawnScubaGroup = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnScubaGroup.sqf"; +blck_fnc_spawnSDVPatrol = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnSDVPatrol.sqf"; +blck_fnc_spawnSurfacePatrol = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnSurfacePatrol.sqf"; +blck_fnc_sm_AddScubaGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddScubaGroup.sqf"; +blck_fnc_sm_AddSurfaceVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddSurfaceVehicle.sqf"; +blck_fnc_sm_AddSDVVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddSDVVehicle.sqf"; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_initializeMission.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_initializeMission.sqf new file mode 100644 index 0000000..c0fe1b9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_initializeMission.sqf @@ -0,0 +1,88 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_mission"]; +// Spawn landscape +// params["_objects"]; +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +if (isNil "_missionLandscape") then {_missionLandscape = []}; +if (isNil "_garrisonedBuilding_ASLsystem") then { + //diag_log "_fnc_sm_initializeMission: _garrisonedBuilding_ASLsystem set to []"; + _garrisonedBuilding_ASLsystem = []; + }; +if (isNil "_garrisonedBuildings_BuildingPosnSystem") then { + //diag_log "_fnc_sm_initializeMission: _garrisonedBuildings_BuildingPosnSystem set to []"; + _garrisonedBuildings_BuildingPosnSystem = []; + }; +if (isNil "_airPatrols") then {_airPatrols = []}; +if (isNil "_aiGroupParameters") then {_aiGroupParameters = []}; +if (isNil "_missionEmplacedWeapons") then {_missionEmplacedWeapons = []}; +if (isNil "_vehiclePatrolParameters") then {_vehiclePatrolParameters = []}; +if (isNil "_missionLootVehicles") then {_missionLootVehicles = []}; + +_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,[_missionCenter,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; + +{ + //diag_log format["processing _garrisonedBuilding_ASL %1 which = %2",_forEachIndex,_x]; + // ["Land_i_House_Big_02_V2_F",[23650.3,18331.9,3.19],[[0,1,0],[0,0,1]],[true,true],"Red", + _x params["_buildingClassName","_buildingPosnASL","_buildingVectorDirUp","_buildingDamSim","_aiDifficulty","_staticsASL","_unitsASL","_respawnTimer","_noRespawns"]; + private _building = [_buildingClassName,_buildingPosnASL,_buildingVectorDirUp,_buildingDamSim] call blck_fnc_sm_spawnObjectASLVectorDirUp; + [blck_sm_garrisonBuildings_ASL,[_building,_aiDifficulty,_staticsASL,_unitsASL,_respawnTimer,_noRespawns]] call blck_fnc_sm_AddGroupToArray; + //diag_log format["_fnc_sm_initializeMission: blck_sm_garrisonBuildings_ASL updated to: %1",blck_sm_garrisonBuildings_ASL]; +}forEach _garrisonedBuilding_ASLsystem; + +// blcl_sm_garrisonBuilding_relPos +{ + //diag_log format["processing _garrisonedBuilding_relPos %1 which = %2",_forEachIndex,_x]; + _x params["_buildingClassName","_buildingPosnASL","_buildingVectorDirUp","_buildingDamSim","_aiDifficulty","_p","_noStatics","_typesStatics","_noUnits","_respawnTimer","_noRespawns"]; + private _building = [_buildingClassName,_buildingPosnASL,_buildingVectorDirUp,_buildingDamSim] call blck_fnc_sm_spawnObjectASLVectorDirUp; + [blcl_sm_garrisonBuilding_relPos,[_building,_aiDifficulty,_noStatics,_typesStatics,_noUnits,_respawnTimer,_noRespawns]] call blck_fnc_sm_AddGroupToArray; + //diag_log format["_fnc_sm_initializeMission: blcl_sm_garrisonBuilding_relPos updated to: %1",blcl_sm_garrisonBuilding_relPos]; +}forEach _garrisonedBuildings_BuildingPosnSystem; + +{ + [blck_sm_Aircraft,_x] call blck_fnc_sm_AddGroupToArray; + +}forEach _airPatrols; +//uiSleep 1; + +{ + [blck_sm_Infantry,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _aiGroupParameters; + +{ + [blck_sm_Emplaced,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _missionEmplacedWeapons; + +{ + [blck_sm_Vehicles,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _vehiclePatrolParameters; + +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/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_initializeUMSStaticMission.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_initializeUMSStaticMission.sqf new file mode 100644 index 0000000..e1ed9a3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_initializeUMSStaticMission.sqf @@ -0,0 +1,73 @@ +/* + 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["_mission"]; +// Spawn landscape +// params["_objects"]; +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 "_missionLandscape") then {_missionLandscape = []}; +if (isNil "_garrisonedBuilding_ASLsystem") then {_garrisonedBuilding_ASLsystem = []}; +if (isNil "_garrisonedBuildings_BuildingPosnSystem") then {_garrisonedBuildings_BuildingPosnSystem = []}; +if (isNil "_airPatrols") then {_airPatrols = []}; +if (isNil "_aiGroupParameters") then {_aiGroupParameters = []}; +if (isNil "_missionEmplacedWeapons") then {_missionEmplacedWeapons = []}; +if (isNil "_vehiclePatrolParameters") then {_vehiclePatrolParameters = []}; +if (isNil "_missionLootVehicles") then {_missionLootVehicles = []}; + +_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,[_missionCenter,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; +//diag_log format["_fnc_sm_initializeUMSStaticMission: count _airPatrols = %1 | _airPatrols = %2", count _airPatrols, _airPatrols]; +{ + [blck_sm_Aircraft,_x] call blck_fnc_sm_AddGroupToArray; + +}forEach _airPatrols; +//uiSleep 1; + +{ + [blck_sm_Infantry,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _aiGroupParameters; + +{ + [blck_sm_scubaGroups,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _aiScubaGroupParameters; + +{ + [blck_sm_Emplaced,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _missionEmplacedWeapons; + +{ + [blck_sm_surfaceShips,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _vehiclePatrolParameters; + +{ + [blck_sm_submarines,_x] call blck_fnc_sm_AddGroupToArray; +} forEach _submarinePatrolParameters; +//uiSleep 30; +// spawn loot chests +[_missionLootBoxes,_missionCenter] call blck_fnc_sm_spawnLootContainers; + +diag_log format["[blckeagls] UMS Mission Spawner: Static UMS Mission %1 spawned",_mission]; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorAircraft.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorAircraft.sqf new file mode 100644 index 0000000..325b8d2 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorAircraft.sqf @@ -0,0 +1,93 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//private["_mode","_sm_groups"]; +//_sm_groups = +blck_sm_Aircraft; +//diag_log format["_fnc_monitorAircraft: time %2 | blck_sm_Aircraft %1",blck_sm_Aircraft,diag_tickTime]; +for "_i" from 1 to (count blck_sm_Aircraft) do +{ + if (_i == (count blck_sm_Aircraft)) exitWith {}; + private _element = blck_sm_Aircraft deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorAircraft: _x %1",_element]; + //diag_log format["_fnc_monitorAircraft: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorAircraft (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + //diag_log format["_fnc_monitorAircraft: _aircraftType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_aircraftType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; + _group = group (driver (_return select 0)); + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + }; + blck_sm_Aircraft pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_Aircraft pushBack _element; + //diag_log format["_fnc_monitorAircraft: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorAircraft(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorAircraft: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorAircraft: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_Aircraft pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorAircraft: despanwing patrol for _element %1",_element]; + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_Aircraft pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorEmplaced.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorEmplaced.sqf new file mode 100644 index 0000000..a4cb16b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorEmplaced.sqf @@ -0,0 +1,92 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +//diag_log format["_fnc_monitorEmplaced: time %2 | blck_sm_Emplaced %1",blck_sm_Emplaced,diag_tickTime]; +for "_i" from 0 to (count blck_sm_Emplaced) do +{ + if (_i >= (count blck_sm_Emplaced)) exitWith {}; + private _element = blck_sm_Emplaced deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorEmplaced: _element %1",_element]; + //diag_log format["_fnc_monitorEmplaced: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorEmplaced (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + //diag_log format["_fnc_monitorEmplaced: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + // params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]]]; + private _return = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray; + _group = group( (_return select 1) select 0); + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + }; + blck_sm_Emplaced pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_Emplaced pushBack _element; + //diag_log format["_fnc_monitorEmplaced: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorEmplaced(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorEmplaced: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorEmplaced: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_Emplaced pushBack _element; + } else { + if (diag_tickTime >= (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorEmplaced: despanwing patrol for _element %1",_element]; + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_Emplaced pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorGarrisonsASL.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorGarrisonsASL.sqf new file mode 100644 index 0000000..b48d478 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorGarrisonsASL.sqf @@ -0,0 +1,97 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_mode","_sm_groups"]; +//diag_log format["_fnc_sm_monitorGarrisonASL: blck_fnc_spawnGarrisonInsideBuilding_ATL = %1",blck_sm_garrisonBuildings_ASL]; +if (blck_sm_garrisonBuildings_ASL isEqualTo []) exitWith {}; +for "_i" from 0 to (count blck_sm_garrisonBuildings_ASL) do + { + if (_i >= (count blck_sm_garrisonBuildings_ASL)) exitWith {}; + private _element = blck_sm_garrisonBuildings_ASL deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; + // ["_building","_aiDifficultyLevel","_staticsATL","_unitsATL"]; + _groupParameters params['_building','_aiDifficulty','_staticsASL','_unitsASL','_respawnTime','_maxRespawns']; + //diag_log format["_fnc_sm_monitorGarrisonASL: _group = %1 | _timesSpawned = %2 | _respawnTime = %3 | _respawnAt = %4 | _groupSpawned = %5",_group,_timesSpawned,_respawnTime,_respawnAt,_groupSpawned]; + private _pos = position _building; + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + // ["_building","_aiDifficultyLevel","_staticsATL","_unitsATL"] + //diag_log format + private _group = [_building,_aiDifficulty,_staticsASL,_unitsASL] call blck_fnc_sm_spawnBuildingGarrison_ASL; + _timesSpawned = _timesSpawned + 1; + _groupSpawned = 1; + _respawnAt = 0; + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned]; + _element set[respawnAt,_respawnAt]; + //blck_sm_garrisonBuildings_ASL set[blck_sm_garrisonBuildings_ASL find _x,_element]; + }; + blck_sm_garrisonBuildings_ASL pushBack _element; + }; + case 2: { + _groupSpawned = 0; + _respawnAt = diag_tickTime + _respawnTime; + _element set[respawnAt,_respawnAt]; + _element set[groupSpawned,_groupSpawned]; + //blck_sm_garrisonBuildings_ASL set[blck_sm_garrisonBuildings_ASL find _x,_element]; + blck_sm_garrisonBuildings_ASL pushBack _element; + }; + default {}; + }; + + } else { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + blck_sm_garrisonBuildings_ASL pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + //blck_sm_garrisonBuildings_ASL set[(blck_sm_garrisonBuildings_ASL find _x), _element]; + + }; + blck_sm_garrisonBuildings_ASL pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorGarrisons_relPos.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorGarrisons_relPos.sqf new file mode 100644 index 0000000..af99c94 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorGarrisons_relPos.sqf @@ -0,0 +1,89 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_mode","_sm_groups","_pos","_element"]; +if (blck_fnc_sm_spawnBuildingGarrison_relPos isEqualTo []) exitWith {}; +_sm_groups = +blcl_sm_garrisonBuilding_relPos; + +{ + _x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; + // [_building,_aiDifficulty,_noStatics,_typesStatics,_noUnits,_respawn] + _groupParameters params['_building','_aiDifficulty','_noStatics','_typesStatics','_noUnits','_respawnTime','_maxRespawns']; + _element = +_x;// + _pos = position _building; + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {blcl_sm_garrisonBuilding_relPos deleteAt (blcl_sm_garrisonBuilding_relPos find _x)}; + case 1: { + + if (true /*[_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange*/) then + { + // ["_building","_skillLevel","_noStatics","_typesStatics","_noUnits"]; + private _group = [_building,_aiDifficulty,_noStatics,_typesStatics,_noUnits] call blck_fnc_sm_spawnBuildingGarrison_relPos; + _timesSpawned = _timesSpawned + 1; + _groupSpawned = 1; + _respawnAt = 0; + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned]; + _element set[respawnAt,_respawnAt]; + blcl_sm_garrisonBuilding_relPos set[blcl_sm_garrisonBuilding_relPos find _x,_element]; + }; + }; + case 2: { + _groupSpawned = 0; + _respawnAt = diag_tickTime + _respawnTime; + _element set[respawnAt,_respawnAt]; + _element set[groupSpawned,_groupSpawned]; + blcl_sm_garrisonBuilding_relPos set[blcl_sm_garrisonBuilding_relPos find _x,_element]; + + }; + default {}; + }; + + } else { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + + _groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + blcl_sm_garrisonBuilding_relPos set[(blcl_sm_garrisonBuilding_relPos find _x), _element]; + }; + }; + }; +}forEach _sm_groups; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorInfantry.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorInfantry.sqf new file mode 100644 index 0000000..fba5798 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorInfantry.sqf @@ -0,0 +1,114 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_fnc_monitorInfantry(12): time %2 | blck_sm_Infantry %1",blck_sm_Infantry,diag_tickTime]; +if (blck_sm_Infantry isEqualTo []) exitWith {}; +private["_element"]; +for "_i" from 0 to (count blck_sm_Infantry) do +{ + if (_i >= count(blck_sm_Infantry)) exitWith {}; + _element = blck_sm_Infantry deleteAt 0; + //diag_log format["(18) element = %1",_element]; + //diag_log format["_fnc_monitorInfantry(20): _element %1 | _i = %2",_element,_i]; + + if !(_element isEqualTo []) then + { + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorInfantry(21): _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorInfantry (22): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + //diag_log format["_fnc_monitorInfantry(28): _pos = %1 | _difficulty = 2 | _units = %3 | _patrolRadius = %4 | _respawnTime = %5",_pos,_difficulty,_units,_patrolRadius,_respawnTime]; + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + + switch (_mode) do + { + case 0: { + //diag_log format["_fnc_sm_monitorInfantry(46): no further respawns requested for %1",_element]; + }; + case 1: { // Spawn Group Now + //diag_log format["_fnc_sm_monitorInfantry(49): spawning infantry group with element = %1",_element]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + private _numAI = [_units] call blck_fnc_getNumberFromRange; + //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 = [blck_AI_Side,true] call blck_fnc_createGroup; + if !(isNull _group) then + { + [ + _group,_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-1,_patrolRadius,true, + [_difficulty] call blck_fnc_selectAIUniforms, + [_difficulty] call blck_fnc_selectAIHeadgear, + [_difficulty] call blck_fnc_selectAIVests, + [_difficulty] call blck_fnc_selectAIBackpacks, + [_difficulty] call blck_fnc_selectAILoadout, + [_difficulty] call blck_fnc_selectAISidearms + ] call blck_fnc_spawnGroup; + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + //diag_log format["_fnc_monitorInfantry (67): _element %1",_element]; + //diag_log format["_fnc_monitorInfantry (69): blck_sm_Infantry %1",blck_sm_Infantry]; + }; + }; + blck_sm_Infantry pushBack _element; + }; + case 2: { // Spawn Group at a Later Time. + blck_liveMissionAI pushBack[units _group,diag_tickTime]; // schedule units of group for deletion now. + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_Infantry pushBack _element; + //diag_log format["_fnc_monitorInfantry(77): update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorInfantry(81) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorInfantry(83): diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorInfantry(87): playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_Infantry pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorInfantry(92): despanwing patrol for _element %1",_element]; + _groupParameters set [2, {alive _x} count (units _group)]; + {[_x] call blck_fnc_deleteAI} forEach (units _group); + deleteGroup _group; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + //diag_log format["_fnc_monitorInfantry (101): _element %1",_element]; + //diag_log format["_fnc_monitorInfantry (102): blck_sm_Infantry %1",blck_sm_Infantry]; + }; + blck_sm_Infantry pushBack _element; + }; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorScuba.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorScuba.sqf new file mode 100644 index 0000000..9ffcad5 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorScuba.sqf @@ -0,0 +1,92 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_fnc_monitorScubaGroups: time %2 | blck_sm_scubaGroups %1",blck_sm_scubaGroups,diag_tickTime]; +if (blck_sm_scubaGroups isEqualTo []) exitWith {}; +for "_i" from 0 to (count blck_sm_scubaGroups) do +{ + if (_i >= (count blck_sm_scubaGroups)) exitWith {}; + private _element = blck_sm_scubaGroups deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorScubaGroups: _element %1 | _i = %2",_element,_i]; + //diag_log format["_fnc_monitorScubaGroups: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorScubaGroups (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorScubaGroups: _pos = %1 | _difficulty = 2 | _units = %3 | _patrolRadius = %4 | _respawnTime = %5",_pos,_difficulty,_units,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: { + //diag_log format["_fnc_sm_monitorInfantry(46): no further respawns requested for %1",_element]; + }; + case 1: { + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + private _numAI = [_units] call blck_fnc_getNumberFromRange; + //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,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup; + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + }; + blck_sm_scubaGroups pushBack _element; + }; + case 2: { + blck_liveMissionAI pushBack[units _group,diag_tickTime]; // schedule units of group for deletion now. + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_scubaGroups pushBack _element; + //diag_log format["_fnc_monitorScubaGroups: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorScubaGroups(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorScubaGroups: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + blck_sm_scubaGroups pushBack _element; + //diag_log format["_fnc_monitorScubaGroups: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorScubaGroups: despanwing patrol for _element %1",_element]; + _groupParameters set [2, {alive _x} count (units _group)]; + {[_x] call blck_fnc_deleteAI} forEach (units _group); + deleteGroup _group; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_scubaGroups pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorShips.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorShips.sqf new file mode 100644 index 0000000..5f3a0b2 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorShips.sqf @@ -0,0 +1,94 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +//diag_log format["_fnc_monitorShips: time %2 | blck_sm_surfaceShips %1",blck_sm_surfaceShips,diag_tickTime]; +for "_i" from 0 to (count blck_sm_surfaceShips) do +{ + if (_i >= (count blck_sm_surfaceShips)) exitWith {}; + private _element = blck_sm_surfaceShips deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorShips: _element %1",_element]; + //diag_log format["_fnc_monitorShips: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorShips (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + //diag_log format["_fnc_monitorShips: _return = %1",_return]; + _group = group ((_return select 1) select 0); + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + //blck_sm_surfaceShips pushBack _element; + }; + blck_sm_surfaceShips pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_surfaceShips pushBack _element; + //diag_log format["_fnc_monitorShips: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorShips(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorShips: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorShips: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_surfaceShips pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorShips: despanwing patrol for _element %1",_element]; + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_surfaceShips pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorSubs.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorSubs.sqf new file mode 100644 index 0000000..fc2790d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorSubs.sqf @@ -0,0 +1,94 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +//diag_log format["_fnc_monitorSubs: time %2 | blck_sm_submarines %1",blck_sm_submarines,diag_tickTime]; +for "_i" from 0 to (count blck_sm_submarines) do +{ + if (_i >= (count blck_sm_submarines)) exitWith {}; + private _element = blck_sm_submarines deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorSubs: _element %1",_element]; + //diag_log format["_fnc_monitorSubs: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorSubs (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + //_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _return = [_pos,1,_difficulty,[_groupParameters],false,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,blck_backpacks,blck_UMS_weapons,blck_Pistols,true] call blck_fnc_spawnMissionVehiclePatrols; + //diag_log format["_fnc_monitorSubs: _return = %1",_return]; + _group = group ((_return select 1) select 0); + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + //blck_sm_submarines pushBack _element; + }; + blck_sm_submarines pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + bblck_sm_submarines pushBack _element; + //diag_log format["_fnc_monitorSubs: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorSubs(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorSubs: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorSubs: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_submarines pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorSubs: despanwing patrol for _element %1",_element]; + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_submarines pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorVehicles.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorVehicles.sqf new file mode 100644 index 0000000..50b5f48 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_monitorVehicles.sqf @@ -0,0 +1,96 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_fnc_monitorVehicles: time %2 | blck_sm_Vehicles %1",blck_sm_Vehicles,diag_tickTime]; +for "_i" from 0 to (count blck_sm_Vehicles) do +{ + if (_i >= (count blck_sm_Vehicles)) exitWith {}; + private _element = blck_sm_Vehicles deleteAt 0; + //diag_log format["_fnc_monitorVehicles(18): _element %1",_element]; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorVehicles: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorVehicles (21): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorVehicles(23): _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false]]; + _return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + //diag_log format["_fnc_monitorVehicles(50): _return = %1",_return]; + _group = group ((_return select 1) select 0); + // _element [[""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90],O Alpha 1-1,1,1,0,-1]" + // _groupParameters = [""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90]" + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + }; + blck_sm_Vehicles pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_Vehicles pushBack _element; + //diag_log format["_fnc_monitorVehicles(63): update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorVehicles(67) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorVehicles(69): diag_tickTime = %1 | playerNearAt = %2 | _playerInRange = %3",diag_tickTime,_group getVariable["playerNearAt",-1],[_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorVehicles(73): playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_Vehicles pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorVehicles(78): despanwing patrol for _element %1",_element]; + // _element [[""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90],O Alpha 1-1,1,1,0,-1]" + // _groupParameters = [""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90]" + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_Vehicles pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnAirPatrol.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnAirPatrol.sqf new file mode 100644 index 0000000..cfdd084 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnAirPatrol.sqf @@ -0,0 +1,33 @@ +/* + 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/ + + TODO: Still used? Questionable. +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +diag_log format["_fnc_sm_spawnAirPatrols: _this = %1",_this]; +params["_airPatrols"]; +private["_aircraft","_pos","_difficulty","_uniforms","_headGear"]; +_aircraft = _x select 0; +_pos = _x select 1; +_difficulty = _x select 2; +_uniforms = blck_SkinList; +_headGear = blck_headgearList; +switch (_difficulty) do +{ + case "blue": {_weapons = blck_WeaponList_Blue;}; + case "red": {_weapons = blck_WeaponList_Red}; + case "green": {_weapons = blck_WeaponList_Green}; + case "orange": {_weapons = blck_WeaponList_Orange}; +}; +_return = [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli; +_group = group (_return select 1 select 0); +_group + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnAirPatrols.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnAirPatrols.sqf new file mode 100644 index 0000000..e3856d8 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnAirPatrols.sqf @@ -0,0 +1,53 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +/* +_coords = _this select 0; +_skillAI = _this select 1; +_weapons = _this select 2; +_uniforms = _this select 3; +_headGear = _this select 4; +_helis = _this select 5; +*/ + +params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear","_weapons"]; +diag_log format["_sm_spawnAirPatrols:: _this = %1",_this]; +diag_log format["_sm_spawnAirPatrols:: _airPatrols = %1",_airPatrols]; +if (_airPatrols isEqualTo []) then +{ + for "_i" from 1 to _noAirPatrols do + { + /* + _coords = _this select 0; + _skillAI = _this select 1; + _weapons = _this select 2; + _uniforms = _this select 3; + _headGear = _this select 4; + _helis = _this select 5; + */ + // params["_coords","_skillAI","_helis",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]],["_Launcher","none"],["_crewCount",4]]; + [_center,_difficulty,_weapons,_uniforms,_headGear,_heliTypes,0] call blck_fnc_spawnMissionHeli; + }; +} else { + { + /* + /*[aircraft classname, position, difficulty(blue, red etc)]*/ + _x params["_aircraft","_pos","_difficulty"]; + //_aircraft = _x select 0; + //_pos = _x select 1; + //_difficulty = _x select 2; + //params["_coords","_skillAI","_helis",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]],["_Launcher","none"],["_crewCount",4]]; + [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli; + }forEach _airPatrols; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf new file mode 100644 index 0000000..fcaca60 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf @@ -0,0 +1,11 @@ + + +params["_building","_aiDifficultyLevel","_statics","_units"]; +diag_log format["_fnc_sm_spawnBuildingGarrisonASL: handling _building = %1 | at location = %2",_building,position _building]; +private _group = [blck_AI_Side,true] call blck_fnc_createGroup; +if !(isNull _group) then +{ + //params["_building","_group","_statics","_men","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks",["_launcher","none"],"_weaponList","_sideArms"]; + [_building,_group,_statics,_units,_aiDifficultyLevel] call blck_fnc_spawnGarrisonInsideBuilding_ATL; +}; +_group diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf new file mode 100644 index 0000000..36db6ec --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf @@ -0,0 +1,11 @@ + + +params["_building","_skillLevel","_noStatics","_typesStatics","_noUnits"]; +diag_log format["_fnc_sm_spawnBuildingGarrison_relPos: handling _building = %1 | at location = %2",_building,position _building]; +private _group = [blck_AI_Side,true] call blck_fnc_createGroup; +if !(isNull _group) then +{ + // ["_building","_group","_noStatics","_typesStatics","_noUnits",["_aiDifficultyLevel","Red"], + [_building,_group,_noStatics,[],_noUnits,_skillLevel] call blck_fnc_spawnGarrisonInsideBuilding_relPos; +}; +_group \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnEmplaced.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnEmplaced.sqf new file mode 100644 index 0000000..27b98fc --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnEmplaced.sqf @@ -0,0 +1,64 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"]; +_emplacedWeps = []; +_emplacedAI = []; +_units = []; +_abort = false; +_pos = []; + +//diag_log format["_sm_spawnEmplaced :: _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] ]; + private _empGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + if !(_empGroup) then + { + [_empGroup,_pos,1,1,_difficulty,_pos,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; + _empGroup setcombatmode "RED"; + _empGroup setBehaviour "COMBAT"; + // // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAFE"],["_soldierType","null"],["_patrolRadius",30],["_wpTimeout",[5.0,7.5,10]]]; + // Not sure of the value of giving waypoints here + //[_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints; + //if (isNull _empGroup) exitWith {_abort = _true}; + _wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle; + //_empGroup setVariable["groupVehicle",_wep]; + //_wep setVariable["vehicleGroup",_empGroup]; + _wep setVariable["GRG_vehType","emplaced"]; + _wep setPosATL _pos; + [_wep,false] call blck_fnc_configureMissionVehicle; + _units = units _empGroup; + _gunner = _units select 0; + _gunner moveingunner _wep; + }; +} forEach _missionEmplacedWeapons; +blck_monitoredVehicles append _emplacedWeps; + +true diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnEmplaceds.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnEmplaceds.sqf new file mode 100644 index 0000000..e262077 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnEmplaceds.sqf @@ -0,0 +1,59 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"]; +_emplacedWeps = []; +_emplacedAI = []; +_units = []; +_abort = false; +_pos = []; + +//diag_log format["_sm_spawnEmplaced :: _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", "_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"; + // Not sure of the value of giving waypoints here. + //[_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints; + //if (isNull _empGroup) exitWith {_abort = _true}; + _wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle; + //_empGroup setVariable["groupVehicle",_wep]; + //_wep setVariable["vehicleGroup",_empGroup]; + _wep setVariable["GRG_vehType","emplaced"]; + _wep setPosATL _pos; + [_wep,false] call blck_fnc_configureMissionVehicle; + _units = units _empGroup; + _gunner = _units select 0; + _gunner moveingunner _wep; +} forEach _missionEmplacedWeapons; +blck_monitoredVehicles append _emplacedWeps; + +true diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnInfantryPatrols.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnInfantryPatrols.sqf new file mode 100644 index 0000000..a9cf3ef --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnInfantryPatrols.sqf @@ -0,0 +1,49 @@ +/* + GMS_fnc_sm_spawnInfantryPatrols + + 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"; +// TODO: Used? +// params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; +params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"]]; +private ["_weaponList","_sideArms","_uniforms","_headgear","_vests","_backpacks"]; + +_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout; +_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms; +_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms; +_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear; +_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests; +_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks; + +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,_vests,_backpacks,_weaponList,_sidearms,false] 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] + _x params ["_pos","_difficulty","_noAI","_patrolRadius"]; + private _group = [blck_AI_Side,true] call blck_fnc_createGroup; + // params[["_group","Error"],"_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true], ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]], + // ["_weaponList",[]],["_sideArms",[]], ["_scuba",false],["_patrolRadius",30]]; + #define setupWaypoints true + if !(isNull _group) then + { + [_group,_pos,_pos,_noAI,_noAI,_difficulty,_patrolRadius - 2,_patrolRadius,setupWaypoints,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,_scuba,_patrolRadius] call blck_fnc_spawnGroup; + blck_monitoredMissionAIGroups pushback _group; + }; + }forEach _patrols; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnLootContainers.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnLootContainers.sqf new file mode 100644 index 0000000..a2fe092 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnLootContainers.sqf @@ -0,0 +1,40 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_objects","_coords"]; +private["_object"]; + +if !(_objects isEqualTo []) exitWith +{ // Spawn loot crates where specified in _objects using the information for loot parameters provided for each location. + { + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_sm_spawnLootContainers (21):-> _x = %1",_x]; + }; + #endif + //diag_log format["_fnc_sm_spawnLootContainers (21):-> _x = %1",_x]; + // [selectRandom blck_crateTypes,[22904.8,16742.5,6.30195],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts] + _x params["_crateClassName","_cratePosASL","_vectorDirUp","_allowDamageSim","_crateLoot","_lootCounts"]; + _crate = [_cratePosASL, _crateClassName] call blck_fnc_spawnCrate; + [_crate, _crateLoot,_lootCounts] call blck_fnc_fillBoxes; + } forEach _objects; +}; + +// In the case where no loot crate parameters are defined in _objects just spawn 1 at the center of the mission. +if (_objects isEqualTo []) then +{ + _crateType = selectRandom blck_crateTypes; + _crate = [_coords,_crateType] call blck_fnc_spawnCrate; + [_crate,blck_BoxLoot_Red,blck_lootCountsGreen] call blck_fnc_fillBoxes; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnMission.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnMission.sqf new file mode 100644 index 0000000..e359772 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnMission.sqf @@ -0,0 +1,51 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_mission"]; +// Spawn landscape +// params["_objects"]; +[_missionLandscape] call blck_fnc_sm_spawnObjects; +uiSleep 10; // Let the objects 'settle' before placing anything on or around them. + + +// Spawn Air Patrols +// params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear"]; +[_airPatrols,_noAirPatrols,_aircraftTypes,_missionCenter,_difficulty,_uniforms,_headgear,_weapons] call blck_fnc_sm_spawnAirPatrols; +//uiSleep 1; + +// Spawn Vehicle Patrols +// params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]]; +[_missionCenter,_noVehiclePatrols,_vehiclePatrolParameters,_difficulty,_uniforms,_headGear] call blck_fnc_sm_spawnVehiclePatrols; +//uiSleep 1; + + +// spawn infantry +// params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_weapons",blck_WeaponList_Orange],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; +[_aiGroupParameters, _missionCenter,_minNoAI,_maxNoAI,_difficulty,_weapons,_uniforms,_headGear] call blck_fnc_sm_spawnInfantryPatrols; +//uiSleep 1; + +// spawn loot vehicles +// params["_objects","_coords","_loot","_lootCounts"]; +[_missionLootVehicles,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers; + +// Spawn static weapons +// params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +[_missionEmplacedWeapons,_noEmplacedWeapons,_difficulty,_missionCenter,_uniforms,_headGear] call blck_fnc_sm_spawnEmplaceds; + +// spawn loot chests +[_missionLootBoxes,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers; + +_blck_localMissionMarker = ["",_missionCenter,"","",_markerColor,_markerType]; +[_blck_localMissionMarker] call blck_fnc_spawnMarker; + +diag_log format["[blckeagls] Static Mission Spawner: Mission %1 spawned",_mission]; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf new file mode 100644 index 0000000..9ed7137 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf @@ -0,0 +1,21 @@ + +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_buildingClassName","_posASL","_vectorDirUp","_enableDamSim"]; +_object = createVehicle [_buildingClassName, [0,0,0], [], 0, "CAN_COLLIDE"]; +_object setPosASL _posASL; +_object setVectorDirAndUp _vectorDirUp; +_object enableSimulationGlobal (_enableDamSim select 0); +_object allowDamage (_enableDamSim select 1); + +_object \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnObjects.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnObjects.sqf new file mode 100644 index 0000000..c9f885f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnObjects.sqf @@ -0,0 +1,19 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_objects"]; +private["_objects","_object"]; +{ + _object = [_x select 0, _x select 1, _x select 2, _x select 3] call blck_fnc_sm_spawnObjectASLVectorDirUp; +} forEach _objects; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnVehiclePatrols.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnVehiclePatrols.sqf new file mode 100644 index 0000000..8438ade --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_spawnVehiclePatrols.sqf @@ -0,0 +1,58 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel"]; +//diag_log format["_sm_spawnVehiclePatrols:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns]; +private["_vehGroup","_patrolVehicle","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return","_abort"]; +private ["_weaponList","_sideArms","_uniforms","_headgear","_vests","_backpacks"]; + +if (_vehiclePatrolSpawns isEqualTo []) then +{ + private["_spawnPoints","_vehType"]; + _spawnPoints = [_coords,_noVehiclePatrols,75,100] call blck_fnc_findPositionsAlongARadius; + { + // ["Vehicle Class Name", position[x,y,z], AI Skill [blue, red, green, orange],patrol radius [0 for static units], respawn time [seconds]] + #define vehiclePatrolRadius 150 + #define vehicleRespawnTime 900 + _vehType = selectRandom blck_AIPatrolVehicles; + _vehiclePatrolSpawns pushBack [_vehType, _x, _aiDifficultyLevel, vehiclePatrolRadius,vehicleRespawnTime]; + } forEach _spawnPoints; +}; + +{ + private _patrolVehicle = objNull; + _x params["_vehicle","_spawnPos","_aiDifficultyLevel","_patrolRadius","_respawnTime"]; + private _vehGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + if !(isNull _vehGroup) then + { + _vehGroup setVariable["soldierType","vehicle"]; + _weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout; + _sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms; + _uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms; + _headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear; + _vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests; + _backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks; + + [_vehGroup,_spawnPos,_spawnPos,3,3,_difficulty,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; + blck_monitoredMissionAIGroups pushback _vehGroup; + #define useWaypoints true + // params[["_group","Error"],"_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true], + // ["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_scuba",false],["_patrolRadius",30]]; + _patrolVehicle = [_spawnPos,_spawnPos,_vehicle,_patrolRadius,_patrolRadius,_vehGroup,useWaypoints,[difficulty] call blck_fnc_selectVehicleCrewCount,_patrolRadius] call blck_fnc_spawnVehiclePatrol; // Check whether we should pass the group; looks like we should. + + }; +} forEach _vehiclePatrolSpawns; + +true + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_staticPatrolMonitor.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_staticPatrolMonitor.sqf new file mode 100644 index 0000000..f57a5de --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_sm_staticPatrolMonitor.sqf @@ -0,0 +1,27 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +// GMS_fnc_sm_missionPatrolMonitor + +[] call blck_fnc_sm_monitorInfantry; +[] call blck_fnc_sm_monitorScuba; +//uiSleep 0.1; +[] call blck_fnc_sm_monitorVehicles; +[] call blck_fnc_sm_monitorAircraft; +[] call blck_fnc_sm_monitorEmplaced; + +[] call blck_fnc_sm_monitorShips; +[] call blck_fnc_sm_monitorSubs; +//[] call blck_fnc_sm_monitorGarrisonsASL; +//[] call blck_fnc_sm_monitorGarrisons_relPos; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_smokeAtCrates.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_smokeAtCrates.sqf new file mode 100644 index 0000000..568f11c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_smokeAtCrates.sqf @@ -0,0 +1,65 @@ +/* + Spawns a smoking wreck or object at a specified location and returns the objects spawn (wreck and the particle effects object) + 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"; + +private ["_objs","_wreckSelected","_smokeType","_fire","_posFire","_posWreck","_smoke","_dis","_minDis","_maxDis","_closest","_wrecks"]; + +_objs = []; + +// http://www.antihelios.de/EK/Arma/index.htm +_wrecks = ["Land_Wreck_Car2_F","Land_Wreck_Car3_F","Land_Wreck_Car_F","Land_Wreck_Offroad2_F","Land_Wreck_Offroad_F","Land_Tyres_F","Land_Pallets_F","Land_MetalBarrel_F"]; + +params["_pos","_mode",["_maxDist",12],["_wreckChoices",_wrecks],["_addFire",false]]; + +_wreckSelected = selectRandom _wreckChoices; +//_smokeTrail = "test_EmptyObjectForSmoke"; // "options are "test_EmptyObjectForFireBig", "test_EmptyObjectForSmoke" +_smokeType = if(_addFire) then {"test_EmptyObjectForFireBig"} else {"test_EmptyObjectForSmoke"}; + +switch (_mode) do { + case "none": {if (true) exitWith {};}; + case "center": {_minDis = 5; _maxDis = 15; _closest = 5;}; + case "random": {_minDis = 15; _maxDis = 50; _closest = 10;}; + default {_minDis = 5; _maxDis = 15; _closest = 5;}; +}; +_dis = 0; +//_posWreck = [_pos, 0, 30, 10, 0, 20, 0] call BIS_fnc_findSafePos; // Position the wreck within 30 meters of the position and 5 meters away from the nearest object +// _minDis and _maxDis determine the spacing between the smoking item and the loot crate. +_minDis = 5; // Minimum distance of +//_maxDis = 50; +_closest = 10; + +while {_dis < _maxDist} do +{ + _posWreck = [_pos, _minDis, 50, _closest, 0, 20, 0] call BIS_fnc_findSafePos; // find a safe spot near the location passed in the call + _dis = _posWreck distance _pos; +}; + +// spawn a wreck near the mission center +_fire = createVehicle [_wreckSelected, [0,0,0], [], 0, "can_collide"]; +_fire setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; +_fire setPos _posWreck; +_fire setDir random(360); +//https://community.bistudio.com/wiki/setVectorUp +//_fire setVectorUp surfaceNormal position _fire; + + +// spawn asmoke or fire source near the wreck and attach it. +_smoke = createVehicle [_smokeType, [0,0,0], [], 0, "can_collide"]; // "test_EmptyObjectForSmoke" createVehicle _posFire; +_smoke setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; +_smoke setPos _posWreck; +_smoke attachto [_fire, [0,0,1]]; + +_objs = _objs + [_fire,_smoke]; +//diag_log format ["--smokeAtCrate.sqf:: _objs = %1",_objs]; +_objs diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf new file mode 100644 index 0000000..ba7ef25 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf @@ -0,0 +1,60 @@ +/* + 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. + + -------------------------- + 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}; +private ["_newObjs","_sim","_dam","_obj","_spawnPos"]; +_newObjs = []; +_obj = createVehicle ["RoadCone_L_F", _coords]; // To designate the mission center +_obj allowDamage true; +_obj enableSimulation false; +_obj enableSimulationGlobal false; +_obj enableDynamicSimulation false; +_newObjs pushBack _obj; +{ + if (typeName (_x select 3) isEqualTo "ARRAY") then // assum simulation and damage settings are defined in the old way as [bool,bool] + { + _sim = (_x select 3) select 0; + _dam = (_x select 3) select 1; + }; + if (typeName (_x select 3) isEqualTo "BOOL") then // assume simulation and damage settings are defined in the new way as , bool, bool, ... + { + _sim = _x select 3; + _dam = _x select 4; + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + if !(count (_x select 1) isEqualTo 3) then + { + diag_log format["_fnc_spawnBaseObjects [ERROR, invalid object offset provided]: offset = %1 | 3 parameters exected | object definition = %2",_x select 1,1]; + }; + }; + #endif + + _obj = createVehicle[(_x select 0),_center vectorAdd (_x select 1),[],0,"CAN_COLLIDE"]; + //diag_log format["_fnc_spawnBaseObjects::-->> _x = %1 | _obj = %2",_x,_obj]; + _newObjs pushback _obj; + _obj setDir (_x select 2); + + _obj enableDynamicSimulation _sim; + _obj allowDamage _dam; + if ((typeOf _obj) isKindOf "LandVehicle" || (typeOf _obj) isKindOf "Air" || (typeOf _obj) isKindOf "Sea") then + { + [_obj] call blck_fnc_configureMissionVehicle; + }; +} forEach _objects; +_newObjs + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf new file mode 100644 index 0000000..f883cec --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf @@ -0,0 +1,46 @@ +/* + 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 ["_crate"]; +params["_coords",["_crateType","Box_NATO_Wps_F"],["_crateDir",0]]; + +_crate = createVehicle [_crateType,[0,0,0],[], 2, "NONE"]; +_crate setVariable ["LAST_CHECK", 100000]; +_crate allowDamage false; +_crate enableRopeAttach false; +[_crate] call blck_fnc_emptyObject; +//uiSleep 1; +_crate setPosATL [_coords select 0, _coords select 1, (_coords select 2) + 0.25]; +_crate setDir _crateDir; +//_crate setVectorUp [0,0,1]; +_crate setVectorUp surfaceNormal position _crate; +// the function to have a lightsource on underwater objects needs work. +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/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnDynamicUMSMission.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnDynamicUMSMission.sqf new file mode 100644 index 0000000..b636498 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnDynamicUMSMission.sqf @@ -0,0 +1,636 @@ +/* + Dynamic Underwater Mission Spawner + By Ghostrider GRG + Copyright 2016 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +#define isScubaMission true +#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]]; + +_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 Dynamic UMS] dynamicUMSspawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +//if (isNil "_timeOut") then {_timeOut = -1;}; +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 = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; + +if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol}; +if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols}; +if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops}; +if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis}; +if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops}; + +if (isNil "_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}; +if (isNil "_vehicleCrewCount") then {_vehicleCrewCount = [_aiDifficultyLevel] call GMS_fnc_selectVehicleCrewCount}; + +_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 +{ + _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? +[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers; +_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker; +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (91) message players and spawn a mission marker";}; +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (77) waiting for player to trigger the mission";}; +#endif +//////// +// All parameters are defined, let's wait until a player is nearby or the mission has timed out +//////// + +_missionStartTime = diag_tickTime; +_playerInRange = false; +_missionTimedOut = false; + +_wait = true; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (90) starting mission trigger loop"}; +if (blck_debugLevel > 2) then {_wait = false}; +#endif + +while {_wait} do +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) exitWith {_playerInRange = true;}; + #endif + + if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; + if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; + uiSleep 5; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["dynamicUMSspawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords]; + diag_log format["dynamicUMSspawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers]; + diag_log format["dynamicUMSspawner:: Trigger Loop - timeout = %1", [_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut]; + }; + #endif +}; + +if (_missionTimedOut) exitWith +{ + // Deal with the case in which the mission timed out. + blck_priorDynamicUMS_Missions pushback [_coords,diag_tickTime]; + blck_UMS_ActiveDynamicMissions = blck_UMS_ActiveDynamicMissions - [_coords]; + 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; +}; + +//////// +// Spawn the mission objects, loot chest, and AI +//////// +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (142) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate +{ + _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 +{ + // 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 +{ + 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 (count _scubaGroupParameters > 0) then +{ + //diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters]; + // params["_coords",["_minNoAI",3],["_maxNoAI",6],"_missionGroups",["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],["_vests",blck_vests],["_backpacks",[]],["_weapons",[]],["_sideArms",blck_Pistols],["_isScubaGroup",false]]; + _temp = [_coords, _minNoAI,_maxNoAI,_scubaGroupParameters,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionAI; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["dynamicUMSspawner :: (209) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1; +}; + +_abort = _temp select 1; +if (blck_debugLevel > 2) then +{ + diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; +}; +#endif + +if (_abort) exitWith +{ + if (blck_debugLevel > 1) then { + diag_log "dynamicUMSspawner:: (220) grpNull returned, mission termination criteria met, calling blck_fnc_endMission" + }; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; +if !(_abort) then +{ + _blck_AllMissionAI append (_temp select 0); +}; + +uiSleep _delayTime; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (235) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +uiSleep _delayTime; +_temp = [[],[],false]; +_abort = false; +private["_patrolVehicles","_vehToSpawn"]; +//diag_log format["_fnc_dynamicUMSspawner (258): _noVehiclePatrols = %1",_noVehiclePatrols]; +_vehToSpawn = 0; +//diag_log format["_dynamicUMSspawner:: _vehToSpawn = %1",_vehToSpawn]; +// Spawn any surface patrols +if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then +{ + // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]]; + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_vehiclePatrolParameters,true,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then { + diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + + }; +}; +// Spawn any submarine patrols +if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then +{ + // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]]; + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_submarinePatrolParameters,true,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionVehiclePatrols; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then { + diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + //diag_log format["[blckeagls] dynamicUMSspawner:: Patrol vehicles = %1",_patrolVehicles]; + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + + }; +}; + +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 0) then { + diag_log "dynamicUMSspawner:: (279) grpNull returned, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; + +uiSleep delayTime; +_temp = [[],[],false]; +_abort = false; + +_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange; +_noPara = [_noPara] call blck_fnc_getNumberFromRange; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]}; +#endif +if (_noChoppers > 0) then +{ + for "_i" from 1 to (_noChoppers) do + { + 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] call blck_fnc_spawnMissionHeli; + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + blck_monitoredVehicles pushBack (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + }; + if (_abort) then + { + _objects pushback (_temp select 0); + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; + }; + }; + }; +}; + +////////////////////////// +// Spawn Crates and Emplaced Weapons Last to try to force them to correct positions relative to spawned buildinga or other objects. +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log format["dynamicUMSspawner:: (361) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];}; +#endif +uiSleep 15; +private["_noEmplacedToSpawn"]; +_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange; +//diag_log format["_dynamicUMSspawner:: _noEmplacedToSpawn = %1",_vehToSpawn]; +if (blck_useStatic && ((_noEmplacedToSpawn > 0)) || count _missionEmplacedWeapons > 0) then +{ + // params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; + //_temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; + _temp = [_coords,_missionEmplacedWeapons,true,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["dynamicUMSspawner:: (375) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["dynamicUMSspawner:: (387) _abort = %1",_abort]; + + }; + #endif + + if !(_abort) then + { + _objects append (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (400) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + }; +}; +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log "dynamicUMSspawner:: (410) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; + +uiSleep _delayTime; +if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then +{ + 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; + // blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _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 +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +// Trigger for mission end +#ifdef blck_debugMode +diag_log format["[blckeagls] mission Spawner(436) _endCondition = %1",_endCondition]; +#endif +private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"]; +_missionComplete = -1; +_startTime = diag_tickTime; +if (blck_showCountAliveAI) then +{ + //diag_log format["_dynamicUMSspawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName]; + //diag_log format["_dynamicUMSspawner(442): Alive AI = %1 | Current Marker Text = %2",{alive _x} count _blck_AllMissionAI, markerText _marker]; + if !(_marker isEqualTo "") then + { + [_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount; + blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI]; + //diag_log format["_dynamicUMSspawner: blck_missionMarkers = %1",blck_missionMarkers]; + }; +}; +switch (_endCondition) do +{ + 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 + +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 +{ + #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 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 // + { + // blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits;] call blck_fnc_spawnParaUnits; + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _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]; + [_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 +{ + 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]; +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; + +#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/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf new file mode 100644 index 0000000..7dccd3d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf @@ -0,0 +1,121 @@ +/* + + [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; + By Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]]]; +if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; +if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {[_aiDifficultyLevel] call blck_fnc_selectAISidearms}; + +#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 = []; +_emplacedAI = []; +_units = []; +_abort = false; +_pos = []; + +#ifdef blck_debugMode +//diag_log "_fnc_spawnEmplacedWeaponArray start"; +#endif + +// Define _missionEmplacedWeapons if not already configured. +if (_missionEmplacedWeapons isEqualTo []) then +{ + _missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnEmplacedWeaponArray(38): creating random spawn locations: _missionEmplacedWeaponsPositions = %1", _missionEmplacedWeaponPositions]; + }; + #endif + { + _static = selectRandom blck_staticWeapons; + //diag_log format["_fnc_spawnEmplacedWeaponArray: creating spawn element [%1,%2]",_static,_x]; + _missionEmplacedWeapons pushback [_static,_x]; + //diag_log format["_fnc_spawnEmplacedWeaponArray: _mi updated to %1",_missionEmplacedWeapons]; + } forEach _missionEmplacedWeaponPositions; + _useRelativePos = false; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then +{ + diag_log format["_fnc_spawnEmplacedWeaponArray(52):: starting static weapon spawner with _missionEmplacedWeapons = %1", _missionEmplacedWeapons]; +}; +#endif + +{ + if (_useRelativePos) then + { + _pos = _coords vectorAdd (_x select 1); + } else { + _pos = (_x select 1); + }; + + #ifdef blck_debugMode + 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", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ]; + private _empGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + if !(isNull _empGroup) then + { + [_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"; + _empGroup setVariable ["soldierType","emplaced"]; + [(_x select 1),0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints; + //if (isNull _empGroup) exitWith {_abort = true}; + // params["_vehType","_pos",["_clearInventory",true]]; + private _wep = [(_x select 0),[0,0,0]] call blck_fnc_spawnVehicle; + //_wep addMPEventHandler ["MPHit",{[_this] call blck_EH_AIVehicle_HandleDamage}]; + //_wep addEventHandler["GetOut",{_this remoteExec["blck_EH_vehicleGetOut",2]}]; + //_wep setVariable["vehicleGroup",_empGroup]; + _wep setVariable["GRG_vehType","emplaced"]; + _wep setPos _pos; + _wep setdir (random 359); + [_wep,2] call blck_fnc_configureMissionVehicle; + _emplacedWeps pushback _wep; + _units = units _empGroup; + _gunner = _units select 0; + _gunner moveingunner _wep; + _gunner setVariable["GRG_vehType","emplaced"]; + //_gunner setVariable["GRG_vehicle",_wep]; + //_gunner addEventHandler["GetOutMan",{_this remoteExec["blck_EH_vehcleManGetOut",2]}]; + _emplacedAI append _units; + }; +} forEach _missionEmplacedWeapons; +blck_monitoredVehicles append _emplacedWeps; +_return = [_emplacedWeps,_emplacedAI,_abort]; +_return diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf new file mode 100644 index 0000000..d0eebc7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf @@ -0,0 +1,44 @@ + +/* + 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["_building","_group","_statics","_men",["_aiDifficultyLevel","Red"], ["_uniforms",[]],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_launcher","none"],["_weaponList",[]],["_sideArms",[]]]; +if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; + +private["_staticsSpawned","_return","_obj","_unit","_u"]; +_staticsSpawned = []; +{ + _x params["_staticClassName","_staticRelPos","_staticDir"]; + _obj = [_staticClassName, [0,0,0]] call blck_fnc_spawnVehicle; + _obj setVariable["GRG_vehType","emplaced"]; + _staticsSpawned pushBack _obj; + //diag_log format["_fnc_spawnGarrisonInsideBuilding_ATL: _obj = %1 | _staticsSpawned = %2",_obj,_staticsSpawned]; + _obj setPosATL (_staticRelPos vectorAdd getPosATL _building); + _obj setDir _staticDir; + //diag_log format["_fnc_spawnGarrisonInsideBuilding_ATL: _obj = %1 | getPosATL _obj = %2",_obj,getPosATL _obj]; + _unit = [[0,0,0],_group,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_launcher,_weaponList,_sideArms,false,true] call blck_fnc_spawnUnit; + _unit moveInGunner _obj; +}forEach _statics; +{ + _u = _x; + _u params["_unitRelPos","_unitDir"]; + _unit = [[0,0,0],_group,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_launcher,_weaponList,_sideArms,false,true] call blck_fnc_spawnUnit; + _unit setPosATL (_unitRelPos vectorAdd (getPosATL _building)); + _unit setDir _unitDir; + _unit disableAI "PATH"; +}forEach _men; +_staticsSpawned diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf new file mode 100644 index 0000000..f96209d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf @@ -0,0 +1,54 @@ +/* + 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["_building","_group","_noStatics","_typesStatics","_noUnits",["_aiDifficultyLevel","Red"], ["_uniforms",[]],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_launcher","none"],["_weaponList",[]],["_sideArms",[]]]; +if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; +if (_typesStatics isEqualTo []) then {_typesStatics = blck_staticWeapons}; + +private["_staticsSpawned","_allBldPsn","_allBldPsn","_floor","_ceil","_statics","_units","_unit","_obj","_staticClassName","_usedBldPsn","_pos","_obj"]; +_allBldPsn = [_building] call BIS_fnc_buildingPositions; +_usedBldPsn = []; +_floor = floor((count _allBldPsn)/2); +_ceil = ceil((count _allBldPsn)/2); +_statics = if (_ceil > _noStatics) then {_noStatics} else {_ceil}; +_units = if (_floor > _noUnits) then {_noUnits} else {_floor}; +_staticsSpawned = []; +uiSleep 1; +for "_i" from 1 to _statics do +{ + _pos = selectRandom _allBldPsn; + _allBldPsn = _allBldPsn - [_pos]; + _staticClassName = selectRandom _typesStatics; + _obj = [_staticClassName, [0,0,0], true] call blck_fnc_spawnVehicle; + _obj setVariable["GRG_vehType","emplaced"]; + _staticsSpawned pushBack _obj; + //diag_log format["_fnc_spawnGarrisonInsideBuilding_relPos: _obj = %1 | _staticsSpawned = %2",_obj,_staticsSpawned]; + _obj setPosATL _pos; // (_pos vectorAdd (getPosATL _building)); + //diag_log format["static weapon %1 placed in building %2 located at %4 at postion %3",_obj,_building,_pos, getPosATL _building]; + _unit = [[0,0,0],_group,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_launcher,_weaponList,_sideArms,false,true] call blck_fnc_spawnUnit; + _unit moveInGunner _obj; +}; + +for "_i" from 1 to _units do +{ + _pos = selectRandom _allBldPsn; + _allBldPsn = _allBldPsn - [_pos]; + // ["_pos","_aiGroup",["_aiDifficultyLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false],["_garrison",false]]; + _unit = [[0,0,0],_group,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_launcher,_weaponList,_sideArms,false,true] call blck_fnc_spawnUnit; + _unit setPosATL _pos; +}; +_staticsSpawned diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMines.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMines.sqf new file mode 100644 index 0000000..83932ac --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMines.sqf @@ -0,0 +1,45 @@ +// Spawns mines in a region centered around a specific position and returns an array with the spawned mines for later use, i.e. deletion +/* + 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 ["_noMines","_mineTypes","_minesPlaced","_minDis","_maxDis","_closest","_radius","_xpos","_ypos","_dir","_incr","_i","_j","_posMine","_mine"]; + +params["_pos"]; + +_noMines = 50; +_mineTypes = ["ATMine","SLAMDirectionalMine"]; +_minesPlaced = []; +_minDis = 50; +_maxDis = 150; +_closest = 5; +_dir = 0; +_incr = 360/ (_noMines/2); +for "_i" from 1 to _noMines/2 do +{ + for "_j" from 1 to 2 do + { + _radius = _maxDis - floor(random(_maxDis - _minDis)); + _xpos = (_pos select 0) + sin (_dir) * _radius; + _ypos = (_pos select 1) + cos (_dir) * _radius; + _posMine = [_xpos,_ypos,0]; + //_posMine = [[_xpos,_ypos,0],0,10,_closest,0,20,0] call BIS_fnc_findSafePos; // find a random loc + _mine = createMine ["ATMine", _posMine, [], 0]; + _mine setVariable ["LAST_CHECK", (diag_tickTime + 14400)]; + _mine setPos _posMine; + //https://community.bistudio.com/wiki/setVectorUp + _minesPlaced = _minesPlaced + [_mine]; + //diag_log format["[spawnMines.sqf] mine # %2 spawned at %1",_posMine,_i]; + }; + _dir = _dir + _incr; +}; +_minesPlaced diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf new file mode 100644 index 0000000..7cb2340 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf @@ -0,0 +1,255 @@ +/* + blck_fnc_spawnMissionAI + by Ghostrider [GRG] + + returns an array of the units spawned + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#define configureWaypoints true +// TODO: consolidate code where possible, for example the recurring code to create the group and add units to the list of units spawned. +// TODO: find reason that this sometimes throws errors because it passes an array rather than group. +params["_coords",["_minNoAI",3],["_maxNoAI",6],"_missionGroups",["_aiDifficultyLevel","red"],["_uniforms",[]],["_headGear",blck_BanditHeadgear],["_vests",[]],["_backpacks",[]],["_weapons",[]],["_sideArms",[]],["_isScubaGroup",false]]; +#ifdef blck_debugMode +if (blck_debugLevel >=2) then +{ + private _params = ["_coords","_minNoAI","_maxNoAI","_missionGroups","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weapons","_sideArms","_isScubaGroup"]; + { + diag_log format["_fnc_spawnMissionAI:: param %1 | isEqualTo %2 | _forEachIndex %3",_params select _forEachIndex,_this select _forEachIndex, _forEachIndex]; + }forEach _this; +}; +#endif + +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; + +#ifdef blck_debugMode +if (blck_debugLevel >= 2) then +{ + diag_log format["_fnc_spawnMissionAI (30):: _unitsToSpawn %1 ; _unitsPerGroup %2 _ResidualUnits %3",_unitsToSpawn,_unitsPerGroup,_ResidualUnits]; +}; +#endif +private _newGroup = grpNull; +//_newGroup setVariable ["soldierType","infantry"]; +if ( (count _missionGroups > 0) && _noAIGroups > 0) then +{ + { + _x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; + _groupSpawnPos = _coords vectorAdd _position; + _newGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + _newGroup setVariable ["soldierType","infantry"]; + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI (37):: case 1 - > _newGroup = %1",_newGroup]; + }; + #endif + + if !(isNull _newGroup) then + { + [_newGroup,_groupSpawnPos,_coords,_minAI,_maxAI,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _newGroup setVariable ["soldierType","infantry"]; + _newAI = units _newGroup; + blck_monitoredMissionAIGroups pushback _newGroup; + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI(41): Spawning Groups for defined array of group positions: _noAIGroups=1 _newGroup=%1 _newAI = %2",_newGroup, _newAI]; + }; + #endif + + _blck_AllMissionAI append _newAI; + + }; + }forEach _missionGroups; +}; +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 + if (blck_debugLevel >= 2) then + { + diag_log format["missionSpawner: Spawning Groups: case 1: _noAIGroups=1"]; + }; + #endif + _newGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + _newGroup setVariable ["soldierType","infantry"]; + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI (37):: case 1 - > _newGroup = %1",_newGroup]; + }; + #endif + if !(isNull _newGroup) then + { + [_newGroup,_coords,_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _newGroup setVariable ["soldierType","infantry"]; + _newAI = units _newGroup; + blck_monitoredMissionAIGroups pushback _newGroup; + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI(41): Spawning Groups: _noAIGroups=1 _newGroup=%1 _newAI = %2",_newGroup, _newAI]; + }; + #endif + + _blck_AllMissionAI append _newAI; + + }; + }; + case 2: { + + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI(47): Spawning Groups: case 2: _noAIGroups=2"]; // spawn groups on either side of the mission area + }; + #endif + _groupLocations = [_coords,_noAIGroups,15,30] call blck_fnc_findPositionsAlongARadius; + { + if (_ResidualUnits > 0) then + { + _adjusttedGroupSize = _unitsPerGroup + _ResidualUnits; + _ResidualUnits = 0; + } else { + _adjusttedGroupSize = _unitsPerGroup; + }; + _newGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + _newGroup setVariable ["soldierType","infantry"]; + if !(isNull _newGroup) then + { + [_newGroup,_x,_coords,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _newAI = units _newGroup; + blck_monitoredMissionAIGroups pushback _newGroup; + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI(61): case 2: _newGroup=%1",_newGroup]; + }; + #endif + + _blck_AllMissionAI append _newAI; + }; + }forEach _groupLocations; + + }; + case 3: { // spawn one group near the center of the mission and the rest on the perimeter + + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI (68): Spawning Groups: case 3: _noAIGroups=3"]; + }; + #endif + _newGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + _newGroup setVariable ["soldierType","infantry"]; + if !(isNull _newGroup) then + { + [_newGroup,_coords,_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _newAI = units _newGroup; + blck_monitoredMissionAIGroups pushback _newGroup; + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI (73): Case 3: _newGroup=%1",_newGroup]; + }; + #endif + _blck_AllMissionAI append _newAI; + _groupLocations = [_coords,2,20,35] call blck_fnc_findPositionsAlongARadius; + { + _newGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + _newGroup setVariable ["soldierType","infantry"]; + if !(isNull _newGroup) then + { + [_newGroup,_x,_coords,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _newAI = units _newGroup; + blck_monitoredMissionAIGroups pushback _newGroup; + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI(78): Case 3: line 81: _newGroup = %1",_newGroup]; + }; + #endif + _blck_AllMissionAI append _newAI; + }; + }forEach _groupLocations; + }; + }; + default { // spawn one group near the center of the mission and the rest on the perimeter + + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI (88) spawning groups: Case default:"]; + }; + #endif + + _newGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + _newGroup setVariable ["soldierType","infantry"]; + if (isNull _newGroup) then + { + [_newGroup,_coords,_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _newAI = units _newGroup; + blck_monitoredMissionAIGroups pushback _newGroup; + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["_fnc_spawnMissionAI(92): Spawning Groups: Default - > Center Position: _noAIGroups=1 _newGroup=%1 _newAI = %2",_newGroup, _newAI]; + }; + #endif + _blck_AllMissionAI append _newAI; + }; + _groupLocations = [_coords,(_noAIGroups - 1),20,40] call blck_fnc_findPositionsAlongARadius; + { + _newGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + _newGroup setVariable ["soldierType","infantry"]; + if !(isNull _newGroup) then + { + [_newGroup,_x,_coords,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_minPatrolRadius,_maxPatrolRadius,configureWaypoints,_uniforms,_headGear,_vests,_backpacks,_weapons,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _newAI = units _newGroup; + blck_monitoredMissionAIGroups pushback _newGroup; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_spawnMissionAI(99): Default: Radial Positions: _newGroup=%1",_newGroup]; + }; + #endif + _blck_AllMissionAI append _newAI; + }; + }forEach _groupLocations; + }; + }; +}; + +#ifdef blck_debugMode +if (blck_debugLevel >= 1) then +{ + diag_log format["_fnc_spawnMissionAI(133): _abort = %1 | _blck_AllMissionAI = %2",_abort,_blck_AllMissionAI]; +}; +#endif + +_return = [_blck_AllMissionAI,_abort]; +_return diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf new file mode 100644 index 0000000..660844e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf @@ -0,0 +1,113 @@ +/* + By Ghostrider [GRG] + Copyright 2018 + + -------------------------- + 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 ["_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 +}; +_cratesSpawned = []; + +{ + _x params["_crateType","_crateOffset","_lootArray","_lootCounts",["_crateDir",0]]; + //_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; + _crate setDir _crateDir; + _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 >= 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"; + _crate setVariable["crateMarker",_marker]; + }; + #endif +}forEach _cratesToSpawn; + +_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; + blck_temporaryMarkers pushBack [_marker,diag_tickTime + 300]; + //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/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf new file mode 100644 index 0000000..e74a417 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf @@ -0,0 +1,39 @@ +/* + 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/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_coords","_missionLootVehicles",["_loadCrateTiming","atMissionSpawn"],["_lock",0]]; +if (count _coords == 2) then {_coords pushBack 0}; +private _vehs = []; +{ + //diag_log format["spawnMissionCVehicles.sqf _x = %1",_x]; + _x params["_vehType","_vehOffset","_lootArray","_lootCounts",["_dir",0]]; + //diag_log format["spawnMissionCVehicles: _vehType = %1 | _vehOffset = %2 | _lootArray = %3 | _lootCounts = %4",_vehType,_vehOffset,_lootArray,_lootCounts]; + _pos = _coords vectorAdd _vehOffset; + _veh = [_vehType, _pos] call blck_fnc_spawnVehicle; + _veh setDir _dir; + //[_veh] call blck_fnc_emptyObject; + //_veh setVehicleLock "UNLOCKED"; + _veh lock _lock; + if (_loadCrateTiming isEqualTo "atMissionSpawn") then + { + //diag_log format["blck_fnc_spawnMissionLootVehicles::-> loading loot at mission spawn for veh %1",_x]; + [_veh,_lootArray,_lootCounts] call blck_fnc_fillBoxes; + _veh setVariable["lootLoaded",true]; + } + else + { + //diag_log format["blck_fnc_spawnMissionLootVehicles::-> not loading veh loot at this time for veh %1",_x]; + }; + _vehs pushback _veh; +}forEach _missionLootVehicles; +_vehs diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf new file mode 100644 index 0000000..26876e1 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf @@ -0,0 +1,79 @@ +/* + blck_fnc_spawnMissionVehiclePatrols + by Ghostrider [GRG] + returns [] if no groups could be created + returns [_AI_Vehicles,_missionAI] otherwise; + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_coords","_noVehiclePatrols","_skillAI","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false],["_crewCount",4]]; + +if (_uniforms isEqualTo []) then {_uniforms = [_skillAI] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_skillAI] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_skillAI] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_selectAIBackpacks}; +if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms}; + +private["_vehGroup","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_vehicle","_return","_abort","_spawnPos","_v"]; +_vehicles = []; +_missionAI = []; +_abort = false; +//diag_log format["fnc_spawnMissionVehiclePatrols(29): _missionPatrolVehicles = %1",_missionPatrolVehicles]; +if (_missionPatrolVehicles isEqualTo []) then +{ + _useRelativePos = false; + _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius; + { + _v = [_skillAI] call blck_fnc_selectPatrolVehicle; + _missionPatrolVehicles pushBack [_v, _x]; + }forEach _vehiclePatrolSpawns; + //diag_log format["fnc_spawnMissionVehiclePatrols(38): _missionPatrolVehicles updated to %1",_missionPatrolVehicles]; +}; +#define configureWaypoints false +{ + if (_useRelativePos) then + { + _spawnPos = _coords vectorAdd (_x select 1) + } else { + _spawnPos = _x select 1; + }; + _vehicle = _x select 0; + _vehGroup = [blck_AI_Side,true] call blck_fnc_createGroup; + _patrolVehicle = objNull; + //diag_log format["fnc_spawnMissionVehiclePatrols(50): _vehicle = %1 | _spawnPos = %2 | _vehGroup = %3",_vehicle,_spawnPos,_vehGroup]; + if !(isNull _vehGroup) then + { + _vehGroup setVariable["soldierType","vehicle"]; + [_vehGroup,_spawnPos,_coords,_crewCount,_crewCount,_skillAI,1,2,false,_uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaGroup] call blck_fnc_spawnGroup; + _missionAI append (units _vehGroup); + blck_monitoredMissionAIGroups pushBack _vehGroup; + //params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",40],["_maxDis",60],["_group",grpNull],["_setWaypoints",true],["_crewCount",4]]; + //diag_log format["fnc_spawnMissionVehiclePatrols(59): _vehicle = %1 | _vehGroup = %2 | units _vehGroup",_vehicle,_vehGroup, units _vehGroup]; + #define useWaypoints true + _patrolVehicle = [_coords,_spawnPos,_vehicle,40,60,_vehGroup,useWaypoints,_crewCount] call blck_fnc_spawnVehiclePatrol; + /* + if (isNil "_patrolVehicle") then + { + diag_log format["_fnc_spawnMissionVehiclePatrols: nil value returned for _patrolVehicle"]; + _patrolVehicle = objNull; + }; + */ + //diag_log format["fnc_spawnMissionVehiclePatrols(68): _vehGroup = %1 | units _vehGroup = %2",_vehGroup, units _vehGroup]; + if !(isNull _patrolVehicle) then + { + //_patrolVehicle setVariable["vehicleGroup",_vehGroup]; + _vehicles pushback _patrolVehicle; + }; + }; +} forEach _missionPatrolVehicles; +blck_monitoredVehicles append _vehicles; +_return = [_vehicles, _missionAI, _abort]; +_return diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf new file mode 100644 index 0000000..dd2d3c3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf @@ -0,0 +1,73 @@ +/* + for ghostridergaming + By Ghostrider [GRG] + Copyright 2016 + checks the status of each entry in +/* + 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"; + +#ifdef blck_debugMode +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 > 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","_compiledMission","_search","_readyToSpawnQue","_missionToSpawn","_allowReinforcements"]; +_readyToSpawnQue = []; +{ // 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 > 2) then +{ + //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 > 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; + _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; + [_coords,_missionMarker,_missionDifficulty] spawn _compiledMission; +}; + +true diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf new file mode 100644 index 0000000..c5ff54e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnRandomLandscape.sqf @@ -0,0 +1,45 @@ +/* + spawn a group of objects in random locations aligned with the radial from the center of the region to the object. + 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["_coords","_missionLandscape",["_min",3],["_max",15],["_nearest",1]]; +private["_objects","_wreck","_dir","_dirOffset"]; +#define maxObjectSpawnRadius 25 +#define minObjectSpawnRadius 15 +private _objectSpawnRange = maxObjectSpawnRadius - minObjectSpawnRadius; + +_objects = []; +_wreck = createVehicle ["RoadCone_L_F", _coords]; // To designate the mission center +_wreck allowDamage true; +_wreck enableSimulation false; +_wreck enableSimulationGlobal false; +_wreck enableDynamicSimulation false; +_objects pushBack _wreck; +{ + private _dir = random(360); + private _radius = minObjectSpawnRadius + random(maxObjectSpawnRadius); + _wreck = createVehicle[_x, _coords getPos[_radius,_dir], [], 2]; + //diag_log format["_fnc_spawnRandomLandscape: _x = %1 | _wreck = %2",_x,_wreck]; + _wreck allowDamage true; + _wreck enableSimulation false; + _wreck enableSimulationGlobal false; + _wreck enableDynamicSimulation false; + _wreck setDir (_wreck getRelDir _coords); + _objects pushback _wreck; + sleep 0.1; +} forEach _missionLandscape; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnRandomLandscape::-->> _objects = %1",_objects];}; +#endif + +_objects diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnSDVPatrol.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnSDVPatrol.sqf new file mode 100644 index 0000000..7b158b4 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnSDVPatrol.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +// ["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0], +params["_SDV","_pos","_difficulty","_numAI","_patrolRadius","_respawnTime"]; +//diag_log format["_fnc_spawnSDVPatrol: _this = %1",_this]; +private["_vehicle","_group","_diveDepth"]; +_group = [blck_AI_Side,true] call blck_fnc_createGroup; +if !(isNull _group) then +{ + [_group,_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius - 2,_patrolRadius,blck_UMS_uniforms,blck_UMS_headgear,true,blck_UMS_weapons,blck_UMS_vests,true] call blck_fnc_spawnGroup; + _vehicle = [[_pos select 0, _pos select 1,0],[_pos select 0, _pos select 1,0],_vehType,_patrolRadius - 2,_patrolRadius,_group] call blck_fnc_spawnVehiclePatrol; + _diveDepth = 0.5 * [_pos] call blck_fnc_findWaterDepth; + (driver _vehicle) swiminDepth (_diveDepth select 2); +}; +_group \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnScubaGroup.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnScubaGroup.sqf new file mode 100644 index 0000000..f9e4bf9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnScubaGroup.sqf @@ -0,0 +1,30 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#define configureWaypoints true +#define isScubaGroup true +// [_pos,_difficulty,_units,_patrolRadius] +params["_pos",["_skillLevel","red"],["_numUnits",6],["_patrolRadius",15]]; +//diag_log format["_fnc_spawnScubaGroup: _this = %1",_this]; +private["_group","_diveDepth"]; +_group = [blck_AI_Side,true] call blck_fnc_createGroup; +if !(isNull _group) then +{ + //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 = [_pos] call blck_fnc_findWaterDepth * 0.5; + { + _x swimInDepth (_diveDepth); + } forEach units _group; +}; +_group; diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnSurfacePatrol.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnSurfacePatrol.sqf new file mode 100644 index 0000000..dc60d46 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnSurfacePatrol.sqf @@ -0,0 +1,25 @@ + +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +// ["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0], +params["_SDV","_pos","_difficulty","_numAI","_patrolRadius","_respawnTime"]; +//diag_log format["_fnc_spawnSurfacePatrol: _this = %1",_this]; +private _group = [blck_AI_Side,true] call blck_fnc_createGroup; +private _vehicle = objNull; +if !(isNull _group) then +{ + [_group,_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius - 2,_patrolRadius,blck_UMS_uniforms,blck_UMS_headgear,true,blck_UMS_weapons,blck_UMS_vests,true] call blck_fnc_spawnGroup; + // params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]]; + _vehicle = [_pos,_pos,_vehType,_minDis,_maxDis,_group] call blck_fnc_spawnVehiclePatrol; +}; +_vehicle + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf new file mode 100644 index 0000000..ada9e9c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf @@ -0,0 +1,65 @@ +/* + Update the parameters for a mission in the list of missions running at that time. + Call with the name of the marker associated with the mission and either "Active" or "Completed" + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_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 > 3) then {diag_log format["_fnc_updateMissionQue :: _mission = %1 | _status = %2 | _coords = %3",_mission,_status,_coords];}; +#endif +_index = -1; +private["_index","_element","_waitTime"]; +{ + 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 + if (blck_debuglevel > 4) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions began as %1",blck_pendingMissions];}; + #endif + + _element = blck_pendingMissions select _index; + + #ifdef blck_debugMode + if (blck_debuglevel > 3) 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[5, -1]; + _element set[6,_coords]; + }; + if (toLower(_status) isEqualTo "inactive") then + { + _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 + if (blck_debuglevel > 2) then {diag_log format["_fnc_updateMissionQue:: -- >> _element after update = %1",_element];}; + #endif + + blck_pendingMissions set [_index, _element]; + + #ifdef blck_debugMode + if (blck_debuglevel > 4) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions after update = %1",blck_pendingMissions];}; + #endif +}; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddSDVVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddSDVVehicle.sqf new file mode 100644 index 0000000..49581d0 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddSDVVehicle.sqf @@ -0,0 +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/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehicle"]; +blck_sm_submarines pushBack [_vehicle,grpNull,0]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddScubaGroup.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddScubaGroup.sqf new file mode 100644 index 0000000..3b73fdc --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddScubaGroup.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + Copyright 20167 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_group"]; +blck_sm_scubaGroups pushBack [_group,grpNull,0]; +//diag_log format["_sm_AddScubaGroup:: blck_sm_scubaGroups = %1",blck_sm_scubaGroups]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddSurfaceVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddSurfaceVehicle.sqf new file mode 100644 index 0000000..3150815 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/GMS_sm_AddSurfaceVehicle.sqf @@ -0,0 +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/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehicle"]; +blck_sm_surfaceShips pushBack [_vehicle,grpNull,0]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddAircraft.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddAircraft.sqf new file mode 100644 index 0000000..2aed2f4 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddAircraft.sqf @@ -0,0 +1,17 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_sm_addAircraft: _this = %5",_this]; +params["_aircraftPatrol"]; +//diag_log format["_sm_addAircraft: _aircraftPatrol = %1",_aircraftPatrol]; +blck_sm_Aircraft pushBack [_aircraftPatrol,grpNull,0]; +//diag_log format["_sm_addAircraft: updated blck_sm_Aircraft = %1",blck_sm_Aircraft]; +true diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddEmplaced.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddEmplaced.sqf new file mode 100644 index 0000000..01d7722 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddEmplaced.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_emplacedWeapon"]; +blck_sm_Emplaced pushBack [_emplacedWeapon,grpNull,0]; +diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddGroup.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddGroup.sqf new file mode 100644 index 0000000..49abe09 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddGroup.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_group"]; +blck_sm_Groups pushBack [_group,grpNull,0]; +diag_log format["_sm_AddGroup:: blck_sm_Groups = %1",blck_sm_Groups]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddVehicle.sqf new file mode 100644 index 0000000..47dd046 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_AddVehicle.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehicle"]; +blck_sm_Vehicles pushBack [_vehicle,grpNull,0]; +//diag_log format["_fnc_sm_AddVehicle: _vehicle = %1",_vehicle]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnAirPatrol.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnAirPatrol.sqf new file mode 100644 index 0000000..02dc685 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnAirPatrol.sqf @@ -0,0 +1,31 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +diag_log format["_fnc_sm_spawnAirPatrols: _this = %1",_this]; +params["_airPatrols"]; +private["_aircraft","_pos","_difficulty","_uniforms","_headGear"]; +_aircraft = _x select 0; +_pos = _x select 1; +_difficulty = _x select 2; +_uniforms = blck_SkinList; +_headGear = blck_headgearList; +switch (_difficulty) do +{ + case "blue": {_weapons = blck_WeaponList_Blue;}; + case "red": {_weapons = blck_WeaponList_Red}; + case "green": {_weapons = blck_WeaponList_Green}; + case "orange": {_weapons = blck_WeaponList_Orange}; +}; +_return = [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli; +_group = group (_return select 1 select 0); +_group + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnAirPatrols.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnAirPatrols.sqf new file mode 100644 index 0000000..9aaf64e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnAirPatrols.sqf @@ -0,0 +1,50 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +/* +_coords = _this select 0; +_skillAI = _this select 1; +_weapons = _this select 2; +_uniforms = _this select 3; +_headGear = _this select 4; +_helis = _this select 5; +*/ + +params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear","_weapons"]; +diag_log format["_sm_spawnAirPatrols:: _this = %1",_this]; +diag_log format["_sm_spawnAirPatrols:: _airPatrols = %1",_airPatrols]; +if (_airPatrols isEqualTo []) then +{ + for "_i" from 1 to _noAirPatrols do + { + /* + _coords = _this select 0; + _skillAI = _this select 1; + _weapons = _this select 2; + _uniforms = _this select 3; + _headGear = _this select 4; + _helis = _this select 5; + */ + [_center,_difficulty,_weapons,_uniforms,_headGear,_heliTypes,0] call blck_fnc_spawnMissionHeli; + }; +} else { + { + /* + /*[aircraft classname, position, difficulty(blue, red etc)]*/ + _aircraft = _x select 0; + _pos = _x select 1; + _difficulty = _x select 2; + [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli; + }forEach _airPatrols; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnEmplaced.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnEmplaced.sqf new file mode 100644 index 0000000..365f0a6 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnEmplaced.sqf @@ -0,0 +1,62 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"]; +_emplacedWeps = []; +_emplacedAI = []; +_units = []; +_abort = false; +_pos = []; + +//diag_log format["_sm_spawnEmplaced :: _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] ]; + private _empGroup = [] call blck_fnc_createGroup; + if !(_empGroup) then + { + [_empGroup,_pos,1,1,_difficulty,_pos,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; + _empGroup setcombatmode "RED"; + _empGroup setBehaviour "COMBAT"; + [_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints; + //if (isNull _empGroup) exitWith {_abort = _true}; + _wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle; + //_empGroup setVariable["groupVehicle",_wep]; + _wep setVariable["vehicleGroup",_empGroup]; + _wep setVariable["GRG_vehType","emplaced"]; + _wep setPosATL _pos; + [_wep,false] call blck_fnc_configureMissionVehicle; + _units = units _empGroup; + _gunner = _units select 0; + _gunner moveingunner _wep; + }; +} forEach _missionEmplacedWeapons; +blck_monitoredVehicles append _emplacedWeps; + +true diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnEmplaceds.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnEmplaceds.sqf new file mode 100644 index 0000000..7bef936 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnEmplaceds.sqf @@ -0,0 +1,58 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"]; +_emplacedWeps = []; +_emplacedAI = []; +_units = []; +_abort = false; +_pos = []; + +//diag_log format["_sm_spawnEmplaced :: _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", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ]; + __empGroup = [_pos,_pos,1,1,_difficulty,1,2,false,_uniforms,_headGear] call blck_fnc_spawnGroup; + _empGroup setcombatmode "RED"; + _empGroup setBehaviour "COMBAT"; + [_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints; + //if (isNull _empGroup) exitWith {_abort = _true}; + _wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle; + //_empGroup setVariable["groupVehicle",_wep]; + _wep setVariable["vehicleGroup",_empGroup]; + _wep setVariable["GRG_vehType","emplaced"]; + _wep setPosATL _pos; + [_wep,false] call blck_fnc_configureMissionVehicle; + _units = units _empGroup; + _gunner = _units select 0; + _gunner moveingunner _wep; +} forEach _missionEmplacedWeapons; +blck_monitoredVehicles append _emplacedWeps; + +true diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnInfantryPatrols.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnInfantryPatrols.sqf new file mode 100644 index 0000000..16c5c9e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnInfantryPatrols.sqf @@ -0,0 +1,41 @@ +/* + 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"; +// TODO: Used? +// 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. + //params[_coords,"_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weapons,sideArms,_isScubaGroup]; + [_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 + private _group = [] call blck_fnc_createGroup; + // params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ]; + if !(isNull _group) then + { + [_group,_pos,_pos,_noAI,_noAI,_difficulty,_patrolRadius,_patrolRadius,true,_uniforms,_headGear] call blck_fnc_spawnGroup; + }; + }forEach _patrols; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnMission.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnMission.sqf new file mode 100644 index 0000000..e359772 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnMission.sqf @@ -0,0 +1,51 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_mission"]; +// Spawn landscape +// params["_objects"]; +[_missionLandscape] call blck_fnc_sm_spawnObjects; +uiSleep 10; // Let the objects 'settle' before placing anything on or around them. + + +// Spawn Air Patrols +// params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear"]; +[_airPatrols,_noAirPatrols,_aircraftTypes,_missionCenter,_difficulty,_uniforms,_headgear,_weapons] call blck_fnc_sm_spawnAirPatrols; +//uiSleep 1; + +// Spawn Vehicle Patrols +// params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]]; +[_missionCenter,_noVehiclePatrols,_vehiclePatrolParameters,_difficulty,_uniforms,_headGear] call blck_fnc_sm_spawnVehiclePatrols; +//uiSleep 1; + + +// spawn infantry +// params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_weapons",blck_WeaponList_Orange],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; +[_aiGroupParameters, _missionCenter,_minNoAI,_maxNoAI,_difficulty,_weapons,_uniforms,_headGear] call blck_fnc_sm_spawnInfantryPatrols; +//uiSleep 1; + +// spawn loot vehicles +// params["_objects","_coords","_loot","_lootCounts"]; +[_missionLootVehicles,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers; + +// Spawn static weapons +// params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +[_missionEmplacedWeapons,_noEmplacedWeapons,_difficulty,_missionCenter,_uniforms,_headGear] call blck_fnc_sm_spawnEmplaceds; + +// spawn loot chests +[_missionLootBoxes,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers; + +_blck_localMissionMarker = ["",_missionCenter,"","",_markerColor,_markerType]; +[_blck_localMissionMarker] call blck_fnc_spawnMarker; + +diag_log format["[blckeagls] Static Mission Spawner: Mission %1 spawned",_mission]; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnVehiclePatrols.sqf b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnVehiclePatrols.sqf new file mode 100644 index 0000000..7b90c61 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Missions/Old_Or_Unused_Code/GMS_fnc_sm_spawnVehiclePatrols.sqf @@ -0,0 +1,56 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]]; +//diag_log format["_sm_spawnVehiclePatrols:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns]; +private["_vehGroup","_patrolVehicle","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return","_abort"]; +//if (count _weapons isEqualTo 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (_vehiclePatrolSpawns isEqualTo []) then +{ + private["_spawnPoints","_vehType"]; + _spawnPoints = [_coords,_noVehiclePatrols,75,100] call blck_fnc_findPositionsAlongARadius; + { + // ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red", 600], + _vehType = selectRandom blck_AIPatrolVehicles; + _vehiclePatrolSpawns pushBack [_vehType, _x, _aiDifficultyLevel, 150]; + } forEach _spawnPoints; +}; + +{ + private ["_vehicle","_spawnPos","_difficulty","_patrolRadius"]; + _vehicle = _x select 0; + _spawnPos = _x select 1; + _difficulty = _x select 2; + _patrolRadius = _x select 3; + //_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; + private _vehGroup = [] call blck_fnc_createGroup; + _vehGroup setVariable["soldierType","vehicle"]; + if !(isNull _vehGroup) then + { + [_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; // Check whether we should pass the group; looks like we should. + // Nope, not necessary + //_vehGroup setVariable["groupVehicle",_vehicle]; + + if !(isNull _patrolVehicle) then + { + _patrolVehicle setVariable["vehicleGroup",_vehGroup]; + }; + }; +} forEach _vehiclePatrolSpawns; + +true + + diff --git a/Server/@GMS/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf b/Server/@GMS/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf new file mode 100644 index 0000000..c348954 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf @@ -0,0 +1,53 @@ +/* + GMS_fnc_time.sqf + by Ghostrider-GRG- + + Credits to AWOL, A3W, LouD and Creampie for insights. + +*/ + +/* + blck_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below + // which can be set using the corresponding variables in the config file for that mod. + + blck_timeAccelerationDay = 1; // Daytime time accelearation + blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 6; // Nighttim time acceleration + -------------------------- + 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 ["_arr","_sunrise","_sunset","_time"]; +_arr = date call BIS_fnc_sunriseSunsetTime; +_sunrise = _arr select 0; +_sunset = _arr select 1; +_time = dayTime; + +//diag_log "fnc_Time:: Debug settings ON"; +//diag_log format["_fnc_Time:: --> blck_useTimeAcceleration = %1", blck_useTimeAcceleration]; +//diag_log format["_fnc_Time:: -- > _sunrise = %1 | _sunset = %2 | _time = %3",_sunrise,_sunset,_time]; + + +// Night +if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith { + setTimeMultiplier blck_timeAccelerationNight; + //diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; +}; + +// Day +if (_time > (_sunrise + 0.5) && _time < (_sunset - 0.5)) exitWith { + setTimeMultiplier blck_timeAccelerationDay; + //diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; +}; + +// default +setTimeMultiplier blck_timeAccelerationDusk; +//diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHandleDamage.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHandleDamage.sqf new file mode 100644 index 0000000..daddfac --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHandleDamage.sqf @@ -0,0 +1,30 @@ +/* + + Deals with instances in which a unit is damaged (not in use). + By Ghostrider [GRG] + + unit: Object - Object the event handler is assigned to. + selectionName: String - Name of the selection where the unit was damaged. "" for over-all structural damage, "?" for unknown selections. + damage: Number - Resulting level of damage for the selection. + source: Object - The source unit that caused the damage. + projectile: String - Classname of the projectile that caused inflicted the damage. ("" for unknown, such as falling damage.) + + (Since Arma 3 v 1.49.131802) + + hitPartIndex: Number - Hit part index of the hit point, -1 otherwise. + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private ["_unit","_killer","_group","_deleteAI_At"]; +_unit = _this select 0; +_source = _this select 3; + +if (isPlayer _source) then { + [_unit,_source] call GRMS_fnc_alertGroup; +}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf new file mode 100644 index 0000000..d1cf1a5 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHit.sqf @@ -0,0 +1,13 @@ +/* + 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/ +*/ + //diag_log format["_EH_AIHit: _this = %1",_this]; + if (isServer) then {_this call blck_fnc_processAIHit}; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIKilled.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIKilled.sqf new file mode 100644 index 0000000..43678f3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIKilled.sqf @@ -0,0 +1,16 @@ + +/* + Killed handler for _units + 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"; +#define unit _this select 0 +if (isServer) then {_this call blck_fnc_processAIKill}; +if (local (unit)) then {_this call blck_fnc_processAIKill}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIfiredNear.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIfiredNear.sqf new file mode 100644 index 0000000..a9cc62c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIfiredNear.sqf @@ -0,0 +1,33 @@ + +/* + blck_EH_AIfiredNear + firedNear event handler for _units + 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/ + + See https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#FiredNear for details on this event handler. + + this addEventHandler ["FiredNear", { + params ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_gunner"]; +}]; + + unit: Object - Object the event handler is assigned to + firer: Object - Object which fires a weapon near the unit + distance: Number - Distance in meters between the unit and firer (max. distance ~69m) + weapon: String - Fired weapon + muzzle: String - Muzzle that was used + mode: String - Current mode of the fired weapon + ammo: String - Ammo used + Introduced with Arma 3 version 1.65 + gunner: Object - gunner, whose weapons are fired +*/ +//#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//if (isServer) then {_this remoteExec ["blck_fnc_processAIKill",2]}; +//if (local (_this select 0)) then {_this call blck_fnc_processAIFiredNear}; +_this call blck_fnc_processAIFiredNear \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf new file mode 100644 index 0000000..7f8093f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf @@ -0,0 +1,31 @@ +/* + + Handle case where a unit reloads weapon. + This was used in place of fired event handlers to add realism and deal with issues with the arma engine post v1.64 + By Ghostrider [GRG] + + https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/Reloaded + + this addEventHandler ["Reloaded", { + params ["_unit", "_weapon", "_muzzle", "_newMagazine", "_oldMagazine"]; + }]; + + -------------------------- + 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 unit _this select 0 +#define newMagazine _this select 3 select 0 +(unit) addMagazine (newMagazine); +#ifdef blck_debugMode +if (blck_debugLevel > 2) then { + //diag_log format["_EH_unitWeaponReloaded:: unit %1 reloaded weapon %2 with magazine %3",_this select 0, (_this select 3 select 0)]; + //diag_log format["_EH_unitWeaponReloaded:: unit %1 currently has the following magazines 2",_this select 0,magazines (_this select 0)]; + diag_log format["_EH_unitWeaponReloaded:: one magazine of type %1 added to inventory of unit %2",_mag,(_this select 3 select 0]; +}; +#endif + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertGroupUnits.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertGroupUnits.sqf new file mode 100644 index 0000000..41e6501 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertGroupUnits.sqf @@ -0,0 +1,24 @@ +/* + _fnc_alertGroupUnits + by Ghostrider + Alerts the units of a group of the location of an enemy. + + -------------------------- + 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[["_unit",objNull],["_target",objNull]]; +if (isNull _unit) exitWith {}; +//diag_log format["_fnc_alertGroupUnits: _unit = %1 | _target = %2",_unit,_target]; +{ + _x reveal [_target,(_x knowsAbout _target) + (_unit getVariable ["intelligence",1])]; + _x doSuppressiveFire _target; +}forEach (units (group _unit)); +//leader(group _target) doSuppressiveFire _target; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyGroups.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyGroups.sqf new file mode 100644 index 0000000..3490218 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyGroups.sqf @@ -0,0 +1,23 @@ +/* + _fnc_alertNearbyGroups + by Ghostrider + Allerts all units within the nearest group to the location of a killer. + ** Not in use at this time; reserved for the future ** + -------------------------- + 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["_nearbyGroups","_intelligence"]; +params["_unit","_killer",["_searchRadius",300]]; +private _nearbyGroups = allGroups select{(_unit distance (leader _x) < _searchRadius)}; +{ + private _group = _x; + { + _x reveal[_killer,(_x knowsAbout _killer) + (_x getVariable ["intelligence",1])]; + }forEach (units _group); +}forEach _nearbyGroups; diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf new file mode 100644 index 0000000..1555b28 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf @@ -0,0 +1,21 @@ +/* + _fnc_alertNearbyUnits + by Ghostrider + Allerts all units within a certain radius of the location of a killer. + ** Not in use at this time; reserved for the future ** + -------------------------- + 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["_unit","_killer"]; + +private["_units"]; +if (toLower(blck_modType) == "epoch") then {_units = _unit nearEntities ["I_Soldier_EPOCH", (_unit getVariable ["alertDist",300])]}; +if (toLower(blck_modType) == "exile") then {_units = _unit nearEntities ["i_g_soldier_unarmed_f", (_unit getVariable ["alertDist",300])]}; +{ + _x reveal[_killer, (_x knowsAbout _killer) + (_unit getVariable ["intelligence",1])] +}forEach _units; diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyVehicles.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyVehicles.sqf new file mode 100644 index 0000000..fa88d50 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyVehicles.sqf @@ -0,0 +1,25 @@ +/* + _fnc_alertNearbyVehicles + 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[["_target",objNull]]; +//diag_log format["_fnc_alertNearbyVehicles: _target = %1 | typeName _target = %2",_target,typeName _target]; +if (isnull _target) exitWith {}; +private _nearestVehicles = (nearestObjects [getPos _target,["Car","Truck","Tank","Ship"],300]); +if (_nearestVehicles isEqualTo []) exitWith {}; +private _nearestVehicle = _nearestVehicles select 0; +//diag_log format["_fnc_alertNearbyVehicles: _target = %1 | _nearestVehicle = %2",_target,_nearestVehicle]; +[(crew _nearestVehicle) select 0,_target] call blck_fnc_alertGroupUnits; + + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf new file mode 100644 index 0000000..0cdd748 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf @@ -0,0 +1,19 @@ + +/* + _fnc_alertNearestGroup +*/ +/* + 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/ +*/ +params["_group"]; +private _nearbyGroup = [group _unit] call blck_fnc_findNearestGroup; +{ + _x reveal[_killer,(_x knowsAbout _killer) + (_unit getVariable ["intelligence",1])]; +}forEach (units _nearbyGroup); diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf new file mode 100644 index 0000000..a6e37c4 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf @@ -0,0 +1,30 @@ +/* + Delete alive AI. + 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"; + +for "_i" from 1 to (count blck_liveMissionAI) do { + if ((_i) <= count blck_liveMissionAI) then { + _units = blck_liveMissionAI deleteat 0; + _units params ["_unitsarr","_timer"]; + if (diag_tickTime > _timer) then { + { + if ((alive _x) && !(isNull objectParent _x)) then { + [objectParent _x] call blck_fnc_deleteAIvehicle; + }; + [_x] call blck_fnc_deleteAI; + } forEach _unitsarr; + } + else { + blck_liveMissionAI pushback _units; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupDeadAI.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupDeadAI.sqf new file mode 100644 index 0000000..3144c55 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupDeadAI.sqf @@ -0,0 +1,34 @@ +/* + Delete Dead AI and nearby weapons after an appropriate period. + 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"; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then {diag_log format["fnc_cleanupDeadAI called at time %1",diag_tickTime];}; +#endif + +private["_aiList","_ai"]; +_aiList = +blck_deadAI; +{ + if (diag_tickTime > _x getVariable ["blck_cleanupAt",0]) then + { + _ai = _x; + _nearplayer = (_ai nearEntities 1500) select {isplayer _x}; + if (_nearplayer isequalto []) then { + { + deleteVehicle _x; + }forEach nearestObjects [getPos _ai,["WeaponHolderSimulated","GroundWeapoonHolder"],3]; + blck_deadAI = blck_deadAI - [_ai]; + deleteVehicle _ai; + }; + }; +} forEach _aiList; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf new file mode 100644 index 0000000..9e03276 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf @@ -0,0 +1,32 @@ +/* + Delete a unit. + 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"; + +private["_ai","_group"]; +params["_unit"]; + +//if (blck_debugLevel > 2) then {diag_log format["_fnc_deleteAI::-> deleting unit = %1",_unit];}; + +{ + _unit removeAllEventHandlers _x; +}forEach ["reloaded"]; +{ + _unit removeAllMPEventHandlers _x; +} forEach ["MPKilled","MPHit"]; +_group = (group _unit); +[_unit] joinSilent grpNull; +deleteVehicle _unit; +if (count units _group isEqualTo 0) then +{ + deletegroup _group; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf new file mode 100644 index 0000000..8d90378 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf @@ -0,0 +1,89 @@ +/* + calculate a reward player for AI Kills in crypto. + Code fragment adapted from VEMF + call as [_unit,_killer] call blck_fnc_handlePlayerUpdates; + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +_fn_doUpdates = { + params["_player"]; + private _lastkill = _player getVariable["blck_lastkill",diag_tickTime]; + _player setVariable["blck_lastkill",diag_tickTime]; + private _kills = (_player getVariable["blck_kills",0]) + 1; + if ((diag_tickTime - _lastkill) < 240) then + { + _player setVariable["blck_kills",_kills]; + } else { + _player setVariable["blck_kills",0]; + }; + + if (toLower(blck_modType) isEqualTo "epoch") then + { + #define maxReward 2500 + private _distanceBonus = floor((_unit distance _player)/100); + private _killstreakBonus = 3 * (_player getVariable["blck_kills",0]); + private _reward = 25 + _distanceBonus + _killstreakBonus; + [_player,_reward ] call blck_fnc_giveTakeCrypto; + if (blck_useKillScoreMessage) then + { + [["showScore",[_reward,"",_kills],""],[_player]] call blck_fnc_messageplayers; + }; + }; + if (toLower(blck_modType) isEqualTo "exile") then + { + private _distanceBonus = floor((_unit distance _player)/100); + private _killstreakBonus = 3 * (_player getVariable["blck_kills",0]); + private _respectGained = 25 + _distanceBonus + _killstreakBonus; + private _score = _player getVariable ["ExileScore", 0]; + _score = _score + (_respectGained); + _player setVariable ["ExileScore", _score]; + format["setAccountScore:%1:%2", _score,getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; + private _newKillerFrags = _player getVariable ["ExileKills", 0]; + _newKillerFrags = _newKillerFrags + 1; + _player setVariable ["ExileKills", _newKillerFrags]; + format["addAccountKill:%1", getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; + _player call ExileServer_object_player_sendStatsUpdate; + if (blck_useKillScoreMessage) then + { + [["showScore",[_respectGained,_distanceBonus,_kills]], [_player]] call blck_fnc_messageplayers; + }; + }; + if (blck_useKillMessages) then + { + private _weapon = currentWeapon _player; + _killstreakMsg = format[" %1X KILLSTREAK",_kills]; + private["_message"]; + if (blck_useKilledAIName) then + { + _message = format["[blck] %2: killed by %1 from %3m",name _player,name _unit,round(_unit distance _player)]; + }else{ + _message = format["[blck] %1 killed with %2 from %3 meters",name _player,getText(configFile >> "CfgWeapons" >> _weapon >> "DisplayName"), round(_unit distance _player)]; + }; + _message =_message + _killstreakMsg; + [["aikilled",_message,"victory"],allPlayers] call blck_fnc_messageplayers; + }; + +}; + +params["_unit","_killer"]; +private _killerType = _killer call BIS_fnc_objectType; // anObject call BIS_fnc_objectType + +if ((_killerType select 0 )isEqualTo "Vehicle") then +{ + { + _player = _killer; + if (getPlayerUID(_x) isEqualTo getPlayerUID(_killer)) exitWith { + [_x] call _fn_doUpdates; + }; + + }forEach (crew (vehicle _killer)); +} else { + [_killer] call _fn_doUpdates; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_placeCharacterInBuilding.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_placeCharacterInBuilding.sqf new file mode 100644 index 0000000..1cafabb --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_placeCharacterInBuilding.sqf @@ -0,0 +1,25 @@ +/* + 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["_character","_center","_characterBuildingConfigs"]; +//diag_log format["_fnc_placeCharacterInBuilding: _characterBuildingConfigs = %1",_characterBuildingConfigs]; +private ["_obj"]; +if !(_characterBuildingConfigs isEqualTo []) then +{ + _obj = createVehicle[(_characterBuildingConfigs select 0),_center vectorAdd (_characterBuildingConfigs select 1),[],0,"CAN_COLLIDE"]; + //diag_log format["_fnc_placeCharacterInBuilding: _obj = %1",_obj]; + _obj setDir (_characterBuildingConfigs select 2); + _obj allowDamage true; + _obj enableDynamicSimulation true; + _character setPosATL (_obj buildingPos (round(random((count ([_obj] call BIS_fnc_buildingPositions)) -1)))); +}; +_obj \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf new file mode 100644 index 0000000..dc95cb8 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf @@ -0,0 +1,65 @@ +/* + By Ghostrider [GRG] + + Handles the case where a unit is hit. + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +if !(isServer) exitWith {}; +private ["_unit","_instigator","_group","_wp"]; +_unit = _this select 0 select 0; +_instigator = _this select 0 select 3; +diag_log format["_fnc_processAIHit:(19): _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit]; + +//diag_log format["_fnc_processAIHit: evaluating case of ai not alive"]; +if (!(alive _unit)) exitWith { + //diag_log format["_fnc_processAIHit: _unit %1 is dead",_unit]; + [_unit, _instigator] call blck_fnc_processAIKill; +}; +//diag_log format["_fnc_processAIHit: evaluating case of damage > 0.95"]; +if (damage _unit > 0.95) exitWith { + //diag_log format["_fnc_processAIHit: _unit %1 extensively damagged",_unit]; + _unit setDamage 1.2; [_unit, _instigator] call blck_fnc_processAIKill; +}; +//diag_log format["_fnc_processAIHit: evaluating case of killer not player"]; +if !(isPlayer _instigator) exitWith { + //diag_log format["_fnc_procesAIHit: _instigator %1 not player",_instigator]; +}; + +//diag_log format["_processAIHit: calling [_unit,_instigator] call blck_fnc_alertGroupUnits with _unit = %1 and _instigator = %2",_unit,_instigator]; +[_unit,_instigator,50] call GMS_fnc_alertNearbyGroups; +[_instigator] call blck_fnc_alertNearbyVehicles; +//diag_log format["_fnc_processAIHit: updating group and waypoint settings"]; +_group = group _unit; +_wp = [_group, currentWaypoint _group]; +_wp setWaypointBehaviour "COMBAT"; +_group setCombatMode "RED"; +_wp setWaypointCombatMode "RED"; + +//diag_log format["_fnc_processAIHit: determining if prior heal has occured"]; +if (_unit getVariable ["hasHealed",false]) exitWith { + //diag_log format["_fnc_processAIHit: _unit %1 has already healed one",_unit]; +}; +//diag_log format["_fnc_processAIHit: no prior heal so evaluate whether one is needed"]; +if ((damage _unit) > 0.2 ) then +{ + //diag_log format["_EH_AIHit::-->> Healing unit %1",_unit]; + _unit setVariable["hasHealed",true,true]; + if (blck_useSmokeWhenHealing) then + { + "SmokeShellRed" createVehicle (position _unit getPos[1,random(359)]); + }; + _unit addItem "FAK"; + _unit action ["HealSoldierSelf", _unit]; + _unit setDamage 0; + //uiSleep 1; + if ("FAK" in (items _unit)) then {_unit removeItem "FAK"}; + //_unit removeItem "FAK"; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf new file mode 100644 index 0000000..f768a98 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf @@ -0,0 +1,74 @@ +/* + Handle AI Deaths + 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/ +*/ +// TODO: check that emplaced weapons that should be deleted are added to the scheduler. +// assumptions: this is always and only run on the server regardless if th event is triggered on an HC or other client. +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_unit","_killer","_instigator"]; +if (hasInterface || !(hasInterface || isDedicated)) exitWith // Only run this on HC or clients +{ + if (local _unit) then + { + + // soldierOne action ["Eject", vehicle soldierOne]; + if !((vehicle _unit) isKindOf "Man") then + { + _unit action["Eject", vehicle _unit]; + [vehicle _unit] call blck_fnc_checkForEmptyVehicle; + }; + }; +}; + +//diag_log format["_fnc_processAIKill: _unit = %1 | _killer = %2",_unit,_killer]; +if (_unit getVariable["blck_cleanupAt",-1] > 0) exitWith {}; // this is here so that the script is not accidently run more than once for each MPKilled occurrence. +_unit setVariable ["blck_cleanupAt", (diag_tickTime) + blck_bodyCleanUpTimer]; +_unit disableAI "ALL"; +{ + _unit removeAllMPEventHandlers _x; +}forEach["MPHit","MPKilled"]; +{ + _unit removeAllEventHandlers _x; +}forEach["FiredNear","Reloaded"]; + +blck_deadAI pushback _unit; +if (count(units (group _unit)) isEqualTo 0) then +{ + deleteGroup _group; +}; +[_unit] joinSilent grpNull; + +//diag_log format["_fnc_processAIKill: unit linked to crew of vehicle %1 | typeOf (vehicle _unit = %2)",vehicle _unit,typeOf (vehicle _unit)]; +if !((vehicle _unit) isKindOf "Man") then +{ + [_unit, ["Eject", vehicle _unit]] remoteExec ["action",(owner _unit)]; +}; + +if (blck_launcherCleanup) then {[_unit] call blck_fnc_removeLaunchers}; +if (blck_removeNVG) then {[_unit] call blck_fnc_removeNVG}; +if !(isPlayer _killer) exitWith {}; +[_unit,_killer,50] call GMS_fnc_alertNearbyGroups; +[_killer] call blck_fnc_alertNearbyVehicles; +private _wp = [group _unit, currentWaypoint (group _unit)]; +_wp setWaypointBehaviour "COMBAT"; +(group _unit) setCombatMode "RED"; +_wp setWaypointCombatMode "RED"; + +if (blck_showCountAliveAI) then +{ + { + [_x select 0, _x select 1, _x select 2] call blck_fnc_updateMarkerAliveCount; + } forEach blck_missionMarkers; +}; + +if ([_unit,_killer] call blck_fnc_processIlleagalAIKills) then { + [_unit,_killer] call GMS_fnc_handlePlayerUpdates; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIfiredNear.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIfiredNear.sqf new file mode 100644 index 0000000..d3894e2 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIfiredNear.sqf @@ -0,0 +1,38 @@ + +/* + blck_fnc_processAIfiredNear + firedNear event handler for _units + 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/ + + See https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#FiredNear for details on this event handler. + + this addEventHandler ["FiredNear", { + params ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_gunner"]; +}]; + + unit: Object - Object the event handler is assigned to + firer: Object - Object which fires a weapon near the unit + distance: Number - Distance in meters between the unit and firer (max. distance ~69m) + weapon: String - Fired weapon + muzzle: String - Muzzle that was used + mode: String - Current mode of the fired weapon + ammo: String - Ammo used + Introduced with Arma 3 version 1.65 + gunner: Object - gunner, whose weapons are fired +*/ +//#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_unit","_firedBy"]; +//if ((side _unit) isEqualTo (side _firedBy) exitWith {}; // nearyby friendly fire +(group _unit) setBehaviour "COMBAT"; +(group _unit) setCombatMode "RED"; +diag_log format["_fnc_processAIfiredNear: _unit %1 knows %2 about _firedBy %3",_unit, _unit knowsAbout _firedBy,_firedBy]; +diag_log format["_fnc_processAIfiredNear: owner _unit = %1 | local _unit = %2",owner _unit, local _unit]; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf new file mode 100644 index 0000000..f9b482c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf @@ -0,0 +1,55 @@ +/* + 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"; + +// assumptions: +// 1) if the muzzle that killed the AI was forbbiden then the kill does not count +// 2) if the vehicle the player was in when the player killed the AI, the kill does not count. +// data to check: blck_forbidenVehicles +// and blck_forbidenVehicleGuns +// blck_VK_RunoverDamage +// blck_RunGear +private["_missionType","_wasRunover","_launcher","_legal"]; +params["_unit","_killer"]; +_legal = true; +if (vehicle _killer == _killer) exitWith {true}; +// Player not in vehicle, no further checks needed. +if (_killer == (driver (vehicle _killer))) then // If the killer is also the driver then the killer must have run the AI over +{ + if(blck_RunGear && !((vehicle _killer) isKindOf "Air")) then // assume aircraft are too fragile to kill AI by moving close to ground + { + [_unit] call GMS_fnc_removeAllAIgear; + if (blck_VK_RunoverDamage) then + {//apply vehicle damage + [vehicle _killer] call GMS_fnc_applyVehicleDamagePenalty; + [_killer] call GMS_fnc_msgIED; + }; + _legal = false; + }; +} else { + if ( blck_VK_GunnerDamage ) then + { + if ((typeOf (vehicle _killer)) in blck_forbidenVehicles || (currentWeapon _killer) in blck_forbidenVehicleGuns) then + { + if (blck_VK_Gear) then {[_unit] call GMS_fnc_removeAllAIgear;}; + [vehicle _killer] call GMS_fnc_applyVehicleDamagePenalty; + [_killer] call GMS_fnc_msgIED; + _legal = false; + diag_log format[ + "_fnc_processIlleagalKills: _legal = %1 | (typeOf (vehicle _killer)) in blck_forbidenVehicles = %2 | (currentWeapon _killer) in blck_forbidenVehicleGuns) = %3", + _legal,(typeOf (vehicle _killer)) in blck_forbidenVehicles, + (currentWeapon _killer) in blck_forbidenVehicleGuns + ]; + }; + }; +}; +//diag_log format["_fnc_testForIllegalKills: _legal = %1",_legal]; +_legal diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeAllAIgear.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeAllAIgear.sqf new file mode 100644 index 0000000..473dac7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeAllAIgear.sqf @@ -0,0 +1,13 @@ +/* + 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/ +*/ + params["_ai"]; + {deleteVehicle _x}forEach nearestObjects [(getPosATL _ai), ['GroundWeaponHolder','WeaponHolderSimulated','WeaponHolder'], 3]; //Adapted from the AI cleanup logic by KiloSwiss + [_ai] call blck_fnc_removeGear; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeGear.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeGear.sqf new file mode 100644 index 0000000..ea8bb8c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeGear.sqf @@ -0,0 +1,22 @@ +/* + Remove all gear from an AI _unit + By Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_unit"]; + +removeVest _unit; +removeHeadgear _unit; +removeGoggles _unit; +removeAllItems _unit; +removeAllWeapons _unit; +removeBackpackGlobal _unit; +removeUniform _unit; diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeLaunchers.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeLaunchers.sqf new file mode 100644 index 0000000..a652cc1 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeLaunchers.sqf @@ -0,0 +1,31 @@ +/* + by Ghostrider + + Removes an AI launcher and ammo + -------------------------- + 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["_launcher","_launcherRounds"]; +params["_unit"]; // = _this select 0; +_launcher = _unit getVariable ["Launcher",""]; +_unit removeWeapon _Launcher; +if (_launcher != "") then +{ + _unit removeWeapon _Launcher; + { + if (_launcher in weaponCargo _x) exitWith { + deleteVehicle _x; + }; + } forEach ((getPosATL _unit) nearObjects ["WeaponHolderSimulated",10]); + _launcherRounds = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines"); //0; + { + if(_x in _launcherRounds) then {_unit removeMagazine _x;}; + } count magazines _unit; +}; + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeNVG.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeNVG.sqf new file mode 100644 index 0000000..8cbe50e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeNVG.sqf @@ -0,0 +1,24 @@ +/* + by Ghostrider + + Remove NVG from AI + -------------------------- + 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["_unit"]; +//diag_log format["+--+ removing NVG for unit %1",_unit]; + +if (blck_useNVG) then +{ + if (_unit getVariable ["hasNVG",false]) then + { + + _unit unassignitem "NVGoggles"; _unit removeweapon "NVGoggles"; + }; +}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf new file mode 100644 index 0000000..08f19b3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf @@ -0,0 +1,21 @@ +/* + Set skills for an AI Unit + 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"; + +// Self explanatory +// [_group, _skill] call blck_setSkill; +params ["_unit","_skillsArrray"]; +private["_skillLevel"]; +{ + _skillLevel = [_x select 1] call blck_fnc_getNumberFromRange; + _unit setSkill [(_x select 0), _skillLevel]; +} forEach _skillsArrray; diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf new file mode 100644 index 0000000..8d0d7d2 --- /dev/null +++ b/Server/@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"; +//diag_log format["_fnc_spawncharacter: _char = %1",_char]; +_char \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf new file mode 100644 index 0000000..3975d7e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnHostage.sqf @@ -0,0 +1,23 @@ +/* + 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","_building"]; +_hostage = [_coords,_hostageConfigs] call blck_fnc_spawnCharacter; +_hostage remoteExec["GMS_fnc_initHostage", -2, true]; +_hostage setVariable["assetType",1,true]; +_building = [_hostage,_coords,_hostageConfigs select 7] call blck_fnc_placeCharacterInBuilding; +_result = [_hostage,_building]; +//diag_log format["_fnd_spawnHostage: _result = %1",_result]; +_result + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf new file mode 100644 index 0000000..f1ae006 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnLeader.sqf @@ -0,0 +1,25 @@ +/* + 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","_building","_result"]; +_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]; +//diag_log format["_fnc_spawnLeader: _leaderConfigs = %1",_leaderConfigs]; +_building = [_leader,_coords,_leaderConfigs select 7] call blck_fnc_placeCharacterInBuilding; +//diag_log format["_fnc_spawnLeader: _building = %1",_building]; +_result = [_leader,_building]; +_result + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf new file mode 100644 index 0000000..18332b3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf @@ -0,0 +1,68 @@ +/* + Author: Ghostrider [GRG] + Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP + License: Attribution-NonCommercial-ShareAlike 4.0 International + + -------------------------- + 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",[]],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weapons",[]],["_sideArms",[]],["_isScuba",false]]; + +if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; + +private["_arc","_dir","_spawnPos","_chute","_unit","_return","_paraGroup"]; +private _params = ["_pos","_numAI","_skillAI"]; +#ifdef blck_debugMode +{ + diag_log format["_fnc_spawnParaUnits: %1 = %2",_x, _this select _forEachIndex]; +}forEach _params; +#endif +_paraGroup = [blck_AI_Side,true] call blck_fnc_createGroup; +//diag_log format["_fnc_spawnParaUnits: _paraGroup = %1",_paraGroup]; +#define infantryPatrolRadius 30 +#define infantryWaypointTimeout [5,7.5,10] +[_pos,20,30,_paraGroup,"random","SAD","paraUnits",infantryPatrolRadius,infantryWaypointTimeout] 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,_sideArms,_isScuba] 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/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf new file mode 100644 index 0000000..8a1de7d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf @@ -0,0 +1,224 @@ +/* + blck_fnc_spawnUnit + Original Code by blckeagls + Modified 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"; + +private ["_i","_weap","_skin","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"]; +params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false],["_garrison",false]]; + +if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {_sideArms = [_skillLevel] call blck_fnc_selectAISidearms}; +if (_uniforms isEqualTo []) then {_uniforms = [_skillLevel] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_skillLevel] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_skillLevel] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_skillLevel] call blck_fnc_selectAIBackpacks}; + +#ifdef blck_debugMode +if (blck_debugLevel >= 2) then +{ + private _params = ["_pos","_aiGroup","_skillLevel","_uniforms","_headGear","_vests","_backpacks","_Launcher","_weaponList","_sideArms","_scuba","_garrison"]; //"_weaponList", "_Launcher" + { + diag_log format["_fnc_spawnUnit::-> _this select %1 (%2) = %3",_forEachIndex, _params select _forEachIndex, _this select _forEachIndex]; + }forEach _this; +}; +#endif +if (isNull _aiGroup) exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnUnit"}; + +_unit = ObjNull; +//private _unitType = ""; +if (blck_modType isEqualTo "Epoch") then +{ + "I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"]; + _unit setVariable ["LAST_CHECK",28800,true]; + switch(_skillLevel) do + { + 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];}; + }; + //diag_log format["_fnc_spawnUnit: for unit %1 Crypto set to %2",_unit,_unit getVariable "Crypto"]; +}; +if (blck_modType isEqualTo "Exile") then +{ + "i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"]; + switch(_skillLevel) do + { + 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];}; + }; + //diag_log format["_fnc_spawnUnit: for unit %1 ExileMoney set to %2",_unit,_unit getVariable "ExileMoney"]; +}; +// findEmptyPosition [minDistance, maxDistance, vehicleType] +private _tempPos = _pos findEmptyPosition [0.1, 3, typeOf _unit]; +//diag_log format["_fnc_spawnUnit: _pos = %1 | _tempPos = %2",_pos,_tempPos]; +if !(_tempPos isEqualTo []) then {_unit setPos _tempPos}; +#ifdef blck_debugMode +if (blck_debugLevel >= 2) then +{ + diag_log format["_fnc_spawnUnit::-->> unit spawned = %1",_unit]; +}; +#endif +[_unit] call blck_fnc_removeGear; +if (_scuba) then +{ + _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 _unit]; + }; + #endif +}; + +_skin = ""; +_counter = 1; +#ifdef blck_debugMode +if (blck_debugLevel >= 2) then +{ + diag_log format["_fnc_spawnUnit: _uniforms = %1",_uniforms]; +}; +#endif +while {_skin isEqualTo "" && _counter < 10} do +{ + _unit forceAddUniform (selectRandom _uniforms); + _skin = uniform _unit; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_spawnUnit::-->> for unit _unit % uniform is %2",_unit, uniform _unit]; + }; + #endif + _counter = _counter + 1; +}; +//Sets AI Tactics +_unit enableAI "ALL"; +if(_garrison) then +{ + _unit disableAI "PATH"; +}; +_unit allowDammage true; +_unit setBehaviour "COMBAT"; +_unit setunitpos "AUTO"; + +if !(_headGear isEqualTo []) then +{ + _unit addHeadgear (selectRandom _headGear); + //diag_log format["Headgear for unit %1 = %2",_unit, headgear _unit]; +}; +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; +_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"); +_muzzles = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems"); +_underbarrel = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "UnderBarrelSlot" >> "compatibleItems"); +_legalOptics = _optics - blck_blacklistedOptics; + +_unit addMagazines [selectRandom _ammoChoices, 3]; + +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 +{ + _unit addMagazine "1Rnd_HE_Grenade_shell"; +}; + +if !(_sideArms isEqualTo []) then +{ + _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 +{ + //diag_log format["spawnUnit.sqf] -- Item is %1", _item]; + _unit addItem selectRandom blck_specialItems; +}; +//diag_log format["_spawnUnit: _Launcher = %1",_Launcher]; +if ( !(_Launcher isEqualTo "none") && !(_backpacks isEqualTo [])) then +{ + _unit addWeaponGlobal _Launcher; + _unit addBackpack (selectRandom _backpacks); + for "_i" from 1 to 3 do + { + _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; + }; +}; + +if(sunOrMoon < 0.2 && blck_useNVG)then +{ + _unit addWeapon selectRandom blck_NVG; + _unit setVariable ["hasNVG", true,true]; +} +else +{ + _unit setVariable ["hasNVG", false,true]; +}; + +_unit addWeapon selectRandomWeighted["",4,"Binocular",3,"Rangefinder",1]; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_spawnUnit:: --> unit loadout = %1", getUnitLoadout _unit]; +}; +#endif + +_unit addEventHandler ["FiredNear",{_this call blck_EH_AIfiredNear;}]; +_unit addEventHandler ["Reloaded", {_this call blck_EH_unitWeaponReloaded;}]; +_unit addMPEventHandler ["MPKilled", {[(_this select 0), (_this select 1)] call blck_EH_AIKilled;}]; +_unit addMPEventHandler ["MPHit",{[_this] call blck_EH_AIHit;}]; + +switch (_skillLevel) do +{ + case "blue": {_index = 0;_aiSkills = blck_SkillsBlue;}; + case "red": {_index = 1;_aiSkills = blck_SkillsRed;}; + case "green": {_index = 2;_aiSkills = blck_SkillsGreen;}; + case "orange": {_index = 3;_aiSkills = blck_SkillsOrange;}; + default {_index = 0;_aiSkills = blck_SkillsBlue;}; +}; + +[_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]; + +_unit + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_HandleAIVehicleHit.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_HandleAIVehicleHit.sqf new file mode 100644 index 0000000..293f762 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_HandleAIVehicleHit.sqf @@ -0,0 +1,31 @@ +/* + _fnc_handleAIVehicleHit + By Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private ["_veh","_instigator","_group","_wp"]; + +_veh = _this select 0; +_instigator = _this select 3; +//diag_log format["_fnc_HandleAIVehicleHit: _veh = %1 | _instigator = %2",_veh,_instigator]; +if (!(isPlayer _instigator)) exitWith {}; +_crew = crew _veh; +_group = group (_crew select 0); +[_crew select 0,_instigator,50] call GMS_fnc_alertNearbyGroups; +//diag_log format["_fnc_handleAIVehicleHit: calling blck_fnc_alertNearbyVehicles with _instigator = %1",_instigator]; +[_instigator] call blck_fnc_alertNearbyVehicles; +_group setBehaviour "COMBAT"; +_wp = [_group, currentWaypoint _group]; +_wp setWaypointBehaviour "COMBAT"; +_group setCombatMode "RED"; +_wp setWaypointCombatMode "RED"; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_applyVehicleDamagePenalty.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_applyVehicleDamagePenalty.sqf new file mode 100644 index 0000000..7358d25 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_applyVehicleDamagePenalty.sqf @@ -0,0 +1,16 @@ +/* + + 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["_vd"]; + params["_vk"]; + _vd = damage _vk; + _vk setDamage (_vd + blck_RunGearDamage); \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_checkForEmptyVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_checkForEmptyVehicle.sqf new file mode 100644 index 0000000..2dcd641 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_checkForEmptyVehicle.sqf @@ -0,0 +1,22 @@ +/* + 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/ +*/ +if !(isServer) exitWith {}; +params["_veh"]; +//diag_log format["_fnc_checkForEmptyVehicle: _veh = %1 | typeOf _veh = %2 | count (crew _veh) = %3 | alive crew = %4",_veh, typeOf _veh, count(crew _veh),{alive _x} count crew _veh]; +if (crew(_veh) isEqualTo []) then +{ + [_veh] call blck_fnc_handleEmptyVehicle; +} else { + if ({alive _x} count (crew _veh) isEqualTo 0) then + { + [_veh] call blck_fnc_handleEmptyVehicle; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf new file mode 100644 index 0000000..c6bf26e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf @@ -0,0 +1,43 @@ +// Configures a mission vehicle +/* + By Ghostrider [GRG] + Copyright 2016 + + spawns a vehicle of _vehType and mans it with units in _group. + returns _veh, the vehicle spawned. + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_veh",["_locked",0]]; +private["_unit"]; +//_veh setVehicleLock "LOCKEDPLAYER"; +_veh lock _locked; + +_veh addMPEventHandler["MPHit",{if (isServer) then {_this call blck_fnc_AIVehicle_HandleHit}}]; +_veh addMPEventHandler["MPKilled",{if (isServer) then {_this call blck_fnc_processAIVehicleKill}}]; +#define vehicleAffected _this select 0 +_veh addEventHandler["GetOut",{if (isServer || local (vehicleAffected)) then {_this call blck_fnc_handleVehicleGetOut}}]; +//_veh addEventHandler["Local", {if (isServer) then {_this call blck_EH_changeLocality}}]; // Not used at present + +blck_monitoredVehicles pushBackUnique _veh; +if (blck_modType isEqualTo "Epoch") then +{ + // Adds compatability with Halv's black market traders + if (blck_allowSalesAtBlackMktTraders) then {_veh setVariable["HSHALFPRICE",1,true]}; +}; +if (blck_modType isEqualTo "Exile") then +{ + // Adds compatability with claim vehicle scripts + if (blck_allowClaimVehicle) then + { + _veh setVariable ["ExileIsPersistent", false]; + }; +}; + +_veh diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf new file mode 100644 index 0000000..ab0a7b3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf @@ -0,0 +1,22 @@ +/* + Delete a unit. + 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["_veh"]; +//diag_log format["blck_fnc_deleteAIvehicle: _veh %1 deleted",_veh]; +{ + _veh removeAllEventHandlers _x; +}forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear","HandleDamage","Reloaded"]; +{ + _veh removeAllMPEventHandlers _x; +}forEach ["MPHit","MPKilled"]; +blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; +deleteVehicle _veh; diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf new file mode 100644 index 0000000..e6d0630 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf @@ -0,0 +1,15 @@ + +/* + By Ghostrider-GRG- + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_veh"]; +{[_x] call blck_fnc_deleteAI;} forEach (crew _veh); +[_veh] call blck_fnc_deleteAIvehicle; diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyStaticWeapon.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyStaticWeapon.sqf new file mode 100644 index 0000000..52a88bf --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyStaticWeapon.sqf @@ -0,0 +1,23 @@ +// GMS_fnc_handleEmptyStaticWeapon.sqf +// NOT USED AT PRESENT +/* + 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/ +*/ + params["_veh"]; + if (blck_killEmptyStaticWeapons) then + { + diag_log format["_processAIKill: disabling static %1 and setting its delete time",_veh]; + _veh setDamage 1; + _veh setVariable["blck_deleteAtTime",diag_tickTime + 60,true]; + }else { + diag_log format["_processAIKill: releasing static %1 to players and setting a default delete timer",_veh]; + [_veh] call blck_fnc_releaseVehicleToPlayers; //Call this from _processAIKill + _veh setVariable["blck_DeleteAt",diag_tickTime + blck_vehicleDeleteTimer,true]; + }; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyVehicle.sqf new file mode 100644 index 0000000..5d700c7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyVehicle.sqf @@ -0,0 +1,51 @@ +/* + 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/ +*/ + +//diag_log format["_fnc_handleEmptyVehicle: _this = %1",_this]; +params["_veh"]; +//diag_log format["_fnc_handleEmptyVehicle: vehicle %1 | count(crew _veh) = %2 | typoeOf _veh = %3 | description _veh = %4",_veh,count(crew _veh),typeOf _veh,gettext(configFile >> 'cfgWeapons' >> typeOf _veh >> 'displayName')]; +if (isServer) then +{ + if ({alive _x} count (crew _veh) == 0 || crew(_veh) isEqualTo []) then + { + diag_log format["_fnc_handleEmptyVehicle: no units alive in vehicle %1",_veh, typeOf _veh,gettext (configFile >> 'cfgWeapons' >> typeOf _veh >> 'displayName')]; + // TODO: Make sure this variable is properly set on all vehicles. + if (_veh getVariable["GRG_vehType","none"] isEqualTo "emplaced") then + { + //diag_log format["_fnc_handleEmptyVehicle: emplaced weapon %1 being handled",_veh]; + if (blck_killEmptyStaticWeapons) then + { + //diag_log format["_fnc_handleEmptyVehicle: disabling static %1 and setting its delete time",_veh]; + _veh setDamage 1; + _veh setVariable["blck_deleteAtTime",diag_tickTime + 60,true]; + }else { + //diag_log format["_fnc_handleEmptyVehicle: releasing static %1 to players and setting a default delete timer",_veh]; + [_veh] call blck_fnc_releaseVehicleToPlayers; //Call this from _processAIKill + _veh setVariable["blck_deleteAtTime",diag_tickTime + blck_vehicleDeleteTimer,true]; + }; + } else { + if (blck_killEmptyAIVehicles) then + { + //diag_log format["_fnc_handleEmptyVehicle: disabling vehicle %1 and setting a delete time",_veh]; + _veh setDamage 0.7; + _veh setFuel 0; + _veh setVariable["blck_deleteAtTime",diag_tickTime + 60]; + } else { + //diag_log format["_fnc_handleEmptyVehicle: releasing vehicle %1 to players and setting a default delete timer",_veh]; + _veh setVariable["blck_deleteAtTime",diag_tickTime + blck_vehicleDeleteTimer,true]; + [_veh] call blck_fnc_releaseVehicleToPlayers; + }; + }; + }; +}; + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleVehicleGetOut.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleVehicleGetOut.sqf new file mode 100644 index 0000000..9fc6b09 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleVehicleGetOut.sqf @@ -0,0 +1,26 @@ +/* + By Ghostrider [GRG] + _fnc_handleVehicleGetOut + Processes an event that fires when a unit gets out of a vehicle + -------------------------- + 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/ +*/ +/* +this addEventHandler ["GetOut", { + params ["_vehicle", "_role", "_unit", "_turret"]; +}]; + + vehicle: Object - Vehicle the event handler is assigned to + role: String - Can be either "driver", "gunner" or "cargo" + unit: Object - Unit that left the vehicle + Introduced with Arma 3 version 1.36 + turret: Array - turret path +*/ + +diag_log format["_fnc_handleAIgetOut: _this = %1",_this]; +#define veh _this select 0 +if ((isServer) || local (veh)) then {[veh] call blck_fnc_checkForEmptyVehicle}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_loadVehicleCrew.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_loadVehicleCrew.sqf new file mode 100644 index 0000000..d49ff9a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_loadVehicleCrew.sqf @@ -0,0 +1,53 @@ +/* + 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/ +*/ +/* + _loadVehicleCrew + Expects the group has units and they are configured +*/ +if (isNil "blck_blacklisted_vehicle_weapons") then {blck_blacklisted_vehicle_weapons = []}; +params["_veh","_group",["_crewCount",4]]; +private _units = units _group; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_loadVehicleCrew: _veh = %1 | _group = %2 | group units = %4 | _crewCount = %3",_veh,_group,_crewCount, units _group]; +}; +#endif +for "_i" from 1 to _crewCount do +{ + if (_units isEqualTo []) exitWith {}; + _crew = _units deleteAt 0; + /* + Note that in documentation for the moveinAny command the order seats are filled is: + driver + commander + gunner + other turrets + cargo + + https://community.bistudio.com/wiki/moveInAny + */ + _crew moveInAny _veh; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_loadVehicleCrew: loaded unit %1 into vehicle %2",_crew,_veh]; + diag_log format["_fnc_loadVehicleCrew: new crew for vehicle %1 = %2",_veh, crew _veh]; + }; + #endif +}; +{deleteVehicle _x} forEach _units; +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["_fnc_loadVehicleCrew: _veh = %1 | crew = %2 | driver = %3",_veh,crew _veh,driver _veh]; +}; +#endif diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_processAIVehicleKill.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_processAIVehicleKill.sqf new file mode 100644 index 0000000..869d625 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_processAIVehicleKill.sqf @@ -0,0 +1,43 @@ +/* + By Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private ["_veh","_killer","_group","_wp"]; +//diag_log format["_fnc_processAIVehicleKill: _this = %1",_this]; +params["_veh","_killer","_killer"]; +//params["_veh","_killer"]; + +{ + _veh removealleventhandlers _x; +} forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; +{ + _veh removeAllMPEventHandlers _x; +} forEach ["MPHit","MPKilled"]; + +//diag_log format["_fnc_processAIVehicleKill: _this = %1",_this]; +//diag_log format["_fnc_processAIVehicleKill:: _veh = %1 and _killer = %2 units damage is %3",_veh,_killer, damage _veh]; + +if (!(isPlayer _killer)) exitWith {}; + +if !(count(crew _veh) isEqualTo 0) then +{ + [_crew select 0,_killer] call blck_fnc_alertGroupUnits; + private _group = group (_crew select 0); + _group setBehaviour "COMBAT"; + _wp = [_group, currentWaypoint _group]; + _wp setWaypointBehaviour "COMBAT"; + _group setCombatMode "RED"; + _wp setWaypointCombatMode "RED"; +}; +[_killer] call blck_fnc_alertNearbyVehicles; + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf new file mode 100644 index 0000000..83e746b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf @@ -0,0 +1,26 @@ +// Protect Vehicles from being cleaned up by the server + +/* + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_Vehicle"]; + +switch (blck_modType) do { + case "Epoch": + { + #ifdef blck_debugMode + if (blck_debugLevel > 2) then {diag_log format["GMS_fnc_protectVehicle:: Tokens set for vehicle %1",_Vehicle];}; + #endif + //_Vehicle call EPOCH_server_vehicleInit; + _Vehicle call EPOCH_server_setVToken; + }; +}; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf new file mode 100644 index 0000000..babbc55 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf @@ -0,0 +1,24 @@ + +/* + By Ghostrider-GRG- + And Ignatz-HeMan + -------------------------- + 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/ +*/ +// assummptions: since this is called after an AI Killed event that always runs on the server we can assume this code will too. +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_veh"]; +//diag_log format["_fnc_releaseVehicleToPlayers: _veh = %1",_veh]; +[_veh] call blck_fnc_unlockVehicle; +{ + _veh removealleventhandlers _x; +} forEach ["Local","GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; +{ + _veh removeAllMPEventHandlers _x; +} forEach ["MPHit","MPKilled"]; +if ((damage _veh) > 0.6) then {_veh setDamage 0.6}; // So they don't blow up when a player tries to get in. diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf new file mode 100644 index 0000000..b9fc2c9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf @@ -0,0 +1,32 @@ + + +/* + Reloaded eventhandler for _units + By Ghostrider-GRG- + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + + params["_veh"]; + private ["_crew","_mag","_allMags","_cnt"]; + // https://community.bistudio.com/wiki/fullCrew + if ({alive _x and !(isPlayer _x)} count (crew _veh) > 0) then + { + _crew = fullCrew _veh; + { + _mag = _veh currentMagazineTurret (_x select 3); + if (count _mag > 0) then + { + _allMags = magazinesAmmo _veh; + + _cnt = ( {_mag isEqualTo (_x select 0)}count _allMags); + if (_cnt < 2) then {_veh addMagazineCargo [_mag,2]}; + }; + } forEach _crew; + }; diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf new file mode 100644 index 0000000..146a8c7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf @@ -0,0 +1,58 @@ + +/* + algorhytm one: pure chance base on inverse of distance. More efficient. + algorhythm two: based on canSee. More detailed. +*/ +/* + 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/ +*/ +params["_vehicle","_searchRadius","_detectionOdds"]; +private["_player","_detectionOdds","_nearbyPlayers","_knowsAbout","_cansee","_knowledgeGained"]; +_nearbyPlayers = [position _vehicle, _vehicle getVariable["blck_vehicleSearchRange",500]] call blck_fnc_nearestPlayers; + +switch blck_revealMode do { + case "detailed": { + private["_crew"]; + _crew = crew _vehicle; + if !(_crew isequalto []) then { + { + if (random(1) < _detectionOdds) then { + _player = _x; + { + _cansee = [objNull, "VIEW"] checkVisibility [eyePos _x, position _player]; + if (_cansee > 0) then { + _knowledgeGained = _cansee; + } + else { + _knowledgeGained = _x knowsAbout _player; + if (_knowledgeGained == 0) then {_knowledgeGained = 0.1}; + }; + _x reveal[_player,_knowledgeGained]; + }forEach _crew; + }; + }forEach _nearbyPlayers; + }; + }; + case "basic": { + { + _player = _x; + if (random(1) < _detectionOdds) then { + _knowsAbout = (_vehicle) knowsAbout _player; + if (_knowsAbout > 0) then { + _knowledgeGained = _knowsAbout; + } + else { + _knowledgeGained = (_searchRadius - (_x distance _vehicle))/_searchRadius; + }; + _x reveal[_player, _knowledgeGained]; + }; + }forEach _nearbyPlayers; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealVehicleToUnits.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealVehicleToUnits.sqf new file mode 100644 index 0000000..e27d45b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealVehicleToUnits.sqf @@ -0,0 +1,18 @@ +/* + 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/ +*/ + + params["_unit","_vk"]; + private["_unit"]; + { + _x reveal [_vk, 4]; + _x dowatch _vk; + _x doTarget _vk; + } forEach ([getPos _unit, 500] call blck_fnc_allPlayers); // get all players within 500 m \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf new file mode 100644 index 0000000..1b5fffb --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf @@ -0,0 +1,18 @@ +/* + 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/ +*/ +// GMS_fnc_vehiclePlayerSensingLogic.sqf +// No params +private["_searchRadius","_detectionOdds"]; +{ + _searchRadius = _x getVariable["blck_vehicleSearchRadius",800]; + _detectionOdds = _x getVariable["blck_vehiclePlayerDetectionOdds",0.5]; + [_x,_searchRadius,_detectionOdds] call blck_fnc_revealNearbyPlayers; +}forEach blck_monitoredVehicles; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf new file mode 100644 index 0000000..080e552 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf @@ -0,0 +1,28 @@ +/* + 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/ +*/ +params["_vehicle","_group","searchRadius","_detectionOdds"]; +private["_nearbyPlayers","_groupLeader","_knowsAbout","_cansee"]; +_groupLeader = leader _group; +_nearbyPlayers = [position _vehicle, _vehicle getVariable["blck_vehicleSearchRange",500]] call blck_fnc_nearestPlayers; +{ + _player = _x; + if (random(1) < _detectionOdds) then + { + _cansee = [objNull, "VIEW"] checkVisibility [eyePos _x, _player]; + if (_cansee > 0) then + { + //_knowledgeGained = (_searchRadius - (_x distance _groupLeader))/_searchRadius; + _knowsAbout = _x knowsAbout _player; + _groupLeader reveal [_x, _knowsAbout + _kno_canseewledgeGained]; + }; + }foreEach crew _vehicle; + }; +}forEach _nearbyPlayers; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_selectPatrolVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_selectPatrolVehicle.sqf new file mode 100644 index 0000000..a80d171 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_selectPatrolVehicle.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["_aiDifficulty"]; +private["_vehicle"]; +switch(toLower _aiDifficulty) do +{ + case "blue":{_vehicle = selectRandom blck_AIPatrolVehiclesBlue}; + case "red":{_vehicle = selectRandom blck_AIPatrolVehiclesRed}; + case "green":{_vehicle = selectRandom blck_AIPatrolVehiclesGreen}; + case "orange":{_vehicle = selectRandom blck_AIPatrolVehiclesOrange}; + default {_vehicle = blck_AIPatrolVehicles}; +}; + +_vehicle + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_sendHeliHome.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_sendHeliHome.sqf new file mode 100644 index 0000000..ac6fe7f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_sendHeliHome.sqf @@ -0,0 +1,36 @@ +/* + Author: Ghostrider [GRG] + Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP + License: Attribution-NonCommercial-ShareAlike 4.0 International + Last Modified 1/23/17 +*/ +params["_grpPilot"]; +private["_heli","_pilot"]; +_pilot = (units _grpPilot) select 0; +_heli = vehicle _pilot; +diag_log "reinforcements deployed:: send heli back to spawn"; +[[_heli], 300 /* 5 min*/] spawn blck_fnc_addObjToQue; +// select a random location abotu 2K from the mission +_spawnVector = round(random(360)); +_spawnDistance = 2000; +_pos = getPos _heli; + +// Use the new functionality of getPos +// https://community.bistudio.com/wiki/getPos +_home = _pos getPos [_spawnDistance,_spawnVector]; + +// Send the heli back to base +_grpPilot = group this; +[_grpPilot, 0] setWPPos _pos; +[_grpPilot, 0] setWaypointType "MOVE"; +[_grpPilot, 0] setWaypointSpeed "FULL"; +[_grpPilot, 0] setWaypointBehaviour "CARELESS"; +[_grpPilot, 0] setWaypointCompletionRadius 200; +[_grpPilot, 0] setWaypointStatements ["true", "{deleteVehicle _x} forEach units group this;deleteVehicle (vehicle this);diag_log ""helicopter and crew deleted"""]; +[_grpPilot, 0] setWaypointName "GoHome"; +[_grpPilot,0] setWaypointTimeout [0.5,0.5,0.5]; + + +diag_log "reinforcements:: sending Heli Home"; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf new file mode 100644 index 0000000..b80a783 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf @@ -0,0 +1,36 @@ +/* + Spawn a vehicle and protect it against cleanup by Epoch + Returns the object (vehicle) created. + By Ghostrider [GRG] + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private["_veh"]; +params["_vehType","_pos",["_crewCount",4]]; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1 | _pos = %2",_vehType,_pos];}; +#endif + +private _veh = [_vehType,_pos] call blck_fnc_spawnVehicle; +_veh setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeSurfaceVehicle]; +_veh setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf:: vehicle spawned is %1",_veh];}; +#endif +// params["_veh",["_clearInventory",true]]; +[_veh,_clearInventory] call blck_fnc_configureMissionVehicle; +//[_veh,_group,_crewCount] call blck_fnc_loadVehicleCrew; +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];}; +#endif + +_veh + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf new file mode 100644 index 0000000..e8ce30c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf @@ -0,0 +1,119 @@ +/* + + 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["_chopperType","_patrolHeli","_launcherType","_unitPilot","_unitCrew","_mags","_turret","_return","_abort","_supplyHeli","_minDist","_maxDist"]; +params["_coords","_skillAI","_helis",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]],["_Launcher","none"],["_crewCount",4]]; + +if (_uniforms isEqualTo []) then {_uniforms = [_skillAI] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_skillAI] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_skillAI] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_selectAIBackpacks}; +if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms}; + +// params["_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",30], ["_maxDist",45],["_configureWaypoints",true], ["_uniforms",[]], +//["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_scuba",false]]; +switch (toLower(_skillAI)) do +{ + case "blue": {_minDist = 150;_maxDist = blck_maxPatrolRadiusHelisBlue}; + case "red" : {_minDist = 150;_maxDist = blck_maxPatrolRadiusHelisRed}; + case "green" : {_minDist = 150;_maxDist = blck_maxPatrolRadiusHelisGreen}; + case "orange" : {_minDist = 150;_maxDist = blck_maxPatrolRadiusHelisOrange}; + default {_minDist = 150; _maxDist = 500}; +}; +private _grpPilot = [blck_AI_Side,true] call blck_fnc_createGroup; +[_grpPilot,_coords,_coords,_crewCount,_crewCount,_skillAI,_minDist,_maxDist,true,_uniforms,_headgear,_vests,_backpacks,_weaponList,_sideArms,false] call blck_fnc_spawnGroup; +_abort = if (isNull _grpPilot) then{true} else {false}; +if !(isNull _grpPilot) then +{ + + _grpPilot setBehaviour "SAFE"; + _grpPilot setCombatMode "RED"; + _grpPilot setSpeedMode "NORMAL"; + _grpPilot allowFleeing 0; + _grpPilot setVariable["patrolCenter",_coords]; + _grpPilot setVariable["minDis",_minDist]; + _grpPilot setVariable["maxDis",_maxDist]; + _grpPilot setVariable["timeStamp",diag_tickTime]; + _grpPilot setVariable["arc",0]; + _grpPilot setVariable["wpRadius",0]; + _grpPilot setVariable["wpMode","SAD"]; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_spawnMissionHeli - max radii are: blue %1 | red %2 | green %3 | orange %4",blck_maxPatrolRadiusHelisBlue,blck_maxPatrolRadiusHelisRed,blck_maxPatrolRadiusHelisGreen,blck_maxPatrolRadiusHelisOrange]; + diag_log format["_fnc_spawnMissionHeli(59): _skillAI = %1 | _minDist = %2 | _maxDist = %3",_skillAI,_minDist,_maxDist]; + }; + #endif + + #define aircraftPatrolRadius 800 + #define aircraftWaypointTimeout [1,1.5,2] + [_coords,_minDist,_maxDist,_grpPilot,"random","SAD","aircraft",aircraftPatrolRadius,aircraftWaypointTimeout] call blck_fnc_setupWaypoints; + blck_monitoredMissionAIGroups pushBack _grpPilot; + + //create helicopter and spawn it + 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(59): _skillAI = %1 | _minDist = %2 | _maxDist = %3",_skillAI,_minDist,_maxDist]; + diag_log format["_fnc_spawnMissionHeli (78):: _chopperType selected = %1",_chopperType]; + }; + #endif + + //_patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"]; + _patrolHeli = [_chopperType,_coords,"FLY"] call blck_fnc_spawnVehicle; + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_spawnMissionHeli (75): _patrolHeli = %1 | getPosATL _patrolHeli = %2",_patrolHeli,getposATL _patrolHeli]; + }; + #endif + [_patrolHeli,2] call blck_fnc_configureMissionVehicle; + //_patrolHeli setVariable["blck_vehicle",true]; + _patrolHeli setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeAir]; + _patrolHeli setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; + //_patrolHeli addEventHandler["GetOut",{_this remoteExec["blck_EH_vehicleGetOut",2]}]; + //[_patrolHeli] call blck_fnc_protectVehicle; + _patrolHeli setFuel 1; + _patrolHeli engineOn true; + _patrolHeli flyInHeight 100; + //_patrolHeli setVehicleLock "LOCKED"; + // params["_veh","_group",["_crewCount",4]]; + [_patrolHeli,_grpPilot,_crewCount] call blck_fnc_loadVehicleCrew; + + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["_fnc_spawnMissionHeli (93):: heli %1 spawned with crew count of %2 | desired crew count = %3",_patrolHeli,count(crew _patrolHeli),_crewCount]; + diag_log format["_fnc_spawnMissionHeli (89): _patrolHeli = %1 | getPosATL _patrolHeli = %2 | driver _patrolHeli = %4",_patrolHeli,getposATL _patrolHeli,driver _patrolHeli]; + diag_log format["_fnc_spawnMissionHeli (133)::-->> Heli %1 outfited with a crew numbering %2",_patrolHeli, crew _patrolHeli]; + }; + #endif +}; +//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 +{ + diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return]; +}; +#endif +_return; diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf new file mode 100644 index 0000000..415de3b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf @@ -0,0 +1,108 @@ +/* + Author: Ghostrider [GRG] + Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP + License: Attribution-NonCommercial-ShareAlike 4.0 International + + This is basically a container that determines whether a paragroop group should be created and if so creates a group and passes it off to the routine that spawns the paratroops. + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_coords","_skillAI","_weapons","_uniforms","_headGear",["_grpParatroops",grpNull],["_heli",objNull]]; + +private["_grpParatroops","_chanceParatroops","_aborted","_return"]; + +_skillAI = toLower _skillAI; +_chanceParatroops = 0; +_noPara = 0; +_aborted = false; + +if (_skillAI isEqualTo "blue") then { + + #ifdef blck_debugMode + if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: BLUE difficulty settings applied";}; + #endif + + _chanceParatroops = blck_chanceParaBlue; + _noPara = blck_noParaBlue; +}; +if (_skillAI isEqualTo "green") then { + + #ifdef blck_debugMode + if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: GREEN difficulty settings applied";}; + #endif + + _chanceParatroops = blck_chanceParaGreen; + _noPara = blck_noParaGreen; +}; +if (_skillAI isEqualTo "orange") then { + + #ifdef blck_debugMode + if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: ORANGE difficulty settings applied";}; + #endif + + _chanceParatroops = blck_chanceParaOrange; + _noPara = blck_noParaOrange; +}; +if (_skillAI isEqualTo "red") then { + + #ifdef blck_debugMode + if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: RED difficulty settings applied";}; + #endif + + _chanceParatroops = blck_chanceParaRed; + _noPara = blck_noParaRed; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnMissionParatroops (47): _chanceParatroops %1",_chanceParatroops];}; +if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnMissionParatroops (48): _coords %1 | _numAI %2 | _skillAI %3 | _grpParatroops %4 | _heli %5",_coords,_noPara,_skillAI,_grpParatroops,_heli];}; +#endif + +if ( (random(1) < _chanceParatroops)) then +{ + if (isNull _grpParatroops) then + { + _grpParatroops = createGroup blck_AI_Side; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_spawnMissionParatroops (53):No group passed as a parameter, _grpParatroops %4 created",_grpParatroops]; + }; + #endif + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_spawnMissionParatroops (58): function running and group %1 successfully created; now calling blck_fnc_spawnParaUnits",_grpParatroops]; + }; + #endif + + //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/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf new file mode 100644 index 0000000..1a3f42a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf @@ -0,0 +1,95 @@ +/* + + 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"; + +// [_coords,_aiDifficultyLevel,_chancePara,_noPara,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] +params["_coords","_missionHelis","_spawnHeli",["_aiSkillsLevel","Red"],["_chancePara",0],["_noPara",0],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]]]; + +if (_uniforms isEqualTo []) then {_uniforms = [_skillAI] call blck_fnc_selectAIUniforms}; +if (_headGear isEqualTo []) then {_headGear = [_skillAI] call blck_fnc_selectAIHeadgear}; +if (_vests isEqualTo []) then {_vests = [_skillAI] call blck_fnc_selectAIVests}; +if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_selectAIBackpacks}; +if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout}; +if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms}; + +#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/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaCrate.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaCrate.sqf new file mode 100644 index 0000000..b2fa50a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnParaCrate.sqf @@ -0,0 +1,92 @@ +/* + Author: Ghostrider [GRG] + Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP + License: Attribution-NonCommercial-ShareAlike 4.0 International + call with + [ + _supplyHeli, // heli from which they should para + _lootCounts, + _lootSetting // [blue, red, green, orange] + ] call blck_spawnHeliParaCrate + + ** here for future usage ** + -------------------------- + 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["_supplyHeli","_lootCounts"]; + +private ["_chute","_crate"]; +_crate = ""; +_chute = ""; + +diag_log "_fnc_spawnParaCrate:: spawning crate"; + +private["_dir","_offset"]; +_dir = getDir _supplyHeli; +_dir = if (_dir < 180) then {_dir + 210} else {_dir - 210}; +_offset = _supplyHeli getPos [10, _dir]; + +//open parachute and attach to crate +_chute = createVehicle ["I_Parachute_02_F", [100, 100, 100], [], 0, "FLY"]; +[_chute] call blck_fnc_protectVehicle; +_chute setPos [_offset select 0, _offset select 1, 100 ]; //(_offset select 2) - 10]; + +diag_log format["_fnc_spawnParaCrate:: chute spawned yielding object %1 at postion %2", _chute, getPos _chute]; + +//create the parachute and crate +private["_crateSelected"]; +_crateSelected = selectRandom["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_IND_AmmoVeh_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F"]; +_crate = [getPos _chute, _crateSelected] call blck_fnc_spawnCrate; +//_crate = createVehicle [_crateSelected, position _chute, [], 0, "CAN_COLLIDE"]; +_crate setPos [position _supplyHeli select 0, position _supplyHeli select 1, 250]; //(position _supplyHeli select 2) - 10]; +_crate attachTo [_chute, [0, 0, -1.3]]; +_crate allowdamage false; +_crate enableRopeAttach true; // allow slingloading where possible + +diag_log format["_fnc_spawnParaCrate:: crate spawned %1 at position %2 and attached to %3",_crate, getPos _crate, attachedTo _crate]; + + +switch (_lootSetting) do +{ + case "orange": {[_crate, blck_BoxLoot_Orange, _lootCounts] call blck_fnc_fillBoxes;}; + case "green": {[_crate, blck_BoxLoot_Green, _lootCounts] call blck_fnc_fillBoxes;}; + case "red": {[_crate, blck_BoxLoot_Red, _lootCounts] call blck_fnc_fillBoxes;}; + case "blue": {[_crate, blck_BoxLoot_Blue, _lootCounts] call blck_fnc_fillBoxes;}; + default {[_crate, blck_BoxLoot_Red, _lootCounts] call blck_fnc_fillBoxes;}; +}; + +diag_log format["_fnc_spawnParaCrate:: crate loaded and now at position %1 and attached to %2", getPos _crate, attachedTo _crate]; + +_fn_monitorCrate = { + params["_crate","_chute"]; + uiSleep 30; + private["_crateOnGround"]; + _crateOnGround = false; + while {!_crateOnGround} do + { + uiSleep 1; + diag_log format["_fnc_spawnParaCrate:: Crate Altitude: %1 Crate Velocity: %2 Crate Position: %3 Crate attachedTo %4", getPos _crate select 2, velocityModelSpace _crate select 2, getPosATL _crate, attachedTo _crate]; + if ( (((velocity _crate) select 2) < 0.1) || ((getPosATL _crate select 2) < 0.1) ) exitWith + { + uiSleep 10; // give some time for everything to settle + detach _crate; + deleteVehicle _chute; + if (surfaceIsWater (getPos _crate)) then + { + deleteVehicle _crate; + } else + { + [_crate] call blck_fnc_signalEnd; + }; + }; + }; +}; + +[_crate,_chute] call _fn_monitorCrate; +[[_crate], 1200 /* 20 min*/] spawn blck_fnc_addObjToQue; diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf new file mode 100644 index 0000000..a219a08 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf @@ -0,0 +1,114 @@ +/* + + 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["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear",["_chancePara",0]]; +/* +_coords = _this select 0; +_aiSkillsLevel = _this select 1; +_weapons = _this select 2; +_uniforms = _this select 3; +_headgear = _this select 4; +*/ + +private["_chanceHeliPatrol","_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 (_aiSkillsLevel isEqualTo "blue") then { + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (29): BLUE difficulty settings applied";}; + #endif + _chanceHeliPatrol = blck_chanceHeliPatrolBlue; + _missionHelis = blck_patrolHelisBlue; +}; +if (_aiSkillsLevel isEqualTo "green") then { + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (34): GREEN difficulty settings applied";}; + #endif + _chanceHeliPatrol = blck_chanceHeliPatrolGreen; + _missionHelis = blck_patrolHelisGreen; +}; +if (_aiSkillsLevel isEqualTo "orange") then { + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (39): ORANGE difficulty settings applied";}; + #endif + _chanceHeliPatrol = blck_chanceHeliPatrolOrange; + _missionHelis = blck_patrolHelisOrange; +}; +if (_aiSkillsLevel isEqualTo "red") then +{ + #ifdef blck_debugMode + if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (46): RED difficulty settings applied";}; + #endif + _chanceHeliPatrol = blck_chanceHeliPatrolRed; + _missionHelis = blck_patrolHelisRed; +}; +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (50): Variables defined: _chanceHeliPatrol %1 | _missionHelis %2",_chanceHeliPatrol,_missionHelis];}; +#endif +if ( (_chanceHeliPatrol > 0) && (random (1) < _chanceHeliPatrol) ) then // if helipatrols are 'enabled' then paratroops will only drop if a heli spawns. + // The chance that they drop is linked to the value for them for that difficulty _aiSkillsLevel + //see _fnc_spannMissionParatroops for how this is handled. +{ + _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,_aiSkillsLevel,_weapons,_uniforms,_headgear,_missionHelis,_chancePara] 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]; + // params["_coords","_skillAI","_weapons","_uniforms","_headgear"]; + _temp = [_coords,_aiSkillsLevel,_weapons,_uniforms,_headgear] 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/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf new file mode 100644 index 0000000..729d0ec --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf @@ -0,0 +1,36 @@ +/* + Spawn a vehicle and protect it against cleanup by Epoch + Returns the object (vehicle) created. + By Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehType","_pos",["_maxCrew",3]]; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1 | _pos = %2",_vehType,_pos];}; +#endif + +private _veh = [_vehType,_pos] call blck_fnc_spawnVehicle; +_veh setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeSubs]; +_veh setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf:: vehicle spawned is %1",_veh];}; +#endif +//[_veh,_group,_crewCount] call blck_fnc_loadVehicleCrew; +[_veh,2] call blck_fnc_configureMissionVehicle; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];}; +#endif + +_veh + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf new file mode 100644 index 0000000..755b20d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf @@ -0,0 +1,26 @@ +/* + Spawn a vehicle and protect it against cleanup by Epoch + Returns the object (vehicle) created. + By Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehType","_pos",["_special","NONE"]]; +//diag_log format["spawnVehicle.sqf: _this = %3 | _vehType = %1 | _pos = %2",_vehType,_pos,_this]; +private _veh = createVehicle[_vehType, _pos, [], 0, _special]; +_veh setVectorUp surfaceNormal position _veh; +_veh allowDamage true; +_veh enableRopeAttach true; +_veh setVariable["blck_vehicle",true]; +[_veh] call blck_fnc_protectVehicle; +[_veh] call blck_fnc_emptyObject; +//diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh]; +_veh + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf new file mode 100644 index 0000000..67b7f13 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf @@ -0,0 +1,57 @@ +/* + By Ghostrider [GRG] + Copyright 2016 + + spawns a vehicle of _vehType and mans it with units in _group. + returns _veh, the vehicle spawned. + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",40],["_maxDis",60],["_group",grpNull],["_setWaypoints",true],["_crewCount",4],["_patrolRadius",150],["_waypointTimeout",[5,7.5,10]]]; + +{ + //diag_log format["_fnc_spawnVehiclePatrol/Vehicles: parameter %1 = %2",_forEachIndex,_x]; +}forEach _this; +//_center Center of the mission area - this is usually 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 +//_vehType = [_this,1,"I_G_Offroad_01_armed_F"] call BIS_fnc_param; +//_minDis = +//_maxDis = +//_groupForVehiclePatrol = The group with which to man the vehicle +// _crewCount = the number of AI including driver and gunners to place in the vehicle +if (_group isEqualTo grpNull) exitWith + { + diag_log format["_fnc_spawnVehiclePatrol(30): Function can not accept a null group"]; +}; + +private _veh = objNull; +//diag_log format["_fnc_spawnVehiclePatrol(34): _vehType = %1",_vehType]; + +_veh = [_vehType,_pos] call blck_fnc_spawnVehicle; +//diag_log format["_fnc_spawnVehiclePatrol(37): _veh = %1 | typeOf _veh = %2",_veh,typeOf _veh]; + +_veh setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeGroundVehicle]; +_veh setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; +private _maxCrew = [_crewCount] call blck_fnc_getNumberFromRange; +[_veh,_group,_maxCrew] call blck_fnc_loadVehicleCrew; +//diag_log format["_fnc_spawnVehiclePatrol(43): crew of vehicle %1 = %2",_veh, crew _veh]; + +[_veh,2] call blck_fnc_configureMissionVehicle; +if (_setWaypoints) then +{ + // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ]; + [_center,_minDis,_maxDis,_group,"perimeter","SAD","vehicle",_patrolRadius,_waypointTimeout] spawn blck_fnc_setupWaypoints; + //diag_log format["_fnc_spawnVehiclePatrol(50): waypoint configuration set for vehicle %1 with crew %2",_veh, crew _veh]; +}; + +//diag_log format["_fnc_spawnVehiclePatrol(53): _veh = %1",_veh]; + +_veh + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_unlockVehicle.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_unlockVehicle.sqf new file mode 100644 index 0000000..9609c47 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_unlockVehicle.sqf @@ -0,0 +1,26 @@ +/* + 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/ +*/ +// assumptions: there are no crew in vehicle. there are no players in vehicle. thus we can just be sure the owner is the server then set the lock locally +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_veh"]; + +if (local _veh) then +{ + //diag_log format["blck_fnc_unlockVehicle: handling case of local vehicle %2 that is local to owner %1",owner _veh, _veh]; + _veh lock 1; +} +else +{ + //diag_log format["blck_fnc_unlockVehicle: handling case of non-local vehicle %2 that is local to owner %1",owner _veh, _veh]; + [_veh, 1] remoteExecCall ["lock", _veh]; +}; +///diag_log format["blck_fnc_unlockVehicle: _vehcle %1 of typeOf %3 locked set to %2",_veh, locked _veh,typeOf _veh]; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf new file mode 100644 index 0000000..530d66a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf @@ -0,0 +1,49 @@ +/* + 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:: function called at %1 with _vehList %2 ",diag_tickTime,blck_monitoredVehicles]; +// TODO: Test that vehicles that are either scheduled for deletion are for deletion pending change in owner are proparly handled (kept in the list, deleted when the time arrives). +private _serverIDs = ([2] + (entities "HeadlessClient_F")); +for "_i" from 1 to (count blck_monitoredVehicles) do +{ + if (_i > (count blck_monitoredVehicles)) exitWith {}; + private _veh = blck_monitoredVehicles deleteAt 0; + if !(_veh isEqualTo objNull) then + { + // if the owner is a player do not add back for further monitoring + if ((owner _veh) in (_serverIDs)) then + { + //diag_log format["_fnc_vehicleMonitor: vehicle %1 to be deleted at %2",_veh,(_veh getVariable ["blck_deleteAtTime",0])]; + if ((_veh getVariable ["blck_deleteAtTime",0]) > 0) then + { + if (diag_tickTime > ( _veh getVariable ["blck_deleteAtTime",0])) then + { + //diag_log format["_fnc_vehicleMonitor: deleting vehicle and crew for %1",_veh]; + [_veh] call blck_fnc_destroyVehicleAndCrew; + } else { + blck_monitoredVehicles pushBack _veh; + }; + } else { + [_veh] call blck_fnc_checkForEmptyVehicle; + blck_monitoredVehicles pushBack _veh; + }; + } else { + #ifdef blck_debugMode + if (blck_debugOn) then + { + diag_log format["_fnc_vehicleMonitor: owner of vehicle %1 is a player, discontinuing further monitoring",_veh]; + }; + #endif + }; + }; +}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf new file mode 100644 index 0000000..032d7ca --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf @@ -0,0 +1,22 @@ +/* + 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/ +*/ +// GMS_fnc_vehiclePlayerSensingLogic.sqf +// No params + +{ + // + //params["_vehicle","_group","searchRadius","_detectionOdds"]; + _group = group driver _vehicle; + _searchRadius = _vehicle getVariable["blck_vehicleSearchRadius",800]; + _detectionOdds = _vehicle getVariable["blck_vehiclePlayerDetectionOds",0.5]; + [_vehicle,_group,_searchRadius,_detectionOdds] call blck_fnc_senseNearbyPlayers; +}forEach blck_monitoredVehicles; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_AIVehicle_Hit.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_AIVehicle_Hit.sqf new file mode 100644 index 0000000..073c61f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_AIVehicle_Hit.sqf @@ -0,0 +1,17 @@ +/* + _EH_AHVehicle_Hit + By Ghostrider [GRG] + Handles the case where a vehicle is hit. + + -------------------------- + 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"; +// TODO: No longer needed; move this to old code folder +if (isServer) then {_this call blck_fnc_HandleAIVehicleHit}; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_VehicleKilled.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_VehicleKilled.sqf new file mode 100644 index 0000000..405e536 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_VehicleKilled.sqf @@ -0,0 +1,15 @@ + +/* + _EH_VehicleKilled + Killed handler for destruction of vehicles + 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"; +if (isServer) then {_this call blck_fnc_processAIVehicleKill}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_changeLocality.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_changeLocality.sqf new file mode 100644 index 0000000..24a3eef --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_changeLocality.sqf @@ -0,0 +1,5 @@ + +params["_entity","_isLocal"]; +diag_log format["_EH_changeLocality call with params = %1 | typeOf _entity %2 | _isLocal %3",_this,typeOf _entity,_isLocal]; +if (isServer) then {[_entity] call blck_fnc_checkForEmptyVehicles} +else {}; diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_vehicleGetOut.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_vehicleGetOut.sqf new file mode 100644 index 0000000..d246f10 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_vehicleGetOut.sqf @@ -0,0 +1,20 @@ +/* + _EH_vehicleGetOut + By Ghostrider [GRG] + Handles the case where a unit gets out of a vehiclet. + // TODO: Not presently used + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +//diag_log format["_EH_vehicleGetOut: _this = %1",_this]; +// params ["_vehicle", "_role", "_unit", "_turret"]; +#define affectedvehicle (_this select 0) +if (isServer || local affectedvehicle) then {affectedvehicle call blck_fnc_handleVehicleGetOut}; + + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_vehicleManGetOut.sqf b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_vehicleManGetOut.sqf new file mode 100644 index 0000000..97be1de --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/Vehicles/Old_Or_Unused_Code/GMS_EH_vehicleManGetOut.sqf @@ -0,0 +1,21 @@ +// NOT USED AT PRESENT + +/* +this addEventHandler ["GetOutMan", { + params ["_unit", "_role", "_vehicle", "_turret"]; +}]; + + unit: Object - unit the event handler is assigned to + role: String - Can be either "driver", "gunner" or "cargo" + vehicle: Object - Vehicle that the unit left + turret: Array - turret path +*/ + +//diag_log format["EH_vehicleManGetOut: _this = %1",_this]; +//params["_unit","_role","_veh"]; +#define veh _this select 3 +[veh] call blck_fnc_handleAIgetOut; + + + + diff --git a/Server/@GMS/addons/custom_server/Compiles/blck_functions.sqf b/Server/@GMS/addons/custom_server/Compiles/blck_functions.sqf new file mode 100644 index 0000000..53f9292 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/blck_functions.sqf @@ -0,0 +1,223 @@ +/* + AI Mission for Epoch Mod for Arma 3 + By Ghostrider + Functions and global variables used by the mission system. + + -------------------------- + 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 _functions = [ + // General functions + ["blck_fnc_waitTimer","\q\addons\custom_server\Compiles\Functions\GMS_fnc_waitTimer.sqf"], + ["blck_fnc_timedOut","\q\addons\custom_server\Compiles\Functions\GMS_fnc_timedOut.sqf"], + ["blck_fnc_FindSafePosn","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findSafePosn.sqf"], + ["blck_fnc_randomPosition","\q\addons\custom_server\Compiles\Functions\GMS_fnc_randomPosn.sqf"], // find a randomPosn. see script for details. + ["blck_fnc_findPositionsAlongARadius","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findPositionsAlongARadius.sqf"], + ["blck_fnc_giveTakeCrypto","\q\addons\custom_server\Compiles\Functions\GMS_fnc_giveTakeCrypto.sqf"], + ["blck_fnc_timeAcceleration","\q\addons\custom_server\Compiles\TimeAccel\GMS_fnc_Time.sqf"], + ["blck_fnc_groupsOnAISide","\q\addons\custom_server\Compiles\Functions\GMS_fnc_GroupsOnAISide.sqf"], // Returns the number of groups on the side used by AI + ["blck_fnc_emptyObject","\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObject.sqf"], + ["blck_fnc_playerInRange","\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRange.sqf"], + ["blck_fnc_playerInRangeArray","\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRangeArray.sqf"], + ["blck_fnc_mainThread","\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf"], + ["blck_fnc_allPlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_allPlayers.sqf"], + ["blck_fnc_addItemToCrate","\q\addons\custom_server\Compiles\Functions\GMS_fnc_addItemToCrate.sqf"], + ["blck_fnc_loadLootItemsFromArray","\q\addons\custom_server\Compiles\Functions\GMS_fnc_loadLootItemsFromArray.sqf"], + ["blck_fnc_getNumberFromRange","\q\addons\custom_server\Compiles\Functions\GMS_fnc_getNumberFromRange.sqf"], + ["blck_fnc_spawnMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnMarker.sqf"], + ["blck_fnc_missionCompleteMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_missionCompleteMarker.sqf"], + ["blck_fnc_deleteMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_deleteMarker.sqf"], + ["blck_fnc_updateMarkerAliveCount","\q\addons\custom_server\Compiles\Functions\GMS_fnc_updateMarkerAliveCount.sqf"], + ["blck_fnc_addMoneyToObject","\q\addons\custom_server\Compiles\Functions\GMS_fnc_addMoneyToObject.sqf"], + ["blck_fnc_nearestPlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_nearestPlayers.sqf"], + ["GMS_fnc_msgIED","\q\addons\custom_server\Compiles\Functions\GMS_fnc_msgIED.sqf"], + ["GMS_fnc_cleanupTemporaryMarkers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_cleanupTemporaryMarkers.sqf"], + ["GMS_fnc_updateCrateSignals","\q\addons\custom_server\Compiles\Functions\GMS_fnc_updateCrateSignals.sqf"], + ["GMS_fnc_isClass","\q\addons\custom_server\Compiles\Functions\GMS_fnc_isClass.sqf"], + ["blck_fnc_findShoreLocation","q\addons\custom_server\Compiles\Functions\GMS_UMS_fnc_findShoreLocation.sqf"], + ["blck_fnc_findWaterDepth","q\addons\custom_server\Compiles\Functions\GMS_UMS_fnc_findWaterDepth.sqf"], + ["blck_fnc_setAILocality","\q\addons\custom_server\Compiles\Functions\GMS_fnc_setAILocality.sqf"], + ["blck_fnc_ai_offloadToClients","\q\addons\custom_server\Compiles\Functions\GMS_fnc_ai_offloadToClients.sqf"], + ["blck_fnc_findRandomLocationWithinCircle","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findRandomLocationWithinCircle.sqf"], + + // Player-related functions + ["GMS_fnc_handlePlayerUpdates","\q\addons\custom_server\Compiles\Units\GMS_fnc_handlePlayerUpdates.sqf"], + ["blck_fnc_MessagePlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_AIM.sqf"], // Send messages to players regarding Missions + + // Mission-related functions + ["blck_fnc_selectAILoadout","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAILoadout.sqf"], + ["blck_fnc_selectAISidearms","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAISidearms.sqf"], + ["blck_fnc_selectAIUniforms","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIUniforms.sqf"], + ["blck_fnc_selectAIHeadgear","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIHeadgear.sqf"], + ["blck_fnc_selectAIVests","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIVests.sqf"], + ["blck_fnc_selectAIBackpacks","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIBackpacks.sqf"], + ["blck_fnc_selectChanceHeliPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectChanceHeliPatrol.sqf"], + ["blck_fnc_selectMissionHelis","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectMissionHelis.sqf"], + ["blck_fnc_selectNumberAirPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectNumberAirPatrols.sqf"], + ["blck_fnc_selectNumberParatroops","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectNumberParatroops.sqf"], + ["blck_fnc_selectChanceParatroops","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selecctChanceParatroops.sqf"], + ["blck_fnc_addMissionToQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addMissionToQue.sqf"], + ["blck_fnc_updateMissionQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_updateMissionQue.sqf"], + ["blck_fnc_spawnPendingMissions","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnPendingMissions.sqf"], + ["blck_fnc_addLiveAItoQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addLiveAItoQue.sqf"], + ["blck_fnc_addObjToQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addObjToQue.sqf"], + ["blck_fnc_spawnCrate","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnCrate.sqf"], // Simply spawns a crate of a specified type at a specific position. + ["blck_fnc_spawnMissionCrates","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionCrates.sqf"], + ["blck_fnc_cleanupObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_cleanUpObjects.sqf"], + ["blck_fnc_spawnCompositionObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnBaseObjects.sqf"], + ["blck_fnc_spawnRandomLandscape","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnRandomLandscape.sqf"], + ["blck_fnc_spawnMissionVehiclePatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionVehiclePatrols.sqf"], + ["blck_fnc_spawnEmplacedWeaponArray","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnEmplacedWeaponArray.sqf"], + ["blck_fnc_spawnMissionAI","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionAI.sqf"], + ["blck_fnc_spawnMissionLootVehicles","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionLootVehicles.sqf"], + ["blck_fnc_fillBoxes","\q\addons\custom_server\Compiles\Missions\GMS_fnc_fillBoxes.sqf"], // Adds items to an object according to passed parameters. See the script for details. + ["blck_fnc_smokeAtCrates","\q\addons\custom_server\Compiles\Missions\GMS_fnc_smokeAtCrates.sqf"], // Spawns a wreck and adds smoke to it + ["blck_fnc_spawnMines","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMines.sqf"], // Deploys mines at random locations around the mission center + ["blck_fnc_clearMines","\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"], // clears mines in an array passed as a parameter + ["blck_fnc_signalEnd","\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","\q\addons\custom_server\Compiles\Missions\GMS_fnc_endMission.sqf"], + ["blck_fnc_paraDropObject","\q\addons\custom_server\Compiles\Missions\GMS_fnc_paraDropObject.sqf"], + ["blck_fnc_loadMissionCrate","\q\addons\custom_server\Compiles\Missions\GMS_fnc_loadMissionCrate.sqf"], + ["blck_fnc_crateMoved","\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMoved.sqf"], + ["blck_fnc_crateMarker","\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMarker.sqf"], + ["blck_fnc_garrisonBuilding_RelPosSystem","\q\addons\custom_server\Compiles\Missions\GMS_fnc_garrisonBuilding_relPosSystem.sqf"], + ["blck_fnc_garrisonBuilding_ATLsystem","\q\addons\custom_server\Compiles\Missions\GMS_fnc_garrisonBuilding_ATLsystem.sqf"], + ["blck_fnc_spawnGarrisonInsideBuilding_ATL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf"], + ["blck_fnc_spawnGarrisonInsideBuilding_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf"], + ["GMS_fnc_selectVehicleCrewCount","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectVehicleCrewCount.sqf"], + ["blck_fnc_addDyanamicUMS_Mission","q\addons\custom_server\Compiles\Missions\GMS_fnc_addDynamicUMS_Mission.sqf"], + ["blck_fnc_sm_monitorInfantry","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorInfantry.sqf"], + ["blck_fnc_sm_monitorScuba","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorScuba.sqf"], + ["blck_fnc_sm_monitorVehicles","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorVehicles.sqf"], + ["blck_fnc_sm_monitorAircraft","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorAircraft.sqf"], + ["blck_fnc_sm_monitorShips","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorShips.sqf"], + ["blck_fnc_sm_monitorSubs","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorSubs.sqf"], + ["blck_fnc_sm_monitorEmplaced","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorEmplaced.sqf"], + ["blck_fnc_sm_monitorGarrisonsASL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorGarrisonsASL.sqf"], + ["blck_fnc_sm_monitorGarrisons_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorGarrisons_relPos.sqf"], + //["blck_fnc_sm_spawnVehiclePatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnVehiclePatrol.sqf"], + //["blck_fnc_sm_spawnAirPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnAirPatrol.sqf"], + //["blck_fnc_sm_spawnEmplaced","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnEmplaced.sqf"], + //["blck_fnc_sm_spawnInfantryPatrol","\q\addons\custom_server\Compiles\Missions\GMS_sm_spawnInfantryPatrol.sqf"], + ["blck_fnc_sm_staticPatrolMonitor","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_staticPatrolMonitor.sqf"], + //["blck_fnc_sm_checkForPlayerNearMission","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_checkForPlayerNearMission.sqf"], + //["blck_fnc_sm_spawnAirPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnAirPatrols.sqf"], + //["blck_fnc_sm_spawnEmplaceds","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnEmplaced.sqf"], + //["blck_fnc_sm_spawnInfantryPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnInfantryPatrols.sqf"], + ["blck_fnc_sm_spawnLootContainers","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnLootContainers.sqf"], + ["blck_fnc_sm_spawnObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnObjects.sqf"], + //["blck_fnc_sm_spawnVehiclePatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnVehiclePatrols.sqf"], + ["blck_fnc_sm_spawnBuildingGarrison_ASL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnBuildingGarrisonASL.sqf"], + ["blck_fnc_sm_spawnBuildingGarrison_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf"], + ["blck_fnc_sm_spawnObjectASLVectorDirUp","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf"], + ["blck_fnc_spawnScubaGroup","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnScubaGroup.sqf"], + ["blck_fnc_spawnSDVPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnSDVPatrol.sqf"], + ["blck_fnc_spawnSurfacePatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnSurfacePatrol.sqf"], + //["blck_fnc_sm_AddScubaGroup","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddScubaGroup.sqf"], + //["blck_fnc_sm_AddSurfaceVehicle","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddSurfaceVehicle.sqf"], + //["blck_fnc_sm_AddSDVVehicle","\q\addons\custom_server\Compiles\Missions\GMS_sm_AddSDVVehicle.sqf"], + ["blck_fnc_sm_AddGroupToArray", "\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddGroupToArray.sqf"], + + // Group-related functions + ["blck_fnc_spawnGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"], // Spawn a single group and populate it with AI units] + ["blck_fnc_setupWaypoints","\q\addons\custom_server\Compiles\Groups\GMS_fnc_setupWaypoints.sqf"], // Set default waypoints for a group + // 7/29/19 script mission; presume another function handles this now. + //["blck_fnc_missionGroupMonitor","\q\addons\custom_server\Compiles\Groups\GMS_fnc_missionGroupMonitor.sqf"], // Monitors active groups for those that are stuck in an SAD waypoint but not in combat + //["blck_fnc_changeToSADWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSADWaypoint.sqf"], + //["blck_fnc_changeToMoveWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToMoveWaypoint.sqf"], + //["blck_fnc_changeToSentryWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSentryWaypoint.sqf"], + ["blck_fnc_setNextWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_setNextWaypoint.sqf"], + ["blck_fnc_cleanEmptyGroups","\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"], // GMS_fnc_cleanEmptyGroups + ["blck_fnc_findNearestInfantryGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_findNearestInfantryGroup.sqf"], + ["blck_fnc_createGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_create_AI_Group.sqf"], // create a group for which other functions spawn AI. + ["blck_fnc_simulationManager","\q\addons\custom_server\Compiles\Groups\GMS_fnc_simulationMonitor.sqf"], + ["blck_fnc_groupWaypointMonitor","\q\addons\custom_server\Compiles\Groups\GMS_fnc_groupWaypointMonitor.sqf"], + ["blck_fnc_checkgroupwaypointstatus","\q\addons\custom_server\Compiles\Groups\GMS_fnc_checkgroupwaypointstatus.sqf"], + // blck_fnc_checkgroupwaypointstatus + + // Functions specific to vehicles, whether wheeled, aircraft or static + ["blck_fnc_spawnVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf"], + ["blck_fnc_spawnVehiclePatrol","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehiclePatrol.sqf"], + ["blck_fnc_protectVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_protectVehicle.sqf"], + ["blck_fnc_configureMissionVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_configureMissionVehicle.sqf"], + ["blck_fnc_vehicleMonitor","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf"], + ["blck_fnc_spawnMissionReinforcements","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionReinforcements.sqf"], + ["blck_fnc_spawnMissionHeli","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf"], + //["blck_EH_AIVehicle_HandleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_AIVehicle_Hit.sqf"], // Not needed, we can just call the function directly from the EH + ["blck_fnc_HandleAIVehicleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_HandleAIVehicleHit.sqf"], + // ["blck_EH_VehicleKilled","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_VehicleKilled.sqf"], // Not needed, we can just call the function directly from the EH + // ["blck_EH_changeLocality","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_changeLocality.sqf"], // Not used at present + ["blck_fnc_processAIVehicleKill","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_processAIVehicleKill.sqf"], + ["blck_fnc_selectPatrolVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_selectPatrolVehicle.sqf"], + ["blck_fnc_releaseVehicleToPlayers","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"], + ["blck_fnc_deleteAIVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_deleteAIVehicle.sqf"], + ["blck_fnc_destroyVehicleAndCrew","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_destroyVehicleAndCrew.sqf"], + ["blck_fnc_reloadVehicleAmmo","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_reloadVehicleAmmo.sqf"], + ["blck_fnc_scanForPlayersNearVehicles","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_scanForPlayersNearVehicles.sqf"], + ["blck_fnc_revealNearbyPlayers","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealNearbyPlayers.sqf"], + ["blck_fnc_unlockVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_unlockVehicle.sqf"], + ["GMS_fnc_applyVehicleDamagePenalty","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_applyVehicleDamagePenalty.sqf"], + ["GMS_fnc_revealVehicleToUnits","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealVehicleToUnits.sqf"], + //["GMS_fnc_handleEmptyStaticWeapon","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyStaticWeapon.sqf"], + //["blck_EH_vehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_vehicleGetOut.sqf"], // Just call the function directly + ["blck_fnc_handleVehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleVehicleGetOut.sqf"], + ["blck_fnc_checkForEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_checkForEmptyVehicle.sqf"], + ["blck_fnc_handleEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyVehicle.sqf"], + ["blck_fnc_loadVehicleCrew","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_loadVehicleCrew.sqf"], + ["blck_fnc_selectVehicleCrewCount","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectVehicleCrewCount.sqf"], + + // functions to support Units + ["blck_fnc_removeGear","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"], // Strip an AI unit of all gear. + ["blck_fnc_spawnUnit","\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_unitWeaponReloaded","\q\addons\custom_server\Compiles\Units\GMS_EH_unitWeaponReloaded.sqf"], + ["blck_EH_AIfiredNear","\q\addons\custom_server\Compiles\Units\GMS_EH_AIfiredNear.sqf"], + //["blck_EH_animDone","\q\addons\custom_server\Compiles\Units\GMS_EH_animDone.sqf"], + ["blck_fnc_processAIKill","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIKill.sqf"], + ["blck_fnc_removeLaunchers","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeLaunchers.sqf"], + ["blck_fnc_removeNVG","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeNVG.sqf"], + //["blck_fnc_alertNearbyUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyUnits.sqf"], + ["blck_fnc_alertGroupUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertGroupUnits.sqf"], + ["GMS_fnc_alertNearbyGroups","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyGroups.sqf"], + ["blck_fnc_alertNearbyVehicles","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyVehicles.sqf"], + ["blck_fnc_processIlleagalAIKills","\q\addons\custom_server\Compiles\Units\GMS_fnc_processIlleagalAIKills.sqf"], + ["blck_fnc_cleanupDeadAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupDeadAI.sqf"], // handles deletion of AI bodies and gear when it is time. + ["blck_fnc_setSkill","\q\addons\custom_server\Compiles\Units\GMS_fnc_setSkill.sqf"], + ["blck_fnc_cleanupAliveAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupAliveAI.sqf"], + ["blck_fnc_deleteAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_deleteAI.sqf"], + ["blck_fnc_processAIHit","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIHit.sqf"], + ["blck_fnc_spawnHostage","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnHostage.sqf"], + ["blck_fnc_spawnLeader","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnLeader.sqf"], + ["blck_fnc_spawnCharacter","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnCharacter.sqf"], + ["blck_fnc_spawnParaUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnParaUnits.sqf"], + //["blck_fnc_nextAnim","\q\addons\custom_server\Compiles\Units\GMS_fnc_nextAnim.sqf"], + ["blck_fnc_placeCharacterInBuilding","\q\addons\custom_server\Compiles\Units\GMS_fnc_placeCharacterInBuilding.sqf"], + ["GMS_fnc_removeAllAIgear","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeAllAIgear.sqf"], + + // HC support functions + ["blck_fnc_HC_XferGroup","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferGroup.sqf"], + ["blck_fnc_HC_passToHCs","\q\addons\custom_server\Compiles\HC\GMS_fnc_passToHCs.sqf"], + ["blck_fnc_HC_leastBurdened","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_leastBurdened.sqf"], + ["blck_fnc_HC_countGroupsAssigned","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_countGroupsAssigned.sqf"] +]; + +{ + _x params ["_name","_path"]; + missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path]; +} foreach _functions; + +#ifdef GRGserver +if (isServer) then {blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf";}; +diag_log "blck_functions loaded using GRGserver settings ---- >>>> "; +#endif + +//onPlayerDisconnected {[_name,_owner] call blck_fnc_onPlayerDisconnected;}; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/blck_functions_HC.sqf b/Server/@GMS/addons/custom_server/Compiles/blck_functions_HC.sqf new file mode 100644 index 0000000..6b88e8f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/blck_functions_HC.sqf @@ -0,0 +1,228 @@ +/* + AI Mission for Epoch Mod for Arma 3 + By Ghostrider + Functions and global variables used by the mission system. + + -------------------------- + 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 _functions = [ + // General functions + /* + ["blck_fnc_waitTimer","\q\addons\custom_server\Compiles\Functions\GMS_fnc_waitTimer.sqf"], + ["blck_fnc_timedOut","\q\addons\custom_server\Compiles\Functions\GMS_fnc_timedOut.sqf"], + ["blck_fnc_FindSafePosn","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findSafePosn.sqf"], + ["blck_fnc_randomPosition","\q\addons\custom_server\Compiles\Functions\GMS_fnc_randomPosn.sqf"], // find a randomPosn. see script for details. + ["blck_fnc_findPositionsAlongARadius","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findPositionsAlongARadius.sqf"], + ["blck_fnc_giveTakeCrypto","\q\addons\custom_server\Compiles\Functions\GMS_fnc_giveTakeCrypto.sqf"], + ["blck_fnc_timeAcceleration","\q\addons\custom_server\Compiles\TimeAccel\GMS_fnc_Time.sqf"], + ["blck_fnc_groupsOnAISide","\q\addons\custom_server\Compiles\Functions\GMS_fnc_GroupsOnAISide.sqf"], // Returns the number of groups on the side used by AI + ["blck_fnc_emptyObject","\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObject.sqf"], + ["blck_fnc_playerInRange","\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRange.sqf"], + ["blck_fnc_playerInRangeArray","\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRangeArray.sqf"], + ["blck_fnc_mainThread","\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf"], + ["blck_fnc_allPlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_allPlayers.sqf"], + ["blck_fnc_addItemToCrate","\q\addons\custom_server\Compiles\Functions\GMS_fnc_addItemToCrate.sqf"], + ["blck_fnc_loadLootItemsFromArray","\q\addons\custom_server\Compiles\Functions\GMS_fnc_loadLootItemsFromArray.sqf"], + ["blck_fnc_getNumberFromRange","\q\addons\custom_server\Compiles\Functions\GMS_fnc_getNumberFromRange.sqf"], + ["blck_fnc_spawnMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnMarker.sqf"], + ["blck_fnc_missionCompleteMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_missionCompleteMarker.sqf"], + ["blck_fnc_deleteMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_deleteMarker.sqf"], + ["blck_fnc_updateMarkerAliveCount","\q\addons\custom_server\Compiles\Functions\GMS_fnc_updateMarkerAliveCount.sqf"], + ["blck_fnc_addMoneyToObject","\q\addons\custom_server\Compiles\Functions\GMS_fnc_addMoneyToObject.sqf"], + ["blck_fnc_nearestPlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_nearestPlayers.sqf"], + ["GMS_fnc_msgIED","\q\addons\custom_server\Compiles\Functions\GMS_fnc_msgIED.sqf"], + ["GMS_fnc_cleanupTemporaryMarkers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_cleanupTemporaryMarkers.sqf"], + ["GMS_fnc_updateCrateSignals","\q\addons\custom_server\Compiles\Functions\GMS_fnc_updateCrateSignals.sqf"], + ["GMS_fnc_isClass","\q\addons\custom_server\Compiles\Functions\GMS_fnc_isClass.sqf"], + ["blck_fnc_findShoreLocation","q\addons\custom_server\Compiles\Functions\GMS_UMS_fnc_findShoreLocation.sqf"], + ["blck_fnc_findWaterDepth","q\addons\custom_server\Compiles\Functions\GMS_UMS_fnc_findWaterDepth.sqf"], + ["blck_fnc_setAILocality","\q\addons\custom_server\Compiles\Functions\GMS_fnc_setAILocality.sqf"], + ["blck_fnc_ai_offloadToClients","\q\addons\custom_server\Compiles\Functions\GMS_fnc_ai_offloadToClients.sqf"], + + // Player-related functions + ["GMS_fnc_handlePlayerUpdates","\q\addons\custom_server\Compiles\Units\GMS_fnc_handlePlayerUpdates.sqf"], + ["blck_fnc_MessagePlayers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_AIM.sqf"], // Send messages to players regarding Missions + + // Mission-related functions + ["blck_fnc_selectAILoadout","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAILoadout.sqf"], + ["blck_fnc_selectAISidearms","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAISidearms.sqf"], + ["blck_fnc_selectAIUniforms","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIUniforms.sqf"], + ["blck_fnc_selectAIHeadgear","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIHeadgear.sqf"], + ["blck_fnc_selectAIVests","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIVests.sqf"], + ["blck_fnc_selectAIBackpacks","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAIBackpacks.sqf"], + ["blck_fnc_selectChanceHeliPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectChanceHeliPatrol.sqf"], + ["blck_fnc_selectMissionHelis","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectMissionHelis.sqf"], + ["blck_fnc_selectNumberAirPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectNumberAirPatrols.sqf"], + ["blck_fnc_selectNumberParatroops","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectNumberParatroops.sqf"], + ["blck_fnc_selectChanceParatroops","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selecctChanceParatroops.sqf"], + ["blck_fnc_addMissionToQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addMissionToQue.sqf"], + ["blck_fnc_updateMissionQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_updateMissionQue.sqf"], + ["blck_fnc_spawnPendingMissions","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnPendingMissions.sqf"], + ["blck_fnc_addLiveAItoQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addLiveAItoQue.sqf"], + ["blck_fnc_addObjToQue","\q\addons\custom_server\Compiles\Missions\GMS_fnc_addObjToQue.sqf"], + ["blck_fnc_spawnCrate","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnCrate.sqf"], // Simply spawns a crate of a specified type at a specific position. + ["blck_fnc_spawnMissionCrates","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionCrates.sqf"], + ["blck_fnc_cleanupObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_cleanUpObjects.sqf"], + ["blck_fnc_spawnCompositionObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnBaseObjects.sqf"], + ["blck_fnc_spawnRandomLandscape","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnRandomLandscape.sqf"], + ["blck_fnc_spawnMissionVehiclePatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionVehiclePatrols.sqf"], + ["blck_fnc_spawnEmplacedWeaponArray","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnEmplacedWeaponArray.sqf"], + ["blck_fnc_spawnMissionAI","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionAI.sqf"], + ["blck_fnc_spawnMissionLootVehicles","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionLootVehicles.sqf"], + ["blck_fnc_fillBoxes","\q\addons\custom_server\Compiles\Missions\GMS_fnc_fillBoxes.sqf"], // Adds items to an object according to passed parameters. See the script for details. + ["blck_fnc_smokeAtCrates","\q\addons\custom_server\Compiles\Missions\GMS_fnc_smokeAtCrates.sqf"], // Spawns a wreck and adds smoke to it + ["blck_fnc_spawnMines","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMines.sqf"], // Deploys mines at random locations around the mission center + ["blck_fnc_clearMines","\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"], // clears mines in an array passed as a parameter + ["blck_fnc_signalEnd","\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","\q\addons\custom_server\Compiles\Missions\GMS_fnc_endMission.sqf"], + ["blck_fnc_paraDropObject","\q\addons\custom_server\Compiles\Missions\GMS_fnc_paraDropObject.sqf"], + ["blck_fnc_loadMissionCrate","\q\addons\custom_server\Compiles\Missions\GMS_fnc_loadMissionCrate.sqf"], + ["blck_fnc_crateMoved","\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMoved.sqf"], + ["blck_fnc_crateMarker","\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMarker.sqf"], + ["blck_fnc_garrisonBuilding_RelPosSystem","\q\addons\custom_server\Compiles\Missions\GMS_fnc_garrisonBuilding_relPosSystem.sqf"], + ["blck_fnc_garrisonBuilding_ATLsystem","\q\addons\custom_server\Compiles\Missions\GMS_fnc_garrisonBuilding_ATLsystem.sqf"], + ["blck_fnc_spawnGarrisonInsideBuilding_ATL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf"], + ["blck_fnc_spawnGarrisonInsideBuilding_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf"], + ["GMS_fnc_selectVehicleCrewCount","\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectVehicleCrewCount.sqf"], + ["blck_fnc_addDyanamicUMS_Mission","q\addons\custom_server\Compiles\Missions\GMS_fnc_addDynamicUMS_Mission.sqf"], + ["blck_fnc_sm_monitorInfantry","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorInfantry.sqf"], + ["blck_fnc_sm_monitorScuba","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorScuba.sqf"], + ["blck_fnc_sm_monitorVehicles","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorVehicles.sqf"], + ["blck_fnc_sm_monitorAircraft","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorAircraft.sqf"], + ["blck_fnc_sm_monitorShips","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorShips.sqf"], + ["blck_fnc_sm_monitorSubs","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorSubs.sqf"], + ["blck_fnc_sm_monitorEmplaced","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorEmplaced.sqf"], + ["blck_fnc_sm_monitorGarrisonsASL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorGarrisonsASL.sqf"], + ["blck_fnc_sm_monitorGarrisons_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_monitorGarrisons_relPos.sqf"], + //["blck_fnc_sm_spawnVehiclePatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnVehiclePatrol.sqf"], + ["blck_fnc_sm_spawnAirPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnAirPatrol.sqf"], + ["blck_fnc_sm_spawnEmplaced","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnEmplaced.sqf"], +// ["blck_fnc_sm_spawnInfantryPatrol","\q\addons\custom_server\Compiles\Missions\GMS_sm_spawnInfantryPatrol.sqf"], + ["blck_fnc_sm_staticPatrolMonitor","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_staticPatrolMonitor.sqf"], +// ["blck_fnc_sm_checkForPlayerNearMission","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_checkForPlayerNearMission.sqf"], + ["blck_fnc_sm_spawnAirPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnAirPatrols.sqf"], + //["blck_fnc_sm_spawnEmplaceds","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnEmplaced.sqf"], + ["blck_fnc_sm_spawnInfantryPatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnInfantryPatrols.sqf"], + ["blck_fnc_sm_spawnLootContainers","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnLootContainers.sqf"], + ["blck_fnc_sm_spawnObjects","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnObjects.sqf"], + ["blck_fnc_sm_spawnVehiclePatrols","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnVehiclePatrols.sqf"], + ["blck_fnc_sm_spawnBuildingGarrison_ASL","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnBuildingGarrisonASL.sqf"], + ["blck_fnc_sm_spawnBuildingGarrison_relPos","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf"], + ["blck_fnc_sm_spawnObjectASLVectorDirUp","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf"], + ["blck_fnc_spawnScubaGroup","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnScubaGroup.sqf"], + ["blck_fnc_spawnSDVPatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnSDVPatrol.sqf"], + ["blck_fnc_spawnSurfacePatrol","\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnSurfacePatrol.sqf"], + //["blck_fnc_sm_AddScubaGroup","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddScubaGroup.sqf"], + //["blck_fnc_sm_AddSurfaceVehicle","\q\addons\custom_server\Compiles\Missions\GMS_fnc_sm_AddSurfaceVehicle.sqf"], + ["blck_fnc_sm_AddSDVVehicle","\q\addons\custom_server\Compiles\Missions\GMS_sm_AddSDVVehicle.sqf"], + ["blck_fnc_sm_AddGroupToArray", "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroupToArray.sqf"], + */ + // Group-related functions + //["blck_fnc_spawnGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"], // Spawn a single group and populate it with AI units] + //["blck_fnc_setupWaypoints","\q\addons\custom_server\Compiles\Groups\GMS_fnc_setupWaypoints.sqf"], // Set default waypoints for a group + // 7/29/19 script mission; presume another function handles this now. + //["blck_fnc_missionGroupMonitor","\q\addons\custom_server\Compiles\Groups\GMS_fnc_missionGroupMonitor.sqf"], // Monitors active groups for those that are stuck in an SAD waypoint but not in combat + //["blck_fnc_changeToSADWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSADWaypoint.sqf"], + //["blck_fnc_changeToMoveWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToMoveWaypoint.sqf"], + //["blck_fnc_changeToSentryWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSentryWaypoint.sqf"], + ["blck_fnc_setNextWaypoint","\q\addons\custom_server\Compiles\Groups\GMS_fnc_setNextWaypoint.sqf"], + //["blck_fnc_cleanEmptyGroups","\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"], // GMS_fnc_cleanEmptyGroups + //["blck_fnc_findNearestInfantryGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_findNearestInfantryGroup.sqf"], + //["blck_fnc_createGroup","\q\addons\custom_server\Compiles\Groups\GMS_fnc_create_AI_Group.sqf"], // create a group for which other functions spawn AI. + //["blck_fnc_simulationManager","\q\addons\custom_server\Compiles\Groups\GMS_fnc_simulationMonitor.sqf"], + //["blck_fnc_groupWaypointMonitor","\q\addons\custom_server\Compiles\Groups\GMS_fnc_groupWaypointMonitor.sqf"], + //["blck_fnc_checkgroupwaypointstatus","\q\addons\custom_server\Compiles\Groups\GMS_fnc_checkgroupwaypointstatus.sqf"], + // blck_fnc_checkgroupwaypointstatus + /* + // Functions specific to vehicles, whether wheeled, aircraft or static + ["blck_fnc_spawnVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf"], + ["blck_fnc_spawnVehiclePatrol","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehiclePatrol.sqf"], + ["blck_fnc_protectVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_protectVehicle.sqf"], + ["blck_fnc_configureMissionVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_configureMissionVehicle.sqf"], + ["blck_fnc_vehicleMonitor","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf"], + ["blck_fnc_spawnMissionReinforcements","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionReinforcements.sqf"], + ["blck_fnc_spawnMissionHeli","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf"], + ["blck_EH_AIVehicle_HandleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_AIVehicle_Hit.sqf"], + ["blck_fnc_HandleAIVehicleHit","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_HandleAIVehicleHit.sqf"], + ["blck_EH_VehicleKilled","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_VehicleKilled.sqf"], + ["blck_EH_changeLocality","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_changeLocality.sqf"], + ["blck_fnc_processAIVehicleKill","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_processAIVehicleKill.sqf"], + ["blck_fnc_selectPatrolVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_selectPatrolVehicle.sqf"], + ["blck_fnc_releaseVehicleToPlayers","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"], + ["blck_fnc_deleteAIVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_deleteAIVehicle.sqf"], + ["blck_fnc_destroyVehicleAndCrew","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_destroyVehicleAndCrew.sqf"], + ["blck_fnc_reloadVehicleAmmo","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_reloadVehicleAmmo.sqf"], + ["blck_fnc_scanForPlayersNearVehicles","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_scanForPlayersNearVehicles.sqf"], + ["blck_fnc_revealNearbyPlayers","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealNearbyPlayers.sqf"], + ["GMS_fnc_unlockServerVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_unlockServerVehicle.sqf"], + ["GMS_fnc_applyVehicleDamagePenalty","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_applyVehicleDamagePenalty.sqf"], + ["GMS_fnc_revealVehicleToUnits","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealVehicleToUnits.sqf"], + //["GMS_fnc_handleEmptyStaticWeapon","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyStaticWeapon.sqf"], + */ + ["blck_EH_vehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_vehicleGetOut.sqf"], + ["blck_fnc_handleVehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleVehicleGetOut.sqf"], + /* + ["blck_fnc_checkForEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_checkForEmptyVehicle.sqf"], + ["blck_fnc_handleEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyVehicle.sqf"], + ["blck_fnc_loadVehicleCrew","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_loadVehicleCrew.sqf"], + */ + // functions to support Units + //["blck_fnc_removeGear","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"], // Strip an AI unit of all gear. + //["blck_fnc_spawnUnit","\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_unitWeaponReloaded","\q\addons\custom_server\Compiles\Units\GMS_EH_unitWeaponReloaded.sqf"], + ["blck_EH_AIfiredNear","\q\addons\custom_server\Compiles\Units\GMS_EH_AIfiredNear.sqf"], + ["blck_fnc_processAIfiredNear","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIFiredNear.sqf"], + + //["blck_EH_animDone","\q\addons\custom_server\Compiles\Units\GMS_EH_animDone.sqf"], + + ["blck_fnc_processAIKill","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIKill.sqf"], + /* + ["blck_fnc_removeLaunchers","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeLaunchers.sqf"], + ["blck_fnc_removeNVG","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeNVG.sqf"], + ["blck_fnc_alertNearbyUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyUnits.sqf"], + ["blck_fnc_alertGroupUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertGroupUnits.sqf"], + ["GMS_fnc_alertNearbyGroups","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyGroups.sqf"], + ["blck_fnc_alertNearbyVehicles","\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyVehicles.sqf"], + ["blck_fnc_processIlleagalAIKills","\q\addons\custom_server\Compiles\Units\GMS_fnc_processIlleagalAIKills.sqf"], + ["blck_fnc_cleanupDeadAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupDeadAI.sqf"], // handles deletion of AI bodies and gear when it is time. + ["blck_fnc_setSkill","\q\addons\custom_server\Compiles\Units\GMS_fnc_setSkill.sqf"], + ["blck_fnc_cleanupAliveAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupAliveAI.sqf"], + ["blck_fnc_deleteAI","\q\addons\custom_server\Compiles\Units\GMS_fnc_deleteAI.sqf"], + ["blck_fnc_processAIHit","\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIHit.sqf"], + ["blck_fnc_spawnHostage","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnHostage.sqf"], + ["blck_fnc_spawnLeader","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnLeader.sqf"], + ["blck_fnc_spawnCharacter","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnCharacter.sqf"], + ["blck_fnc_spawnParaUnits","\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnParaUnits.sqf"], + //["blck_fnc_nextAnim","\q\addons\custom_server\Compiles\Units\GMS_fnc_nextAnim.sqf"], + ["blck_fnc_placeCharacterInBuilding","\q\addons\custom_server\Compiles\Units\GMS_fnc_placeCharacterInBuilding.sqf"], + ["GMS_fnc_removeAllAIgear","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeAllAIgear.sqf"], + */ + // HC support functions + //["blck_fnc_HC_XferGroup","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_XferGroup.sqf"], + //["blck_fnc_HC_passToHCs","\q\addons\custom_server\Compiles\HC\GMS_fnc_passToHCs.sqf"], + //["blck_fnc_HC_leastBurdened","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_leastBurdened.sqf"], + //["blck_fnc_HC_countGroupsAssigned","\q\addons\custom_server\Compiles\HC\GMS_fnc_HC_countGroupsAssigned.sqf"] + [] +]; + +{ + if !(_x isEqualto []) then + { + _x params ["_name","_path"]; + missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path]; + }; +} foreach _functions; + +diag_log format["[blckeagles] Functions for Headless Clients compiled"]; + + diff --git a/Server/@GMS/addons/custom_server/Compiles/blck_variables.sqf b/Server/@GMS/addons/custom_server/Compiles/blck_variables.sqf new file mode 100644 index 0000000..49a6930 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Compiles/blck_variables.sqf @@ -0,0 +1,49 @@ +/* + AI Mission for Epoch Mod for Arma 3 + For the Mission System originally coded by blckeagls + By Ghostrider + Functions and global variables used by the mission system. + -------------------------- + 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 variables"; + +blck_minFPS = 8; + +// radius within whih missions are triggered. The trigger causes the crate and AI to spawn. +#ifdef blck_milServer +blck_TriggerDistance = 1500; +#else +blck_TriggerDistance = 1500; +#endif + +//////////////////////////////////////////////// +// Do Not Touch Anything Below This Line +/////////////////////////////////////////////// +blck_townLocations = []; //nearestLocations [blck_mapCenter, ["NameCity","NameCityCapital"], 30000]; +blck_ActiveMissionCoords = []; +blck_recentMissionCoords = []; +blck_monitoredVehicles = []; +blck_livemissionai = []; +blck_monitoredMissionAIGroups = []; // Used to track groups in active missions for whatever purpose +blck_oldMissionObjects = []; +blck_pendingMissions = []; +blck_missionsRunning = 0; +blck_missionsRun = 0; +blck_activeMissions = []; +blck_deadAI = []; +blck_connectedHCs = []; +blck_missionMarkers = []; +blck_heliCrashSites = []; +blck_temporaryMarkers = []; +blck_illuminatedCrates = []; // [crate,duration,freq of replacement] +blck_mainThreadUpdateInterval = 60; +blck_revealMode = "detailed"; //""basic" /*group or vehicle level reveals*/,detailed /*unit by unit reveals*/"; +diag_log "[blckeagls] Variables Loaded"; + diff --git a/Server/@GMS/addons/custom_server/Configs/armed_vics_notes.txt b/Server/@GMS/addons/custom_server/Configs/armed_vics_notes.txt new file mode 100644 index 0000000..199a327 --- /dev/null +++ b/Server/@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/Server/@GMS/addons/custom_server/Configs/blck_configs.sqf b/Server/@GMS/addons/custom_server/Configs/blck_configs.sqf new file mode 100644 index 0000000..ddf2312 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_configs.sqf @@ -0,0 +1,454 @@ +/* + 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" + #include "\q\addons\custom_server\init\build.sqf" + /* + changing any of these variables may break the mission systemChat + */ + blck_locationBlackList = []; // Do not touch ... + blck_debugON = false; // Do not touch ... + blck_debugLevel = 0; // Do not touch ... + #ifdef blck_milServer + if (true) exitWith + { + diag_log format["[blckeagls] Running configs for militarized servers build %1",blck_buildNumber]; + execVM "\q\addons\custom_server\Configs\blck_configs_mil.sqf"; + }; + #endif + diag_log format["[blckeagls] Loading configurations for Non-militarized servers build %1",blck_buildNumber]; + /* + ************************************** + Configurations begin here + ************************************** + */ + /*************************************************************** + BLCKEAGLS SUPPLEMENTAL MODULES + **************************************************************** + Configuration for Addons that support the overall Mission system. + These are: + 1) a module to spawn map addons generated with the Eden Editor + 2) And a moduel to spawn static loot crates at specific location + 3) A time acceleration module. + */ + + blck_spawnMapAddons = true; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf + blck_spawnStaticLootCrates = true; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent). + blck_simulationManager = blck_useBlckeaglsSimulationManager; + //diag_log format["[blckeagls] blck_configs: blck_simulationManager = %1",blck_simulationManager]; + /* + blck_simulationManagementOff - no simulation management occurs + blck_useBlckeaglsSimulationManager - simulation is enabled/disabled by periodic checks for nearby players; a 'wake' function is included when a units simulation is turned on + blck_useDynamicSimulationManagement 2 - arma dynamic simulation is used + */ + + // 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 = 2; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 12; // Nighttim time acceleration + + /************************************************************** + + BLACKLIST LOCATIONS + + **************************************************************/ + // if true then missions will not spawn within 1000 m of spawn points for Altis, Bornholm, Cherno, Esseker or stratis. + blck_blacklistTraderCities = true; // Set this = true if you would like the mission system to automatically search for the locations of the Epoch/Exile trader cities. Note that these are added to the list of blacklisted locations for Epoch for the most common maps. + + /*********************************************************** + + GENERAL MISSION SYSTEM CONFIGURATION + + ***********************************************************/ + //////// + // Client Offloading and Headless Client Configurations + blck_useHC = true; // Experimental (should be working). + + // Credit to Defent and eraser for their excellent work on scripts to transfer AI to clients for which these settings are required. + blck_ai_offload_to_client = false; // forces AI to be transfered to player's PCs. Disable if you have players running slow PCs. + // ******************************************************* + // Experimental; may cause issues with waypoints + // ******************************************************* + blck_ai_offload_notifyClient = false; // Set true if you want notifications when AI are offloaded to a client PC. Only for testing/debugging purposes. + blck_limit_ai_offload_to_blckeagls = true; // when true, only groups spawned by blckeagls are evaluated. + + /////////////////////////////// + // Kill message configurations + // These determine whether and when messages are sent to players regarding AI Kills or illegal kills that might damage a vehicle. + blck_useKillMessages = true; // when true a message will be broadcast to all players each time an AI is killed; may impact server performance. + blck_useKillScoreMessage = true; // when true a tile is displayed to the killer with the kill score information + blck_useIEDMessages = true; // Displayes a message when a player vehicle detonates and IED (such as would happen if a player killed AI with a forbidden weapon). + + /////////////////////////////// + // MISSION MARKER CONFIGURATION + // blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type + //When set to true,"arrow", text will be to the right of an arrow below the mission marker. + // When set to true,"dot", ext will be to the right of a black dot at the center the mission marker. + blck_labelMapMarkers = [true,"center"]; + blck_preciseMapMarkers = true; // Map markers are/are not centered at the loot crate + blck_showCountAliveAI = true; + + //Minimum distance between missions + blck_MinDistanceFromMission = 1500; + blck_minDistanceToBases = 900; + blck_minDistanceToPlayer = 900; + blck_minDistanceFromTowns = 300; + + /////////////////////////////// + // Mission Smoke and Signals + /////////////////////////////// + + // global loot crate options + // Options to spawn a smoking wreck near the crate. When the first parameter is true, a wreck or junk pile will be spawned. + // It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission. + blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether. + blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion. + blck_missionEndCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + + /////////////////////////////// + // General Mission Completion and Loot Settings + /////////////////////////////// + blck_killPercentage = 0.999999; // 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. + blck_allowClaimVehicle = true; // Set this to true if you wish to allow players to claim vehicles using one of the claim vehicle scripts floating around. + + /////////////////////////////// + // PLAYER PENALTIES + /////////////////////////////// + + blck_RunGear = true; // When set to true, AI that have been run over will ve stripped of gear, and the vehicle will be given blck_RunGearDamage of damage. + blck_RunGearDamage = 0.2; // Damage applied to player vehicle for each AI run over + blck_VK_Gear = true; // When set to true, AI that have been killed by a player in a vehicle in the list of forbidden vehicles or using a forbiden gun will be stripped of gear and the vehicle will be given blck_RunGearDamage of damage + blck_VK_RunoverDamage = true; // when the AI was run over blck_RunGearDamage of damage will be applied to the killer's vehicle. + blck_VK_GunnerDamage = false; // when the AI was killed by a gunner on a vehicle that is is in the list of forbidden vehicles, blck_RunGearDamage of damage will be applied to the killer's vehicle each time an AI is killed with a vehicle's gun. + blck_forbidenVehicles = ["B_MRAP_01_hmg_F","O_MRAP_02_hmg_F","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 + + + /////////////////////////////// + // MISC MISSION PARAMETERS + /////////////////////////////// + blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player, distance and name of AI unit killed are shown. + blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Turn this off if you have vehicle patrols. + blck_cleanupCompositionTimer = 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_MissionTimeout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting. + + /////////////////////////////// + // Paratroop Settings + // AI paratrooper reinforcement paramters + // The behavior of these can be linked to some degree to the spawning of patrolling helis. + // For example, if you always want a helicopter to spawn paratroops set the value 1. + // Recommended that you disable paratroops if using muliple aircraft/vehicle patrols + blck_chanceParaBlue = 0; // [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_chanceParaRed = 0; + blck_noParaRed = 3; + + blck_chanceParaGreen = 0; + blck_noParaGreen = 4; + + blck_chanceParaOrange = 0; + blck_noParaOrange = 4; + + // Supplemental Loot Parameters. + + /////////////////////////////// + // Heli Patrol Heli Types + // Armed Helis + ////////////////////////////// + _blck_littleBirds = ["B_Heli_Light_01_armed_F"]; // AH-9 Pawnee (WEST) + _blck_armed_hellcats = ["I_Heli_light_03_F"]; + _blck_armed_orcas = ["O_Heli_Light_02_F","O_Heli_Light_02_v2_F"]; + _blck_armed_ghosthawks = ["B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F"]; + _blck_armed_hurons = ["B_Heli_Transport_03_F","B_Heli_Transport_03_black_F"]; + _blck_armed_attackHelis = ["B_Heli_Attack_01_F"]; + _blck_armed_heavyAttackHelis = ["O_Heli_Attack_02_F","O_Heli_Attack_02_black_F"]; + _blck_fighters = [ + "O_Plane_CAS_02_F", // /ti-199 Neophron (CAS) + "I_Plane_Fighter_03_AA_F", // A-143 Buzzard (AA) + "I_Plane_Fighter_04_F", // A-149 Gryphon + "B_Plane_CAS_01_F", // A-164 Wipeout (CAS) + "B_Plane_Fighter_01_F" // F/A-181 Black Wasp II + ]; + blck_blacklisted_heli_ammo = ["24Rnd_missiles","24Rnd_PG_missiles","12Rnd_PG_missiles","2Rnd_LG_scalpel","6Rnd_LG_scalpel","8Rnd_LG_scalpel","M_Scalpel_AT ","14Rnd_80mm_rockets","38Rnd_80mm_rockets"]; + blck_blacklisted_heli_weapons = ["missiles_SCALPEL","missiles_titan","rockets_Skyfire","missiles_DAGR","missiles_DAR"]; + + + /////////////////////////////// + // Heli Patrol Settings + /////////////////////////////// + + blck_chanceHeliPatrolBlue = 0; //[0 - 1] Set to 0 to deactivate and 1 to always have a heli spawn over the mission center and patrol the mission area. + // The chance of paratroops dropping from the heli is defined by blck_chancePara(Blue|Red|Green|Orange) above. + // Recommend setting the change = 1 if you wish to spawn multiple helis at a mission. + blck_patrolHelisBlue = _blck_littleBirds; + blck_noPatrolHelisBlue = 1; + + blck_chanceHeliPatrolRed = 0.1; // 0.4; + blck_patrolHelisRed = _blck_littleBirds; + blck_noPatrolHelisRed = 1; + + blck_chanceHeliPatrolGreen = 0.4; + blck_patrolHelisGreen = _blck_littleBirds; + blck_noPatrolHelisGreen = 1; + + blck_chanceHeliPatrolOrange = 0.5; + blck_patrolHelisOrange = _blck_armed_hellcats+_blck_armed_orcas; + 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 = 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 = 1; + blck_numberUnderwaterDynamicMissions = 3; // Values from -1 (no UMS) to N (N Underwater missions will be spawned; static UMS units and subs will be spawned. + + //////////////////// + // MISSION TIMERS + //////////////////// + + // Reduce to 1 sec for immediate spawns, or longer if you wish to space the missions out + blck_TMin_Orange = 250; + blck_TMin_Green = 200; + blck_TMin_Blue = 120; + blck_TMin_Red = 150; + blck_TMin_UMS = 180; + + //Maximum Spawn time between missions in seconds + blck_TMax_Orange = 360; + blck_TMax_Green = 300; + blck_TMax_Blue = 200; + blck_TMax_Red = 250; + blck_TMax_UMS = 400; + + /////////////////////////////// + // AI VEHICLE PATROL PARAMETERS + /////////////////////////////// + + blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area. + blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten outor been killed. + blck_vehicleDeleteTimer = 120*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,4]; // Number of static weapons at Orange Missions + blck_SpawnVeh_Green = [2,3]; // Number of static weapons at Green Missions + blck_SpawnVeh_Blue = 1; // Number of static weapons at Blue Missions + blck_SpawnVeh_Red = 1; // Number of static weapons at Red Missions + + blck_vehCrew_blue = 3; + blck_vehCrew_red = 3; + blck_vehCrew_green = 3; + blck_vehCrew_orange = 3; + + /////////////////////////////// + // AI STATIC WEAPON PARAMETERS + /////////////////////////////// + + blck_useStatic = true; // When true, AI will man static weapons spawned 20-30 meters from the mission center. These are very effective against most vehicles + blck_killEmptyStaticWeapons = true; // When true, static weapons will have damage set to 1 when the AI manning them is killed. + blck_staticWeapons = ["B_HMG_01_high_F","B_GMG_01_high_F"/*,"O_static_AT_F"*/]; // [0.50 cal, grenade launcher, AT Launcher] + + //////////////////// + // Mission Static Weapon Settings + //////////////////// + + // Defines how many static weapons to spawn. Set this to -1 to disable spawning + blck_SpawnEmplaced_Orange = [3,4]; // Number of static weapons at Orange 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 + + + + /**************************************************************** + + GENERAL AI SETTINGS + + ****************************************************************/ + // When true, AI loadouts will be set from the class names in CfgPricing rather than the settings in the mod-specific configuration files + blck_useConfigsGeneratedLoadouts = false; + blck_logBlacklistedItems = true; + //blck_maximumitempriceinai_loadouts = 1000; + // lists of black-listed items to be excluded from dynamic loadouts + blck_blacklistedVests = [ + //"V_Press_F" + ]; + + blck_blacklistedUniforms = [ + "U_I_Protagonist_VR", + "U_C_Protagonist_VR", + "U_O_Protagonist_VR", + "U_B_Protagonist_VR", + "Exile_Uniform_BambiOverall", + "Exile_Uniform_ExileCustoms" + ]; + + blck_blacklistedBackpacks = [ + //"B_ViperLightHarness_blk_F" + ]; + + blck_blacklistedHeadgear = [ + "H_HelmotO_ViperSP_ghex_F", + "H_HelmetO_VierSP_hex" + ]; + + blck_blacklistedPrimaryWeapons = [ + //"srifle_LRR_tna_F" + ]; + + blck_blacklistedSecondaryWeapons = [ + "hgun_Pistol_heav_02_F" + ]; + + blck_blacklistedLaunchersAndSwingWeapons = [ + + ]; + + blck_blacklistedOptics = [ + //"optic_tws" + ]; + + blck_blacklistedAttachments = [ + + ]; + + blck_blacklistedItems = [ + + ]; + ///////////////////////////////////////////// + + blck_groupBehavior = "SAFE"; // https://community.bistudio.com/wiki/ArmA:_AI_Combat_Modes + blck_combatMode = "RED"; // Change this to "YELLOW" if the AI wander too far from missions for your tastes. + blck_groupFormation = "WEDGE"; // Possibilities include "WEDGE","VEE","FILE","DIAMOND" + + blck_useSmokeWhenHealing = true; // when true, injured AI will toss a smoke when they attempt to heal. + blck_addAIMoney = true; + blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack + blck_useNVG = true; // When true, AI will be spawned with NVG if is dark + blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed. + blck_useLaunchers = true; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now + //blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"]; + blck_launcherTypes = ["launch_RPG32_F"]; + blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher + blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI. + 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 = 45; + + //This defines how long after an AI dies that it's body disappears. + blck_bodyCleanUpTimer = 60*30; // time in seconds after which dead AI bodies are deleted + // Each time an AI is killed, the location of the killer will be revealed to all AI within this range of the killed AI, set to -1 to disable + // values are ordered as follows [blue, red, green, orange]; + blck_AliveAICleanUpTimer = 60*20; // Time after mission completion at which any remaining live AI are deleted. + + // How precisely player locations will be revealed to AI after an AI kill + // values are ordered as follows [blue, red, green, orange]; + blck_AIAlertDistance = [250,325,450,500]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. + //blck_AIAlertDistance = [150,225,400,500]; + // How precisely player locations will be revealed to AI after an AI kill + // values are ordered as follows [blue, red, green, orange]; + blck_AIIntelligence = [0.3, 0.5, 0.7, 0.9]; + + blck_baseSkill = 1.0; // The overal skill of the AI - range 0.1 to 1.0. + + /*************************************************************** + + MISSION TYPE SPECIFIC AI SETTINGS + + **************************************************************/ + //This defines the skill, minimum/Maximum number of AI and how many AI groups are spawned for each mission type + // Orange Missions + blck_MinAI_Orange = 20; + blck_MaxAI_Orange = 25; + blck_AIGrps_Orange = 5; + blck_SkillsOrange = [ + ["aimingAccuracy",[0.35,0.45]],["aimingShake",[0.65,0.75]],["aimingSpeed",[0.65,0.75]],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] + ]; + + // Green Missions + blck_MinAI_Green = 16; + blck_MaxAI_Green = 21; + blck_AIGrps_Green = 4; + blck_SkillsGreen = [ + ["aimingAccuracy",0.3],["aimingShake",0.65],["aimingSpeed",0.65],["endurance",0.9],["spotDistance",0.9],["spotTime",0.9],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75] + ]; + + // Red Missions + blck_MinAI_Red = 12; + blck_MaxAI_Red = 15; + blck_AIGrps_Red = 3; + blck_SkillsRed = [ + ["aimingAccuracy",0.2],["aimingShake",0.6],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.8],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70] + ]; + + // Blue Missions + blck_MinAI_Blue = 8; + blck_MaxAI_Blue = 12; + blck_AIGrps_Blue = 2; + blck_SkillsBlue = [ + ["aimingAccuracy",0.1],["aimingShake",0.5],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] + ]; + + // Add some money to AI; + blck_maxMoneyOrange = 25; + blck_maxMoneyGreen = 20; + blck_maxMoneyRed = 15; + blck_maxMoneyBlue = 10; + + if (toLower(blck_modType) isEqualTo "epoch") then + { + diag_log format["[blckeagls] Loading Mission System using Parameters for %1",blck_modType]; + execVM "\q\addons\custom_server\Configs\blck_configs_epoch.sqf"; + }; + if (toLower(blck_modType) isEqualTo "exile") then + { + diag_log format["[blckeagls] Loading Mission System using Parameters for %1",blck_modType]; + execVM "\q\addons\custom_server\Configs\blck_configs_exile.sqf"; + }; + uiSleep 10; + if (blck_useConfigsGeneratedLoadouts) then + { + diag_log format["[blckeagls] Dynamic Configs Enabled"]; + execVM "\q\addons\custom_server\Configs\blck_dynamicConfigs.sqf"; + } else { + + }; + + blck_configsLoaded = true; + diag_log format["<--- blck_configs loaded at %1 --->",diag_tickTime]; diff --git a/Server/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf b/Server/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf new file mode 100644 index 0000000..fb54a89 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf @@ -0,0 +1,1102 @@ +/* + 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"; +#include "\q\addons\custom_server\init\build.sqf"; +diag_log format["[blckeagls] loading configurations for Epoch for blckeagls build %1",blck_buildNumber]; +//////////// +// Epoch-specific settings +//////////// + + // list of locations that are protected against mission spawns + + switch (toLower(worldName)) do + { + case "altis": { + blck_locationBlackList append [ + //Add location as [[xpos,ypos,0],minimumDistance], + // Note that there should not be a comma after the last item in this table + [[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched. + ]; + }; + case "tanoa": { + blck_locationBlackList append [ ]; + }; + }; + +/********************************************************************************* + +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_maximumItemPriceInAI_Loadouts = 100; + + 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; + blck_AIPatrolVehiclesOrange = blck_AIPatrolVehicles; + + // Blacklisted itesm + blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"]; + + // AI Weapons and Attachments + blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"]; + + blck_Optics_Holo = ["optic_Hamr","optic_MRD","optic_Holosight","optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_ACO_grn_smg","optic_Aco_smg","optic_Yorris"]; + blck_Optics_Reticule = ["optic_Arco","optic_MRCO"]; + blck_Optics_Scopes = [ + "optic_AMS","optic_AMS_khk","optic_AMS_snd", + "optic_DMS", + "optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan", + "optic_LRPS", + "optic_Nightstalker", + "optic_NVS", + "optic_SOS", + "optic_tws" + //"optic_tws_mg", + ]; + blck_Optics_Apex = [ + //Apex + "optic_Arco_blk_F", "optic_Arco_ghex_F", + "optic_DMS_ghex_F", + "optic_Hamr_khk_F", + "optic_ERCO_blk_F","optic_ERCO_khk_F","optic_ERCO_snd_F", + "optic_SOS_khk_F", + "optic_LRPS_tna_F","optic_LRPS_ghex_F", + "optic_Holosight_blk_F","optic_Holosight_khk_F","optic_Holosight_smg_blk_F" + ]; + blck_Optics = blck_Optics_Holo + blck_Optics_Reticule + blck_Optics_Scopes; + + #ifdef useAPEX + blck_Optics = blck_Optics + blck_Optics_Apex; + #endif + blck_bipods = [ + "bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli", + //Apex + "bipod_01_F_khk" + ]; + + blck_silencers = [ + "muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand","muzzle_snds_93mmg","muzzle_snds_93mmg_tan","muzzle_snds_acp","muzzle_snds_B", + "muzzle_snds_H","muzzle_snds_H_MG","muzzle_snds_H_SW","muzzle_snds_L","muzzle_snds_M", + //Apex + "muzzle_snds_H_khk_F","muzzle_snds_H_snd_F","muzzle_snds_58_blk_F","muzzle_snds_m_khk_F","muzzle_snds_m_snd_F","muzzle_snds_B_khk_F","muzzle_snds_B_snd_F", + "muzzle_snds_58_wdm_F","muzzle_snds_65_TI_blk_F","muzzle_snds_65_TI_hex_F","muzzle_snds_65_TI_ghex_F","muzzle_snds_H_MG_blk_F","muzzle_snds_H_MG_khk_F" + ]; + + blck_RifleSniper = [ + "srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F" + ]; + + blck_RifleAsault_556 = [ + "arifle_SDAR_F","arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F","arifle_SDAR_F" + ]; + + blck_RifleAsault_650 = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F" + ]; + + blck_RifleAsault = blck_RifleAsault_556 + blck_RifleAsault_650; + + blck_RifleLMG = [ + "LMG_Mk200_F","LMG_Zafir_F" + ]; + + blck_RifleOther = [ + "SMG_01_F","SMG_02_F" + ]; + + blck_Pistols = [ + "hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F" + ]; + blck_Pistols_blue = blck_Pistols; + blck_Pistols_red = blck_Pistols; + blck_Pistols_green = blck_Pistols; + blck_Pistols_orange = blck_Pistols; + + blck_DLC_MMG = [ + "MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F" + ]; + + blck_DLC_Sniper = [ + "srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F" + ]; + blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"]; + + //This defines the random weapon to spawn on the AI + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons + blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG; + blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault_650 +blck_RifleLMG + blck_DLC_MMG + blck_apexWeapons; + blck_WeaponList_Blue = blck_RifleOther + blck_RifleAsault_556 +blck_RifleAsault_650; + blck_WeaponList_Red = blck_RifleAsault_556 + blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG; + + #ifdef useAPEX + + blck_WeaponList_Orange = blck_WeaponList_Orange + blck_apexWeapons; + blck_WeaponList_Green = blck_WeaponList_Green + blck_apexWeapons; + #endif + + blck_backpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ]; + blck_ApexBackpacks = [ + "B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F", + "B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F", + "B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F" + ]; + + #ifdef useAPEX + blck_backpacks = blck_backpacks + blck_ApexBackpacks; + #endif + blck_backpacks_blue = blck_backpacks; + blck_backpacks_red = blck_backpacks; + blck_backpacks_green = blck_backpacks; + blck_backpacks_orange = blck_backpacks; + + blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"]; + //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_headgear = [ + "H_Cap_blk", + "H_Cap_blk_Raven", + "H_Cap_blu", + "H_Cap_brn_SPECOPS", + "H_Cap_grn", + "H_Cap_headphones", + "H_Cap_khaki_specops_UK", + "H_Cap_oli", + "H_Cap_press", + "H_Cap_red", + "H_Cap_tan", + "H_Cap_tan_specops_US", + "H_Watchcap_blk", + "H_Watchcap_camo", + "H_Watchcap_khk", + "H_Watchcap_sgg", + "H_MilCap_blue", + "H_MilCap_dgtl", + "H_MilCap_mcamo", + "H_MilCap_ocamo", + "H_MilCap_oucamo", + "H_MilCap_rucamo", + "H_Bandanna_camo", + "H_Bandanna_cbr", + "H_Bandanna_gry", + "H_Bandanna_khk", + "H_Bandanna_khk_hs", + "H_Bandanna_mcamo", + "H_Bandanna_sgg", + "H_Bandanna_surfer", + "H_Booniehat_dgtl", + "H_Booniehat_dirty", + "H_Booniehat_grn", + "H_Booniehat_indp", + "H_Booniehat_khk", + "H_Booniehat_khk_hs", + "H_Booniehat_mcamo", + "H_Booniehat_tan", + "H_Hat_blue", + "H_Hat_brown", + "H_Hat_camo", + "H_Hat_checker", + "H_Hat_grey", + "H_Hat_tan", + "H_StrawHat", + "H_StrawHat_dark", + "H_Beret_02", + "H_Beret_blk", + "H_Beret_blk_POLICE", + "H_Beret_brn_SF", + "H_Beret_Colonel", + "H_Beret_grn", + "H_Beret_grn_SF", + "H_Beret_ocamo", + "H_Beret_red", + "H_Shemag_khk", + "H_Shemag_olive", + "H_Shemag_olive_hs", + "H_Shemag_tan", + "H_ShemagOpen_khk", + "H_ShemagOpen_tan", + "H_TurbanO_blk", + + //Apex + "H_MilCap_tna_F", + "H_MilCap_ghex_F", + "H_Booniehat_tna_F", + "H_Beret_gen_F", + "H_MilCap_gen_F", + "H_Cap_oli_Syndikat_F", + "H_Cap_tan_Syndikat_F", + "H_Cap_blk_Syndikat_F", + "H_Cap_grn_Syndikat_F" + ]; + blck_helmets = [ + "H_HelmetB", + "H_HelmetB_black", + "H_HelmetB_camo", + "H_HelmetB_desert", + "H_HelmetB_grass", + "H_HelmetB_light", + "H_HelmetB_light_black", + "H_HelmetB_light_desert", + "H_HelmetB_light_grass", + "H_HelmetB_light_sand", + "H_HelmetB_light_snakeskin", + "H_HelmetB_paint", + "H_HelmetB_plain_blk", + "H_HelmetB_sand", + "H_HelmetB_snakeskin", + "H_HelmetCrew_B", + "H_HelmetCrew_I", + "H_HelmetCrew_O", + "H_HelmetIA", + "H_HelmetIA_camo", + "H_HelmetIA_net", + "H_HelmetLeaderO_ocamo", + "H_HelmetLeaderO_oucamo", + "H_HelmetO_ocamo", + "H_HelmetO_oucamo", + "H_HelmetSpecB", + "H_HelmetSpecB_blk", + "H_HelmetSpecB_paint1", + "H_HelmetSpecB_paint2", + "H_HelmetSpecO_blk", + "H_HelmetSpecO_ocamo", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O", + "H_Helmet_Skate", + "H_HelmetB_TI_tna_F", + // Apex + //"H_HelmetO_ViperSP_hex_F", + //"H_HelmetO_ViperSP_ghex_F", + "H_HelmetB_tna_F", + "H_HelmetB_Enh_tna_F", + "H_HelmetB_Light_tna_F", + "H_HelmetSpecO_ghex_F", + "H_HelmetLeaderO_ghex_F", + "H_HelmetO_ghex_F", + "H_HelmetCrew_O_ghex_F" + ]; + blck_headgearList = blck_headgear + blck_helmets; + blck_headgear_blue = blck_headgearList; + blck_headgear_red = blck_headgearList; + blck_headgear_green = blck_headgearList; + blck_headgear_orange = blck_headgearList; + + //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_Male = [ + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Equipment + "U_AntigonaBody", + "U_AttisBody", + "U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","U_B_CombatUniform_mcam_vest","U_B_CombatUniform_mcam_worn","U_B_CombatUniform_sgg","U_B_CombatUniform_sgg_tshirt","U_B_CombatUniform_sgg_vest","U_B_CombatUniform_wdl","U_B_CombatUniform_wdl_tshirt","U_B_CombatUniform_wdl_vest", + "U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3", + "U_B_GhillieSuit", + "U_B_HeliPilotCoveralls","U_B_PilotCoveralls", + "U_B_SpecopsUniform_sgg", + "U_B_survival_uniform", + "U_B_Wetsuit", + //"U_BasicBody", + "U_BG_Guerilla1_1","U_BG_Guerilla2_1","U_BG_Guerilla2_2","U_BG_Guerilla2_3","U_BG_Guerilla3_1","U_BG_Guerilla3_2", + "U_BG_leader", + "U_C_Commoner_shorts","U_C_Commoner1_1","U_C_Commoner1_2","U_C_Commoner1_3","U_C_Commoner2_1","U_C_Commoner2_2","U_C_Commoner2_3", + "U_C_Farmer","U_C_Fisherman","U_C_FishermanOveralls","U_C_HunterBody_brn","U_C_HunterBody_grn", + //"U_C_Journalist", + "U_C_Novak", + //"U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour", + "U_C_Poor_1","U_C_Poor_2","U_C_Poor_shorts_1","U_C_Poor_shorts_2","U_C_PriestBody","U_C_Scavenger_1","U_C_Scavenger_2", + //"U_C_Scientist","U_C_ShirtSurfer_shorts","U_C_TeeSurfer_shorts_1","U_C_TeeSurfer_shorts_2", + "U_C_WorkerCoveralls","U_C_WorkerOveralls","U_Competitor", + "U_I_CombatUniform","U_I_CombatUniform_shortsleeve","U_I_CombatUniform_tshirt","U_I_G_resistanceLeader_F", + "U_I_G_Story_Protagonist_F", + "U_I_GhillieSuit", + "U_I_HeliPilotCoveralls", + "U_I_OfficerUniform", + "U_I_pilotCoveralls", + "U_I_Wetsuit", + "U_IG_Guerilla1_1","U_IG_Guerilla2_1","U_IG_Guerilla2_2","U_IG_Guerilla2_3","U_IG_Guerilla3_1","U_IG_Guerilla3_2", + "U_IG_leader", + "U_IG_Menelaos", + //"U_KerryBody", + //"U_MillerBody", + //"U_NikosAgedBody", + //"U_NikosBody", + "U_O_CombatUniform_ocamo","U_O_CombatUniform_oucamo", + "U_O_GhillieSuit", + "U_O_OfficerUniform_ocamo", + "U_O_PilotCoveralls", + "U_O_SpecopsUniform_blk", + "U_O_SpecopsUniform_ocamo", + "U_O_Wetsuit", + "U_OG_Guerilla1_1","U_OG_Guerilla2_1","U_OG_Guerilla2_2","U_OG_Guerilla2_3","U_OG_Guerilla3_1","U_OG_Guerilla3_2","U_OG_leader", + //"U_OI_Scientist", + //"U_OrestesBody", + "U_Rangemaster", + // DLC + "U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh", + //Apex + "U_B_T_Soldier_F", + "U_B_T_Soldier_AR_F", + "U_B_T_Soldier_SL_F", + //"U_B_T_Sniper_F", + //"U_B_T_FullGhillie_tna_F", + "U_B_CTRG_Soldier_F", + "U_B_CTRG_Soldier_2_F", + "U_B_CTRG_Soldier_3_F", + "U_B_GEN_Soldier_F", + "U_B_GEN_Commander_F", + "U_O_T_Soldier_F", + "U_O_T_Officer_F", + //"U_O_T_Sniper_F", + //"U_O_T_FullGhillie_tna_F", + "U_O_V_Soldier_Viper_F", + "U_O_V_Soldier_Viper_hex_F", + "U_I_C_Soldier_Para_1_F", + "U_I_C_Soldier_Para_2_F", + "U_I_C_Soldier_Para_3_F", + "U_I_C_Soldier_Para_4_F", + "U_I_C_Soldier_Para_5_F", + "U_I_C_Soldier_Bandit_1_F", + "U_I_C_Soldier_Bandit_2_F", + "U_I_C_Soldier_Bandit_3_F", + "U_I_C_Soldier_Bandit_4_F", + "U_I_C_Soldier_Bandit_5_F", + "U_I_C_Soldier_Camo_F", + "U_C_man_sport_1_F", + "U_C_man_sport_2_F", + "U_C_man_sport_3_F", + "U_C_Man_casual_1_F", + "U_C_Man_casual_2_F", + "U_C_Man_casual_3_F", + "U_C_Man_casual_4_F", + "U_C_Man_casual_5_F", + "U_C_Man_casual_6_F", + "U_B_CTRG_Soldier_urb_1_F", + "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_SkinList_blue = blck_SkinList; + blck_SkinList_red = blck_SkinList; + blck_SkinList_green = blck_SkinList; + blck_SkinList_orange = blck_SkinList; + + 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", + // DLC Vests + "V_PlateCarrierSpec_blk","V_PlateCarrierSpec_mtp","V_PlateCarrierGL_blk","V_PlateCarrierGL_mtp","V_PlateCarrierIAGL_oli" + ]; + blck_vests_blue = blck_vests; + blck_vests_red = blck_vests; + blck_vests_green = blck_vests; + blck_vests_orange = blck_vests; + + //CraftingFood + blck_Meats=[ + "SnakeCarcass_EPOCH","RabbitCarcass_EPOCH","ChickenCarcass_EPOCH","GoatCarcass_EPOCH","SheepCarcass_EPOCH","DogCarcass_EPOCH","ItemTrout","ItemSeaBass","ItemTuna" + ]; + blck_Drink = [ + "WhiskeyNoodle","ItemSodaAlpineDude","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","ItemSodaRbull","FoodWalkNSons" + ]; + blck_Food = [ + "HotAxeSauce_epoch","gyro_wrap_epoch","icecream_epoch","redburger_epoch","bluburger_epoch","krypto_candy_epoch","ItemBakedBeans","ItemRiceBox","ItemPowderMilk","ItemCereals", + "FoodBioMeat","FoodMeeps","FoodSnooter","sardines_epoch","meatballs_epoch","scam_epoch","sweetcorn_epoch","honey_epoch","CookedSheep_EPOCH","CookedGoat_EPOCH","SnakeMeat_EPOCH", + "CookedRabbit_EPOCH","CookedChicken_EPOCH","CookedDog_EPOCH","ItemTroutCooked","ItemSeaBassCooked","ItemTunaCooked","TacticalBacon" + ]; + 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"]; + blck_explosives = blck_throwableExplosives + blck_otherExplosives; + blck_medicalItems = ["FAK", "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "caffeinepills_epoch", "orlistat_epoch", "ItemCanteen_Empty", "ItemCanteen_Clean", "ItemBottlePlastic_Empty", + "ItemBottlePlastic_Clean", "atropine_epoch", "ItemWaterPurificationTablets", "ItemPainKillers", "ItemDefibrillator", + "ItemBloodBag_Empty", "ItemBloodBag_Full", "ItemAntibiotic", "nanite_cream_epoch", "nanite_pills_epoch"]; + blck_specialItems = blck_throwableExplosives + blck_medicalItems; + blck_NVG = ["NVG_EPOCH"]; + blck_epochValuables = ["PartOreGold","PartOreSilver","PartOre","ItemGoldBar","ItemSilverBar", + "ItemGoldBar10oz","ItemTopaz","ItemOnyx","ItemSapphire","ItemAmethyst", + "ItemEmerald","ItemCitrine","ItemRuby","ItemQuartz","ItemJade", + "ItemGarnet","ItemKiloHemp"]; + blck_epochBuildingSupplies = ["PartPlankPack","ItemPlywoodPack","CinderBlocks","MortarBucket","ItemScraps", + "ItemCorrugated","ItemCorrugatedLg","CircuitParts","WoodLog_EPOCH","ItemRope","ItemStick","ItemRock","ItemBurlap","ItemBulb","ItemSolar","ItemCables","ItemBattery","Pelt_EPOCH","JackKit","ItemCanvas","ItemSeedBag","ItemPipe"]; + blck_epochVehicleRepair = ["EngineParts","FuelTank","SpareTire","ItemGlass", + "ItemDuctTape","VehicleRepair"]; + blck_buildingMaterials = blck_epochBuildingSupplies + blck_epochVehicleRepair; + +/*************************************************************************************** +DEFAULT CONTENTS OF LOOT CRATES FOR EACH MISSION +Note however that these configurations can be used in any way you like or replaced with mission-specific customized loot arrays +for examples of how you can do this see \Major\Compositions.sqf +***************************************************************************************/ + + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + blck_lootCountsOrange = [8,32,8,30,16,1]; // Orange + blck_lootCountsGreen = [7,24,6,16,18,1]; // Green + blck_lootCountsRed = [5,16,4,10,6,1]; // Red + blck_lootCountsBlue = [4,12,3,6,6,1]; // Blue + + blck_BoxLoot_Orange = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + ["MultiGun","EnergyPackLg"], + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["m107_EPOCH","5Rnd_127x108_Mag"], + ["m107Tan_EPOCH","5Rnd_127x108_Mag"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["MMG_01_tan_F","150Rnd_93x64_Mag"], + ["MMG_02_black_F","130Rnd_338_Mag"], + ["MMG_02_camo_F","130Rnd_338_Mag"], + ["MMG_02_sand_F","130Rnd_338_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"] + + ], + [//Magazines + ["3rnd_HE_Grenade_Shell",3,6], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",7,14], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,4], + ["EnergyPack",2,5], + // Marksman Pack Ammo + ["10Rnd_338_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + // Apex Ammo + ["130Rnd_338_Mag",1,3], + ["150Rnd_93x64_Mag",1,3] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// Materials and supplies + ["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",5,10], + ["PartPlankPack",10,19], + ["ItemLockbox",1,2], + ["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,4],["FAK",1,4],["VehicleRepair",1,3],["Rangefinder",1,3],["ItemJade",1,2],["ItemQuartz",1,2],["ItemRuby",1,2],["ItemSapphire",1,2], + ["ItemKiloHemp",1,2],["ItemRuby",1,2],["ItemSilverBar",1,2],["ItemEmerald",1,2],["ItemTopaz",1,2],["ItemOnyx",1,2],["ItemSapphire",1,2],["ItemAmethyst",1,2], + ["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], + "FAK" , "Towelette" , "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "caffeinepills_epoch", "orlistat_epoch", "ItemCanteen_Empty", "ItemCanteen_Clean", "ItemBottlePlastic_Empty", + "ItemBottlePlastic_Clean", "atropine_epoch", "ItemWaterPurificationTablets", "ItemPainKillers", "ItemDefibrillator", + "ItemBloodBag_Empty", "ItemBloodBag_Full", "ItemAntibiotic", "nanite_cream_epoch", "nanite_pills_epoch" + ], + [ // Backpacks + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_ocamo",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2],["B_FieldPack_blk",1,2], + ["B_FieldPack_cbr",1,2],["B_FieldPack_khk",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oli",1,2],["B_FieldPack_oucamo",1,2],["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2], + ["B_Kitbag_rgr",1,2],["B_Kitbag_sgg",1,2],["B_Parachute",1,2],["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2], + ["B_TacticalPack_rgr",1,2],["smallbackpack_red_epoch",1,2],["smallbackpack_green_epoch",1,2],["smallbackpack_teal_epoch",1,2],["smallbackpack_pink_epoch",1,2] + ] + ]; + + blck_BoxLoot_Green = + [ + [// Weapons + // Format is ["Weapon Name","Magazine Name"], + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + ["MultiGun","EnergyPackLg"], + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["m107_EPOCH","5Rnd_127x108_Mag"], + ["m107Tan_EPOCH","5Rnd_127x108_Mag"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["MMG_01_tan_F","150Rnd_93x64_Mag"], + ["MMG_02_black_F","130Rnd_338_Mag"], + ["MMG_02_camo_F","130Rnd_338_Mag"], + ["MMG_02_sand_F","130Rnd_338_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"] + + ], + [//Magazines + // Format is ["Magazine name, Minimum number to add, Maximum number to add], + ["3rnd_HE_Grenade_Shell",2,4], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",6,12], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,3], + ["EnergyPack",2,5], + // Marksman Pack Ammo + ["10Rnd_338_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + // Apex Ammo + ["130Rnd_338_Mag",1,3], + ["150Rnd_93x64_Mag",1,3] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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",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",5,10], + ["PartPlankPack",10,19], + ["ItemLockbox",1,2], + ["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 + // Format is ["Item name, Minimum number to add, Maximum number to add], + ["Heal_EPOCH",1,2],["Defib_EPOCH",1,2],["Repair_EPOCH",1,2],["FAK",1,2],["FAK",1,2],["FAK",1,2],["FAK",1,2],["FAK",1,2],["FAK",1,2],["VehicleRepair",1,3],["Rangefinder",1,3], + ["ItemKiloHemp",1,2],["ItemRuby",1,2],["ItemSilverBar",1,2],["ItemGoldBar10oz",1,2], + ["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], + "FAK" , "Towelette" , "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "caffeinepills_epoch", "orlistat_epoch", "ItemCanteen_Empty", "ItemCanteen_Clean", "ItemBottlePlastic_Empty", + "ItemBottlePlastic_Clean", "atropine_epoch", "ItemWaterPurificationTablets", "ItemPainKillers", "ItemDefibrillator", + "ItemBloodBag_Empty", "ItemBloodBag_Full", "ItemAntibiotic", "nanite_cream_epoch", "nanite_pills_epoch" + ], + [ // Backpacks + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_ocamo",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2],["B_FieldPack_blk",1,2], + ["B_FieldPack_cbr",1,2],["B_FieldPack_khk",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oli",1,2],["B_FieldPack_oucamo",1,2],["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2], + ["B_Kitbag_rgr",1,2],["B_Kitbag_sgg",1,2],["B_Parachute",1,2],["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2], + ["B_TacticalPack_rgr",1,2],["smallbackpack_red_epoch",1,2],["smallbackpack_green_epoch",1,2],["smallbackpack_teal_epoch",1,2],["smallbackpack_pink_epoch",1,2] + ] + ]; + + blck_BoxLoot_Blue = + [ + [// Weapons + ["MultiGun","EnergyPackLg"], + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["m16_EPOCH","30Rnd_556x45_Stanag"], + ["m16Red_EPOCH","30Rnd_556x45_Stanag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["m4a3_EPOCH","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["m107_EPOCH","5Rnd_127x108_Mag"], + ["m107Tan_EPOCH","5Rnd_127x108_Mag"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["m249_EPOCH","200Rnd_556x45_M249"], + ["m249Tan_EPOCH","200Rnd_556x45_M249"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"] + ], + [//Magazines + ["3rnd_HE_Grenade_Shell",1,2], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",3,10], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,4], + ["HandGrenade",1,3], + ["EnergyPack",2,5], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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",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",5,10], + ["PartPlankPack",10,19], + ["ItemLockbox",1,2], + ["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], + ["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], + "FAK" , "Towelette" , "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "caffeinepills_epoch", "orlistat_epoch", "ItemCanteen_Empty", "ItemCanteen_Clean", "ItemBottlePlastic_Empty", + "ItemBottlePlastic_Clean", "atropine_epoch", "ItemWaterPurificationTablets", "ItemPainKillers", "ItemDefibrillator", + "ItemBloodBag_Empty", "ItemBloodBag_Full", "ItemAntibiotic", "nanite_cream_epoch" + ], + [ // 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], + ["B_Carryall_cbr",0,2],["B_Carryall_khk",0,2],["B_Carryall_mcamo",0,2],["B_Carryall_ocamo",0,2],["B_Carryall_oli",0,2],["B_Carryall_oucamo",0,2],["B_FieldPack_blk",0,2], + ["B_FieldPack_cbr",0,2],["B_FieldPack_khk",0,2],["B_FieldPack_ocamo",0,2],["B_FieldPack_oli",0,2],["B_FieldPack_oucamo",0,2],["B_Kitbag_cbr",0,2],["B_Kitbag_mcamo",0,2], + ["B_Kitbag_rgr",0,2],["B_Kitbag_sgg",0,2],["B_Parachute",0,2],["B_TacticalPack_blk",0,2],["B_TacticalPack_mcamo",0,2],["B_TacticalPack_ocamo",0,2],["B_TacticalPack_oli",0,2], + ["B_TacticalPack_rgr",0,2],["smallbackpack_red_epoch",0,2],["smallbackpack_green_epoch",0,2],["smallbackpack_teal_epoch",0,2],["smallbackpack_pink_epoch",0,2] + ] + ]; + + blck_BoxLoot_Red = + [ + [// Weapons + ["MultiGun","EnergyPackLg"], + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + //["arifle_MX_SW_Black_Hamr_pointer_F","100Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["m16_EPOCH","30Rnd_556x45_Stanag"], + ["m16Red_EPOCH","30Rnd_556x45_Stanag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["m4a3_EPOCH","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["m107_EPOCH","5Rnd_127x108_Mag"], + ["m107Tan_EPOCH","5Rnd_127x108_Mag"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["m249_EPOCH","200Rnd_556x45_M249"], + ["m249Tan_EPOCH","200Rnd_556x45_M249"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + ], + [//Magazines + + ["3rnd_HE_Grenade_Shell",1,5],["30Rnd_65x39_caseless_green",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_45ACP_Mag_SMG_01",3,6],["20Rnd_556x45_UW_mag",3,6], + ["10Rnd_762x51_Mag",3,6],["20Rnd_762x51_Mag",3,7],["200Rnd_65x39_cased_Box",3,6],["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,2],["HandGrenade",1,3],["EnergyPack",2,5], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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",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",5,10], + ["PartPlankPack",10,19], + ["ItemLockbox",1,2], + ["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],["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], + "FAK" , "Towelette" , "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "caffeinepills_epoch", "orlistat_epoch", "ItemCanteen_Empty", "ItemCanteen_Clean", "ItemBottlePlastic_Empty", + "ItemBottlePlastic_Clean", "atropine_epoch", "ItemWaterPurificationTablets", "ItemPainKillers", "ItemDefibrillator", + "ItemBloodBag_Empty", "ItemBloodBag_Full", "ItemAntibiotic", "nanite_cream_epoch", "nanite_pills_epoch" + ], + [ // 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], + ["B_Carryall_cbr",0,2],["B_Carryall_khk",0,2],["B_Carryall_mcamo",0,2],["B_Carryall_ocamo",0,2],["B_Carryall_oli",0,2],["B_Carryall_oucamo",0,2],["B_FieldPack_blk",0,2], + ["B_FieldPack_cbr",0,2],["B_FieldPack_khk",0,2],["B_FieldPack_ocamo",0,2],["B_FieldPack_oli",0,2],["B_FieldPack_oucamo",0,2],["B_Kitbag_cbr",0,2],["B_Kitbag_mcamo",0,2], + ["B_Kitbag_rgr",0,2],["B_Kitbag_sgg",0,2],["B_Parachute",0,2],["B_TacticalPack_blk",0,2],["B_TacticalPack_mcamo",0,2],["B_TacticalPack_ocamo",0,2],["B_TacticalPack_oli",0,2], + ["B_TacticalPack_rgr",0,2],["smallbackpack_red_epoch",0,2],["smallbackpack_green_epoch",0,2],["smallbackpack_teal_epoch",0,2],["smallbackpack_pink_epoch",0,2] + ] + ]; + +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. + +diag_log "[blckeagls] Configurations for Epoch Loaded"; + diff --git a/Server/@GMS/addons/custom_server/Configs/blck_configs_epoch_mil.sqf b/Server/@GMS/addons/custom_server/Configs/blck_configs_epoch_mil.sqf new file mode 100644 index 0000000..9014f7f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_configs_epoch_mil.sqf @@ -0,0 +1,996 @@ +/* + + 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"; + +//////////// +// Epoch-specific settings +//////////// + + // list of locations that are protected against mission spawns + + switch (toLower(worldName)) do + { + case "altis": { + blck_locationBlackList append [ + //Add location as [[xpos,ypos,0],minimumDistance], + // Note that there should not be a comma after the last item in this table + [[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched. + ]; + }; + case "tanoa": { + blck_locationBlackList append [ ]; + }; + }; + +/********************************************************************************* + +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_maximumItemPriceInAI_Loadouts = 100; + + 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; + blck_AIPatrolVehiclesGreen = blck_AIPatrolVehicles; + blck_AIPatrolVehiclesOrange = blck_AIPatrolVehicles; + + 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_mlrs_base_F", + "B_MBT_01_mlrs_F", + "B_MBT_01_TUSK_F", + "B_APC_Tracked_01_AA_F", + "B_APC_Tracked_01_CRV_F", + "B_APC_Tracked_01_rcws_F" + ]; // Type of vehicle spawned to defend AI bases + // Blacklisted itesm + blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"]; + + // AI Weapons and Attachments + blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"]; + + blck_Optics_Holo = ["optic_Hamr","optic_MRD","optic_Holosight","optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_ACO_grn_smg","optic_Aco_smg","optic_Yorris"]; + blck_Optics_Reticule = ["optic_Arco","optic_MRCO"]; + blck_Optics_Scopes = [ + "optic_AMS","optic_AMS_khk","optic_AMS_snd", + "optic_DMS", + "optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan", + "optic_LRPS", + "optic_Nightstalker", + "optic_NVS", + "optic_SOS", + "optic_tws", + "optic_tws_mg" + ]; + blck_Optics_Apex = [ + //Apex + "optic_Arco_blk_F", "optic_Arco_ghex_F", + "optic_DMS_ghex_F", + "optic_Hamr_khk_F", + "optic_ERCO_blk_F","optic_ERCO_khk_F","optic_ERCO_snd_F", + "optic_SOS_khk_F", + "optic_LRPS_tna_F","optic_LRPS_ghex_F", + "optic_Holosight_blk_F","optic_Holosight_khk_F","optic_Holosight_smg_blk_F" + ]; + blck_Optics = blck_Optics_Holo + blck_Optics_Reticule + blck_Optics_Scopes; + + #ifdef useAPEX + blck_Optics = blck_Optics + blck_Optics_Apex; + #endif + blck_bipods = [ + "bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli", + //Apex + "bipod_01_F_khk" + ]; + + blck_silencers = [ + "muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand","muzzle_snds_93mmg","muzzle_snds_93mmg_tan","muzzle_snds_acp","muzzle_snds_B", + "muzzle_snds_H","muzzle_snds_H_MG","muzzle_snds_H_SW","muzzle_snds_L","muzzle_snds_M", + //Apex + "muzzle_snds_H_khk_F","muzzle_snds_H_snd_F","muzzle_snds_58_blk_F","muzzle_snds_m_khk_F","muzzle_snds_m_snd_F","muzzle_snds_B_khk_F","muzzle_snds_B_snd_F", + "muzzle_snds_58_wdm_F","muzzle_snds_65_TI_blk_F","muzzle_snds_65_TI_hex_F","muzzle_snds_65_TI_ghex_F","muzzle_snds_H_MG_blk_F","muzzle_snds_H_MG_khk_F" + ]; + + blck_RifleSniper = [ + "srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F" + ]; + + blck_RifleAsault_556 = [ + "arifle_SDAR_F","arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F","arifle_SDAR_F" + ]; + + blck_RifleAsault_650 = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F" + ]; + + blck_RifleAsault = blck_RifleAsault_556 + blck_RifleAsault_650; + + blck_RifleLMG = [ + "LMG_Mk200_F","LMG_Zafir_F" + ]; + + blck_RifleOther = [ + "SMG_01_F","SMG_02_F" + ]; + + blck_Pistols = [ + "hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F" + ]; + blck_Pistols_blue = blck_Pistols; + blck_Pistols_red = blck_Pistols; + blck_Pistols_green = blck_Pistols; + blck_Pistols_orange = blck_Pistols; + + blck_DLC_MMG = [ + "MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F" + ]; + + blck_DLC_Sniper = [ + "srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F" + ]; + blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"]; + + //This defines the random weapon to spawn on the AI + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons + blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG; + blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault_650 +blck_RifleLMG + blck_DLC_MMG + blck_apexWeapons; + blck_WeaponList_Blue = blck_RifleOther + blck_RifleAsault_556 +blck_RifleAsault_650; + blck_WeaponList_Red = blck_RifleAsault_556 + blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG; + + #ifdef useAPEX + + blck_WeaponList_Orange = blck_WeaponList_Orange + blck_apexWeapons; + blck_WeaponList_Green = blck_WeaponList_Green + blck_apexWeapons; + #endif + + blck_backpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ]; + blck_ApexBackpacks = [ + "B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F", + "B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F", + "B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F" + ]; + + #ifdef useAPEX + blck_backpacks = blck_backpacks + blck_ApexBackpacks; + #endif + blck_backpacks_blue = blck_backpacks; + blck_backpacks_red = blck_backpacks; + blck_backpacks_green = blck_backpacks; + blck_backpacks_orange = blck_backpacks; + + blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"]; + //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_headgear = [ + "H_Cap_blk", + "H_Cap_blk_Raven", + "H_Cap_blu", + "H_Cap_brn_SPECOPS", + "H_Cap_grn", + "H_Cap_headphones", + "H_Cap_khaki_specops_UK", + "H_Cap_oli", + "H_Cap_press", + "H_Cap_red", + "H_Cap_tan", + "H_Cap_tan_specops_US", + "H_Watchcap_blk", + "H_Watchcap_camo", + "H_Watchcap_khk", + "H_Watchcap_sgg", + "H_MilCap_blue", + "H_MilCap_dgtl", + "H_MilCap_mcamo", + "H_MilCap_ocamo", + "H_MilCap_oucamo", + "H_MilCap_rucamo", + "H_Bandanna_camo", + "H_Bandanna_cbr", + "H_Bandanna_gry", + "H_Bandanna_khk", + "H_Bandanna_khk_hs", + "H_Bandanna_mcamo", + "H_Bandanna_sgg", + "H_Bandanna_surfer", + "H_Booniehat_dgtl", + "H_Booniehat_dirty", + "H_Booniehat_grn", + "H_Booniehat_indp", + "H_Booniehat_khk", + "H_Booniehat_khk_hs", + "H_Booniehat_mcamo", + "H_Booniehat_tan", + "H_Hat_blue", + "H_Hat_brown", + "H_Hat_camo", + "H_Hat_checker", + "H_Hat_grey", + "H_Hat_tan", + "H_StrawHat", + "H_StrawHat_dark", + "H_Beret_02", + "H_Beret_blk", + "H_Beret_blk_POLICE", + "H_Beret_brn_SF", + "H_Beret_Colonel", + "H_Beret_grn", + "H_Beret_grn_SF", + "H_Beret_ocamo", + "H_Beret_red", + "H_Shemag_khk", + "H_Shemag_olive", + "H_Shemag_olive_hs", + "H_Shemag_tan", + "H_ShemagOpen_khk", + "H_ShemagOpen_tan", + "H_TurbanO_blk", + + //Apex + "H_MilCap_tna_F", + "H_MilCap_ghex_F", + "H_Booniehat_tna_F", + "H_Beret_gen_F", + "H_MilCap_gen_F", + "H_Cap_oli_Syndikat_F", + "H_Cap_tan_Syndikat_F", + "H_Cap_blk_Syndikat_F", + "H_Cap_grn_Syndikat_F" + ]; + blck_helmets = [ + "H_HelmetB", + "H_HelmetB_black", + "H_HelmetB_camo", + "H_HelmetB_desert", + "H_HelmetB_grass", + "H_HelmetB_light", + "H_HelmetB_light_black", + "H_HelmetB_light_desert", + "H_HelmetB_light_grass", + "H_HelmetB_light_sand", + "H_HelmetB_light_snakeskin", + "H_HelmetB_paint", + "H_HelmetB_plain_blk", + "H_HelmetB_sand", + "H_HelmetB_snakeskin", + "H_HelmetCrew_B", + "H_HelmetCrew_I", + "H_HelmetCrew_O", + "H_HelmetIA", + "H_HelmetIA_camo", + "H_HelmetIA_net", + "H_HelmetLeaderO_ocamo", + "H_HelmetLeaderO_oucamo", + "H_HelmetO_ocamo", + "H_HelmetO_oucamo", + "H_HelmetSpecB", + "H_HelmetSpecB_blk", + "H_HelmetSpecB_paint1", + "H_HelmetSpecB_paint2", + "H_HelmetSpecO_blk", + "H_HelmetSpecO_ocamo", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O", + "H_Helmet_Skate", + "H_HelmetB_TI_tna_F", + // Apex + //"H_HelmetO_ViperSP_hex_F", + //"H_HelmetO_ViperSP_ghex_F", + "H_HelmetB_tna_F", + "H_HelmetB_Enh_tna_F", + "H_HelmetB_Light_tna_F", + "H_HelmetSpecO_ghex_F", + "H_HelmetLeaderO_ghex_F", + "H_HelmetO_ghex_F", + "H_HelmetCrew_O_ghex_F" + ]; + blck_headgearList = blck_headgear + blck_helmets; + blck_headgear_blue = blck_headgearList; + blck_headgear_red = blck_headgearList; + blck_headgear_green = blck_headgearList; + blck_headgear_orange = blck_headgearList; + + //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 = [ + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Equipment + "U_AntigonaBody", + "U_AttisBody", + "U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","U_B_CombatUniform_mcam_vest","U_B_CombatUniform_mcam_worn","U_B_CombatUniform_sgg","U_B_CombatUniform_sgg_tshirt","U_B_CombatUniform_sgg_vest","U_B_CombatUniform_wdl","U_B_CombatUniform_wdl_tshirt","U_B_CombatUniform_wdl_vest", + "U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3", + "U_B_GhillieSuit", + "U_B_HeliPilotCoveralls","U_B_PilotCoveralls", + "U_B_SpecopsUniform_sgg", + "U_B_survival_uniform", + "U_B_Wetsuit", + //"U_BasicBody", + "U_BG_Guerilla1_1","U_BG_Guerilla2_1","U_BG_Guerilla2_2","U_BG_Guerilla2_3","U_BG_Guerilla3_1","U_BG_Guerilla3_2", + "U_BG_leader", + "U_C_Commoner_shorts","U_C_Commoner1_1","U_C_Commoner1_2","U_C_Commoner1_3","U_C_Commoner2_1","U_C_Commoner2_2","U_C_Commoner2_3", + "U_C_Farmer","U_C_Fisherman","U_C_FishermanOveralls","U_C_HunterBody_brn","U_C_HunterBody_grn", + //"U_C_Journalist", + "U_C_Novak", + //"U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour", + "U_C_Poor_1","U_C_Poor_2","U_C_Poor_shorts_1","U_C_Poor_shorts_2","U_C_PriestBody","U_C_Scavenger_1","U_C_Scavenger_2", + //"U_C_Scientist","U_C_ShirtSurfer_shorts","U_C_TeeSurfer_shorts_1","U_C_TeeSurfer_shorts_2", + "U_C_WorkerCoveralls","U_C_WorkerOveralls","U_Competitor", + "U_I_CombatUniform","U_I_CombatUniform_shortsleeve","U_I_CombatUniform_tshirt","U_I_G_resistanceLeader_F", + "U_I_G_Story_Protagonist_F", + "U_I_GhillieSuit", + "U_I_HeliPilotCoveralls", + "U_I_OfficerUniform", + "U_I_pilotCoveralls", + "U_I_Wetsuit", + "U_IG_Guerilla1_1","U_IG_Guerilla2_1","U_IG_Guerilla2_2","U_IG_Guerilla2_3","U_IG_Guerilla3_1","U_IG_Guerilla3_2", + "U_IG_leader", + "U_IG_Menelaos", + //"U_KerryBody", + //"U_MillerBody", + //"U_NikosAgedBody", + //"U_NikosBody", + "U_O_CombatUniform_ocamo","U_O_CombatUniform_oucamo", + "U_O_GhillieSuit", + "U_O_OfficerUniform_ocamo", + "U_O_PilotCoveralls", + "U_O_SpecopsUniform_blk", + "U_O_SpecopsUniform_ocamo", + "U_O_Wetsuit", + "U_OG_Guerilla1_1","U_OG_Guerilla2_1","U_OG_Guerilla2_2","U_OG_Guerilla2_3","U_OG_Guerilla3_1","U_OG_Guerilla3_2","U_OG_leader", + //"U_OI_Scientist", + //"U_OrestesBody", + "U_Rangemaster", + // DLC + "U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh", + //Apex + "U_B_T_Soldier_F", + "U_B_T_Soldier_AR_F", + "U_B_T_Soldier_SL_F", + //"U_B_T_Sniper_F", + //"U_B_T_FullGhillie_tna_F", + "U_B_CTRG_Soldier_F", + "U_B_CTRG_Soldier_2_F", + "U_B_CTRG_Soldier_3_F", + "U_B_GEN_Soldier_F", + "U_B_GEN_Commander_F", + "U_O_T_Soldier_F", + "U_O_T_Officer_F", + //"U_O_T_Sniper_F", + //"U_O_T_FullGhillie_tna_F", + "U_O_V_Soldier_Viper_F", + "U_O_V_Soldier_Viper_hex_F", + "U_I_C_Soldier_Para_1_F", + "U_I_C_Soldier_Para_2_F", + "U_I_C_Soldier_Para_3_F", + "U_I_C_Soldier_Para_4_F", + "U_I_C_Soldier_Para_5_F", + "U_I_C_Soldier_Bandit_1_F", + "U_I_C_Soldier_Bandit_2_F", + "U_I_C_Soldier_Bandit_3_F", + "U_I_C_Soldier_Bandit_4_F", + "U_I_C_Soldier_Bandit_5_F", + "U_I_C_Soldier_Camo_F", + "U_C_man_sport_1_F", + "U_C_man_sport_2_F", + "U_C_man_sport_3_F", + "U_C_Man_casual_1_F", + "U_C_Man_casual_2_F", + "U_C_Man_casual_3_F", + "U_C_Man_casual_4_F", + "U_C_Man_casual_5_F", + "U_C_Man_casual_6_F", + "U_B_CTRG_Soldier_urb_1_F", + "U_B_CTRG_Soldier_urb_2_F", + "U_B_CTRG_Soldier_urb_3_F" + ]; + blck_SkinList_blue = blck_SkinList; + blck_SkinList_red = blck_SkinList; + blck_SkinList_green = blck_SkinList; + blck_SkinList_orange = blck_SkinList; + + 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", + // DLC Vests + "V_PlateCarrierSpec_blk","V_PlateCarrierSpec_mtp","V_PlateCarrierGL_blk","V_PlateCarrierGL_mtp","V_PlateCarrierIAGL_oli" + ]; + blck_vests_blue = blck_vests; + blck_vests_red = blck_vests; + blck_vests_green = blck_vests; + blck_vests_orange = blck_vests; + + //CraftingFood + blck_Meats=[ + "SnakeCarcass_EPOCH","RabbitCarcass_EPOCH","ChickenCarcass_EPOCH","GoatCarcass_EPOCH","SheepCarcass_EPOCH","DogCarcass_EPOCH","ItemTrout","ItemSeaBass","ItemTuna" + ]; + blck_Drink = [ + "WhiskeyNoodle","ItemSodaAlpineDude","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","ItemSodaRbull","FoodWalkNSons" + ]; + blck_Food = [ + "HotAxeSauce_epoch","gyro_wrap_epoch","icecream_epoch","redburger_epoch","bluburger_epoch","krypto_candy_epoch","ItemBakedBeans","ItemRiceBox","ItemPowderMilk","ItemCereals", + "FoodBioMeat","FoodMeeps","FoodSnooter","sardines_epoch","meatballs_epoch","scam_epoch","sweetcorn_epoch","honey_epoch","CookedSheep_EPOCH","CookedGoat_EPOCH","SnakeMeat_EPOCH", + "CookedRabbit_EPOCH","CookedChicken_EPOCH","CookedDog_EPOCH","ItemTroutCooked","ItemSeaBassCooked","ItemTunaCooked","TacticalBacon" + ]; + 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"]; + blck_explosives = blck_throwableExplosives + blck_otherExplosives; + blck_medicalItems = ["FAK"]; + blck_specialItems = blck_throwableExplosives + blck_medicalItems; + blck_medicalItems = ["FAK","ItemVitamins","morphine_epoch","iodide_pills_epoch","adrenaline_epoch","caffeinepills_epoch","orlistat_epoch", + "atropine_epoch","ItemWaterPurificationTablets","ItemPainKillers"," ItemDefibrillator ","ItemBloodBag_Empty", + "ItemBloodBag_Full","ItemAntibiotic","nanite_cream_epoch ","nanite_gun_epoch","nanite_pills_epoch"]; + blck_epochValuables = ["PartOreGold","PartOreSilver","PartOre","ItemGoldBar","ItemSilverBar", + "ItemGoldBar10oz","ItemTopaz","ItemOnyx","ItemSapphire","ItemAmethyst", + "ItemEmerald","ItemCitrine","ItemRuby","ItemQuartz","ItemJade", + "ItemGarnet","ItemKiloHemp"]; + blck_epochBuildingSupplies = ["PartPlankPack","ItemPlywoodPack","CinderBlocks","MortarBucket","ItemScraps", + "ItemCorrugated","ItemCorrugatedLg","CircuitParts","WoodLog_EPOCH","ItemRope","ItemStick","ItemRock","ItemBurlap","ItemBulb","ItemSolar","ItemCables","ItemBattery","Pelt_EPOCH","JackKit","ItemCanvas","ItemSeedBag","ItemPipe"]; + blck_epochVehicleRepair = ["EngineParts","FuelTank","SpareTire","ItemGlass", + "ItemDuctTape","VehicleRepair"]; + blck_buildingMaterials = blck_epochBuildingSupplies + blck_epochVehicleRepair; +/*************************************************************************************** +DEFAULT CONTENTS OF LOOT CRATES FOR EACH MISSION +Note however that these configurations can be used in any way you like or replaced with mission-specific customized loot arrays +for examples of how you can do this see \Major\Compositions.sqf +***************************************************************************************/ + + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + blck_lootCountsOrange = [8,32,8,30,16,1]; // Orange + blck_lootCountsGreen = [7,24,6,16,18,1]; // Green + blck_lootCountsRed = [5,16,4,10,6,1]; // Red + blck_lootCountsBlue = [4,12,3,6,6,1]; // Blue + + blck_BoxLoot_Orange = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + ["MultiGun","EnergyPackLg"], + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["m107_EPOCH","5Rnd_127x108_Mag"], + ["m107Tan_EPOCH","5Rnd_127x108_Mag"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["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"] + + ], + [//Magazines + ["3rnd_HE_Grenade_Shell",3,6], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",7,14], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,4], + ["EnergyPack",2,5], + // Marksman Pack Ammo + ["10Rnd_338_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + // Apex Ammo + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// Materials and supplies + ["CinderBlocks",5,15], + ["jerrycan_epoch",1,2], + //["lighter_epoch",0,1], + ["CircuitParts",2,3], + ["WoodLog_EPOCH",5,10], + ["ItemCorrugatedLg",1,6], + ["ItemCorrugated",3,10], + ["ItemMixOil",1,2], + ["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] + ], + [//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], + ["ItemKiloHemp",1,2],["ItemRuby",1,2],["ItemSilverBar",1,2],["ItemEmerald",1,2],["ItemTopaz",1,2],["ItemOnyx",1,2],["ItemSapphire",1,2],["ItemAmethyst",1,2], + ["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] + ], + [ // Backpacks + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_ocamo",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2],["B_FieldPack_blk",1,2], + ["B_FieldPack_cbr",1,2],["B_FieldPack_khk",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oli",1,2],["B_FieldPack_oucamo",1,2],["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2], + ["B_Kitbag_rgr",1,2],["B_Kitbag_sgg",1,2],["B_Parachute",1,2],["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2], + ["B_TacticalPack_rgr",1,2],["smallbackpack_red_epoch",1,2],["smallbackpack_green_epoch",1,2],["smallbackpack_teal_epoch",1,2],["smallbackpack_pink_epoch",1,2] + ] + ]; + + blck_BoxLoot_Green = + [ + [// Weapons + // Format is ["Weapon Name","Magazine Name"], + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + ["MultiGun","EnergyPackLg"], + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["m107_EPOCH","5Rnd_127x108_Mag"], + ["m107Tan_EPOCH","5Rnd_127x108_Mag"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], + ["srifle_DMR_03_F","10Rnd_338_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + + ], + [//Magazines + // Format is ["Magazine name, Minimum number to add, Maximum number to add], + ["3rnd_HE_Grenade_Shell",2,4], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",6,12], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,3], + ["EnergyPack",2,5], + // Marksman Pack Ammo + ["10Rnd_338_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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], + ["jerrycan_epoch",1,2], + ["lighter_epoch",1,1], + ["CircuitParts",2,5], + ["WoodLog_EPOCH",10,20], + ["ItemCorrugatedLg",1,3], + ["ItemCorrugated",2,9], + ["ItemMixOil",1,2], + ["MortarBucket",3,6], + ["PartPlankPack",10,12], + ["ItemLockbox",1,3], + ["ItemSolar",1,2], + ["ItemCables",1,2], + ["ItemBattery",1,2], + ["Pelt_EPOCH",1,2], + ["EnergyPackLg",1,3] + ], + [//Items + // Format is ["Item name, Minimum number to add, Maximum number to add], + ["Heal_EPOCH",1,2],["Defib_EPOCH",1,2],["Repair_EPOCH",1,2],["FAK",1,2],["FAK",1,2],["FAK",1,2],["FAK",1,2],["FAK",1,2],["FAK",1,2],["VehicleRepair",1,3],["Rangefinder",1,3], + ["ItemKiloHemp",1,2],["ItemRuby",1,2],["ItemSilverBar",1,2],["ItemGoldBar10oz",1,2], + ["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] + ], + [ // Backpacks + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_ocamo",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2],["B_FieldPack_blk",1,2], + ["B_FieldPack_cbr",1,2],["B_FieldPack_khk",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oli",1,2],["B_FieldPack_oucamo",1,2],["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2], + ["B_Kitbag_rgr",1,2],["B_Kitbag_sgg",1,2],["B_Parachute",1,2],["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2], + ["B_TacticalPack_rgr",1,2],["smallbackpack_red_epoch",1,2],["smallbackpack_green_epoch",1,2],["smallbackpack_teal_epoch",1,2],["smallbackpack_pink_epoch",1,2] + ] + ]; + + blck_BoxLoot_Blue = + [ + [// Weapons + ["MultiGun","EnergyPackLg"], + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["m16_EPOCH","30Rnd_556x45_Stanag"], + ["m16Red_EPOCH","30Rnd_556x45_Stanag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["m4a3_EPOCH","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["m107_EPOCH","5Rnd_127x108_Mag"], + ["m107Tan_EPOCH","5Rnd_127x108_Mag"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["m249_EPOCH","200Rnd_556x45_M249"], + ["m249Tan_EPOCH","200Rnd_556x45_M249"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"] + ], + [//Magazines + ["3rnd_HE_Grenade_Shell",1,2], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",3,10], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,4], + ["HandGrenade",1,3], + ["EnergyPack",2,5], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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], + ["CircuitParts",2,3], + ["WoodLog_EPOCH",10,20], + ["ItemCorrugatedLg",0,4], + ["ItemCorrugated",3,6], + ["ItemMixOil",1,2], + ["MortarBucket",1,8], + ["PartPlankPack",10,12], + ["ItemLockbox",1,2], + ["EnergyPackLg",0,1] + ], + [//Items + ["Heal_EPOCH",1,2],["Defib_EPOCH",1,2],["Repair_EPOCH",1,2],["FAK",1,5],["VehicleRepair",1,5], + ["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] + ], + [ // 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], + ["B_Carryall_cbr",0,2],["B_Carryall_khk",0,2],["B_Carryall_mcamo",0,2],["B_Carryall_ocamo",0,2],["B_Carryall_oli",0,2],["B_Carryall_oucamo",0,2],["B_FieldPack_blk",0,2], + ["B_FieldPack_cbr",0,2],["B_FieldPack_khk",0,2],["B_FieldPack_ocamo",0,2],["B_FieldPack_oli",0,2],["B_FieldPack_oucamo",0,2],["B_Kitbag_cbr",0,2],["B_Kitbag_mcamo",0,2], + ["B_Kitbag_rgr",0,2],["B_Kitbag_sgg",0,2],["B_Parachute",0,2],["B_TacticalPack_blk",0,2],["B_TacticalPack_mcamo",0,2],["B_TacticalPack_ocamo",0,2],["B_TacticalPack_oli",0,2], + ["B_TacticalPack_rgr",0,2],["smallbackpack_red_epoch",0,2],["smallbackpack_green_epoch",0,2],["smallbackpack_teal_epoch",0,2],["smallbackpack_pink_epoch",0,2] + ] + ]; + + blck_BoxLoot_Red = + [ + [// Weapons + ["MultiGun","EnergyPackLg"], + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + //["arifle_MX_SW_Black_Hamr_pointer_F","100Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["m16_EPOCH","30Rnd_556x45_Stanag"], + ["m16Red_EPOCH","30Rnd_556x45_Stanag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["m4a3_EPOCH","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["M14_EPOCH","20Rnd_762x51_Mag"], + ["M14Grn_EPOCH","20Rnd_762x51_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["m107_EPOCH","5Rnd_127x108_Mag"], + ["m107Tan_EPOCH","5Rnd_127x108_Mag"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["m249_EPOCH","200Rnd_556x45_M249"], + ["m249Tan_EPOCH","200Rnd_556x45_M249"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + ], + [//Magazines + + ["3rnd_HE_Grenade_Shell",1,5],["30Rnd_65x39_caseless_green",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_45ACP_Mag_SMG_01",3,6],["20Rnd_556x45_UW_mag",3,6], + ["10Rnd_762x51_Mag",3,6],["20Rnd_762x51_Mag",3,7],["200Rnd_65x39_cased_Box",3,6],["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,2],["HandGrenade",1,3],["EnergyPack",2,5], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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], + ["ItemMixOil",1,2], + ["MortarBucket",2,5], + ["PartPlankPack",10,12], + ["ItemLockbox",1,2], + ["EnergyPackLg",0,1] + ], + [//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] + ], + [ // 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], + ["B_Carryall_cbr",0,2],["B_Carryall_khk",0,2],["B_Carryall_mcamo",0,2],["B_Carryall_ocamo",0,2],["B_Carryall_oli",0,2],["B_Carryall_oucamo",0,2],["B_FieldPack_blk",0,2], + ["B_FieldPack_cbr",0,2],["B_FieldPack_khk",0,2],["B_FieldPack_ocamo",0,2],["B_FieldPack_oli",0,2],["B_FieldPack_oucamo",0,2],["B_Kitbag_cbr",0,2],["B_Kitbag_mcamo",0,2], + ["B_Kitbag_rgr",0,2],["B_Kitbag_sgg",0,2],["B_Parachute",0,2],["B_TacticalPack_blk",0,2],["B_TacticalPack_mcamo",0,2],["B_TacticalPack_ocamo",0,2],["B_TacticalPack_oli",0,2], + ["B_TacticalPack_rgr",0,2],["smallbackpack_red_epoch",0,2],["smallbackpack_green_epoch",0,2],["smallbackpack_teal_epoch",0,2],["smallbackpack_pink_epoch",0,2] + ] + ]; + + 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. + + diag_log "[blckeagls] Configurations for Epoch Loaded"; + diff --git a/Server/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf b/Server/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf new file mode 100644 index 0000000..099a0b9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf @@ -0,0 +1,1195 @@ +/* + for ghostridergaming + By Ghostrider [GRG] + Copyright 2016 + Last Modified 3-14-17 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +#ifdef blck_milServer +if (true) exitWith +{ + diag_log "[blckeagls] running blck_configs_exile_mil for militarized servers"; + execVM "\q\addons\custom_server\Configs\blck_configs_exile_mil.sqf"; +}; +#endif +diag_log "[blckeagls] Loading Exile-specific configs for Non-militarized servers: blck_configs_exile.sqf"; +//////////// +// Exile-specific settings +//////////// + +// list of locations that are protected against mission spawns + +switch (toLower(worldName)) do +{ + case "altis": { + blck_locationBlackList append [ + //Add location as [[xpos,ypos,0],minimumDistance], + // Note that there should not be a comma after the last item in this table + [[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched. + ]; + }; + case "tanoa": { + blck_locationBlackList append [ ]; + }; +}; + +/********************************************************************************* + +AI WEAPONS, UNIFORMS, VESTS AND GEAR + +**********************************************************************************/ + + blck_blacklistSpawns = true; + blck_listConcreteMixerZones = true; + blck_AI_Side = EAST; + + blck_crateMoneyBlue = [100,250]; + blck_crateMoneyRed = [175, 300]; + blck_crateMoneyGreen = [300, 500]; + blck_crateMoneyOrange = [500, 750]; + + blck_maximumItemPriceInAI_Loadouts = 1000; + + 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_light_AT_ARMA3 = [ + "O_G_Offroad_01_AT_F", + "B_G_Offroad_01_AT_F", + "O_T_LSV_02_AT_F", + "O_LSV_02_AT_F", + "B_T_LSV_01_AT_F", + "B_LSV_01_AT_F" + ]; + blck_tracked_AA_ARMA3 = [ + "O_APC_Tracked_02_AA_F", + "B_APC_Tracked_01_AA_F" + ]; + blck_tracked_APC_ARMA3 = [ + "B_APC_Tracked_01_rcws_F", + "B_APC_Tracked_01_CRV_F", + "O_APC_Tracked_02_cannon_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" + ]; + #ifdef useCUP + 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"" + ]; + #endif + + 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" + ]; + + 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; + blck_AIPatrolVehiclesRed = blck_AIPatrolVehicles; + blck_AIPatrolVehiclesGreen = blck_AIPatrolVehicles; + blck_AIPatrolVehiclesOrange = blck_AIPatrolVehicles; + + // Blacklisted itesm + blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"]; + + // AI Weapons and Attachments + blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"]; + + blck_Optics_Holo = ["optic_Hamr","optic_MRD","optic_Holosight","optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_ACO_grn_smg","optic_Aco_smg","optic_Yorris"]; + blck_Optics_Reticule = ["optic_Arco","optic_MRCO"]; + blck_Optics_Scopes = [ + "optic_AMS","optic_AMS_khk","optic_AMS_snd", + "optic_DMS", + "optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan", + "optic_LRPS", + "optic_Nightstalker", + "optic_NVS", + "optic_SOS", + "optic_tws" + //"optic_tws_mg", + ]; + + #ifdef useAPEX + blck_Optics_Apex = [ + //Apex + "optic_Arco_blk_F", "optic_Arco_ghex_F", + "optic_DMS_ghex_F", + "optic_Hamr_khk_F", + "optic_ERCO_blk_F","optic_ERCO_khk_F","optic_ERCO_snd_F", + "optic_SOS_khk_F", + "optic_LRPS_tna_F","optic_LRPS_ghex_F", + "optic_Holosight_blk_F","optic_Holosight_khk_F","optic_Holosight_smg_blk_F" + ]; + blck_Optics = blck_Optics_Holo + blck_Optics_Reticule + blck_Optics_Scopes; + blck_Optics = blck_Optics + blck_Optics_Apex; + #endif + + blck_bipods = [ + "bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli", + //Apex + "bipod_01_F_khk" + ]; + + blck_silencers = [ + "muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand","muzzle_snds_93mmg","muzzle_snds_93mmg_tan","muzzle_snds_acp","muzzle_snds_B", + "muzzle_snds_H","muzzle_snds_H_MG","muzzle_snds_H_SW","muzzle_snds_L","muzzle_snds_M", + //Apex + "muzzle_snds_H_khk_F","muzzle_snds_H_snd_F","muzzle_snds_58_blk_F","muzzle_snds_m_khk_F","muzzle_snds_m_snd_F","muzzle_snds_B_khk_F","muzzle_snds_B_snd_F", + "muzzle_snds_58_wdm_F","muzzle_snds_65_TI_blk_F","muzzle_snds_65_TI_hex_F","muzzle_snds_65_TI_ghex_F","muzzle_snds_H_MG_blk_F","muzzle_snds_H_MG_khk_F" + ]; + + blck_RifleSniper = [ + "srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F" + ]; + + blck_RifleAsault_556 = [ + "arifle_SDAR_F","arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F","arifle_SDAR_F" + ]; + + blck_RifleAsault_650 = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F" + ]; + + blck_RifleAsault = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_SDAR_F", + "arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F" + ]; + + blck_RifleLMG = [ + "LMG_Mk200_F","LMG_Zafir_F" + ]; + + blck_RifleOther = [ + "SMG_01_F","SMG_02_F" + ]; + + blck_Pistols = [ + "hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F" + ]; + blck_Pistols_blue = blck_Pistols; + blck_Pistols_red = blck_Pistols; + blck_Pistols_green = blck_Pistols; + blck_Pistols_orange = blck_Pistols; + + blck_DLC_MMG = [ + "MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F" + ]; + + blck_DLC_Sniper = [ + "srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F" + ]; + + //This defines the random weapon to spawn on the AI + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons + blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG; + blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault_650 +blck_RifleLMG + blck_DLC_MMG; + blck_WeaponList_Blue = blck_RifleOther + blck_RifleAsault_556 + blck_RifleAsault_650; + blck_WeaponList_Red = blck_RifleAsault_556 + blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG; + + #ifdef useAPEX + blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"]; + + blck_WeaponList_Orange = blck_WeaponList_Orange + blck_apexWeapons; + blck_WeaponList_Green = blck_WeaponList_Green + blck_apexWeapons; + #endif + + blck_backpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ]; + + #ifdef useAPEX + blck_ApexBackpacks = [ + "B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F", + "B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F", + "B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F" + ]; + blck_backpacks = blck_ApexBackpacks + blck_backpacks; + #endif + blck_backpacks_blue = blck_backpacks; + blck_backpacks_red = blck_backpacks; + blck_backpacks_green = blck_backpacks; + blck_backpacks_orange = blck_backpacks; + + blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"]; + //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_headgear = [ + "H_Cap_blk", + "H_Cap_blk_Raven", + "H_Cap_blu", + "H_Cap_brn_SPECOPS", + "H_Cap_grn", + "H_Cap_headphones", + "H_Cap_khaki_specops_UK", + "H_Cap_oli", + "H_Cap_press", + "H_Cap_red", + "H_Cap_tan", + "H_Cap_tan_specops_US", + "H_Watchcap_blk", + "H_Watchcap_camo", + "H_Watchcap_khk", + "H_Watchcap_sgg", + "H_MilCap_blue", + "H_MilCap_dgtl", + "H_MilCap_mcamo", + "H_MilCap_ocamo", + "H_MilCap_oucamo", + "H_MilCap_rucamo", + "H_Bandanna_camo", + "H_Bandanna_cbr", + "H_Bandanna_gry", + "H_Bandanna_khk", + "H_Bandanna_khk_hs", + "H_Bandanna_mcamo", + "H_Bandanna_sgg", + "H_Bandanna_surfer", + "H_Booniehat_dgtl", + "H_Booniehat_dirty", + "H_Booniehat_grn", + "H_Booniehat_indp", + "H_Booniehat_khk", + "H_Booniehat_khk_hs", + "H_Booniehat_mcamo", + "H_Booniehat_tan", + "H_Hat_blue", + "H_Hat_brown", + "H_Hat_camo", + "H_Hat_checker", + "H_Hat_grey", + "H_Hat_tan", + "H_StrawHat", + "H_StrawHat_dark", + "H_Beret_02", + "H_Beret_blk", + "H_Beret_blk_POLICE", + "H_Beret_brn_SF", + "H_Beret_Colonel", + "H_Beret_grn", + "H_Beret_grn_SF", + "H_Beret_ocamo", + "H_Beret_red", + "H_Shemag_khk", + "H_Shemag_olive", + "H_Shemag_olive_hs", + "H_Shemag_tan", + "H_ShemagOpen_khk", + "H_ShemagOpen_tan", + "H_TurbanO_blk", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O", + //Apex + + "H_MilCap_tna_F", + "H_MilCap_ghex_F", + "H_Booniehat_tna_F", + "H_Beret_gen_F", + "H_MilCap_gen_F", + "H_Cap_oli_Syndikat_F", + "H_Cap_tan_Syndikat_F", + "H_Cap_blk_Syndikat_F", + "H_Cap_grn_Syndikat_F" + ]; + blck_helmets = [ + "H_HelmetB", + "H_HelmetB_black", + "H_HelmetB_camo", + "H_HelmetB_desert", + "H_HelmetB_grass", + "H_HelmetB_light", + "H_HelmetB_light_black", + "H_HelmetB_light_desert", + "H_HelmetB_light_grass", + "H_HelmetB_light_sand", + "H_HelmetB_light_snakeskin", + "H_HelmetB_paint", + "H_HelmetB_plain_blk", + "H_HelmetB_sand", + "H_HelmetB_snakeskin", + "H_HelmetCrew_B", + "H_HelmetCrew_I", + "H_HelmetCrew_O", + "H_HelmetIA", + "H_HelmetIA_camo", + "H_HelmetIA_net", + "H_HelmetLeaderO_ocamo", + "H_HelmetLeaderO_oucamo", + "H_HelmetO_ocamo", + "H_HelmetO_oucamo", + "H_HelmetSpecB", + "H_HelmetSpecB_blk", + "H_HelmetSpecB_paint1", + "H_HelmetSpecB_paint2", + "H_HelmetSpecO_blk", + "H_HelmetSpecO_ocamo", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O", + "H_Helmet_Skate", + "H_HelmetB_TI_tna_F", + // Apex + //"H_HelmetO_ViperSP_hex_F", + //"H_HelmetO_ViperSP_ghex_F", + "H_HelmetB_tna_F", + "H_HelmetB_Enh_tna_F", + "H_HelmetB_Light_tna_F", + "H_HelmetSpecO_ghex_F", + "H_HelmetLeaderO_ghex_F", + "H_HelmetO_ghex_F", + "H_HelmetCrew_O_ghex_F" + ]; + blck_headgearList = blck_headgear + blck_helmets; + blck_headgear_blue = blck_headgearList; + blck_headgear_red = blck_headgearList; + blck_headgear_green = blck_headgearList; + blck_headgear_orange = blck_headgearList; + + //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 = [ + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Equipment + // I have commented out some high visibility uniforms that can be reserved for players or special missions. + // for example, you could have a uniform list specified in a mission template. + "U_AntigonaBody", + "U_AttisBody", + "U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","U_B_CombatUniform_mcam_vest","U_B_CombatUniform_mcam_worn","U_B_CombatUniform_sgg","U_B_CombatUniform_sgg_tshirt","U_B_CombatUniform_sgg_vest","U_B_CombatUniform_wdl","U_B_CombatUniform_wdl_tshirt","U_B_CombatUniform_wdl_vest", + "U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3", + "U_B_GhillieSuit", + "U_B_HeliPilotCoveralls","U_B_PilotCoveralls", + "U_B_SpecopsUniform_sgg", + "U_B_survival_uniform", + "U_B_Wetsuit", + //"U_BasicBody", + "U_BG_Guerilla1_1","U_BG_Guerilla2_1","U_BG_Guerilla2_2","U_BG_Guerilla2_3","U_BG_Guerilla3_1","U_BG_Guerilla3_2", + "U_BG_leader", + "U_C_Commoner_shorts","U_C_Commoner1_1","U_C_Commoner1_2","U_C_Commoner1_3","U_C_Commoner2_1","U_C_Commoner2_2","U_C_Commoner2_3", + "U_C_Farmer","U_C_Fisherman","U_C_FishermanOveralls","U_C_HunterBody_brn","U_C_HunterBody_grn", + //"U_C_Journalist", + "U_C_Novak", + //"U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour", + "U_C_Poor_1","U_C_Poor_2","U_C_Poor_shorts_1","U_C_Poor_shorts_2","U_C_PriestBody","U_C_Scavenger_1","U_C_Scavenger_2", + //"U_C_Scientist","U_C_ShirtSurfer_shorts","U_C_TeeSurfer_shorts_1","U_C_TeeSurfer_shorts_2", + "U_C_WorkerCoveralls","U_C_WorkerOveralls","U_Competitor", + "U_I_CombatUniform","U_I_CombatUniform_shortsleeve","U_I_CombatUniform_tshirt","U_I_G_resistanceLeader_F", + "U_I_G_Story_Protagonist_F", + "U_I_GhillieSuit", + "U_I_HeliPilotCoveralls", + "U_I_OfficerUniform", + "U_I_pilotCoveralls", + "U_I_Wetsuit", + "U_IG_Guerilla1_1","U_IG_Guerilla2_1","U_IG_Guerilla2_2","U_IG_Guerilla2_3","U_IG_Guerilla3_1","U_IG_Guerilla3_2", + "U_IG_leader", + "U_IG_Menelaos", + //"U_KerryBody", + //"U_MillerBody", + //"U_NikosAgedBody", + //"U_NikosBody", + "U_O_CombatUniform_ocamo","U_O_CombatUniform_oucamo", + "U_O_GhillieSuit", + "U_O_OfficerUniform_ocamo", + "U_O_PilotCoveralls", + "U_O_SpecopsUniform_blk", + "U_O_SpecopsUniform_ocamo", + "U_O_Wetsuit", + "U_OG_Guerilla1_1","U_OG_Guerilla2_1","U_OG_Guerilla2_2","U_OG_Guerilla2_3","U_OG_Guerilla3_1","U_OG_Guerilla3_2","U_OG_leader", + //"U_OI_Scientist", + //"U_OrestesBody", + "U_Rangemaster", + // DLC + "U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh", + //Apex + "U_B_T_Soldier_F", + "U_B_T_Soldier_AR_F", + "U_B_T_Soldier_SL_F", + //"U_B_T_Sniper_F", + //"U_B_T_FullGhillie_tna_F", + "U_B_CTRG_Soldier_F", + "U_B_CTRG_Soldier_2_F", + "U_B_CTRG_Soldier_3_F", + "U_B_GEN_Soldier_F", + "U_B_GEN_Commander_F", + "U_O_T_Soldier_F", + "U_O_T_Officer_F", + //"U_O_T_Sniper_F", + //"U_O_T_FullGhillie_tna_F", + "U_O_V_Soldier_Viper_F", + "U_O_V_Soldier_Viper_hex_F", + "U_I_C_Soldier_Para_1_F", + "U_I_C_Soldier_Para_2_F", + "U_I_C_Soldier_Para_3_F", + "U_I_C_Soldier_Para_4_F", + "U_I_C_Soldier_Para_5_F", + "U_I_C_Soldier_Bandit_1_F", + "U_I_C_Soldier_Bandit_2_F", + "U_I_C_Soldier_Bandit_3_F", + "U_I_C_Soldier_Bandit_4_F", + "U_I_C_Soldier_Bandit_5_F", + "U_I_C_Soldier_Camo_F", + "U_C_man_sport_1_F", + "U_C_man_sport_2_F", + "U_C_man_sport_3_F", + "U_C_Man_casual_1_F", + "U_C_Man_casual_2_F", + "U_C_Man_casual_3_F", + "U_C_Man_casual_4_F", + "U_C_Man_casual_5_F", + "U_C_Man_casual_6_F", + "U_B_CTRG_Soldier_urb_1_F", + "U_B_CTRG_Soldier_urb_2_F", + "U_B_CTRG_Soldier_urb_3_F" + ]; + blck_SkinList_blue = blck_SkinList; + blck_SkinList_red = blck_SkinList; + blck_SkinList_green = blck_SkinList; + blck_SkinList_orange = blck_SkinList; + + blck_vests = [ + "V_Press_F", + "V_Rangemaster_belt", + "V_TacVest_blk", + "V_TacVest_blk_POLICE", + "V_TacVest_brn", + "V_TacVest_camo", + "V_TacVest_khk", + "V_TacVest_oli", + "V_TacVestCamo_khk", + "V_TacVestIR_blk", + "V_I_G_resistanceLeader_F", + "V_BandollierB_blk", + "V_BandollierB_cbr", + "V_BandollierB_khk", + "V_BandollierB_oli", + "V_BandollierB_rgr", + "V_Chestrig_blk", + "V_Chestrig_khk", + "V_Chestrig_oli", + "V_Chestrig_rgr", + "V_HarnessO_brn", + "V_HarnessO_gry", + "V_HarnessOGL_brn", + "V_HarnessOGL_gry", + "V_HarnessOSpec_brn", + "V_HarnessOSpec_gry", + "V_PlateCarrier1_blk", + "V_PlateCarrier1_rgr", + "V_PlateCarrier2_rgr", + "V_PlateCarrier3_rgr", + "V_PlateCarrierGL_blk", + "V_PlateCarrierGL_mtp", + "V_PlateCarrierGL_rgr", + "V_PlateCarrierH_CTRG", + "V_PlateCarrierIA1_dgtl", + "V_PlateCarrierIA2_dgtl", + "V_PlateCarrierIAGL_dgtl", + "V_PlateCarrierIAGL_oli", + "V_PlateCarrierL_CTRG", + "V_PlateCarrierSpec_blk", + "V_PlateCarrierSpec_mtp", + #ifdef useAPEX + //Apex + "V_TacChestrig_grn_F", + "V_TacChestrig_oli_F", + "V_TacChestrig_cbr_F", + "V_PlateCarrier1_tna_F", + "V_PlateCarrier2_tna_F", + "V_PlateCarrierSpec_tna_F", + "V_PlateCarrierGL_tna_F", + "V_HarnessO_ghex_F", + "V_HarnessOGL_ghex_F", + "V_BandollierB_ghex_F", + "V_TacVest_gen_F", + "V_PlateCarrier1_rgr_noflag_F", + #endif + "V_PlateCarrier2_rgr_noflag_F" + ]; + blck_vests_blue = blck_vests; + blck_vests_red = blck_vests; + blck_vests_green = blck_vests; + blck_vests_orange = blck_vests; + + //CraftingFood + blck_Meats=[ + + ]; + blck_Drink = [ + "Exile_Item_PlasticBottleCoffee", + "Exile_Item_PowerDrink", + "Exile_Item_PlasticBottleFreshWater", + "Exile_Item_Beer", + "Exile_Item_EnergyDrink", + "Exile_Item_MountainDupe" + ]; + blck_Food = [ + "Exile_Item_EMRE", + "Exile_Item_GloriousKnakworst", + "Exile_Item_Surstromming", + "Exile_Item_SausageGravy", + "Exile_Item_Catfood", + "Exile_Item_ChristmasTinner", + "Exile_Item_BBQSandwich", + "Exile_Item_Dogfood", + "Exile_Item_BeefParts", + "Exile_Item_Cheathas", + "Exile_Item_Noodles", + "Exile_Item_SeedAstics", + "Exile_Item_Raisins", + "Exile_Item_Moobar", + "Exile_Item_InstantCoffee" + ]; + #ifdef blck_addCarParts + blck_carParts = [ + "Exile_Item_CarWheel", + "DDR_Item_Tailrotor", + "DDR_Item_Main_Rotor", + "DDR_Item_Engine", + "DDR_Item_Glass", + "DDR_Item_Fuel_Tank", + "DDR_Item_Fishing_Net", + "DDR_Item_Fiberglass" + ]; + #endif + #ifdef useCUP + + #endif + + #ifdef useRHS + + #endif + 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"]; + blck_explosives = blck_throwableExplosives + blck_otherExplosives; + blck_medicalItems = ["Exile_Item_InstaDoc","Exile_Item_Bandage","Exile_Item_Vishpirin"]; + blck_specialItems = blck_throwableExplosives + blck_medicalItems; + + blck_NVG = ["NVGoggles","NVGoggles_INDEP","NVGoggles_OPFOR","Exile_Item_XM8"]; + blck_buildingMaterials = ["Exile_Item_ExtensionCord","Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_MetalBoard", + "Exile_Item_MetalPole","Exile_Item_MetalScrews","Exile_Item_Cement","Exile_Item_Sand"]; + blck_tools = ["Exile_Item_Matches","Exile_Item_CookingPot","Exile_Melee_Axe","Exile_Melee_SledgeHammmer","Exile_Item_Handsaw","Exile_Item_Pliers"]; + #ifdef blck_addCarParts + blck_carParts = [ + "Exile_Item_CarWheel", + "DDR_Item_Tailrotor", + "DDR_Item_Main_Rotor", + "DDR_Item_Engine", + "DDR_Item_Glass", + "DDR_Item_Fuel_Tank", + "DDR_Item_Fishing_Net", + "DDR_Item_Fiberglass" + ]; + #endif +/*************************************************************************************** +DEFAULT CONTENTS OF LOOT CRATES FOR EACH MISSION +Note however that these configurations can be used in any way you like or replaced with mission-specific customized loot arrays +for examples of how you can do this see \Major\Compositions.sqf +***************************************************************************************/ + + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + blck_lootCountsGreen = [[4,8],[20,30],[5,9],[15,18],18,1]; // Green + blck_lootCountsRed = [[4,6],[12,18],4,[6,12],6,1]; // Red + blck_lootCountsBlue = [4,12,3,6,6,1]; // Blue + + blck_BoxLoot_Orange = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["MMG_01_tan_F","150Rnd_93x64_Mag"], + ["MMG_02_black_F","130Rnd_338_Mag"], + ["MMG_02_camo_F","130Rnd_338_Mag"], + ["MMG_02_sand_F","130Rnd_338_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"] + ], + [//Magazines + ["3rnd_HE_Grenade_Shell",3,6], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",7,14], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["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], + // Apex Ammo + ["130Rnd_338_Mag",1,3], + ["150Rnd_93x64_Mag",1,3] + ], + [ // Optics + ["optic_SOS",1,2],["optic_LRPS",1,2],["optic_DMS",1,2], + ["optic_Arco",1,3], + ["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// 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_WorkBenchKit",1,10], + ["Exile_Item_WoodWindowKit",1,10],["Exile_Item_WoodWallKit",1,10],["Exile_Item_WoodStairsKit",1,10],["Exile_Item_WoodGateKit",1,10],["Exile_Item_WoodDoorwayKit",1,10],["Exile_Item_MetalBoard",1,10], + ["Exile_Item_MetalBoard",1,10],["Exile_Item_ExtensionCord",1,10],["Exile_Item_MetalPole",1,10],["Exile_Item_Sand",3,10],["Exile_Item_Cement",3,10],["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Green = + [ + [// Weapons + // Format is ["Weapon Name","Magazine Name"], + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["MMG_01_tan_F","150Rnd_93x64_Mag"], + ["MMG_02_black_F","130Rnd_338_Mag"], + ["MMG_02_camo_F","130Rnd_338_Mag"], + ["MMG_02_sand_F","130Rnd_338_Mag"], + ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], + ["srifle_DMR_03_F","10Rnd_338_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + ], + [//Magazines + // Format is ["Magazine name, Minimum number to add, Maximum number to add], + ["3rnd_HE_Grenade_Shell",2,4], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",6,12], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,3], + // Marksman Pack Ammo + ["10Rnd_338_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + // Apex Ammo + ["130Rnd_338_Mag",1,3], + ["150Rnd_93x64_Mag",1,3] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// 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,5],["Exile_Item_LightBulb",1,5],["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_CamoTentKit",1,5],["Exile_Item_WorkBenchKit",1,5], + ["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10],["Exile_Item_ExtensionCord",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_Sand",2,5],["Exile_Item_Cement",2,5] + ], + [//Items + ["Exile_Item_InstaDoc",1,2],["NVGoggles",1,2],["Rangefinder",1,2],["Exile_Item_Bandage",1,6],["Exile_Item_Vishpirin",1,6], + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Blue = + [ + [// Weapons + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"] + ], + [//Magazines + ["3rnd_HE_Grenade_Shell",1,2], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",3,10], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,4], + ["HandGrenade",1,3], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// Materials and supplies + ["Exile_Item_Matches",1,2],["Exile_Item_CookingPot",1,2],["Exile_Item_Rope",1,2],["Exile_Item_DuctTape",1,3],["Exile_Item_ExtensionCord",1,2],["Exile_Item_FuelCanisterEmpty",1,2], + ["Exile_Item_JunkMetal",1,6],["Exile_Item_LightBulb",1,6],["Exile_Item_MetalBoard",1,6],["Exile_Item_MetalPole",1,6],["Exile_Item_CamoTentKit",1,6] + ], + [//Items + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Red = + [ + [// Weapons + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + //["arifle_MX_SW_Black_Hamr_pointer_F","100Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + ], + [//Magazines + + ["3rnd_HE_Grenade_Shell",1,5],["30Rnd_65x39_caseless_green",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_45ACP_Mag_SMG_01",3,6],["20Rnd_556x45_UW_mag",3,6], + ["10Rnd_762x51_Mag",3,6],["20Rnd_762x51_Mag",3,7],["200Rnd_65x39_cased_Box",3,6],["100Rnd_65x39_caseless_mag_Tracer",3,6], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// 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,5],["Exile_Item_LightBulb",1,5],["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_CamoTentKit",1,5],["Exile_Item_WorkBenchKit",1,5], + ["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10],["Exile_Item_ExtensionCord",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_Sand",2,5],["Exile_Item_Cement",2,5] + ], + [//Items + ["Exile_Item_InstaDoc",1,2],["NVGoggles",1,2],["Exile_Item_Energydrink",1,4],["Exile_Item_Beer",1,3],["Rangefinder",1,2], + ["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] + ], + [ // Backpacks + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + +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. + + diag_log format["[blckeagls] Configurations for Exile Loaded"]; diff --git a/Server/@GMS/addons/custom_server/Configs/blck_configs_exile_mil - Namalks v146.sqf b/Server/@GMS/addons/custom_server/Configs/blck_configs_exile_mil - Namalks v146.sqf new file mode 100644 index 0000000..f8fbea7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_configs_exile_mil - Namalks v146.sqf @@ -0,0 +1,1170 @@ +/* + 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"; + +//////////// +// Exile-specific settings +//////////// + +// list of locations that are protected against mission spawns + +switch (toLower(worldName)) do +{ + case "altis": { + blck_locationBlackList append [ + //Add location as [[xpos,ypos,0],minimumDistance], + // Note that there should not be a comma after the last item in this table + [[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched. + ]; + }; + case "tanoa": { + blck_locationBlackList append [ ]; + }; +}; + +/********************************************************************************* + +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]; + + // When true, AI loadouts will be set from the class names in CfgPricing rather than the settings in the mod-specific configuration files + blck_useConfigsGeneratedLoadouts = true; + blck_maximumItemPriceInAI_Loadouts = 1000; + + _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" + ]; + + 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"]; + + // AI Weapons and Attachments + blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"]; + + blck_Optics_Holo = ["optic_Hamr","optic_MRD","optic_Holosight","optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_ACO_grn_smg","optic_Aco_smg","optic_Yorris"]; + blck_Optics_Reticule = ["optic_Arco","optic_MRCO"]; + blck_Optics_Scopes = [ + "optic_AMS","optic_AMS_khk","optic_AMS_snd", + "optic_DMS", + "optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan", + "optic_LRPS", + "optic_Nightstalker", + "optic_NVS", + "optic_SOS", + "optic_tws", + "optic_tws_mg" + ]; + + #ifdef useAPEX + blck_Optics_Apex = [ + //Apex + "optic_Arco_blk_F", "optic_Arco_ghex_F", + "optic_DMS_ghex_F", + "optic_Hamr_khk_F", + "optic_ERCO_blk_F","optic_ERCO_khk_F","optic_ERCO_snd_F", + "optic_SOS_khk_F", + "optic_LRPS_tna_F","optic_LRPS_ghex_F", + "optic_Holosight_blk_F","optic_Holosight_khk_F","optic_Holosight_smg_blk_F" + ]; + blck_Optics = blck_Optics_Holo + blck_Optics_Reticule + blck_Optics_Scopes; + blck_Optics = blck_Optics + blck_Optics_Apex; + #endif + + blck_bipods = [ + "bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli", + //Apex + "bipod_01_F_khk" + ]; + + blck_silencers = [ + "muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand","muzzle_snds_93mmg","muzzle_snds_93mmg_tan","muzzle_snds_acp","muzzle_snds_B", + "muzzle_snds_H","muzzle_snds_H_MG","muzzle_snds_H_SW","muzzle_snds_L","muzzle_snds_M", + //Apex + "muzzle_snds_H_khk_F","muzzle_snds_H_snd_F","muzzle_snds_58_blk_F","muzzle_snds_m_khk_F","muzzle_snds_m_snd_F","muzzle_snds_B_khk_F","muzzle_snds_B_snd_F", + "muzzle_snds_58_wdm_F","muzzle_snds_65_TI_blk_F","muzzle_snds_65_TI_hex_F","muzzle_snds_65_TI_ghex_F","muzzle_snds_H_MG_blk_F","muzzle_snds_H_MG_khk_F" + ]; + + blck_RifleSniper = [ + "srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F" + ]; + + blck_RifleAsault_556 = [ + "arifle_SDAR_F","arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F","arifle_SDAR_F" + ]; + + blck_RifleAsault_650 = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F" + ]; + + blck_RifleAsault = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_SDAR_F", + "arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F" + ]; + + blck_RifleLMG = [ + "LMG_Mk200_F","LMG_Zafir_F" + ]; + + blck_RifleOther = [ + "SMG_01_F","SMG_02_F" + ]; + + blck_Pistols = [ + "hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F" + ]; + blck_Pistols_blue = blck_Pistols; + blck_Pistols_red = blck_Pistols; + blck_Pistols_green = blck_Pistols; + blck_Pistols_orange = blck_Pistols; + + blck_DLC_MMG = [ + "MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F" + ]; + + blck_DLC_Sniper = [ + "srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F" + ]; + + //This defines the random weapon to spawn on the AI + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons + blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG; + blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault_650 +blck_RifleLMG + blck_DLC_MMG; + blck_WeaponList_Blue = blck_RifleOther + blck_RifleAsault_556 + blck_RifleAsault_650; + blck_WeaponList_Red = blck_RifleAsault_556 + blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG; + + #ifdef useAPEX + blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"]; + + blck_WeaponList_Orange = blck_WeaponList_Orange + blck_apexWeapons; + blck_WeaponList_Green = blck_WeaponList_Green + blck_apexWeapons; + #endif + + + + blck_backpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ]; + + #ifdef useAPEX + blck_ApexBackpacks = [ + "B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F", + "B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F", + "B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F" + ]; + blck_backpacks = blck_backpacks + blck_ApexBackpacks; + #endif + blck_backpacks_blue = blck_backpacks; + blck_backpacks_red = blck_backpacks; + blck_backpacks_green = blck_backpacks; + blck_backpacks_orange = blck_backpacks; + + blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"]; + //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_headgear = [ + "H_Cap_blk", + "H_Cap_blk_Raven", + "H_Cap_blu", + "H_Cap_brn_SPECOPS", + "H_Cap_grn", + "H_Cap_headphones", + "H_Cap_khaki_specops_UK", + "H_Cap_oli", + "H_Cap_press", + "H_Cap_red", + "H_Cap_tan", + "H_Cap_tan_specops_US", + "H_Watchcap_blk", + "H_Watchcap_camo", + "H_Watchcap_khk", + "H_Watchcap_sgg", + "H_MilCap_blue", + "H_MilCap_dgtl", + "H_MilCap_mcamo", + "H_MilCap_ocamo", + "H_MilCap_oucamo", + "H_MilCap_rucamo", + "H_Bandanna_camo", + "H_Bandanna_cbr", + "H_Bandanna_gry", + "H_Bandanna_khk", + "H_Bandanna_khk_hs", + "H_Bandanna_mcamo", + "H_Bandanna_sgg", + "H_Bandanna_surfer", + "H_Booniehat_dgtl", + "H_Booniehat_dirty", + "H_Booniehat_grn", + "H_Booniehat_indp", + "H_Booniehat_khk", + "H_Booniehat_khk_hs", + "H_Booniehat_mcamo", + "H_Booniehat_tan", + "H_Hat_blue", + "H_Hat_brown", + "H_Hat_camo", + "H_Hat_checker", + "H_Hat_grey", + "H_Hat_tan", + "H_StrawHat", + "H_StrawHat_dark", + "H_Beret_02", + "H_Beret_blk", + "H_Beret_blk_POLICE", + "H_Beret_brn_SF", + "H_Beret_Colonel", + "H_Beret_grn", + "H_Beret_grn_SF", + "H_Beret_ocamo", + "H_Beret_red", + "H_Shemag_khk", + "H_Shemag_olive", + "H_Shemag_olive_hs", + "H_Shemag_tan", + "H_ShemagOpen_khk", + "H_ShemagOpen_tan", + "H_TurbanO_blk", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O", + //Apex + + "H_MilCap_tna_F", + "H_MilCap_ghex_F", + "H_Booniehat_tna_F", + "H_Beret_gen_F", + "H_MilCap_gen_F", + "H_Cap_oli_Syndikat_F", + "H_Cap_tan_Syndikat_F", + "H_Cap_blk_Syndikat_F", + "H_Cap_grn_Syndikat_F" + ]; + blck_helmets = [ + "H_HelmetB", + "H_HelmetB_black", + "H_HelmetB_camo", + "H_HelmetB_desert", + "H_HelmetB_grass", + "H_HelmetB_light", + "H_HelmetB_light_black", + "H_HelmetB_light_desert", + "H_HelmetB_light_grass", + "H_HelmetB_light_sand", + "H_HelmetB_light_snakeskin", + "H_HelmetB_paint", + "H_HelmetB_plain_blk", + "H_HelmetB_sand", + "H_HelmetB_snakeskin", + "H_HelmetCrew_B", + "H_HelmetCrew_I", + "H_HelmetCrew_O", + "H_HelmetIA", + "H_HelmetIA_camo", + "H_HelmetIA_net", + "H_HelmetLeaderO_ocamo", + "H_HelmetLeaderO_oucamo", + "H_HelmetO_ocamo", + "H_HelmetO_oucamo", + "H_HelmetSpecB", + "H_HelmetSpecB_blk", + "H_HelmetSpecB_paint1", + "H_HelmetSpecB_paint2", + "H_HelmetSpecO_blk", + "H_HelmetSpecO_ocamo", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O", + "H_Helmet_Skate", + "H_HelmetB_TI_tna_F", + // Apex + //"H_HelmetO_ViperSP_hex_F", + //"H_HelmetO_ViperSP_ghex_F", + "H_HelmetB_tna_F", + "H_HelmetB_Enh_tna_F", + "H_HelmetB_Light_tna_F", + "H_HelmetSpecO_ghex_F", + "H_HelmetLeaderO_ghex_F", + "H_HelmetO_ghex_F", + "H_HelmetCrew_O_ghex_F" + ]; + blck_headgearList = blck_headgear + blck_helmets; + blck_headgear_blue = blck_headgearList; + blck_headgear_red = blck_headgearList; + blck_headgear_green = blck_headgearList; + blck_headgear_orange = blck_headgearList; + + //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 = [ + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Equipment + // I have commented out some high visibility uniforms that can be reserved for players or special missions. + // for example, you could have a uniform list specified in a mission template. + "U_AntigonaBody", + "U_AttisBody", + "U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","U_B_CombatUniform_mcam_vest","U_B_CombatUniform_mcam_worn","U_B_CombatUniform_sgg","U_B_CombatUniform_sgg_tshirt","U_B_CombatUniform_sgg_vest","U_B_CombatUniform_wdl","U_B_CombatUniform_wdl_tshirt","U_B_CombatUniform_wdl_vest", + "U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3", + "U_B_GhillieSuit", + "U_B_HeliPilotCoveralls","U_B_PilotCoveralls", + "U_B_SpecopsUniform_sgg", + "U_B_survival_uniform", + "U_B_Wetsuit", + //"U_BasicBody", + "U_BG_Guerilla1_1","U_BG_Guerilla2_1","U_BG_Guerilla2_2","U_BG_Guerilla2_3","U_BG_Guerilla3_1","U_BG_Guerilla3_2", + "U_BG_leader", + "U_C_Commoner_shorts","U_C_Commoner1_1","U_C_Commoner1_2","U_C_Commoner1_3","U_C_Commoner2_1","U_C_Commoner2_2","U_C_Commoner2_3", + "U_C_Farmer","U_C_Fisherman","U_C_FishermanOveralls","U_C_HunterBody_brn","U_C_HunterBody_grn", + //"U_C_Journalist", + "U_C_Novak", + //"U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour", + "U_C_Poor_1","U_C_Poor_2","U_C_Poor_shorts_1","U_C_Poor_shorts_2","U_C_PriestBody","U_C_Scavenger_1","U_C_Scavenger_2", + //"U_C_Scientist","U_C_ShirtSurfer_shorts","U_C_TeeSurfer_shorts_1","U_C_TeeSurfer_shorts_2", + "U_C_WorkerCoveralls","U_C_WorkerOveralls","U_Competitor", + "U_I_CombatUniform","U_I_CombatUniform_shortsleeve","U_I_CombatUniform_tshirt","U_I_G_resistanceLeader_F", + "U_I_G_Story_Protagonist_F", + "U_I_GhillieSuit", + "U_I_HeliPilotCoveralls", + "U_I_OfficerUniform", + "U_I_pilotCoveralls", + "U_I_Wetsuit", + "U_IG_Guerilla1_1","U_IG_Guerilla2_1","U_IG_Guerilla2_2","U_IG_Guerilla2_3","U_IG_Guerilla3_1","U_IG_Guerilla3_2", + "U_IG_leader", + "U_IG_Menelaos", + //"U_KerryBody", + //"U_MillerBody", + //"U_NikosAgedBody", + //"U_NikosBody", + "U_O_CombatUniform_ocamo","U_O_CombatUniform_oucamo", + "U_O_GhillieSuit", + "U_O_OfficerUniform_ocamo", + "U_O_PilotCoveralls", + "U_O_SpecopsUniform_blk", + "U_O_SpecopsUniform_ocamo", + "U_O_Wetsuit", + "U_OG_Guerilla1_1","U_OG_Guerilla2_1","U_OG_Guerilla2_2","U_OG_Guerilla2_3","U_OG_Guerilla3_1","U_OG_Guerilla3_2","U_OG_leader", + //"U_OI_Scientist", + //"U_OrestesBody", + "U_Rangemaster", + // DLC + "U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh", + //Apex + "U_B_T_Soldier_F", + "U_B_T_Soldier_AR_F", + "U_B_T_Soldier_SL_F", + //"U_B_T_Sniper_F", + //"U_B_T_FullGhillie_tna_F", + "U_B_CTRG_Soldier_F", + "U_B_CTRG_Soldier_2_F", + "U_B_CTRG_Soldier_3_F", + "U_B_GEN_Soldier_F", + "U_B_GEN_Commander_F", + "U_O_T_Soldier_F", + "U_O_T_Officer_F", + //"U_O_T_Sniper_F", + //"U_O_T_FullGhillie_tna_F", + "U_O_V_Soldier_Viper_F", + "U_O_V_Soldier_Viper_hex_F", + "U_I_C_Soldier_Para_1_F", + "U_I_C_Soldier_Para_2_F", + "U_I_C_Soldier_Para_3_F", + "U_I_C_Soldier_Para_4_F", + "U_I_C_Soldier_Para_5_F", + "U_I_C_Soldier_Bandit_1_F", + "U_I_C_Soldier_Bandit_2_F", + "U_I_C_Soldier_Bandit_3_F", + "U_I_C_Soldier_Bandit_4_F", + "U_I_C_Soldier_Bandit_5_F", + "U_I_C_Soldier_Camo_F", + "U_C_man_sport_1_F", + "U_C_man_sport_2_F", + "U_C_man_sport_3_F", + "U_C_Man_casual_1_F", + "U_C_Man_casual_2_F", + "U_C_Man_casual_3_F", + "U_C_Man_casual_4_F", + "U_C_Man_casual_5_F", + "U_C_Man_casual_6_F", + "U_B_CTRG_Soldier_urb_1_F", + "U_B_CTRG_Soldier_urb_2_F", + "U_B_CTRG_Soldier_urb_3_F" + ]; + blck_SkinList_blue = blck_SkinList; + blck_SkinList_red = blck_SkinList; + blck_SkinList_green = blck_SkinList; + blck_SkinList_orange = blck_SkinList; + + blck_vests = [ + "V_Press_F", + "V_Rangemaster_belt", + "V_TacVest_blk", + "V_TacVest_blk_POLICE", + "V_TacVest_brn", + "V_TacVest_camo", + "V_TacVest_khk", + "V_TacVest_oli", + "V_TacVestCamo_khk", + "V_TacVestIR_blk", + "V_I_G_resistanceLeader_F", + "V_BandollierB_blk", + "V_BandollierB_cbr", + "V_BandollierB_khk", + "V_BandollierB_oli", + "V_BandollierB_rgr", + "V_Chestrig_blk", + "V_Chestrig_khk", + "V_Chestrig_oli", + "V_Chestrig_rgr", + "V_HarnessO_brn", + "V_HarnessO_gry", + "V_HarnessOGL_brn", + "V_HarnessOGL_gry", + "V_HarnessOSpec_brn", + "V_HarnessOSpec_gry", + "V_PlateCarrier1_blk", + "V_PlateCarrier1_rgr", + "V_PlateCarrier2_rgr", + "V_PlateCarrier3_rgr", + "V_PlateCarrierGL_blk", + "V_PlateCarrierGL_mtp", + "V_PlateCarrierGL_rgr", + "V_PlateCarrierH_CTRG", + "V_PlateCarrierIA1_dgtl", + "V_PlateCarrierIA2_dgtl", + "V_PlateCarrierIAGL_dgtl", + "V_PlateCarrierIAGL_oli", + "V_PlateCarrierL_CTRG", + "V_PlateCarrierSpec_blk", + "V_PlateCarrierSpec_mtp", + #ifdef useAPEX + //Apex + "V_TacChestrig_grn_F", + "V_TacChestrig_oli_F", + "V_TacChestrig_cbr_F", + "V_PlateCarrier1_tna_F", + "V_PlateCarrier2_tna_F", + "V_PlateCarrierSpec_tna_F", + "V_PlateCarrierGL_tna_F", + "V_HarnessO_ghex_F", + "V_HarnessOGL_ghex_F", + "V_BandollierB_ghex_F", + "V_TacVest_gen_F", + "V_PlateCarrier1_rgr_noflag_F", + #endif + "V_PlateCarrier2_rgr_noflag_F" + ]; + blck_vests_blue = blck_vests; + blck_vests_red = blck_vests; + blck_vests_green = blck_vests; + blck_vests_orange = blck_vests; + + //CraftingFood + blck_Meats=[ + + ]; + blck_Drink = [ + "Exile_Item_PlasticBottleCoffee", + "Exile_Item_PowerDrink", + "Exile_Item_PlasticBottleFreshWater", + "Exile_Item_Beer", + "Exile_Item_EnergyDrink", + "Exile_Item_MountainDupe" + ]; + blck_Food = [ + "Exile_Item_EMRE", + "Exile_Item_GloriousKnakworst", + "Exile_Item_Surstromming", + "Exile_Item_SausageGravy", + "Exile_Item_Catfood", + "Exile_Item_ChristmasTinner", + "Exile_Item_BBQSandwich", + "Exile_Item_Dogfood", + "Exile_Item_BeefParts", + "Exile_Item_Cheathas", + "Exile_Item_Noodles", + "Exile_Item_SeedAstics", + "Exile_Item_Raisins", + "Exile_Item_Moobar", + "Exile_Item_InstantCoffee" + ]; + + #ifdef useCUP + + #endif + + #ifdef useRHS + + #endif + 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"]; + blck_explosives = blck_throwableExplosives + blck_otherExplosives; + blck_medicalItems = ["Exile_Item_InstaDoc","Exile_Item_Bandage","Exile_Item_Vishpirin"]; + blck_specialItems = blck_throwableExplosives + blck_medicalItems; + + blck_NVG = ["NVGoggles","NVGoggles_INDEP","NVGoggles_OPFOR","Exile_Item_XM8"]; + blck_buildingMaterials = ["Exile_Item_ExtensionCord","Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_MetalBoard", + "Exile_Item_MetalPole","Exile_Item_MetalScrews","Exile_Item_Cement","Exile_Item_Sand","Exile_Item_MetalWire","Exile_Item_ExtensionCord","Exile_Item_JunkMetal"]; + blck_tools = ["Exile_Item_Matches","Exile_Item_CookingPot","Exile_Melee_Axe","Exile_Melee_SledgeHammmer","Exile_Item_Handsaw","Exile_Item_Pliers","Exile_Item_CanOpener","Exile_Item_Shovel"]; + +/*************************************************************************************** +DEFAULT CONTENTS OF LOOT CRATES FOR EACH MISSION +Note however that these configurations can be used in any way you like or replaced with mission-specific customized loot arrays +for examples of how you can do this see \Major\Compositions.sqf +***************************************************************************************/ + + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + blck_lootCountsOrange = [8,32,8,35,16,2]; // Orange + blck_lootCountsGreen = [7,24,6,25,18,2]; // Green + blck_lootCountsRed = [5,16,4,10,6,1]; // Red + blck_lootCountsBlue = [4,12,3,6,6,1]; // Blue + + blck_BoxLoot_Orange = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x51_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"], + ["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"] + ], + [//Magazines + ["3rnd_HE_Grenade_Shell",3,6], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",7,14], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,5], + // Marksman Pack Ammo + ["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], + ["optic_Arco",1,3], + ["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// 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_WorkBenchKit",1,10], + ["Exile_Item_WoodWindowKit",1,10],["Exile_Item_WoodWallKit",1,10],["Exile_Item_WoodStairsKit",1,10],["Exile_Item_WoodGateKit",1,10],["Exile_Item_WoodDoorwayKit",1,10],["Exile_Item_MetalBoard",1,10], + ["Exile_Item_MetalBoard",1,10],["Exile_Item_ExtensionCord",1,10],["Exile_Item_MetalPole",1,10],["Exile_Item_Sand",3,10],["Exile_Item_Cement",3,10],["Exile_Item_Sand",3,10],["Exile_Item_Cement",3,10], + ["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Green = + [ + [// Weapons + // Format is ["Weapon Name","Magazine Name"], + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x51_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], + ["srifle_DMR_03_F","10Rnd_338_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + ], + [//Magazines + // Format is ["Magazine name, Minimum number to add, Maximum number to add], + ["3rnd_HE_Grenade_Shell",2,4], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",6,12], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,3], + // Marksman Pack Ammo + ["10Rnd_338_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// 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,5],["Exile_Item_LightBulb",1,5],["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_CamoTentKit",1,5],["Exile_Item_WorkBenchKit",1,5], + ["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10],["Exile_Item_ExtensionCord",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_Sand",2,5], + ["Exile_Item_Cement",2,8],["Exile_Item_Sand",2,8],["Exile_Item_Cement",2,8] + ], + [//Items + ["Exile_Item_InstaDoc",1,2],["NVGoggles",1,2],["Rangefinder",1,2],["Exile_Item_Bandage",1,6],["Exile_Item_Vishpirin",1,6], + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Blue = + [ + [// Weapons + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x51_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"] + ], + [//Magazines + ["3rnd_HE_Grenade_Shell",1,2], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",3,10], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,4], + ["HandGrenade",1,3], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// Materials and supplies + ["Exile_Item_Matches",1,2],["Exile_Item_CookingPot",1,2],["Exile_Item_Rope",1,2],["Exile_Item_DuctTape",1,3],["Exile_Item_ExtensionCord",1,2],["Exile_Item_FuelCanisterEmpty",1,2], + ["Exile_Item_JunkMetal",1,6],["Exile_Item_LightBulb",1,6],["Exile_Item_MetalBoard",1,6],["Exile_Item_MetalPole",1,6],["Exile_Item_CamoTentKit",1,6],["Exile_Item_MetalWire",1,4] + ], + [//Items + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Red = + [ + [// Weapons + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + //["arifle_MX_SW_Black_Hamr_pointer_F","100Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x51_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + ], + [//Magazines + + ["3rnd_HE_Grenade_Shell",1,5],["30Rnd_65x39_caseless_green",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_45ACP_Mag_SMG_01",3,6],["20Rnd_556x45_UW_mag",3,6], + ["10Rnd_762x51_Mag",3,6],["20Rnd_762x51_Mag",3,7],["200Rnd_65x39_cased_Box",3,6],["100Rnd_65x39_caseless_mag_Tracer",3,6], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// 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,5],["Exile_Item_LightBulb",1,5],["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_CamoTentKit",1,5],["Exile_Item_WorkBenchKit",1,5], + ["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10],["Exile_Item_ExtensionCord",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_Sand",2,5], + ["Exile_Item_Cement",2,5],["Exile_Item_Sand",2,5],["Exile_Item_Cement",2,5] + ], + [//Items + ["Exile_Item_InstaDoc",1,2],["NVGoggles",1,2],["Exile_Item_Energydrink",1,4],["Exile_Item_Beer",1,3],["Rangefinder",1,2], + ["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] + ], + [ // Backpacks + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + + +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], + ["Exile_Item_MetalPole",1,10],["Exile_Item_Sand",2,10],["Exile_Item_Cement",2,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. + + diag_log format["[blckeagls] Configurations for Exile Loaded"]; + + blck_configsExileLoaded = true; diff --git a/Server/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf b/Server/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf new file mode 100644 index 0000000..8e053d0 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf @@ -0,0 +1,1245 @@ +/* + 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"; + +//////////// +// Exile-specific settings +//////////// + +// list of locations that are protected against mission spawns + +switch (toLower(worldName)) do +{ + case "altis": { + blck_locationBlackList append [ + //Add location as [[xpos,ypos,0],minimumDistance], + // Note that there should not be a comma after the last item in this table + [[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched. + ]; + }; + case "tanoa": { + blck_locationBlackList append [ ]; + }; +}; + +/********************************************************************************* + +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_maximumItemPriceInAI_Loadouts = 1000; + + 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_light_AT_ARMA3 = [ + "O_G_Offroad_01_AT_F", + "B_G_Offroad_01_AT_F", + "O_T_LSV_02_AT_F", + "O_LSV_02_AT_F", + "B_T_LSV_01_AT_F", + "B_LSV_01_AT_F" + ]; + blck_tracked_AA_ARMA3 = [ + "O_APC_Tracked_02_AA_F", + "B_APC_Tracked_01_AA_F" + ]; + blck_tracked_APC_ARMA3 = [ + "B_APC_Tracked_01_rcws_F", + "B_APC_Tracked_01_CRV_F", + "O_APC_Tracked_02_cannon_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" + ]; + #ifdef useCUP + 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"" + ]; + #endif + 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", + //"B_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 + + /// Defined again below in this instance to show options available and also my personal preferences for mil servers + 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_AIPatrolVehiclesBlue = blck_AIPatrolVehicles; + + + #ifdef useCUP + blck_AIPatrolVehiclesRed = blck_lightlyArmed_ARMA3 + blck_APC_CUP; + blck_AIPatrolVehiclesGreen = blck_Tanks_ARMA3 + blck_Tanks_CUP; + blck_AIPatrolVehiclesOrange = blck_Tanks_ARMA3 + blck_Tanks_CUP; + #else + blck_AIPatrolVehiclesRed = blck_lightlyArmed_ARMA3; + blck_AIPatrolVehiclesGreen = blck_Tanks_ARMA3; + blck_AIPatrolVehiclesOrange = blck_Tanks_ARMA3; + #endif + + 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"]; + + // AI Weapons and Attachments + blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"]; + + blck_Optics_Holo = ["optic_Hamr","optic_MRD","optic_Holosight","optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_ACO_grn_smg","optic_Aco_smg","optic_Yorris"]; + blck_Optics_Reticule = ["optic_Arco","optic_MRCO"]; + blck_Optics_Scopes = [ + "optic_AMS","optic_AMS_khk","optic_AMS_snd", + "optic_DMS", + "optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan", + "optic_LRPS", + "optic_Nightstalker", + "optic_NVS", + "optic_SOS", + "optic_tws", + "optic_tws_mg" + ]; + + #ifdef useAPEX + blck_Optics_Apex = [ + //Apex + "optic_Arco_blk_F", "optic_Arco_ghex_F", + "optic_DMS_ghex_F", + "optic_Hamr_khk_F", + "optic_ERCO_blk_F","optic_ERCO_khk_F","optic_ERCO_snd_F", + "optic_SOS_khk_F", + "optic_LRPS_tna_F","optic_LRPS_ghex_F", + "optic_Holosight_blk_F","optic_Holosight_khk_F","optic_Holosight_smg_blk_F" + ]; + blck_Optics = blck_Optics_Holo + blck_Optics_Reticule + blck_Optics_Scopes; + blck_Optics = blck_Optics + blck_Optics_Apex; + #endif + + blck_bipods = [ + "bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli", + //Apex + "bipod_01_F_khk" + ]; + + blck_silencers = [ + "muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand","muzzle_snds_93mmg","muzzle_snds_93mmg_tan","muzzle_snds_acp","muzzle_snds_B", + "muzzle_snds_H","muzzle_snds_H_MG","muzzle_snds_H_SW","muzzle_snds_L","muzzle_snds_M", + //Apex + "muzzle_snds_H_khk_F","muzzle_snds_H_snd_F","muzzle_snds_58_blk_F","muzzle_snds_m_khk_F","muzzle_snds_m_snd_F","muzzle_snds_B_khk_F","muzzle_snds_B_snd_F", + "muzzle_snds_58_wdm_F","muzzle_snds_65_TI_blk_F","muzzle_snds_65_TI_hex_F","muzzle_snds_65_TI_ghex_F","muzzle_snds_H_MG_blk_F","muzzle_snds_H_MG_khk_F" + ]; + + blck_RifleSniper = [ + "srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F" + ]; + + blck_RifleAsault_556 = [ + "arifle_SDAR_F","arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F","arifle_SDAR_F" + ]; + + blck_RifleAsault_650 = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F" + ]; + + blck_RifleAsault = [ + "arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_SDAR_F", + "arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F" + ]; + + blck_RifleLMG = [ + "LMG_Mk200_F","LMG_Zafir_F" + ]; + + blck_RifleOther = [ + "SMG_01_F","SMG_02_F" + ]; + + blck_Pistols = [ + "hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F" + ]; + blck_Pistols_blue = blck_Pistols; + blck_Pistols_red = blck_Pistols; + blck_Pistols_green = blck_Pistols; + blck_Pistols_orange = blck_Pistols; + + blck_DLC_MMG = [ + "MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F" + ]; + + blck_DLC_Sniper = [ + "srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F" + ]; + + //This defines the random weapon to spawn on the AI + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons + blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG; + blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault_650 +blck_RifleLMG + blck_DLC_MMG; + blck_WeaponList_Blue = blck_RifleOther + blck_RifleAsault_556 + blck_RifleAsault_650; + blck_WeaponList_Red = blck_RifleAsault_556 + blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG; + + #ifdef useAPEX + blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"]; + + blck_WeaponList_Orange = blck_WeaponList_Orange + blck_apexWeapons; + blck_WeaponList_Green = blck_WeaponList_Green + blck_apexWeapons; + #endif + + + + blck_backpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ]; + + #ifdef useAPEX + blck_ApexBackpacks = [ + "B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F", + "B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F", + "B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F" + ]; + blck_backpacks = blck_backpacks + blck_ApexBackpacks; + #endif + blck_backpacks_blue = blck_backpacks; + blck_backpacks_red = blck_backpacks; + blck_backpacks_green = blck_backpacks; + blck_backpacks_orange = blck_backpacks; + + blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"]; + //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_headgear = [ + "H_Cap_blk", + "H_Cap_blk_Raven", + "H_Cap_blu", + "H_Cap_brn_SPECOPS", + "H_Cap_grn", + "H_Cap_headphones", + "H_Cap_khaki_specops_UK", + "H_Cap_oli", + "H_Cap_press", + "H_Cap_red", + "H_Cap_tan", + "H_Cap_tan_specops_US", + "H_Watchcap_blk", + "H_Watchcap_camo", + "H_Watchcap_khk", + "H_Watchcap_sgg", + "H_MilCap_blue", + "H_MilCap_dgtl", + "H_MilCap_mcamo", + "H_MilCap_ocamo", + "H_MilCap_oucamo", + "H_MilCap_rucamo", + "H_Bandanna_camo", + "H_Bandanna_cbr", + "H_Bandanna_gry", + "H_Bandanna_khk", + "H_Bandanna_khk_hs", + "H_Bandanna_mcamo", + "H_Bandanna_sgg", + "H_Bandanna_surfer", + "H_Booniehat_dgtl", + "H_Booniehat_dirty", + "H_Booniehat_grn", + "H_Booniehat_indp", + "H_Booniehat_khk", + "H_Booniehat_khk_hs", + "H_Booniehat_mcamo", + "H_Booniehat_tan", + "H_Hat_blue", + "H_Hat_brown", + "H_Hat_camo", + "H_Hat_checker", + "H_Hat_grey", + "H_Hat_tan", + "H_StrawHat", + "H_StrawHat_dark", + "H_Beret_02", + "H_Beret_blk", + "H_Beret_blk_POLICE", + "H_Beret_brn_SF", + "H_Beret_Colonel", + "H_Beret_grn", + "H_Beret_grn_SF", + "H_Beret_ocamo", + "H_Beret_red", + "H_Shemag_khk", + "H_Shemag_olive", + "H_Shemag_olive_hs", + "H_Shemag_tan", + "H_ShemagOpen_khk", + "H_ShemagOpen_tan", + "H_TurbanO_blk", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O", + //Apex + + "H_MilCap_tna_F", + "H_MilCap_ghex_F", + "H_Booniehat_tna_F", + "H_Beret_gen_F", + "H_MilCap_gen_F", + "H_Cap_oli_Syndikat_F", + "H_Cap_tan_Syndikat_F", + "H_Cap_blk_Syndikat_F", + "H_Cap_grn_Syndikat_F" + ]; + blck_helmets = [ + "H_HelmetB", + "H_HelmetB_black", + "H_HelmetB_camo", + "H_HelmetB_desert", + "H_HelmetB_grass", + "H_HelmetB_light", + "H_HelmetB_light_black", + "H_HelmetB_light_desert", + "H_HelmetB_light_grass", + "H_HelmetB_light_sand", + "H_HelmetB_light_snakeskin", + "H_HelmetB_paint", + "H_HelmetB_plain_blk", + "H_HelmetB_sand", + "H_HelmetB_snakeskin", + "H_HelmetCrew_B", + "H_HelmetCrew_I", + "H_HelmetCrew_O", + "H_HelmetIA", + "H_HelmetIA_camo", + "H_HelmetIA_net", + "H_HelmetLeaderO_ocamo", + "H_HelmetLeaderO_oucamo", + "H_HelmetO_ocamo", + "H_HelmetO_oucamo", + "H_HelmetSpecB", + "H_HelmetSpecB_blk", + "H_HelmetSpecB_paint1", + "H_HelmetSpecB_paint2", + "H_HelmetSpecO_blk", + "H_HelmetSpecO_ocamo", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O", + "H_Helmet_Skate", + "H_HelmetB_TI_tna_F", + // Apex + //"H_HelmetO_ViperSP_hex_F", + //"H_HelmetO_ViperSP_ghex_F", + "H_HelmetB_tna_F", + "H_HelmetB_Enh_tna_F", + "H_HelmetB_Light_tna_F", + "H_HelmetSpecO_ghex_F", + "H_HelmetLeaderO_ghex_F", + "H_HelmetO_ghex_F", + "H_HelmetCrew_O_ghex_F" + ]; + blck_headgearList = blck_headgear + blck_helmets; + blck_headgear_blue = blck_headgearList; + blck_headgear_red = blck_headgearList; + blck_headgear_green = blck_headgearList; + blck_headgear_orange = blck_headgearList; + + //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 = [ + //https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Equipment + // I have commented out some high visibility uniforms that can be reserved for players or special missions. + // for example, you could have a uniform list specified in a mission template. + "U_AntigonaBody", + "U_AttisBody", + "U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","U_B_CombatUniform_mcam_vest","U_B_CombatUniform_mcam_worn","U_B_CombatUniform_sgg","U_B_CombatUniform_sgg_tshirt","U_B_CombatUniform_sgg_vest","U_B_CombatUniform_wdl","U_B_CombatUniform_wdl_tshirt","U_B_CombatUniform_wdl_vest", + "U_B_CTRG_1","U_B_CTRG_2","U_B_CTRG_3", + "U_B_GhillieSuit", + "U_B_HeliPilotCoveralls","U_B_PilotCoveralls", + "U_B_SpecopsUniform_sgg", + "U_B_survival_uniform", + "U_B_Wetsuit", + //"U_BasicBody", + "U_BG_Guerilla1_1","U_BG_Guerilla2_1","U_BG_Guerilla2_2","U_BG_Guerilla2_3","U_BG_Guerilla3_1","U_BG_Guerilla3_2", + "U_BG_leader", + "U_C_Commoner_shorts","U_C_Commoner1_1","U_C_Commoner1_2","U_C_Commoner1_3","U_C_Commoner2_1","U_C_Commoner2_2","U_C_Commoner2_3", + "U_C_Farmer","U_C_Fisherman","U_C_FishermanOveralls","U_C_HunterBody_brn","U_C_HunterBody_grn", + //"U_C_Journalist", + "U_C_Novak", + //"U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour", + "U_C_Poor_1","U_C_Poor_2","U_C_Poor_shorts_1","U_C_Poor_shorts_2","U_C_PriestBody","U_C_Scavenger_1","U_C_Scavenger_2", + //"U_C_Scientist","U_C_ShirtSurfer_shorts","U_C_TeeSurfer_shorts_1","U_C_TeeSurfer_shorts_2", + "U_C_WorkerCoveralls","U_C_WorkerOveralls","U_Competitor", + "U_I_CombatUniform","U_I_CombatUniform_shortsleeve","U_I_CombatUniform_tshirt","U_I_G_resistanceLeader_F", + "U_I_G_Story_Protagonist_F", + "U_I_GhillieSuit", + "U_I_HeliPilotCoveralls", + "U_I_OfficerUniform", + "U_I_pilotCoveralls", + "U_I_Wetsuit", + "U_IG_Guerilla1_1","U_IG_Guerilla2_1","U_IG_Guerilla2_2","U_IG_Guerilla2_3","U_IG_Guerilla3_1","U_IG_Guerilla3_2", + "U_IG_leader", + "U_IG_Menelaos", + //"U_KerryBody", + //"U_MillerBody", + //"U_NikosAgedBody", + //"U_NikosBody", + "U_O_CombatUniform_ocamo","U_O_CombatUniform_oucamo", + "U_O_GhillieSuit", + "U_O_OfficerUniform_ocamo", + "U_O_PilotCoveralls", + "U_O_SpecopsUniform_blk", + "U_O_SpecopsUniform_ocamo", + "U_O_Wetsuit", + "U_OG_Guerilla1_1","U_OG_Guerilla2_1","U_OG_Guerilla2_2","U_OG_Guerilla2_3","U_OG_Guerilla3_1","U_OG_Guerilla3_2","U_OG_leader", + //"U_OI_Scientist", + //"U_OrestesBody", + "U_Rangemaster", + // DLC + "U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh", + //Apex + "U_B_T_Soldier_F", + "U_B_T_Soldier_AR_F", + "U_B_T_Soldier_SL_F", + //"U_B_T_Sniper_F", + //"U_B_T_FullGhillie_tna_F", + "U_B_CTRG_Soldier_F", + "U_B_CTRG_Soldier_2_F", + "U_B_CTRG_Soldier_3_F", + "U_B_GEN_Soldier_F", + "U_B_GEN_Commander_F", + "U_O_T_Soldier_F", + "U_O_T_Officer_F", + //"U_O_T_Sniper_F", + //"U_O_T_FullGhillie_tna_F", + "U_O_V_Soldier_Viper_F", + "U_O_V_Soldier_Viper_hex_F", + "U_I_C_Soldier_Para_1_F", + "U_I_C_Soldier_Para_2_F", + "U_I_C_Soldier_Para_3_F", + "U_I_C_Soldier_Para_4_F", + "U_I_C_Soldier_Para_5_F", + "U_I_C_Soldier_Bandit_1_F", + "U_I_C_Soldier_Bandit_2_F", + "U_I_C_Soldier_Bandit_3_F", + "U_I_C_Soldier_Bandit_4_F", + "U_I_C_Soldier_Bandit_5_F", + "U_I_C_Soldier_Camo_F", + "U_C_man_sport_1_F", + "U_C_man_sport_2_F", + "U_C_man_sport_3_F", + "U_C_Man_casual_1_F", + "U_C_Man_casual_2_F", + "U_C_Man_casual_3_F", + "U_C_Man_casual_4_F", + "U_C_Man_casual_5_F", + "U_C_Man_casual_6_F", + "U_B_CTRG_Soldier_urb_1_F", + "U_B_CTRG_Soldier_urb_2_F", + "U_B_CTRG_Soldier_urb_3_F" + ]; + blck_SkinList_blue = blck_SkinList; + blck_SkinList_red = blck_SkinList; + blck_SkinList_green = blck_SkinList; + blck_SkinList_orange = blck_SkinList; + + blck_vests = [ + "V_Press_F", + "V_Rangemaster_belt", + "V_TacVest_blk", + "V_TacVest_blk_POLICE", + "V_TacVest_brn", + "V_TacVest_camo", + "V_TacVest_khk", + "V_TacVest_oli", + "V_TacVestCamo_khk", + "V_TacVestIR_blk", + "V_I_G_resistanceLeader_F", + "V_BandollierB_blk", + "V_BandollierB_cbr", + "V_BandollierB_khk", + "V_BandollierB_oli", + "V_BandollierB_rgr", + "V_Chestrig_blk", + "V_Chestrig_khk", + "V_Chestrig_oli", + "V_Chestrig_rgr", + "V_HarnessO_brn", + "V_HarnessO_gry", + "V_HarnessOGL_brn", + "V_HarnessOGL_gry", + "V_HarnessOSpec_brn", + "V_HarnessOSpec_gry", + "V_PlateCarrier1_blk", + "V_PlateCarrier1_rgr", + "V_PlateCarrier2_rgr", + "V_PlateCarrier3_rgr", + "V_PlateCarrierGL_blk", + "V_PlateCarrierGL_mtp", + "V_PlateCarrierGL_rgr", + "V_PlateCarrierH_CTRG", + "V_PlateCarrierIA1_dgtl", + "V_PlateCarrierIA2_dgtl", + "V_PlateCarrierIAGL_dgtl", + "V_PlateCarrierIAGL_oli", + "V_PlateCarrierL_CTRG", + "V_PlateCarrierSpec_blk", + "V_PlateCarrierSpec_mtp", + #ifdef useAPEX + //Apex + "V_TacChestrig_grn_F", + "V_TacChestrig_oli_F", + "V_TacChestrig_cbr_F", + "V_PlateCarrier1_tna_F", + "V_PlateCarrier2_tna_F", + "V_PlateCarrierSpec_tna_F", + "V_PlateCarrierGL_tna_F", + "V_HarnessO_ghex_F", + "V_HarnessOGL_ghex_F", + "V_BandollierB_ghex_F", + "V_TacVest_gen_F", + "V_PlateCarrier1_rgr_noflag_F", + #endif + "V_PlateCarrier2_rgr_noflag_F" + ]; + blck_vests_blue = blck_vests; + blck_vests_red = blck_vests; + blck_vests_green = blck_vests; + blck_vests_orange = blck_vests; + + //CraftingFood + blck_Meats=[ + + ]; + blck_Drink = [ + "Exile_Item_PlasticBottleCoffee", + "Exile_Item_PowerDrink", + "Exile_Item_PlasticBottleFreshWater", + "Exile_Item_Beer", + "Exile_Item_EnergyDrink", + "Exile_Item_MountainDupe" + ]; + blck_Food = [ + "Exile_Item_EMRE", + "Exile_Item_GloriousKnakworst", + "Exile_Item_Surstromming", + "Exile_Item_SausageGravy", + "Exile_Item_Catfood", + "Exile_Item_ChristmasTinner", + "Exile_Item_BBQSandwich", + "Exile_Item_Dogfood", + "Exile_Item_BeefParts", + "Exile_Item_Cheathas", + "Exile_Item_Noodles", + "Exile_Item_SeedAstics", + "Exile_Item_Raisins", + "Exile_Item_Moobar", + "Exile_Item_InstantCoffee" + ]; + #ifdef blck_addCarParts + blck_carParts = [ + "Exile_Item_CarWheel", + "DDR_Item_Tailrotor", + "DDR_Item_Main_Rotor", + "DDR_Item_Engine", + "DDR_Item_Glass", + "DDR_Item_Fuel_Tank", + "DDR_Item_Fishing_Net", + "DDR_Item_Fiberglass" + ]; + #endif + #ifdef useCUP + + #endif + + #ifdef useRHS + + #endif + 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"]; + blck_explosives = blck_throwableExplosives + blck_otherExplosives; + blck_medicalItems = ["Exile_Item_InstaDoc","Exile_Item_Bandage","Exile_Item_Vishpirin"]; + blck_specialItems = blck_throwableExplosives + blck_medicalItems; + + blck_NVG = ["NVGoggles","NVGoggles_INDEP","NVGoggles_OPFOR","Exile_Item_XM8"]; + blck_buildingMaterials = ["Exile_Item_ExtensionCord","Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_MetalBoard", + "Exile_Item_MetalPole","Exile_Item_MetalScrews","Exile_Item_Cement","Exile_Item_Sand","Exile_Item_MetalWire","Exile_Item_ExtensionCord","Exile_Item_JunkMetal"]; + blck_tools = ["Exile_Item_Matches","Exile_Item_CookingPot","Exile_Melee_Axe","Exile_Melee_SledgeHammmer","Exile_Item_Handsaw","Exile_Item_Pliers","Exile_Item_CanOpener","Exile_Item_Shovel"]; + +/*************************************************************************************** +DEFAULT CONTENTS OF LOOT CRATES FOR EACH MISSION +Note however that these configurations can be used in any way you like or replaced with mission-specific customized loot arrays +for examples of how you can do this see \Major\Compositions.sqf +***************************************************************************************/ + + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + blck_lootCountsOrange = [8,32,8,30,16,1]; // Orange + blck_lootCountsGreen = [7,24,6,16,18,1]; // Green + blck_lootCountsRed = [5,16,4,10,6,1]; // Red + blck_lootCountsBlue = [4,12,3,6,6,1]; // Blue + + blck_BoxLoot_Orange = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + #ifdef blck_useLAGO + "LAGO_KU3K","LAGO_KU3K", + #endif + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["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"] + ], + [//Magazines + #ifdef blck_useLAGO + ["AP_MAG",3,6], + ["HE_MAG",3,6], + ["LAGO_KU3K_magazine",3,6], + //["LAGO_KU5K_MAG_T",3,6], + //["LAGO_KU5K_MAG_H",3,6], + //["LAGO_KU5K_MAG_buck",3,6], + //["KUoooK_MAG",3,6], + //["KUoooK_MAG_buck",3,6], + //["KUoooK_MAG_Cluster",3,6], + //["KUoooK_MAG_HE",3,6], + //["LAGO_TWP_magazine",3,6], + #endif + ["3rnd_HE_Grenade_Shell",3,6], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",7,14], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,5], + // Marksman Pack Ammo + ["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], + ["optic_Arco",1,3], + ["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// Materials and supplies + #ifdef blck_addCarParts + ["Exile_Item_CarWheel",3,6],["DDR_Item_Tailrotor",1,3],["DDR_Item_Main_Rotor",1,3],["DDR_Item_Engine",2,4],["DDR_Item_Glass",3,6],["DDR_Item_Fuel_Tank",2,4],["DDR_Item_Fiberglass",3,6], + #endif + ["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_WorkBenchKit",1,10], + ["Exile_Item_WoodWindowKit",1,10],["Exile_Item_WoodWallKit",1,10],["Exile_Item_WoodStairsKit",1,10],["Exile_Item_WoodGateKit",1,10],["Exile_Item_WoodDoorwayKit",1,10],["Exile_Item_MetalBoard",1,10], + ["Exile_Item_MetalBoard",1,10],["Exile_Item_ExtensionCord",1,10],["Exile_Item_MetalPole",1,10],["Exile_Item_Sand",3,10],["Exile_Item_Cement",3,10],["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Green = + [ + [// Weapons + // Format is ["Weapon Name","Magazine Name"], + #ifdef useAPEX + "arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F", + "arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F", + "arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F", + "arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F", + #endif + #ifdef blck_useLAGO + "LAGO_KU3K","LAGO_KU3K", + #endif + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["srifle_DMR_02_camo_F","10Rnd_338_Mag"], + ["srifle_DMR_03_F","10Rnd_338_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_05_hex_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + ], + [//Magazines + #ifdef blck_useLAGO + ["LAGO_KU3K_magazine",3,6], + #endif + // Format is ["Magazine name, Minimum number to add, Maximum number to add], + ["3rnd_HE_Grenade_Shell",2,4], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",6,12], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,3], + ["HandGrenade",1,3], + // Marksman Pack Ammo + ["10Rnd_338_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + ["130Rnd_338_Mag",3,5], + // Apex Ammo + ["130Rnd_338_Mag",1,3], + ["150Rnd_93x64_Mag",1,3] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// Materials and supplies + #ifdef blck_addCarParts + ["Exile_Item_CarWheel",3,6],["DDR_Item_Tailrotor",1,3],["DDR_Item_Main_Rotor",1,3],["DDR_Item_Engine",2,4],["DDR_Item_Glass",3,6],["DDR_Item_Fuel_Tank",2,4],["DDR_Item_Fiberglass",3,6], + #endif + ["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,5],["Exile_Item_LightBulb",1,5],["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_CamoTentKit",1,5],["Exile_Item_WorkBenchKit",1,5], + ["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10],["Exile_Item_ExtensionCord",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_Sand",2,5],["Exile_Item_Cement",2,5] + ], + [//Items + ["Exile_Item_InstaDoc",1,2],["NVGoggles",1,2],["Rangefinder",1,2],["Exile_Item_Bandage",1,6],["Exile_Item_Vishpirin",1,6], + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Blue = + [ + [// Weapons + #ifdef blck_useLAGO + "LAGO_KU3K","LAGO_KU3K", + #endif + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"] + ], + [//Magazines + #ifdef blck_useLAGO + ["LAGO_KU3K_magazine",3,6], + #endif + ["3rnd_HE_Grenade_Shell",1,2], + ["30Rnd_65x39_caseless_green",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_556x45_Stanag",3,6], + ["30Rnd_45ACP_Mag_SMG_01",3,6], + ["20Rnd_556x45_UW_mag",3,6], + ["20Rnd_762x51_Mag",3,10], + ["200Rnd_65x39_cased_Box",3,6], + ["100Rnd_65x39_caseless_mag_Tracer",3,6], + ["3rnd_HE_Grenade_Shell",1,4], + ["HandGrenade",1,3], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// Materials and supplies + #ifdef blck_addCarParts + ["Exile_Item_CarWheel",3,6],["DDR_Item_Tailrotor",1,3],["DDR_Item_Main_Rotor",1,3],["DDR_Item_Engine",2,4],["DDR_Item_Glass",3,6],["DDR_Item_Fuel_Tank",2,4],["DDR_Item_Fiberglass",3,6], + #endif + ["Exile_Item_Matches",1,2],["Exile_Item_CookingPot",1,2],["Exile_Item_Rope",1,2],["Exile_Item_DuctTape",1,3],["Exile_Item_ExtensionCord",1,2],["Exile_Item_FuelCanisterEmpty",1,2], + ["Exile_Item_JunkMetal",1,6],["Exile_Item_LightBulb",1,6],["Exile_Item_MetalBoard",1,6],["Exile_Item_MetalPole",1,6],["Exile_Item_CamoTentKit",1,6],["Exile_Item_MetalWire",1,4] + ], + [//Items + ["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 + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + blck_BoxLoot_Red = + [ + [// Weapons + #ifdef blck_useLAGO + "LAGO_KU3K","LAGO_KU3K", + #endif + ["arifle_Katiba_F","30Rnd_65x39_caseless_green"], + ["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"], + ["arifle_Mk20_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20C_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"], + ["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"], + ["arifle_MX_F","30Rnd_65x39_caseless_mag"], + ["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"], + //["arifle_MX_SW_Black_Hamr_pointer_F","100Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXC_F","30Rnd_65x39_caseless_mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag"], + ["arifle_SDAR_F","20Rnd_556x45_UW_mag"], + ["arifle_TRG20_F","30Rnd_556x45_Stanag"], + ["SMG_02_F","30Rnd_9x21_Mag"], + ["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"], + ["Hgun_PDW2000_F","30Rnd_9x21_Mag"], + ["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"], + ["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"], + ["srifle_DMR_01_F","10Rnd_762x54_Mag"], + ["srifle_LRR_F","7Rnd_408_Mag"], + ["srifle_EBR_F","20Rnd_762x51_Mag"], + ["srifle_GM6_F","5Rnd_127x108_APDS_Mag"], + ["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"], + ["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"], + ["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"], + ["LMG_Zafir_F","150Rnd_762x54_Box"], + ["MMG_01_hex_F","150Rnd_93x64_Mag"], + ["srifle_DMR_04_Tan_F","10Rnd_338_Mag"], + ["srifle_DMR_06_camo_F","10Rnd_338_Mag"] + ], + [//Magazines + #ifdef blck_useLAGO + ["LAGO_KU3K_magazine",3,6], + #endif + ["3rnd_HE_Grenade_Shell",1,5],["30Rnd_65x39_caseless_green",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_556x45_Stanag",3,6],["30Rnd_45ACP_Mag_SMG_01",3,6],["20Rnd_556x45_UW_mag",3,6], + ["10Rnd_762x51_Mag",3,6],["20Rnd_762x51_Mag",3,7],["200Rnd_65x39_cased_Box",3,6],["100Rnd_65x39_caseless_mag_Tracer",3,6], + // Marksman Pack Ammo + ["150Rnd_93x64_Mag",1,4], + ["10Rnd_338_Mag",1,4], + ["10Rnd_127x54_Mag" ,1,4], + ["10Rnd_127x54_Mag",1,4], + ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ], + [ // 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], + ["optic_Arco",1,3],["optic_Hamr",1,3],["optic_Aco",1,3],["optic_ACO_grn",1,3],["optic_Aco_smg",1,3],["optic_ACO_grn_smg",1,3], + ["optic_Holosight",1,3],["optic_Holosight_smg",1,3],["optic_SOS",1,3],["optic_MRCO",1,3],["optic_DMS",1,3],["optic_Yorris",1,3], + ["optic_MRD",1,3],["optic_LRPS",1,3],["optic_NVS",1,3],["optic_Nightstalker",1,2], + ["optic_tws",1,3],["optic_tws_mg",1,3],["muzzle_snds_H",1,3],["muzzle_snds_L",1,3],["muzzle_snds_M",1,3],["muzzle_snds_B",1,3],["muzzle_snds_H_MG",1,3],["muzzle_snds_acp",1,3], + ["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] + ], + [// Materials and supplies + #ifdef blck_addCarParts + ["Exile_Item_CarWheel",3,6],["DDR_Item_Tailrotor",1,3],["DDR_Item_Main_Rotor",1,3],["DDR_Item_Engine",2,4],["DDR_Item_Glass",3,6],["DDR_Item_Fuel_Tank",2,4],["DDR_Item_Fiberglass",3,6], + #endif + ["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,5],["Exile_Item_LightBulb",1,5],["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_CamoTentKit",1,5],["Exile_Item_WorkBenchKit",1,5], + ["Exile_Item_MetalBoard",1,5],["Exile_Item_MetalWire",3,10],["Exile_Item_MetalScrews",3,10],["Exile_Item_ExtensionCord",1,5],["Exile_Item_MetalPole",1,5],["Exile_Item_Sand",2,5],["Exile_Item_Cement",2,5] + ], + [//Items + ["Exile_Item_InstaDoc",1,2],["NVGoggles",1,2],["Exile_Item_Energydrink",1,4],["Exile_Item_Beer",1,3],["Rangefinder",1,2], + ["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] + ], + [ // Backpacks + ["B_AssaultPack_dgtl",1,2],["B_AssaultPack_khk",1,2],["B_AssaultPack_mcamo",1,2],["B_AssaultPack_cbr",1,2],["B_AssaultPack_rgr",1,2],["B_AssaultPack_sgg",1,2], + ["B_Carryall_cbr",1,2],["B_Carryall_khk",1,2],["B_Carryall_mcamo",1,2],["B_Carryall_ocamo",1,2],["B_Carryall_oli",1,2],["B_Carryall_oucamo",1,2], + ["B_FieldPack_blk",1,2],["B_FieldPack_cbr",1,2],["B_FieldPack_ocamo",1,2],["B_FieldPack_oucamo",1,2], + ["B_Kitbag_cbr",1,2],["B_Kitbag_mcamo",1,2],["B_Kitbag_sgg",1,2], + ["B_Parachute",1,2],["V_RebreatherB",1,2],["V_RebreatherIA",1,2],["V_RebreatherIR",1,2], + ["B_TacticalPack_blk",1,2],["B_TacticalPack_mcamo",1,2],["B_TacticalPack_ocamo",1,2],["B_TacticalPack_oli",1,2],["B_TacticalPack_rgr",1,2], + ["B_Bergen_blk",1,2],["B_Bergen_mcamo",1,2],["B_Bergen_rgr",1,2],["B_Bergen_sgg",1,2], + ["B_HuntingBackpack",1,2],["B_OutdoorPack_blk",1,2],["B_OutdoorPack_blu",1,2],["B_OutdoorPack_tan",1,2] + ] + ]; + + + +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 + #ifdef blck_useLAGO + ["LAGO_KU3K_magazine",3,6], + #endif + ["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. + + diag_log format["[blckeagls] Configurations for Exile Loaded"]; + diff --git a/Server/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf b/Server/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf new file mode 100644 index 0000000..6c6bf67 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf @@ -0,0 +1,439 @@ +/* + 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"; + #include "\q\addons\custom_server\init\build.sqf" + diag_log format["[blckeagls] Loading blck_configs_mil.sqf for Militarized Servers for blckeagls build %1",blck_buildNumber]; + + /*************************************************************** + BLCKEAGLS SUPPLEMENTAL MODULES + **************************************************************** + Configuration for Addons that support the overall Mission system. + These are: + 1) a module to spawn map addons generated with the Eden Editor + 2) And a moduel to spawn static loot crates at specific location + 3) A time acceleration module. + */ + + blck_spawnMapAddons = true; // When true map addons will be spawned based on parameters define in custum_server\MapAddons\MapAddons_init.sqf + blck_spawnStaticLootCrates = true; // When true, static loot crates will be spawned and loaded with loot as specified in custom_server\SLS\SLS_init_Epoch.sqf (or its exile equivalent). + blck_simulationManager = blck_useBlckeaglsSimulationManagement; + //diag_log format["[blckeagls] blck_configs: blck_simulationManager = %1",blck_simulationManager]; + // 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 = 2; // Daytime time accelearation + blck_timeAccelerationDusk = 4; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 8; // Nighttim time acceleration + + /************************************************************** + + BLACKLIST LOCATIONS + + **************************************************************/ + // if true then missions will not spawn within 1000 m of spawn points for Altis, Bornholm, Cherno, Esseker or stratis. + blck_blacklistTraderCities = true; // Set this = true if you would like the mission system to automatically search for the locations of the Epoch/Exile trader cities. Note that these are added to the list of blacklisted locations for Epoch for the most common maps. + + /*********************************************************** + + GENERAL MISSION SYSTEM CONFIGURATION + + ***********************************************************/ + //////// + // Client Offloading and Headless Client Configurations + blck_useHC = true; // Experimental (should be working). + + // Credit to Defent and eraser for their excellent work on scripts to transfer AI to clients for which these settings are required. + blck_ai_offload_to_client = false; // forces AI to be transfered to player's PCs. Disable if you have players running slow PCs. + // ******************************************************* + // Experimental; may cause issues with waypoints + // ******************************************************* + blck_ai_offload_notifyClient = false; // Set true if you want notifications when AI are offloaded to a client PC. Only for testing/debugging purposes. + blck_limit_ai_offload_to_blckeagls = true; // when true, only groups spawned by blckeagls are evaluated. + + /////////////////////////////// + // Kill message configurations + // These determine whether and when messages are sent to players regarding AI Kills or illegal kills that might damage a vehicle. + blck_useKillMessages = true; // when true a message will be broadcast to all players each time an AI is killed; may impact server performance. + blck_useKillScoreMessage = true; // when true a tile is displayed to the killer with the kill score information + blck_useIEDMessages = true; // Displayes a message when a player vehicle detonates and IED (such as would happen if a player killed AI with a forbidden weapon). + + /////////////////////////////// + // MISSION MARKER CONFIGURATION + // blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type + //When set to true,"arrow", text will be to the right of an arrow below the mission marker. + // When set to true,"dot", ext will be to the right of a black dot at the center the mission marker. + blck_labelMapMarkers = [true,"center"]; + blck_preciseMapMarkers = false; // Map markers are/are not centered at the loot crate + blck_showCountAliveAI = true; + + //Minimum distance between missions + blck_MinDistanceFromMission = 1500; + blck_minDistanceToBases = 900; + blck_minDistanceToPlayer = 900; + blck_minDistanceFromTowns = 300; + + /////////////////////////////// + // Mission Smoke and Signals + /////////////////////////////// + + // global loot crate options + // Options to spawn a smoking wreck near the crate. When the first parameter is true, a wreck or junk pile will be spawned. + // It's position can be either "center" or "random". smoking wreck will be spawned at a random location between 15 and 50 m from the mission. + blck_SmokeAtMissions = [false,"random"]; // set to [false,"anything here"] to disable this function altogether. + blck_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion. + + /////////////////////////////// + // General Mission Completion and Loot Settings + /////////////////////////////// + blck_missionEndCondition = "playerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" + blck_killPercentage = 0.99999999999; // 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","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 + blck_allowClaimVehicle = true; // Set this to true if you wish to allow players to claim vehicles using one of the claim vehicle scripts floating around. + + /////////////////////////////// + // PLAYER PENALTIES + /////////////////////////////// + + blck_RunGear = true; // When set to true, AI that have been run over will ve stripped of gear, and the vehicle will be given blck_RunGearDamage of damage. + blck_RunGearDamage = 0.2; // Damage applied to player vehicle for each AI run over + blck_VK_Gear = true; // When set to true, AI that have been killed by a player in a vehicle in the list of forbidden vehicles or using a forbiden gun will be stripped of gear and the vehicle will be given blck_RunGearDamage of damage + blck_VK_RunoverDamage = true; // when the AI was run over blck_RunGearDamage of damage will be applied to the killer's vehicle. + blck_VK_GunnerDamage = false; // when the AI was killed by a gunner on a vehicle that is is in the list of forbidden vehicles, blck_RunGearDamage of damage will be applied to the killer's vehicle each time an AI is killed with a vehicle's gun. + blck_forbidenVehicles = []; // 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 = []; // Add any vehicles for which you wish to forbid vehicle kills, o + + + /////////////////////////////// + // MISC MISSION PARAMETERS + /////////////////////////////// + blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player, distance and name of AI unit killed are shown. + blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Turn this off if you have vehicle patrols. + blck_cleanupCompositionTimer = 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_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. + + /////////////////////////////// + // Paratroop Settings + // AI paratrooper reinforcement paramters + // The behavior of these can be linked to some degree to the spawning of patrolling helis. + // For example, if you always want a helicopter to spawn paratroops set the value 1. + // If you never want paratroops to spawn them set the value to 0. + // Recommended that you disable paratroops if using muliple aircraft/vehicle patrols + blck_chanceParaBlue = 0; // [0 - 1] set to 0 to deactivate and 1 to always have paratroops spawn over the center of the mission. + blck_noParaBlue = 3; // [1-N] + + blck_chanceParaRed = 0; + blck_noParaRed = 3; + + blck_chanceParaGreen = 0; + blck_noParaGreen = 4; + + blck_chanceParaOrange = 0; + blck_noParaOrange = 4; + + // Supplemental Loot Parameters. + + /////////////////////////////// + // Heli Patrol Heli Types + // Armed Helis + ////////////////////////////// + blck_littleBirds = ["B_Heli_Light_01_armed_F"]; // AH-9 Pawnee (WEST) + blck_armed_hellcats = ["I_Heli_light_03_F"]; + blck_armed_orcas = ["O_Heli_Light_02_F","O_Heli_Light_02_v2_F"]; + blck_armed_ghosthawks = ["B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F"]; + blck_armed_hurons = ["B_Heli_Transport_03_F","B_Heli_Transport_03_black_F"]; + blck_armed_attackHelis = ["B_Heli_Attack_01_F"]; + blck_armed_heavyAttackHelis = ["O_Heli_Attack_02_F","O_Heli_Attack_02_black_F"]; + blck_fighters = [ + //"O_Plane_CAS_02_F", // /ti-199 Neophron (CAS) + "I_Plane_Fighter_03_AA_F", // A-143 Buzzard (AA) + //"I_Plane_Fighter_04_F", // A-149 Gryphon + //"B_Plane_CAS_01_F", // A-164 Wipeout (CAS) + "B_Plane_Fighter_01_F" // F/A-181 Black Wasp II + ]; + /* + _blck_UAVs = [ + "I_UAV_02_CAS_F", + "I_UAV_02_F", + "B_UAV_02_CAS_F", + "B_UAV_02_F",, + "O_UAV_02_CAS_F", + "O_UAV_02_F" + ]; + */ + blck_blacklisted_heli_ammo = []; + blck_blacklisted_heli_weapons = []; + + + /////////////////////////////// + // Heli Patrol Settings + /////////////////////////////// + + 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 = 0; + + blck_chanceHeliPatrolRed = 0.8; // 0.4; + blck_patrolHelisRed = blck_armed_hellcats; + blck_noPatrolHelisRed = 1; + + blck_chanceHeliPatrolGreen = 0.9999; + blck_patrolHelisGreen = blck_armed_ghosthawks; + blck_noPatrolHelisGreen = [1,3]; + + blck_chanceHeliPatrolOrange = 0.9999; + 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 = 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 = 2; // Values from 0 (no UMS) to N (N Underwater missions will be spawned; static UMS units and subs will be spawned. + + //////////////////// + // MISSION TIMERS + //////////////////// + + // Reduce to 1 sec for immediate spawns, or longer if you wish to space the missions out + blck_TMin_Orange = 250; + blck_TMin_Green = 200; + blck_TMin_Blue = 120; + blck_TMin_Red = 150; + blck_TMin_UMS = 180; + + //Maximum Spawn time between missions in seconds + blck_TMax_Orange = 360; + blck_TMax_Green = 300; + blck_TMax_Blue = 200; + blck_TMax_Red = 250; + blck_TMax_UMS = 200; + + /////////////////////////////// + // AI VEHICLE PATROL PARAMETERS + /////////////////////////////// + + blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area. + blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out 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 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 + + blck_vehCrew_blue = 3; // can be formated as a single value or a range such as [3,5]; + blck_vehCrew_red = 3; + blck_vehCrew_green = 3; + blck_vehCrew_orange = 3; + + /////////////////////////////// + // 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 + blck_killEmptyStaticWeapons = true; // When true, static weapons will have damage set to 1 when the AI manning them is killed. + // 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] + + // 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 + blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions + blck_SpawnEmplaced_Red = 2; // Number of static weapons at Red Missions + + + + /**************************************************************** + + GENERAL AI SETTINGS + + ****************************************************************/ + // When true, AI loadouts will be set from the class names in CfgPricing rather than the settings in the mod-specific configuration files + blck_useConfigsGeneratedLoadouts = true; + blck_logblacklisteditems = true; + //blck_maximumitempriceinai_loadouts = 1000; + // lists of black-listed items to be excluded from dynamic loadouts + blck_blacklistedVests = [ + //"V_Press_F" + ]; + + blck_blacklistedUniforms = [ + "U_I_Protagonist_VR", + "U_C_Protagonist_VR", + "U_O_Protagonist_VR", + "U_B_Protagonist_VR", + "Exile_Uniform_BambiOverall", + "Exile_Uniform_ExileCustoms" + ]; + + blck_blacklistedBackpacks = [ + //"B_ViperLightHarness_blk_F" + ]; + + blck_blacklistedHeadgear = [ + "H_HelmotO_ViperSP_ghex_F", + "H_HelmetO_VierSP_hex" + ]; + + blck_blacklistedPrimaryWeapons = [ + //"srifle_LRR_tna_F" + ]; + + blck_blacklistedSecondaryWeapons = [ + "hgun_Pistol_heav_02_F" + ]; + + blck_blacklistedLaunchersAndSwingWeapons = [ + + ]; + + blck_blacklistedOptics = [ + //"optic_tws" + ]; + + blck_blacklistedAttachments = [ + + ]; + + blck_blacklistedItems = [ + + ]; + ///////////////////////////////////////////// + + blck_groupBehavior = "SAFE"; // https://community.bistudio.com/wiki/ArmA:_AI_Combat_Modes + blck_combatMode = "RED"; // Change this to "YELLOW" if the AI wander too far from missions for your tastes. + blck_groupFormation = "WEDGE"; // Possibilities include "WEDGE","VEE","FILE","DIAMOND" + + blck_useSmokeWhenHealing = true; // when true, injured AI will toss a smoke when they attempt to heal. + blck_addAIMoney = true; + blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack + blck_useNVG = true; // When true, AI will be spawned with NVG if is dark + blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed. + blck_useLaunchers = true; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now + blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F"]; + //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 = 80*60; // time in seconds after which dead AI bodies are deleted + + // Each time an AI is killed, the location of the killer will be revealed to all AI within this range of the killed AI, set to -1 to disable + // values are ordered as follows [blue, red, green, orange]; + blck_AliveAICleanUpTimer = 20*60; // Time after mission completion at which any remaining live AI are deleted. + + // How precisely player locations will be revealed to AI after an AI kill + // values are ordered as follows [blue, red, green, orange]; + blck_AIAlertDistance = [250,425,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. + //blck_AIAlertDistance = [150,225,400,500]; + // How precisely player locations will be revealed to AI after an AI kill + // values are ordered as follows [blue, red, green, orange]; + blck_AIIntelligence = [0.3, 0.5, 0.7, 0.9]; + + blck_baseSkill = 1.0; // The overal skill of the AI - range 0.1 to 1.0. + + /*************************************************************** + + MISSION TYPE SPECIFIC AI SETTINGS + + **************************************************************/ + //This defines the skill, minimum/Maximum number of AI and how many AI groups are spawned for each mission type + // Orange Missions + blck_MinAI_Orange = 20; + blck_MaxAI_Orange = 25; + blck_AIGrps_Orange = 5; + blck_SkillsOrange = [ + ["aimingAccuracy",0.6],["aimingShake",0.9],["aimingSpeed",0.9],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] + ]; + + // Green Missions + blck_MinAI_Green = 16; + blck_MaxAI_Green = 21; + blck_AIGrps_Green = 4; + blck_SkillsGreen = [ + ["aimingAccuracy",0.55],["aimingShake",0.75],["aimingSpeed",0.85],["endurance",0.9],["spotDistance",0.9],["spotTime",0.9],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75] + ]; + + // Red Missions + blck_MinAI_Red = 12; + blck_MaxAI_Red = 15; + blck_AIGrps_Red = 3; + blck_SkillsRed = [ + ["aimingAccuracy",0.4],["aimingShake",0.6],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.8],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70] + ]; + + // Blue Missions + blck_MinAI_Blue = 8; + blck_MaxAI_Blue = 12; + blck_AIGrps_Blue = 2; + blck_SkillsBlue = [ + ["aimingAccuracy",0.1],["aimingShake",0.5],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] + ]; + + // Add some money to AI; only works with Exile for now. + blck_maxMoneyOrange = 50; + blck_maxMoneyGreen = 40; + blck_maxMoneyRed = 30; + blck_maxMoneyBlue = 20; + + if (toLower(blck_modType) isEqualTo "epoch") then + { + diag_log format["[blckeagls] Loading Mission System using Parameters for %1 for militarized servers",blck_modType]; + execVM "\q\addons\custom_server\Configs\blck_configs_epoch_mil.sqf"; + }; + if (toLower(blck_modType) isEqualTo "exile") then + { + diag_log format["[blckeagls] Loading Mission System using Parameters for %1 for militarized servers",blck_modType]; + execVM "\q\addons\custom_server\Configs\blck_configs_exile_mil.sqf"; + }; + //waitUntil{!isNil "blck_useConfigsGeneratedLoadouts"}; + //waitUntil {!isNil "blck_maximumItemPriceInAI_Loadouts"}; + uiSleep 10; + if (blck_useConfigsGeneratedLoadouts) then + { + diag_log format["[blckeagls] Dynamic Configs Enabled"]; + execVM "\q\addons\custom_server\Configs\blck_dynamicConfigs.sqf"; + }; + + blck_configsLoaded = true; diff --git a/Server/@GMS/addons/custom_server/Configs/blck_custom_config.sqf b/Server/@GMS/addons/custom_server/Configs/blck_custom_config.sqf new file mode 100644 index 0000000..bb4a64a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_custom_config.sqf @@ -0,0 +1,1364 @@ + +/* + for ghostridergaming + By Ghostrider [GRG] + Copyright 2016 + Last Modified 3-14-17 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +diag_log "[blckeagls] Loading Configuration Overides"; + +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 = false; // 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 = false; // 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 = 1.5; // Daytime time accelearation + blck_timeAccelerationDusk = 6; // Dawn/dusk time accelearation + blck_timeAccelerationNight = (12); // 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; + systemChat format["%1",_daylight]; + systemChat format["TimeAcelDay = %1", _daylight / 2.5]; + 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 = 1; + blck_enableBlueMissions = 1; + blck_numberUnderwaterDynamicMissions = 3; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = 1; + blck_maxCrashSites = 3; + }; + case "lythium": + { + 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 = 5.5; // Daytime time accelearation + blck_timeAccelerationDusk = 7; // Dawn/dusk time accelearation + blck_timeAccelerationNight = 8; // Nighttim time acceleration + blck_enableOrangeMissions = 1; + blck_enableGreenMissions = 1; + blck_enableRedMissions = 1; + blck_enableBlueMissions = 1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = 1; + blck_maxCrashSites = 3; + blck_numberUnderwaterDynamicMissions = -3; + }; +}; + +if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in \custom_server\compiles\blck_variables.sqf +{ + // Used primarily for debugging. + diag_log "[blckeagls] Debug seting is ON, Custom configurations used"; + + //blck_useTimeAcceleration = false; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. + //blck_timeAccelerationDay = 1; // Daytime time accelearation + //blck_timeAccelerationDusk = 18; // Dawn/dusk time accelearation + //blck_timeAccelerationNight = 24; // Nighttim time acceleration + + blck_useHC = true; + + blck_maxSpawnedMissions = 15; + blck_mainThreadUpdateInterval = 10; + blck_enableOrangeMissions = 1; + blck_enableGreenMissions = 1; + blck_enableRedMissions = 1; + blck_enableBlueMissions = 1; + blck_numberUnderwaterDynamicMissions = 1; + blck_enableHunterMissions = -1; + blck_enableScoutsMissions = -1; + blck_maxCrashSites = -3; + + //blck_killEmptyStaticWeapons = false; + //blck_killEmptyAIVehicles = true; + 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_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_chanceHeliPatrolBlue = 1; + //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 = 1; // Number of vehicles at Orange Missions + //blck_SpawnVeh_Green = 1; // Number of vehicles at Green Missions + //blck_SpawnVeh_Blue = 1; // Number of vehicles at Blue Missions + blck_SpawnVeh_Red = 1; + + blck_TMin_Blue = 7; + blck_TMin_Red = 10; + blck_TMin_Green = 13; + blck_TMin_Orange = 16; + blck_TMin_Hunter = 20; + blck_TMin_Scouts = 20; + blck_TMin_Crashes = 5; + blck_TMin_UMS = 20; + //Maximum Spawn time between missions in seconds + blck_TMax_Blue = 12; + blck_TMax_Red = 15; + blck_TMax_Green = 17; + blck_TMax_Orange = 21; + blck_TMax_Hunter = 22; + blck_TMax_Scouts = 22; + blck_TMax_Crashes = 15; + blck_TMax_UMS = 25; + + //blck_MinAI_Orange = 1; + //blck_MaxAI_Orange = 2; + //blck_AIGrps_Orange = 0; + + //blck_MinAI_Blue = 1; + //blck_MaxAI_Blue = 2; + //blck_AIGrps_Blue = 1; + + //blck_AIPatrolVehicles = ["Exile_Car_MB4WDOpen"]; + /* + blck_SkillsBlue = [ + ["aimingAccuracy",0.01], + ["aimingShake",0.01], + ["aimingSpeed",0.01], + ["endurance",0.01], + ["spotDistance",0.01], + ["spotTime",0.01], + ["courage",0.01], + ["reloadSpeed",0.80], + ["commanding",0.8], + ["general",1.00] + ]; + */ +}; + +#ifdef blck_useCUP +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" +]; +#endif + +#ifdef blck_useRHS +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" +]; +#endif + + +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/Server/@GMS/addons/custom_server/Configs/blck_defines.hpp b/Server/@GMS/addons/custom_server/Configs/blck_defines.hpp new file mode 100644 index 0000000..5570673 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_defines.hpp @@ -0,0 +1,59 @@ +/* + 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/ +*/ + +#define useAPEX +//#define blck_milServer +#define blck_useCUP +//#define blck_useRHS +//#define blck_useLAGO + +//////////////////////////// +// Do not touch anything below this line +/////////////////////////// + +//#define blck_debugMode +//#define GRGserver +//#define blck_addCarParts +#define blck_triggerLoopCompleteTime 40*60 +#define onFoot 1 +#define inVehicle 2 + +// defines for static group spawners +#define staticPatrolTriggerRange 2000 +#define groupParameters 0 +#define patrolGroup 1 +#define groupSpawned 2 +#define timesSpawned 3 +#define respawnAt 4 +#define blck_playerDetectionRangeAir 800 +#define blck_playerDetectionRangeGroundVehicle 400 +#define blck_vehiclePlayerDetectionOdds 0.6 +#define blck_playerDetectionRangeSubs 100 +#define blck_playerDetectionRangeSurfaceVehicle 150 +#define blck_simulationEnabledDistance 2500 +#define blck_simulationManagementOff 0 +#define blck_useBlckeaglsSimulationManager 1 +#define blck_useDynamicSimulationManagement 2 +#define blck_simulationManagementOff 0 +#define blck_useBlckeaglsSimulationManagement 1 +#define blck_useDynamicSimulationManagement 2 + +#define blck_maxPatrolRadiusHelisBlue 300 +#define blck_maxPatrolRadiusHelisRed 400 +#define blck_maxPatrolRadiusHelisGreen 500 +#define blck_maxPatrolRadiusHelisOrange 650 + +#define blck_turnBackRadiusInfantry 800 +#define blck_turnBackRadiusVehicles 1000 +#define blck_turnBackRadiusHelis 1000 +#define blck_turnBackRadiusJets 1500 diff --git a/Server/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf b/Server/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf new file mode 100644 index 0000000..c4c97b3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf @@ -0,0 +1,170 @@ +/* + 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"; + +blck_headgearList = []; +blck_SkinList = []; +blck_vests = []; +blck_backpacks = []; +blck_Pistols = []; +blck_primaryWeapons = []; +//blck_throwable = []; + +_allWeaponRoots = ["Pistol","Rifle","Launcher"]; +_allWeaponTypes = ["AssaultRifle","MachineGun","SniperRifle","Shotgun","Rifle","Pistol","SubmachineGun","Handgun","MissileLauncher","RocketLauncher","Throw","GrenadeCore"]; +_addedBaseNames = []; +_allBannedWeapons = []; +_wpnAR = []; //Assault Rifles +_wpnARG = []; //Assault Rifles with GL +_wpnLMG = []; //Light Machine Guns +_wpnSMG = []; //Sub Machine Guns +_wpnDMR = []; //Designated Marksman Rifles +_wpnLauncher = []; +_wpnSniper = []; //Sniper rifles +_wpnHandGun = []; //HandGuns/Pistols +_wpnShotGun = []; //Shotguns +_wpnThrow = []; // throwables +_wpnUnknown = []; //Misc +_wpnUnderbarrel = []; +_wpnMagazines = []; +_wpnOptics = []; +_wpnPointers = []; +_wpnMuzzles = []; +_allBannedWearables = []; +_uniforms = []; +_headgear = []; +_glasses = []; +_masks = []; +_backpacks = []; +_vests = []; +_goggles = []; +_NVG = []; +_misc = []; +_baseClasses = []; + +_classnameList = []; +//diag_log format["blck_modType = %1",blck_modType]; +if (toLower(blck_modType) isEqualTo "epoch") then +{ + _classnameList = (missionConfigFile >> "CfgPricing" ) call BIS_fnc_getCfgSubClasses; +}; +if (toLower(blck_modType) isEqualTo "exile") then +{ + _classnameList = (missionConfigFile >> "CfgExileArsenal" ) call BIS_fnc_getCfgSubClasses; +}; +//diag_log format["_fnc_dynamicConfigsConfigurator: count _classnameList = %1",count _classnameList]; +{ + private _temp = [_x] call bis_fnc_itemType; + //diag_log _temp; + _itemCategory = _temp select 0; + _itemType = _temp select 1; + _price = blck_maximumItemPriceInAI_Loadouts; + if (toLower(blck_modType) isEqualTo "epoch") then + { + _price = getNumber(missionConfigFile >> "CfgPricing" >> _x >> "price"); + }; + if (toLower(blck_modType) isEqualTo "exile") then + { + _price = getNumber(missionConfigFile >> "CfgExileArsenal" >> _x >> "price"); + }; + if (_price < blck_maximumItemPriceInAI_Loadouts && !(["base",_x] call BIS_fnc_inString)) then + { + if (_itemCategory isEqualTo "Weapon") then + { + switch (_itemType) do + { + case "AssaultRifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnAR pushBack _x} else {if (blck_logBlacklistedItems) then {diag_log format["Assualt Rifle %1 Excluded: blacklisted Item",_x]}}}; + case "MachineGun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnLMG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Machine Gun %1 Excluded: blacklisted Item",_x]}}}; + case "SubmachineGun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnSMG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Submachinegun %1 Excluded: blacklisted Item",_x]}}}; + case "Shotgun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnShotGun pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Shotgun %1 Excluded: blacklisted Item",_x]}}}; + case "Rifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnAR pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Rifle %1 Excluded: blacklisted Item",_x]}}}; + case "SniperRifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnSniper pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Sniper Rifle %1 Excluded: blacklisted Item",_x]}}}; + case "Handgun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnHandGun pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Handgun %1 Excluded: blacklisted Item",_x]}}}; + case "Launcher": {if !(_x in blck_blacklistedLaunchersAndSwingWeapons) then {_wpnLauncher pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Launcher %1 Excluded: blacklisted Item",_x]}}}; + case "RocketLauncher": {if !(_x in blck_blacklistedLaunchersAndSwingWeapons) then {_wpnLauncher pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Rocket Launcer %1 Excluded: blacklisted Item",_x]}}}; + case "Throw": {if !(_x in blck_blacklistedItems) then {_wpnThrow pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Throw %1 Excluded: blacklisted Item",_x]}}}; + }; + }; + + if (_itemCategory isEqualTo "Item") then + { + switch (_itemType) do + { + case "AccessoryMuzzle": {if !(_x in blck_blacklistedAttachments) then {_wpnMuzzles pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Muzzle %1 Excluded: blacklisted Item",_x]}}}; + case "AccessoryPointer": {if !(_x in blck_blacklistedAttachments) then {_wpnPointers pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Pointer %1 Excluded: blacklisted Item",_x]}}}; + case "AccessorySights": {if !(_x in blck_blacklistedOptics) then {_wpnOptics pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Optic %1 Excluded: blacklisted Item",_x]}}}; + case "AccessoryBipod": {if !(_x in blck_blacklistedAttachments) then {_wpnUnderbarrel pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Bipod %1 Excluded: blacklisted Item",_x]}}}; + case "Binocular": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Binocular/Rangefinder/Binocular %1 Excluded: blacklisted Item",_x]}}}; + case "Compass": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Compass %1 Excluded: blacklisted Item",_x]}}}; + case "GPS": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["GPS %1 Excluded: blacklisted Item",_x]}}}; + case "NVGoggles": {if !(_x in blck_blacklistedItems) then {_NVG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["NVG %1 Excluded: blacklisted Item",_x]}}}; + }; + }; + + + if (_itemCategory isEqualTo "Equipment") then + { + switch (_itemType) do + { + case "Glasses": {if !(_x in blck_blacklistedItems) then {_glasses pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Glasses %1 Excluded: blacklisted Item",_x]}}}; + case "Headgear": {if !(_x in blck_blacklistedHeadgear) then {_headgear pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Headgear %1 Excluded: blacklisted Item",_x]}}}; + case "Vest": {if !(_x in blck_blacklistedVests) then {_vests pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Vest %1 Excluded: blacklisted Item",_x]}}}; + case "Uniform": {if !(_x in blck_blacklistedUniforms) then {_uniforms pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Uniform %1 Excluded: blacklisted Item",_x]}}}; + case "Backpack": {if !(_x in blck_blacklistedBackpacks) then {_backpacks pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Backpack %1 Excluded: blacklisted Item",_x]}}}; + }; + }; + } else { + if (["base",_x] call BIS_fnc_inString) then {diag_log format["_dynamicConfigs: excluding class %1",_x]}; + }; +} forEach _classnameList; + +blck_primaryWeapons = _wpnAR + _wpnLMG + _wpnSMG + _wpnShotGun + _wpnSniper; +blck_WeaponList_Blue = blck_primaryWeapons; +blck_WeaponList_Red = blck_primaryWeapons; +blck_WeaponList_Green = blck_primaryWeapons; +blck_WeaponList_Orange = blck_primaryWeapons; + +blck_pistols = _wpnHandGun; +blck_Pistols_blue = blck_Pistols; +blck_Pistols_red = blck_Pistols; +blck_Pistols_green = blck_Pistols; +blck_Pistols_orange = blck_Pistols; + +blck_headgearList = _headgear; +blck_headgear_blue = blck_headgearList; +blck_headgear_red = blck_headgearList; +blck_headgear_green = blck_headgearList; +blck_headgear_orange = blck_headgearList; + +blck_SkinList = _uniforms; +blck_SkinList_blue = blck_SkinList; +blck_SkinList_red = blck_SkinList; +blck_SkinList_green = blck_SkinList; +blck_SkinList_orange = blck_SkinList; + +blck_vests = _vests; +blck_vests_blue = blck_vests; +blck_vests_red = blck_vests; +blck_vests_green = blck_vests; +blck_vests_orange = blck_vests; + +blck_backpacks = _backpacks; +blck_backpacks_blue = blck_backpacks; +blck_backpacks_red = blck_backpacks; +blck_backpacks_green = blck_backpacks; +blck_backpacks_orange = blck_backpacks; + +blck_explosives = _wpnThrow; + +diag_log format["Compilation of dynamic AI Loadouts complete at %1",diag_tickTime]; diff --git a/Server/@GMS/addons/custom_server/MapAddons/MapAddons_init.sqf b/Server/@GMS/addons/custom_server/MapAddons/MapAddons_init.sqf new file mode 100644 index 0000000..af930a7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/MapAddons/MapAddons_init.sqf @@ -0,0 +1,69 @@ +/* + 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 [GRG] + for ghostridergaming + 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"; + +if (!isServer) exitWith{}; +_addonsPath = "\q\addons\custom_server\MapAddons\mapcontent\"; +_addonsEpoch = [ + //["mapName","subfolder","filename.sqf"] + // when "subfolder" equals "" then the spawner will look for the file in the mapcontent directory + // See the examples below and in custom_server\MapAddons\mapcontent\Altis for an idea as to how to set these arrays up. + /* + ["Altis","Altis","mobileRefuelSaltFlats.sqf"], + ["Altis","Altis","smallbaseSaltFlats.sqf"] + */ +]; + +_addonsExile = [ + /* + ["Altis","Altis","mobileRefuelSaltFlats-DBD_final.sqf"], + ["Altis","Altis","smallbaseSaltFlats.sqf"] + */ +]; + + +_fnc_runIt = +{ + params["_addons"]; + if (blck_debugON) then {diag_log format["[blckeagls] MapAddons:: addons list is %1",_addons];}; + _worldName = toLower (worldName); + { + if (toLower format["%1",_x select 0] isEqualTo _worldName) then + { + _path = ""; + if ( (_x select 1) isEqualTo "") then + { + _path = _addonsPath; + } else { + _path = format["%1%2%3",_addonsPath,_x select 1,"\"]; + }; + if (blck_debugLevel > 1) then {diag_log format["[blckeagls] MapAddons::-->> Running the following script: %1%2",_path,_x select 2];}; + [] execVM format["%1%2",_path,_x select 2]; + }; + }forEach _addons; +}; + +if not (isNull( configFile >> "CfgPatches" >> "a3_epoch_server" )) then +{ + diag_log "[blckeagls] Running Map Addons for Epoch"; + [_addonsEpoch] call _fnc_runIt; +}; + +if not (isNull( configFile >> "CfgPatches" >> "exile_server" )) then +{ + diag_log "[blckeagls] Running Map Addons for Exile"; + [_addonsExile] call _fnc_runIt; +}; diff --git a/Server/@GMS/addons/custom_server/MapAddons/mapcontent/Altis/mobileRefuelSaltFlats.sqf b/Server/@GMS/addons/custom_server/MapAddons/mapcontent/Altis/mobileRefuelSaltFlats.sqf new file mode 100644 index 0000000..4bfa09e --- /dev/null +++ b/Server/@GMS/addons/custom_server/MapAddons/mapcontent/Altis/mobileRefuelSaltFlats.sqf @@ -0,0 +1,33 @@ +// Small bandit base on the salt flats +// by Ghostrider-GRG- +// 11/8/16 + +private _objects = [ + ["Land_BluntStone_02",[26582.2,24670.5,12.0115],[[0,0.995673,-0.0929294],[-0.130865,0.0921302,0.98711]],[false,false]], + ["Land_BluntStone_02",[25767.7,21581.5,24.3651],[[0,0.999645,0.0266571],[-0.0346456,-0.0266411,0.999045]],[false,false]], + ["Land_BluntStone_02",[24927.3,22961.3,11.2178],[[0,0.999996,0.00265199],[0.031983,-0.00265063,0.999485]],[false,false]], + ["Flag_AAF_F",[22954.8,17041.1,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_CargoBox_V1_F",[22952.6,17016,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_Cargo40_blue_F",[22947.5,17024.9,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_Cargo40_blue_F",[22935.9,17031.2,3.19],[[-0.866282,-0.499555,0],[0,0,1]],[false,false]], + ["Land_Cargo40_blue_F",[22934,17045.2,3.19],[[-0.979295,0.202436,0],[0,0,1]],[false,false]], + ["Land_Cargo40_blue_F",[22942.7,17055.7,3.19],[[0.425964,-0.90474,0],[0,0,1]],[false,false]], + ["Land_Cargo40_blue_F",[22956.6,17059.1,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_Cargo40_blue_F",[22968.8,17054.2,3.19],[[0.658744,0.752367,0],[0,0,1]],[false,false]], + ["Land_WaterTank_F",[22957.9,17020.7,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_WaterBarrel_F",[22973.4,17042.1,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_CncBarrier_F",[22955.9,17026.5,3.19],[[0.627124,-0.778919,0],[0,0,1]],[false,false]], + ["Land_CncBarrierMedium4_F",[22944.5,17023.4,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_CncBarrierMedium4_F",[22960.6,17031.1,3.19],[[0.682042,-0.731313,0],[0,0,1]],[false,false]], + ["Land_CncBarrierMedium4_F",[22966.7,17036.8,3.19],[[0.682042,-0.731313,0],[0,0,1]],[false,false]], + ["Land_CncBarrierMedium4_F",[22971.8,17043.3,3.19],[[-0.855661,0.517537,0],[0,0,1]],[false,false]], + ["Land_FuelStation_Build_F",[22949.7,17049.9,3.19],[[0.551057,-0.834468,0],[0,0,1]],[false,false]], + ["Land_fs_feed_F",[22952.9,17044.6,3.19],[[0.555135,-0.83176,0],[0,0,1]],[false,false]] +]; +{ + private _object = (_x select 0) createVehicle [0,0,0]; + _object setPosASL (_x select 1); + _object setVectorDirAndUp (_x select 2); + _object enableSimulationGlobal ((_x select 3) select 0); + _object allowDamage ((_x select 3) select 1); +} forEach _objects; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/MapAddons/mapcontent/Altis/smallbaseSaltFlats.sqf b/Server/@GMS/addons/custom_server/MapAddons/mapcontent/Altis/smallbaseSaltFlats.sqf new file mode 100644 index 0000000..b1cc39a --- /dev/null +++ b/Server/@GMS/addons/custom_server/MapAddons/mapcontent/Altis/smallbaseSaltFlats.sqf @@ -0,0 +1,41 @@ +// Small bandit base on the salt flats +// by Ghostrider-GRG- +// 11/8/16 + +private _objects = [ + ["Land_HBarrier_1_F",[23531.2,18446,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23533.5,18446.1,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23536.8,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23540.2,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23543.6,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23529.6,18431.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23530.1,18434.7,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23530.4,18437.9,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23530.7,18441.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23543.7,18431.2,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23544.1,18434.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23544.5,18437.7,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23544.7,18441.2,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23530.3,18427.3,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23533.6,18426.9,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23536.9,18426.6,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]], + ["Land_HBarrier_3_F",[23540.4,18426.5,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]], + ["Land_HBarrier_01_big_tower_green_F",[23556.9,18453,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_HBarrierTower_F",[23520,18423,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_Scrap_MRAP_01_F",[23536,18434.6,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_PressureWasher_01_F",[23534.2,18427.5,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_PressureWasher_01_F",[23534.2,18427.5,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_ScrapHeap_1_F",[23549.8,18426.8,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_ScrapHeap_2_F",[23524.8,18445.7,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["CamoNet_INDP_Curator_F",[23536.3,18434,3.19],[[-0.998396,0.0566218,0],[0,0,1]],[false,false]], + ["Land_Cargo_House_V3_F",[23556.7,18420.3,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Land_Cargo_House_V3_F",[23519.2,18449.4,3.19],[[0,1,0],[0,0,1]],[false,false]], + ["Flag_AAF_F",[23538.1,18443,3.19],[[0,1,0],[0,0,1]],[false,false]] +]; +{ + private _object = (_x select 0) createVehicle [0,0,0]; + _object setPosASL (_x select 1); + _object setVectorDirAndUp (_x select 2); + _object enableSimulationGlobal ((_x select 3) select 0); + _object allowDamage ((_x select 3) select 1); +} forEach _objects; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Blue/captive1.sqf b/Server/@GMS/addons/custom_server/Missions/Blue/captive1.sqf new file mode 100644 index 0000000..243ba61 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Blue/captive1.sqf @@ -0,0 +1,144 @@ +/* + 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_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 + +_buildings = [ + "Land_Cargo_HQ_V4_F", + "Land_Cargo_HQ_V1_F", + "Land_Cargo_HQ_V2_F", + "Land_Cargo_HQ_V3_F", + "Land_Cargo_Tower_V1_F", + "Land_Cargo_Tower_V2_F", + "Land_Cargo_Tower_V3_F", + "Land_Cargo_Tower_V4_Fv", + "Land_BagBunker_01_large_green_F" +]; +_enemyLeaderConfig = + ["I_G_resistanceLeader_F", // select 0 + [-7.83789,13.1465,-0.00143886], // select 1 + 126.345, // select 2 + [true,false], // select 3 + ["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 + [selectRandom _buildings,[-3.79102,2.56055,0],0,[true,false]] + ]; +_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 = 0; +_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/Server/@GMS/addons/custom_server/Missions/Blue/default.sqf b/Server/@GMS/addons/custom_server/Missions/Blue/default.sqf new file mode 100644 index 0000000..0323c78 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Blue/default.sqf @@ -0,0 +1,151 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Blue Mission with template = default"; + +private["_missionEnabled"]; + +_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" + // _missionLandscape + // 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. +/* +private _addedLandscape = ["Land_FoodSacks_01_cargo_brown_F","Land_FoodSacks_01_large_brown_F","Land_FoodSack_01_full_brown_F","Land_PaperBox_01_open_boxes_F", + "Land_CampingTable_white_F","Land_WoodenPlanks_01_messy_pine_F","Land_CinderBlocks_01_F","Land_WoodenCrate_01_F","Land_WoodenCrate_01_stack_x5_F", + "Land_BarrelTrash_grey_F","Land_WoodenTable_large_F","Land_BagFence_Short_F","Land_WoodPile_F"] +*/ + +_missionLandscape = [/*"Flag_AAF_F",*/"Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_TentDome_F","Land_FieldToilet_F","Campfire_burning_F"]; // list of objects to spawn as landscape +for "_i" from 1 to 8 do +{ + _missionLandscape pushBack selectRandom [ + "Land_FoodSacks_01_cargo_brown_F","Land_FoodSacks_01_large_brown_F","Land_FoodSack_01_full_brown_F","Land_PaperBox_01_open_boxes_F", + "Land_CampingTable_white_F","Land_WoodenPlanks_01_messy_pine_F","Land_CinderBlocks_01_F","Land_WoodenCrate_01_F","Land_WoodenCrate_01_stack_x5_F", + "Land_BarrelTrash_grey_F","Land_WoodenTable_large_F","Land_BagFence_Short_F","Land_WoodPile_F" + ]; +}; +_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 + // 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; // 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/Server/@GMS/addons/custom_server/Missions/Blue/default2.sqf b/Server/@GMS/addons/custom_server/Missions/Blue/default2.sqf new file mode 100644 index 0000000..52531cc --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Blue/default2.sqf @@ -0,0 +1,154 @@ +/* + 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; + /* + 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"]; +_markerColor = "ColorBlue"; +_markerMissionName = "Bandit Patrol"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[3,3,0],0,[false,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 = [ + ["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"*/]; + +_missionGroups = + [ + //_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; + [[-10.9121,-10.9824,-1.20243],5,7,"Green",5,12], + [[-10.2305,10.0215,-0.941586],5,7,"Green",5,12], + [[10.5605,-10.4043,-0.00143886],5,7,"Green",5,12], + [[10.61133,10.5918,-0.001438863],5,7,"Green",5,12] + ]; // 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; + +_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/Server/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf b/Server/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf new file mode 100644 index 0000000..94290d4 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Blue/hostage1.sqf @@ -0,0 +1,162 @@ +/* + 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",[0.269531,-29.8301,0],0,[true,false]], + ["Campfire_burning_F",[-2.75391,-13.043,0],0,[true,false]], + ["Land_Stone_8m_F",[-17.252,-5.42969,0],268.936,[true,false]], + ["Land_Stone_8m_F",[-17.4609,2.93945,0],268.936,[true,false]], + ["Land_Stone_8m_F",[-17.6191,11.1426,0],268.936,[true,false]], + ["Land_Stone_8m_F",[16.082,-3.7168,0],270,[true,false]], + ["Land_Stone_8m_F",[16.0742,4.58789,0],270,[true,false]], + ["Land_Stone_8m_F",[16.1035,12.8438,0],270,[true,false]], + ["Land_Stone_8m_F",[7.83203,17.8164,0],0,[true,false]], + ["Land_Stone_8m_F",[-0.505859,18.0039,0],0,[true,false]], + ["Land_Stone_8m_F",[-8.85742,18.0273,0],0,[true,false]], + ["Land_Stone_8m_F",[7.94727,-32.7383,0],0,[true,false]], + ["Land_Stone_8m_F",[-0.318359,-32.7246,0],0,[true,false]], + ["Land_Stone_8m_F",[-8.54492,-32.6836,0],0,[true,false]], + ["Land_HBarrierWall6_F",[-54.6641,42.75,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[-54.7383,25.9102,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[-54.6934,34.375,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[-54.5156,5.78711,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[-54.6035,17.4902,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[-54.2441,-11.2656,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[-54.4961,-2.67383,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[-53.9336,-23.9395,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[-53.6113,-32.1563,0],91.2122,[true,false]], + ["Land_HBarrierWall6_F",[52.082,29.7891,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[52.043,38.252,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[52.5098,9.66602,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[52.3008,21.3691,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[52.9551,-7.38086,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[52.6152,1.20703,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[53.3945,-20.0508,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[53.8008,-28.2637,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[51.9824,46.627,0],90.6291,[true,false]], + ["Land_HBarrierWall6_F",[42.873,59.8809,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[26.0313,59.8809,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[34.4961,59.873,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[5.9082,59.5664,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[17.6133,59.707,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[-11.1406,59.2188,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[-2.55078,59.5098,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[-23.8125,58.8516,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[-32.0293,58.4922,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[-40.3965,58.4121,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[-48.8535,58.2324,0],180.956,[true,false]], + ["Land_HBarrierWall6_F",[-44.877,-44.8379,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[-28.0371,-44.957,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[-36.502,-44.8906,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[-7.91016,-44.7871,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[-19.6152,-44.8438,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[9.13867,-44.5605,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[0.548828,-44.791,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[21.8145,-44.2832,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[30.0332,-43.9824,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[38.3047,-43.8945,0],1.36283,[true,false]], + ["Land_HBarrierWall6_F",[46.7598,-43.6582,0],1.36283,[true,false]], + ["Land_Stone_8m_F",[15.791,-29.4043,0],270,[true,false]], + ["Land_Stone_8m_F",[15.7383,-21.0332,0],270,[true,false]], + ["Land_Stone_8m_F",[15.7324,-12.8281,0],270,[true,false]], + ["Land_Stone_8m_F",[-17.2559,-28.6465,0],270,[true,false]], + ["Land_Stone_8m_F",[-17.3086,-20.2754,0],270,[true,false]], + ["Land_Stone_8m_F",[-17.3145,-12.0703,0],270,[true,false]] + ]; // list of objects to spawn as landscape; // list of objects to spawn as landscape + +_buildings = [ + "Land_i_House_Big_01_V1_F", + "Land_i_House_Big_01_V3_F", + "Land_i_House_Big_02_V1_F", + "Land_i_House_Big_02_V3_F", + "Land_i_Shop_02_V1_F", + "Land_i_Shop_02_V3_F" +]; +_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 + [selectRandom _buildings,[-0.279297,-15.9199,0],0,[true,false]] + ]; // 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],1,1,"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 = 0; +_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/Server/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf new file mode 100644 index 0000000..4c17075 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Blue/medicalCamp.sqf @@ -0,0 +1,91 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Blue Mission with template = medicalCamp"; +_crateLoot = blck_BoxLoot_Blue; +_lootCounts = blck_lootCountsBlue; +_startMsg = "A Bandit Medical camp has been spotted. Check the Blue marker on your map for its location"; +_endMsg = "The Bandit Medical camp at the Blue Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[175,175],"GRID"]; +_markerColor = "ColorBlue"; +_markerMissionName = "Medical Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[5,5,0],0,[false,true]], + ["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]], + ["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,false]], + ["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,true]], + ["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,true]], + ["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,true]], + ["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,true]], + ["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false,true]], + ["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false,true]], + ["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,true]], + ["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,true]], + ["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,true]], + ["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,true]], + ["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,true]], + ["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// 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; // 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/Server/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf new file mode 100644 index 0000000..3134019 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Blue/redCamp.sqf @@ -0,0 +1,117 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Blue Mission with template = redCamp"; +_crateLoot = blck_BoxLoot_Blue; +_lootCounts = blck_lootCountsBlue; +_startMsg = "A temporary Bandit camp has been spotted. Check the Blue marker on your map for its location"; +_endMsg = "The temporary Bandit Blue camp at the Blue Marker is under player control"; +_markerLabel = ""; +_markerType = ["ELIPSE",[175,175],"GRID"]; +_markerColor = "ColorBlue"; +_markerMissionName = "Bandit Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,true]], + ["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,true]], + ["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,true]], + ["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,true]], + ["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,true]], + ["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,true]], + ["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,true]], + ["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,true]], + ["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,true]], + ["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,true]], + ["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,true]], + ["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,true]], + ["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,true]], + ["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,true]], + ["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,true]], + ["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,true]], + ["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,true]], + ["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,true]], + ["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,true]], + ["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,true]], + ["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,true]], + ["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,true]], + ["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,true]], + ["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,true]], + ["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,true]], + ["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,true]], + ["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,true]], + ["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,true]], + ["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,true]], + ["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,true]], + ["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,true]], + ["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,true]], + ["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,true]], + ["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,true]], + ["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,true]], + ["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,true]], + ["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,true]], + ["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,true]], + ["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,true]], + ["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,true]], + ["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,true]], + ["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// 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; // 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/Server/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf new file mode 100644 index 0000000..7a89b53 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Blue/resupplyCamp.sqf @@ -0,0 +1,81 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Blue Mission with template = resupplyCamp"; +_crateLoot = blck_BoxLoot_Blue; +_lootCounts = blck_lootCountsBlue; +_startMsg = "A Bandit resupply camp has been spotted. Check the Blue marker on your map for its location"; +_endMsg = "The Bandit resupply camp at the Blue Marker is under player control"; +_markerLabel = ""; +_markerType = ["ELIPSE",[175,175],"GRID"]; +_markerColor = "ColorBlue"; +_markerMissionName = "Resupply Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]], + ["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]], + ["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,true]], + ["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,true]], + ["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,true]], + ["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,true]], + ["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,true]], + ["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// 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; // 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/Server/@GMS/addons/custom_server/Missions/Blue/template.sqf b/Server/@GMS/addons/custom_server/Missions/Blue/template.sqf new file mode 100644 index 0000000..42a1cf7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Blue/template.sqf @@ -0,0 +1,136 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Green Mission with template = default"; +_crateLoot = blck_BoxLoot_Green; +_lootCounts = blck_lootCountsGreen; +_startMsg = "An enemy research center was sighted in a nearby sector! Check the Green marker on your map for the location!"; +_endMsg = "The Sector at the Green Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[225,225],"GRID"]; +_markerColor = "ColorGreen"; +_markerMissionName = "Research Center"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AltisColonial_F",[12.9492,-14.2676,0],0,[true,false]], + ["Land_Research_HQ_F",[-40.4258,-57.4492,-7.15256e-007],0,[true,false]], + ["Land_Research_HQ_F",[79.9063,68.1406,2.38419e-007],0,[true,false]], + ["Land_Research_house_V1_F",[-27.6895,70.9883,0],0,[true,false]], + ["Land_Research_house_V1_F",[-110.166,14.3926,0],0,[true,false]], + ["Land_Research_house_V1_F",[54.5078,-70.8457,0],0,[true,false]], + ["Land_Cargo_Patrol_V1_F",[111.865,11.9375,9.53674e-007],0,[true,false]], + ["Land_Cargo_HQ_V2_F",[-115.473,-44.5977,-4.76837e-007],0,[true,false]], + ["Land_SharpRock_apart",[-59.6836,-59.5996,-4.76837e-007],0,[true,false]], + ["Land_W_sharpRock_apart",[-81.6973,-42.4082,-4.76837e-007],0,[true,false]], + ["Land_SharpRock_apart",[-96.2168,-5.32031,4.76837e-007],0,[true,false]], + ["Land_Limestone_01_apart_F",[-79.2305,43.4219,0],0,[true,false]], + ["Land_Limestone_01_apart_F",[-50.2344,82.4746,0],0,[true,false]], + ["Land_BluntRock_apart",[3.88281,-71.5488,-2.38419e-007],0,[true,false]], + ["Land_Limestone_01_apart_F",[35.8926,-77.5918,0],0,[true,false]], + ["Land_Limestone_01_apart_F",[78.541,-52.3926,-4.76837e-007],0,[true,false]], + ["Land_Limestone_01_apart_F",[103.91,-6.88867,0],0,[true,false]], + ["Land_BluntRock_apart",[-11.5586,93.9688,-2.38419e-007],0,[true,false]], + ["Land_W_sharpStone_02",[54.7344,96.7012,0],0,[true,false]], + ["Land_BluntRock_apart",[77.4453,88.8301,-2.38419e-007],0,[true,false]], + ["Land_SharpRock_apart",[104.758,45.668,0],0,[true,false]], + ["Land_Limestone_01_02_F",[99.5117,23.752,-4.76837e-007],0,[true,false]], + ["Land_Limestone_01_02_F",[49.8477,50.0039,0],0,[true,false]], + ["Land_Limestone_01_02_F",[-8.14844,32.2227,4.76837e-007],0,[true,false]], + ["Land_Limestone_01_02_F",[-35.334,35.1465,-2.38419e-007],0,[true,false]], + ["Land_SharpStone_02",[-28.6523,1.33398,4.76837e-007],0,[true,false]], + ["Land_SharpStone_02",[-58.707,-7.46094,-4.76837e-007],0,[true,false]], + ["Land_Limestone_01_02_F",[64.5078,31.9707,0],0,[true,false]], + ["Land_Limestone_01_02_F",[33.7246,11.5469,0],0,[true,false]], + ["Land_SharpStone_02",[69.4277,-3.20313,0],0,[true,false]], + ["Land_SharpStone_02",[53.7227,-40.1777,-2.38419e-007],0,[true,false]], + ["Land_Limestone_01_02_F",[-6.26563,-46.0996,-4.76837e-007],0,[true,false]] +]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionEmplacedWeapons = + [ + ["B_HMG_01_high_F",[27.8945,100.275,0],0,[true,false]], + ["B_HMG_01_high_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]], + ["B_G_Mortar_01_F",[76.0586,66.9414,-3.1265],0,[true,false]] + ]; // 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 + +_missionGroups = + [ + //_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; + //[[-52.6523,15.8281,-0.00143838],4,6,"Green",4,8], + //[[-48.6113,-38.877,-0.00143886],4,6,"Green",4,8], + //[[18.4492,-39.5684,-0.00143838],4,6,"Green",4,8], + //[[42.6504,31.6621,-0.00143886],4,6,"Green",4,8], + //[[7.51563,46.4531,-0.001438864],4,6,"Green",4,8], + [[-8.99219,-11.623,-0.00143838],4,6,"Green",4,8] + ]; // Can be used to define spawn positions of AI patrols + +_missionPatrolVehicles = [ + //[selectRandom blck_AIPatrolVehicles,[27.8945,100.275,0],0,[true,false]], + //[selectRandom blck_AIPatrolVehicles,[-84.7793,72.2617,9.53674e-007],0,[true,false]], + [selectRandom blck_AIPatrolVehiclesGreen,[-87.8457,-109.947,7.15256e-007],0,[true,false]] +]; // can be used to define the spawn positions of vehicle patrols + +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Green; +_maxNoAI = blck_MaxAI_Green; +_noAIGroups = blck_AIGrps_Green; +_noVehiclePatrols = blck_SpawnVeh_Green; +_noEmplacedWeapons = blck_SpawnEmplaced_Green; +_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 +_vehicleCrewCount = [3,5]; // min / max number of crew including driver and gunners to be loaded into a vehicle + +// 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/Server/@GMS/addons/custom_server/Missions/GMS_missionLists.sqf b/Server/@GMS/addons/custom_server/Missions/GMS_missionLists.sqf new file mode 100644 index 0000000..bd994be --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/GMS_missionLists.sqf @@ -0,0 +1,30 @@ +/* + + 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"; + +_pathBlue = "Blue"; +//_missionListBlue = ["hostage1"]; +_missionListBlue = ["default","captive1","hostage1"/*,"default2"/*,"medicalCamp","redCamp","resupplyCamp"*/]; + +_pathRed = "Red"; +//_missionListRed = ["resupplyCamp"]; +_missionListRed = [/*"default","default2","medicalCamp",*/"redCamp"/*,"resupplyCamp"*/]; + +_pathGreen = "Green"; +//_missionListGreen = ["resupplyCamp"]; +_missionListGreen = [/*"default","default2",/*"redCamp",*//*"resupplyCamp",*/"medicalCamp"]; + +_pathOrange = "Orange"; +//_missionListOrange = ["resupplyCamp"]; +_missionListOrange = [/*"default","default2","medicalCamp","redCamp",*/"resupplyCamp"]; diff --git a/Server/@GMS/addons/custom_server/Missions/Green/default.sqf b/Server/@GMS/addons/custom_server/Missions/Green/default.sqf new file mode 100644 index 0000000..039f847 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Green/default.sqf @@ -0,0 +1,48 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Green Mission with template = default"; +_crateLoot = blck_BoxLoot_Green; +_lootCounts = blck_lootCountsGreen; +_startMsg = "A group of Bandits was sighted in a nearby sector! Check the Green marker on your map for the location!"; +_endMsg = "The Sector at the Green Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[225,225],"GRID"]; +_markerColor = "ColorGreen"; +_markerMissionName = "Bandit Patrol"; +_missionLandscapeMode = "random"; // acceptable values are "none","random","precise" +_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. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Green; +_maxNoAI = blck_MaxAI_Green; +_noAIGroups = blck_AIGrps_Green; +_noVehiclePatrols = blck_SpawnVeh_Green; +_noEmplacedWeapons = blck_SpawnEmplaced_Green; +//_uniforms = blck_SkinList; +//_headgear = blck_headgear; +_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/Server/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf new file mode 100644 index 0000000..9d9e14d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Green/medicalCamp.sqf @@ -0,0 +1,68 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Green Mission with template = medicalCamp"; + +_crateLoot = blck_BoxLoot_Green; +_lootCounts = blck_lootCountsGreen; +_startMsg = "A Bandit Medical camp has been spotted. Check the Green marker on your map for its location"; +_endMsg = "The Bandit Medical camp at the Green Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[225,225],"GRID"]; +_markerColor = "ColorGreen"; +_markerMissionName = "Medical Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[5,5,0],0,[false,true]], + ["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]], + ["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,false]], + ["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,true]], + ["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,true]], + ["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,true]], + ["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,true]], + ["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false,true]], + ["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false,true]], + ["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,true]], + ["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,true]], + ["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,true]], + ["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,true]], + ["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,true]], + ["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Green; +_maxNoAI = blck_MaxAI_Green; +_noAIGroups = blck_AIGrps_Green; +_noVehiclePatrols = blck_SpawnVeh_Green; +_noEmplacedWeapons = blck_SpawnEmplaced_Green; +//_uniforms = blck_SkinList; +//_headgear = blck_headgear; +_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/Server/@GMS/addons/custom_server/Missions/Green/redCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Green/redCamp.sqf new file mode 100644 index 0000000..cac1777 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Green/redCamp.sqf @@ -0,0 +1,98 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Green Mission with template = redCamp"; +_crateLoot = blck_BoxLoot_Green; +_lootCounts = blck_lootCountsGreen; +_startMsg = "A temporary enemy camp has been spotted. Check the Green marker on your map for its location"; +_endMsg = "The temporary Bandit Green camp at the Green Marker is under player control"; +_markerLabel = ""; +_markerType = ["ELIPSE",[225,225],"GRID"]; +_markerColor = "ColorGreen"; +_markerMissionName = "Bandit Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,true]], + ["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,true]], + ["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,true]], + ["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,true]], + ["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,true]], + ["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,true]], + ["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,true]], + ["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,true]], + ["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,true]], + ["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,true]], + ["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,true]], + ["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,true]], + ["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,true]], + ["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,true]], + ["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,true]], + ["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,true]], + ["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,true]], + ["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,true]], + ["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,true]], + ["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,true]], + ["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,true]], + ["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,true]], + ["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,true]], + ["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,true]], + ["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,true]], + ["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,true]], + ["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,true]], + ["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,true]], + ["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,true]], + ["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,true]], + ["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,true]], + ["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,true]], + ["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,true]], + ["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,true]], + ["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,true]], + ["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,true]], + ["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,true]], + ["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,true]], + ["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,true]], + ["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,true]], + ["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,true]], + ["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Green; +_maxNoAI = blck_MaxAI_Green; +_noAIGroups = blck_AIGrps_Green; +_noVehiclePatrols = blck_SpawnVeh_Green; +_noEmplacedWeapons = blck_SpawnEmplaced_Green; +//_uniforms = blck_SkinList; +//_headgear = blck_headgear; +_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/Server/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf new file mode 100644 index 0000000..63d31c1 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Green/resupplyCamp.sqf @@ -0,0 +1,57 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Green Mission with template = resupplyCamp"; +_crateLoot = blck_BoxLoot_Green; +_lootCounts = blck_lootCountsGreen; +_startMsg = "A Bandit resupply camp has been spotted. Check the Green marker on your map for its location"; +_endMsg = "The Bandit resupply camp at the Green Marker is under player control"; +_markerLabel = ""; +_markerType = ["ELIPSE",[225,225],"GRID"]; +_markerColor = "ColorGreen"; +_markerMissionName = "Resupply Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]], + ["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]], + ["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,true]], + ["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,true]], + ["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,true]], + ["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,true]], + ["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,true]], + ["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Green; +_maxNoAI = blck_MaxAI_Green; +_noAIGroups = blck_AIGrps_Green; +_noVehiclePatrols = blck_SpawnVeh_Green; +_noEmplacedWeapons = blck_SpawnEmplaced_Green; +//_uniforms = blck_SkinList; +//_headgear = blck_headgear; +_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/Server/@GMS/addons/custom_server/Missions/Green/template.sqf b/Server/@GMS/addons/custom_server/Missions/Green/template.sqf new file mode 100644 index 0000000..d32e721 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Green/template.sqf @@ -0,0 +1,99 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Green Mission with template = default"; +_crateLoot = blck_BoxLoot_Green; +_lootCounts = blck_lootCountsGreen; +_startMsg = "An enemy research center was sighted in a nearby sector! Check the Green marker on your map for the location!"; +_endMsg = "The Sector at the Green Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[225,225],"GRID"]; +_markerColor = "ColorGreen"; +_markerMissionName = "Research Center"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AltisColonial_F",[12.9492,-14.2676,0],0,[true,false]], + ["Land_Research_HQ_F",[-40.4258,-57.4492,-7.15256e-007],0,[true,false]], + ["Land_Research_HQ_F",[79.9063,68.1406,2.38419e-007],0,[true,false]], + ["Land_Research_house_V1_F",[-27.6895,70.9883,0],0,[true,false]], + ["Land_Research_house_V1_F",[-110.166,14.3926,0],0,[true,false]], + ["Land_Research_house_V1_F",[54.5078,-70.8457,0],0,[true,false]], + ["Land_Cargo_Patrol_V1_F",[111.865,11.9375,9.53674e-007],0,[true,false]], + ["Land_Cargo_HQ_V2_F",[-115.473,-44.5977,-4.76837e-007],0,[true,false]], + ["Land_SharpRock_apart",[-59.6836,-59.5996,-4.76837e-007],0,[true,false]], + ["Land_W_sharpRock_apart",[-81.6973,-42.4082,-4.76837e-007],0,[true,false]], + ["Land_SharpRock_apart",[-96.2168,-5.32031,4.76837e-007],0,[true,false]], + ["Land_Limestone_01_apart_F",[-79.2305,43.4219,0],0,[true,false]], + ["Land_Limestone_01_apart_F",[-50.2344,82.4746,0],0,[true,false]], + ["Land_BluntRock_apart",[3.88281,-71.5488,-2.38419e-007],0,[true,false]], + ["Land_Limestone_01_apart_F",[35.8926,-77.5918,0],0,[true,false]], + ["Land_Limestone_01_apart_F",[78.541,-52.3926,-4.76837e-007],0,[true,false]], + ["Land_Limestone_01_apart_F",[103.91,-6.88867,0],0,[true,false]], + ["Land_BluntRock_apart",[-11.5586,93.9688,-2.38419e-007],0,[true,false]], + ["Land_W_sharpStone_02",[54.7344,96.7012,0],0,[true,false]], + ["Land_BluntRock_apart",[77.4453,88.8301,-2.38419e-007],0,[true,false]], + ["Land_SharpRock_apart",[104.758,45.668,0],0,[true,false]], + ["Land_Limestone_01_02_F",[99.5117,23.752,-4.76837e-007],0,[true,false]], + ["Land_Limestone_01_02_F",[49.8477,50.0039,0],0,[true,false]], + ["Land_Limestone_01_02_F",[-8.14844,32.2227,4.76837e-007],0,[true,false]], + ["Land_Limestone_01_02_F",[-35.334,35.1465,-2.38419e-007],0,[true,false]], + ["Land_SharpStone_02",[-28.6523,1.33398,4.76837e-007],0,[true,false]], + ["Land_SharpStone_02",[-58.707,-7.46094,-4.76837e-007],0,[true,false]], + ["Land_Limestone_01_02_F",[64.5078,31.9707,0],0,[true,false]], + ["Land_Limestone_01_02_F",[33.7246,11.5469,0],0,[true,false]], + ["Land_SharpStone_02",[69.4277,-3.20313,0],0,[true,false]], + ["Land_SharpStone_02",[53.7227,-40.1777,-2.38419e-007],0,[true,false]], + ["Land_Limestone_01_02_F",[-6.26563,-46.0996,-4.76837e-007],0,[true,false]] +]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionEmplacedWeapons = + [ + ["B_HMG_01_high_F",[27.8945,100.275,0],0,[true,false]], + ["B_HMG_01_high_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]], + ["B_G_Mortar_01_F",[76.0586,66.9414,-3.1265],0,[true,false]] + ]; // 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 + +_missionGroups = + [ + //_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"]; + //[[-52.6523,15.8281,-0.00143838],4,6,"Green",4,8], + //[[-48.6113,-38.877,-0.00143886],4,6,"Green",4,8], + //[[18.4492,-39.5684,-0.00143838],4,6,"Green",4,8], + //[[42.6504,31.6621,-0.00143886],4,6,"Green",4,8], + //[[7.51563,46.4531,-0.001438864],4,6,"Green",4,8], + [[-8.99219,-11.623,-0.00143838],4,6,"Green",4,8] + ]; // Can be used to define spawn positions of AI patrols + +_missionPatrolVehicles = [ + //[selectRandom blck_AIPatrolVehiclesGreen,[27.8945,100.275,0],0,[true,false]], + //[selectRandom blck_AIPatrolVehiclesGreen,[-84.7793,72.2617,9.53674e-007],0,[true,false]], + [selectRandom blck_AIPatrolVehiclesGreen,[-87.8457,-109.947,7.15256e-007],0,[true,false]] +]; // can be used to define the spawn positions of vehicle patrols + +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Green; +_maxNoAI = blck_MaxAI_Green; +_noAIGroups = blck_AIGrps_Green; +_noVehiclePatrols = blck_SpawnVeh_Green; +_noEmplacedWeapons = blck_SpawnEmplaced_Green; +_uniforms = blck_SkinList; +_headgear = blck_headgear; + +//_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" +//_timeOut = -1; +#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/Server/@GMS/addons/custom_server/Missions/Orange/default.sqf b/Server/@GMS/addons/custom_server/Missions/Orange/default.sqf new file mode 100644 index 0000000..9917588 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Orange/default.sqf @@ -0,0 +1,55 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#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; +_lootCounts = blck_lootCountsOrange; +_startMsg = "A group of Bandits was sighted in a nearby sector! Check the Orange marker on your map for the location!"; +_endMsg = "The Sector at the Orange Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[250,250],"GRID"]; +_markerColor = "ColorOrange"; +_markerMissionName = "Bandit Patrol"; +_missionLandscapeMode = "random"; // acceptable values are "none","random","precise" +_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. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Orange; +_maxNoAI = blck_MaxAI_Orange; +_noAIGroups = blck_AIGrps_Orange; +_noVehiclePatrols = blck_SpawnVeh_Orange; +_noEmplacedWeapons = blck_SpawnEmplaced_Orange; +//_uniforms = blck_SkinList; +//_headgear = blck_headgear; + +_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/Server/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf new file mode 100644 index 0000000..c915f10 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Orange/medicalCamp.sqf @@ -0,0 +1,75 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +////diag_log "[blckeagls] Spawning Orange Mission with template = medicalCamp"; +_crateLoot = blck_BoxLoot_Orange; +_lootCounts = blck_lootCountsOrange; +_startMsg = "A Bandit Medical camp has been spotted. Check the Orange marker on your map for its location"; +_endMsg = "The Bandit Medical camp at the Orange Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[250,250],"GRID"]; +_markerColor = "ColorOrange"; +_markerMissionName = "Medical Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[5,6,0],0,[false,true]], + ["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]], + ["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,false]], + ["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,true]], + ["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,true]], + ["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,true]], + ["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,true]], + ["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false,true]], + ["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false,true]], + ["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,true]], + ["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,true]], + ["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,true]], + ["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,true]], + ["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,true]], + ["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines;_minNoAI = blck_MinAI_Orange; +_maxNoAI = blck_MaxAI_Orange; +_noAIGroups = blck_AIGrps_Orange; +_noVehiclePatrols = blck_SpawnVeh_Orange; +_noEmplacedWeapons = blck_SpawnEmplaced_Orange; +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +//_uniforms = blck_SkinList; +//_headgear = blck_headgear; + +_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/Server/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf new file mode 100644 index 0000000..63f3d42 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Orange/redCamp.sqf @@ -0,0 +1,100 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +////diag_log "[blckeagls] Spawning Orange Mission with template = redCamp"; +_crateLoot = blck_BoxLoot_Orange; +_lootCounts = blck_lootCountsOrange; +_startMsg = "A temporary Bandit camp has been spotted. Check the Orange marker on your map for its location"; +_endMsg = "The temporary Bandit Orange camp at the Orange Marker is under player control"; +_markerLabel = ""; +_markerType = ["ELIPSE",[250,250],"GRID"]; +_markerColor = "ColorOrange"; +_markerMissionName = "Bandit Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,true]], + ["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,true]], + ["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,true]], + ["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,true]], + ["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,true]], + ["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,true]], + ["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,true]], + ["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,true]], + ["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,true]], + ["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,true]], + ["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,true]], + ["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,true]], + ["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,true]], + ["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,true]], + ["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,true]], + ["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,true]], + ["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,true]], + ["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,true]], + ["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,true]], + ["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,true]], + ["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,true]], + ["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,true]], + ["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,true]], + ["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,true]], + ["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,true]], + ["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,true]], + ["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,true]], + ["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,true]], + ["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,true]], + ["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,true]], + ["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,true]], + ["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,true]], + ["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,true]], + ["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,true]], + ["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,true]], + ["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,true]], + ["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,true]], + ["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,true]], + ["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,true]], + ["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,true]], + ["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,true]], + ["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Orange; +_maxNoAI = blck_MaxAI_Orange; +_noAIGroups = blck_AIGrps_Orange; +_noVehiclePatrols = blck_SpawnVeh_Orange; +_noEmplacedWeapons = blck_SpawnEmplaced_Orange; +//_uniforms = blck_SkinList; +//_headgear = blck_headgear; + +_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/Server/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf new file mode 100644 index 0000000..a6aaabb --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Orange/resupplyCamp.sqf @@ -0,0 +1,65 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Orange Mission with template = resupplyCamp"; + +_crateLoot = blck_BoxLoot_Orange; +_lootCounts = blck_lootCountsOrange; +_startMsg = "A Bandit resupply camp has been spotted. Check the Orange marker on your map for its location"; +_endMsg = "The Bandit resupply camp at the Orange Marker is under player control"; +_markerLabel = ""; +_markerType = ["ELIPSE",[250,250],"GRID"]; +_markerColor = "ColorOrange"; +_markerMissionName = "Resupply Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]], + ["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]], + ["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,true]], + ["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,true]], + ["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,true]], + ["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,true]], + ["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,true]], + ["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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 +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; +_minNoAI = blck_MinAI_Orange; +_maxNoAI = blck_MaxAI_Orange; +_noAIGroups = blck_AIGrps_Orange; +_noVehiclePatrols = blck_SpawnVeh_Orange; +_noEmplacedWeapons = blck_SpawnEmplaced_Orange; +//_uniforms = blck_SkinList; +//_headgear = blck_headgear; + +_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/Server/@GMS/addons/custom_server/Missions/Red/captive1.sqf b/Server/@GMS/addons/custom_server/Missions/Red/captive1.sqf new file mode 100644 index 0000000..aa361c2 --- /dev/null +++ b/Server/@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/Server/@GMS/addons/custom_server/Missions/Red/default.sqf b/Server/@GMS/addons/custom_server/Missions/Red/default.sqf new file mode 100644 index 0000000..2737657 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Red/default.sqf @@ -0,0 +1,75 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Red Mission with template = default"; +_crateLoot = blck_BoxLoot_Red; +_lootCounts = blck_lootCountsRed; +_startMsg = "A group of Bandits was sighted in a nearby sector! Check the Red marker on your map for the location!"; +_endMsg = "The Sector at the Red Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[200,200],"GRID"]; +_markerColor = "ColorRed"; +_markerMissionName = "Bandit Patrol"; +_missionLandscapeMode = "random"; // acceptable values are "none","random","precise" +_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. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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_Red; +_maxNoAI = blck_MaxAI_Red; +_noAIGroups = blck_AIGrps_Red; +_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; // 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/Server/@GMS/addons/custom_server/Missions/Red/hostage1.sqf b/Server/@GMS/addons/custom_server/Missions/Red/hostage1.sqf new file mode 100644 index 0000000..f96c510 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Red/hostage1.sqf @@ -0,0 +1,146 @@ +/* + 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",[0.935547,-24.3027,0],0,[true,false]], + ["Land_SM_01_shelter_wide_F",[0.298828,4.63867,0],0,[true,false]], + ["Campfire_burning_F",[-2.08789,-7.51563,0],0,[true,false]], + ["Land_Stone_8m_F",[-10.0313,-6.46875,0],268.936,[true,false]], + ["Land_Stone_8m_F",[-10.2402,1.90039,0],268.936,[true,false]], + ["Land_Stone_8m_F",[-10.3984,10.1035,0],268.936,[true,false]], + ["Land_Stone_8m_F",[10.125,-4.10156,0],270,[true,false]], + ["Land_Stone_8m_F",[10.0723,4.26953,0],270,[true,false]], + ["Land_Stone_8m_F",[10.0664,12.4746,0],270,[true,false]], + ["Land_Stone_8m_F",[7.95117,20.252,0],0,[true,false]], + ["Land_Stone_8m_F",[-0.314453,20.2656,0],0,[true,false]], + ["Land_Stone_8m_F",[-8.54102,20.3066,0],0,[true,false]], + ["Land_Stone_8m_F",[8.16016,-15.1113,0],0,[true,false]], + ["Land_Stone_8m_F",[-0.105469,-15.0977,0],0,[true,false]], + ["Land_Stone_8m_F",[-8.33203,-15.0566,0],0,[true,false]], + ["Land_HBarrierWall6_F",[-50.875,38.2676,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[-50.3516,21.4355,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[-50.6055,29.8965,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[-49.4141,1.33203,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[-49.918,13.0254,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[-48.5371,-15.6992,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[-49.0938,-7.12305,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[-47.7773,-28.3535,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[-47.1641,-36.5547,0],89.1786,[true,false]], + ["Land_HBarrierWall6_F",[50.0566,-17.4785,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[50.1484,-25.9414,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[49.5039,2.64063,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[49.7852,-9.06055,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[48.9531,19.6855,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[49.3457,11.0996,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[48.4355,32.3516,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[47.9785,40.5625,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[50.2598,-34.3164,0],270.274,[true,false]], + ["Land_HBarrierWall6_F",[44.7031,55.5176,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[27.8652,55.1797,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[36.3281,55.3418,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[7.75195,54.4629,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[19.4512,54.8379,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[-9.28711,53.7734,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[-0.705078,54.2363,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[-21.9492,53.1523,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[-30.1563,52.6289,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[-38.5195,52.3809,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[-46.9727,52.0313,0],179.807,[true,false]], + ["Land_HBarrierWall6_F",[-44.418,-50.7617,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[-27.5898,-50.1348,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[-36.0488,-50.4434,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[-7.49023,-49.0723,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[-19.1816,-49.6484,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[9.5332,-48.0918,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[0.960938,-48.7012,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[22.1836,-47.252,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[30.3809,-46.5879,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[38.6406,-46.1328,0],358.823,[true,false]], + ["Land_HBarrierWall6_F",[47.0762,-45.5215,0],358.823,[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/Server/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf new file mode 100644 index 0000000..3f7fc6e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Red/medicalCamp.sqf @@ -0,0 +1,93 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Red Mission with template = medicalCamp"; +_crateLoot = blck_BoxLoot_Red; +_lootCounts = blck_lootCountsRed; +_startMsg = "A Bandit Medical camp has been spotted. Check the Red marker on your map for its location"; +_endMsg = "The Bandit Medical camp at the Red Marker is under survivor control!"; +_markerLabel = ""; +_markerType = ["ELIPSE",[200,200],"GRID"]; +_markerColor = "ColorRed"; +_markerMissionName = "Medical Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Flag_AAF_F",[6,5,0],0,[false,true]], + ["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]], + ["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,[true,false]], + ["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,true]], + ["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,true]], + ["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[false,true]], + ["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[false,true]], + ["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[false,false,true]], + ["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[false,false,true]], + ["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[false,true]], + ["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[false,true]], + ["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[false,true]], + ["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[false,true]], + ["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[false,true]], + ["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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_Red; +_maxNoAI = blck_MaxAI_Red; +_noAIGroups = blck_AIGrps_Red; +_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; // 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/Server/@GMS/addons/custom_server/Missions/Red/redCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Red/redCamp.sqf new file mode 100644 index 0000000..6368efb --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Red/redCamp.sqf @@ -0,0 +1,114 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Red Mission with template = redCamp"; + +_crateLoot = blck_BoxLoot_Red; +_lootCounts = blck_lootCountsRed; +_startMsg = "A temporary enemy camp has been spotted. Check the Red marker on your map for its location"; +_endMsg = "The temporary enemy camp at the Red Marker is under player control"; +_markerLabel = ""; +_markerType = ["ELIPSE",[200,200],"GRID"]; +_markerColor = "ColorRed"; +_markerMissionName = "Bandit Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Land_CampingChair_V1_F",[1.32227,2.07813,8.2016e-005],108.293,[false,true]], + ["Land_CampingChair_V1_F",[-2.01465,2.91992,3.05176e-005],236.049,[false,true]], + ["FirePlace_burning_F",[0.0302734,4.26563,2.47955e-005],359.997,[false,true]], + ["Land_CampingChair_V1_F",[2.47168,4.21484,0.000102997],108.293,[false,true]], + ["Land_CampingChair_V1_F",[-1.86816,5.07422,3.05176e-005],319.489,[false,true]], + ["Land_CampingChair_V1_F",[0.915039,6.20898,1.71661e-005],51.7207,[false,true]], + ["Land_Sleeping_bag_brown_F",[8.27441,0.609375,0.00414658],98.0314,[false,true]], + ["Land_Sleeping_bag_brown_F",[8.27344,2.76758,0.00447083],91.7928,[false,true]], + ["Land_Sleeping_bag_brown_F",[7.9082,4.95898,-0.00173759],85.1176,[false,true]], + ["Land_Garbage_square3_F",[-4.95508,8.24023,0.00018692],60.0024,[false,true]], + ["Land_Camping_Light_F",[8.92773,3.80273,-0.000205994],344.236,[false,true]], + ["Land_Sleeping_bag_brown_F",[7.32129,7.55859,-0.0051899],60.1216,[false,true]], + ["Land_TentDome_F",[-9.75488,3.13477,0.00125313],146.574,[false,true]], + ["Land_WoodPile_F",[-0.322266,9.97266,-0.000553131],35.0017,[false,true]], + ["Land_Razorwire_F",[-0.0185547,-9.84961,0.0752335],1.7831,[false,true]], + ["Land_CampingChair_V1_folded_F",[3.8584,9.59375,0],60,[false,true]], + ["Land_TentDome_F",[-8.76855,7.85156,-0.00471497],207.522,[false,true]], + ["Land_BagFence_Round_F",[8.99707,-8.01367,-0.00951576],326.002,[false,true]], + ["Land_BagFence_Round_F",[-10.8164,-6.33594,-0.0038681],59.9991,[false,true]], + ["Land_TentDome_F",[-7.12207,11.8398,-0.00328445],231.101,[false,true]], + ["Land_CampingTable_small_F",[-4.62598,13.2754,7.62939e-005],344.243,[false,true]], + ["Land_Camping_Light_F",[-4.5957,13.332,0.687943],344.243,[false,true]], + ["Land_Razorwire_F",[15.5459,0.605469,0.145557],102.505,[false,true]], + ["Land_BagFence_Round_F",[7.16211,13.8516,0.000429153],221.639,[false,true]], + ["Land_Razorwire_F",[15.9678,8.35938,0.0635166],85.7459,[false,true]], + ["Land_Razorwire_F",[-19.1553,-1.61328,-0.0238552],70.0997,[false,true]], + ["Land_Razorwire_F",[-12.3906,-15.4492,0.0128002],19.2641,[false,true]], + ["Land_Razorwire_F",[-19.4629,5.67969,0.0492821],102.505,[false,true]], + ["Land_BagFence_Round_F",[-11.2891,17.6777,-0.00759888],128.563,[false,true]], + ["Land_Razorwire_F",[15.2949,-14.3027,0.0502853],139.224,[false,true]], + ["Land_Razorwire_F",[15.2852,16.2656,-0.0208111],85.1363,[false,true]], + ["Land_Razorwire_F",[4.80273,21.8223,-0.0563145],49.2133,[false,true]], + ["Land_Razorwire_F",[-17.7891,13.4863,-0.0646877],102.5,[false,true]], + ["Land_Razorwire_F",[-14.7109,20.2871,0.0674477],306.189,[false,true]], + ["Land_BagFence_Round_F",[25.3975,-6.08008,0.00466537],272.26,[false,true]], + ["Land_Wreck_Truck_F",[26.6289,12.2441,0.00333214],344.243,[false,true]], + ["Land_GarbageBags_F",[-24.9463,17.3066,0.000968933],60.0003,[false,true]], + ["Land_BagFence_Round_F",[11.167,28.832,-0.00405121],178.394,[false,true]], + ["Land_BagFence_Round_F",[-6.36914,30.6953,-0.000207901],178.378,[false,true]], + ["Land_Wreck_Hunter_F",[21.0391,25.9707,0.0118179],325.412,[false,true]], + ["Land_Camping_Light_F",[-33.7852,10.0371,0.000759125],344.235,[false,true]], + ["Land_BagFence_Round_F",[-34.3232,10.1035,0.00181007],60.0012,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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_Red; +_maxNoAI = blck_MaxAI_Red; +_noAIGroups = blck_AIGrps_Red; +_noVehiclePatrols = blck_SpawnVeh_Red; +_noEmplacedWeapons = blck_SpawnEmplaced_Red; +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = blck_useMines; + +//_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/Server/@GMS/addons/custom_server/Missions/Red/resupplyCamp.sqf b/Server/@GMS/addons/custom_server/Missions/Red/resupplyCamp.sqf new file mode 100644 index 0000000..6822a7f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Red/resupplyCamp.sqf @@ -0,0 +1,83 @@ +/* + Mission Template by Ghostrider [GRG] + Mission Compositions by Bill prepared for ghostridergaming + Copyright 2016 + Last modified 3/20/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"; +#include "\q\addons\custom_server\Missions\privateVars.sqf"; + +//diag_log "[blckeagls] Spawning Red Mission with template = resupplyCamp"; +_crateLoot = blck_BoxLoot_Red; +_lootCounts = blck_lootCountsRed; +_startMsg = "A Bandit resupply camp has been spotted. Check the Red marker on your map for its location"; +_endMsg = "The Bandit resupply camp at the Red Marker is under player control"; +_markerLabel = ""; +_markerType = ["ELIPSE",[200,200],"GRID"]; +_markerColor = "ColorRed"; +_markerMissionName = "Resupply Camp"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" +_missionLandscape = [ + ["Land_Cargo_Patrol_V1_F",[-29.41016,0.13477,-0.0224228],359.992,[true,true]], + ["Land_Cargo_House_V1_F",[29.2988,-0.1,0.150505],54.9965,[true,true]], + ["CamoNet_INDP_big_F",[-20.4346,15.43164,-0.00395203],54.9965,[false,true]], + ["Land_BagBunker_Small_F",[-20.4346,15.43164,-0.0138168],119.996,[false,true]], + ["Land_BagBunker_Small_F",[-20.3604,-15.6035,-0.0130463],44.9901,[false,true]], + ["Land_BagBunker_Small_F",[18.4453,-15.791,0.00744629],305.003,[false,true]], + ["Land_BagBunker_Small_F",[18.3711,15.5703,0.0101624],254.999,[false,true]], + ["CamoNet_INDP_big_F",[18.3711,15.5703,-0.00395203],54.9965,[false,true]] + ]; // list of objects to spawn as landscape +_missionLootBoxes = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_missionLootVehicles = []; // Parameters are "Box Item Code", array defining the loot to be spawned, and position. +_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_Red; +_maxNoAI = blck_MaxAI_Red; +_noAIGroups = blck_AIGrps_Red; +_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; // 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/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf new file mode 100644 index 0000000..2aed2f4 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf @@ -0,0 +1,17 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_sm_addAircraft: _this = %5",_this]; +params["_aircraftPatrol"]; +//diag_log format["_sm_addAircraft: _aircraftPatrol = %1",_aircraftPatrol]; +blck_sm_Aircraft pushBack [_aircraftPatrol,grpNull,0]; +//diag_log format["_sm_addAircraft: updated blck_sm_Aircraft = %1",blck_sm_Aircraft]; +true diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf new file mode 100644 index 0000000..01d7722 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_emplacedWeapon"]; +blck_sm_Emplaced pushBack [_emplacedWeapon,grpNull,0]; +diag_log format["_sm_AddEmplaced::-> _emplacedWeapon = %1, blck_sm_Emplaced = %2",_emplacedWeapon,blck_sm_Emplaced]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf new file mode 100644 index 0000000..49abe09 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_group"]; +blck_sm_Groups pushBack [_group,grpNull,0]; +diag_log format["_sm_AddGroup:: blck_sm_Groups = %1",blck_sm_Groups]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroupToArray.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroupToArray.sqf new file mode 100644 index 0000000..4efaebc --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroupToArray.sqf @@ -0,0 +1,22 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_array","_patrolInformation",["_timesToRespawn",-1]]; +waitUntil {blck_sm_monitoring isEqualTo 0}; +_array pushBack [ + _patrolInformation, + grpNull, + 0, // groupSpawned + 0, // times Spawned + 0, // Respawn At + _timesToRespawn // Max Times to Respawn +]; +_array diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf new file mode 100644 index 0000000..47dd046 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehicle"]; +blck_sm_Vehicles pushBack [_vehicle,grpNull,0]; +//diag_log format["_fnc_sm_AddVehicle: _vehicle = %1",_vehicle]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf new file mode 100644 index 0000000..73661a5 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf @@ -0,0 +1,80 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log "[blckeagls] GMS_fnc_sm_init_functions.sqf "; +//blck_sm_Groups = []; +blck_sm_Infantry = []; +blck_sm_Vehicles = []; +blck_sm_Aircraft = []; +blck_sm_Emplaced = []; +blck_sm_scubaGroups = []; +blck_sm_surfaceShips = []; +blck_sm_submarines = []; +blck_sm_lootContainers = []; +blck_sm_garrisonBuildings_ASL = []; +blcl_sm_garrisonBuilding_relPos = []; + +blck_fnc_sm_AddGroupToArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroupToArray.sqf"; + +/* +blck_fnc_sm_AddGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddGroup.sqf"; +blck_fnc_sm_AddVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddVehicle.sqf"; +blck_fnc_sm_AddAircraft = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddAircraft.sqf"; +blck_fnc_sm_AddEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddEmplaced.sqf"; +*/ +private _functions = [ + //["blck_fnc_sm_monitorStaticUnits","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorStaticPatrols.sqf"], + ["blck_fnc_sm_monitorInfantry","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorInfantry.sqf"], + ["blck_fnc_sm_monitorScuba","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorScuba.sqf"], + ["blck_fnc_sm_monitorVehicles","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorVehicles.sqf"], + ["blck_fnc_sm_monitorAircraft","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorAircraft.sqf"], + ["blck_fnc_sm_monitorShips","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorShips.sqf"], + ["blck_fnc_sm_monitorSubs","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorSubs.sqf"], + ["blck_fnc_sm_monitorEmplaced","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorEmplaced.sqf"], + ["blck_fnc_sm_monitorGarrisonsASL","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorGarrisonsASL.sqf"], + ["blck_fnc_sm_monitorGarrisons_relPos","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorGarrisons_relPos.sqf"], + ["blck_fnc_sm_spawnVehiclePatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrol.sqf"], + ["blck_fnc_sm_spawnAirPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrol.sqf"], + ["blck_fnc_sm_spawnEmplaced","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf"], +// ["blck_fnc_sm_spawnInfantryPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_sm_spawnInfantryPatrol.sqf"], + ["blck_fnc_sm_staticPatrolMonitor","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_staticPatrolMonitor.sqf"], +// ["blck_fnc_sm_checkForPlayerNearMission","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_checkForPlayerNearMission.sqf"], + ["blck_fnc_sm_spawnAirPatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrols.sqf"], + ["blck_fnc_sm_spawnEmplaceds","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnEmplaced.sqf"], + ["blck_fnc_sm_spawnInfantryPatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnInfantryPatrols.sqf"], + ["blck_fnc_sm_spawnLootContainers","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnLootContainers.sqf"], + ["blck_fnc_sm_spawnObjects","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjects.sqf"], + ["blck_fnc_sm_spawnVehiclePatrols","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrols.sqf"], + ["blck_fnc_sm_spawnBuildingGarrison_ASL","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnBuildingGarrisonASL.sqf"], + ["blck_fnc_sm_spawnBuildingGarrison_relPos","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf"], + ["blck_fnc_sm_spawnObjectASLVectorDirUp","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf"], + ["blck_fnc_spawnScubaGroup","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnScubaGroup.sqf"], + ["blck_fnc_spawnSDVPatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnSDVPatrol.sqf"], + ["blck_fnc_spawnSurfacePatrol","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_spawnSurfacePatrol.sqf"], + //["blck_fnc_sm_AddScubaGroup","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddScubaGroup.sqf"], + //["blck_fnc_sm_AddSurfaceVehicle","\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_AddSurfaceVehicle.sqf"], + ["blck_fnc_sm_AddSDVVehicle","\q\addons\custom_server\Missions\Static\Code\GMS_sm_AddSDVVehicle.sqf"] +]; +{ + _x params ["_name","_path"]; + missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path]; +} foreach _functions; + +diag_log "[blckeagls] GMS_sm_init_functions.sqf "; + + +/* +blck_fnc_spawnScubaGroup = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnScubaGroup.sqf"; +blck_fnc_spawnSDVPatrol = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnSDVPatrol.sqf"; +blck_fnc_spawnSurfacePatrol = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_spawnSurfacePatrol.sqf"; +blck_fnc_sm_AddScubaGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddScubaGroup.sqf"; +blck_fnc_sm_AddSurfaceVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddSurfaceVehicle.sqf"; +blck_fnc_sm_AddSDVVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\UMS\code\GMS_sm_AddSDVVehicle.sqf"; diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf new file mode 100644 index 0000000..c0fe1b9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf @@ -0,0 +1,88 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_mission"]; +// Spawn landscape +// params["_objects"]; +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +if (isNil "_missionLandscape") then {_missionLandscape = []}; +if (isNil "_garrisonedBuilding_ASLsystem") then { + //diag_log "_fnc_sm_initializeMission: _garrisonedBuilding_ASLsystem set to []"; + _garrisonedBuilding_ASLsystem = []; + }; +if (isNil "_garrisonedBuildings_BuildingPosnSystem") then { + //diag_log "_fnc_sm_initializeMission: _garrisonedBuildings_BuildingPosnSystem set to []"; + _garrisonedBuildings_BuildingPosnSystem = []; + }; +if (isNil "_airPatrols") then {_airPatrols = []}; +if (isNil "_aiGroupParameters") then {_aiGroupParameters = []}; +if (isNil "_missionEmplacedWeapons") then {_missionEmplacedWeapons = []}; +if (isNil "_vehiclePatrolParameters") then {_vehiclePatrolParameters = []}; +if (isNil "_missionLootVehicles") then {_missionLootVehicles = []}; + +_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,[_missionCenter,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; + +{ + //diag_log format["processing _garrisonedBuilding_ASL %1 which = %2",_forEachIndex,_x]; + // ["Land_i_House_Big_02_V2_F",[23650.3,18331.9,3.19],[[0,1,0],[0,0,1]],[true,true],"Red", + _x params["_buildingClassName","_buildingPosnASL","_buildingVectorDirUp","_buildingDamSim","_aiDifficulty","_staticsASL","_unitsASL","_respawnTimer","_noRespawns"]; + private _building = [_buildingClassName,_buildingPosnASL,_buildingVectorDirUp,_buildingDamSim] call blck_fnc_sm_spawnObjectASLVectorDirUp; + [blck_sm_garrisonBuildings_ASL,[_building,_aiDifficulty,_staticsASL,_unitsASL,_respawnTimer,_noRespawns]] call blck_fnc_sm_AddGroupToArray; + //diag_log format["_fnc_sm_initializeMission: blck_sm_garrisonBuildings_ASL updated to: %1",blck_sm_garrisonBuildings_ASL]; +}forEach _garrisonedBuilding_ASLsystem; + +// blcl_sm_garrisonBuilding_relPos +{ + //diag_log format["processing _garrisonedBuilding_relPos %1 which = %2",_forEachIndex,_x]; + _x params["_buildingClassName","_buildingPosnASL","_buildingVectorDirUp","_buildingDamSim","_aiDifficulty","_p","_noStatics","_typesStatics","_noUnits","_respawnTimer","_noRespawns"]; + private _building = [_buildingClassName,_buildingPosnASL,_buildingVectorDirUp,_buildingDamSim] call blck_fnc_sm_spawnObjectASLVectorDirUp; + [blcl_sm_garrisonBuilding_relPos,[_building,_aiDifficulty,_noStatics,_typesStatics,_noUnits,_respawnTimer,_noRespawns]] call blck_fnc_sm_AddGroupToArray; + //diag_log format["_fnc_sm_initializeMission: blcl_sm_garrisonBuilding_relPos updated to: %1",blcl_sm_garrisonBuilding_relPos]; +}forEach _garrisonedBuildings_BuildingPosnSystem; + +{ + [blck_sm_Aircraft,_x] call blck_fnc_sm_AddGroupToArray; + +}forEach _airPatrols; +//uiSleep 1; + +{ + [blck_sm_Infantry,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _aiGroupParameters; + +{ + [blck_sm_Emplaced,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _missionEmplacedWeapons; + +{ + [blck_sm_Vehicles,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _vehiclePatrolParameters; + +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/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf new file mode 100644 index 0000000..325b8d2 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf @@ -0,0 +1,93 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//private["_mode","_sm_groups"]; +//_sm_groups = +blck_sm_Aircraft; +//diag_log format["_fnc_monitorAircraft: time %2 | blck_sm_Aircraft %1",blck_sm_Aircraft,diag_tickTime]; +for "_i" from 1 to (count blck_sm_Aircraft) do +{ + if (_i == (count blck_sm_Aircraft)) exitWith {}; + private _element = blck_sm_Aircraft deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorAircraft: _x %1",_element]; + //diag_log format["_fnc_monitorAircraft: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorAircraft (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + //diag_log format["_fnc_monitorAircraft: _aircraftType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_aircraftType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; + _group = group (driver (_return select 0)); + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + }; + blck_sm_Aircraft pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_Aircraft pushBack _element; + //diag_log format["_fnc_monitorAircraft: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorAircraft(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorAircraft: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorAircraft: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_Aircraft pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorAircraft: despanwing patrol for _element %1",_element]; + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_Aircraft pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf new file mode 100644 index 0000000..a4cb16b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf @@ -0,0 +1,92 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +//diag_log format["_fnc_monitorEmplaced: time %2 | blck_sm_Emplaced %1",blck_sm_Emplaced,diag_tickTime]; +for "_i" from 0 to (count blck_sm_Emplaced) do +{ + if (_i >= (count blck_sm_Emplaced)) exitWith {}; + private _element = blck_sm_Emplaced deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorEmplaced: _element %1",_element]; + //diag_log format["_fnc_monitorEmplaced: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorEmplaced (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + //diag_log format["_fnc_monitorEmplaced: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + // params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]]]; + private _return = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray; + _group = group( (_return select 1) select 0); + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + }; + blck_sm_Emplaced pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_Emplaced pushBack _element; + //diag_log format["_fnc_monitorEmplaced: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorEmplaced(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorEmplaced: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorEmplaced: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_Emplaced pushBack _element; + } else { + if (diag_tickTime >= (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorEmplaced: despanwing patrol for _element %1",_element]; + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_Emplaced pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisonsASL.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisonsASL.sqf new file mode 100644 index 0000000..b48d478 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisonsASL.sqf @@ -0,0 +1,97 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_mode","_sm_groups"]; +//diag_log format["_fnc_sm_monitorGarrisonASL: blck_fnc_spawnGarrisonInsideBuilding_ATL = %1",blck_sm_garrisonBuildings_ASL]; +if (blck_sm_garrisonBuildings_ASL isEqualTo []) exitWith {}; +for "_i" from 0 to (count blck_sm_garrisonBuildings_ASL) do + { + if (_i >= (count blck_sm_garrisonBuildings_ASL)) exitWith {}; + private _element = blck_sm_garrisonBuildings_ASL deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; + // ["_building","_aiDifficultyLevel","_staticsATL","_unitsATL"]; + _groupParameters params['_building','_aiDifficulty','_staticsASL','_unitsASL','_respawnTime','_maxRespawns']; + //diag_log format["_fnc_sm_monitorGarrisonASL: _group = %1 | _timesSpawned = %2 | _respawnTime = %3 | _respawnAt = %4 | _groupSpawned = %5",_group,_timesSpawned,_respawnTime,_respawnAt,_groupSpawned]; + private _pos = position _building; + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + // ["_building","_aiDifficultyLevel","_staticsATL","_unitsATL"] + //diag_log format + private _group = [_building,_aiDifficulty,_staticsASL,_unitsASL] call blck_fnc_sm_spawnBuildingGarrison_ASL; + _timesSpawned = _timesSpawned + 1; + _groupSpawned = 1; + _respawnAt = 0; + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned]; + _element set[respawnAt,_respawnAt]; + //blck_sm_garrisonBuildings_ASL set[blck_sm_garrisonBuildings_ASL find _x,_element]; + }; + blck_sm_garrisonBuildings_ASL pushBack _element; + }; + case 2: { + _groupSpawned = 0; + _respawnAt = diag_tickTime + _respawnTime; + _element set[respawnAt,_respawnAt]; + _element set[groupSpawned,_groupSpawned]; + //blck_sm_garrisonBuildings_ASL set[blck_sm_garrisonBuildings_ASL find _x,_element]; + blck_sm_garrisonBuildings_ASL pushBack _element; + }; + default {}; + }; + + } else { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + blck_sm_garrisonBuildings_ASL pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + //blck_sm_garrisonBuildings_ASL set[(blck_sm_garrisonBuildings_ASL find _x), _element]; + + }; + blck_sm_garrisonBuildings_ASL pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisons_relPos.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisons_relPos.sqf new file mode 100644 index 0000000..af99c94 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisons_relPos.sqf @@ -0,0 +1,89 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_mode","_sm_groups","_pos","_element"]; +if (blck_fnc_sm_spawnBuildingGarrison_relPos isEqualTo []) exitWith {}; +_sm_groups = +blcl_sm_garrisonBuilding_relPos; + +{ + _x params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt"]; + // [_building,_aiDifficulty,_noStatics,_typesStatics,_noUnits,_respawn] + _groupParameters params['_building','_aiDifficulty','_noStatics','_typesStatics','_noUnits','_respawnTime','_maxRespawns']; + _element = +_x;// + _pos = position _building; + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {blcl_sm_garrisonBuilding_relPos deleteAt (blcl_sm_garrisonBuilding_relPos find _x)}; + case 1: { + + if (true /*[_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange*/) then + { + // ["_building","_skillLevel","_noStatics","_typesStatics","_noUnits"]; + private _group = [_building,_aiDifficulty,_noStatics,_typesStatics,_noUnits] call blck_fnc_sm_spawnBuildingGarrison_relPos; + _timesSpawned = _timesSpawned + 1; + _groupSpawned = 1; + _respawnAt = 0; + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned]; + _element set[respawnAt,_respawnAt]; + blcl_sm_garrisonBuilding_relPos set[blcl_sm_garrisonBuilding_relPos find _x,_element]; + }; + }; + case 2: { + _groupSpawned = 0; + _respawnAt = diag_tickTime + _respawnTime; + _element set[respawnAt,_respawnAt]; + _element set[groupSpawned,_groupSpawned]; + blcl_sm_garrisonBuilding_relPos set[blcl_sm_garrisonBuilding_relPos find _x,_element]; + + }; + default {}; + }; + + } else { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + + _groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + blcl_sm_garrisonBuilding_relPos set[(blcl_sm_garrisonBuilding_relPos find _x), _element]; + }; + }; + }; +}forEach _sm_groups; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorInfantry.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorInfantry.sqf new file mode 100644 index 0000000..db85898 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorInfantry.sqf @@ -0,0 +1,111 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_fnc_monitorInfantry(12): time %2 | blck_sm_Infantry %1",blck_sm_Infantry,diag_tickTime]; +if (blck_sm_Infantry isEqualTo []) exitWith {}; +private["_element"]; +for "_i" from 0 to (count blck_sm_Infantry) do +{ + if (_i >= count(blck_sm_Infantry)) exitWith {}; + _element = blck_sm_Infantry deleteAt 0; + //diag_log format["(18) element = %1",_element]; + //diag_log format["_fnc_monitorInfantry(20): _element %1 | _i = %2",_element,_i]; + + if !(_element isEqualTo []) then + { + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorInfantry(21): _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorInfantry (22): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + //diag_log format["_fnc_monitorInfantry(28): _pos = %1 | _difficulty = 2 | _units = %3 | _patrolRadius = %4 | _respawnTime = %5",_pos,_difficulty,_units,_patrolRadius,_respawnTime]; + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + + switch (_mode) do + { + case 0: { + //diag_log format["_fnc_sm_monitorInfantry(46): no further respawns requested for %1",_element]; + }; + case 1: { // Spawn Group Now + //diag_log format["_fnc_sm_monitorInfantry(49): spawning infantry group with element = %1",_element]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + private _numAI = [_units] call blck_fnc_getNumberFromRange; + //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,_numAI,_numAI,_difficulty,_patrolRadius-1,_patrolRadius,true, + [_difficulty] call blck_fnc_selectAIUniforms, + [_difficulty] call blck_fnc_selectAIHeadgear, + [_difficulty] call blck_fnc_selectAIVests, + [_difficulty] call blck_fnc_selectAIBackpacks, + [_difficulty] call blck_fnc_selectAILoadout, + [_difficulty] call blck_fnc_selectAISidearms + ] call blck_fnc_spawnGroup; + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + //diag_log format["_fnc_monitorInfantry (67): _element %1",_element]; + //diag_log format["_fnc_monitorInfantry (69): blck_sm_Infantry %1",blck_sm_Infantry]; + }; + blck_sm_Infantry pushBack _element; + }; + case 2: { // Spawn Group at a Later Time. + blck_liveMissionAI pushBack[units _group,diag_tickTime]; // schedule units of group for deletion now. + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_Infantry pushBack _element; + //diag_log format["_fnc_monitorInfantry(77): update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorInfantry(81) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorInfantry(83): diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorInfantry(87): playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_Infantry pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorInfantry(92): despanwing patrol for _element %1",_element]; + _groupParameters set [2, {alive _x} count (units _group)]; + {[_x] call blck_fnc_deleteAI} forEach (units _group); + deleteGroup _group; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + //diag_log format["_fnc_monitorInfantry (101): _element %1",_element]; + //diag_log format["_fnc_monitorInfantry (102): blck_sm_Infantry %1",blck_sm_Infantry]; + }; + blck_sm_Infantry pushBack _element; + }; + }; + }; + //blck_sm_Infantry pushBack _element; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf new file mode 100644 index 0000000..9ffcad5 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf @@ -0,0 +1,92 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_fnc_monitorScubaGroups: time %2 | blck_sm_scubaGroups %1",blck_sm_scubaGroups,diag_tickTime]; +if (blck_sm_scubaGroups isEqualTo []) exitWith {}; +for "_i" from 0 to (count blck_sm_scubaGroups) do +{ + if (_i >= (count blck_sm_scubaGroups)) exitWith {}; + private _element = blck_sm_scubaGroups deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorScubaGroups: _element %1 | _i = %2",_element,_i]; + //diag_log format["_fnc_monitorScubaGroups: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorScubaGroups (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorScubaGroups: _pos = %1 | _difficulty = 2 | _units = %3 | _patrolRadius = %4 | _respawnTime = %5",_pos,_difficulty,_units,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: { + //diag_log format["_fnc_sm_monitorInfantry(46): no further respawns requested for %1",_element]; + }; + case 1: { + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + private _numAI = [_units] call blck_fnc_getNumberFromRange; + //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,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup; + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + }; + blck_sm_scubaGroups pushBack _element; + }; + case 2: { + blck_liveMissionAI pushBack[units _group,diag_tickTime]; // schedule units of group for deletion now. + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_scubaGroups pushBack _element; + //diag_log format["_fnc_monitorScubaGroups: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorScubaGroups(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorScubaGroups: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + blck_sm_scubaGroups pushBack _element; + //diag_log format["_fnc_monitorScubaGroups: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorScubaGroups: despanwing patrol for _element %1",_element]; + _groupParameters set [2, {alive _x} count (units _group)]; + {[_x] call blck_fnc_deleteAI} forEach (units _group); + deleteGroup _group; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_scubaGroups pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf new file mode 100644 index 0000000..5f3a0b2 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf @@ -0,0 +1,94 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +//diag_log format["_fnc_monitorShips: time %2 | blck_sm_surfaceShips %1",blck_sm_surfaceShips,diag_tickTime]; +for "_i" from 0 to (count blck_sm_surfaceShips) do +{ + if (_i >= (count blck_sm_surfaceShips)) exitWith {}; + private _element = blck_sm_surfaceShips deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorShips: _element %1",_element]; + //diag_log format["_fnc_monitorShips: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorShips (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + //diag_log format["_fnc_monitorShips: _return = %1",_return]; + _group = group ((_return select 1) select 0); + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + //blck_sm_surfaceShips pushBack _element; + }; + blck_sm_surfaceShips pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_surfaceShips pushBack _element; + //diag_log format["_fnc_monitorShips: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorShips(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorShips: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorShips: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_surfaceShips pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorShips: despanwing patrol for _element %1",_element]; + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_surfaceShips pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf new file mode 100644 index 0000000..ceb0974 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf @@ -0,0 +1,236 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +private _triggerRange = 2000; +_fnc_updateGroupSpawnTimerFields = { + //diag_log format["_fnc_updateGroupSpawnTimerFields::-> _this = %1",_this]; + params["_array","_element",["_group",grpNull],["_spawnTime",0]]; + private["_index"]; + _index = _array find _element; + _element set[1,_group]; + _element set[2,_spawnTime]; + _array set[_index,_element]; +}; + +private["_group","_groupParameters","_numAI","_return"]; +_sm_groups = +blck_sm_Groups; +{ + + // [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnTime, _group, _spawnAt] + _x params["_groupParameters","_group","_spawnAt"]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["<_sm_monitorStaticUnits::Group spawning routine:: _units = %1 | _x = %2 |_forEachIndex = %3",_units,_x,_forEachIndex]; + private _groupSpawned = false; + if ([_pos,_triggerRange] call blck_fnc_playerInRange) then + { + if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one. + { + //diag_log format["[blckeagls static group spawner] evaluating _x = %1 ",_x]; + _numAI = [_units] call blck_fnc_getNumberFromRange; + //diag_log format["[blckeagls static group spawner] _units = %1 and _numAI = %2",_units,_numAI]; + // // params["_pos", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ]; + _group = [_pos,_pos,_numAI,_numAI,_difficulty,_patrolRadius-2,_patrolRadius,true] call blck_fnc_spawnGroup; + //diag_log format["[blckeagls static group spawner] _group %1",_group]; + [blck_sm_Groups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups]; + }; + if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnTime > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval + { + [blck_sm_Groups,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Groups updated to %1",blck_sm_Groups]; + }; + if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead but we should not do a respawn + { + blck_sm_Groups deleteAt (blck_sm_Groups find _x); + }; + }; +}forEach _sm_groups; + +_sm_scubaGroups = +blck_sm_scubaGroups; +{ + + // [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/, _respawnTime, _group, _spawnAt] + _x params["_groupParameters","_group","_spawnAt"]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + //diag_log format["<_sm_monitorScubaUnits:: _group = %1 | _x = %2 |_forEachIndex = %3",_group,_x,_forEachIndex]; + private _groupSpawned = false; + if ([_pos,_triggerRange] call blck_fnc_playerInRange) then + { + if ((isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one. + { + //diag_log format["[blckeagls static scubaGroup spawner] evaluating _x = %1 ",_x]; + _numAI = [_units] call blck_fnc_getNumberFromRange; + //diag_log format["[blckeagls static scubaGroup spawning routine] _units = %1 and _numAI = %2",_units,_numAI]; + //params["_pos", "_numUnits", ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_UMS_uniforms], ["_headGear",blck_UMS_headgear],["_configureWaypoints",true],["_weapons",blck_UMS_weapons],["_vests",blck_UMS_vests]]; + _group = [_pos,_difficulty,_units,_patrolRadius] call blck_fnc_spawnScubaGroup; + //diag_log format["[blckeagls static scubaGroup spawner] _group %1",_group]; + [blck_sm_scubaGroups,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | spawn Group step :: blck_sm_Groups updated to %1",blck_sm_Groups]; + }; + if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnTime > 0)) then // a group was spawned and all units are dead and we should rspawn them after a certain interval + { + [blck_sm_scubaGroups,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | set scubaGroup respawn time step :: blck_sm_Groups updated to %1",blck_sm_scubaGroups]; + }; + if (!(_groupSpawned) && (isNull _group) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead but we should not do a respawn + { + blck_sm_scubaGroups deleteAt (blck_sm_scubaGroups find _x); + }; + }; +}forEach _sm_scubaGroups; + +_sm_Emplaced = +blck_sm_Emplaced; +{ + // ["B_G_Mortar_01_F",[22944.3,16820.5,3.14243],"green",0,0,_group,_spawnAt] + //diag_log format["_sm_monitorEmplacedUnits::-> _x = %1",_x]; + _x params["_groupParameters","_group","_spawnAt"]; + _groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + if ([_pos,_triggerRange] call blck_fnc_playerInRange) then + { + if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one. + { + //diag_log format["[blckeagls static Emplaced spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; + // params["_coords","_missionEmplacedWeapons","_useRelativePos","_noEmplacedWeapons","_aiDifficultyLevel",["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols]]; + _group = [_pos,[_groupParameters],false,1,_difficulty] call blck_fnc_spawnEmplacedWeaponArray; + [blck_sm_Emplaced,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced]; + }; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead + { + [blck_sm_Emplaced,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Emplaced updated to %1",blck_sm_Emplaced]; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0)) then // a group was spawned and all units are dead + { + blck_sm_Emplaced deleteAt (blck_sm_Emplaced find _x); + }; + +}forEach _sm_Emplaced; + +_sm_Vehicles = +blck_sm_Vehicles; +{ + // ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt], + //diag_log format["_sm_monitorVehicles::-> _x = %1",_x]; + _x params["_groupParameters","_group","_spawnAt"]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + if ([_pos,_triggerRange] call blck_fnc_playerInRange) then + { + if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one. + { + //params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]]; + _return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + // _return = [_vehicles, _missionAI, _abort]; + _group = group (_return select 1 select 0); + [blck_sm_Vehicles,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles]; + }; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead + { + [blck_sm_Vehicles,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles]; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead + { + blck_sm_Vehicles deleteAt (blck_sm_Vehicles find _x); + }; +}forEach _sm_Vehicles; + +_sm_surfaceVehicles = +blck_sm_surfaceShips; +{ + // ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt], + _x params["_groupParameters","_group","_spawnAt"]; + _groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + if ([_pos,_triggerRange] call blck_fnc_playerInRange) then + { + if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one. + { + //diag_log format["[blckeagls static vehiclePatrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; + [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + _return params ["_vehicles", "_missionAI", "_abort"]; + _group = group (_missionAI select 0); + [blck_sm_surfaceShips,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles]; + }; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead + { + [blck_sm_surfaceShips,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles]; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead + { + blck_sm_surfaceShips deleteAt (blck_sm_surfaceShips find _x); + }; +}forEach _sm_surfaceVehicles; + +_sm_SDVVehicles = +blck_sm_submarines; +{ + // ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red",600,0,_group,_spawnAt], + _x params["_groupParameters","_group","_spawnAt"]; + _groupParameters params["_weapType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + if ([_pos,_triggerRange] call blck_fnc_playerInRange) then + { + if ( (_group isEqualTo grpNull) && (diag_tickTime > _spawnAt) && (_spawnAt != -1) ) then // no group has been spawned, spawn one. + { + //diag_log format["[blckeagls static sub patrol spawner] _weapType = %1 and _difficulty = %2",_weapType,_difficulty]; + //params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]]; + _return = [_pos,1,_difficulty,[_groupParameters],false,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,blck_backpacks,blck_UMS_weapons,blck_Pistols,true] call blck_fnc_spawnMissionVehiclePatrols; + _return params ["_vehicles", "_missionAI", "_abort"]; + _group = group (_missionAI select 0); + [blck_sm_submarines,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles]; + }; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead + { + [blck_sm_submarines,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Vehicles updated to %1",blck_sm_Vehicles]; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead + { + blck_sm_submarines deleteAt (blck_sm_submarines find _x); + }; +}forEach _sm_SDVVehicles; + +_sm_Aircraft = +blck_sm_Aircraft; +{ + // ["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,0], + _x params["_groupParameters","_group","_spawnAt"]; + _groupParameters params["_aircraftType","_pos","_difficulty","_patrolRadius","_respawnTime"]; + if ([_pos,_triggerRange] call blck_fnc_playerInRange) then + { + if ( (isNull _group) && (diag_tickTime > _spawnAt) && (_spawnAt != -1)) then // no group has been spawned, spawn one. + { + _weapon = [toLower _difficulty] call blck_fnc_selectAILoadout; + //params["_coords","_skillAI","_helis",["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]]] + //diag_log format["[blckeagls static aircraftePatrol spawner] _weapon = %1 and _difficulty = %2",_weapon,_difficulty]; + _return = [_pos,_difficulty,[_aircraftType]] call blck_fnc_spawnMissionHeli; // Allow the spawner to fit the default AI Loadouts for blckeagls; revisit at a later time when custom uniforms are set up for these AI. + //diag_log format["[blckeagls] static aircraftePatrol spawner -> _return = %1",_return]; + _return params ["_patrolHeli","_ai","_abort"]; + _group = group (_ai select 0); + [blck_sm_Aircraft,_x,_group,-1] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | spawn emplaced step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft]; + }; + }; + if ( (isNull _group) && (_spawnAt == -1) && (_respawnTime > 0) ) then // a group was spawned and all units are dead + { + [blck_sm_Aircraft,_x,_group,(diag_tickTime + _respawnTime)] call _fnc_updateGroupSpawnTimerFields; + //diag_log format["_sm_monitorStaticUnits | set Group respawn time step :: blck_sm_Aircraft updated to %1",blck_sm_Aircraft]; + }; + if ( (_group isEqualTo grpNull) && (_spawnAt == -1) && (_respawnTime == 0) ) then // a group was spawned and all units are dead + { + blck_sm_Aircraft deleteAt (blck_sm_Aircraft find _x); + }; +}forEach _sm_Aircraft; diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf new file mode 100644 index 0000000..fc2790d --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf @@ -0,0 +1,94 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +//diag_log format["_fnc_monitorSubs: time %2 | blck_sm_submarines %1",blck_sm_submarines,diag_tickTime]; +for "_i" from 0 to (count blck_sm_submarines) do +{ + if (_i >= (count blck_sm_submarines)) exitWith {}; + private _element = blck_sm_submarines deleteAt 0; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorSubs: _element %1",_element]; + //diag_log format["_fnc_monitorSubs: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorSubs (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + //_groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorVehicles: _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _return = [_pos,1,_difficulty,[_groupParameters],false,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,blck_backpacks,blck_UMS_weapons,blck_Pistols,true] call blck_fnc_spawnMissionVehiclePatrols; + //diag_log format["_fnc_monitorSubs: _return = %1",_return]; + _group = group ((_return select 1) select 0); + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + //blck_sm_submarines pushBack _element; + }; + blck_sm_submarines pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + bblck_sm_submarines pushBack _element; + //diag_log format["_fnc_monitorSubs: update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorSubs(56) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorSubs: diag_tickTime = %1 | playerNearAt = %2",diag_tickTime,_group getVariable["playerNearAt",-1]]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorSubs: playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_submarines pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorSubs: despanwing patrol for _element %1",_element]; + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_submarines pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf new file mode 100644 index 0000000..50b5f48 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf @@ -0,0 +1,96 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log format["_fnc_monitorVehicles: time %2 | blck_sm_Vehicles %1",blck_sm_Vehicles,diag_tickTime]; +for "_i" from 0 to (count blck_sm_Vehicles) do +{ + if (_i >= (count blck_sm_Vehicles)) exitWith {}; + private _element = blck_sm_Vehicles deleteAt 0; + //diag_log format["_fnc_monitorVehicles(18): _element %1",_element]; + _element params["_groupParameters","_group","_groupSpawned","_timesSpawned","_respawnAt","_maxRespawns"]; + //diag_log format["_fnc_monitorVehicles: _groupParameters = %1",_groupParameters]; + //diag_log format["_fnc_monitorVehicles (21): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; + _groupParameters params["_vehicleType","_pos","_difficulty","_patrolRadius","_respawnTime","_maxRespawns"]; + //diag_log format["_fnc_monitorVehicles(23): _vehicleType | %1 | _pos = %2 | _difficulty = %3 | _patrolRadius = %4 | _respawnTime = %5",_vehicleType,_pos,_difficulty,_patrolRadius,_respawnTime]; + + if (!(isNull _group) && {alive _x} count (units _group) == 0) then + { + deleteGroup _group; + _group = grpNull; + }; + if (isNull _group) then + { + _mode = -1; + if ((_timesSpawned == 0) && (_groupSpawned == 0)) then {_mode = 1}; // spawn-respawn + if (_timesSpawned > 0) then + { + if ((_groupSpawned == 1) && (_respawnTime == 0)) then {_mode = 0}; // remove patrol from further evaluation + if ((_timesSpawned > _maxRespawns) && (_maxRespawns != -1)) then {_mode = 0}; + if ((_groupSpawned == 1) && (_respawnTime > 0)) then {_mode = 2}; // set up for respawn at a later time + if ((_groupSpawned == 0) && (diag_tickTime > _respawnAt)) then {_mode = 1}; + }; + switch (_mode) do + { + case 0: {}; + case 1: { + + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false]]; + _return = [_pos,1,_difficulty,[_groupParameters],false] call blck_fnc_spawnMissionVehiclePatrols; + //diag_log format["_fnc_monitorVehicles(50): _return = %1",_return]; + _group = group ((_return select 1) select 0); + // _element [[""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90],O Alpha 1-1,1,1,0,-1]" + // _groupParameters = [""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90]" + _element set[patrolGroup,_group]; + _element set[groupSpawned,1]; + _element set[timesSpawned,_timesSpawned + 1]; + _element set[respawnAt,0]; + }; + blck_sm_Vehicles pushBack _element; + }; + case 2: { + _element set[respawnAt,diag_tickTime + _respawnTime]; + _element set[groupSpawned,0]; + blck_sm_Vehicles pushBack _element; + //diag_log format["_fnc_monitorVehicles(63): update respawn time to %1",_respawnAt]; + }; + default {}; + }; + //diag_log format["_fnc_monitorVehicles(67) respawn conditions evaluated : _group = %1 | _groupSpawned = %2 | _timesSpawned = %3",_group,_groupSpawned,_timesSpawned]; + } else { + //diag_log format["_fnc_monitorVehicles(69): diag_tickTime = %1 | playerNearAt = %2 | _playerInRange = %3",diag_tickTime,_group getVariable["playerNearAt",-1],[_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange]; + if ([_pos,staticPatrolTriggerRange] call blck_fnc_playerInRange) then + { + _group setVariable["playerNearAt",diag_tickTime]; + //diag_log format["_fnc_monitorVehicles(73): playerNearAt updated to %1",_group getVariable["playerNearAt",-1]]; + blck_sm_Vehicles pushBack _element; + } else { + if (diag_tickTime > (_group getVariable["playerNearAt",diag_tickTime]) + blck_sm_groupDespawnTime) then + { + //diag_log format["_fnc_monitorVehicles(78): despanwing patrol for _element %1",_element]; + // _element [[""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90],O Alpha 1-1,1,1,0,-1]" + // _groupParameters = [""Exile_Car_Offroad_Armed_Guerilla02"",[22809.5,16699.2,8.78706],""green"",600,90]" + //_groupParameters set [2, {alive _x} count (units _group)]; + private _veh = vehicle (leader _group); + {deleteVehicle _x} forEach (units _group); + deleteGroup _group; + [_veh] call blck_fnc_destroyVehicleAndCrew; + _element set[groupParameters,_groupParameters]; + _element set[patrolGroup ,grpNull]; + _element set[timesSpawned,(_timesSpawned - 1)]; + _element set[groupSpawned,0]; + }; + blck_sm_Vehicles pushBack _element; + }; + }; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnAirPatrol.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnAirPatrol.sqf new file mode 100644 index 0000000..02dc685 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnAirPatrol.sqf @@ -0,0 +1,31 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +diag_log format["_fnc_sm_spawnAirPatrols: _this = %1",_this]; +params["_airPatrols"]; +private["_aircraft","_pos","_difficulty","_uniforms","_headGear"]; +_aircraft = _x select 0; +_pos = _x select 1; +_difficulty = _x select 2; +_uniforms = blck_SkinList; +_headGear = blck_headgearList; +switch (_difficulty) do +{ + case "blue": {_weapons = blck_WeaponList_Blue;}; + case "red": {_weapons = blck_WeaponList_Red}; + case "green": {_weapons = blck_WeaponList_Green}; + case "orange": {_weapons = blck_WeaponList_Orange}; +}; +_return = [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli; +_group = group (_return select 1 select 0); +_group + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnAirPatrols.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnAirPatrols.sqf new file mode 100644 index 0000000..9aaf64e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnAirPatrols.sqf @@ -0,0 +1,50 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +/* +_coords = _this select 0; +_skillAI = _this select 1; +_weapons = _this select 2; +_uniforms = _this select 3; +_headGear = _this select 4; +_helis = _this select 5; +*/ + +params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear","_weapons"]; +diag_log format["_sm_spawnAirPatrols:: _this = %1",_this]; +diag_log format["_sm_spawnAirPatrols:: _airPatrols = %1",_airPatrols]; +if (_airPatrols isEqualTo []) then +{ + for "_i" from 1 to _noAirPatrols do + { + /* + _coords = _this select 0; + _skillAI = _this select 1; + _weapons = _this select 2; + _uniforms = _this select 3; + _headGear = _this select 4; + _helis = _this select 5; + */ + [_center,_difficulty,_weapons,_uniforms,_headGear,_heliTypes,0] call blck_fnc_spawnMissionHeli; + }; +} else { + { + /* + /*[aircraft classname, position, difficulty(blue, red etc)]*/ + _aircraft = _x select 0; + _pos = _x select 1; + _difficulty = _x select 2; + [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnMissionHeli; + }forEach _airPatrols; +}; + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf new file mode 100644 index 0000000..6cb3fd4 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf @@ -0,0 +1,8 @@ + + +params["_building","_aiDifficultyLevel","_statics","_units"]; +diag_log format["_fnc_sm_spawnBuildingGarrisonASL: handling _building = %1 | at location = %2",_building,position _building]; +private _group = [] call blck_fnc_create_AI_Group; +//params["_building","_group","_statics","_men","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks",["_launcher","none"],"_weaponList","_sideArms"]; +[_building,_group,_statics,_units,_aiDifficultyLevel] call blck_fnc_spawnGarrisonInsideBuilding_ATL; +_group diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf new file mode 100644 index 0000000..a49e28f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf @@ -0,0 +1,8 @@ + + +params["_building","_skillLevel","_noStatics","_typesStatics","_noUnits"]; +diag_log format["_fnc_sm_spawnBuildingGarrison_relPos: handling _building = %1 | at location = %2",_building,position _building]; +private _group = [] call blck_fnc_create_AI_Group; +// ["_building","_group","_noStatics","_typesStatics","_noUnits",["_aiDifficultyLevel","Red"], +[_building,_group,_noStatics,[],_noUnits,_skillLevel] call blck_fnc_spawnGarrisonInsideBuilding_relPos; +_group \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaced.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaced.sqf new file mode 100644 index 0000000..73109e5 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaced.sqf @@ -0,0 +1,58 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"]; +_emplacedWeps = []; +_emplacedAI = []; +_units = []; +_abort = false; +_pos = []; + +//diag_log format["_sm_spawnEmplaced :: _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["GRG_vehType","emplaced"]; + _wep setPosATL _pos; + [_wep,false] call blck_fnc_configureMissionVehicle; + _units = units _empGroup; + _gunner = _units select 0; + _gunner moveingunner _wep; +} forEach _missionEmplacedWeapons; +blck_monitoredVehicles append _emplacedWeps; + +true diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf new file mode 100644 index 0000000..7bef936 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf @@ -0,0 +1,58 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +private["_return","_emplacedWeps","_emplacedAI","_wep","_units","_gunner","_abort","_pos","_mode"]; +_emplacedWeps = []; +_emplacedAI = []; +_units = []; +_abort = false; +_pos = []; + +//diag_log format["_sm_spawnEmplaced :: _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", "_center", _numai1, _numai2, _skillLevel, _minDist, _maxDist, _configureWaypoints, _uniforms, _headGear,_vests,_backpacks,_weaponList,_sideArms, _scuba ]; + __empGroup = [_pos,_pos,1,1,_difficulty,1,2,false,_uniforms,_headGear] call blck_fnc_spawnGroup; + _empGroup setcombatmode "RED"; + _empGroup setBehaviour "COMBAT"; + [_pos,0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints; + //if (isNull _empGroup) exitWith {_abort = _true}; + _wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle; + //_empGroup setVariable["groupVehicle",_wep]; + _wep setVariable["vehicleGroup",_empGroup]; + _wep setVariable["GRG_vehType","emplaced"]; + _wep setPosATL _pos; + [_wep,false] call blck_fnc_configureMissionVehicle; + _units = units _empGroup; + _gunner = _units select 0; + _gunner moveingunner _wep; +} forEach _missionEmplacedWeapons; +blck_monitoredVehicles append _emplacedWeps; + +true diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnInfantryPatrols.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnInfantryPatrols.sqf new file mode 100644 index 0000000..e99242a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnInfantryPatrols.sqf @@ -0,0 +1,37 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +// params["_coords",["_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. + //params[_coords,"_maxNoAI,_missionGroups,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weapons,sideArms,_isScubaGroup]; + [_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,_pos,_noAI,_noAI,_difficulty,_patrolRadius,_patrolRadius,true,_uniforms,_headGear] call blck_fnc_spawnGroup; + }forEach _patrols; +}; + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf new file mode 100644 index 0000000..a2fe092 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf @@ -0,0 +1,40 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_objects","_coords"]; +private["_object"]; + +if !(_objects isEqualTo []) exitWith +{ // Spawn loot crates where specified in _objects using the information for loot parameters provided for each location. + { + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["_fnc_sm_spawnLootContainers (21):-> _x = %1",_x]; + }; + #endif + //diag_log format["_fnc_sm_spawnLootContainers (21):-> _x = %1",_x]; + // [selectRandom blck_crateTypes,[22904.8,16742.5,6.30195],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts] + _x params["_crateClassName","_cratePosASL","_vectorDirUp","_allowDamageSim","_crateLoot","_lootCounts"]; + _crate = [_cratePosASL, _crateClassName] call blck_fnc_spawnCrate; + [_crate, _crateLoot,_lootCounts] call blck_fnc_fillBoxes; + } forEach _objects; +}; + +// In the case where no loot crate parameters are defined in _objects just spawn 1 at the center of the mission. +if (_objects isEqualTo []) then +{ + _crateType = selectRandom blck_crateTypes; + _crate = [_coords,_crateType] call blck_fnc_spawnCrate; + [_crate,blck_BoxLoot_Red,blck_lootCountsGreen] call blck_fnc_fillBoxes; +}; + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnMission.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnMission.sqf new file mode 100644 index 0000000..e359772 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnMission.sqf @@ -0,0 +1,51 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_mission"]; +// Spawn landscape +// params["_objects"]; +[_missionLandscape] call blck_fnc_sm_spawnObjects; +uiSleep 10; // Let the objects 'settle' before placing anything on or around them. + + +// Spawn Air Patrols +// params["_airPatrols","_noAirPatrols","_heliTypes","_center","_difficulty","_uniforms","_headGear"]; +[_airPatrols,_noAirPatrols,_aircraftTypes,_missionCenter,_difficulty,_uniforms,_headgear,_weapons] call blck_fnc_sm_spawnAirPatrols; +//uiSleep 1; + +// Spawn Vehicle Patrols +// params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]]; +[_missionCenter,_noVehiclePatrols,_vehiclePatrolParameters,_difficulty,_uniforms,_headGear] call blck_fnc_sm_spawnVehiclePatrols; +//uiSleep 1; + + +// spawn infantry +// params["_patrols","_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_weapons",blck_WeaponList_Orange],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; +[_aiGroupParameters, _missionCenter,_minNoAI,_maxNoAI,_difficulty,_weapons,_uniforms,_headGear] call blck_fnc_sm_spawnInfantryPatrols; +//uiSleep 1; + +// spawn loot vehicles +// params["_objects","_coords","_loot","_lootCounts"]; +[_missionLootVehicles,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers; + +// Spawn static weapons +// params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; +[_missionEmplacedWeapons,_noEmplacedWeapons,_difficulty,_missionCenter,_uniforms,_headGear] call blck_fnc_sm_spawnEmplaceds; + +// spawn loot chests +[_missionLootBoxes,_missionCenter,_crateLoot,_lootCounts] call blck_fnc_sm_spawnLootContainers; + +_blck_localMissionMarker = ["",_missionCenter,"","",_markerColor,_markerType]; +[_blck_localMissionMarker] call blck_fnc_spawnMarker; + +diag_log format["[blckeagls] Static Mission Spawner: Mission %1 spawned",_mission]; + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf new file mode 100644 index 0000000..9ed7137 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf @@ -0,0 +1,21 @@ + +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +params["_buildingClassName","_posASL","_vectorDirUp","_enableDamSim"]; +_object = createVehicle [_buildingClassName, [0,0,0], [], 0, "CAN_COLLIDE"]; +_object setPosASL _posASL; +_object setVectorDirAndUp _vectorDirUp; +_object enableSimulationGlobal (_enableDamSim select 0); +_object allowDamage (_enableDamSim select 1); + +_object \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf new file mode 100644 index 0000000..c9f885f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf @@ -0,0 +1,19 @@ +/* + by Ghostrider [GRG] + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_objects"]; +private["_objects","_object"]; +{ + _object = [_x select 0, _x select 1, _x select 2, _x select 3] call blck_fnc_sm_spawnObjectASLVectorDirUp; +} forEach _objects; + + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrol.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrol.sqf new file mode 100644 index 0000000..689b715 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrol.sqf @@ -0,0 +1,33 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_airPatrols"]; +private["_aircraft","_pos","_difficulty","_uniforms","_headGear"]; +_aircraft = _x select 0; +_pos = _x select 1; +_difficulty = _x select 2; +_uniforms = blck_SkinList; +_headGear = blck_headgearList; +switch (_difficulty) do +{ + case "blue": {_weapons = blck_WeaponList_Blue;}; + case "red": {_weapons = blck_WeaponList_Red}; + case "green": {_weapons = blck_WeaponList_Green}; + case "orange": {_weapons = blck_WeaponList_Orange}; +}; +_vehGroup = [_spawnPos,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; +//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]]; +_return = [_pos,_difficulty,_weapons,_uniforms,_headGear,_aircraft] call blck_fnc_spawnVehiclePatrol; +_group = group (_return select 1 select 0); +_group + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf new file mode 100644 index 0000000..c89c602 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf @@ -0,0 +1,51 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + + +params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]]; +//diag_log format["_sm_spawnVehiclePatrols:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns]; +private["_vehGroup","_patrolVehicle","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_randomVehicle","_return","_abort"]; +//if (count _weapons isEqualTo 0) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (_vehiclePatrolSpawns isEqualTo []) then +{ + private["_spawnPoints","_vehType"]; + _spawnPoints = [_coords,_noVehiclePatrols,75,100] call blck_fnc_findPositionsAlongARadius; + { + // ["B_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"red", 600], + _vehType = selectRandom blck_AIPatrolVehicles; + _vehiclePatrolSpawns pushBack [_vehType, _x, _aiDifficultyLevel, 150]; + } forEach _spawnPoints; +}; + +{ + private ["_vehicle","_spawnPos","_difficulty","_patrolRadius"]; + _vehicle = _x select 0; + _spawnPos = _x select 1; + _difficulty = _x select 2; + _patrolRadius = _x select 3; + //_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,_minDist,_maxDist,_uniforms,_headGear,true,_weapons,_vests,_isScubaGroup] call blck_fnc_spawnGroup; + _vehGroup = [_spawnPos,_spawnPos,3,3,_difficulty,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup; + + //params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]]; + _patrolVehicle = [_spawnPos,_spawnPos,_vehicle,_patrolRadius,_patrolRadius,_vehGroup] call blck_fnc_spawnVehiclePatrol; + //_vehGroup setVariable["groupVehicle",_vehicle]; + + if !(isNull _patrolVehicle) then + { + _patrolVehicle setVariable["vehicleGroup",_vehGroup]; + }; +} forEach _vehiclePatrolSpawns; + +true + + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_staticPatrolMonitor.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_staticPatrolMonitor.sqf new file mode 100644 index 0000000..f57a5de --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_staticPatrolMonitor.sqf @@ -0,0 +1,27 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +// GMS_fnc_sm_missionPatrolMonitor + +[] call blck_fnc_sm_monitorInfantry; +[] call blck_fnc_sm_monitorScuba; +//uiSleep 0.1; +[] call blck_fnc_sm_monitorVehicles; +[] call blck_fnc_sm_monitorAircraft; +[] call blck_fnc_sm_monitorEmplaced; + +[] call blck_fnc_sm_monitorShips; +[] call blck_fnc_sm_monitorSubs; +//[] call blck_fnc_sm_monitorGarrisonsASL; +//[] call blck_fnc_sm_monitorGarrisons_relPos; + + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnSDVPatrol.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnSDVPatrol.sqf new file mode 100644 index 0000000..49a418e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnSDVPatrol.sqf @@ -0,0 +1,21 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +// ["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0], +params["_SDV","_pos","_difficulty","_numAI","_patrolRadius","_respawnTime"]; +//diag_log format["_fnc_spawnSDVPatrol: _this = %1",_this]; +private["_vehicle","_group","_diveDepth"]; + +_group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius - 2,_patrolRadius,blck_UMS_uniforms,blck_UMS_headgear,true,blck_UMS_weapons,blck_UMS_vests,true] call blck_fnc_spawnGroup; +_vehicle = [[_pos select 0, _pos select 1,0],[_pos select 0, _pos select 1,0],_vehType,_patrolRadius - 2,_patrolRadius,_group] call blck_fnc_spawnVehiclePatrol; +_diveDepth = 0.5 * [_pos] call blck_fnc_findWaterDepth; +(driver _vehicle) swiminDepth (_diveDepth select 2); +_group \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnScubaGroup.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnScubaGroup.sqf new file mode 100644 index 0000000..b9d40c1 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnScubaGroup.sqf @@ -0,0 +1,38 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#define configureWaypoints true +#define isScubaGroup true +// [_pos,_difficulty,_units,_patrolRadius] +params["_pos",["_skillLevel","red"],["_numUnits",6],["_patrolRadius",15]]; +//diag_log format["_fnc_spawnScubaGroup: _this = %1",_this]; +private["_group","_diveDepth"]; +_group = grpNull; +//params["_pos", "_center", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], ["_minDist",20], ["_maxDist",35],["_configureWaypoints",true], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_scuba",false] ]; +_group = [_pos,_pos,_numUnits,_numUnits,_skillLevel, _patrolRadius - 2, _patrolRadius, configureWaypoints, blck_UMS_uniforms, blck_UMS_headgear, blck_UMS_vests, [], blck_UMS_weapons, [], isScubaGroup] call blck_fnc_spawnGroup; +//diag_log format["_fnc_spawnScubaGroup (14): -> value returned for group = %1",_group]; +private _waterDepth = [_pos] call blck_fnc_findWaterDepth; +_diveDepth = _waterDepth * 0.5; +{ + _x swimInDepth (_diveDepth); +} forEach units _group; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then +{ + { + diag_log format["_fnc_spawnScubaGroup:: _this select %1 = %2",_forEachIndex,_this select _forEachIndex]; + }forEach _this; + + diag_log format["_fnc_spawnScubaGroup:: -->> group spawned = %1",_group]; +}; +#endif +_group; diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnSurfacePatrol.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnSurfacePatrol.sqf new file mode 100644 index 0000000..c2a6612 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_spawnSurfacePatrol.sqf @@ -0,0 +1,22 @@ + +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +// ["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0], +params["_SDV","_pos","_difficulty","_numAI","_patrolRadius","_respawnTime"]; +//diag_log format["_fnc_spawnSurfacePatrol: _this = %1",_this]; +private["_vehicle"]; +_group = [_pos,_numAI,_numAI,_difficulty,_pos,_patrolRadius - 2,_patrolRadius,blck_UMS_uniforms,blck_UMS_headgear,true,blck_UMS_weapons,blck_UMS_vests,true] call blck_fnc_spawnGroup; +// params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]]; + +_vehicle = [_pos,_pos,_vehType,_minDis,_maxDis,_group] call blck_fnc_spawnVehiclePatrol; +_vehicle + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddSDVVehicle.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddSDVVehicle.sqf new file mode 100644 index 0000000..49581d0 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddSDVVehicle.sqf @@ -0,0 +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/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehicle"]; +blck_sm_submarines pushBack [_vehicle,grpNull,0]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddScubaGroup.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddScubaGroup.sqf new file mode 100644 index 0000000..3b73fdc --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddScubaGroup.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + Copyright 20167 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_group"]; +blck_sm_scubaGroups pushBack [_group,grpNull,0]; +//diag_log format["_sm_AddScubaGroup:: blck_sm_scubaGroups = %1",blck_sm_scubaGroups]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddSurfaceVehicle.sqf b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddSurfaceVehicle.sqf new file mode 100644 index 0000000..3150815 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/Code/GMS_sm_AddSurfaceVehicle.sqf @@ -0,0 +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/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_vehicle"]; +blck_sm_surfaceShips pushBack [_vehicle,grpNull,0]; +true \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf b/Server/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf new file mode 100644 index 0000000..0bacb1f --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf @@ -0,0 +1,24 @@ +/* + 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 ["_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","template.sqf"], + //["Epoch","Altis","staticMissionExample2_Epoch.sqf"], + //["Exile","Altis","staticMissionExample2_Exile.sqf"], + ["newmission","newmap","somescript.sqf"] +]; + +diag_log "[blckeagls] GMS_StaticMissions_Lists.sqf "; diff --git a/Server/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf b/Server/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf new file mode 100644 index 0000000..2cf1d3b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf @@ -0,0 +1,42 @@ +/* + by Ghostrider [GRG] + for ghostridergaming + 12/5/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +//diag_log "[blckeagls] GMS_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"; +#include "\q\addons\custom_server\Missions\Static\GMS_StaticMissions_Lists.sqf"; + +blck_sm_Infantry = []; +blck_sm_Vehicles = []; +blck_sm_Aircraft = []; +blck_sm_Emplaced = []; +blck_sm_scubaGroups = []; +blck_sm_surfaceShips = []; +blck_sm_submarines = []; +blck_sm_lootContainers = []; +blck_sm_garrisonBuildings_ASL = []; +blcl_sm_garrisonBuilding_relPos = []; + +blck_sm_monitoring = 0; +blck_sm_groupDespawnTime = 10; // 120; +blck_sm_patrolRespawnInterval = 10; // 600 +{ + if ((toLower worldName) isEqualTo toLower(_x select 1)) then + { + if ((toLower blck_modType) isEqualTo (toLower(_x select 0))) then + { + call compilefinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\Static\missions\%1",(_x select 2)]; + }; + }; +}forEach _staticMissions; +diag_log "[blckeagls] GMS_StaticMissions Initialized.sqf "; + diff --git a/Server/@GMS/addons/custom_server/Missions/Static/missions/privateVars.sqf b/Server/@GMS/addons/custom_server/Missions/Static/missions/privateVars.sqf new file mode 100644 index 0000000..c479e4c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/missions/privateVars.sqf @@ -0,0 +1,11 @@ + + +private ["_mission","_difficulty","_crateLoot","_lootCounts","_markerMissionName","_missionLandscapeMode","_markerLabel", + "_endMsg","_startMsg","_markerType","_markerColor","_missionCenter", + "_missionLandscape","_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_garrisonedBuilding_ASLsystem","_garrisonedBuildings_BuildingPosnSystem", + "_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons","_noPara","_helipatrol","_aircraftTypes", + "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks", + "_weapons","_sideArms","_chanceReinforcements","_endCondition", + "_useMines"]; + + // _mission diff --git a/Server/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf b/Server/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf new file mode 100644 index 0000000..cc01a84 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf @@ -0,0 +1,137 @@ +/* + This is a simple mission using precisely placed loot crates and infantry, static weapons and vehicle patrols. + 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. +*/ + +#include "privateVars.sqf"; + +_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]; +_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 = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + + ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] + ], + [//Magazines + ["10Rnd_93x64_DMR_05_Mag" ,1,5] + ], + [ // Optics + ["optic_KHS_tan",1,3] + ], + [// Materials and supplies + ["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + ["B_OutdoorPack_tan",1,2] + ] + ]; + */ + +_lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts or one that is predefined but it must follow the following format: + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + +_markerLabel = ""; +//_markerType = ["ellipse",[200,200],"GRID"]; +// An alternative would be: +_markerType = ["mil_triangle",[0,0]]; // You can replace mil_triangle with any other valid Arma 3 marker type https://community.bistudio.com/wiki/cfgMarkers +_markerColor = "ColorRed"; // This can be any valid Arma Marker Color +_markerMissionName = "Bad People Live Here"; +_missionLandscapeMode = "precise"; // acceptable values are "random","precise" + // In precise mode objects will be spawned at the relative positions specified. + // In the random mode, objects will be randomly spawned within the mission area. +_missionLandscape = [ // Paste appropriate lines from M3EDEN output here. + ["Land_Cargo_HQ_V2_F",[22885.4,16756.8,3.19],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Cargo_HQ_V1_F",[22918.1,16761.9,3.18151],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Cargo_HQ_V3_F",[22907.6,16740.3,3.17544],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Dome_Small_F",[22908.2,16808.8,3.19],[[0,1,0],[0,0,1]],[true,false]] +]; // list of objects to spawn as landscape using output from M3EDEN editor. + +_missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output here, then add the appropriate lootArray + // [["box_classname1",_customLootArray1,[px,py,pz],...,_customLootArray1],["box_classname2",,[px2,py2,pz2],...,_customLootArray2] + // where _customLootArray follows the same format as blck_BoxLoot_Red and the other pre-defined arrays and + // where _customlootcountsarray1 also follows the same format as the predefined arrays like blck_lootCountsRed + [selectRandom blck_crateTypes,[22917.4,16763,6.30803],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1] ], + [selectRandom blck_crateTypes,[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts], + // 0 1 2 3 4 5 + [selectRandom blck_crateTypes,[22904.8,16742.5,6.30195],[[0,1,0],[0,0,1]],[true,false], _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. + + + +_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] +]; // [ ["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. + +_noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4] +//format: _noEmplacedWeapons = [2,3]; // a range of values +// or _noEmplacedWeapons = 3; // a constant number of emplaced weps per misison +// Note that this value is ignored if you define static weapon positions and types in the array below. +_missionEmplacedWeapons = [ + ["B_G_Mortar_01_F",[22922.7,16763.9,6.30801],"red",0,0], + ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10] +]; // 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. + // If you leave this array blank then emplaced weapons will be spawned at random locations around the mission using the default list of emplace weapons. + +_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*/] + //[[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], + //[[22809.4,16929.5,5.33892],"blue",1, 75,0], + [[22819.4,16929.5,0],"red",1, 75, 10, 1] +]; + +_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_G_Offroad_01_armed_F",[22819.4,16929.5,3.17413],"green",600,0], + ["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10,1] +]; //[ ["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). + +_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,10,1]//, + //[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60] +]; +// 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. +_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]; diff --git a/Server/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf b/Server/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf new file mode 100644 index 0000000..21d2334 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf @@ -0,0 +1,150 @@ +/* + This is a simple mission using precisely placed loot crates and infantry, static weapons and vehicle patrols. + 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/ +*/ + +#include "privateVars.sqf"; + +_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 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 = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + + ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] + ], + [//Magazines + ["10Rnd_93x64_DMR_05_Mag" ,1,5] + ], + [ // Optics + ["optic_KHS_tan",1,3] + ], + [// Materials and supplies + ["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + ["B_OutdoorPack_tan",1,2] + ] + ]; + */ + +_lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts or one that is predefined but it must follow the following format: + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + +_markerLabel = ""; +//_markerType = ["ellipse",[200,200],"GRID"]; +// An alternative would be: +_markerType = ["mil_triangle",[0,0]]; // You can replace mil_triangle with any other valid Arma 3 marker type https://community.bistudio.com/wiki/cfgMarkers +_markerColor = "ColorRed"; // This can be any valid Arma Marker Color +_markerMissionName = "Bad People Live Here"; +_missionLandscapeMode = "precise"; // acceptable values are "random","precise" + // In precise mode objects will be spawned at the relative positions specified. + // In the random mode, objects will be randomly spawned within the mission area. +_missionLandscape = [ // Paste appropriate lines from M3EDEN output here. + ["Land_Cargo_HQ_V2_F",[22894.7,16766,3.19],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Cargo_HQ_V1_F",[22918.1,16761.9,3.18151],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Cargo_HQ_V3_F",[22907.6,16740.3,3.17544],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Dome_Small_F",[22908.2,16808.8,3.19],[[0,1,0],[0,0,1]],[true,false]] +]; // list of objects to spawn as landscape using output from M3EDEN editor. + +_missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output here, then add the appropriate lootArray + // [["box_classname1",_customLootArray1,[px,py,pz],...,_customLootArray1],["box_classname2",,[px2,py2,pz2],...,_customLootArray2] + // where _customLootArray follows the same format as blck_BoxLoot_Red and the other pre-defined arrays and + // where _customlootcountsarray1 also follows the same format as the predefined arrays like blck_lootCountsRed + [selectRandom blck_crateTypes,[22917.4,16763,6.30803],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1] ], + [selectRandom blck_crateTypes,[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts], + // 0 1 2 3 4 5 + [selectRandom blck_crateTypes,[22904.8,16742.5,6.30195],[[0,1,0],[0,0,1]],[true,false], _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. + + + +_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] +]; // [ ["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. + +_noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4] +//format: _noEmplacedWeapons = [2,3]; // a range of values +// 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[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. + // If you leave this array blank then emplaced weapons will be spawned at random locations around the mission using the default list of emplace weapons. + +_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*/, 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], + //[[22819.4,16929.5,5.33892],"red",4, 75,900], + [[22819.4,16929.5,5.33892],"red",4, 75,900] +]; + +_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 = [ + //// ["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. + // 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). + +_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 = [ + // // ["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],"blue",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. +_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]; diff --git a/Server/@GMS/addons/custom_server/Missions/Static/missions/template.sqf b/Server/@GMS/addons/custom_server/Missions/Static/missions/template.sqf new file mode 100644 index 0000000..c9f0027 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/Static/missions/template.sqf @@ -0,0 +1,174 @@ + + +/* + This is a simple mission using precisely placed loot crates and infantry, static weapons and vehicle patrols. + 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. +*/ + +#include "privateVars.sqf"; + +_mission = "static mission template"; // Included for additional documentation. Not intended to be spawned as a mission per se. + +_difficulty = "red"; // Skill level of AI (blue, red, green etc) + +_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 = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + + ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] + ], + [//Magazines + ["10Rnd_93x64_DMR_05_Mag" ,1,5] + ], + [ // Optics + ["optic_KHS_tan",1,3] + ], + [// Materials and supplies + ["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + ["B_OutdoorPack_tan",1,2] + ] + ]; + */ + +_lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts or one that is predefined but it must follow the following format: + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + +/**************************************************** + + PLACE MARKER DEFINITIONS PULLED FROM YOUR MISSION BELOW + +*****************************************************/ + +_missionCenter = [2634.41,22127.7,0]; +_markerType = ["mil_box",[0,0]]; +_markerColor = "Default"; +_markerMissionName = "Bad News Bears"; +_markerLabel = ""; + +/**************************************************** + + PLACE THE DATA DEFININING THE BUILDINGS, VEHICLES ETC. PULLED FROM YOUR MISSION BELOW + +*****************************************************/ + +_garrisonedBuildings_BuildingPosnSystem = [ + ["Land_Cargo_Tower_V1_No5_F",[2631.25,22161.8,2.63358],[[0,1,0],[0,0,1]],[true,true],"Red",0.67,3,10,4,600,-1] +]; + +_garrisonedBuilding_ASLsystem = [ + ["Land_Cargo_Tower_V1_No7_F",[2596.24,22093.9,11.1251],[[-0.994659,0.103214,0],[0,0,1]],[true,true],"Red",[["B_HMG_01_high_F",[3.66943,-4.49414,13.1028],98.8724],["B_HMG_01_high_F",[3.71802,-3.34766,18.3248],103.27],["B_HMG_01_high_F",[-1.64502,-0.0644531,20.9188],301.323]],[[[-1.80713,-3.39844,8.5904],0],[[-1.89453,1.23047,4.64288],0],[[-0.999268,-0.117188,17.9661],0],[[0.122314,-2.62891,17.8909],0]],600,-1] +]; + +_missionLandscape = [ + ["Land_Razorwire_F",[2598.06,22077.2,6.61092],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_Razorwire_F",[2593.09,22069.8,5.63825],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2603.93,22074.2,3.31451],[[-0.808148,0.353358,0.471206],[0.188556,-0.602713,0.77536]],[true,true]], + ["Land_Razorwire_F",[2608.05,22092.6,8.92718],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_Razorwire_F",[2603.25,22085.6,9.1608],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2608.26,22080.8,5.0178],[[-0.697721,0.426652,0.575459],[0.530202,-0.232641,0.815331]],[true,true]], + ["Land_HBarrier_01_big_tower_green_F",[2592.15,22140.3,12.675],[[-0.929912,0.317024,0.186437],[0.194858,-0.0052352,0.980817]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2623.27,22105.6,6.0089],[[-0.787623,0.527981,0.317625],[0.289688,-0.137655,0.94717]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2612.98,22088,6.26459],[[-0.756164,0.472755,0.452459],[0.39451,-0.222304,0.891595]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2616.91,22095.1,6.58389],[[-0.768901,0.525395,0.364351],[0.356306,-0.121062,0.926493]],[true,true]], + ["Land_Razorwire_F",[2638.69,22136.7,3.22351],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_Razorwire_F",[2633.59,22130.4,4.14247],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_Razorwire_F",[2622.16,22119,7.20263],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_Razorwire_F",[2628.34,22125.8,5.64734],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_HBarrier_01_wall_corridor_green_F",[2638,22122.4,3.50001],[[-0.562069,0.827048,0.00837636],[0.0598924,0.0305983,0.997736]],[true,true]], + ["Land_HBarrier_01_big_tower_green_F",[2631.69,22115.2,4.81262],[[-0.816498,0.552055,0.169019],[0.211131,0.0130311,0.977371]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2627.84,22112.4,5.65952],[[-0.815257,0.559665,0.148765],[0.136056,-0.0645887,0.988593]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2633.06,22120.1,4.36103],[[-0.81511,0.577092,0.0506065],[0.137352,0.107655,0.984655]],[true,true]], + ["Sign_Sphere100cm_F",[2633.58,22161.5,20.3391],[[0,1,0],[0,0,1]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2642.79,22128,2.86908],[[-0.818151,0.573521,0.0412504],[0.107375,0.0819095,0.990839]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2647.64,22134.9,2.09253],[[-0.822645,0.568343,0.0155369],[0.0253224,0.00932551,0.999636]],[true,true]], + ["Land_Razorwire_F",[2652.06,22150.5,1.93652],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_Razorwire_F",[2642.87,22141.5,2.79323],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_Razorwire_F",[2647.34,22145.8,2.48597],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_Razorwire_F",[2656.23,22155.4,1.36567],[[-0.825716,0.564085,0],[0,0,1]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2651.93,22142,1.89926],[[-0.822376,0.56825,0.0280985],[0.0359766,0.00265033,0.999349]],[true,true]], + ["Land_HBarrier_01_wall_6_green_F",[2656.98,22149,1.16155],[[-0.818034,0.570454,0.0735002],[0.108685,0.0278236,0.993687]],[true,true]] +]; + +_aiGroupParameters = [ + [[2558.96,22127.2,20.5699],"Red",[3,6],45,600,-1], + [[2590.38,22150.9,12.6152],"Red",[3,6],45,600,-1], + [[2581.74,22146.4,30.8829],"Red",[3,6],45,600,-1], + [[2644.55,22157.2,1.88187],"Red",[3,6],45,600,-1] +]; + +_aiScubaGroupParameters = [ +]; + +_vehiclePatrolParameters = [ + ["B_CTRG_LSV_01_light_F",[2609.08,22134.8,9.4568],"Red",75,600,-1], + ["B_G_Offroad_01_armed_F",[2665.47,22098.3,3.79465],"Red",75,600,-1], + ["B_Boat_Armed_01_minigun_F",[2638.39,22009,0],"Red",75,600,-1], + ["B_Boat_Armed_01_minigun_F",[2720.73,22177.5,0],"Red",75,600,-1] +]; + +_airPatrols = [ +]; + +_missionEmplacedWeapons = [ + ["B_HMG_01_high_F",[2593.12,22140.1,14.7976],"Red",0,600,-1], + ["B_HMG_01_high_F",[2632.61,22114.4,6.81314],"Red",0,600,-1], + ["B_HMG_01_high_F",[2656.01,22126.7,2.09379],"Red",0,600,-1] +]; + +_submarinePatrolParameters = [ +]; + +_missionLootBoxes = [ + ["O_CargoNet_01_ammo_F",[2589.45,22117.3,11.7155],[[0,0.999353,-0.0359766],[0.245575,0.0348749,0.96875]],[true,false],_crateLoot,_lootCounts], + ["O_CargoNet_01_ammo_F",[2596.74,22152.1,11.5449],[[0,0.998974,-0.0452868],[0.203641,0.0443379,0.978041]],[true,false],_crateLoot,_lootCounts] +]; + + + +/**************************************************** + + ENABLE ANY SETTINGS YOU LIKE FROM THE LIST BELOW. + iF THESE ARE NOT ENABLED THEN THE DEFAULTS DEFINED IN BLCK_CONFIG.SQF + AND THE MOD-SPECIFIC CONFIGURATIONS WILL BE USED. + +*****************************************************/ + +/* +_missionLandscapeMode = "precise"; // acceptable values are "random","precise" + // In precise mode objects will be spawned at the relative positions specified. + // In the random mode, objects will be randomly spawned within the mission area. + +_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. +// 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. +_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. +*/ + + +//******************************************************** +// Do not modify anything below this line. +//******************************************************** + +#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 diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_Lists.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_Lists.sqf new file mode 100644 index 0000000..a023c0a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_Lists.sqf @@ -0,0 +1,22 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +if (!isServer) exitWith{}; + +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"] +]; + diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_init.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_init.sqf new file mode 100644 index 0000000..6ddba04 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_StaticMissions_init.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"; + +//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"; +#include "\q\addons\custom_server\Missions\UMS\GMS_UMS_StaticMissions_Lists.sqf"; + +{ + //diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",_x]; + //diag_log format["[blckeagls] GMS__UMS_StaticMissions_init.sqf ",toLower worldName,(toLower blck_modType)]; + if ((toLower worldName) isEqualTo toLower(_x select 1)) then + { + if ((toLower blck_modType) isEqualTo (toLower(_x select 0))) then + { + call compilefinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\UMS\staticMissions\%1",(_x select 2)]; + }; + }; +}forEach _staticMissions; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_configurations.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_configurations.sqf new file mode 100644 index 0000000..6f96211 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_configurations.sqf @@ -0,0 +1,84 @@ +/* + 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"; +waitUntil{!isNil "blck_cratetypes"}; +blck_UMS_uniforms = +[ + "U_I_Wetsuit", + "U_O_Wetsuit", + "U_B_Wetsuit" +]; + +blck_UMS_headgear = +[ + "G_Diving", + "G_B_Diving", + "G_O_Diving", + "G_I_Diving" +]; + +blck_UMS_vests = +[ + "V_RebreatherB", + "V_RebreatherIA", + "V_RebreatherIR" +]; + +blck_UMS_weapons = +[ + "arifle_SDAR_F" +]; + +if ((tolower blck_modType) isEqualTo "exile") then +{ + blck_UMS_submarines = + [ + + "Exile_Boat_SDV_CSAT", + "Exile_Boat_SDV_Digital", + "Exile_Boat_SDV_Grey" + ]; + + blck_UMS_crates = + [ + "Exile_Container_SupplyBox" + ]; +}; +if ((tolower blck_modType) isEqualTo "epoch") then +{ + blck_UMS_submarines = + [ + + "B_SDV_01_EPOCH" + ]; + //blck_UMS_crates = blck_crateTypes; + blck_UMS_crates = ["container_epoch"]; +}; +blck_UMS_unarmedSurfaceVessels = +[ + "B_Boat_Transport_01_F", + "I_Boat_Transport_01_F" +]; +blck_UMS_armedSurfaceVessels = +[ + "B_Boat_Armed_01_minigun_F", + "I_Boat_Armed_01_minigun_F" +]; +blck_UMS_surfaceVessels = blck_UMS_unarmedSurfaceVessels + blck_UMS_armedSurfaceVessels; +blck_UMS_shipWrecks = +[ + "Land_Boat_06_wreck_F", + "Land_Boat_05_wreck_F", + "Land_Boat_04_wreck_F", + "Land_Boat_02_abandoned_F", + "Land_Boat_01_abandoned_red_F", + "Land_Boat_01_abandoned_blue_F" +]; diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_dynamicMissionList.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_dynamicMissionList.sqf new file mode 100644 index 0000000..1bfdeff --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_dynamicMissionList.sqf @@ -0,0 +1,13 @@ +/* + 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/ +*/ +blck_dynamicUMS_MissionList = ["default.sqf"]; +//diag_log "[blckeagls] Dynamic UMS Mission List "; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_init.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_init.sqf new file mode 100644 index 0000000..a455c0b --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_UMS_init.sqf @@ -0,0 +1,26 @@ +/* + 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/ +*/ +diag_log "[blckeagls] Initializing UMS"; + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +blck_dynamicUMS_MissionsRuning = 0; +blck_priorDynamicUMS_Missions = []; +blck_UMS_ActiveDynamicMissions = []; + + +#include "GMS_UMS_configurations.sqf"; +//#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/Server/@GMS/addons/custom_server/Missions/UMS/GMS_fnc_spawnDynamicUMSMission.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_fnc_spawnDynamicUMSMission.sqf new file mode 100644 index 0000000..76646b7 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/GMS_fnc_spawnDynamicUMSMission.sqf @@ -0,0 +1,636 @@ +/* + Dynamic Underwater Mission Spawner + By Ghostrider GRG + Copyright 2016 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +#define isScubaMission true +#define delayTime 1 +private ["_abort","_crates","_aiGroup","_objects","_mines","_blck_AllMissionAI","_blck_localMissionMarker", + "_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned", + "_blck_AllMissionAI","_delayTime","_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_marker","_vehiclecrewcount"]; + +params["_coords","_mission",["_allowReinforcements",false]]; + +_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 Dynamic UMS] dynamicUMSspawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +//if (isNil "_timeOut") then {_timeOut = -1;}; +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 = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; + +if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol}; +if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols}; +if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops}; +if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis}; +if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops}; + +if (isNil "_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}; +if (isNil "_vehicleCrewCount") then {_vehicleCrewCount = [_aiDifficultyLevel] call GMS_fnc_selectVehicleCrewCount}; + +_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 +{ + _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? +[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers; +_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker; +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (91) message players and spawn a mission marker";}; +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (77) waiting for player to trigger the mission";}; +#endif +//////// +// All parameters are defined, let's wait until a player is nearby or the mission has timed out +//////// + +_missionStartTime = diag_tickTime; +_playerInRange = false; +_missionTimedOut = false; + +_wait = true; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (90) starting mission trigger loop"}; +if (blck_debugLevel > 2) then {_wait = false}; +#endif + +while {_wait} do +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) exitWith {_playerInRange = true;}; + #endif + + if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; + if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; + uiSleep 5; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["dynamicUMSspawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords]; + diag_log format["dynamicUMSspawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers]; + diag_log format["dynamicUMSspawner:: Trigger Loop - timeout = %1", [_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut]; + }; + #endif +}; + +if (_missionTimedOut) exitWith +{ + // Deal with the case in which the mission timed out. + blck_priorDynamicUMS_Missions pushback [_coords,diag_tickTime]; + blck_UMS_ActiveDynamicMissions = blck_UMS_ActiveDynamicMissions - [_coords]; + 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; +}; + +//////// +// Spawn the mission objects, loot chest, and AI +//////// +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (142) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate +{ + _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 +{ + // 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 +{ + 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 (count _scubaGroupParameters > 0) then +{ + //diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters]; + // params["_coords",["_minNoAI",3],["_maxNoAI",6],"_missionGroups",["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],["_vests",blck_vests],["_backpacks",[]],["_weapons",[]],["_sideArms",blck_Pistols],["_isScubaGroup",false]]; + _temp = [_coords, _minNoAI,_maxNoAI,_scubaGroupParameters,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionAI; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["dynamicUMSspawner :: (209) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1; +}; + +_abort = _temp select 1; +if (blck_debugLevel > 2) then +{ + diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; +}; +#endif + +if (_abort) exitWith +{ + if (blck_debugLevel > 1) then { + diag_log "dynamicUMSspawner:: (220) grpNull returned, mission termination criteria met, calling blck_fnc_endMission" + }; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; +if !(_abort) then +{ + _blck_AllMissionAI append (_temp select 0); +}; + +uiSleep _delayTime; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (235) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +uiSleep _delayTime; +_temp = [[],[],false]; +_abort = false; +private["_patrolVehicles","_vehToSpawn"]; +//diag_log format["_fnc_dynamicUMSspawner (258): _noVehiclePatrols = %1",_noVehiclePatrols]; +_vehToSpawn = 0; +//diag_log format["_dynamicUMSspawner:: _vehToSpawn = %1",_vehToSpawn]; +// Spawn any surface patrols +if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then +{ + // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]]; + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_vehiclePatrolParameters,true,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then { + diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + + }; +}; +// Spawn any submarine patrols +if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then +{ + // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]]; + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_submarinePatrolParameters,true,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionVehiclePatrols; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then { + diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + //diag_log format["[blckeagls] dynamicUMSspawner:: Patrol vehicles = %1",_patrolVehicles]; + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + + }; +}; + +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 0) then { + diag_log "dynamicUMSspawner:: (279) grpNull returned, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; + +uiSleep delayTime; +_temp = [[],[],false]; +_abort = false; + +_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange; +_noPara = [_noPara] call blck_fnc_getNumberFromRange; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]}; +#endif +if (_noChoppers > 0) then +{ + for "_i" from 1 to (_noChoppers) do + { + 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] call blck_fnc_spawnMissionHeli; + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + blck_monitoredVehicles pushBack (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + }; + if (_abort) then + { + _objects pushback (_temp select 0); + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; + }; + }; + }; +}; + +////////////////////////// +// Spawn Crates and Emplaced Weapons Last to try to force them to correct positions relative to spawned buildinga or other objects. +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log format["dynamicUMSspawner:: (361) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];}; +#endif +uiSleep 15; +private["_noEmplacedToSpawn"]; +_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange; +//diag_log format["_dynamicUMSspawner:: _noEmplacedToSpawn = %1",_vehToSpawn]; +if (blck_useStatic && ((_noEmplacedToSpawn > 0)) || count _missionEmplacedWeapons > 0) then +{ + // params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; + //_temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; + _temp = [_coords,_missionEmplacedWeapons,true,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["dynamicUMSspawner:: (375) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["dynamicUMSspawner:: (387) _abort = %1",_abort]; + + }; + #endif + + if !(_abort) then + { + _objects append (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (400) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + }; +}; +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log "dynamicUMSspawner:: (410) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; + +uiSleep _delayTime; +if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then +{ + 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; + // blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _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 +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +// Trigger for mission end +#ifdef blck_debugMode +diag_log format["[blckeagls] mission Spawner(436) _endCondition = %1",_endCondition]; +#endif +private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"]; +_missionComplete = -1; +_startTime = diag_tickTime; +if (blck_showCountAliveAI) then +{ + //diag_log format["_dynamicUMSspawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName]; + //diag_log format["_dynamicUMSspawner(442): Alive AI = %1 | Current Marker Text = %2",{alive _x} count _blck_AllMissionAI, markerText _marker]; + if !(_marker isEqualTo "") then + { + [_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount; + blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI]; + //diag_log format["_dynamicUMSspawner: blck_missionMarkers = %1",blck_missionMarkers]; + }; +}; +switch (_endCondition) do +{ + 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 + +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 +{ + #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 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 // + { + // blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits;] call blck_fnc_spawnParaUnits; + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _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]; + [_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 +{ + 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]; +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; + +#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/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findShoreLocation.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findShoreLocation.sqf new file mode 100644 index 0000000..1297ea8 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findShoreLocation.sqf @@ -0,0 +1,71 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_mapCenter","_waterPos","_priorUMSpositions"]; + +switch (toLower worldName) do +{ + case "altis": {_mapCenter = [15000,19000,0];_maxDistance = 20000}; + case "tanoa": {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 10000}; + case "malden": {_mapCenter = [6000,7000,0];_maxDistance = 5500}; + case "namalsk": {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 5000}; + case "taviana": {_mapCenter = [12000,12000,0];_maxDistance = 12000}; + case "napf" : {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 12000}; + case "lythium": {_mapCenter = [10000,10000,0]; _maxDistance = 6000;}; + default {_mapCenter = [6000,6000,0]; _maxDistance = 6000;}; +}; + +_evaluate = true; + while {_evaluate} do +{ + _waterPos = [ + _mapCenter, // center of search area + 2, // min distance to search + 20000, // max distance to search + 0, // distance to nearest object + 2, // water mode [2 = water only] + 25, // max gradient + 0 // shoreMode [0 = anywhere] + ] call BIS_fnc_findSafePos; + /* + _priorUMSpositions = +blck_priorDynamicUMS_Missions; + { + if (diag_tickTime > ((_x select 1) + 1800) then + { + blck_priorDynamicUMS_Missions = blck_priorDynamicUMS_Missions - _x; + } else { + if (_waterPos distance2D (_x select 0) < 2000) exitWith {_evaluate = false}; + }; + } forEach _priorUMSpositions; + */ + if (_evaluate) then + { + if (abs(getTerrainHeightASL _waterPos) < 30) then + { + if (abs(getTerrainHeightASL _waterPos) > 1) then + { + //_waterMarker = createMarker [format["water mission %1",getTerrainHeightASL _waterPos],_waterPos]; + //_waterMarker setMarkerColor "ColorRed"; + //_waterMarker setMarkerType "mil_triangle"; + //_waterMarker setMarkerText format["Depth %1",getTerrainHeightASL _waterPos]; + _evaluate = false; + }; + }; + }; +}; +_waterPos + + + + + + + diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findWaterDepth.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findWaterDepth.sqf new file mode 100644 index 0000000..c5e0d0c --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_fnc_findWaterDepth.sqf @@ -0,0 +1,23 @@ +/* + by Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +private["_depth"]; +params["_pos"]; +_depth = (getTerrainHeightASL _pos); +//diag_log format["_fnc_findWaterDepth: _depth = %1",_depth]; +_depth + + + + + + + diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_functions.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_functions.sqf new file mode 100644 index 0000000..636ad48 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_UMS_functions.sqf @@ -0,0 +1,16 @@ +/* + by Ghostrider [GRG] + Copyright 20167 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +blck_fnc_findShoreLocation = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_UMS_fnc_findShoreLocation.sqf"; +blck_fnc_addDyanamicUMS_Mission = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_fnc_addDynamicUMS_Mission.sqf"; +blck_fnc_findWaterDepth = compileFinal preprocessFileLineNumbers "q\addons\custom_server\Missions\UMS\code\GMS_UMS_fnc_findWaterDepth.sqf"; + +diag_log "[blckeagls] UMS functions Functions compiled"; diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_addDynamicUMS_Mission.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_addDynamicUMS_Mission.sqf new file mode 100644 index 0000000..8c73e2e --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_addDynamicUMS_Mission.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"; +//params["_pos"]; +private["_UMS_mission","_waitTime","_mission","_pos"]; + +if (count blck_dynamicUMS_MissionList == 0) exitWith +{ + blck_numberUnderwaterDynamicMissions = -1; + diag_log "No Dynamic UMS Missions Listed "; +}; +_UMS_mission = selectRandom blck_dynamicUMS_MissionList; +_waitTime = (blck_TMin_UMS) + random(blck_TMax_UMS - blck_TMin_UMS); +_mission = format["%1%2","Mafia Pirates",floor(random(1000000))]; +_pos = call blck_fnc_findShoreLocation; +#ifdef blck_debugMode +if (blck_debugLevel >= 2) then {diag_log format["_fnc_addDynamicUMS_Mission: blck_dynamicUMS_MissionsRuning = %1 | blck_missionsRunning = %2 | blck_UMS_ActiveDynamicMissions = %3",blck_dynamicUMS_MissionsRuning,blck_missionsRunning,blck_UMS_ActiveDynamicMissions]};; +#endif +blck_UMS_ActiveDynamicMissions pushBack _pos; +blck_missionsRunning = blck_missionsRunning + 1; +blck_dynamicUMS_MissionsRuning = blck_dynamicUMS_MissionsRuning + 1; +//diag_log format["[blckeagls] UMS Spawner:-> waiting for %1",_waitTime]; +uiSleep _waitTime; +//diag_log format["[blckeagls] UMS Spawner:-> spawning mission %1",_UMS_mission]; +[_pos,_mission] call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissions\%1",_UMS_mission]; diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_sm_initializeUMSStaticMission.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_sm_initializeUMSStaticMission.sqf new file mode 100644 index 0000000..e1ed9a3 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_sm_initializeUMSStaticMission.sqf @@ -0,0 +1,73 @@ +/* + 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["_mission"]; +// Spawn landscape +// params["_objects"]; +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 "_missionLandscape") then {_missionLandscape = []}; +if (isNil "_garrisonedBuilding_ASLsystem") then {_garrisonedBuilding_ASLsystem = []}; +if (isNil "_garrisonedBuildings_BuildingPosnSystem") then {_garrisonedBuildings_BuildingPosnSystem = []}; +if (isNil "_airPatrols") then {_airPatrols = []}; +if (isNil "_aiGroupParameters") then {_aiGroupParameters = []}; +if (isNil "_missionEmplacedWeapons") then {_missionEmplacedWeapons = []}; +if (isNil "_vehiclePatrolParameters") then {_vehiclePatrolParameters = []}; +if (isNil "_missionLootVehicles") then {_missionLootVehicles = []}; + +_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,[_missionCenter,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; +//diag_log format["_fnc_sm_initializeUMSStaticMission: count _airPatrols = %1 | _airPatrols = %2", count _airPatrols, _airPatrols]; +{ + [blck_sm_Aircraft,_x] call blck_fnc_sm_AddGroupToArray; + +}forEach _airPatrols; +//uiSleep 1; + +{ + [blck_sm_Infantry,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _aiGroupParameters; + +{ + [blck_sm_scubaGroups,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _aiScubaGroupParameters; + +{ + [blck_sm_Emplaced,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _missionEmplacedWeapons; + +{ + [blck_sm_surfaceShips,_x] call blck_fnc_sm_AddGroupToArray; +}forEach _vehiclePatrolParameters; + +{ + [blck_sm_submarines,_x] call blck_fnc_sm_AddGroupToArray; +} forEach _submarinePatrolParameters; +//uiSleep 30; +// spawn loot chests +[_missionLootBoxes,_missionCenter] call blck_fnc_sm_spawnLootContainers; + +diag_log format["[blckeagls] UMS Mission Spawner: Static UMS Mission %1 spawned",_mission]; diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf new file mode 100644 index 0000000..b636498 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_spawnDynamicUMSMission.sqf @@ -0,0 +1,636 @@ +/* + Dynamic Underwater Mission Spawner + By Ghostrider GRG + Copyright 2016 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +#define isScubaMission true +#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]]; + +_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 Dynamic UMS] dynamicUMSspawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +//if (isNil "_timeOut") then {_timeOut = -1;}; +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 = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; + +if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol}; +if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols}; +if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops}; +if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis}; +if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops}; + +if (isNil "_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}; +if (isNil "_vehicleCrewCount") then {_vehicleCrewCount = [_aiDifficultyLevel] call GMS_fnc_selectVehicleCrewCount}; + +_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 +{ + _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? +[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers; +_marker = [_blck_localMissionMarker] call blck_fnc_spawnMarker; +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (91) message players and spawn a mission marker";}; +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (77) waiting for player to trigger the mission";}; +#endif +//////// +// All parameters are defined, let's wait until a player is nearby or the mission has timed out +//////// + +_missionStartTime = diag_tickTime; +_playerInRange = false; +_missionTimedOut = false; + +_wait = true; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log "dynamicUMSspawner:: (90) starting mission trigger loop"}; +if (blck_debugLevel > 2) then {_wait = false}; +#endif + +while {_wait} do +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) exitWith {_playerInRange = true;}; + #endif + + if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; + if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; + uiSleep 5; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["dynamicUMSspawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords]; + diag_log format["dynamicUMSspawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers]; + diag_log format["dynamicUMSspawner:: Trigger Loop - timeout = %1", [_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut]; + }; + #endif +}; + +if (_missionTimedOut) exitWith +{ + // Deal with the case in which the mission timed out. + blck_priorDynamicUMS_Missions pushback [_coords,diag_tickTime]; + blck_UMS_ActiveDynamicMissions = blck_UMS_ActiveDynamicMissions - [_coords]; + 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; +}; + +//////// +// Spawn the mission objects, loot chest, and AI +//////// +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (142) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate +{ + _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 +{ + // 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 +{ + 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 (count _scubaGroupParameters > 0) then +{ + //diag_log format["_fnc_dynamicUMSspawner: spawning scuba groups with _scubaGroupParameters = %1",_scubaGroupParameters]; + // params["_coords",["_minNoAI",3],["_maxNoAI",6],"_missionGroups",["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear],["_vests",blck_vests],["_backpacks",[]],["_weapons",[]],["_sideArms",blck_Pistols],["_isScubaGroup",false]]; + _temp = [_coords, _minNoAI,_maxNoAI,_scubaGroupParameters,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionAI; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then +{ + diag_log format["dynamicUMSspawner :: (209) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1; +}; + +_abort = _temp select 1; +if (blck_debugLevel > 2) then +{ + diag_log format["dynamicUMSspawner :: (214) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; +}; +#endif + +if (_abort) exitWith +{ + if (blck_debugLevel > 1) then { + diag_log "dynamicUMSspawner:: (220) grpNull returned, mission termination criteria met, calling blck_fnc_endMission" + }; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; +if !(_abort) then +{ + _blck_AllMissionAI append (_temp select 0); +}; + +uiSleep _delayTime; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (235) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +uiSleep _delayTime; +_temp = [[],[],false]; +_abort = false; +private["_patrolVehicles","_vehToSpawn"]; +//diag_log format["_fnc_dynamicUMSspawner (258): _noVehiclePatrols = %1",_noVehiclePatrols]; +_vehToSpawn = 0; +//diag_log format["_dynamicUMSspawner:: _vehToSpawn = %1",_vehToSpawn]; +// Spawn any surface patrols +if (blck_useVehiclePatrols && count _vehiclePatrolParameters > 0) then +{ + // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]]; + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_vehiclePatrolParameters,true,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount /*,blck_UMS_weapons,blck_UMS_vests,isScubaMission*/ ] call blck_fnc_spawnMissionVehiclePatrols; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then { + diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + + }; +}; +// Spawn any submarine patrols +if (blck_useVehiclePatrols && count _submarinePatrolParameters > 0) then +{ + // params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_vests",blck_vests],["_backpacks",blck_backpacks],["_weaponList",[]],["_sideArms",blck_Pistols], ["_isScubaGroup",false]]; + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_submarinePatrolParameters,true,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnMissionVehiclePatrols; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then { + diag_log format["dynamicUMSspawner :: (251) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + //diag_log format["[blckeagls] dynamicUMSspawner:: Patrol vehicles = %1",_patrolVehicles]; + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (267) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + + }; +}; + +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 0) then { + diag_log "dynamicUMSspawner:: (279) grpNull returned, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; + +uiSleep delayTime; +_temp = [[],[],false]; +_abort = false; + +_noChoppers = [_noChoppers] call blck_fnc_getNumberFromRange; +_noPara = [_noPara] call blck_fnc_getNumberFromRange; + +#ifdef blck_debugMode +if (blck_debugLevel > 1) then {diag_log format["_dynamicUMSspawner(322):: _noChoppers = %1 && _chancePara = %2",_noChoppers,_chancePara]}; +#endif +if (_noChoppers > 0) then +{ + for "_i" from 1 to (_noChoppers) do + { + 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] call blck_fnc_spawnMissionHeli; + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + blck_monitoredVehicles pushBack (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + }; + if (_abort) then + { + _objects pushback (_temp select 0); + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; + }; + }; + }; +}; + +////////////////////////// +// Spawn Crates and Emplaced Weapons Last to try to force them to correct positions relative to spawned buildinga or other objects. +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log format["dynamicUMSspawner:: (361) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];}; +#endif +uiSleep 15; +private["_noEmplacedToSpawn"]; +_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange; +//diag_log format["_dynamicUMSspawner:: _noEmplacedToSpawn = %1",_vehToSpawn]; +if (blck_useStatic && ((_noEmplacedToSpawn > 0)) || count _missionEmplacedWeapons > 0) then +{ + // params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; + //_temp = [_missionEmplacedWeapons,_noEmplacedToSpawn,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; + _temp = [_coords,_missionEmplacedWeapons,true,_noEmplacedToSpawn,_aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["dynamicUMSspawner:: (375) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["dynamicUMSspawner:: (387) _abort = %1",_abort]; + + }; + #endif + + if !(_abort) then + { + _objects append (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] dynamicUMSspawner:: (400) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + }; +}; +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log "dynamicUMSspawner:: (410) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,1,isScubaMission] call blck_fnc_endMission; +}; + +uiSleep _delayTime; +if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then +{ + 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; + // blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _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 +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] dynamicUMSspawner:: (428) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +// Trigger for mission end +#ifdef blck_debugMode +diag_log format["[blckeagls] mission Spawner(436) _endCondition = %1",_endCondition]; +#endif +private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"]; +_missionComplete = -1; +_startTime = diag_tickTime; +if (blck_showCountAliveAI) then +{ + //diag_log format["_dynamicUMSspawner(441): Adding Number Alive AI: _marker = %1 | _markerMissionName = %2",_marker,_markerMissionName]; + //diag_log format["_dynamicUMSspawner(442): Alive AI = %1 | Current Marker Text = %2",{alive _x} count _blck_AllMissionAI, markerText _marker]; + if !(_marker isEqualTo "") then + { + [_marker,_markerMissionName,_blck_AllMissionAI] call blck_fnc_updateMarkerAliveCount; + blck_missionMarkers pushBack [_marker,_markerMissionName,_blck_AllMissionAI]; + //diag_log format["_dynamicUMSspawner: blck_missionMarkers = %1",blck_missionMarkers]; + }; +}; +switch (_endCondition) do +{ + 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 + +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 +{ + #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 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 // + { + // blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits;] call blck_fnc_spawnParaUnits; + private _paratroops = [_coords,_noPara,_aiDifficultyLevel,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,[],blck_UMS_weapons,[],isScubaMission] call blck_fnc_spawnParaUnits; + if !(isNull _paratroops) then + { + _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]; + [_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 +{ + 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]; +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; + +#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/Server/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf new file mode 100644 index 0000000..25ffda9 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf @@ -0,0 +1,173 @@ +/* + This is a simple mission using precisely placed loot crates and infantry, static weapons and vehicle patrols. + 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. +*/ +private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", + "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", + "_chanceReinforcements","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_missionCenter", + "_missionGroups","_scubaGroupParameters","_vehiclePatrolParameters","_submarinePatrolParameters","_aircraftTypes","_noAirPatrols","_airPatrols", + "_vests","_backpacks","_weaponList","_sideArms","_uniforms","_headGear","_chanceHeliPatrol","_noChoppers","_chancePara","_missionHelis","_noPara", + "_chanceLoot","_paraTriggerDistance","_paraLoot","_paraLootCounts","_vehiclecrewcount"]; +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]; +_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 = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + + ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] + ], + [//Magazines + ["10Rnd_93x64_DMR_05_Mag" ,1,5] + ], + [ // Optics + ["optic_KHS_tan",1,3] + ], + [// Materials and supplies + ["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + ["B_OutdoorPack_tan",1,2] + ] + ]; + */ + +_lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts or one that is predefined but it must follow the following format: + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + +_startMsg = "Pirates were spotted off the coast - intercept them and collect the loot"; +_endMsg = "The pirates were defeated"; +_markerLabel = ""; +//_markerType = ["ellipse",[200,200],"GRID"]; +// An alternative would be: +_markerType = ["mil_triangle",[0,0]]; // You can replace mil_triangle with any other valid Arma 3 marker type https://community.bistudio.com/wiki/cfgMarkers +_markerColor = "ColorRed"; // This can be any valid Arma Marker Color +_markerMissionName = "Mafia Fishermen"; +_missionLandscapeMode = "precise"; // acceptable values are "random","precise" + // In precise mode objects will be spawned at the relative positions specified. + // In the random mode, objects will be randomly spawned within the mission area. +_missionLandscape = [ // Paste appropriate lines from M3EDEN output here. + // ["Land_Cargo_HQ_V2_F",[22894.7,16766,3.19],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Boat_05_wreck_F",[1,1,0],0,[true,false]] +]; // list of objects to spawn as landscape using output from M3EDEN editor. + +_missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output here, then add the appropriate lootArray + // [["box_classname1",_customLootArray1,[px,py,pz],...,_customLootArray1],["box_classname2",,[px2,py2,pz2],...,_customLootArray2] + // where _customLootArray follows the same format as blck_BoxLoot_Red and the other pre-defined arrays and + // where _customlootcountsarray1 also follows the same format as the predefined arrays like blck_lootCountsRed + // ["Box_NATO_Ammo_F",[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts], + //["Exile_Container_SupplyBox",[1.91016,-3.85352,-3.54709],0,[true,false], _crateLoot, _lootCounts] + //[selectRandom blck_UMS_crates,[0,0,0],_crateLoot, _lootCounts] +]; // If this array is empty a single loot chest will be added at the center. If you add items loot chest(s) will be spawned in specific positions. + + + +_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]], + ["I_Boat_Transport_01_F",[3,3,0],_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. + +_minNoAI = 4; // Modify as needed +_maxNoAI = 6; // Modify as needed. +_noAIGroups = 2; // Modify as needed; note that these values are ignored of you specify AI patrols in the array below. +_missionGroups = +[ + // Intended to be land-based units or units manning some sort of above-water structure. + // position relative to center, difficulty, no AI, minRadius, maxRadius + // [[1,-1,-1],2,3,"red", 5,10] +]; +_scubaGroupParameters = [ + // Scuba units. + // [[-10.9121,-10.9824,-1.20243],5,7,"Green",5,12], + [[-2,2,-1],2,3,"red", 5,10], + [[2,-2,-1],2,3,"red", 5,10] +]; + +//_noVehiclePatrols = blck_SpawnVeh_Red; // Not useful for marine missions which we assume need pre-defined positions for vehicles. +// These are surface patrols. +_vehiclePatrolParameters = [ + // ["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]], + ["B_Boat_Armed_01_minigun_F",[2,2,0],0] + //["B_T_Boat_Transport_01_F",[16.7676,43.083,-0.00134277],"red",4, 75,60] +]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ] + // When this array is empty, vehicle patrols will be scattered randomely around the mission. + // Allows you to define the location of the center of the patrol, vehicle type spawned, radius to patrol, and AI difficulty (blue, red, green etc). + +_submarinePatrolParameters = [ + // + //["B_SDV_01_F",[22584.9,15304.8,-6.14801],"red",4, 75,0], + ["B_SDV_01_F",[-2,-2,-1.5],0] +]; + +_missionemplacedweapons = [ + +]; + +_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 = [ + [selectRandom blck_patrolHelisRed,[0,0,10],0] +]; +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = false; // Set to false if you have vehicles patrolling nearby. +_useMines = blck_useMines; +/* + The values below are here as placeholders. + I recommend that you use the arrays above to define approximate number and spawn location of all AI units. +*/ +_minNoAI = blck_MinAI_Blue; +_maxNoAI = blck_MaxAI_Blue; +_noAIGroups = blck_AIGrps_Blue; +_noVehiclePatrols = blck_SpawnVeh_Blue; +_noEmplacedWeapons = blck_SpawnEmplaced_Blue; +// Pertains to AI on boats, structures or land +// The UMS configurations are used for sub and scuba AI. +// These are defined here because they are needed for any calls used to spawn non-scuba AI +_uniforms = blck_SkinList; +_headgear = blck_headgear; +_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\GMS_fnc_spawnDynamicUMSMission.sqf"; + diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/privateVars.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/privateVars.sqf new file mode 100644 index 0000000..24c5890 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/privateVars.sqf @@ -0,0 +1,13 @@ + + +private ["_mission","_difficulty","_crateLoot","_lootCounts","_markerMissionName","_missionLandscapeMode","_markerLabel", + "_endMsg","_startMsg","_markerType","_markerColor","_missionCenter", + "_missionLandscape","_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_garrisonedBuilding_ASLsystem","_garrisonedBuildings_BuildingPosnSystem", + "_aiScubaGroupParameters","_submarinePatrolParameters", + "_aircraftTypes", + "_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons","_noPara","_helipatrol", + "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks", + "_weapons","_sideArms","_chanceReinforcements","_endCondition", + "_useMines","_vehiclecrewcount"]; + + // _mission diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf new file mode 100644 index 0000000..6fdac77 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf @@ -0,0 +1,142 @@ +/* + This is a simple mission using precisely placed loot crates and infantry, static weapons and vehicle patrols. + 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/ +*/ + +#include "privateVars.sqf"; + +_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 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 = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + + ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] + ], + [//Magazines + ["10Rnd_93x64_DMR_05_Mag" ,1,5] + ], + [ // Optics + ["optic_KHS_tan",1,3] + ], + [// Materials and supplies + ["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + ["B_OutdoorPack_tan",1,2] + ] + ]; + */ + +_lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts or one that is predefined but it must follow the following format: + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + +_markerLabel = ""; +//_markerType = ["ellipse",[200,200],"GRID"]; +// An alternative would be: +_markerType = ["mil_triangle",[0,0]]; // You can replace mil_triangle with any other valid Arma 3 marker type https://community.bistudio.com/wiki/cfgMarkers +_markerColor = "ColorRed"; // This can be any valid Arma Marker Color +_markerMissionName = "Bad Fishermen Live Here"; +_missionLandscapeMode = "precise"; // acceptable values are "random","precise" + // In precise mode objects will be spawned at the relative positions specified. + // In the random mode, objects will be randomly spawned within the mission area. +_missionLandscape = [ // Paste appropriate lines from M3EDEN output here. + // ["Land_Cargo_HQ_V2_F",[22894.7,16766,3.19],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Boat_05_wreck_F",[22571.5,15278.9,0],[[0,1,0],[0,0,1]],[true,false]] +]; // list of objects to spawn as landscape using output from M3EDEN editor. + +_missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output here, then add the appropriate lootArray + // [["box_classname1",_customLootArray1,[px,py,pz],...,_customLootArray1],["box_classname2",,[px2,py2,pz2],...,_customLootArray2] + // where _customLootArray follows the same format as blck_BoxLoot_Red and the other pre-defined arrays and + // where _customlootcountsarray1 also follows the same format as the predefined arrays like blck_lootCountsRed + // ["Box_NATO_Ammo_F",[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts], + [selectRandom blck_UMS_crates,[22584,15304,-1],[[0,1,0],[0,0,1]],[true,false], _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. + + + +_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]], + ["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],[[0,1,0],[0,0,1]],[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. + +_noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4] +//format: _noEmplacedWeapons = [2,3]; // a range of values +// 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] +]; +// 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. +// If you leave this array blank then emplaced weapons will be spawned at random locations around the mission using the default list of emplace weapons. + +_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*/] + +]; +_aiScubaGroupParameters = [ + // [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/] + //[[22584.9,15304.8,-4.27578],"red",4, 75,0], + [[22613.5,15269.1,-4.28332],"red",3, 75,900], + [[22549,15288.9,0],"red",1, 75,0] +]; +_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",75,60], + ["B_T_Boat_Armed_01_minigun_F",[22578.6,15273.3,-0.0354593],"red",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",75,0], + ["B_SDV_01_F",[22609.9,15299.8,-1],"red",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], + //[selectRandom _aircraftTypes,_missionCenter,"green",1000,0] +]; + +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = false; // Set to false if you have vehicles patrolling nearby. + +#include "\q\addons\custom_server\Missions\UMS\code\GMS_fnc_sm_initializeUMSStaticMission.sqf"; + +diag_log format["[blckeagls static missions] COMPLETED initializing misions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; diff --git a/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf b/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf new file mode 100644 index 0000000..9a6553a --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf @@ -0,0 +1,146 @@ +/* + This is a simple mission using precisely placed loot crates and infantry, static weapons and vehicle patrols. + 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/ +*/ + +#include "privateVars.sqf"; + +_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 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 = + // Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on. + // Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added. + + [ + [// Weapons + + ["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"] + ], + [//Magazines + ["10Rnd_93x64_DMR_05_Mag" ,1,5] + ], + [ // Optics + ["optic_KHS_tan",1,3] + ], + [// Materials and supplies + ["Exile_Item_MetalScrews",3,10] + // + ], + [//Items + ["Exile_Item_MountainDupe",1,3] + ], + [ // Backpacks + ["B_OutdoorPack_tan",1,2] + ] + ]; + */ + +_lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts or one that is predefined but it must follow the following format: + // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. + // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + +_markerLabel = ""; +//_markerType = ["ellipse",[200,200],"GRID"]; +// An alternative would be: +_markerType = ["mil_triangle",[0,0]]; // You can replace mil_triangle with any other valid Arma 3 marker type https://community.bistudio.com/wiki/cfgMarkers +_markerColor = "ColorRed"; // This can be any valid Arma Marker Color +_markerMissionName = "Bad Fishermen Live Here"; +_missionLandscapeMode = "precise"; // acceptable values are "random","precise" + // In precise mode objects will be spawned at the relative positions specified. + // In the random mode, objects will be randomly spawned within the mission area. +_missionLandscape = [ // Paste appropriate lines from M3EDEN output here. + // ["Land_Cargo_HQ_V2_F",[22894.7,16766,3.19],[[0,1,0],[0,0,1]],[true,false]], + ["Land_Boat_05_wreck_F",[22571.5,15278.9,0],[[0,1,0],[0,0,1]],[true,false]] +]; // list of objects to spawn as landscape using output from M3EDEN editor. + +_missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output here, then add the appropriate lootArray + // [["box_classname1",_customLootArray1,[px,py,pz],...,_customLootArray1],["box_classname2",,[px2,py2,pz2],...,_customLootArray2] + // where _customLootArray follows the same format as blck_BoxLoot_Red and the other pre-defined arrays and + // where _customlootcountsarray1 also follows the same format as the predefined arrays like blck_lootCountsRed + // ["Box_NATO_Ammo_F",[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts], + [selectRandom blck_UMS_crates,[22584.9,15282.2,-1],[[0,1,0],[0,0,1]],[true,false], _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. + + + +_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]], + ["B_T_Boat_Transport_01_F",[22570.1,15235.3,-4.49949],[[0,1,0],[0,0,1]],[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. + +_noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4] +//format: _noEmplacedWeapons = [2,3]; // a range of values +// 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] +]; +// 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. +// If you leave this array blank then emplaced weapons will be spawned at random locations around the mission using the default list of emplace weapons. + +_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*/] + +]; +_aiScubaGroupParameters = [ + // [ [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] +]; +_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 = [ + //["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",[22577.6,15275.3,-0.0354593],"red",3, 75,0], + //["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 = [ + ////["Vehicle Class Name",Position [22570.1,15235.3,-4.49949],AI Difficulty "red",4 (Units to spawn into vehicle), 75 (radius of patrol area),60 (seconds to wait after all units dead before respawning)], + ["B_SDV_01_F",[22607.9,15299.8,-1],"red",3, 75,0], + ["B_SDV_01_F",[22609.9,15297.8,-1],"red",3, 75,0] +]; + +_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 = [ + //["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] +]; + +// Change _useMines to true/false below to enable mission-specific settings. +_useMines = false; // Set to false if you have vehicles patrolling nearby. + +#include "\q\addons\custom_server\Missions\UMS\code\GMS_fnc_sm_initializeUMSStaticMission.sqf"; + +diag_log format["[blckeagls static missions] COMPLETED initializing middions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty]; diff --git a/Server/@GMS/addons/custom_server/Missions/privateVars.sqf b/Server/@GMS/addons/custom_server/Missions/privateVars.sqf new file mode 100644 index 0000000..13c9e03 --- /dev/null +++ b/Server/@GMS/addons/custom_server/Missions/privateVars.sqf @@ -0,0 +1,7 @@ + +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","_garrisonedBuildings_BuildingPosnSystem","_garrisonedBuilding_ATLsystem", + "_submarinePatrolParameters","_scubaGroupParameters","_vehicleCrewCount"]; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/SLS/SLS_defines_epoch.sqf b/Server/@GMS/addons/custom_server/SLS/SLS_defines_epoch.sqf new file mode 100644 index 0000000..1ea2e26 --- /dev/null +++ b/Server/@GMS/addons/custom_server/SLS/SLS_defines_epoch.sqf @@ -0,0 +1,205 @@ +/* + Define loot crate configurations for Epoch. + 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/ +*/ +//diag_log "Loading Static Loot Container Spawning System for Epoch"; +_lootBoxes = +[ + /*[ + + "altis", // map name + "Camp1", // a name for this region for logging and debuging purpses and to help identify the definition down the road when changing things on the server + 2, // number of locations specified from the list below at which to spawn crates + [ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false] + [[23555.9,18422.7,0.730287],0,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position + [[23542.1,18435.9,0.00143886],0,true, false], + [[23514,18452.5,0.00143886],0,true, false], + [[23534.2,18418.8,0.00143886],0,false, true] + ] + + ], + [ "altis", + "refuel", + 2, + [ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false] + [[22963.8,17041.3,0.00143886],0,false, false], + [[22942.8,17038,0.00143886],0,false, false], + [[22948.7,17054,0.00143886],0,false, false] + ] // No comma after this last one + ] // No comma after this last one + */ +]; + +private["_loot_uniforms","_loot_pistols","_loot_rifles","_loot_snipers","_loot_LMG","_loot_silencers"]; +// Edit these to your liking +//Uniforms +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_uniforms = ["U_O_CombatUniform_ocamo", "U_O_GhillieSuit", "U_O_PilotCoveralls", "U_O_Wetsuit", "U_OG_Guerilla1_1", "U_OG_Guerilla2_1", "U_OG_Guerilla2_3", "U_OG_Guerilla3_1", "U_OG_Guerilla3_2", "U_OG_leader", "U_C_Poloshirt_stripped", "U_C_Poloshirt_blue", + "U_C_Poloshirt_burgundy", "U_C_Poloshirt_tricolour", "U_C_Poloshirt_salmon", "U_C_Poloshirt_redwhite", "U_C_Poor_1", "U_C_WorkerCoveralls", "U_C_Journalist", "U_C_Scientist", "U_OrestesBody", "U_Wetsuit_uniform", "U_Wetsuit_White", "U_Wetsuit_Blue", + "U_Wetsuit_Purp", "U_Wetsuit_Camo", "U_CamoRed_uniform", "U_CamoBrn_uniform", "U_CamoBlue_uniform", "U_Camo_uniform", "U_ghillie1_uniform", "U_ghillie2_uniform", "U_ghillie3_uniform","U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard", + "Full Ghillie Suit Semi-Arid:","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","Full Ghillie Suit Lush","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh"]; + +//Weapons +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + +_loot_pistols = blck_Pistols; + +_loot_rifles = blck_RifleAsault + blck_apexWeapons; +_loot_snipers = blck_RifleSniper + blck_DLC_Sniper; +_loot_LMG = blck_RifleLMG + blck_DLC_MMG; +_loot_magazines = [ // Ignored 5.56, SMG and pistol ammo as most players seem to have little interest in it when given the choice to use higher caliber amo. + "100Rnd_65x39_caseless_mag", + "100Rnd_65x39_caseless_mag_Tracer", + "10Rnd_127x54_Mag", + "10Rnd_338_Mag", + "10Rnd_762x54_Mag", + "10Rnd_93x64_DMR_05_Mag", + "130Rnd_338_Mag", // SPMG + "150Rnd_762x54_Box", + "150Rnd_762x54_Box_Tracer", + "150Rnd_93x64_Mag", // NAVID + "16Rnd_9x21_Mag", + "200Rnd_65x39_cased_Box", + "200Rnd_65x39_cased_Box_Tracer", + "20Rnd_762x51_Mag", + "30Rnd_65x39_caseless_green", + "30Rnd_65x39_caseless_green_mag_Tracer", + "30Rnd_65x39_caseless_mag", + "30Rnd_65x39_caseless_mag_Tracer", + // Apex + "30Rnd_580x42_Mag_F", + "30Rnd_580x42_Mag_Tracer_F", + "100Rnd_580x42_Mag_F", + "100Rnd_580x42_Mag_Tracer_F", + "20Rnd_650x39_Cased_Mag_F", + "10Rnd_50BW_Mag_F", + "150Rnd_556x45_Drum_Mag_F", + "150Rnd_556x45_Drum_Mag_Tracer_F", + "30Rnd_762x39_Mag_F", + "30Rnd_762x39_Mag_Green_F", + "30Rnd_762x39_Mag_Tracer_F", + "30Rnd_762x39_Mag_Tracer_Green_F", + "30Rnd_545x39_Mag_F", + "30Rnd_545x39_Mag_Green_F", + "30Rnd_545x39_Mag_Tracer_F", + "30Rnd_545x39_Mag_Tracer_Green_F", + "200Rnd_556x45_Box_F", + "200Rnd_556x45_Box_Red_F", + "200Rnd_556x45_Box_Tracer_F", + "200Rnd_556x45_Box_Tracer_Red_F", + "10Rnd_9x21_Mag" + ]; + +//Silencers +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_silencers = ["muzzle_sr25S_epoch","muzzle_snds_H","muzzle_snds_M","muzzle_snds_L","muzzle_snds_B","muzzle_snds_H_MG","muzzle_snds_acp","muzzle_snds_93mmg","muzzle_snds_93mmg_tan", + "muzzle_snds_338_black","muzzle_snds_338_greenmuzzle_snds_338_sand"]; + +private["_loot_optics","_loot_backpacks","_loot_vests","_loot_headgear","_loot_food","_loot_misc","_loot_build"]; +//Optics +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_optics = ["optic_NVS","optic_tws","optic_tws_mg","optic_SOS","optic_LRPS","optic_DMS","optic_Arco","optic_Hamr","Elcan_epoch","Elcan_reflex_epoch","optic_MRCO","optic_Holosight", + "optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","optic_Yorris","optic_MRD","optic_AMS","optic_AMS_khk","optic_AMS_snd", + "optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan"]; + +//Backpacks +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_backpacks = blck_backpacks; + +//Vests +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_vests = blck_vests; + +//Head Gear +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_headgear = ["H_1_EPOCH","H_2_EPOCH","H_3_EPOCH","H_4_EPOCH","H_5_EPOCH","H_6_EPOCH","H_7_EPOCH","H_8_EPOCH","H_9_EPOCH","H_10_EPOCH","H_11_EPOCH","H_12_EPOCH","H_13_EPOCH","H_14_EPOCH","H_15_EPOCH","H_16_EPOCH","H_17_EPOCH","H_18_EPOCH","H_19_EPOCH","H_20_EPOCH","H_21_EPOCH","H_22_EPOCH","H_23_EPOCH","H_24_EPOCH","H_25_EPOCH","H_26_EPOCH","H_27_EPOCH","H_28_EPOCH","H_29_EPOCH","H_30_EPOCH","H_31_EPOCH","H_32_EPOCH","H_33_EPOCH","H_34_EPOCH","H_35_EPOCH","H_36_EPOCH","H_37_EPOCH","H_38_EPOCH","H_39_EPOCH","H_40_EPOCH","H_41_EPOCH","H_42_EPOCH","H_43_EPOCH","H_44_EPOCH","H_45_EPOCH","H_46_EPOCH","H_47_EPOCH","H_48_EPOCH","H_49_EPOCH","H_50_EPOCH","H_51_EPOCH","H_52_EPOCH","H_53_EPOCH","H_54_EPOCH","H_55_EPOCH","H_56_EPOCH","H_57_EPOCH","H_58_EPOCH","H_59_EPOCH","H_60_EPOCH","H_61_EPOCH","H_62_EPOCH","H_63_EPOCH","H_64_EPOCH","H_65_EPOCH","H_66_EPOCH","H_67_EPOCH","H_68_EPOCH","H_69_EPOCH","H_70_EPOCH","H_71_EPOCH","H_72_EPOCH","H_73_EPOCH","H_74_EPOCH","H_75_EPOCH","H_76_EPOCH","H_77_EPOCH","H_78_EPOCH","H_79_EPOCH","H_80_EPOCH","H_81_EPOCH","H_82_EPOCH","H_83_EPOCH","H_84_EPOCH","H_85_EPOCH","H_86_EPOCH","H_87_EPOCH","H_88_EPOCH","H_89_EPOCH","H_90_EPOCH","H_91_EPOCH","H_92_EPOCH","H_93_EPOCH","H_94_EPOCH","H_95_EPOCH","H_96_EPOCH","H_97_EPOCH","H_98_EPOCH","H_99_EPOCH","H_100_EPOCH","H_101_EPOCH","H_102_EPOCH","H_103_EPOCH","H_104_EPOCH"]; + +//Food +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_food = blck_ConsumableItems; + +// Tools +//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +_loot_tools = [["Hatchet",2],["MeleeSledge",2],["ChainSaw",1]]; + +//Misc +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_Misc = ["PaintCanClear","PaintCanBlk","PaintCanBlu","PaintCanBrn","PaintCanGrn","PaintCanOra","PaintCanPur","PaintCanRed","PaintCanTeal","PaintCanYel","ItemDocument","ItemMixOil","emptyjar_epoch","FoodBioMeat","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","ItemSodaRbull","sardines_epoch","meatballs_epoch","scam_epoch","sweetcorn_epoch","Towelette","HeatPack","ColdPack","VehicleRepair","VehicleRepairLg","CircuitParts","ItemCoolerE","ItemScraps","ItemScraps","lighter_epoch","EnergyPack","EnergyPackLg"]; + +//Construction +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_build = blck_epochBuildingSupplies; + +// Explosives +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_explosives = [["HandGrenade",3],["MiniGrenade",3],["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]]; +_loot_launchers = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_Titan_short_F"]; + + +// Loot Configuration 1: Heavy Weapons and explosives +_box1_Pistols = 3; +_box1_Rifles = 5; +_box1_LMG = 4; +_box1_Snipers = 3; +_box1_Mags = [2,6]; +_box1_Optics = 6; +_box1_Silencers = 5; +_box1_Explosives = 6; +_box1_FoodDrink = 6; +_box1_Misc = 3; +_box1_Backpacks = 3; +_box1_BuildingSupplies = 3; +_box1_Tools = 0; +_box1_launchers = 0; +// Note that the bonus items are listed in a nexted array within the _box1_cbonus array. It was more difficult to ocde otherwise and would have needed indexing to make it work. +_box1_bonus_items = [["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]]; +_box1_bonus = 1; + +// Loot Configuration 2: Sniper Weapons and sniper scopes +_box2_Pistols = 3; +_box2_Rifles = 5; +_box2_LMG = 4; +_box2_Snipers = 3; +_box2_Mags = [2,6]; // [number of times to select a mag, min # of that mag to add, max # of that mag to add] +_box2_Optics = 6; +_box2_Silencers = 5; +_box2_Explosives = 6; +_box2_FoodDrink = 6; +_box2_Misc = 3; +_box2_Backpacks = 3; +_box2_BuildingSupplies = 3; +_box2_Tools = 0; +_box2_Misc = 0; +_box2_launchers = 0; +_box2_bonus_items = [["NVG_EPOCH",2],["ItemGPS",1],["Rangefinder",1],["Hatchet",2],["MeleeSledge",2],["ChainSaw",1],["water_epoch",10]]; +_box2_bonus = 1; + +// Loot Configuration 3: building materials and tools +_box3_Pistols = 2; +_box3_Rifles = 2; +_box3_LMG = 1; +_box3_Snipers = 1; +_box3_Mags = [4,2,6]; +_box3_Optics = 1; +_box3_Silencers = 1; +_box3_Explosives = 2; +_box3_FoodDrink = 3; +_box3_Misc = 3; +_box3_Backpacks = 1; +_box3_BuildingSupplies = [8,15]; // [Number of items, min for item, max for item] +_box3_Tools = 4; +_box3_Misc = 6; +_box3_launchers = 0; +_box3_bonus_items = [["MultiGun",3],["EnergyPack",5],["EnergyPackLg",3],["ItemLockBox",2],["jerrycan_epoch",2],["ItemGoldBar10oz",2],["ItemSilverBar",4],["ItemKiloHemp",4],["Hatchet",2],["MeleeSledge",2],["ChainSaw",1],["water_epoch",10]]; +_box3_bonus = 1; + +//////////////////////////// +// End of configurations diff --git a/Server/@GMS/addons/custom_server/SLS/SLS_defines_exile.sqf b/Server/@GMS/addons/custom_server/SLS/SLS_defines_exile.sqf new file mode 100644 index 0000000..b703633 --- /dev/null +++ b/Server/@GMS/addons/custom_server/SLS/SLS_defines_exile.sqf @@ -0,0 +1,555 @@ +/* + Define constants for SLS for Exile + + 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"; +_lootBoxes = +[ + #ifdef GRG_TestServer + ["altis","APTrader",10, + [ + [[14658.1, 16790.9, 18.3795],0,false,false], + [[14660, 16788.5, 18.3795],0,false,false], + [[17518.4,13260.7,12.7337],0,false,false], + [[17528.1,13270.2,12.725],0,false,false], + [[17537.4,13278.2,12.706],0,false,false], + [[17547.9,13286,12.6121],0,false,false], + [[17599.5,13240.5,13.327],0,false,false], + [[17593.1,13231.9,13.4375],0,false,false], + [[17586.5,13224.6,13.5832],0,false,false], + [[17580.5,13217.8,13.6708],0,false,false] + ] + ], + #endif + + // Ferres + /* + ["altis","Ferres", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type. + [ + [[21693.887,7731.0264,13.955027],0,true, true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position + [[21850.063,7504.3203,14.677059],0,true, true], + [[21693.674,7431.4141,15.578629],0,true, true], + [[21631.227,7773.9927,14.149431],0,true, true], + [[21572.559,7462.2661,17.827536],0,true, true], + [[21801.348,7631.4448,13.80711],0,true, true], + [[21508.932,7585.6309,15.844649],0,true, true], + [[21547.027,7695.6738,15.754698],0,true, true] + ] + ],*/ + #ifndef blck_milServer + // Dump + ["altis","Dump", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type. + [ + [[5791,20314.5,0],0,false,true], // crate position 1, loadout (0-4), false=random placement near position, true = show smoke at position + [[5902.33,20272.7,0],0,false,true], + [[5955.21,20136.2,0],0,false,true], + [[5908.32,20088.3,0],0,false,true], + [[55843.54,20171.6,0],0,false,true], + [[5775.42,20163.3,0],0,false,true], + [[5979.18,20206.5,0],0,false,true], + [[5943.89,20076.7,0],0,false,true] + ] + ], + // Beach #1 + ["altis","Beach", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type. + [ + [[22769.8,7051.28,0],0,false,true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position + [[22934.3,6990.53,0],0,false,true], + [[22831.7,7003.24,0],0,false,true], + [[22666.6,7009.22,0],0,false,true], + [[22634.6,6985.3,0],0,false,true], + [[22583.4,6935.63,0],0,false,true], + [[22651.1,7060.75,0],0,false,true] + ] + ], + ["altis","Pack-1", 1, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type. + [ + [[14269.6,13016.2,0],0,false,false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position + [[14359.9,13047.7,0],0,false,false], + [[14293.5,12956.9,0],0,false,false] + ] + ], + ["altis","Pack-2", 4, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type. + [ + [[26810,24557.2,0.00140762],0,false,false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position + [[26746,24652.6,0.520973],0,false,false], + [[26798.1,24668.3,0.001297],0,false,false], + [[26873,24635.1,17.4495],0,false,false], + [[26940.7,24642.2,0.732187],0,false,false], + [[26955.5,24658.4,0.739138],0,false,false], + [[26943.8,24666.2,0.722866],0,false,false], + [[26930.2,24651.9,0.727114],0,false,false], + [[26965.5,24684.1,7.63653],0,false,false], + [[26928.3,24714.8,7.63206],0,false,false], + [[26940.7,24730.5,7.76619],0,false,false], + [[26952,24750.5,0.602812],0,false,false], + [[26932.7,24730.8,0.635454],0,false,false], + [[26931.2,24739,0.724504],0,false,false], + [[26968.1,24700.1,0.599913],0,false,false], + [[26847.9,24821.4,0.340788],0,false,false], + [[26783.4,24788.2,12.5849],0,false,false], + [[26729.8,24759.1,0.296225],0,false,false] + ] + ], + #endif + ["taviana","Zoo", 3, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type. + [ + [[18614.1,3029.22,0],0,false, true], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position + [[19215.7,2260.17,0],0,false, true], + [[19073.2,2775.83,0],0,false, true], + [[18632.1,2967.54,0],0,false, true], + [[18671.2,2869.73,0],0,false, true] + ] + ], + // Power Plant + ["taviana","NPP", 3, // Number of crates to select from the array of possible possitions below. Note that there can be multiple arrays of this type. + [ + [[9478.98,4481.12,0],0,false, false], // crate position 1, loadout (0-4), true=random placement near position, true = show smoke at position + [[9584.39,4474.86,0],0,false, false], + [[9485.74,4303.65,0],0,false, false], + [[9549.64,4236.95,0],0,false, false], + [[9347.52,4656.96,0],0,false, false], + [[9427.53,4585.94,0],0,false, false], + [[9542.42,4603.89,0],0,false, false] + ] + ], + ["bornholm","Stronghold1",4, + // Stronghold 1 + [ + [[16776.3,2841.59,0.115455],2,true, false], + [[16885.1,2763.64,0.0635304],4,true, false], + [[16953.7,2588.12,0.0866053],2,true, false], + [[17028.5,2645.56,0.0632489],4,true, false], + [[16818.7,2627.68,0.0635295],2,true, false], + [[16828.1,2794.94,0.086482],4,true, false], + [[16776.8,2842.19,0.115454],2,true, false] + ] + ], + ["bornholm","Stronghold2", 4, + // Stronghold 2 + [ + [[4342.52,19974.5,1.5059],2,false, false], + [[4364.01,19957.2,1.7643],4,false, false], + [[4337.55,19886.1,0.923979],2,false, false], + [[4317.76,19915.3,0.336912],4,false, false], + [[4261.73,19957,0.0783005],2,false, false], + [[4280.66,19961.2,0.180275],4,false, false], + [[4318.1,19916.5,0.514435],2,false, false] + ] + ], + ["bornholm","Object99",4,// ** Note that there is no comma after the last entry. + // Object 99 blah blah + [ + /* + // Darthrogues Obj 99 + [[7231.91,11975.8,0.836342],2,false, false], + [[7266.08,11981.6,1.0471],4,false, false], + [[7337.64,12011.6,12.7679],2,false, false], + [[7264.35,12020.1,0.661186],4,false, false], + [[7204.27,12058.5,0.632904],2,false, false], + [[7265.46,12128.6,0.00143433],4,false, false], + [[7250.85,12142.9,3.16084],2,false, false], + [[7215.93,12121.1,0.224915],4,false, false], + [[7207.59,12159.8,0.73732],2,false, false], + [[7184.07,12231.1,8.72117],4,false, false], + [[7172.28,12021.2,0.664284],2,false, false], + [[7147.93,12056.5,0.848099],4,false, false], + [[7137.67,12110.8,4.0068],2,false, false], + [[7166,12138,3.86438],4,false, false], + [[7130.52,12207.9,0.56971],4,false, false] + */ + // Mr. Squirrel's Obj 69 + [[7253.48,12101.4,0],2,false, false], + [[7276.15,12118.1,0],4,false, false], + [[7158.4,12068.5,0],2,false, false], + [[7128.27,12206.9,0],4,false, false], + [[7167.57,12218.9,0],2,false, false], + [[7218.71,12188.5,0],4,false, false], + [[7209.02,12166.9,0],2,false, false], + [[7233.2,12067.5,0],4,false, false], + [[7167.75,12038.4,0],2,false, false], + [[7106.96,12119.2,0],4,false, false], + [[7161.82,12126.7,0],2,false, false], + [[7096.61,12195.9,0],4,false, false], + [[7083.88,12141.1,0],2,false, false], + [[7060.33,12146.2,0],4,false, false], + [[7135.81,12168.1,0],2,false, false], + [[7055.72,12159.2,0.38678],4,false, false], + [[7119.19,12100.2,0.801155],2,false, false], + [[7124.51,12095.7,1.16968],4,false, false] + ] + ], + ["bornholm","Mafia Island", 4, + [// Mafia Island + [[19296.5, 22308.8, 0],2,false, false], + [[19279, 22352.2, 0],4,false, false], + [[19213.8, 22358.6, 0],2,false, false], + [[19190.4, 22367.4, 0],4,false, false], + [[19204.3, 22314.9, 0],2,false, false], + [[19368.7, 22347.3, 0],4,false, false], + [[19462.8, 22306.1, 0],2,false, false], + [[19321.4, 22240.1, 3.46751],4,false, false] + ] + ], + ["bornholm","Science Compound", 4, + [// Science Compound + [[7922.43,7347, 0],2,false, false], + [[7926.59,7427.49, 0],4,false, false], + [[7929.08,7421.45, 0],2,false, false], + [[7984.89,7474.71, 0],4,false, false], + [[7974.01,7472.63, 0],2,false, false], + [[7934.56,7572.23, 0],4,false, false], + [[7945.09,7587.68, 0],2,false, false], + [[7949.19,7567.18,0],4,false, false] + ] + ], + //[[21572.559,7462.2661,17.827536],4,true, true] + //[[21801.348,7631.4448,13.80711],1,true, true], + //[[21508.932,7585.6309,15.844649],2,true, true], + //[[21547.027,7695.6738,15.754698],3,true, true] + + [ "lythium", "RaiderBase", 3, + [ + [[18950.6,13115.8,233.078],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position + [[18958,13095.9,231.687],2,true, false], + [[19048.7,13134,229.004],2,true, false], + [[19062.3,13126.6,229.646],1,true, false], + [[19032.2,13087.3,227.428],3,true, false], + [[18988,13192.7,223.058],1,true, false], + [[19076.2,13105.2,231.051],3,true, false] + ] + ], + [ "lythium","chemical", 4, + [ + [[9081.29,19774.8,704.102],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position + [[9081.29,19774.8,704.102],2,true, false], + [[8926.25,19856.5,728.456],2,true, false], + [[8999.95,19917.9,714.447],1,true, false], + [[9391.22,19888,713.624],3,true, false], + [[9026.12,20360,687.103],1,true, false], + [[8972.81,20222.4,714.263],3,true, false], + [[9406.59,19506.8,635.903],3,true, false], + [[7715.5,20352.6,822.616],3,true, false] + ] + ], + [ "lythium","nwaste", 4, + [ + [[19123.5,1726.78,77.169],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position + [[19000.5,1657.84,79.3068],2,true, false], + [[19028.6,1525.28,80.0602],2,true, false], + [[19076.7,1536.15,78.7828],1,true, false], + [[19393.5,1784.66,32.3623],3,true, false], + [[19391,1783.63,32.5241],1,true, false], + [[19255.1,2204.95,46.3486],3,true, false], + [[19398.7,2323,42.8409],3,true, false] + + ] + ], + [ "lythium","mine", 4, + [ + [[4114.84,905.004,357.621],1,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position + [[3714.22,760.414,383.659],2,true, false], + [[3774.63,684.883,384.924],2,true, false], + [[3747.2,777.427,384.203],1,true, false], + [[3761.07,611.827,383.125],3,true, false], + [[3709.12,780.889,383.27],1,true, false], + [[3712.96,805.05,382.848],3,true, false], + [[3688.47,713.877,382.692],3,true, false], + [[4373.19,607.184,370.77],3,true, false] + ] + ] + +]; + + +private["_loot_uniforms","_loot_pistols","_loot_rifles","_loot_snipers","_loot_LMG","_loot_silencers"]; +// Edit these to your liking +//Uniforms +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_uniforms = ["U_O_CombatUniform_ocamo", "U_O_GhillieSuit", "U_O_PilotCoveralls", "U_O_Wetsuit", "U_OG_Guerilla1_1", "U_OG_Guerilla2_1", "U_OG_Guerilla2_3", "U_OG_Guerilla3_1", "U_OG_Guerilla3_2", "U_OG_leader", "U_C_Poloshirt_stripped", "U_C_Poloshirt_blue", + "U_C_Poloshirt_burgundy", "U_C_Poloshirt_tricolour", "U_C_Poloshirt_salmon", "U_C_Poloshirt_redwhite", "U_C_Poor_1", "U_C_WorkerCoveralls", "U_C_Journalist", "U_C_Scientist", "U_OrestesBody", "U_Wetsuit_uniform", "U_Wetsuit_White", "U_Wetsuit_Blue", + "U_Wetsuit_Purp", "U_Wetsuit_Camo", "U_CamoRed_uniform", "U_CamoBrn_uniform", "U_CamoBlue_uniform", "U_Camo_uniform", "U_ghillie1_uniform", "U_ghillie2_uniform", "U_ghillie3_uniform","U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard", + "Full Ghillie Suit Semi-Arid:","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","Full Ghillie Suit Lush","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh"]; + +//Weapons +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + +_loot_pistols = blck_Pistols; +_loot_rifles = blck_RifleAsault + blck_apexWeapons; +_loot_snipers = blck_RifleSniper + blck_DLC_Sniper; +_loot_LMG = blck_RifleLMG + blck_DLC_MMG; +_loot_magazines = [ // Ignored 5.56, SMG and pistol ammo as most players seem to have little interest in it when given the choice to use higher caliber amo. + "100Rnd_65x39_caseless_mag", + "100Rnd_65x39_caseless_mag_Tracer", + "10Rnd_127x54_Mag", + "10Rnd_338_Mag", + "10Rnd_762x54_Mag", + "10Rnd_93x64_DMR_05_Mag", + "130Rnd_338_Mag", // SPMG + "150Rnd_762x54_Box", + "150Rnd_762x54_Box_Tracer", + "150Rnd_93x64_Mag", // NAVID + "16Rnd_9x21_Mag", + "200Rnd_65x39_cased_Box", + "200Rnd_65x39_cased_Box_Tracer", + "20Rnd_762x51_Mag", + "30Rnd_65x39_caseless_green", + "30Rnd_65x39_caseless_green_mag_Tracer", + "30Rnd_65x39_caseless_mag", + "30Rnd_65x39_caseless_mag_Tracer", + // Apex + "30Rnd_580x42_Mag_F", + "30Rnd_580x42_Mag_Tracer_F", + "100Rnd_580x42_Mag_F", + "100Rnd_580x42_Mag_Tracer_F", + "20Rnd_650x39_Cased_Mag_F", + "10Rnd_50BW_Mag_F", + "150Rnd_556x45_Drum_Mag_F", + "150Rnd_556x45_Drum_Mag_Tracer_F", + "30Rnd_762x39_Mag_F", + "30Rnd_762x39_Mag_Green_F", + "30Rnd_762x39_Mag_Tracer_F", + "30Rnd_762x39_Mag_Tracer_Green_F", + "30Rnd_545x39_Mag_F", + "30Rnd_545x39_Mag_Green_F", + "30Rnd_545x39_Mag_Tracer_F", + "30Rnd_545x39_Mag_Tracer_Green_F", + "200Rnd_556x45_Box_F", + "200Rnd_556x45_Box_Red_F", + "200Rnd_556x45_Box_Tracer_F", + "200Rnd_556x45_Box_Tracer_Red_F", + "10Rnd_9x21_Mag" + ]; + +//Silencers +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_silencers = ["muzzle_sr25S_epoch","muzzle_snds_H","muzzle_snds_M","muzzle_snds_L","muzzle_snds_B","muzzle_snds_H_MG","muzzle_snds_acp","muzzle_snds_93mmg","muzzle_snds_93mmg_tan", + "muzzle_snds_338_black","muzzle_snds_338_greenmuzzle_snds_338_sand"]; + +private["_loot_optics","_loot_backpacks","_loot_vests","_loot_headgear","_loot_food","_loot_misc","_loot_build"]; +//Optics +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_optics = ["optic_NVS","optic_tws","optic_tws_mg","optic_SOS","optic_LRPS","optic_DMS","optic_Arco","optic_Hamr","Elcan_epoch","Elcan_reflex_epoch","optic_MRCO","optic_Holosight", + "optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","optic_Yorris","optic_MRD","optic_AMS","optic_AMS_khk","optic_AMS_snd", + "optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan"]; + +//Backpacks +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_backpacks = blck_backpacks; + +//Vests +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_vests = blck_vests; + +//Head Gear +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_headgear = +[ + "H_Cap_blk", + "H_Cap_blk_Raven", + "H_Cap_blu", + "H_Cap_brn_SPECOPS", + "H_Cap_grn", + "H_Cap_headphones", + "H_Cap_khaki_specops_UK", + "H_Cap_oli", + "H_Cap_press", + "H_Cap_red", + "H_Cap_tan", + "H_Cap_tan_specops_US", + "H_Watchcap_blk", + "H_Watchcap_camo", + "H_Watchcap_khk", + "H_Watchcap_sgg", + "H_MilCap_blue", + "H_MilCap_dgtl", + "H_MilCap_mcamo", + "H_MilCap_ocamo", + "H_MilCap_oucamo", + "H_MilCap_rucamo", + "H_Bandanna_camo", + "H_Bandanna_cbr", + "H_Bandanna_gry", + "H_Bandanna_khk", + "H_Bandanna_khk_hs", + "H_Bandanna_mcamo", + "H_Bandanna_sgg", + "H_Bandanna_surfer", + "H_Booniehat_dgtl", + "H_Booniehat_dirty", + "H_Booniehat_grn", + "H_Booniehat_indp", + "H_Booniehat_khk", + "H_Booniehat_khk_hs", + "H_Booniehat_mcamo", + "H_Booniehat_tan", + "H_Hat_blue", + "H_Hat_brown", + "H_Hat_camo", + "H_Hat_checker", + "H_Hat_grey", + "H_Hat_tan", + "H_StrawHat", + "H_StrawHat_dark", + "H_Beret_02", + "H_Beret_blk", + "H_Beret_blk_POLICE", + "H_Beret_brn_SF", + "H_Beret_Colonel", + "H_Beret_grn", + "H_Beret_grn_SF", + "H_Beret_ocamo", + "H_Beret_red", + "H_Shemag_khk", + "H_Shemag_olive", + "H_Shemag_olive_hs", + "H_Shemag_tan", + "H_ShemagOpen_khk", + "H_ShemagOpen_tan", + "H_TurbanO_blk", + "H_HelmetB", + "H_HelmetB_black", + "H_HelmetB_camo", + "H_HelmetB_desert", + "H_HelmetB_grass", + "H_HelmetB_light", + "H_HelmetB_light_black", + "H_HelmetB_light_desert", + "H_HelmetB_light_grass", + "H_HelmetB_light_sand", + "H_HelmetB_light_snakeskin", + "H_HelmetB_paint", + "H_HelmetB_plain_blk", + "H_HelmetB_sand", + "H_HelmetB_snakeskin", + "H_HelmetCrew_B", + "H_HelmetCrew_I", + "H_HelmetCrew_O", + "H_HelmetIA", + "H_HelmetIA_camo", + "H_HelmetIA_net", + "H_HelmetLeaderO_ocamo", + "H_HelmetLeaderO_oucamo", + "H_HelmetO_ocamo", + "H_HelmetO_oucamo", + "H_HelmetSpecB", + "H_HelmetSpecB_blk", + "H_HelmetSpecB_paint1", + "H_HelmetSpecB_paint2", + "H_HelmetSpecO_blk", + "H_HelmetSpecO_ocamo", + "H_CrewHelmetHeli_B", + "H_CrewHelmetHeli_I", + "H_CrewHelmetHeli_O", + "H_HelmetCrew_I", + "H_HelmetCrew_B", + "H_HelmetCrew_O", + "H_PilotHelmetHeli_B", + "H_PilotHelmetHeli_I", + "H_PilotHelmetHeli_O" + ]; + +//Food +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_food = blck_ConsumableItems; + +//Misc +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_Misc = ["Exile_Item_InstaDoc","Exile_Item_Matches","Exile_Item_CookingPot","Exile_Item_CanOpener"]; + +//Construction +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_build = ["Exile_Item_Rope","Exile_Item_DuctTape","Exile_Item_ExtensionCord","Exile_Item_FuelCanisterEmpty", + "Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_CamoTentKit","Exile_Item_WorkBenchKit", + "Exile_Item_MetalBoard","Exile_Item_MetalPole","Exile_Item_Sand","Exile_Item_Cement","Exile_Item_MetalWire","Exile_Item_MetalScrews" ]; +_loot_tools = ["Exile_Item_Handsaw","Exile_Item_Pliers","Exile_Item_Grinder","Exile_Item_Foolbox"]; + +// Explosives +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +_loot_explosives = [["HandGrenade",3],["MiniGrenade",3],["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]]; +_loot_launchers = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_Titan_short_F"]; + +// Loot Configuration 1: Heavy Weapons and explosives +_box1_Pistols = [2,4]; +_box1_Rifles = [5,8]; +_box1_LMG = [1,4]; +_box1_Snipers = 0; +_box1_Mags = [4,8]; +_box1_Optics = [3,6]; +_box1_Silencers = [3,6]; +_box1_Explosives = [3,6]; +_box1_FoodDrink = 3; +_box1_Misc = 0; +_box1_Backpacks = 3; +_box1_BuildingSupplies = 0; +_box1_Tools = 0; + +#ifdef blck_milServer +_box1_launchers = 4; +#else +_box1_launchers = 0; +#endif +// Note that the bonus items are listed in a nexted array within the _box1_cbonus array. It was more difficult to ocde otherwise and would have needed indexing to make it work. +_box1_bonus_items = [["ItemGPS",1],["Rangefinder",1],["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]]; +_box1_bonus = 1; + +// Loot Configuration 2: Sniper Weapons and sniper scopes +_box2_Pistols = 2; +_box2_Rifles = 2; +_box2_LMG = [3,6]; +_box2_Snipers = [4,8]; +_box2_Mags = [2,6]; // [number of times to select a mag, min # of that mag to add, max # of that mag to add] +_box2_Optics = 6; +_box2_Silencers = 5; +_box2_Explosives = 6; +_box2_FoodDrink = 2; +_box2_Misc = 1; +_box2_Backpacks = 3; +_box2_BuildingSupplies = 0; +_box2_Tools = 0; +_box2_Misc = 0; +#ifdef blck_milServer +_box2_launchers = 4; +#else +_box2_launchers = 0; +#endif + +_box2_bonus_items = [["ItemGPS",2],["Rangefinder",2],["SatchelCharge_Remote_Mag",1],["DemoCharge_Remote_Mag",10]]; +_box2_bonus = 1; + +// Loot Configuration 3: building materials and tools +_box3_Pistols = 2; +_box3_Rifles = 2; +_box3_LMG = 1; +_box3_Snipers = 1; +_box3_Mags = [4,6]; +_box3_Optics = 1; +_box3_Silencers = 1; +_box3_Explosives = 2; +_box3_FoodDrink = 12; +_box3_Misc = 6; +_box3_Backpacks = 1; +_box3_BuildingSupplies = [12,20]; // [Number of items, min for item, max for item] +_box3_Tools = 4; +_box3_Misc = 6; +#ifdef blck_milServer +_box3_launchers = 4; +#else +_box3_launchers = 0; +#endif + +_box3_bonus_items = [["Exile_Item_Matches",2],[ "Exile_Item_CookingPot",2],["Exile_Item_CanOpener",3],["Exile_Item_Handsaw",2],["Exile_Item_Pliers",2],["Exile_Item_Grinder",1],["Exile_Item_Foolbox",1]]; +_box3_bonus = 1; + + +//////////////////////////// +// End of configurations diff --git a/Server/@GMS/addons/custom_server/SLS/SLS_functions.sqf b/Server/@GMS/addons/custom_server/SLS/SLS_functions.sqf new file mode 100644 index 0000000..d1816aa --- /dev/null +++ b/Server/@GMS/addons/custom_server/SLS/SLS_functions.sqf @@ -0,0 +1,129 @@ +/* + 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/ +*/ + +//Based on the Random Loot Crates addon by Darth_Rogue & Chisel (tdwhite) +// Re-written by Ghostrider [GRG] to add features and clean up code + +// Do not touch anything below this line. +/// ******************************************************************************************************************************************************************************************************************************** +_box1_loadout = [[_loot_pistols,_box1_Pistols],[_loot_rifles,_box1_Rifles],[_loot_LMG,_box1_LMG],[_loot_snipers,_box1_Snipers],[_loot_magazines,_box1_Mags],[_loot_optics,_box1_Optics],[_loot_silencers,_box1_Silencers], + [_loot_explosives,_box1_Explosives],[_loot_food,_box1_FoodDrink],[_loot_Misc,_box1_Misc],[_loot_backpacks,_box1_Backpacks],[_loot_build,_box1_BuildingSupplies],[_loot_tools,_box1_Tools],[_loot_Misc,_box1_Misc], + [_loot_launchers,_box1_launchers],[_box1_bonus_items,_box1_bonus]]; +_box2_loadout = [[_loot_pistols,_box2_Pistols],[_loot_rifles,_box2_Rifles],[_loot_LMG,_box2_LMG],[_loot_snipers,_box2_Snipers],[_loot_magazines,_box2_Mags],[_loot_optics,_box2_Optics],[_loot_silencers,_box2_Silencers], + [_loot_explosives,_box2_Explosives],[_loot_food,_box2_FoodDrink],[_loot_Misc,_box2_Misc],[_loot_backpacks,_box2_Backpacks],[_loot_build,_box2_BuildingSupplies],[_loot_tools,_box2_Tools],[_loot_Misc,_box2_Misc], + [_loot_launchers,_box2_launchers],[_box2_bonus_items,_box2_bonus]]; +_box3_loadout = [[_loot_pistols,_box3_Pistols],[_loot_rifles,_box3_Rifles],[_loot_LMG,_box3_LMG],[_loot_snipers,_box3_Snipers],[_loot_magazines,_box3_Mags],[_loot_optics,_box3_Optics],[_loot_silencers,_box3_Silencers], + [_loot_explosives,_box3_Explosives],[_loot_food,_box3_FoodDrink],[_loot_Misc,_box3_Misc],[_loot_backpacks,_box3_Backpacks],[_loot_build,_box3_BuildingSupplies],[_loot_tools,_box3_Tools],[_loot_Misc,_box3_Misc], + [_loot_launchers,_box3_launchers],[_box3_bonus_items,_box3_bonus]]; + +// allows a visible cue to be spawned near the crate +_fn_smokeAtCrate = { // adapted from Ritchies heli crash addon + params["_pos"]; + private["_wreckChoices"]; + _wreckChoices = ["Land_Wreck_Car2_F","Land_Wreck_Car3_F","Land_Wreck_Car_F","Land_Wreck_Offroad2_F","Land_Wreck_Offroad_F","Land_Tyres_F","Land_Pallets_F","Land_MetalBarrel_F"]; + // params["_pos","_mode",["_maxDist",12],["_wreckChoices",_wrecks],["_addFire",false]]; + [_pos,"random",8,_wreckChoices,false] call blck_fnc_smokeAtCrates; +}; + +// fill the crate with something +_fn_spawnCrate = { + private["_crate","_minDistfromCenter","_maxDistfromCenter","_clossestObj","_spawnOnWater","_spawnAtShore","_pos","_px","_py","_pz"]; + + params["_cratePos",["_randomLocation",true]]; + + // Spawn an Empty a Crate + // find a safe location for the crate + _minDistfromCenter = 0; + _maxDistfromCenter = 25; + _clossestObj = 10; + _spawnOnWater = 0; // water mode 0: cannot be in water , 1: can either be in water or not , 2: must be in water + _spawnAtShore = 0; // 0: does not have to be at a shore , 1: must be at a shore + + if (_randomLocation) then{ + _pos = [_cratePos,_minDistfromCenter,_maxDistfromCenter,_clossestObj,_spawnOnWater,20,_spawnAtShore] call BIS_fnc_findSafePos; // find a random loc + if (count _pos < 3) then {_pos pushback 0;}; + } + else + { + _pos = _cratePos; + //diag_log format["crate spawner using exact position %1",_pos]; + }; + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls[ SLS :: _fn_spawnCrate %1 _randomLocation %2 crate position %3",_cratePos,_randomLocation,_pos]; + }; + #endif + private["_crateTypes","_selectedCrateType"]; + //_crateTypes = ["I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F","I_supplyCrate_F","Box_East_AmmoVeh_F","Box_NATO_AmmoVeh_F"]; + _selectedCrateType = selectRandom blck_crateTypes; + _crate = [[0,0,0],_selectedCrateType] call blck_fnc_spawnCrate; + _crate setPosATL _pos; + _crate setDir round(random(360)); + _crate setVectorUp surfaceNormal _pos; + _crate +}; + +_fn_setupCrates = { + params["_location","_lootType","_randomPos","_useSmoke"]; + private["_crate"]; + + _crate = [_location,_randomPos] call _fn_SpawnCrate; + _lootType = selectrandom [1,2,3]; + switch(_lootType) do + { + // format here is [_arrayOfLoot, crateToLoad, magazinesToAddForEachWeaponLoaded] + case 1:{[_box1_loadout,_crate,3] call blck_fnc_loadLootItemsFromArray;}; + case 2:{[_box2_loadout, _crate,3] call blck_fnc_loadLootItemsFromArray;}; + case 3:{[_box3_loadout, _crate,3] call blck_fnc_loadLootItemsFromArray;}; + }; + if (_useSmoke) then {[getPos _crate] call _fn_smokeAtCrate;}; + #ifdef blck_debugMode + if (blck_debugON) then + { + _blck_localMissionMarker = [format["SLS%1%2",_location select 0, _location select 1],(getPos _crate),"","","ColorGreen",["mil_box",[]]]; + diag_log format["[blckeagls] SLS:: spawning diagnostic marker at %1",getPos _crate]; + // params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"]; + [_blck_localMissionMarker] call blck_fnc_spawnMarker; + }; + #endif + _crate +}; +//diag_log "[blckeagls] SLS System: Functions Initialized!"; +private["_cratePos","_lootType","_randomPos","_useSmoke"]; +{ + _x params ["_map","_name","_no","_ar"]; + private["_index"]; + _index = 1; + if (blck_debugON) then + { + diag_log format["[blckeagls] SLS :: main function: Location name = %3 |count _ar = %1 | _index = %2", count _ar, _index, _name]; + diag_log format["[blckeagls] SLS :: main function: count _ar = %1", _ar]; + }; + if ((tolower _map) isEqualto (toLower(worldName))) then + { + for "_i" from 1 to _no do + { + // Pick a random element and be sure it has not already been selected + _ar = _ar call Bis_fnc_arrayshuffle; + _crateParams = _ar deleteat 0; + if (blck_debugON) then + { + diag_log format["[blckeagls] SLS:: spawning crate spawning crate at location name %1 with parameters of %2 --->>> %1",_name,_crateParams]; + }; +// _crateParams params["_cratePos","_lootType","_randomPos","_useSmoke"]; + _crateParams call _fn_setupCrates; + }; + }; +} forEach _lootBoxes; + + diff --git a/Server/@GMS/addons/custom_server/SLS/SLS_init.sqf b/Server/@GMS/addons/custom_server/SLS/SLS_init.sqf new file mode 100644 index 0000000..8907920 --- /dev/null +++ b/Server/@GMS/addons/custom_server/SLS/SLS_init.sqf @@ -0,0 +1,27 @@ +/* + Static loot crate spawner + by Ghostrider [GRG] + For Arma 3 Exile and Epoch + Last Updated 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/ +*/ +#ifdef blck_debugMode +//diag_log "[blckeagls] SLS System: Initializing Static Loot Crate System!"; +#endif +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +if ((tolower blck_modType) isEqualto "epoch") then +{ + call compile preprocessfilelinenumbers "\q\addons\custom_server\SLS\SLS_init_epoch.sqf"; +}; +if ((tolower blck_modType) isEqualto "exile") then +{ + call compile preprocessfilelinenumbers "\q\addons\custom_server\SLS\SLS_init_exile.sqf"; +}; +diag_log "[blckeagls] SLS System: Static loot crates ran successfully!"; +blck_SLSComplete = true; diff --git a/Server/@GMS/addons/custom_server/SLS/SLS_init_epoch.sqf b/Server/@GMS/addons/custom_server/SLS/SLS_init_epoch.sqf new file mode 100644 index 0000000..1226495 --- /dev/null +++ b/Server/@GMS/addons/custom_server/SLS/SLS_init_epoch.sqf @@ -0,0 +1,19 @@ +/* + for ghostridergaming + By Ghostrider [GRG] + Copyright 2016 + Last Modified 3-14-17 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +// Assemble the final executable with Epoch crate configurations and SLS code + +#include "\q\addons\custom_server\SLS\SLS_defines_epoch.sqf"; +#include "\q\addons\custom_server\SLS\SLS_functions.sqf"; diff --git a/Server/@GMS/addons/custom_server/SLS/SLS_init_exile.sqf b/Server/@GMS/addons/custom_server/SLS/SLS_init_exile.sqf new file mode 100644 index 0000000..8b84c50 --- /dev/null +++ b/Server/@GMS/addons/custom_server/SLS/SLS_init_exile.sqf @@ -0,0 +1,17 @@ +/* + for ghostridergaming + By Ghostrider [GRG] + Copyright 2016 + Last Modified 3-14-17 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "\q\addons\custom_server\SLS\SLS_defines_exile.sqf"; +#include "\q\addons\custom_server\SLS\SLS_functions.sqf"; diff --git a/Server/@GMS/addons/custom_server/TODO b/Server/@GMS/addons/custom_server/TODO new file mode 100644 index 0000000..c6de4b2 --- /dev/null +++ b/Server/@GMS/addons/custom_server/TODO @@ -0,0 +1,12 @@ + +Todo: +For V 6.90: + + 2. Test new unlock fix on HC + 3. Write a claim vehicle function. + 4. End of development most likely. + 5. be sure AI do heal when wounded but not killed. + Event handler is triggered but does not seem to call the script to deal with everything. + 6. test that ai toss smoke when healing + 7. Check that functions for allerting units, groups and vehicles function properly in all situations. + ☐ Item: add check for empty crew slots and delete excess crew: note - use BIS_fnc_crewCount to get the number of slots. diff --git a/Server/@GMS/addons/custom_server/config.cpp b/Server/@GMS/addons/custom_server/config.cpp new file mode 100644 index 0000000..112ea61 --- /dev/null +++ b/Server/@GMS/addons/custom_server/config.cpp @@ -0,0 +1,32 @@ +/* + 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/ +*/ + +class CfgPatches { + class custom_server { + units[] = {}; + weapons[] = {}; + requiredVersion = 0.1; + requiredAddons[] = {}; + }; +}; + +class CfgFunctions { + class blck_init { + class blck_start { + file = "\q\addons\custom_server\init"; + class init { + postInit = 1; + }; + }; + }; +}; diff --git a/Server/@GMS/addons/custom_server/init/GMS_fnc_findWorld.sqf b/Server/@GMS/addons/custom_server/init/GMS_fnc_findWorld.sqf new file mode 100644 index 0000000..9c1e55e --- /dev/null +++ b/Server/@GMS/addons/custom_server/init/GMS_fnc_findWorld.sqf @@ -0,0 +1,61 @@ +/* + Determine the map name, set the map center and size, and return the map name. + Trader coordinates were pulled from the config.cfg + Inspired by the Vampire and DZMS + Last Modified 9/3/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"; + +diag_log format["[blckeagls] Loading Map-specific settings with worldName = %1",worldName]; +switch (toLower worldName) do +{// These may need some adjustment - including a test for shore or water should help as well to avoid missions spawning on water. + case "altis":{ + diag_log "[blckeagls] Altis-specific settings for Epoch loaded"; + blck_mapCenter = [6322,7801,0]; + blck_mapRange = 21000; + }; + case "stratis":{ + diag_log "[blckeagls] Stratis-specific settings loaded"; + blck_mapCenter = [6322,7801,0]; + blck_mapRange = 4500; + }; // Add Central, East and West respawns/traders + case "chernarus":{ + diag_log "[blckeagls] Chernarus-specific settings loaded"; + blck_mapCenter = [7100, 7750, 0]; //centerPosition = {7100, 7750, 300}; + blck_mapRange = 5300; + }; + case "chernarus_summer":{blck_mapCenter = [7100, 7750, 0]; blck_mapRange = 6000;}; + case "bornholm":{ + //diag_log "Bornholm-specific settings loaded"; + blck_mapCenter = [11240, 11292, 0]; + blck_mapRange = 14400; + }; + case "esseker":{ + diag_log "Esseker-specific settings loaded"; + blck_mapCenter = [6049.26,6239.63,0]; //centerPosition = {7100, 7750, 300}; + blck_mapRange = 6000; + }; + case "taviana":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14400;}; + case "namalsk":{blck_mapCenter = [4352, 7348, 0];blck_mapRange = 10000;}; + case "napf": {blck_mapCenter = [10240,10240,0]; blck_mapRange = 14000}; // {_centerPos = [10240, 10240, 0];_isMountainous = true;_maxHeight = 50;}; + case "australia": {blck_mapCenter = [20480,20480, 150];blck_mapRange = 40960;}; + case "panthera3":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; + case "isladuala":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; + case "sauerland":{blck_mapCenter = [12800, 12800, 0];blck_mapRange = 12800;}; + case "trinity":{blck_mapCenter = [6400, 6400, 0];blck_mapRange = 6400;}; + case "utes":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;}; + case "zargabad":{blck_mapCenter = [4096, 4096, 0];blck_mapRange = 4096;}; + case "fallujah":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;}; + case "tavi":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14090;}; + case "lingor":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;}; + case "takistan":{blck_mapCenter = [5500, 6500, 0];blck_mapRange = 5000;}; + case "lythium":{blck_mapCenter = [10000,10000,0];blck_mapRange = 8500;}; + case "malden":{blck_mapCenter = [6000,7000,0];blck_mapRange = 5500;}; + default {blck_mapCenter = [6322,7801,0]; blck_mapRange = 6000}; +}; \ No newline at end of file diff --git a/Server/@GMS/addons/custom_server/init/GMS_fnc_getTraderCites.sqf b/Server/@GMS/addons/custom_server/init/GMS_fnc_getTraderCites.sqf new file mode 100644 index 0000000..96e0211 --- /dev/null +++ b/Server/@GMS/addons/custom_server/init/GMS_fnc_getTraderCites.sqf @@ -0,0 +1,44 @@ +// pull trader cities from config +/* + By Ghostrider [GRG] + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +if ((tolower blck_modType) isEqualTo "epoch") then +{ + _blckListPrior = blck_locationBlackList; + private _config = configFile >> "CfgEpoch"; + private _configWorld = _config >> worldname; + private _telePos = getArray(configFile >> "CfgEpoch" >> worldName >> "telePos" ); + { + blck_locationBlackList pushback [_x select 3, 1000]; + } foreach _telePos; +}; + +if ((tolower blck_modType) isEqualTo "exile") then +{ + if (blck_blacklistTraderCities || blck_blacklistSpawns || blck_listConcreteMixerZones) then + { + private _traderCites = allMapMarkers; + private _tc = []; + { + if (getMarkerType _x isEqualTo "ExileTraderZone" && blck_blacklistTraderCities) then { + blck_locationBlackList pushback [(getMarkerPos _x),1000]; + }; + + if ((getMarkerType _x isEqualTo "ExileSpawnZone") && blck_blacklistSpawns) then { + blck_locationBlackList pushback [(getMarkerPos _x),1000]; + }; + // + if (getMarkerType _x isEqualTo "ExileConcreteMixerZone" && blck_listConcreteMixerZones) then { + blck_locationBlackList pushback [(getMarkerPos _x),1000]; + }; + }forEach _traderCites; + }; +}; diff --git a/Server/@GMS/addons/custom_server/init/blck_init_HC.sqf b/Server/@GMS/addons/custom_server/init/blck_init_HC.sqf new file mode 100644 index 0000000..e644c1b --- /dev/null +++ b/Server/@GMS/addons/custom_server/init/blck_init_HC.sqf @@ -0,0 +1,24 @@ +/* + 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/ +*/ +if (hasInterface || isServer) exitWith{}; + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +if !(isNil "blck_Initialized") exitWith{}; +private _blck_loadingStartTime = diag_tickTime; +#include "\q\addons\custom_server\init\build.sqf"; +//call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf"; +call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_functions_HC.sqf"; +//call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_configs.sqf"; +//call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf"; +diag_log format["[blckeagls] Loading Headless Client Version %2 | Build Date %1 | Build %3 | loaded in %4 seconds",blck_buildDate,blck_versionNumber,blck_buildNumber,diag_tickTime - _blck_loadingStartTime]; + + diff --git a/Server/@GMS/addons/custom_server/init/blck_init_server.sqf b/Server/@GMS/addons/custom_server/init/blck_init_server.sqf new file mode 100644 index 0000000..66a2799 --- /dev/null +++ b/Server/@GMS/addons/custom_server/init/blck_init_server.sqf @@ -0,0 +1,143 @@ +/* + 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"; +if ( !(isServer) || hasInterface) exitWith{}; +if !(isNil "blck_Initialized") exitWith{}; +// find and set Mod +blck_modType = if (!isNull (configFile >> "CfgPatches" >> "exile_server")) then {"Exile"} else {if (!isnull (configFile >> "CfgPatches" >> "a3_epoch_server")) then {"Epoch"} else {""}}; +publicVariable "blck_modType"; + +if ((tolower blck_modType) isEqualto "epoch") then { + diag_log "[blckeagls] Waiting until EpochMod is ready..."; + waituntil {!isnil "EPOCH_SERVER_READY"}; +}; +if ((toLower blck_modType) isEqualTo "exile") then +{ + diag_log "[blckeagls] Waiting until ExileMod is ready ..."; + waitUntil {!isNil "PublicServerIsLoaded"}; +}; + +private _blck_loadingStartTime = diag_tickTime; +#include "\q\addons\custom_server\init\build.sqf"; +diag_log format["[blckeagls] Loading Server Mission System"]; + +// compile functions +call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_functions.sqf"; +diag_log format["[blckeagls] functions compiled"]; + +call compile preprocessfilelinenumbers "\q\addons\custom_server\Configs\blck_configs.sqf"; +waitUntil{(!isNil "blck_useHC") && (!isNil "blck_simulationManager") && (!isNil "blck_debugOn")}; +diag_log format["[blckeagls] blck_useHC = %1 | blck_simulationManager = %2 ",blck_useHC,blck_simulationManager]; +diag_log format["[blckeagls] debug mode settings:blck_debugON = %1 blck_debugLevel = %2",blck_debugON,blck_debugLevel]; + +// Load any user-defined specifications or overrides +call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf"; +//diag_log format["[blckeagls] configurations loaded at %1",diag_tickTime]; + +call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf"; + +uiSleep 15; + +if (blck_simulationManager == 2) then +{ + "Group" setDynamicSimulationDistance 1800; + enableDynamicSimulationSystem true; +}; + +// spawn map addons to give the server time to position them before spawning in crates etc. +if (blck_spawnMapAddons) then +{ + call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf"; +}else{ + diag_log "[blckeagls] Map Addons disabled"; +}; + + +// find and set Mapcenter and size +diag_log "[blckeagls] Loading Map-specific information"; +call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\init\GMS_fnc_findWorld.sqf"; + +// set up the lists of available missions for each mission category +//diag_log "[blckeagls] Loading Mission Lists"; +#include "\q\addons\custom_server\Missions\GMS_missionLists.sqf"; +diag_log "[blckeagls] Mission Lists Loaded Successfully"; + +call compile preprocessfilelinenumbers "\q\addons\custom_server\Missions\Static\GMS_StaticMissions_init.sqf"; +call compile preprocessfilelinenumbers "q\addons\custom_server\Missions\UMS\GMS_UMS_init.sqf"; // loads functions and spawns any static missions. +diag_log "[blckeagls] blck_init_server: ->> Static and UMS systems initialized."; + +switch (blck_simulationManager) do +{ + case 2: {diag_log "[blckeagls] dynamic simulation manager enabled"}; + case 1: {diag_log "[blckeagls] blckeagls simulation manager enabled"}; + case 0: {diag_log "[blckeagls] simulation management disabled"}; +}; + +diag_log format["[blckeagls] version %1 Build %2 Loaded in %3 seconds",blck_versionNumber,blck_buildNumber,diag_tickTime - _blck_loadingStartTime]; //,blck_modType]; +diag_log format["[blckeagls] waiting for players to join ---- >>>>"]; + +if ( !(blck_debugON) && (blck_debugLevel isEqualTo 0)) then +{ + waitUntil{{isPlayer _x}count allPlayers > 0}; + diag_log "[blckeagls] Player Connected, spawning missions"; +} else { + diag_log "[blckeagls] Debug mode ON, proceding without players"; +}; + +if (blck_spawnStaticLootCrates) then +{ + call compile preprocessfilelinenumbers "\q\addons\custom_server\SLS\SLS_init.sqf"; + diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner Done"; +}else{ + diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner disabled"; +}; + +if (blck_blacklistTraderCities) then +{ + call compile preprocessfilelinenumbers "\q\addons\custom_server\init\GMS_fnc_getTraderCites.sqf"; +}; + +if (blck_ai_offload_to_client) then +{ + publicVariable "blck_fnc_setNextWaypoint"; + //publicVariable "blck_fnc_changeToMoveWaypoint"; + //publicVariable "blck_fnc_changeToSADWaypoint"; + publicVariable "blck_EH_unitWeaponReloaded"; +}; + +//Start the mission timers +if (blck_enableOrangeMissions > 0) then +{ + //[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange] spawn blck_fnc_missionTimer;//Starts major mission system (Orange Map Markers) + [_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange,blck_enableOrangeMissions] call blck_fnc_addMissionToQue; +}; +if (blck_enableGreenMissions > 0) then +{ + //[_missionListGreen,_pathGreen,"GreenMarker","green",blck_TMin_Green,blck_TMax_Green] spawn blck_fnc_missionTimer;//Starts major mission system 2 (Green Map Markers) + [_missionListGreen,_pathGreen,"GreenMarker","green",blck_TMin_Green,blck_TMax_Green,blck_enableGreenMissions] call blck_fnc_addMissionToQue; +}; +if (blck_enableRedMissions > 0) then +{ + //[_missionListRed,_pathRed,"RedMarker","red",blck_TMin_Red,blck_TMax_Red] spawn blck_fnc_missionTimer;//Starts minor mission system (Red Map Markers)//Starts minor mission system 2 (Red Map Markers) + [_missionListRed,_pathRed,"RedMarker","red",blck_TMin_Red,blck_TMax_Red,blck_enableRedMissions] call blck_fnc_addMissionToQue; +}; +if (blck_enableBlueMissions > 0) then +{ + //[_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue] spawn blck_fnc_missionTimer;//Starts minor mission system (Blue Map Markers) + [_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue,blck_enableBlueMissions] call blck_fnc_addMissionToQue; +}; + +// start the main thread for the mission system which monitors missions running and stuff to be cleaned up +[] spawn blck_fnc_mainThread; +blck_pvs_version = blck_versionNumber; +publicVariable "blck_pvs_version"; +diag_log "[blckeagls] < MISSION SYSTEM FULLY INITIALIZED AND RUNNING >"; diff --git a/Server/@GMS/addons/custom_server/init/build.sqf b/Server/@GMS/addons/custom_server/init/build.sqf new file mode 100644 index 0000000..ba5ae3e --- /dev/null +++ b/Server/@GMS/addons/custom_server/init/build.sqf @@ -0,0 +1,4 @@ + +#define blck_buildNumber 182 +#define blck_versionNumber 6.92 +#define blck_buildDate "9-13-19" diff --git a/Server/@GMS/addons/custom_server/init/fn_init.sqf b/Server/@GMS/addons/custom_server/init/fn_init.sqf new file mode 100644 index 0000000..41755c5 --- /dev/null +++ b/Server/@GMS/addons/custom_server/init/fn_init.sqf @@ -0,0 +1,33 @@ +/* + by Ghostrider [GRG] + Last Modified 3/14/17 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ + +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +/////////////////////////////////////////////// +// prevent the system from being started twice +////////////////////////////////////////////// +if !(isNil "blck_missionSystemRunning") exitWith {}; +blck_missionSystemRunning = true; + +///////////////////////////////////////////// +// Run the initialization routinge +//////////////////////////////////////////// + +if (isServer) then +{ + [] execVM "\q\addons\custom_server\init\blck_init_server.sqf"; +}; +if (!isServer && !hasInterface) then +{ + diag_log format["Loading blackeagls for headless clients"]; + [] execVM "\q\addons\custom_server\init\blck_init_HC.sqf"; +}; + diff --git a/Server/@GMS/addons/custom_server/init/testCrateLoading.sqf b/Server/@GMS/addons/custom_server/init/testCrateLoading.sqf new file mode 100644 index 0000000..df3e845 --- /dev/null +++ b/Server/@GMS/addons/custom_server/init/testCrateLoading.sqf @@ -0,0 +1,18 @@ + +uiSleep 5; +diag_log format["<< ---- START TEST Crate Loading ---- >>"]; +_coords = [12000,12000,0]; +//_loot = blck_supportLoot; //[causes problems] blck_highPoweredLoot; // [causes problems] blck_contructionLoot ; //blck_BoxLoot_Orange; +_loot = blck_supportLoot; +_lootCounts = [100,100,100,100,100,100]; +_aiDifficultyLevel = "Orange"; +for "_i" from 1 to 100 do +{ + diag_log format["testCrateLoading: pass %1",_i]; + _crateType = selectRandom blck_crateTypes; + _crate = [_coords,_crateType] call blck_fnc_spawnCrate; + [_crate,_loot,_lootCounts] call blck_fnc_fillBoxes; + uiSleep 5; + diag_log format["testCrateLoading: crate inventory = %1",getItemCargo _crate]; +}; + diff --git a/Server/mpmissions/epoch.Bornholm/debug/blckClient.sqf b/Server/mpmissions/epoch.Bornholm/debug/blckClient.sqf new file mode 100644 index 0000000..23aa30f --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/debug/blckClient.sqf @@ -0,0 +1,347 @@ + #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 = { + if (hasInterface) then + { + private _hostage = _this; + _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 = { + if (hasInterface) then + { + private _leader = _this; + _leader call GMS_fnc_addLeaderActions; + _leader call GMS_fnc_addAssetAnimations; + diag_log format["_fnc_initLeader: Leader %1 initialized",_leader]; + }; + }; + +if !(isServer) then +{ + //diag_log "[blckeagls] initializing client variables"; + blck_MarkerPeristTime = 300; + blck_useHint = false; + blck_useSystemChat = true; + blck_useTitleText = false; + blck_useDynamic = true; + blck_useToast = false; // Exile only + blck_aiKilluseSystemChat = true; + blck_aiKilluseDynamic = false; + blck_aiKilluseTitleText = false; + blck_processingMsg = -1; + blck_processingKill = -1; + blck_message = ""; + + fn_killScoreNotification = { + params["_bonus","_distanceBonus","_killStreak"]; + //diag_log format["fn_killScoreNotification:: -- >> _bonus = %1 | _distanceBonus = %2 | _killStreak = %3",_bonus,_distanceBonus,_killStreak]; + _msg2 = format["AI Killed
"]; + if (typeName _bonus isEqualTo "SCALAR") then // add message for the bonus + { + if (_bonus > 0) then + { + _msg2 = _msg2 + format["Bonus +%1
",_bonus]; + }; + }; + if (typeName _distanceBonus isEqualTo "SCALAR") then // Add message for distance bonus + { + if (_distanceBonus > 0) then + { + _msg2 = _msg2 + format["Dist Bonus +%1
",_distanceBonus]; + }; + }; + if (typeName _killStreak isEqualTo "SCALAR") then + { + if (_killStreak > 0) then + { + _msg2 = _msg2 + format["Killstreak %1X
",_killStreak]; + }; + }; + [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"]; + + 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; + }; + + //diag_log "[blckeagls] initializing client functions"; + fn_missionNotification = { + 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_dynamicNotification; + }; + 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_AI_KilledNotification = { + private["_message","_text","_screentime","_xcoord","_ycoord"]; + _message = _this select 0; + //diag_log format["_fn_AI_KilledNotification ====] Paremeters _event %1 _message %2 _mission %3",_message]; + if (blck_aiKilluseSystemChat) then {systemChat format["%1",_message];}; + if (blck_aiKilluseTitleText) then {titleText [_message, "PLAIN DOWN",5];uiSleep 5; titleText ["", "PLAIN DOWN",5]}; + if (blck_aiKilluseDynamic) then { + //diag_log format["blckClient.sqf:: dynamic messaging called for mission %2 with message of %1",_message]; + waitUntil{blck_processingKill < 0}; + blck_processingKill = 1; + _text = format["%1",_message]; + _xcoord = [safezoneX,0.8]; + _ycoord = [safezoneY + safezoneH - 0.5,0.2]; + _screentime = 5; + [" "+ _text,_xcoord,_ycoord,_screentime] spawn BIS_fnc_dynamicText; + uiSleep 3; + blck_processingKill = -1; + }; + }; + + fn_handleMessage = { + if !(hasInterface) exitWith {}; + //private["_event","_msg","_mission"]; + diag_log format["fn_handleMessage ====] Paremeters = _this = %1",_this]; + params["_event","_message",["_mission",""]]; + + //diag_log format["blck_Message ====] Paremeters _event %1 _message %2 paramter #3 %3",_event,_message,_mission]; + //diag_log format["blck_Message ====] _message isEqualTo %1",_message]; + + switch (_event) do + { + case "start": + { + playSound "UAV_05"; + //diag_log "switch start"; + //_mission = _this select 1 select 2; + [_event,_message,_mission] spawn fn_missionNotification; + }; + case "end": + { + playSound "UAV_03"; + //diag_log "switch end"; + //_mission = _this select 1 select 2; + [_event,_message,_mission] spawn fn_missionNotification; + }; + case "aikilled": + { + //diag_log "switch aikilled"; + [_message] spawn fn_AI_KilledNotification; + }; + case "DLS": + { + if ( (player distance _mission) < 1000) then {playsound "AddItemOK"; hint _message;systemChat _message}; + }; + case "reinforcements": + { + if ( (player distance _mission) < 1000) then {playsound "AddItemOK"; ["Alert",_message] call fn_dynamicNotification;}; + //diag_log "---->>>> Reinforcements Spotted"; + }; + case "IED": + { + [1] call BIS_fnc_Earthquake; + //["IED","Bandits targeted your vehicle with an IED"] call fn_dynamicNotification; + ["Bandits targeted your vehicle with an IED.", 5] call Epoch_message; + for "_i" from 1 to 3 do {playSound "BattlefieldExplosions3_3D";uiSleep 0.3;}; + }; + case "showScore": + { + [_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 9/11/19 for blckeagls Version 6.94"; + +}; \ No newline at end of file diff --git a/Server/mpmissions/epoch.Bornholm/init.sqf b/Server/mpmissions/epoch.Bornholm/init.sqf index 6637fee..bf59b6a 100644 --- a/Server/mpmissions/epoch.Bornholm/init.sqf +++ b/Server/mpmissions/epoch.Bornholm/init.sqf @@ -1,6 +1,6 @@ - +execVM "debug\blckClient.sqf"; #include "A3EAI_Client\A3EAI_initclient.sqf"; if hasInterface then diff --git a/Server/restartserver_x64.bat b/Server/restartserver_x64.bat index 05f1544..580637a 100644 --- a/Server/restartserver_x64.bat +++ b/Server/restartserver_x64.bat @@ -18,7 +18,7 @@ timeout 2 :: RESTARTING THE ARMA 3 SERVER BE SURE TO EDIT THIS TO YOUR SERVER .EXE LOCATION -NOTE ALSO THIS IS WHERE YOU DEFINE WHERE YOU CONFIG.CFG IS echo Starting ARMA 3 Server... -C:\Windows\System32\cmd.exe /C start "arma3" "F:\GameServers\Arma3\arma3epoch\Epochserver_x64.exe" "-mod=@Epoch;@bornholm;@CBA_A3;@CUP Units;@CUP Vehicles;@CUP Weapons;" "-serverMod=@EpochHive;@A3EAI;" -config=F:\GameServers\Arma3\arma3epoch\sc\server.cfg -port=2302 -profiles=sc -cfg=F:\GameServers\Arma3\arma3epoch\sc\basic.cfg -name=sc -autoINIT -Loadmissiontomemory +C:\Windows\System32\cmd.exe /C start "arma3" "F:\GameServers\Arma3\arma3epoch\Epochserver_x64.exe" "-mod=@Epoch;@bornholm;@CBA_A3;@CUP Units;@CUP Vehicles;@CUP Weapons;" "-serverMod=@EpochHive;@A3EAI;@GMS" -config=F:\GameServers\Arma3\arma3epoch\sc\server.cfg -port=2302 -profiles=sc -cfg=F:\GameServers\Arma3\arma3epoch\sc\basic.cfg -name=sc -autoINIT -Loadmissiontomemory echo ARMA 3 Server has started timeout 60