From de1c065f5e49b4633370e1dc194ecc9289c7b2bf Mon Sep 17 00:00:00 2001 From: Chris Cardozo Date: Sun, 14 Oct 2018 13:21:56 -0400 Subject: [PATCH 1/3] Build 153 --- .../Compiles/Functions/GMS_fnc_AIM.sqf | 2 +- .../GMS_fnc_emptyObjectInventory.sqf | 9 + .../Compiles/Functions/GMS_fnc_mainThread.sqf | 2 + .../Functions/GMS_fnc_nearestPlayers.sqf | 10 + .../Functions/GMS_fnc_spawnMarker.sqf | 35 +- .../GMS_fnc_spawnMissionEmplacedRelative.sqf | 23 + .../GMS_fnc_spawnMissionLandscapeRelative.sqf | 12 + .../GMS_fnc_spawnMissionLootBoxesRelative.sqf | 17 + .../Functions/GMS_fnc_spawnSingleObject.sqf | 10 + .../Groups/GMS_fnc_create_AI_Group.sqf | 4 +- .../Compiles/Groups/GMS_fnc_spawnGroup.sqf | 2 +- .../Compiles/Missions/GMS_fnc_fillBoxes.sqf | 220 ++++---- .../GMS_fnc_garrisonBuilding_ATLsystem.sqf | 60 +++ .../GMS_fnc_garrisonBuilding_relPosSystem.sqf | 51 ++ .../Missions/GMS_fnc_missionSpawner.sqf | 72 ++- .../Missions/GMS_fnc_spawnBaseObjects.sqf | 19 +- .../Compiles/Missions/GMS_fnc_spawnCrate.sqf | 7 +- .../GMS_fnc_spawnEmplacedWeaponArray.sqf | 2 +- ...MS_fnc_spawnGarrisonInsideBuilding_ATL.sqf | 46 ++ ...fnc_spawnGarrisonInsideBuilding_relPos.sqf | 57 ++ .../Missions/GMS_fnc_spawnMissionCrates.sqf | 3 +- .../GMS_fnc_spawnMissionLootVehicles.sqf | 5 +- .../GMS_fnc_spawnMissionVehiclePatrols.sqf | 2 +- .../Missions/GMS_fnc_spawnPendingMissions.sqf | 6 +- .../Missions/GMS_fnc_updateMissionQue.sqf | 10 +- .../Units/GMS_EH_unitWeaponReloaded.sqf | 2 +- .../Compiles/Units/GMS_fnc_spawnUnit.sqf | 9 +- .../GMS_fnc_searchForNearbyPlayers.sqf | 19 + .../Vehicles/GMS_fnc_spawnMissionHeli.sqf | 2 +- .../Vehicles/GMS_fnc_spawnVehiclePatrol.sqf | 2 +- .../GMS_fnc_vehiclePlayerSensingLogic.sqf | 12 + .../custom_server/Compiles/blck_functions.sqf | 12 +- .../Static/Code/GMS_fnc_sm_AddAircraft.sqf | 17 + .../Static/Code/GMS_fnc_sm_AddEmplaced.sqf | 16 + .../Static/Code/GMS_fnc_sm_AddGroup.sqf | 16 + .../Static/Code/GMS_fnc_sm_AddVehicle.sqf | 16 + .../Static/Code/GMS_fnc_sm_init_functions.sqf | 10 +- .../Code/GMS_fnc_sm_initializeMission.sqf | 33 ++ .../Code/GMS_fnc_sm_monitorAircraft.sqf | 2 +- .../Code/GMS_fnc_sm_monitorEmplaced.sqf | 2 +- .../Code/GMS_fnc_sm_monitorGarrisonsASL.sqf | 92 ++++ .../GMS_fnc_sm_monitorGarrisons_relPos.sqf | 89 ++++ .../Code/GMS_fnc_sm_monitorInfantry.sqf | 2 +- .../Static/Code/GMS_fnc_sm_monitorScuba.sqf | 3 +- .../Static/Code/GMS_fnc_sm_monitorShips.sqf | 3 +- .../Code/GMS_fnc_sm_monitorStaticPatrols.sqf | 2 + .../Code/GMS_fnc_sm_monitorStaticUnits.sqf | 236 +++++++++ .../Static/Code/GMS_fnc_sm_monitorSubs.sqf | 3 +- .../Code/GMS_fnc_sm_monitorVehicles.sqf | 2 +- .../GMS_fnc_sm_spawnBuildingGarrisonASL.sqf | 8 + ...MS_fnc_sm_spawnBuildingGarrison_relPos.sqf | 8 + .../Static/Code/GMS_fnc_sm_spawnEmplaced.sqf | 2 +- .../Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf | 2 +- .../Code/GMS_fnc_sm_spawnLootContainers.sqf | 7 +- .../GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf | 25 + .../Static/Code/GMS_fnc_sm_spawnObjects.sqf | 5 +- .../Code/GMS_fnc_sm_spawnVehiclePatrols.sqf | 4 +- .../Static/GMS_StaticMissions_Lists.sqf | 5 +- .../Static/GMS_StaticMissions_init.sqf | 1 + .../Missions/Static/missions/destroyer.sqf | 333 ++++++++++++ .../Missions/Static/missions/garrison.sqf | 126 +++++ .../Missions/Static/missions/pinkPoison2.sqf | 129 +++++ .../Missions/Static/missions/privateVars.sqf | 11 + .../missions/staticMissionExample2_Epoch.sqf | 31 +- .../missions/staticMissionExample2_Exile.sqf | 7 +- .../Missions/Static/missions/template.sqf | 174 ++++++ .../GMS_fnc_sm_initializeUMSStaticMission.sqf | 11 + .../Missions/UMS/dynamicMissions/default.sqf | 2 +- .../UMS/staticMissions/privateVars.sqf | 13 + .../staticMissionExample2_Epoch.sqf | 7 +- .../staticMissionExample2_Exile.sqf | 7 +- .../custom_server/Missions/privateVars.sqf | 3 +- .../Missions/pullDynamicMission.sqf | 495 ++++++++++++++++++ MPMissions/Exile.Altis/debug/blckClient.sqf | 14 +- MPMissions/epoch.Altis/debug/blckClient.sqf | 14 +- Tools/Directions.txt | 58 -- .../Dynamic Missions-How To.txt | 47 ++ .../pullDynamicMission.VR/blck_defines.hpp | 38 ++ .../pullDynamicMission.VR/directions.txt | 61 +++ .../pullDynamicMission.VR/init.sqf | 3 + .../pullDynamicMission.VR/mission.sqm | Bin 0 -> 13679 bytes .../pullDynamicMission.sqf | 495 ++++++++++++++++++ .../pullDynamicMission.VR/pullMarkerInfo.sqf | 61 +++ .../pullDynamicMission.VR/template.sqf | 81 +++ .../Static Missions/StaticMissions-HowTo.txt | 38 ++ .../blck_defines.hpp | 38 ++ .../directions.txt | 60 +++ .../pullStaticMissionInfo.Altis/init.sqf | 3 + .../pullStaticMissionInfo.Altis/mission.sqm | Bin 0 -> 16486 bytes .../pullMarkerInfo.sqf | 60 +++ .../pullStaticMission.sqf | 414 +++++++++++++++ .../pullStaticMissionInfo.Altis/template.sqf | 97 ++++ Tools/centerAtPlayerPos.sqf | 3 - Tools/clearCenter.sqf | 3 - Tools/configurForStaticMission.sqf | 197 ------- Tools/dynaicMissionTemplate.sqf | 154 ------ Tools/init.sqf | 26 - Tools/pullAllRelativeUnclassified.sqf | 15 - Tools/pullRelativeclassified.sqf | 161 ------ Tools/setCenterAtNearestRoadCone.sqf | 3 - Tools/staticMissionTemplate.sqf | 128 ----- 101 files changed, 3985 insertions(+), 991 deletions(-) create mode 100644 @GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObjectInventory.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionEmplacedRelative.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionLandscapeRelative.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionLootBoxesRelative.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnSingleObject.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisonsASL.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisons_relPos.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/missions/destroyer.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/missions/garrison.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/missions/pinkPoison2.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/missions/privateVars.sqf create mode 100644 @GMS/addons/custom_server/Missions/Static/missions/template.sqf create mode 100644 @GMS/addons/custom_server/Missions/UMS/staticMissions/privateVars.sqf create mode 100644 @GMS/addons/custom_server/Missions/pullDynamicMission.sqf delete mode 100644 Tools/Directions.txt create mode 100644 Tools/Dynamic Missions/Dynamic Missions-How To.txt create mode 100644 Tools/Dynamic Missions/pullDynamicMission.VR/blck_defines.hpp create mode 100644 Tools/Dynamic Missions/pullDynamicMission.VR/directions.txt create mode 100644 Tools/Dynamic Missions/pullDynamicMission.VR/init.sqf create mode 100644 Tools/Dynamic Missions/pullDynamicMission.VR/mission.sqm create mode 100644 Tools/Dynamic Missions/pullDynamicMission.VR/pullDynamicMission.sqf create mode 100644 Tools/Dynamic Missions/pullDynamicMission.VR/pullMarkerInfo.sqf create mode 100644 Tools/Dynamic Missions/pullDynamicMission.VR/template.sqf create mode 100644 Tools/Static Missions/StaticMissions-HowTo.txt create mode 100644 Tools/Static Missions/pullStaticMissionInfo.Altis/blck_defines.hpp create mode 100644 Tools/Static Missions/pullStaticMissionInfo.Altis/directions.txt create mode 100644 Tools/Static Missions/pullStaticMissionInfo.Altis/init.sqf create mode 100644 Tools/Static Missions/pullStaticMissionInfo.Altis/mission.sqm create mode 100644 Tools/Static Missions/pullStaticMissionInfo.Altis/pullMarkerInfo.sqf create mode 100644 Tools/Static Missions/pullStaticMissionInfo.Altis/pullStaticMission.sqf create mode 100644 Tools/Static Missions/pullStaticMissionInfo.Altis/template.sqf delete mode 100644 Tools/centerAtPlayerPos.sqf delete mode 100644 Tools/clearCenter.sqf delete mode 100644 Tools/configurForStaticMission.sqf delete mode 100644 Tools/dynaicMissionTemplate.sqf delete mode 100644 Tools/init.sqf delete mode 100644 Tools/pullAllRelativeUnclassified.sqf delete mode 100644 Tools/pullRelativeclassified.sqf delete mode 100644 Tools/setCenterAtNearestRoadCone.sqf delete mode 100644 Tools/staticMissionTemplate.sqf diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf index 7a639d2..26822e2 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf @@ -9,7 +9,7 @@ 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];}; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObjectInventory.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObjectInventory.sqf new file mode 100644 index 0000000..8e911cd --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObjectInventory.sqf @@ -0,0 +1,9 @@ + + + + // replaces blck_fnc_emptyObject + params["_object"]; + clearWeaponCargoGlobal _object; + clearMagazineCargoGlobal _object; + clearBackpackCargoGlobal _object; + clearItemCargoGlobal _object; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf index 2f48c13..5bd9a25 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -41,6 +41,7 @@ while {true} do _timer5sec = diag_tickTime + 5; [] call blck_fnc_missionGroupMonitor; [] call blck_fnc_sm_missionPatrolMonitor; + //[] call blck_fnc_vehiclePatrolPlayerSensor; //diag_log format["[blckeagls] _fnc_mainThread 5 Second Timer Handled | Timstamp %1",diag_tickTime]; }; if (diag_tickTime > _timer20sec) then @@ -48,6 +49,7 @@ while {true} do [] call blck_fnc_cleanupAliveAI; [] call blck_fnc_cleanupObjects; [] call blck_fnc_cleanupDeadAI; + //[] call blck_fnc_cleanEmptyGroups; _timer20sec = diag_tickTime + 20; //diag_log format["[blckeagls] _fnc_mainThread 20 Second Timer Handled | Timstamp %1",diag_tickTime]; }; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf new file mode 100644 index 0000000..a4bc55e --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf @@ -0,0 +1,10 @@ + + +params["_coords","range"]; +private["_return","_playerClassNames","_epochClasses","_exileClasses"]; +_epochClasses = ["Epoch_Female_F","Epoch_Male_F"]; +_exileClasses = ["Exile_Unit_Player"]; +if (blck_modType isEqualTo "Epoch") then {_playerClassNames = _epochClasses}; +if (blck_modType isEqualTo "Exile") then {_playerClassNames = _exileClasses}; +_return = nearestObjects[_coords,_playerClassNames,_range]; +_return \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf index cd3fc03..0bc98cc 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf @@ -13,12 +13,11 @@ private["_blck_fn_configureRoundMarker"]; _blck_fn_configureRoundMarker = { + //diag_log format["_blck_fn_configureRoundMarker: _this = %1",_this]; + // [[""OrangeMarker1"",[11736.1,9272.76,0],""Soylent Green"",""center"",""ColorPink"",[""ellipse"",[250,250],""Cross""]]]" private["_name","_pos","_color","_size","_MainMarker","_arrowMarker","_labelMarker","_labelType"]; - //diag_log format["_blck_fn_configureRoundMarker: -: _this = %1", _this]; - params["_name","_pos","_color","_text","_size","_labelType"]; - - //diag_log format["_blck_fn_configureRoundMarker: _pos = %1, _color = %2, _size = %3, _name = %4, label %5",_pos, _color, _size, _name, _text]; - // Do not show the marker if it is in the left upper corner + // [_missionType,_markerPos,_markerColor,_markerLabel, _mSize,_markerLabelType,_mShape,_mBrush] + params["_name","_pos","_color","_text","_size","_labelType","_mShape","_mBrush"]; if ((_pos distance [0,0,0]) < 10) exitWith {}; _MainMarker = createMarker [_name, _pos]; @@ -60,9 +59,8 @@ _blck_fn_configureRoundMarker = { _blck_fn_configureIconMarker = { private["_MainMarker"]; + //diag_log format["_blck_fn_configureIconMarker: _this = %1",_this]; params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]]; - //diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text]; - _name = "label" + _name; _MainMarker = createMarker [_name, _pos]; _MainMarker setMarkerShape "Icon"; @@ -73,25 +71,20 @@ _blck_fn_configureIconMarker = { }; //diag_log format["spawnMarker:: -- >> _this = %1",_this]; -// _this = [[""BlueMarker"",[12524.1,18204.7,0],""Bandit Patrol"",""center"",""ColorBlue"",[""ELIPSE"",[175,175]]],""ColorBlue"",""BlueMarker""]" params["_mArray"]; private["_marker"]; -_mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"]; -_markerType params["_mShape","_mSize","_mBrush"]; -//diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType]; +_mArray params["_missionMarkerName","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerTypeInfo"]; +// add defaults to provide backward compatibility for older missions that do not specify a brush. +_markerTypeInfo params["_mShape",["_mSize",[0,0]],["_mBrush","GRID"]]; +//diag_log format["spawnMarker.sqf:: -- >> _missionMarkerName %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerTypeInfo %6 | _mShape %7",_missionMarkerName,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerTypeInfo,_mShape]; -if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon .... +if (toUpper(_mShape) in ["ELIPSE","ELLIPSE","RECTANGLE"]) then // not an Icon .... { - switch (_missionType) do { - // params["_missionType","_pos","_text","_labelType","_color","_type","_size","_brush"]; - // Type Size Brush - default {_marker = [_missionType,_markerPos,_markerColor,_markerLabel, _mSize,_markerLabelType,_mShape,_mBrush] call _blck_fn_configureRoundMarker;}; - }; + _marker = [_missionMarkerName,_markerPos,_markerColor,_markerLabel, _mSize,_markerLabelType,_mShape,_mBrush] call _blck_fn_configureRoundMarker; }; -if !((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then -{ // Deal with case of an icon - // params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]]; - _marker = [_missionType,_markerPos, _markerColor,_markerLabel,_markerType select 0] call _blck_fn_configureIconMarker; +if !(toUpper(_mShape) in ["ELIPSE","ELLIPSE","RECTANGLE"]) then +{ + _marker = [_missionMarkerName,_markerPos, _markerColor,_markerLabel,_mShape] call _blck_fn_configureIconMarker; }; //diag_log format["spawnMarker complete script with _marker = %1",_marker]; if (isNil "_marker") then {_marker = ""}; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionEmplacedRelative.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionEmplacedRelative.sqf new file mode 100644 index 0000000..009e76b --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionEmplacedRelative.sqf @@ -0,0 +1,23 @@ + + + params["_center","_emplaced","_garrisonGroup"]; + private["_obj","_objects"]; + _group = call blck_fnc_create_AI_Group; + _objects = []; + { + _x params["_objClassName","_objRelPos","_objDir"]; + _obj = [_objClassName, [0,0,0],0] call blck_fnc_spawnSingleObject; + _objects pushBack _obj; + _obj setPosATL (_objRelPos vectorAdd _center); + _obj setDir _objDir; + _unit = [_group] call blck_fnc_spawnUnit; + _unit moveInGunner _unit; + _wep addMPEventHandler["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}]; + //_empGroup setVariable["groupVehicle",_wep]; + //_wep setVariable["vehicleGroup",_empGroup]; + _wep setVariable["GRG_vehType","emplaced"]; + [_wep,false] call blck_fnc_configureMissionVehicle; + }forEach _emplaced; + blck_monitoredVehicles append _emplacedWeps; + _return = [_emplacedWeps,_group,_abort]; + _return \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionLandscapeRelative.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionLandscapeRelative.sqf new file mode 100644 index 0000000..93fafbc --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionLandscapeRelative.sqf @@ -0,0 +1,12 @@ + + + params["_center","_landscape"]; + // diag_log format["fnc_spawnMissionLandscapeRelative: _center = %1",_center]; + private["_obj","_objects"]; + _objects = []; + { + _x params["_objClassName","_objRelPos","_objDir"]; + _obj = [_objClassName, _objRelPos vectorAdd _center, _objDir,enableSimulationForObject,enableDamageForObject,enableRopesforObject,"CAN_COLLIDE"] call blck_fnc_spawnSingleObject; + _objects pushBack _obj; + }forEach _landscape; + _landscape \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionLootBoxesRelative.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionLootBoxesRelative.sqf new file mode 100644 index 0000000..7ce5abe --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMissionLootBoxesRelative.sqf @@ -0,0 +1,17 @@ + + + params["_center","_crates"]; + private["_crate","_cratesSpawned"]; + + _cratesSpawned = []; + { + _x params["_objClassName","_objRelPos","_crateLoot","_lootCounts","_objDir"]; + _crate = [_objClassName, _objRelPos vectorAdd _center, _objDir] call blck_fnc_spawn_lootCrate; + //_crate setPosATL _objRelPos vectorAdd _center; + _cratesSpawned pushBack _crate; + //_crate setVariable ["LAST_CHECK", 100000]; + _crate allowDamage false; + _crate enableRopeAttach false; + _crate + }forEach _crates; + _cratesSpawned \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnSingleObject.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnSingleObject.sqf new file mode 100644 index 0000000..1099947 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnSingleObject.sqf @@ -0,0 +1,10 @@ + + + params["_objClassName","_objPosn",["_objDir",0],["_enableSimulation",true],["_enableDamage",true],["_enableRopes",true],["_mode","NONE"]]; + //diag_log format["_fnc_spawnSingleObject: _objClassName = %1 | _objPosn = %2 | _objPosn = %3",_objClassName,_objPosn,_objDir]; + private _obj = createVehicle[_objClassName,_objPosn,[],0,_mode]; + _obj setDir _objDir; + _obj allowDamage _enableDamage; + _obj enableDynamicSimulation _enableSimulation; + //diag_log format["created object %1 at %2 heading %3",_obj,getPosATL _obj, getDir _obj]; + _obj \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf index 64b3d83..ceeb554 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf @@ -15,7 +15,7 @@ private["_groupSpawned"]; _groupSpawned = createGroup [blck_AI_Side, true]; -_groupSpawned setVariable["groupVehicle",objNull]; +//_groupSpawned setVariable["groupVehicle",objNull]; #ifdef useDynamicSimulation _groupSpawned enableDynamicSimulation true; #endif @@ -27,7 +27,7 @@ _groupSpawned setFormation blck_groupFormation; _groupSpawned setVariable ["blck_group",true,true]; #ifdef blck_debugMode -diag_log format["_fnc_create_AI_Group: _groupSpawned = %1",_groupSpawned]; +if (blck_debugLevel >= 2) then {diag_log format["_fnc_create_AI_Group: _groupSpawned = %1",_groupSpawned]}; #endif _groupSpawned \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf index a2447ce..f98f1ff 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_spawnGroup.sqf @@ -40,7 +40,7 @@ if (_numai2 > _numai1) then }; #ifdef blck_debugMode -if (blck_debugLevel >= 1) then +if (blck_debugLevel >= 2) then { diag_log format["spawnGroup.sqf: _numbertospawn = %1",_numbertospawn]; }; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf index 7b7e2ed..a68aa50 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf @@ -22,15 +22,18 @@ }foreach _this; #endif _itemCnts params["_wepCnt","_magCnt","_opticsCnt","_materialsCnt","_itemCnt","_bkcPckCnt"]; - _tries = [_wepCnt] call blck_fnc_getNumberFromRange; - //diag_log format["_fnc_fillBoxes (26): loading %1 weapons",_wepCnt]; - if (_tries > 0) then + _boxLoot params["_weapons","_magazines","_optics","_materials","_items","_backpacks"]; + + //diag_log format["_fnc_fillBoxes: _weapons = %1",_weapons]; + if !(_weapons isEqualTo []) then { - _a1 = _boxLoot select 0; // choose the subarray of weapons and corresponding magazines + _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 1 to _tries do { - _item = selectRandom _a1; - //diag_log format["_fnc_fillBoxes: _item = %1",_item]; + 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 @@ -48,104 +51,115 @@ }; }; }; - _tries = [_magCnt] call blck_fnc_getNumberFromRange; - //diag_log format["_fnc_fillBoxes (26): loading %1 magazines",_magCnt]; - if (_tries > 0) then - { - // Add Magazines, grenades, and 40mm GL shells - _a1 = _boxLoot select 1; - for "_i" from 1 to _tries do { - _item = selectRandom _a1; - //diag_log format["_fnc_fillBoxes: _item = %1",_item]; - if (typeName _item isEqualTo "ARRAY") then - { - _diff = (_item select 2) - (_item select 1); // Take difference between max and min number of items to load and randomize based on this value - _crate addMagazineCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; - }; - if (typeName _item isEqualTo "STRING") then - { - _crate addMagazineCargoGlobal [_item, 1]; - }; - }; - }; - _tries = [_opticsCnt] call blck_fnc_getNumberFromRange; - //diag_log format["_fnc_fillBoxes (72): loading %1 weapons",_wepCnt]; - if (_tries > 0) then + + //diag_log format["_fnc_fillBoxes: _magazines = %1",_magazines]; + if !(_magazines isEqualTo []) then { - // Add Optics - _a1 = _boxLoot select 2; - for "_i" from 1 to _tries do { - _item = selectRandom _a1; - //diag_log format["_fnc_fillBoxes: _item = %1",_item]; - if (typeName _item isEqualTo "ARRAY") then - { - _diff = (_item select 2) - (_item select 1); - _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; - }; - if (typeName _item isEqualTo "STRING") then - { - _crate addItemCargoGlobal [_item,1]; - }; - }; - }; - _tries = [_materialsCnt] call blck_fnc_getNumberFromRange; - //diag_log format["_fnc_fillBoxes (92): loading %1 materials",_materialsCnt]; - if (_tries > 0) then - { - // Add materials (cindar, mortar, electrical parts etc) - _a1 = _boxLoot select 3; - for "_i" from 1 to _tries do { - _item = selectRandom _a1; - //diag_log format["_fnc_fillBoxes: _item = %1",_item]; - if (typeName _item isEqualTo "ARRAY") then - { - _diff = (_item select 2) - (_item select 1); - _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; - }; - if (typeName _item isEqualTo "STRING") then - { - _crate addItemCargoGlobal [_item, 1]; - }; - }; - }; - _tries = [_itemCnt] call blck_fnc_getNumberFromRange; - //diag_log format["_fnc_fillBoxes (112): loading %1 items",_itemCnt]; - if (_tries > 0) then - { - // Add Items (first aid kits, multitool bits, vehicle repair kits, food and drinks) - _a1 = _boxLoot select 4; - for "_i" from 1 to _tries do { - _item = selectRandom _a1; - //diag_log format["_fnc_fillBoxes: _item = %1",_item]; - if (typeName _item isEqualTo "ARRAY") then - { - _diff = (_item select 2) - (_item select 1); - _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; - }; - if (typeName _item isEqualTo "STRING") then - { - _crate addItemCargoGlobal [_item, 1]; - }; - }; - }; - _tries = [_bkcPckCnt] call blck_fnc_getNumberFromRange; - //diag_log format["_fnc_fillBoxes (132): loading %1 backpacs",_bkcPckCnt]; - if (_tries > 0) then - { - _a1 = _boxLoot select 5; - for "_i" from 1 to _tries do { - _item = selectRandom _a1; - //diag_log format["_fnc_fillBoxes: _item = %1",_item]; - if (typeName _item isEqualTo "ARRAY") then - { - _diff = (_item select 2) - (_item select 1); - _crate addbackpackcargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; - }; - if (typeName _item isEqualTo "STRING") then - { - _crate addbackpackcargoGlobal [_item, 1]; - }; + _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/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf new file mode 100644 index 0000000..5e4c184 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf @@ -0,0 +1,60 @@ +////////////////////////////////////////////////////// +// Attach a marker of type _marker to an object _crate +// by Ghostrider [GRG] based on code from Wicked AI for Arma 2 Dayz Epoch +// Last modified 8/2/15 +///////////////////////////////////////////////////// +/* + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +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 = call blck_fnc_create_AI_Group; +{ + _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; + _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/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf new file mode 100644 index 0000000..a6801e0 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf @@ -0,0 +1,51 @@ +////////////////////////////////////////////////////// +// Attach a marker of type _marker to an object _crate +// by Ghostrider [GRG] based on code from Wicked AI for Arma 2 Dayz Epoch +// Last modified 8/2/15 +///////////////////////////////////////////////////// +/* + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +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 = call blck_fnc_create_AI_Group; +{ + _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/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index 43f1357..2e53b64 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -51,6 +51,9 @@ 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 = []}; _objects = []; _mines = []; @@ -100,9 +103,9 @@ if (blck_debugLevel > 0) then { while {_wait} do { - #ifdef blck_debugMode + //ifdef blck_debugMode if (blck_debugLevel > 2) exitWith {_playerInRange = true;diag_log "_fnc_missionSpawner (168): player trigger loop triggered by scripting";}; - #endif + //endif if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; if ([_missionStartTime,blck_MissionTimeout] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; @@ -124,9 +127,9 @@ if (_missionTimedOut) exitWith [_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 { @@ -173,8 +176,11 @@ if (blck_debugLevel > 0) then uiSleep delayTime;; -_temp = [_coords,_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles; -_crates append _temp; +if (count _missionLootVehicles > 0) then +{ + _temp = [_coords,_missionLootVehicles,_loadCratesTiming] call blck_fnc_spawnMissionLootVehicles; + _crates append _temp; +}; uiSleep delayTime; @@ -254,22 +260,7 @@ uiSleep delayTime; _temp = [[],[],false]; _abort = false; -_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange; -if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then -{ - #define useRelativePos true - _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionVehiclePatrols; - if (typeName _temp isEqualTo "ARRAY") then - { - _abort = _temp select 2; - }; - if !(_abort) then - { - _patrolVehicles = _temp select 0; - _blck_AllMissionAI append (_temp select 1); - }; -}; if (_abort) exitWith { @@ -318,6 +309,29 @@ if (_noChoppers > 0) then }; }; +uisleep 3; +if (count _garrisonedBuilding_ATLsystem > 0) then +{ + _temp = [_coords, _garrisonedBuilding_ATLsystem, _aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_ATLsystem; + diag_log format["_missionspawner: garrisoned a building using ATL format, function returned %1",_temp]; + // _return = [_group,_buildingsSpawned,_staticsSpawned]; + _objects append (_temp select 1); + blck_monitoredVehicles append (_temp select 2); + _blck_AllMissionAI append (units (_temp select 0)); +}; + +uiSleep 3; +diag_log format["_missionSpawner: _garrisonedBuildings_BuildingPosnSystem = %1",_garrisonedBuildings_BuildingPosnSystem]; +if (count _garrisonedBuildings_BuildingPosnSystem > 0) then +{ + // params["_center","_garrison","_aiDifficultyLevel","_uniforms","_headGear","_vests","_backpacks","_weaponList","_sideArms"]; + _temp = [_coords, _garrisonedBuildings_BuildingPosnSystem, _aiDifficultyLevel,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_RelPosSystem; + diag_log format["_missionspawner: garrisoned a building using relPos format, function returned %1",_temp]; + // _return = [_group,_buildingsSpawned,_staticsSpawned]; + _objects append (_temp select 1); + blck_monitoredVehicles append (_temp select 2); + _blck_AllMissionAI append (units (_temp select 0)); +}; ////////////////////////// // Spawn Crates and Emplaced Weapons Last to try to force them to correct positions relative to spawned buildinga or other objects. @@ -347,6 +361,22 @@ if (_abort) exitWith { [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_markerClass, 1] call blck_fnc_endMission; }; +_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange; +if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then +{ + #define useRelativePos true + _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionVehiclePatrols; + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + _blck_AllMissionAI append (_temp select 1); + }; +}; uiSleep delayTime; if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then { diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf index 558beb6..3a022c4 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf @@ -15,7 +15,7 @@ params["_center","_objects"]; if (count _center == 2) then {_center pushBack 0}; -private ["_newObjs","_simDam","_obj","_spawnPos"]; +private ["_newObjs","_sim","_dam","_obj","_spawnPos"]; _newObjs = []; _obj = createVehicle ["RoadCone_L_F", _coords]; // To designate the mission center _obj allowDamage true; @@ -24,20 +24,23 @@ _obj enableSimulationGlobal false; _obj enableDynamicSimulation false; _newObjs pushBack _obj; { - if (count _x == 3) then + if (typeName (_x select 3) isEqualTo "ARRAY") then // assum simulation and damage settings are defined in the old way as [bool,bool] { - _simDam = [false,false]; - } - else + _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, ... { - _simDam = _x select 3; + _sim = _x select 3; + _dam = _x select 4; }; _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 (_simDam select 0); - _obj allowDamage (_simDam select 1); + + _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; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf index 3c7ede6..f458a82 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf @@ -16,15 +16,16 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; private ["_crate"]; -params["_coords",["_crateType","Box_NATO_Wps_F"]]; +params["_coords",["_crateType","Box_NATO_Wps_F"],["_crateDir",0]]; -_crate = createVehicle [_crateType,_coords,[], 2, "NONE"]; +_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; +_crate setPosATL _coords; +_crate setDir _crateDir; //_crate setVectorUp [0,0,1]; _crate setVectorUp surfaceNormal position _crate; // the function to have a lightsource on underwater objects needs work. diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf index 8cb34f7..9aed887 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf @@ -107,7 +107,7 @@ if (blck_debugLevel > 1) then _wep = [(_x select 0),[0,0,0],false,true] call blck_fnc_spawnVehicle; //_wep addEventHandler["HandleDamage",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}]; _wep addMPEventHandler["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}]; - _empGroup setVariable["groupVehicle",_wep]; + //_empGroup setVariable["groupVehicle",_wep]; _wep setVariable["vehicleGroup",_empGroup]; #ifdef blck_debugMode if (blck_debugLevel > 1) then diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf new file mode 100644 index 0000000..8aaa89f --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf @@ -0,0 +1,46 @@ +////////////////////////////////////////////////////// +// Attach a marker of type _marker to an object _crate +// by Ghostrider [GRG] based on code from Wicked AI for Arma 2 Dayz Epoch +// Last modified 8/2/15 +///////////////////////////////////////////////////// +/* + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +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], true] 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/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf new file mode 100644 index 0000000..1f80d2c --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf @@ -0,0 +1,57 @@ +////////////////////////////////////////////////////// +// Attach a marker of type _marker to an object _crate +// by Ghostrider [GRG] based on code from Wicked AI for Arma 2 Dayz Epoch +// Last modified 8/2/15 +///////////////////////////////////////////////////// +/* + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +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/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf index 9cacf21..76871fa 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf @@ -32,7 +32,7 @@ if ((count _coords) == 2) then // assume only X and Y offsets are provided _cratesSpawned = []; { - _x params["_crateType","_crateOffset","_lootArray","_lootCounts"]; + _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"]; { @@ -41,6 +41,7 @@ _cratesSpawned = []; }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]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf index b0731fd..c710afc 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionLootVehicles.sqf @@ -15,11 +15,12 @@ params["_coords","_missionLootVehicles",["_loadCrateTiming","atMissionSpawn"]]; if (count _coords == 2) then {_coords pushBack 0}; private _vehs = []; { - //diag_log format["spawnMissionCVehicles.sqf _x = %1",_x]; - _x params["_vehType","_vehOffset","_lootArray","_lootCounts"]; + 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"; { diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf index 2fe90dd..954d3ff 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf @@ -97,7 +97,7 @@ if (_missionPatrolVehicles isEqualTo []) then //params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]]; _patrolVehicle = [_coords,_spawnPos,_vehicle,30,45,_vehGroup,true] call blck_fnc_spawnVehiclePatrol; - _vehGroup setVariable["groupVehicle",_vehicle]; + //_vehGroup setVariable["groupVehicle",_vehicle]; #ifdef blck_debugMode if (blck_debugLevel > 1) then { diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf index 8cdebd8..cb9bfdd 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf @@ -17,7 +17,7 @@ #ifdef blck_debugMode if (blck_debugLevel >= 2) then { - diag_log format["_fnc_spawnPendingMissions:: count blck_pendingMissions = %1", count blck_pendingMissions]; + //diag_log format["_fnc_spawnPendingMissions:: count blck_pendingMissions = %1", count blck_pendingMissions]; }; #endif @@ -25,7 +25,7 @@ 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"; + //diag_log "_fnc_spawnPendingMissions:: --- >> Maximum number of missions is running; function exited without attempting to find a new mission to spawn"; }; #endif }; @@ -45,7 +45,7 @@ _readyToSpawnQue = []; #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]; + //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]; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf index 3718ae4..d1035fc 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf @@ -16,7 +16,7 @@ params["_mission","_status",["_coords",[0,0,0]] ]; // _mission is the name used to identify the marker associated with that particular mission. it is a unique identifier. #ifdef blck_debugMode -if (blck_debugLevel > 0) then {diag_log format["_fnc_updateMissionQue :: _mission = %1 | _status = %2 | _coords = %3",_mission,_status,_coords];}; +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"]; @@ -31,13 +31,13 @@ private["_index","_element","_waitTime"]; if (_index > -1) then { #ifdef blck_debugMode - if (blck_debuglevel > 0) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions began as %1",blck_pendingMissions];}; + if (blck_debuglevel > 2) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions began as %1",blck_pendingMissions];}; #endif _element = blck_pendingMissions select _index; #ifdef blck_debugMode - if (blck_debuglevel > 0) then {diag_log format["_fnc_updateMissionQue:: -- >> _element before update = %1",_element];}; + if (blck_debuglevel > 2) then {diag_log format["_fnc_updateMissionQue:: -- >> _element before update = %1",_element];}; #endif // 0 1 2 3 4 5 6 //_mission = [_missionList,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]]; @@ -53,13 +53,13 @@ if (_index > -1) then }; #ifdef blck_debugMode - if (blck_debuglevel > 0) then {diag_log format["_fnc_updateMissionQue:: -- >> _element after update = %1",_element];}; + if (blck_debuglevel > 2) then {diag_log format["_fnc_updateMissionQue:: -- >> _element after update = %1",_element];}; #endif blck_pendingMissions set [_index, _element]; #ifdef blck_debugMode - if (blck_debuglevel > 0) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions after update = %1",blck_pendingMissions];}; + if (blck_debuglevel > 2) then {diag_log format ["_fnc_updateMissionQue :: blck_pendingMissions after update = %1",blck_pendingMissions];}; #endif }; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf index e60701c..35e821d 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf @@ -32,7 +32,7 @@ //_mag = _this select 3 select 0; (_this select 0) addMagazine (_this select 3 select 0); #ifdef blck_debugMode -if (blck_debugON || blck_debugLevel > 2) then { +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,_unit]; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf index 82f1af7..2c3c5e2 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf @@ -13,7 +13,7 @@ #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]]; +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}; @@ -25,7 +25,7 @@ if (_backpacks isEqualTo []) then {_backpacks = [_skillLevel] call blck_fnc_sel #ifdef blck_debugMode if (blck_debugLevel >= 2) then { - private _params = ["_pos","_aiGroup","_skillLevel","_uniforms","_headGear","_vests","_backpacks","_Launcher","_weaponList","_sideArms","_scuba"]; //"_weaponList", "_Launcher" + 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; @@ -79,6 +79,7 @@ if (_scuba) then }; #endif }; + _skin = ""; _counter = 1; //diag_log format["_fnc_spawnUnit: _uniforms = %1",_uniforms]; @@ -96,6 +97,10 @@ while {_skin isEqualTo "" && _counter < 10} do }; //Sets AI Tactics _unit enableAI "ALL"; +if(_garrison) then +{ + _unit disableAI "PATH"; +}; _unit allowDammage true; _unit setBehaviour "COMBAT"; _unit setunitpos "AUTO"; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf new file mode 100644 index 0000000..86823ae --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf @@ -0,0 +1,19 @@ + +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/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf index e283092..4056a8e 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf @@ -72,7 +72,7 @@ if !(isNull _grpPilot) then #endif _patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"]; - _grpPilot setVariable["groupVehicle",_patrolHeli]; + //_grpPilot setVariable["groupVehicle",_patrolHeli]; [_patrolHeli] call blck_fnc_protectVehicle; _patrolHeli setFuel 1; _patrolHeli engineOn true; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf index 3124f14..41ffed2 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf @@ -40,7 +40,7 @@ if !(isNull _group) then _veh = [_vehType,_pos] call blck_fnc_spawnVehicle; // _veh addEventHandler["HandleDamage",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}]; _veh addMPEventHandler["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleHit}]; - _group setVariable["groupVehicle",_veh]; + //_group setVariable["groupVehicle",_veh]; #ifdef blck_debugMode if (blck_debugLevel > 1) then { diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf new file mode 100644 index 0000000..593c609 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf @@ -0,0 +1,12 @@ +// 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/@GMS/addons/custom_server/Compiles/blck_functions.sqf b/@GMS/addons/custom_server/Compiles/blck_functions.sqf index 77e8b12..b364ad9 100644 --- a/@GMS/addons/custom_server/Compiles/blck_functions.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_functions.sqf @@ -36,6 +36,12 @@ blck_fnc_missionCompleteMarker = compileFinal preprocessFileLineNumbers "\q\add blck_fnc_deleteMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_deleteMarker.sqf"; blck_fnc_updateMarkerAliveCount = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_updateMarkerAliveCount.sqf"; blck_fnc_addMoneyToObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_addMoneyToObject.sqf"; +blck_fnc_spawnMissionEmplacedRelative = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnMissionEmplacedRelative.sqf"; +blck_fnc_spawnMissionLootBoxesRelative = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnMissionLootBoxesRelative.sqf"; +blck_fnc_spawnSingleObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnSingleObject.sqf"; +blck_fnc_emptyObjectInventory = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObjectInventory.sqf"; +blck_fnc_spawnMissionLandscapeRelative = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnMissionLandscapeRelative.sqf"; + //blck_fnc_getTraderCitiesEpoch = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitiesEpoch.sqf"; //blck_fnc_getTraderCitesExile = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitesExile.sqf"; @@ -84,8 +90,10 @@ blck_fnc_paraDropObject = compileFinal preprocessFileLineNumbers "\q\addons\cust blck_fnc_loadMissionCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_loadMissionCrate.sqf"; blck_fnc_crateMoved = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMoved.sqf"; blck_fnc_crateMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_crateMarker.sqf"; - - +blck_fnc_garrisonBuilding_RelPosSystem = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_garrisonBuilding_relPosSystem.sqf"; +blck_fnc_garrisonBuilding_ATLsystem = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_garrisonBuilding_ATLsystem.sqf"; +blck_fnc_spawnGarrisonInsideBuilding_ATL = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf"; +blck_fnc_spawnGarrisonInsideBuilding_relPos = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf"; // Group-related functions blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units] blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setupWaypoints.sqf"; // Set default waypoints for a group diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddAircraft.sqf new file mode 100644 index 0000000..2aed2f4 --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddEmplaced.sqf new file mode 100644 index 0000000..01d7722 --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddGroup.sqf new file mode 100644 index 0000000..49abe09 --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_AddVehicle.sqf new file mode 100644 index 0000000..47dd046 --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf index 086f3f9..34f4f98 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_init_functions.sqf @@ -18,8 +18,9 @@ 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"; @@ -38,6 +39,8 @@ blck_fnc_sm_monitorAircraft = compileFinal preprocessFileLineNumbers "\q\addons blck_fnc_sm_monitorShips = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorShips.sqf"; blck_fnc_sm_monitorSubs = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorSubs.sqf"; blck_fnc_sm_monitorEmplaced = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorEmplaced.sqf"; +blck_fnc_sm_monitorGarrisonsASL = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorGarrisonsASL.sqf"; +blck_fnc_sm_monitorGarrisons_relPos = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_monitorGarrisons_relPos.sqf"; blck_fnc_sm_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrol.sqf"; blck_fnc_sm_spawnAirPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnAirPatrol.sqf"; @@ -51,7 +54,10 @@ blck_fnc_sm_spawnInfantryPatrols = compileFinal preprocessFileLineNumbers "\q\a blck_fnc_sm_spawnLootContainers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnLootContainers.sqf"; blck_fnc_sm_spawnObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjects.sqf"; blck_fnc_sm_spawnVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnVehiclePatrols.sqf"; +blck_fnc_sm_spawnBuildingGarrison_ASL = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnBuildingGarrisonASL.sqf"; +blck_fnc_sm_spawnBuildingGarrison_relPos = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf"; +blck_fnc_sm_spawnObjectASLVectorDirUp = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf"; -//diag_log "[blckeagls] GMS_sm_init_functions.sqf "; +diag_log "[blckeagls] GMS_sm_init_functions.sqf "; blck_sm_functionsLoaded = true; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf index d79911d..0fa9b02 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_initializeMission.sqf @@ -14,6 +14,21 @@ params["_mission"]; // 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 @@ -29,6 +44,24 @@ _blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow [_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; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf index c803d24..b3c9792 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorAircraft.sqf @@ -18,7 +18,7 @@ _sm_groups = +blck_sm_Aircraft; //diag_log format["_fnc_monitorAircraft: _x %1",_x]; //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["_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]; private _element = +_x;// diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf index cbe1aee..e5117ea 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorEmplaced.sqf @@ -17,7 +17,7 @@ _sm_groups = +blck_sm_Emplaced; //diag_log format["_fnc_monitorEmplaced: _x %1",_x]; //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["_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]; private _element = +_x;// diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisonsASL.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisonsASL.sqf new file mode 100644 index 0000000..00d66b5 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisonsASL.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"; +private["_mode","_sm_groups","_pos","_element"]; +//diag_log format["_fnc_sm_monitorGarrisonASL: blck_fnc_spawnGarrisonInsideBuilding_ATL = %1",blck_sm_garrisonBuildings_ASL]; +if (blck_sm_garrisonBuildings_ASL isEqualTo []) exitWith {}; +_sm_groups = +blck_sm_garrisonBuildings_ASL; + { + //diag_log format["_fnc_sm_monitorGarrisonASL: _x = %1",_x]; + _x 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 _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: {blck_sm_garrisonBuildings_ASL deleteAt (blck_sm_garrisonBuildings_ASL find _x)}; + case 1: { + + if (true /*[_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]; + }; + }; + 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]; + + }; + 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]; + blck_sm_garrisonBuildings_ASL set[(blck_sm_garrisonBuildings_ASL find _x), _element]; + }; + }; + }; +}forEach _sm_groups; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisons_relPos.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorGarrisons_relPos.sqf new file mode 100644 index 0000000..af99c94 --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorInfantry.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorInfantry.sqf index 3a5ee63..23c32cc 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorInfantry.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorInfantry.sqf @@ -17,7 +17,7 @@ _sm_groups = +blck_sm_Infantry; //diag_log format["_fnc_monitorInfantry: _x %1",_x]; //diag_log format["_fnc_monitorInfantry: _groupParameters = %1",_groupParameters]; //diag_log format["_fnc_monitorInfantry (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; - _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime"]; + _groupParameters params["_pos","_difficulty","_units","_patrolRadius","_respawnTime","_maxRespawns"]; //diag_log format["_fnc_monitorInfantry: _pos = %1 | _difficulty = 2 | _units = %3 | _patrolRadius = %4 | _respawnTime = %5",_pos,_difficulty,_units,_patrolRadius,_respawnTime]; private _element = +_x;// diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf index 2282f98..047a3af 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorScuba.sqf @@ -18,7 +18,7 @@ _sm_groups = +blck_sm_scubaGroups; //diag_log format["_fnc_monitorScubaGroups: _x %1",_x]; //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"]; + _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]; private _element = +_x;// @@ -34,6 +34,7 @@ _sm_groups = +blck_sm_scubaGroups; 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}; }; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf index 18f6083..9d9881a 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorShips.sqf @@ -19,7 +19,7 @@ _sm_groups = +blck_sm_surfaceShips; //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"]; + _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]; private _element = +_x;// @@ -35,6 +35,7 @@ _sm_groups = +blck_sm_surfaceShips; 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}; }; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticPatrols.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticPatrols.sqf index 8c19ec5..fa8975c 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticPatrols.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticPatrols.sqf @@ -19,5 +19,7 @@ [] call blck_fnc_sm_monitorScuba; [] call blck_fnc_sm_monitorShips; [] call blck_fnc_sm_monitorSubs; +[] call blck_fnc_sm_monitorGarrisonsASL; +[] call blck_fnc_sm_monitorGarrisons_relPos; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorStaticUnits.sqf new file mode 100644 index 0000000..ceb0974 --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf index 5be9759..09b2036 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorSubs.sqf @@ -19,7 +19,7 @@ _sm_groups = +blck_sm_submarines; //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"]; + _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]; private _element = +_x;// @@ -35,6 +35,7 @@ _sm_groups = +blck_sm_submarines; 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}; }; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf index 470a1fb..fc0686c 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_monitorVehicles.sqf @@ -18,7 +18,7 @@ _sm_groups = +blck_sm_Vehicles; //diag_log format["_fnc_monitorVehicles: _x %1",_x]; //diag_log format["_fnc_monitorVehicles: _groupParameters = %1",_groupParameters]; //diag_log format["_fnc_monitorVehicles (9): _group %1 | _groupSpawned %2 | _timesSpawned %3 | _respawnAt %4",_group,_groupSpawned,_timesSpawned,_respawnAt]; - _groupParameters params["_vehicleType","_pos","_difficulty","_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]; private _element = +_x;// diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrisonASL.sqf new file mode 100644 index 0000000..6cb3fd4 --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnBuildingGarrison_relPos.sqf new file mode 100644 index 0000000..a49e28f --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaced.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaced.sqf index cda76ae..73109e5 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaced.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaced.sqf @@ -44,7 +44,7 @@ if (_missionEmplacedWeapons isEqualTo []) then [_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]; + //_empGroup setVariable["groupVehicle",_wep]; _wep setVariable["vehicleGroup",_empGroup]; _wep setVariable["GRG_vehType","emplaced"]; _wep setPosATL _pos; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf index 478d3ca..7bef936 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnEmplaceds.sqf @@ -44,7 +44,7 @@ if (_missionEmplacedWeapons isEqualTo []) then [_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]; + //_empGroup setVariable["groupVehicle",_wep]; _wep setVariable["vehicleGroup",_empGroup]; _wep setVariable["GRG_vehType","emplaced"]; _wep setPosATL _pos; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf index 9fb6b02..34f0a71 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnLootContainers.sqf @@ -22,8 +22,11 @@ if !(_objects isEqualTo []) exitWith diag_log format["_fnc_sm_spawnLootContainers (21):-> _x = %1",_x]; }; #endif - _crate = [_x select 1, _x select 0] call blck_fnc_spawnCrate; - [_crate, _x select 4, _x select 5] call blck_fnc_fillBoxes; + 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; }; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf new file mode 100644 index 0000000..0fb23aa --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjectASLVectorDirUp.sqf @@ -0,0 +1,25 @@ + +/* + 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_spawnObjectASLVectorDirUp: _this = %1",_this]; +params["_buildingClassName","_posASL","_vectorDirUp","_enableDamSim"]; +{ + diag_log format["_fnc_sm_spawnObjectASLVectorDirUp: %1 = %2",_x select 0, _x select 1]; +}forEach [["_buildingClassName",_buildingClassName],["_posASL",_posASL],["_vectorDirUp",_vectorDirUp],["_enableDamSim",_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/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf index 8ea78e1..5a10740 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnObjects.sqf @@ -15,14 +15,17 @@ params["_objects"]; private["_objects","_object"]; { - //diag_log format["_sm_spawnObjects:: spawning object of type %1 with parameters of %2",_x select 0, _x]; + diag_log format["_sm_spawnObjects:: spawning object of type %1 with parameters of %2",_x select 0, _x]; //private _object = (_x select 0) createVehicle [0,0,0]; // [type, position, markers, placement, special] + _object = [_x select 0, _x select 1, _x select 2, _x select 3] call blck_fnc_sm_spawnObjectASLVectorDirUp; + /* _object = createVehicle [_x select 0, _x select 1, [], 0, "CAN_COLLIDE"]; _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; diff --git a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf index 59b3163..c89c602 100644 --- a/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf +++ b/@GMS/addons/custom_server/Missions/Static/Code/GMS_fnc_sm_spawnVehiclePatrols.sqf @@ -13,7 +13,7 @@ params["_coords","_noVehiclePatrols","_vehiclePatrolSpawns","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]]; -diag_log format["_sm_spawnVehiclePatrols:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns]; +//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 @@ -38,7 +38,7 @@ if (_vehiclePatrolSpawns isEqualTo []) then //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]; + //_vehGroup setVariable["groupVehicle",_vehicle]; if !(isNull _patrolVehicle) then { diff --git a/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf b/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf index b5b8ab0..7ba591f 100644 --- a/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf +++ b/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_Lists.sqf @@ -15,8 +15,11 @@ 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"], + //["Epoch","Altis","destroyer.sqf"], + //["Exile","Altis","template.sqf"], //["Exile","Altis","staticMissionExample2_Exile.sqf"] ]; -//diag_log "[blckeagls] GMS_StaticMissions_Lists.sqf "; +diag_log "[blckeagls] GMS_StaticMissions_Lists.sqf "; diff --git a/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf b/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf index 2c63b09..bd94caf 100644 --- a/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf +++ b/@GMS/addons/custom_server/Missions/Static/GMS_StaticMissions_init.sqf @@ -21,6 +21,7 @@ private["_mod","_map","_missionMod","_missionMap","_missionLocation","_missionDa blck_sm_monitoring = 0; blck_sm_groupDespawnTime = 30; blck_sm_patrolRespawnInterval = 30; +uiSleep 10; _map = toLower worldName; { if ((_map) isEqualTo toLower(_x select 1)) then diff --git a/@GMS/addons/custom_server/Missions/Static/missions/destroyer.sqf b/@GMS/addons/custom_server/Missions/Static/missions/destroyer.sqf new file mode 100644 index 0000000..e689734 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/missions/destroyer.sqf @@ -0,0 +1,333 @@ + + +/* + 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) +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 + +/**************************************************** + + PLACE MARKER DEFINITIONS PULLED FROM YOUR MISSION BELOW + +*****************************************************/ + +_markerType = ["mil_flag",[0,0]]; +_markerColor = "ColorEAST"; +_markermissionname = "Destroyer"; +_markerLabel = ""; +_missionCenter = [1391.91,4534.11,0]; + +/**************************************************** + + PLACE THE DATA DEFININING THE BUILDINGS, VEHICLES ETC. PULLED FROM YOUR MISSION BELOW + +*****************************************************/ + + _garrisonedBuildings_BuildingPosnSystem = [ +]; + +_garrisonedBuilding_ASLsystem = [ + ["Land_Destroyer_01_hull_01_F",[1391.91,4534.11,-0.649969],[[0.800984,-0.598686,0],[0,0,1]],true,true,[["B_Ship_Gun_01_F",[4.72949,-3.60547,12.7434],307.439],["B_HMG_01_high_F",[4.54016,-11.2021,12.6131],218.472],["B_HMG_01_high_F",[12.3756,-1.15869,12.6055],35.61],["B_HMG_01_high_F",[-18.7921,14.3188,13.5111],302.093]],[[[18.4319,-5.26758,11.2153],125.682],[[10.4352,-15.731,11.2192],126.977]],600], + ["Land_Destroyer_01_hull_02_F",[1423.95,4510.16,-0.649969],[[0.800984,-0.598686,0],[0,0,1]],true,true,[["B_AAA_System_01_F",[-2.25073,1.73682,15.7379],306.598],["B_Ship_MRLS_01_F",[-13.9872,10.4492,11.174],306.737]],[],600], + ["Land_Destroyer_01_interior_03_F",[1460,4483.22,-0.649969],[[0.800984,-0.598686,0],[0,0,1]],true,true,[["B_HMG_01_high_F",[-10.1742,8.03906,7.91909],126.706],["B_HMG_01_high_F",[2.72375,-16.1348,7.91922],42.9322],["B_HMG_01_high_F",[16.5839,2.18066,7.9192],214.502],["B_HMG_01_high_F",[5.68848,-18.1914,7.91922],31.9215],["B_HMG_01_high_F",[19.4551,-0.00439453,7.9192],225.512],["B_HMG_01_high_F",[-20.0377,9.01123,11.011],42.4187]],[[[17.2562,-13.7939,7.92044],123.338],[[18.3827,-12.2373,7.92066],123.337],[[14.7008,-13.4897,7.92044],35.3291],[[20.3577,-4.94238,7.92065],269.259],[[10.6315,-17.2856,7.92065],331.786],[[14.04,-8.40332,7.92068],129.234],[[17.1906,-3.07178,7.92065],256.3],[[10.2245,-10.4814,7.92044],83.8439],[[6.5321,-14.2183,7.92067],355.258],[[8.61267,-8.57373,7.92067],95.4863],[[10.6578,-5.18457,7.92067],132.177],[[7.36707,-5.53564,7.92071],120.027],[[12.703,1.01563,7.92065],192.721],[[2.7157,-11.6484,7.92065],52.269],[[9.87585,2.76758,7.92065],169.98],[[-0.106323,-9.88867,7.92065],68.2595],[[3.9646,-2.23047,7.9207],108.07],[[2.1499,-3.51074,7.92083],349.174],[[1.4425,0.710938,7.92056],123.923],[[-1.80359,-0.573242,7.92044],100.847],[[-0.227417,1.98584,7.92044],125.283],[[-3.26526,0.62793,7.92076],100.411],[[-2.53613,3.5835,7.92054],122.522],[[-6.16113,3.58398,7.92065],108.109],[[-11.7808,10.2075,7.92058],209.775],[[-19.2814,8.31104,11.0124],26.8193]],600], + ["Land_Destroyer_01_interior_02_F",[1423.95,4510.16,-0.649969],[[0.800984,-0.598686,0],[0,0,1]],true,true,[["B_HMG_01_high_F",[5.01099,-3.89209,11.0036],127.048],["B_HMG_01_high_F",[10.8843,-11.3027,17.4478],158.015]],[[[5.72925,-2.02148,11.0051],134.144],[[4.04919,-4.86035,11.0051],104.51],[[1.52112,-8.03076,11.0051],35.1277],[[8.57251,0.78418,11.0051],225.784],[[12.7998,-8.05127,11.0064],151.586],[[1.52563,-1.25928,19.842],295.781],[[9.59998,-14.0918,11.0094],123.392],[[-1.18127,-5.98975,19.842],120.854],[[5.33276,3.2002,19.842],166.754],[[4.22217,-4.77832,19.842],158.107],[[5.79309,-2.68311,19.842],168.472],[[10.0356,-11.7954,14.2685],126.151],[[16.5643,-11.1797,11.0064],214.928],[[10.4938,-14.623,14.2685],306.919],[[14.4235,-14.2329,11.009],213.067],[[10.3951,-12.2212,17.4492],147.258],[[6.73352,-11.2139,19.923],94.4214],[[9.48193,-13.1953,17.4492],120.328]],600], + ["Land_Destroyer_01_hull_04_F",[1496.04,4456.28,-0.649969],[[0.800984,-0.598686,0],[0,0,1]],true,true,[["B_AAA_System_01_F",[5.1239,-3.81299,16.435],127.49],["B_AAA_System_01_F",[-7.22266,5.40479,19.8668],126.907]],[],600], + ["Land_Destroyer_01_interior_04_F",[1496.04,4456.28,-0.649969],[[0.800984,-0.598686,0],[0,0,1]],true,true,[["B_HMG_01_high_F",[-10.6223,18.4663,9.45069],159.411]],[[[-0.0811768,-2.49951,9.45211],35.2905],[[3.74036,0.499512,9.45212],219.071],[[4.07251,4.46191,9.45212],32.9361],[[-2.64954,-5.72754,9.45211],209.113],[[0.796021,6.94385,9.45211],32.2703],[[0.0319824,-7.6875,9.45212],209.113],[[2.64417,8.20605,11.7909],217.679],[[13.7255,-0.901855,9.45212],293.906],[[4.60083,-13.2754,9.45212],214.506],[[14.0101,5.79736,9.43772],122.065],[[-3.71155,13.167,11.7909],32.2703],[[-15.2096,4.36914,9.45212],113.126],[[-13.408,9.53369,9.45211],211.223],[[17.4581,3.89941,9.43772],209.113],[[-14.6182,10.5728,9.45213],215.171]],600], + ["Land_Destroyer_01_hull_01_F",[30295.4,319.649,-0.622],[[0.683923,0.729554,0],[0,0,1]],true,true,[["B_Ship_Gun_01_F",[4.10742,4.29971,12.7434],223.814],["B_HMG_01_high_F",[11.6367,3.26865,12.6131],134.846],["B_HMG_01_high_F",[2.52539,12.1696,12.6055],311.985],["B_HMG_01_high_F",[-16.3184,-17.0865,13.5111],218.468]],[[[7.33203,17.7766,11.2153],42.0576],[[16.8418,8.66891,11.2192],43.3522]],600], + ["Land_Destroyer_01_hull_02_F",[30322.8,348.831,-0.622],[[0.683923,0.729554,0],[0,0,1]],true,true,[["B_AAA_System_01_F",[-1.97656,-2.04358,15.7379],222.973],["B_Ship_MRLS_01_F",[-11.9414,-12.7422,11.174],223.112]],[],600], + ["Land_Destroyer_01_interior_02_F",[30322.8,348.831,-0.622],[[0.683923,0.729554,0],[0,0,1]],true,true,[["B_HMG_01_high_F",[4.42383,4.548,11.0036],43.4227],["B_HMG_01_high_F",[12.4434,9.56168,17.4478],74.3907]],[[[13,15.2649,11.0064],131.302],[[15.7969,12.7982,11.009],129.441],[[15.1211,8.0199,11.0094],39.767],[[15.748,8.84909,14.2685],223.293],[[9.47266,11.8699,11.0064],67.961],[[12.8867,8.70901,14.2685],42.5262],[[13.3477,9.01886,17.4492],63.6329],[[14.2148,8.00345,17.4492],36.7034],[[11.9414,5.49207,19.923],10.7965],[[5.33203,3.52863,11.0051],20.8846],[[0.222656,8.65125,11.0051],142.158],[[2.69531,5.51337,11.0051],50.5195],[[8.20117,0.6651,11.0051],311.503],[[3.36133,5.50327,19.842],84.847],[[5.26758,3.71045,19.842],74.4826],[[5.87109,-1.79449,19.842],37.2293],[[1.4707,1.42041,19.842],212.155],[[-2.53711,5.69864,19.842],83.1293]],600], + ["Land_Destroyer_01_interior_03_F",[30353.6,381.661,-0.622],[[0.683923,0.729554,0],[0,0,1]],true,true,[["B_HMG_01_high_F",[-9.11523,-9.21994,7.91909],43.0813],["B_HMG_01_high_F",[16.3379,0.915314,7.91922],319.307],["B_HMG_01_high_F",[-0.707031,16.3835,7.9192],130.875],["B_HMG_01_high_F",[18.709,3.63425,7.91922],308.297],["B_HMG_01_high_F",[1.78516,18.9931,7.9192],141.886],["B_HMG_01_high_F",[-11.1758,-18.9154,11.011],318.794]],[[[15.6738,15.662,7.92044],39.713],[[14.252,16.9545,7.92066],39.7126],[[15.0879,13.157,7.92044],311.704],[[7.22266,19.7268,7.92065],185.634],[[18.4082,8.69135,7.92065],248.161],[[9.95898,13.065,7.92068],45.609],[[5.00977,16.7883,7.92065],172.675],[[11.6016,9.04199,7.92044],0.219],[[14.9043,4.95792,7.92067],271.633],[[9.52734,7.65131,7.92067],11.8615],[[6.38672,10.0601,7.92067],48.552],[[6.36914,6.75143,7.92071],36.4026],[[0.451172,12.7811,7.92065],109.095],[[11.9258,1.44986,7.92065],328.644],[[-1.60352,10.167,7.92065],86.3551],[[9.86523,-1.15985,7.92065],344.635],[[2.70508,3.7366,7.9207],24.4451],[[3.77734,1.79135,7.92083],265.548],[[-0.496094,1.55679,7.92056],40.298],[[0.419922,-1.81201,7.92044],17.222],[[-1.94922,0.039978,7.92044],41.658],[[-0.9375,-3.13019,7.92076],16.7862],[[-3.79297,-2.07892,7.92054],38.8969],[[-4.19727,-5.67975,7.92065],24.4841],[[-11.4004,-10.5308,7.92058],126.148],[[-10.3516,-18.1954,11.0124],303.194]],600], + ["Land_Destroyer_01_hull_04_F",[30384.4,414.491,-0.622],[[0.683923,0.729554,0],[0,0,1]],true,true,[["B_AAA_System_01_F",[4.35742,4.66916,16.435],43.8648],["B_AAA_System_01_F",[-6.17383,-6.57806,19.8668],43.282]],[],600], + ["Land_Destroyer_01_interior_04_F",[30384.4,414.491,-0.622],[[0.683923,0.729554,0],[0,0,1]],true,true,[["B_HMG_01_high_F",[-19.4805,-8.45926,9.45069],75.7862]],[[[2.52539,-0.314575,9.45211],311.665],[[-0.03125,3.81635,9.45212],135.445],[[-3.93359,4.58731,9.45212],309.311],[[5.44727,-3.22516,9.45211],125.486],[[-6.76367,1.60672,9.45211],308.645],[[7.69336,-0.778015,9.45212],125.486],[[-7.8125,3.58273,11.7909],134.052],[[2.46875,13.5851,9.45212],210.281],[[13.752,3.14368,9.45212],130.88],[[-4.15625,14.6113,9.43772],38.44],[[-13.4492,-2.18231,11.7909],308.645],[[-5.98242,-14.5853,9.45212],29.5009],[[-10.9141,-12.2226,9.45211],127.596],[[-1.88672,17.8273,9.43772],125.486],[[-12.082,-13.3101,9.45213],131.544]],600], + ["Land_Destroyer_01_hull_05_F",[1524.07,4435.33,-0.649969],[[0.800984,-0.598686,0],[0,0,1]],true,true,[],[[[-7.3092,1.93457,9.41139],33.1311],[[-4.10486,6.45459,9.41135],209.987],[[-9.75696,3.86768,9.41044],33.1311],[[-6.60742,8.18164,9.41058],210.399],[[-9.54858,-8.17236,9.41244],3.81238]],600], + ["Land_Destroyer_01_hull_05_F",[30408.3,440.025,-0.622],[[0.683923,0.729554,0],[0,0,1]],true,true,[],[[[-2.68555,-7.00522,9.41139],309.506],[[-6.82227,-3.31778,9.41135],126.361],[[-4.87695,-9.2233,9.41044],309.506],[[-8.81445,-5.6131,9.41058],126.773],[[7.11133,-10.3541,9.41247],280.187]],600] +]; + +_missionLandscape = [ + ["Land_Destroyer_01_base_F",[1460,4483.22,3.05176e-005],[[0.800983,-0.598686,0],[0,0,1]],[true,true]], + ["Land_Destroyer_01_hull_03_F",[1460,4483.22,-0.649969],[[0.800984,-0.598686,0],[0,0,1]],[true,true]], + ["Land_HelipadEmpty_F",[1523.6,4435.68,8.7616],[[0.800984,-0.598686,0],[0,0,1]],[true,true]], + ["ShipFlag_US_F",[1533.5,4428.28,8.76269],[[0.800984,-0.598686,0],[0,0,1]],[true,true]], + ["Land_Destroyer_01_base_F",[30353.6,381.661,0.0279999],[[0.683923,0.729554,0],[0,0,1]],[true,true]], + ["Land_Destroyer_01_hull_03_F",[30353.6,381.661,-0.622],[[0.683923,0.729554,0],[0,0,1]],[true,true]], + ["ShipFlag_US_F",[30416.3,448.607,8.79066],[[0.683923,0.729554,0],[0,0,1]],[true,true]], + ["Land_HelipadEmpty_F",[30407.9,439.59,8.78957],[[0.683923,0.729554,0],[0,0,1]],[true,true]] +]; + +_aiGroupParameters = [ + [[1402.35,4518.38,10.5692],"Red",[1,1],45,600], + [[1438.52,4493.1,10.3624],"Red",[1,1],45,600], + [[1433.55,4496.07,10.3595],"Red",[1,1],45,600], + [[1438.37,4495.93,10.359],"Red",[1,1],45,600], + [[1424.12,4499.21,18.8213],"Red",[1,1],45,600], + [[1430.68,4498.95,19.273],"Red",[1,1],45,600], + [[1434.35,4497.94,16.7993],"Red",[1,1],45,600], + [[1433.43,4496.97,16.7993],"Red",[1,1],45,600], + [[1433.99,4498.37,13.6185],"Red",[1,1],45,600], + [[1434.44,4495.54,13.6185],"Red",[1,1],45,600], + [[1432.52,4510.95,10.3551],"Red",[1,1],45,600], + [[1428,4505.3,10.3551],"Red",[1,1],45,600], + [[1429.68,4508.14,10.3551],"Red",[1,1],45,600], + [[1425.47,4502.13,10.3551],"Red",[1,1],45,600], + [[1436.75,4502.11,10.3565],"Red",[1,1],45,600], + [[1412.57,4514.3,10.484],"Red",[1,1],45,600], + [[1410.34,4528.84,10.5653],"Red",[1,1],45,600], + [[1414.51,4505.62,10.4361],"Red",[1,1],45,600], + [[1426.87,4520,10.426],"Red",[1,1],45,600], + [[1431.32,4516.01,10.3788],"Red",[1,1],45,600], + [[1420.29,4501.45,10.3788],"Red",[1,1],45,600], + [[1417.1,4520.38,10.484],"Red",[1,1],45,600], + [[1434.42,4513.06,18.8213],"Red",[1,1],45,600], + [[1436.38,4512.75,18.8215],"Red",[1,1],45,600], + [[1429.28,4513.36,19.1921],"Red",[1,1],45,600], + [[1428.17,4505.38,19.1921],"Red",[1,1],45,600], + [[1422.77,4504.17,19.1921],"Red",[1,1],45,600], + [[1429.74,4507.48,19.1921],"Red",[1,1],45,600], + [[1425.48,4508.9,19.1921],"Red",[1,1],45,600], + [[1466.53,4469,7.2707],"Red",[1,1],45,600], + [[1459.89,4473.33,7.27068],"Red",[1,1],45,600], + [[1462.71,4471.57,7.27068],"Red",[1,1],45,600], + [[1469.87,4485.99,7.27068],"Red",[1,1],45,600], + [[1462.15,4479.71,7.27086],"Red",[1,1],45,600], + [[1467.36,4477.68,7.27074],"Red",[1,1],45,600], + [[1468.61,4474.65,7.2707],"Red",[1,1],45,600], + [[1463.96,4480.99,7.27073],"Red",[1,1],45,600], + [[1461.44,4483.93,7.27059],"Red",[1,1],45,600], + [[1458.19,4482.65,7.27047],"Red",[1,1],45,600], + [[1459.77,4485.21,7.27047],"Red",[1,1],45,600], + [[1456.73,4483.85,7.27079],"Red",[1,1],45,600], + [[1457.46,4486.8,7.27057],"Red",[1,1],45,600], + [[1453.83,4486.8,7.27068],"Red",[1,1],45,600], + [[1448.21,4493.43,7.27061],"Red",[1,1],45,600], + [[1442.6,4497.31,10.3625],"Red",[1,1],45,600], + [[1440.71,4491.53,10.3624],"Red",[1,1],45,600], + [[1440.52,4498.98,10.3565],"Red",[1,1],45,600], + [[1470.63,4465.93,7.27068],"Red",[1,1],45,600], + [[1481.42,4466.85,8.80216],"Red",[1,1],45,600], + [[1496.84,4463.22,8.80215],"Red",[1,1],45,600], + [[1492.33,4469.45,11.1409],"Red",[1,1],45,600], + [[1496.07,4448.59,8.80215],"Red",[1,1],45,600], + [[1493.39,4450.55,8.80215],"Red",[1,1],45,600], + [[1499.78,4456.78,8.80215],"Red",[1,1],45,600], + [[1495.96,4453.78,8.80214],"Red",[1,1],45,600], + [[1482.63,4465.81,8.80214],"Red",[1,1],45,600], + [[1480.83,4460.65,8.80215],"Red",[1,1],45,600], + [[1498.68,4464.49,11.1409],"Red",[1,1],45,600], + [[1477.25,4469.43,7.27047],"Red",[1,1],45,600], + [[1474.7,4469.73,7.27047],"Red",[1,1],45,600], + [[1470.22,4472.74,7.27047],"Red",[1,1],45,600], + [[1470.65,4478.04,7.2707],"Red",[1,1],45,600], + [[1474.04,4474.82,7.27071],"Red",[1,1],45,600], + [[1478.38,4470.98,7.27069],"Red",[1,1],45,600], + [[1472.7,4484.24,7.27068],"Red",[1,1],45,600], + [[1477.19,4480.15,7.27068],"Red",[1,1],45,600], + [[1480.35,4478.28,7.27068],"Red",[1,1],45,600], + [[1514.53,4427.15,8.76247],"Red",[1,1],45,600], + [[1514.32,4439.19,8.76047],"Red",[1,1],45,600], + [[1516.76,4437.26,8.76142],"Red",[1,1],45,600], + [[1500.11,4460.74,8.80215],"Red",[1,1],45,600], + [[1509.76,4455.38,8.80215],"Red",[1,1],45,600], + [[1500.64,4443,8.80215],"Red",[1,1],45,600], + [[1510.05,4462.08,8.78775],"Red",[1,1],45,600], + [[1513.5,4460.18,8.78775],"Red",[1,1],45,600], + [[1517.47,4443.51,8.76061],"Red",[1,1],45,600], + [[1519.97,4441.78,8.76138],"Red",[1,1],45,600], + [[30312.3,328.318,10.5972],"Red",[1,1],45,600], + [[30323,357.482,10.3831],"Red",[1,1],45,600], + [[30328.1,352.36,10.3831],"Red",[1,1],45,600], + [[30302.8,337.426,10.5933],"Red",[1,1],45,600], + [[30311.9,343.204,10.512],"Red",[1,1],45,600], + [[30325.5,354.344,10.3831],"Red",[1,1],45,600], + [[30317.5,338.023,10.5119],"Red",[1,1],45,600], + [[30317.9,356.845,10.4068],"Red",[1,1],45,600], + [[30326.3,338.987,10.4641],"Red",[1,1],45,600], + [[30313.4,352.867,10.454],"Red",[1,1],45,600], + [[30321.1,359.599,18.8493],"Red",[1,1],45,600], + [[30320.3,354.53,19.22],"Red",[1,1],45,600], + [[30328.1,352.542,19.22],"Red",[1,1],45,600], + [[30328.7,347.037,19.22],"Red",[1,1],45,600], + [[30326.2,354.334,19.22],"Red",[1,1],45,600], + [[30324.3,350.251,19.22],"Red",[1,1],45,600], + [[30321.7,361.519,18.8494],"Red",[1,1],45,600], + [[30331.1,344.269,10.4068],"Red",[1,1],45,600], + [[30337.9,356.851,10.3874],"Red",[1,1],45,600], + [[30333.8,347.824,18.8493],"Red",[1,1],45,600], + [[30331,349.496,10.3831],"Red",[1,1],45,600], + [[30334.7,354.323,19.301],"Red",[1,1],45,600], + [[30336.1,357.85,16.8272],"Red",[1,1],45,600], + [[30337,356.835,16.8272],"Red",[1,1],45,600], + [[30335.7,357.54,13.6465],"Red",[1,1],45,600], + [[30338.5,357.68,13.6465],"Red",[1,1],45,600], + [[30359.9,388.412,7.29871],"Red",[1,1],45,600], + [[30356.3,385.398,7.2987],"Red",[1,1],45,600], + [[30353.1,383.218,7.29856],"Red",[1,1],45,600], + [[30354,379.849,7.29844],"Red",[1,1],45,600], + [[30357.4,383.452,7.29883],"Red",[1,1],45,600], + [[30351.6,381.701,7.29844],"Red",[1,1],45,600], + [[30352.6,378.531,7.29876],"Red",[1,1],45,600], + [[30349.8,379.582,7.29854],"Red",[1,1],45,600], + [[30349.4,375.981,7.29865],"Red",[1,1],45,600], + [[30342.2,371.13,7.29858],"Red",[1,1],45,600], + [[30337.7,365.986,10.3904],"Red",[1,1],45,600], + [[30343.2,363.466,10.3904],"Red",[1,1],45,600], + [[30341.4,361.458,10.3904],"Red",[1,1],45,600], + [[30338.6,361.629,10.387],"Red",[1,1],45,600], + [[30335.8,364.096,10.3844],"Red",[1,1],45,600], + [[30332.3,360.701,10.3844],"Red",[1,1],45,600], + [[30360,391.721,7.29867],"Red",[1,1],45,600], + [[30354,394.442,7.29865],"Red",[1,1],45,600], + [[30358.6,398.449,7.29865],"Red",[1,1],45,600], + [[30352,391.828,7.29865],"Red",[1,1],45,600], + [[30363.1,389.312,7.29867],"Red",[1,1],45,600], + [[30365.5,383.111,7.29865],"Red",[1,1],45,600], + [[30368.5,386.619,7.29867],"Red",[1,1],45,600], + [[30363.4,380.501,7.29865],"Red",[1,1],45,600], + [[30372,390.352,7.29865],"Red",[1,1],45,600], + [[30360.8,401.388,7.29865],"Red",[1,1],45,600], + [[30384.3,418.307,8.83012],"Red",[1,1],45,600], + [[30386.9,414.176,8.83011],"Red",[1,1],45,600], + [[30389.8,411.266,8.83011],"Red",[1,1],45,600], + [[30378.4,399.906,8.83012],"Red",[1,1],45,600], + [[30376.5,418.074,11.1689],"Red",[1,1],45,600], + [[30380.4,419.078,8.83012],"Red",[1,1],45,600], + [[30373.4,402.268,8.83011],"Red",[1,1],45,600], + [[30377.6,416.098,8.83011],"Red",[1,1],45,600], + [[30370.9,412.309,11.1689],"Red",[1,1],45,600], + [[30372.3,401.181,8.83013],"Red",[1,1],45,600], + [[30368.7,394.818,7.29844],"Red",[1,1],45,600], + [[30365.2,390.703,7.29844],"Red",[1,1],45,600], + [[30369.3,397.323,7.29844],"Red",[1,1],45,600], + [[30363.5,394.726,7.29868],"Red",[1,1],45,600], + [[30367.8,398.616,7.29866],"Red",[1,1],45,600], + [[30386.8,428.076,8.83012],"Red",[1,1],45,600], + [[30380.2,429.102,8.81572],"Red",[1,1],45,600], + [[30382.5,432.318,8.81572],"Red",[1,1],45,600], + [[30392,413.713,8.83012],"Red",[1,1],45,600], + [[30398.1,417.635,8.83012],"Red",[1,1],45,600], + [[30415.4,429.671,8.79047],"Red",[1,1],45,600], + [[30405.6,433.02,8.78939],"Red",[1,1],45,600], + [[30401.5,436.708,8.78935],"Red",[1,1],45,600], + [[30399.5,434.412,8.78858],"Red",[1,1],45,600], + [[30403.4,430.802,8.78844],"Red",[1,1],45,600] +]; + +_aiScubaGroupParameters = [ + +]; + +_vehiclePatrolParameters = [ +]; + +_airPatrols = [ + ["B_Heli_Transport_01_F",[1497.91,4454.91,8.81003],"Red",1700,600], + ["B_Heli_Transport_01_F",[1520.08,4438.22,8.76003],"Red",1700,600], + ["B_Heli_Transport_01_F",[30385.9,416.202,8.838],"Red",1700,600], + ["B_Heli_Transport_01_F",[30405,436.382,8.788],"Red",1700,600] +]; + +_missionEmplacedWeapons = [ +]; + +_submarinePatrolParameters = [ +]; + +_missionLootBoxes = [ + ["CargoNet_01_barrels_F",[1499.12,4463.46,8.80071],[[0.80658,-0.591125,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[1498.92,4465.68,8.80103],[[0.796447,-0.604708,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[1497.93,4464.4,8.80103],[[0.796447,-0.604708,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[1501.3,4463.92,8.80071],[[-0.805457,0.592654,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["CargoNet_01_barrels_F",[1500.07,4464.73,8.8007],[[0.80658,-0.591125,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[1500.36,4462.63,8.80038],[[-0.805457,0.592654,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["CargoNet_01_barrels_F",[1501.52,4461.7,8.80071],[[0.80658,-0.591125,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[1503.69,4462.17,8.80103],[[-0.805457,0.592654,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["CargoNet_01_barrels_F",[1502.46,4462.97,8.8007],[[0.80658,-0.591125,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[1502.75,4460.87,8.80071],[[-0.805457,0.592654,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["CargoNet_01_barrels_F",[30376.4,419.433,8.82867],[[0.67703,0.735955,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["CargoNet_01_barrels_F",[30377.6,418.35,8.82868],[[0.67703,0.735955,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[30376.5,417.272,8.82899],[[0.689405,0.724376,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[30378.5,419.487,8.82835],[[-0.678416,-0.734678,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[30375.3,418.397,8.82899],[[0.689405,0.724376,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[30377.3,420.563,8.82868],[[-0.678416,-0.734678,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["CargoNet_01_barrels_F",[30379.6,420.535,8.82868],[[0.67703,0.735955,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[30379.4,422.748,8.82899],[[-0.678416,-0.734678,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["CargoNet_01_barrels_F",[30378.4,421.618,8.82867],[[0.67703,0.735955,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["B_CargoNet_01_ammo_F",[30380.5,421.671,8.82868],[[-0.678416,-0.734678,0],[0,0,1]],[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/@GMS/addons/custom_server/Missions/Static/missions/garrison.sqf b/@GMS/addons/custom_server/Missions/Static/missions/garrison.sqf new file mode 100644 index 0000000..27e566c --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/missions/garrison.sqf @@ -0,0 +1,126 @@ + + + + +/* + 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 garrison example"; // 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 + +_markerMissionName = "Bad People Live Here"; +_missionLandscapeMode = "precise"; +_markerLabel = ""; +//_markerType = ["ellipse",[200,200],"GRID"]; +// An alternative would be: +_markerType = ["mil_triangle",[0,0]]; +_markerColor = "Default"; + +_missionCenter = [23714.1,18313.4,0]; + + +_garrisonedBuildings_BuildingPosnSystem = [ + ["Land_u_Shop_01_V1_F",[23733.9,18341.2,3.19],[[0,1,0],[0,0,1]],[true,true],"Red",0.67,3,[],10,600] +]; + +_garrisonedBuilding_ASLsystem = [ + ["Land_i_House_Big_02_V2_F",[23650.3,18331.9,3.19],[[0,1,0],[0,0,1]],[true,true],"Red",[["B_HMG_01_high_F",[1.43359,3.21875,0.259256],0],["B_GMG_01_high_F",[-2.79102,-5.32813,3.66659],0]],[[[-0.601563,-2.48633,0.260694],0]],600] +]; + +_missionLandscape = [ + // ["Land_i_House_Small_02_V3_F",[23641.6,18274,3.19],[[0,1,0],[0,0,1]],[true,true]], + // ["Sign_Arrow_Yellow_F",[23681.8,18302.1,3.19],[[0,1,0],[0,0,1]],[true,true]], + // ["Land_Slum_House03_F",[23736.2,18265.6,3.19],[[0,1,0],[0,0,1]],[true,true]], + // ["Sign_Sphere100cm_F",[23734.7,18341,3.49308],[[0,1,0],[0,0,1]],[true,true]] +]; + +_aiGroupParameters = [ + // [[23667,18267.7,3.19144],"Red",[3,6],45,600], + // [[23736.5,18302.4,3.19144],"Red",[3,6],45,600] +]; + +_aiScubaGroupParameters = [ +]; + +_vehiclePatrolParameters = [ + // ["B_CTRG_LSV_01_light_F",[23634.3,18302.3,3.19],"Red",75,600], + // ["B_G_Van_02_transport_F",[23659.5,18299.2,3.19],"Red",75,600], + // ["O_G_Van_01_transport_F",[23681.9,18303,3.18987],"Red",75,600], + ["B_LSV_01_armed_F",[23798.9,18344.5,3.19],"Red",75,600] +]; + +_airPatrols = [ + // ["B_Heli_Light_01_dynamicLoadout_F",[23699.9,18290.7,3.19],"Red",1700,600] +]; + +_missionEmplacedWeapons = [ + // ["B_HMG_01_F",[23686.1,18338.7,3.19],"Red",0,600] +]; + +_submarinePatrolParameters = [ +]; + +_missionLootBoxes = [ + // [selectRandom blck_crateTypes,[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts], + //["Box_FIA_Ammo_F",[23653.6,18333.1,3.44926],[[0,1,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["Box_FIA_Ammo_F",[23729.4,18298.2,3.19],[[0,1,0],[0,0,1]],[true,false],_crateLoot,_lootCounts] +]; + +_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. +_noVehiclePatrols = blck_SpawnVeh_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4]; +_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]; +// 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]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/Static/missions/pinkPoison2.sqf b/@GMS/addons/custom_server/Missions/Static/missions/pinkPoison2.sqf new file mode 100644 index 0000000..395b002 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/Static/missions/pinkPoison2.sqf @@ -0,0 +1,129 @@ + + +/* + 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. + +_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 + + +// An alternative would be: +_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. + +/* + Paste output from pulling marker information HERE +*/ +_markerType = ["mil_triangle",[0,0]]; +_markerColor = "Default"; +_markerLabel = "Bad People Live Here"; + +/* + Paste the output from puling static mission information here. +*/ +_garrisonedBuildings_BuildingPosnSystem = [ + ["Land_u_Shop_01_V1_F",[23733.9,18341.2,0],[[0,1,0],[0,0,1]],[true,true],0.67,3,[],10,0] +]; + +_garrisonedBuilding_ATLsystem = [ + ["Land_i_House_Big_02_V2_F",[23650.3,18331.9,3.19],[[0,1,0],[0,0,1]],true,true,[["B_HMG_01_high_F",[1.43359,3.21875,0.259256],0],["B_GMG_01_high_F",[-2.79102,-5.32813,3.66659],0]],[[[-0.601563,-2.48633,0.260694],0]],0] +]; + +_missionLandscape = [ + ["Land_i_House_Small_02_V3_F",[23641.6,18274,0],[[0,1,0],[0,0,1]],[true,true]], + ["Sign_Arrow_Yellow_F",[23681.8,18302.1,0],[[0,1,0],[0,0,1]],[true,true]], + ["Land_Slum_House03_F",[23736.2,18265.6,0],[[0,1,0],[0,0,1]],[true,true]], + ["Sign_Sphere100cm_F",[23734.7,18341,0.30308],[[0,1,0],[0,0,1]],[true,true]] +]; + +_aiGroupParameters = [ + [[23667,18267.7,3.19144],"Red",[3,6],45,0], + [[23736.5,18302.4,3.19144],"Red",[3,6],45,0] +]; + +_aiScubaGroupParameters = [ +]; + +_vehiclePatrolParameters = [ + ["B_CTRG_LSV_01_light_F",[23634.3,18302.3,-4.76837e-007],"Red",75,0], + ["B_G_Van_02_transport_F",[23659.5,18299.2,0],"Red",75,600], + ["O_G_Van_01_transport_F",[23681.9,18303,-0.00013113],"Red",75,0], + ["B_LSV_01_armed_F",[23798.9,18344.5,-4.76837e-007],"Red",75,0] +]; + +_airPatrols = [ + ["B_Heli_Light_01_dynamicLoadout_F",[23699.9,18290.7,0],"Red",1700,0] +]; + +_missionEmplacedWeapons = [ + ["B_HMG_01_F",[23686.1,18338.7,0],"Red",0,0] +]; + +_submarinePatrolParameters = [ +]; + +_missionLootBoxes = [ + ["Box_FIA_Ammo_F",[23653.6,18333.1,0.259255],[[0,1,0],[0,0,1]],[true,false],_crateLoot,_lootCounts], + ["Box_FIA_Ammo_F",[23729.4,18298.2,0],[[0,1,0],[0,0,1]],[true,false],_crateLoot,_lootCounts] +]; + + + + +////////// +// 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/@GMS/addons/custom_server/Missions/Static/missions/privateVars.sqf b/@GMS/addons/custom_server/Missions/Static/missions/privateVars.sqf new file mode 100644 index 0000000..c479e4c --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf index 1b5fbbc..cc01a84 100644 --- a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf +++ b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Epoch.sqf @@ -3,9 +3,8 @@ 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. */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_weapons","_sideArms","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; + +#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. @@ -46,7 +45,7 @@ _lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange _markerLabel = ""; -//_markerType = ["ELIPSE",[200,200],"GRID"]; +//_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 @@ -55,7 +54,7 @@ _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_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]] @@ -65,10 +64,10 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her // [["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], + [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] + [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. @@ -76,7 +75,7 @@ _missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output her _missionLootVehicles = [ // Paste appropriate lines from the output of M3EDEN Editor here and add the loot crate type and loot counts at the end of each entry as shown in the example below. // Many vehicles have less inventory capacity than crates so you may have to modify _lootcounts to avoid having stuff spawned all over the ground. //["Exile_Car_Van_Box_Guerilla02",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]], - //["Exile_Car_Van_Fuel_Guerilla02",[22919,16782.7,3.18132],[[0,1,0],[0.00129187,0,0.999999]],[true,false],_crateLoot, _lootCounts] + ["Exile_Car_Van_Fuel_Guerilla02",[22919,16782.7,3.18132],[[0,1,0],[0.00129187,0,0.999999]],[true,false],_crateLoot, _lootCounts] ]; // [ ["vehicleClassName", [px, py, pz] /* possition at which to spawn*/, _loot /* pointer to array of loot (see below)]; // When blank nothing is spawned. // You can use the same format used for _missionLootBoxes to add vehicles with/without loot. @@ -86,8 +85,8 @@ _noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a num // or _noEmplacedWeapons = 3; // a constant number of emplaced weps per misison // Note that this value is ignored if you define static weapon positions and types in the array below. _missionEmplacedWeapons = [ - //["B_G_Mortar_01_F",[22867.3,16809.1,3.17968],"red",0,0], - ["B_HMG_01_high_F",[22825.3,16923.5,3.14243],"blue",0,10] + ["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. @@ -101,18 +100,18 @@ _aiGroupParameters = [ //[[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], +// [[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] + [[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] + ["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). @@ -121,8 +120,8 @@ _aircraftTypes = blck_patrolHelisRed; // You can use one of the pre-defined li _noAirPatrols = blck_noPatrolHelisRed; // You can use one of the pre-defined values or a custom one. acceptable values are integers (1,2,3) or a range such as [2,4]; // Note: this value is ignored if you specify air patrols in the array below. _airPatrols = [ - //["Exile_Chopper_Huey_Armed_Green",[22923.4,16953,3.19],"red",1000,900]//, - [selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60] + ["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. diff --git a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf index e5bb931..f96e8df 100644 --- a/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf +++ b/@GMS/addons/custom_server/Missions/Static/missions/staticMissionExample2_Exile.sqf @@ -14,9 +14,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_weapons","_sideArms","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines"]; + +#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. @@ -57,7 +56,7 @@ _lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange _markerLabel = ""; -//_markerType = ["ELIPSE",[200,200],"GRID"]; +//_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 diff --git a/@GMS/addons/custom_server/Missions/Static/missions/template.sqf b/@GMS/addons/custom_server/Missions/Static/missions/template.sqf new file mode 100644 index 0000000..c9f0027 --- /dev/null +++ b/@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/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_sm_initializeUMSStaticMission.sqf b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_sm_initializeUMSStaticMission.sqf index 82ed1b1..e1ed9a3 100644 --- a/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_sm_initializeUMSStaticMission.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/code/GMS_fnc_sm_initializeUMSStaticMission.sqf @@ -15,6 +15,17 @@ params["_mission"]; // 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 diff --git a/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf b/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf index 5fbabd7..195cc67 100644 --- a/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/dynamicMissions/default.sqf @@ -51,7 +51,7 @@ _lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts _startMsg = "Pirates were spotted off the coast - intercept them and collect the loot"; _endMsg = "The pirates were defeated"; _markerLabel = ""; -//_markerType = ["ELIPSE",[200,200],"GRID"]; +//_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 diff --git a/@GMS/addons/custom_server/Missions/UMS/staticMissions/privateVars.sqf b/@GMS/addons/custom_server/Missions/UMS/staticMissions/privateVars.sqf new file mode 100644 index 0000000..02028d5 --- /dev/null +++ b/@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"]; + + // _mission diff --git a/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf b/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf index 588ca8c..6fdac77 100644 --- a/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Epoch.sqf @@ -13,9 +13,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"]; + +#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. @@ -56,7 +55,7 @@ _lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange _markerLabel = ""; -//_markerType = ["ELIPSE",[200,200],"GRID"]; +//_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 diff --git a/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf b/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf index a28a235..692deab 100644 --- a/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/staticMissions/staticMissionExample2_Exile.sqf @@ -13,9 +13,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"]; + +#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. @@ -56,7 +55,7 @@ _lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts // blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange _markerLabel = ""; -//_markerType = ["ELIPSE",[200,200],"GRID"]; +//_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 diff --git a/@GMS/addons/custom_server/Missions/privateVars.sqf b/@GMS/addons/custom_server/Missions/privateVars.sqf index f9e31b5..809d007 100644 --- a/@GMS/addons/custom_server/Missions/privateVars.sqf +++ b/@GMS/addons/custom_server/Missions/privateVars.sqf @@ -3,4 +3,5 @@ private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_marke "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", "_uniforms","_headgear","_weaponList","_sideArms","_vests","_backpacks","_chancePara","_noPara","_chanceHeliPatrol","_noChoppers","_missionHelis", "__noChoppers","_endCondition","_chanceHeliLootDropped","_chanceLoot","_paraTriggerDistance","_paraLootCounts","_paraLoot","_markerColor","_loadCratesTiming", - "_markerType","_useMines","_assetKilledMsg","_enemyLeaderConfig","_hostageConfig"]; \ No newline at end of file + "_markerType","_useMines","_assetKilledMsg","_enemyLeaderConfig","_hostageConfig","_garrisonedBuildings_BuildingPosnSystem","_garrisonedBuilding_ATLsystem", + "_submarinePatrolParameters","_scubaGroupParameters"]; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Missions/pullDynamicMission.sqf b/@GMS/addons/custom_server/Missions/pullDynamicMission.sqf new file mode 100644 index 0000000..98f15e8 --- /dev/null +++ b/@GMS/addons/custom_server/Missions/pullDynamicMission.sqf @@ -0,0 +1,495 @@ + + +_fn_isInside = { // returns true if an object is inside, underneath or on top of a building otherwise returns false. + ////////////////////// + // Determin if a unit is inside a building using two separate checkVisibility + ////////////////////// + // lineIntersects [ eyePos player, aimPos chopper, player, chopper] + params["_u",["_category","House"]]; + private ["_u","_pos","_above","_below"]; + _pos = getPosASL _u; + _above = lineIntersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u]; + _below = lineintersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 2],_u]; + diag_log format["_fn_isInside: _u %1 | _category = %5 | typeOf _u %4 | _above %2 | _below %3 ",_u,_above,_below,typeOf _u, _category]; + // If there is something above or below the object do a quick double-check to make sure there is a building there and not something else. + if (_above) then // test if any surfaces above are from buildingPos + { + _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,100]; + _above = false; + { + //diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)]; + if ((_x select 2) isKindOf _category) then {_above = true}; + }forEach _surfacesAbove; + }; + if (_below) then + { + _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100]; + _above = false; + { + //diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)]; + if ((_x select 2) isKindOf _category) then {_above = true}; + }forEach _surfacesBelow; + }; + + _isInside = if (_above || _below) then {true} else {false}; + //diag_log format["_fn_isInside: _isInside = %1",_isInside]; + _isInside +}; + +_fn_buildingContainer = { // returns the builing containing an object or objNull + private["_u","_pos","_building","_surfacesAbove","_surfacesBelow"]; + params["_u",["_category","House"]]; + _pos = getPosASL _u; + private _building = objNull; + // lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique] + _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,10]; + diag_log format["_surfacesAbove = %1",_surfacesAbove]; + { + if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; + } forEach _surfacesAbove; + if (_building isEqualTo objNull) then + { + _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100]; + diag_log format["_surfacesBelow = %1",_surfacesBelow]; + { + if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; + } forEach _surfacesBelow; + }; + diag_log format["_fn_buildingContainer: _u = %1 | _building = %2",_u,_building]; + _building +}; + +_fn_isInfantry = { // returns true if a unit is on foot otherwise returns false. + ////////////////////// + // Determine if a unit isinfantry rather than a unit manning a turret or vehicle + ////////////////////// + _u = _this select 0; + private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false}; + //diag_log format["_fn_isInfantry: _isInfantry = %1",_isInfantry]; + _isInfantry +}; + +diag_log "========== =========================="; + +/////////////////// +// Define some values for our AI +// Change values of these variables to suit your needs +/////////////////// +#define aiDifficulty "Red" +#define minAI 3 +#define maxAI 6 +#define minPatrolRadius 30 +#define maxPatrolRadius 45 +#define AI_respawnTime 600 +#define aiVehiclePatrolRadius 75 +#define vehiclePatrolRespawnTime 600 +#define staticWeaponRespawnTime 600 +#define aiAircraftPatrolRespawnTime 600 +#define aiAircraftPatrolRadius 1700 +#define oddsOfGarrison 0.67 +#define maxGarrisonStatics 3 +#define maxGarrisonUnits 4 +#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls +#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient. +#define unitMarkerObject "Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction. +#define objectAtMissionCenter "RoadCone_L_F" +#define lootVehicleMarker "Sign_Arrow_F" +#define landVehicles "LandVehicle" + +/////////////////// +// Define the coordinates of the center of the mission. +/////////////////// + +CENTER = [0,0,0]; + +if (isNil "CENTER" || CENTER isEqualTo [0,0,0]) then +{ + hint "Please define a center point for your mission"; + _obj = allMissionObjects objectAtMissionCenter; + _obj1 = _obj select 0; + diag_log format["Determining position of first roadcone found which is located at %1 with player found at %2",getPos _obj1,position Player]; + if (count _obj > 0) then + { + CENTER = [3,3,0] vectorAdd (getPosATL _obj1); + }; + hint format["Position of Road Cone at %1 used to define mission center",CENTER]; + diag_log format["Position of Road Cone at %1 used to define mission center",CENTER]; + diag_log format["Player located at position %1",position player]; +}; + +/////////////////// +// Identify any buildings in which a garrison should be spawned using the Arma building positions. +// Tell the script which buildings to garrison by placing an object inside that designates them as such. +// I use a large yellow sphere for this purpose. +// The function below assembles a list of such buildings for use in defining the data for mission buildings. +/////////////////// + +_cb = ""; + +////////////////// +// *** OPTIONAL **** +// Place a marker over your mission and configure it as you would like to to appear in the tame. +// The marker configuration will be included in the output of this script. +// Note ** Only the first marker placed will be processed ** +// Configure Marker +///////////////// +/* + _markerType = ["ELIPSE",[175,175],"GRID"]; + _markerType = ["mil_triangle",[0,0]]; +*/ +_allmkr = allMapMarkers; +diag_log format["_allmkr = %1",_allmkr]; +if (count _allmkr == 0) then +//if !(typeName _mk isEqualTo "STRING") then +{ + hint "No Marker Found, no Marker Definitions Will Be generated"; + uiSleep 5; +} else { + _mk = _allmkr select 0; + diag_log format["_mk = %1",_mk]; + + if ((getMarkerType _mk) in ["ELIPSE","RECTANGLE"]) then + { + _cb = _cb + format['_markerType = ["%1",%2,%3];%4',getMarkerType _mk,getMarkerSize _mk,markerBrush _mk,endl]; + } else { + _cb = _cb + format['_markerType = ["%1",[0,0]];%2',getMarkerType _mk,endl]; + }; + _cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl]; + _cb = _cb + format['_markerLabel = "%1";%2',MarkerText _mk,endl]; + _cb = _cb + format["%1%1",endl]; +}; + +//////////////////////// +// Begin pulling data here +/////////////////////// + +_cb = _cb + format["_garrisonedBuildings_BuildingPosnSystem = [",endl]; +private _garrisonedBuildings = []; +private _allStatics = []; +_helpers = allMissionObjects garrisonMarkerObject; +//diag_log format["_helpers = %1",_helpers]; +{ + if ( (typeOf _x) isEqualTo garrisonMarkerObject) then + { + private _isInside = [_x] call _fn_isInside; + if (_isInside) then + { + _building = [_x] call _fn_buildingContainer; + _garrisonedBuildings pushbackunique _building; + _garrisonedBuildings pushbackunique _x; + // data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/], + // 1 2 3 4 5 6 7 8 9 + _line = format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits]; + systemChat _line; + //diag_log _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + }; +} forEach _helpers; +_cb = _cb + format["%1];%1%1",endl]; + +_logging = format["_garrisonedBuildings = %1",_garrisonedBuildings]; +//diag_log _logging; +systemChat _logging; +//diag_log format["_cb = %1%2",endl,_cb]; + +_configuredStatics = []; +_configuredUnits = []; +/* + This bit will set up the garrison for each building having units and / or statics inside it or on top. + Coding must ensure that nothing is repeated but everything is captured. +*/ + +_fn_configureGarrisonForBuildingATL = { + private["_b","_staticsInBuilding","_unitsInBuilding","_staticsText","_unitsText","_buildingGarrisonATL","_staticsInBuilding","_unitsInBuilding","_count"]; + _b = _this select 0; + _count = 0; + if (_b in _garrisonedBuildings) exitWith {""}; + _staticsText = ""; + _unitsText = ""; + _buildingGarrisonATL = ""; + _staticsInBuilding = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)]; + { + if !(_x in _configuredStatics) then + { + _isInside = [_x] call _fn_isInside; + if (_isInside) then {_building = [_x] call _fn_buildingContainer}; + if (_b isEqualTo _building) then + { + _configuredStatics pushBackUnique _x; + + if (_staticsText isEqualTo "") then + { + _staticsText = format['["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + } else { + _staticsText = _staticsText + format[',["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + }; + }; + }; + } forEach _staticsInBuilding; + _unitsInBuilding = nearestObjects[getPosATL _building,[unitMarkerObject],sizeOf (typeOf _building)]; + + { + if !(_x in _configuredUnits) then + { + _isInside = [_x] call _fn_isInside; + if (_isInside) then {_building = [_x] call _fn_buildingContainer}; + if (_b isEqualTo _building) then + { + _configuredUnits pushBackUnique _x; + + if (_unitsText isEqualTo "") then + { + _unitsText = format["[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + } else { + _unitsText = _unitsText + format[",[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + }; + _count = _count + 1; + }; + }; + } forEach _unitsInBuilding; + if ( !(_staticsText isEqualTo "") || !(_unitsText isEqualTo "")) then + { + _buildingGarrisonATL = format[' ["%1",%2,%3,%4,%5,[%6],[%7]]',typeOf _b,(getPosATL _b) vectorDiff CENTER,getDir _b,'true','true',_staticsText,_unitsText]; + _garrisonedBuildings pushBackUnique _b; + }; + _buildingGarrisonATL +}; + +private _count = 0; +_cb = _cb + "_garrisonedBuilding_ATLsystem = ["; +{ + private _isInside = [_x] call _fn_isInside; + if (_isInside) then + { + private _building = [_x] call _fn_buildingContainer; + private _include = if ( !(_building in _garrisonedBuildings) && !((typeOf _building) isEqualTo unitMarkerObject) && !((typeOf _building) isEqualTo garrisonMarkerObject)) then {true} else {false}; + if (_include) then + { + //diag_log format["_x = %1 | _building = %1",_x,_building]; + private _buildingGarrisonInformation = [_building] call _fn_configureGarrisonForBuildingATL; + //diag_log format["_buildingGarrisonInformation = %1",_buildingGarrisonInformation]; + if (_count == 0) then + { + _cb = _cb + format["%1%2",endl,_buildingGarrisonInformation]; + } else { + _cb = _cb + format[",%1%2",endl,_buildingGarrisonInformation]; + }; + + _count = _count + 1; + }; + }; + +} forEach ((allMissionObjects "StaticWeapon") + (allMissionObjects unitMarkerObject)); +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Configure info remaining mission landscape +/////////////////// +_land = allMissionObjects "Static"; + +_cb = _cb + format["_missionLandscape = [",endl]; +{ + diag_log format["evaluating mission landscape: _x = %1 | typeOf _x = %1",_x, typeOf _x]; + //diag_log format["evaluating mission landscape: _x %1 | typeOf _x %1",_x, _x isKindOf "Helper_Base_F"]; + if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then + { + _line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; + + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +}forEach allMissionObjects "Static"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Configure loot boxes +/////////////////// +_cb = _cb + "_missionLootBoxes = ["; +{ + _line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; +}forEach ((allMissionObjects "ReammoBox") + (allMissionObjects "ReammoBox_F")); +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup Info for loot vehicles +/////////////////// +_missionLootVehicles = []; +_missionVehicles = ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship"); +_lootVehicleMarkers = allMissionObjects lootVehicleMarker; +diag_log format["_lootVehicleMarkers = %1",_lootVehicleMarkers]; +_cb = _cb + format["_missionLootVehicles = ["]; +{ + _kindOf = "nothing"; + _isInside = [_x,"Car"] call _fn_isInside; + if (_isInside) then {_kindOf = "Car"}; + if !(_isInside) then {_isInside = [_x,"Ship"] call _fn_isInside}; + if (_isInside) then {_kindOf = "Ship"}; + if (_isInside) then + { + + _object = [_x,_kindOf] call _fn_buildingContainer; + diag_log format["object %1 is inside object %2",_x,_object]; + _missionLootVehicles pushBack _object; + _line = format[' ["%1",%2,%3,%4,%5]',typeOf _object,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +} forEach allMissionObjects lootVehicleMarker; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup Info for vehicle patrols +/////////////////// +_cb = _cb + format["_missionPatrolVehicles = ["]; +{ + if ( !((typeOf _x) isKindOf "SDV_01_base_F") && !(_x in _missionLootVehicles) ) then + { + _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship"); +_cb = _cb + format["%1];%1%1",endl]; + +_cb = _cb + "_submarinePatrolParameters = ["; +{ + if ((typeOf _x) isKindOf "SDV_01_base_F") then + { + _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +}forEach allMissionObjects "Ship"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Configs for Air Patrols +/////////////////// +_cb = _cb + "_airPatrols = ["; + //[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60] +{ + _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; +}forEach allMissionObjects "Air"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup info for remaining static/emplaced weapons +/////////////////// +_cb = _cb + format["_missionEmplacedWeapons = ["]; +{ + + if !(_x in _configuredStatics) then + { + // ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10] + _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + +}forEach allMissionObjects "StaticWeapon"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup information for infantry groups spawning outside buildings +/////////////////// +_cb = _cb + format["_missionGroups = ["]; +{ + //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], + _isInside = [_x] call _fn_isInside; + _isInfantry = [_x] call _fn_isInfantry; + //diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry]; + if (_isInfantry) then + { + if (!(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x)) then + { + _line = format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + }; +}forEach allMissionObjects "Man"; +_cb = _cb + format["%1];%1%1",endl]; + +_cb = _cb + "_scubaGroupParameters = ["; +{ + //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], + _isInside = [_x] call _fn_isInside; + _isInfantry = [_x] call _fn_isInfantry; + //diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry]; + if (_isInfantry) then + { + if ((surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x)) then + { + _line = format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + }; +}forEach allMissionObjects "Man"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// All done, notify the user and copy the output to the clipboard +/////////////////// +_msg = "All Objects organzied, formated and copied to the Clipboard"; +hint _msg; +systemChat _msg; +systemChat format["_cb has %1 characters",count _cb]; +copyToClipboard _cb; +diag_log "DONE"; + diff --git a/MPMissions/Exile.Altis/debug/blckClient.sqf b/MPMissions/Exile.Altis/debug/blckClient.sqf index 856b475..952619a 100644 --- a/MPMissions/Exile.Altis/debug/blckClient.sqf +++ b/MPMissions/Exile.Altis/debug/blckClient.sqf @@ -55,7 +55,8 @@ GMS_fnc_addHostageActions = { private _hostage = _this; - private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage},[],1,showWindow,hideOnUse, "","alive _target", 3]; + //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 = { @@ -67,7 +68,7 @@ GMS_fnc_initHostage = { private _hostage = _this; - if (blck_modType isEqualTo "Epoch") then {_hostage call GMS_fnc_addHostageActions}; + _hostage call GMS_fnc_addHostageActions; _hostage call GMS_fnc_addAssetAnimations; diag_log format["_fnc_initHostage: hostage %1 initialized",_hostage]; }; @@ -109,19 +110,16 @@ GMS_fnc_addLeaderActions = { private _leader = _this; - private _handle = _leader addAction ["Capture",{_this call GMS_fnc_arrestLeader},[],1,showWindow,hideOnUse, "","alive _target", 3]; + private _handle = _leader addAction ["Under Arrest",{_this call GMS_fnc_arrestLeader},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)]; }; GMS_fnc_initLeader = { private _leader = _this; - if (blck_modType isEqualTo "Epoch") then {_leader call GMS_fnc_addLeaderActions}; + _leader call GMS_fnc_addLeaderActions; _leader call GMS_fnc_addAssetAnimations; diag_log format["_fnc_initLeader: Leader %1 initialized",_leader]; }; - GMS_fnc_clearAllActions = { - removeAllActions (_this select 0); - }; if !(isServer) then { //diag_log "[blckeagls] initializing client variables"; @@ -337,6 +335,6 @@ if !(isServer) then }; }; - diag_log "blck client loaded ver 7/29/18 for Version 6.84 8 PM"; + diag_log "blck client loaded ver 4/2/18 for Version 6.81 8 PM"; }; \ No newline at end of file diff --git a/MPMissions/epoch.Altis/debug/blckClient.sqf b/MPMissions/epoch.Altis/debug/blckClient.sqf index 856b475..952619a 100644 --- a/MPMissions/epoch.Altis/debug/blckClient.sqf +++ b/MPMissions/epoch.Altis/debug/blckClient.sqf @@ -55,7 +55,8 @@ GMS_fnc_addHostageActions = { private _hostage = _this; - private _handle = _hostage addAction ["Free Hostage",{_this call GMS_fnc_freeHostage},[],1,showWindow,hideOnUse, "","alive _target", 3]; + //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 = { @@ -67,7 +68,7 @@ GMS_fnc_initHostage = { private _hostage = _this; - if (blck_modType isEqualTo "Epoch") then {_hostage call GMS_fnc_addHostageActions}; + _hostage call GMS_fnc_addHostageActions; _hostage call GMS_fnc_addAssetAnimations; diag_log format["_fnc_initHostage: hostage %1 initialized",_hostage]; }; @@ -109,19 +110,16 @@ GMS_fnc_addLeaderActions = { private _leader = _this; - private _handle = _leader addAction ["Capture",{_this call GMS_fnc_arrestLeader},[],1,showWindow,hideOnUse, "","alive _target", 3]; + private _handle = _leader addAction ["Under Arrest",{_this call GMS_fnc_arrestLeader},[],1,showWindow,hideOnUse]; //,"",{alive _target}]; //,"", (alive _target)]; }; GMS_fnc_initLeader = { private _leader = _this; - if (blck_modType isEqualTo "Epoch") then {_leader call GMS_fnc_addLeaderActions}; + _leader call GMS_fnc_addLeaderActions; _leader call GMS_fnc_addAssetAnimations; diag_log format["_fnc_initLeader: Leader %1 initialized",_leader]; }; - GMS_fnc_clearAllActions = { - removeAllActions (_this select 0); - }; if !(isServer) then { //diag_log "[blckeagls] initializing client variables"; @@ -337,6 +335,6 @@ if !(isServer) then }; }; - diag_log "blck client loaded ver 7/29/18 for Version 6.84 8 PM"; + diag_log "blck client loaded ver 4/2/18 for Version 6.81 8 PM"; }; \ No newline at end of file diff --git a/Tools/Directions.txt b/Tools/Directions.txt deleted file mode 100644 index 3a1eb26..0000000 --- a/Tools/Directions.txt +++ /dev/null @@ -1,58 +0,0 @@ -Tools for blckeagls - -These tools should facilitate exporting information from the editor when creating new static or dynamic missions. - -I will cover configuration of Static Missions first. - -Because the tools are not yet available as a plug in for the editor, you need to do a bit of preparation to use them but its nothing too difficult. - -///////////////////// -The basic steps are: -///////////////////// -Lay out your mission in the editor. -Note that the first thing you do should be to place a unit who will be your player character while you use the tools. -Then, place the units, vehicles, structures, loot crates, and any other elements. -Ror static missions be sure to also place a marker. - -Now, copy the sqf files from the tool folders into your mission folder. -'Play' the mission. -Tools will be available through the action menu. - -For static missions, just scrolll through the options with your mouse wheel and select the option to "Add Static Mission Configuration to Clipboard". -The mission configurations will be copied to the clipboard. -Alt-Tab out and open your favorite text editor, then paste the output into a new file. -You are now ready to modify the static mission template by pasting in the information about markers and various units. -Note that you will have to define a few variables like _crateLoot and_lootCounts. - -Any other variables you wish to adjust in the template can be modified at this time. - -////////////////// -Dynamic Missions -///////////////// - -For dynamic missions, the steps are similar but a bit more is involved. - -First, configure yoru mission as above. - -Hit Play. -Set a mission center which is used to calculate the relative position of objects. -You can define it by placing a traffic cone with a light on it at the center point of your mission then selecting the action menu choice to use it a the center -OR -by moving to the spot you want to be the center and selecting the appropriate option with your mouse wheel. -Next just select the menu option you want for the mode in which configs are exported. -There are two possible methods to export configurations. -The first dumps everything into a single list of objects. -The second pre-configures the definitions used in the mission file. -The output is copied to the clipboard as above. -Once the script is done just paste ito you script editor and merge that content with a mission template. - -//////////////// -CONFIGURATION -/////////////// - -Variables used are defined in init.sqf - -////////////// -Limitations -///////////// - diff --git a/Tools/Dynamic Missions/Dynamic Missions-How To.txt b/Tools/Dynamic Missions/Dynamic Missions-How To.txt new file mode 100644 index 0000000..68b6807 --- /dev/null +++ b/Tools/Dynamic Missions/Dynamic Missions-How To.txt @@ -0,0 +1,47 @@ +This tool formats most of the data required for dynamic missions based on what is present in your mission. +This include the layout of buildings, loot crates, markers, static weapons, and garrisons in buildings. +I recommend that you lay out dynamically spawned missions in the virtual reality map which minimizes confounding influences. + +A minimal mission would include: + A marker. + A way to define the mission center, which is a reference point relative to which everything is spawned. + The mission system will spawn AI, loot chests, emplaced weapons, vehicles and aircraft according to the defaults for the mission difficulty. + +The basic blckeagls missions have a bit more defined, usually some buildings to provide cover and make things more interesting. + +Now, you can add more detail including defining where infantry and statics spawn, where the one or more loot crates spawn, where vehicle patrols spawn and so forth. + To do this just place the representative objects where you want the mission to spawn them and the script should do the rest. + For infantry patrols, put one unit where you want the group to spawn. + Note: uniforms, weapons and other AI gear are not captured. You can however define _uniforms, _weapons and other AI gear for that mission. see the template and default2 missions for examples. + +You can also have infantry and/or static weapons garrison buildings using either of two approaches. + 1. place an object fo type garrisonMarkerObject inside the building you want to garrison. + I use a 100 cm sphere which is the default because it is easy to see and not used for much else. + The script will ensure that this building is identified for a garrison which will be spawned at the Arma pre-defined buildingPositions. + + 2. Manualy place statics and units inside buildings where you want them to spawn. + Infantry will change position (crouch, prone, stand) and turn but will not move which prevents their normal behavior to leave the buliding and look for players. + The position of statics (e.g., HMG, GMG) will be recorded accurately. + By default, the script looks for arrows. this is so that if you pull mission data as a player the locations are recorded acccurately (more on that below). + You can of course just place the units where you want them. + Regardless, be sure that unitMarkerObject is set to the classname of the object you use to demarcate the position of infantry units. + If you do use AI units to designate positions for your infantry, be sure to pull the data while in the editor rather than when playing the mission (see below). + + 3. You are now almost ready to pull the mission data. + I recommend that you use a road cone with a flashing light to define the mission center. + This is the approach I have taken for all blckeagles missions to date. + You could also use a loot crate. + The actual mission center will be offset 3 meters from this position for technical reasons. + +Once all that is done you are ready to pull the mission information. +To do that, from the EDEN Editor, + 1. go to tools\debug console. + 2. type execVM "pullDynamicMission.sqf"; in the box. + 3. hit Local exec + 4. hit Esc + 5. The script should run as indicated by text appearing in the lower left corner of your screen. + 6. When the text stops being updated, alt-tab out to your editor and paste the clipboard into it. + 7. You can now copy/past from that output into the relevant sections of the dynamic mission template, + after making a copy of course. + + diff --git a/Tools/Dynamic Missions/pullDynamicMission.VR/blck_defines.hpp b/Tools/Dynamic Missions/pullDynamicMission.VR/blck_defines.hpp new file mode 100644 index 0000000..00f0b7b --- /dev/null +++ b/Tools/Dynamic Missions/pullDynamicMission.VR/blck_defines.hpp @@ -0,0 +1,38 @@ +/* + 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 GRGserver +#define useAPEX +//#define useDynamicSimulation +#define blck_debugMode +#define blck_triggerLoopCompleteTime 40*60 +//#define blck_milServer +//#define GRG_TestServer +//#define blck_useCUP +//#define blck_useRHS + +//////////////////////////// +// Do not touch anything below this line +/////////////////////////// +#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 + + diff --git a/Tools/Dynamic Missions/pullDynamicMission.VR/directions.txt b/Tools/Dynamic Missions/pullDynamicMission.VR/directions.txt new file mode 100644 index 0000000..bc896c2 --- /dev/null +++ b/Tools/Dynamic Missions/pullDynamicMission.VR/directions.txt @@ -0,0 +1,61 @@ +This tool formats most of the data required for dynamic missions based on what is present in your mission. +This include the layout of buildings, loot crates, markers, static weapons, and garrisons in buildings. +I recommend that you lay out dynamically spawned missions in the virtual reality map which minimizes confounding influences. + +A minimal mission would include: + A marker. You may use any marker you like. The new pullMarker script will format scripting needed to spawn that marker at the center of your mission. + A way to define the mission center, which is a reference point relative to which everything is spawned. + The mission system will spawn AI, loot chests, emplaced weapons, vehicles and aircraft according to the defaults for the mission difficulty. + +The basic blckeagls missions have a bit more defined, usually some buildings to provide cover and make things more interesting. + +Now, you can add more detail including defining where infantry and statics spawn, where the one or more loot crates spawn, where vehicle patrols spawn and so forth. +Loot crates, AI, static weapons or autonomous turrets can be spawned inside or on top of buildings. Even vehicles could be spawned on buildings in principle. + To do this just place the representative objects where you want the mission to spawn them and the script should do the rest. + For infantry patrols, put one unit where you want the group to spawn. + Note: uniforms, weapons and other AI gear are not captured. You can however define _uniforms, _weapons and other AI gear for that mission. see the template and default2 missions for examples. + +You can also have infantry and/or static weapons garrison buildings using either of two approaches. + 1. place an object fo type garrisonMarkerObject inside the building you want to garrison. + I use a 100 cm sphere which is the default because it is easy to see and not used for much else. + The script will ensure that this building is identified for a garrison which will be spawned at the Arma pre-defined buildingPositions. + + 2. Manualy place statics and units inside buildings where you want them to spawn. + Infantry will change position (crouch, prone, stand) and turn but will not move which prevents their normal behavior to leave the buliding and look for players. + The position of statics (e.g., HMG, GMG) will be recorded accurately. + By default, the script looks for arrows. this is so that if you pull mission data as a player the locations are recorded acccurately (more on that below). + You can of course just place the units where you want them. + Regardless, be sure that unitMarkerObject is set to the classname of the object you use to demarcate the position of infantry units. + If you do use AI units to designate positions for your infantry, be sure to pull the data while in the editor rather than when playing the mission (see below). + + 3. You are now almost ready to pull the mission data. + I recommend that you use a road cone with a flashing light to define the mission center. + This is the approach I have taken for all blckeagles missions to date. + You could also use a loot crate. + The actual mission center will be offset 3 meters from this position for technical reasons. + +Once all that is done you are ready to pull the mission information. +To do that, from the EDEN Editor, + + Preparation: copy all files from the tools\dynamicMissions\pullDynamicMissions folder into the folder containing the mission.sqm for your new mission. + Rename template.sqf to reflect the nature of your mission. + + Pulling Marker data. Start Arma, and select Editor. Load your new mission in the editor and hit Play. + Using the mouse wheel, select pull marker data. + Alt-tab out and paste into the appropriate spot in your new mission.sqf. + + Pulling all other mission data. + 1. go to tools\debug console. + 2. type execVM "pullDynamicMission.sqf"; in the box. + 3. hit Local exec + 4. hit Esc + 5. The script should run as indicated by text appearing in the lower left corner of your screen. + 6. When the text stops being updated, alt-tab out to your editor. + 7. You can now copy/past from that output into the relevant sections of the dynamic mission template. + + Final touchups. + The tools will pull all objects including any spheres, arrows or other aids. + Be sure to remove these or comment them out or they will show up in your final mission on your server. + Adjust the remaining settings in the template such as difficulty level to suit your needs. + Add the name of the mission to the list of missions to be spawned for that difficulty level. + Test everything to be sure diff --git a/Tools/Dynamic Missions/pullDynamicMission.VR/init.sqf b/Tools/Dynamic Missions/pullDynamicMission.VR/init.sqf new file mode 100644 index 0000000..05c39e8 --- /dev/null +++ b/Tools/Dynamic Missions/pullDynamicMission.VR/init.sqf @@ -0,0 +1,3 @@ + +player addAction["Pull MARKER Info","pullMarkerInfo.sqf"]; +player addAction["Pull DYNAMIC mission","pullDynamicMission.sqf"]; diff --git a/Tools/Dynamic Missions/pullDynamicMission.VR/mission.sqm b/Tools/Dynamic Missions/pullDynamicMission.VR/mission.sqm new file mode 100644 index 0000000000000000000000000000000000000000..9b0c7c0ff81bc16dde68d0a70c339edd9c2639a1 GIT binary patch literal 13679 zcmcIr4R9RAm43Z8#zqM?5D4M8u-IVYIL5n@+Mg8UN+%NGb4k9SAf!Mi)l z%&crVrVn!}!mt0r`=?;C!b1GS{;+U@9t8cI?u9>$BIae0-p}bvAw8Kn-+xoF{ zRMe9<93$&tzk081V2^mHbK_uoi=IdZtF+x^ePC!<)ut_n`Zf!eK46XJJyk#C8J?B( zwQVzvGJ;0Ibg^jfuy>oTR9PvP3l^g%wc(c=Ef?F9>N4Vz@}cokpTmPQ2-FkOZH-3o z!5r!&7aDV)Q7jtzuu-ax&KjlRFsQ8-7uYNtP0wIceQXYZh&e_nXBUS|GY1C-?gtpk znkB=rY!=yi7Frhv$)>L01Dk)o5Jh{;>~pN#kY|=rUlq zXE|7T;&SszadK$lkl1(U;zO}Y8S8F7_k}~^q95nG#Nb)~@J}(rMO;|@^@;XF0tPPY z6kj{%)-DME253;%AQ)!vY!S0?G%ma!`{jWp;AKKeV@$$LbNymF{7Mx&z&gXPT?KEb zVkhjF=hv==DOFqpH=XI%u7zKz;yTbNShnarqodE0?*J8u>(Bi>)aFvVE4#!P%!aSD+4ys~@M%9Xoz z?Yh#y<{ejN?V=ofednP#5BHcZl=BAmTN8<+_r`k)wwFh5nmrJvz8=UB&o6a@RuHyg zkQ8ml%*6)?!mydQveJEL$pxFdIRqUio_ZK%b2k$4e~yB^tsVu>pY;HIQ{cO-V~lvS z=bpW~zRT*=+}r`KuQ-nB{RN)K@l)SvbqSbetp0oUxpX#bx~}cu$}sz(bLiHi7z!;o z^-!eUtE&)WQ7vWTj~08dl(9fwl}Tte$G&`O@Q z%ajUW40KnlLJp%}BC55WJsUhW*akf-Se2>yy5j)@iVA*!GKaA_HU z`o1`0sPAa2YdUgrA2G5twa;>{<3&eQoA>2y*BhjjK7M20VBbwZnFhpwmXQK{jUKd; zXL%HBceMFQ$k{@8R?*x%f{Q_E6yL<)l?-Map5b^Hs9qlP2KrA`S*08tdG^_B)w3~% zZDhp=&f{6bt!q}Tt+lLHHEGP5Wr_SyYK@JXh68WmiY#I|V;n9fEU~;@aX1qYv7%L~ zcqUw4!`N$&W)R3YbZPc`th;}n|Iu7W-%$=V!P<^cB#KK zV#5?#Q~)QPTCwbnqbH3N40JV04k7J%j%}DE$qB+gcj2 zN|u{9bGn+%32Co%-w@2qg%4%K+U4)0#CJDNX`~UP)ENPoyuDDEwwbiYs7@fSQS;-BK{daT26aP(x(B zswx5hLp9asB9&k;~|Y~0|Y-??Sez+D(BHFuYBPtO}e9kXvY?qWhF z-^TSZqfjxg1{kJ)VFT(W{n(1!9R5Z<$E1Vqp}v9J;4ZIVCKKAGKEFkbU0A@-^@IJY zG6<+_dD;9laQIz4m&;>5{Tl7(MBM^q^EAy=7j&A!hQs z3VBa}-idSZxyLbg4Opd}F1&<~><+ZCJc#p=8PMbKH_`cfBs@hqxK-BBBSKdX)y6v11vqKFj0=u z1QQ-Rc!kX)Bj|kaqc0~?%t#}~%QoYL@oU6L`h4D)a`bZIKX9r5v^GkcoQFj=Mfe1P zs&T^fxAg(*Tum>eb#7Bl=ZaW?JHS`Oo`uU;f=|+9ISD*5$WZ4qmoaQg%_)c-yFh7{ zUs2OVRZ15#!+INaJ*{BioW{BcZ46K2aQCzYb0k!P6>^Y~ezffaWCC7s69xjNK6Z9<{Nm{8`q4mBAj$nK(>TOFA69_yo2QaP|9(gS#{tI!D zK48A^kT@c5_}&b-o>91HwQd0yTW1Dbq|dh@kS8?8{X0}EdU+sAc7{{ipDL4giMNL<53Si?+qw6s0 zA}BEP6u=@i?KCYYq-=s|v@gMp0teId+6gF&L^{MzP+8DXRq9kf!MsRv6gEli_F%>NF0>TT$$qy(f?t24~n4`GYI40Fdt_*|P|?#4%kMX42Uo0=^W z+ewLZmfvHMbwo0A6eU|><}}F>Gn6M(nW6KNvW17FNDK9eB7p!t{NV@vMf|zTCpFRl zQYsSF%{1U?CYIY38MNRwMG~A^;NYuW%tRxy+uuEr63-(t(&+OAM0H~bAEa6t!vBUv zHbE_f$)%~f>C*jsdLgaSjT>HWT8jpJN3?R>GP8a(VCoo(+axxn=AosVD{8ueam(CH zqwBK@#`KXzy))8COD(~jd(cwTMOF{Vk^j)hLRPEZoawo7yacea1GbT~E96pqEYN7U zr(Q?H?L@Yxx8zkv6sd+Ap@l zLTtXuN#%WK(kA(YR)hbSMv6Hz9Hr!>;&+ZV`78YhXDsa8%BZ()(Wr#4AYbW$~~ zmeQf9hP@~Oi}1`#d0UgDp3Uz^GpDbCr2ab9bmnMg?U9c8GAe6EZ~Zz6ak3~nCZVZ1 z=7x=Zctxz|@g^MIU>?eZ&Cbp_yzJ9y@dqT7bYR@lZ>zzplW-t-V}o}#0T>slere&avQZ1uU_fmD{P8aCJ>+W3&-+nE+_!up zCHA@#8tL;f0*$HB)vlvj>1v8$SC{pR?D?6B=m&Db?zUar|;@5tvAh;WINt^?Xm!Yy!I$-;!kX zK6oGLYqDDM!BC*zBP2(bS&CW}0ihFP?k_a>y+1{V;j`gawohuL!AB*5w@Seh>M{Uj z5}z5$6;wqmsZ| zrC=!yH9*0O_{>n2VLjhUHKU*hrARWGf&-+l1qzO-e(92{DFxhLh=QYAe&~C_=?5k> z(%_?#z+0tY8L=Lq;3PgX1$3{*mvPM~=tU`#jHciT($@k7ld503!)rO##{-RJ5(39s<{t)7}K~oo)#1U2%02_{L+$HPQ(3<~I`NN6=qGFoV!G z&`V&VV))@y56`L=gj8uPwiF?Qs^RMJYC+Q3oKe@guhg zD_7JZRfNtZ9Ra@_B|$>nh4sE)wu~C!@H+mKAQs$3Kk*dud(nkINQt9w;wPs3l`MUF z`s07T?J7ati_D*Xo}!LHeuxk`nzvdV&GIY#(WI#x8D$Z!3=m(kUlpF)0r|$6nkA5S4XCFapWu`cy#?XywgENKYe?g8PLi1M*9q2>+ z!A8huF23u5j2P>GFC`Y9e@r7~nE$kdaP!I*5!xh3KGPF{Fo_8HGm;R(Q#U^DBV0WH zm`2J#N=0(`W~&I#N%#me5eVs%3;wtzgmA^x3gHcXCp1z9QYsSRUDR>k7 z@@clJuS6+s7|F}Mq_4@UJ`dFgVLYk&?ZRWG@j*+}wU z!=|l}cLt_pY&7aSK%V>)3Ejg#d~nOQLnqk$u~s9CJ6?S$CAJ}pqzdo<=rI29Zf5a9-^>zl+YcKOqN?dx$q(%yG|4+Y>sP?yt>Zn3B zP(wv0Id%Jg>NEtct%!NpSJz?Mu=QV#YorDDfAqT`a6v8qxCDX=_qG3ypH<-nOGaY literal 0 HcmV?d00001 diff --git a/Tools/Dynamic Missions/pullDynamicMission.VR/pullDynamicMission.sqf b/Tools/Dynamic Missions/pullDynamicMission.VR/pullDynamicMission.sqf new file mode 100644 index 0000000..98f15e8 --- /dev/null +++ b/Tools/Dynamic Missions/pullDynamicMission.VR/pullDynamicMission.sqf @@ -0,0 +1,495 @@ + + +_fn_isInside = { // returns true if an object is inside, underneath or on top of a building otherwise returns false. + ////////////////////// + // Determin if a unit is inside a building using two separate checkVisibility + ////////////////////// + // lineIntersects [ eyePos player, aimPos chopper, player, chopper] + params["_u",["_category","House"]]; + private ["_u","_pos","_above","_below"]; + _pos = getPosASL _u; + _above = lineIntersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u]; + _below = lineintersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 2],_u]; + diag_log format["_fn_isInside: _u %1 | _category = %5 | typeOf _u %4 | _above %2 | _below %3 ",_u,_above,_below,typeOf _u, _category]; + // If there is something above or below the object do a quick double-check to make sure there is a building there and not something else. + if (_above) then // test if any surfaces above are from buildingPos + { + _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,100]; + _above = false; + { + //diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)]; + if ((_x select 2) isKindOf _category) then {_above = true}; + }forEach _surfacesAbove; + }; + if (_below) then + { + _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100]; + _above = false; + { + //diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)]; + if ((_x select 2) isKindOf _category) then {_above = true}; + }forEach _surfacesBelow; + }; + + _isInside = if (_above || _below) then {true} else {false}; + //diag_log format["_fn_isInside: _isInside = %1",_isInside]; + _isInside +}; + +_fn_buildingContainer = { // returns the builing containing an object or objNull + private["_u","_pos","_building","_surfacesAbove","_surfacesBelow"]; + params["_u",["_category","House"]]; + _pos = getPosASL _u; + private _building = objNull; + // lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique] + _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,10]; + diag_log format["_surfacesAbove = %1",_surfacesAbove]; + { + if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; + } forEach _surfacesAbove; + if (_building isEqualTo objNull) then + { + _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100]; + diag_log format["_surfacesBelow = %1",_surfacesBelow]; + { + if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; + } forEach _surfacesBelow; + }; + diag_log format["_fn_buildingContainer: _u = %1 | _building = %2",_u,_building]; + _building +}; + +_fn_isInfantry = { // returns true if a unit is on foot otherwise returns false. + ////////////////////// + // Determine if a unit isinfantry rather than a unit manning a turret or vehicle + ////////////////////// + _u = _this select 0; + private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false}; + //diag_log format["_fn_isInfantry: _isInfantry = %1",_isInfantry]; + _isInfantry +}; + +diag_log "========== =========================="; + +/////////////////// +// Define some values for our AI +// Change values of these variables to suit your needs +/////////////////// +#define aiDifficulty "Red" +#define minAI 3 +#define maxAI 6 +#define minPatrolRadius 30 +#define maxPatrolRadius 45 +#define AI_respawnTime 600 +#define aiVehiclePatrolRadius 75 +#define vehiclePatrolRespawnTime 600 +#define staticWeaponRespawnTime 600 +#define aiAircraftPatrolRespawnTime 600 +#define aiAircraftPatrolRadius 1700 +#define oddsOfGarrison 0.67 +#define maxGarrisonStatics 3 +#define maxGarrisonUnits 4 +#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls +#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient. +#define unitMarkerObject "Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction. +#define objectAtMissionCenter "RoadCone_L_F" +#define lootVehicleMarker "Sign_Arrow_F" +#define landVehicles "LandVehicle" + +/////////////////// +// Define the coordinates of the center of the mission. +/////////////////// + +CENTER = [0,0,0]; + +if (isNil "CENTER" || CENTER isEqualTo [0,0,0]) then +{ + hint "Please define a center point for your mission"; + _obj = allMissionObjects objectAtMissionCenter; + _obj1 = _obj select 0; + diag_log format["Determining position of first roadcone found which is located at %1 with player found at %2",getPos _obj1,position Player]; + if (count _obj > 0) then + { + CENTER = [3,3,0] vectorAdd (getPosATL _obj1); + }; + hint format["Position of Road Cone at %1 used to define mission center",CENTER]; + diag_log format["Position of Road Cone at %1 used to define mission center",CENTER]; + diag_log format["Player located at position %1",position player]; +}; + +/////////////////// +// Identify any buildings in which a garrison should be spawned using the Arma building positions. +// Tell the script which buildings to garrison by placing an object inside that designates them as such. +// I use a large yellow sphere for this purpose. +// The function below assembles a list of such buildings for use in defining the data for mission buildings. +/////////////////// + +_cb = ""; + +////////////////// +// *** OPTIONAL **** +// Place a marker over your mission and configure it as you would like to to appear in the tame. +// The marker configuration will be included in the output of this script. +// Note ** Only the first marker placed will be processed ** +// Configure Marker +///////////////// +/* + _markerType = ["ELIPSE",[175,175],"GRID"]; + _markerType = ["mil_triangle",[0,0]]; +*/ +_allmkr = allMapMarkers; +diag_log format["_allmkr = %1",_allmkr]; +if (count _allmkr == 0) then +//if !(typeName _mk isEqualTo "STRING") then +{ + hint "No Marker Found, no Marker Definitions Will Be generated"; + uiSleep 5; +} else { + _mk = _allmkr select 0; + diag_log format["_mk = %1",_mk]; + + if ((getMarkerType _mk) in ["ELIPSE","RECTANGLE"]) then + { + _cb = _cb + format['_markerType = ["%1",%2,%3];%4',getMarkerType _mk,getMarkerSize _mk,markerBrush _mk,endl]; + } else { + _cb = _cb + format['_markerType = ["%1",[0,0]];%2',getMarkerType _mk,endl]; + }; + _cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl]; + _cb = _cb + format['_markerLabel = "%1";%2',MarkerText _mk,endl]; + _cb = _cb + format["%1%1",endl]; +}; + +//////////////////////// +// Begin pulling data here +/////////////////////// + +_cb = _cb + format["_garrisonedBuildings_BuildingPosnSystem = [",endl]; +private _garrisonedBuildings = []; +private _allStatics = []; +_helpers = allMissionObjects garrisonMarkerObject; +//diag_log format["_helpers = %1",_helpers]; +{ + if ( (typeOf _x) isEqualTo garrisonMarkerObject) then + { + private _isInside = [_x] call _fn_isInside; + if (_isInside) then + { + _building = [_x] call _fn_buildingContainer; + _garrisonedBuildings pushbackunique _building; + _garrisonedBuildings pushbackunique _x; + // data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/], + // 1 2 3 4 5 6 7 8 9 + _line = format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits]; + systemChat _line; + //diag_log _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + }; +} forEach _helpers; +_cb = _cb + format["%1];%1%1",endl]; + +_logging = format["_garrisonedBuildings = %1",_garrisonedBuildings]; +//diag_log _logging; +systemChat _logging; +//diag_log format["_cb = %1%2",endl,_cb]; + +_configuredStatics = []; +_configuredUnits = []; +/* + This bit will set up the garrison for each building having units and / or statics inside it or on top. + Coding must ensure that nothing is repeated but everything is captured. +*/ + +_fn_configureGarrisonForBuildingATL = { + private["_b","_staticsInBuilding","_unitsInBuilding","_staticsText","_unitsText","_buildingGarrisonATL","_staticsInBuilding","_unitsInBuilding","_count"]; + _b = _this select 0; + _count = 0; + if (_b in _garrisonedBuildings) exitWith {""}; + _staticsText = ""; + _unitsText = ""; + _buildingGarrisonATL = ""; + _staticsInBuilding = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)]; + { + if !(_x in _configuredStatics) then + { + _isInside = [_x] call _fn_isInside; + if (_isInside) then {_building = [_x] call _fn_buildingContainer}; + if (_b isEqualTo _building) then + { + _configuredStatics pushBackUnique _x; + + if (_staticsText isEqualTo "") then + { + _staticsText = format['["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + } else { + _staticsText = _staticsText + format[',["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + }; + }; + }; + } forEach _staticsInBuilding; + _unitsInBuilding = nearestObjects[getPosATL _building,[unitMarkerObject],sizeOf (typeOf _building)]; + + { + if !(_x in _configuredUnits) then + { + _isInside = [_x] call _fn_isInside; + if (_isInside) then {_building = [_x] call _fn_buildingContainer}; + if (_b isEqualTo _building) then + { + _configuredUnits pushBackUnique _x; + + if (_unitsText isEqualTo "") then + { + _unitsText = format["[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + } else { + _unitsText = _unitsText + format[",[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + }; + _count = _count + 1; + }; + }; + } forEach _unitsInBuilding; + if ( !(_staticsText isEqualTo "") || !(_unitsText isEqualTo "")) then + { + _buildingGarrisonATL = format[' ["%1",%2,%3,%4,%5,[%6],[%7]]',typeOf _b,(getPosATL _b) vectorDiff CENTER,getDir _b,'true','true',_staticsText,_unitsText]; + _garrisonedBuildings pushBackUnique _b; + }; + _buildingGarrisonATL +}; + +private _count = 0; +_cb = _cb + "_garrisonedBuilding_ATLsystem = ["; +{ + private _isInside = [_x] call _fn_isInside; + if (_isInside) then + { + private _building = [_x] call _fn_buildingContainer; + private _include = if ( !(_building in _garrisonedBuildings) && !((typeOf _building) isEqualTo unitMarkerObject) && !((typeOf _building) isEqualTo garrisonMarkerObject)) then {true} else {false}; + if (_include) then + { + //diag_log format["_x = %1 | _building = %1",_x,_building]; + private _buildingGarrisonInformation = [_building] call _fn_configureGarrisonForBuildingATL; + //diag_log format["_buildingGarrisonInformation = %1",_buildingGarrisonInformation]; + if (_count == 0) then + { + _cb = _cb + format["%1%2",endl,_buildingGarrisonInformation]; + } else { + _cb = _cb + format[",%1%2",endl,_buildingGarrisonInformation]; + }; + + _count = _count + 1; + }; + }; + +} forEach ((allMissionObjects "StaticWeapon") + (allMissionObjects unitMarkerObject)); +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Configure info remaining mission landscape +/////////////////// +_land = allMissionObjects "Static"; + +_cb = _cb + format["_missionLandscape = [",endl]; +{ + diag_log format["evaluating mission landscape: _x = %1 | typeOf _x = %1",_x, typeOf _x]; + //diag_log format["evaluating mission landscape: _x %1 | typeOf _x %1",_x, _x isKindOf "Helper_Base_F"]; + if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then + { + _line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; + + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +}forEach allMissionObjects "Static"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Configure loot boxes +/////////////////// +_cb = _cb + "_missionLootBoxes = ["; +{ + _line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; +}forEach ((allMissionObjects "ReammoBox") + (allMissionObjects "ReammoBox_F")); +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup Info for loot vehicles +/////////////////// +_missionLootVehicles = []; +_missionVehicles = ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship"); +_lootVehicleMarkers = allMissionObjects lootVehicleMarker; +diag_log format["_lootVehicleMarkers = %1",_lootVehicleMarkers]; +_cb = _cb + format["_missionLootVehicles = ["]; +{ + _kindOf = "nothing"; + _isInside = [_x,"Car"] call _fn_isInside; + if (_isInside) then {_kindOf = "Car"}; + if !(_isInside) then {_isInside = [_x,"Ship"] call _fn_isInside}; + if (_isInside) then {_kindOf = "Ship"}; + if (_isInside) then + { + + _object = [_x,_kindOf] call _fn_buildingContainer; + diag_log format["object %1 is inside object %2",_x,_object]; + _missionLootVehicles pushBack _object; + _line = format[' ["%1",%2,%3,%4,%5]',typeOf _object,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +} forEach allMissionObjects lootVehicleMarker; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup Info for vehicle patrols +/////////////////// +_cb = _cb + format["_missionPatrolVehicles = ["]; +{ + if ( !((typeOf _x) isKindOf "SDV_01_base_F") && !(_x in _missionLootVehicles) ) then + { + _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship"); +_cb = _cb + format["%1];%1%1",endl]; + +_cb = _cb + "_submarinePatrolParameters = ["; +{ + if ((typeOf _x) isKindOf "SDV_01_base_F") then + { + _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +}forEach allMissionObjects "Ship"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Configs for Air Patrols +/////////////////// +_cb = _cb + "_airPatrols = ["; + //[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60] +{ + _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; +}forEach allMissionObjects "Air"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup info for remaining static/emplaced weapons +/////////////////// +_cb = _cb + format["_missionEmplacedWeapons = ["]; +{ + + if !(_x in _configuredStatics) then + { + // ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10] + _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + +}forEach allMissionObjects "StaticWeapon"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup information for infantry groups spawning outside buildings +/////////////////// +_cb = _cb + format["_missionGroups = ["]; +{ + //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], + _isInside = [_x] call _fn_isInside; + _isInfantry = [_x] call _fn_isInfantry; + //diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry]; + if (_isInfantry) then + { + if (!(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x)) then + { + _line = format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + }; +}forEach allMissionObjects "Man"; +_cb = _cb + format["%1];%1%1",endl]; + +_cb = _cb + "_scubaGroupParameters = ["; +{ + //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], + _isInside = [_x] call _fn_isInside; + _isInfantry = [_x] call _fn_isInfantry; + //diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry]; + if (_isInfantry) then + { + if ((surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x)) then + { + _line = format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + }; +}forEach allMissionObjects "Man"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// All done, notify the user and copy the output to the clipboard +/////////////////// +_msg = "All Objects organzied, formated and copied to the Clipboard"; +hint _msg; +systemChat _msg; +systemChat format["_cb has %1 characters",count _cb]; +copyToClipboard _cb; +diag_log "DONE"; + diff --git a/Tools/Dynamic Missions/pullDynamicMission.VR/pullMarkerInfo.sqf b/Tools/Dynamic Missions/pullDynamicMission.VR/pullMarkerInfo.sqf new file mode 100644 index 0000000..6ff3f1a --- /dev/null +++ b/Tools/Dynamic Missions/pullDynamicMission.VR/pullMarkerInfo.sqf @@ -0,0 +1,61 @@ + +_cb = ""; + +////////////////// +// *** OPTIONAL **** +// Place a marker over your mission and configure it as you would like to to appear in the tame. +// The marker configuration will be included in the output of this script. +// Note ** Only the first marker placed will be processed ** +// Configure Marker +///////////////// +/* + _markerType = ["ELIPSE",[175,175],"GRID"]; + _markerType = ["mil_triangle",[0,0]]; +*/ + +diag_log format["<< ---- START %1 ---- >>",diag_tickTime]; + +_allmkr = allMapMarkers; +diag_log format["_allmkr = %1",_allmkr]; +if (count _allmkr == 0) then +//if !(typeName _mk isEqualTo "STRING") then +{ + hint "No Marker Found, no Marker Definitions Will Be generated"; + uiSleep 5; +} else { + + _mk = _allmkr select 0; + diag_log format["_mk = %1",_mk]; + systemChat format["marker shape = %1",markerShape _mk]; + systemChat format["marker type = %1",markerType _mk]; + + //systemChat + switch (markerShape _mk) do + { + case "ELLIPSE": { + _cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl]; + }; + case "RECTANGLE": { + _cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl]; + }; + case "ICON": { + _cb = _cb + format['_markerType = ["%1",[0,0]];%2',getMarkerType _mk,endl]; + }; + }; + + _cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl]; + _cb = _cb + format['_markerMissionName = "%1";%2',MarkerText _mk,endl]; + _cb = _cb + format['_markerLabel = "%1";%2',"",endl]; + _cb = _cb + format["%1%1",endl]; +}; + +/////////////////// +// All done, notify the user and copy the output to the clipboard +/////////////////// +_msg = "Marker Data organzied, formated and copied to the Clipboard"; +hint _msg; +systemChat _msg; +systemChat format["_cb has %1 characters",count _cb]; +copyToClipboard _cb; +diag_log "DONE"; + diff --git a/Tools/Dynamic Missions/pullDynamicMission.VR/template.sqf b/Tools/Dynamic Missions/pullDynamicMission.VR/template.sqf new file mode 100644 index 0000000..c1d11ca --- /dev/null +++ b/Tools/Dynamic Missions/pullDynamicMission.VR/template.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 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!"; + +_markerMissionName = "Research Center"; +_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" + +////////// +// Past the output of the script here + + +////////// +// The lines below define additional variables you may wish to configure. + + +// 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 +// 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/Tools/Static Missions/StaticMissions-HowTo.txt b/Tools/Static Missions/StaticMissions-HowTo.txt new file mode 100644 index 0000000..5a9b5a9 --- /dev/null +++ b/Tools/Static Missions/StaticMissions-HowTo.txt @@ -0,0 +1,38 @@ + + +You can spawn static missions over land or on water. +This can be done by laying out everything for your static mission in the editor, +then exporting the data from your mission using a simple script and a copy - paste - edit strategy. + +My approach to doing this as follows: + +1) Start the Eden Editor. +2) Lay out your static mission. You should: + [Optional] place a marker indicating where it will spawn (save your work) + Place all buldings, sandbags, etc (save your work) + Place any vehicle, navel, sub or air patrols - note that they will patrol using the postion at which you place them as the centerpoint of their patrol. + (save your work). + Place any static weapons. These can be outside, on top of or inside buildings. + (save your work). + Place a unit at each location you wish to have a group patrol OUTSIDE buildings. These will spawn as infantry on land and scuba units over water. + Place a unit inside buildings as appropriate. + Place some sort of ammo box, cardboard box, or other loot container if you wish to have one. You can have as many as you like. + Save your work. + + ** NOTES ** + Uniforms, weapons and any other customization to units will not be preserved. + The defaults for blckeagls, or any specific definitions for _uniforms, _weapons, etc provided when the mission is spawned, will be used for these AI properties. + +3) Export the mission data using the tools provided. + In the EDEN editor, go to tools\debug console + in the box type execVM "pullStaticMission.sqf"; + Click 'local exec' + Hit Esc and wait for the script to run. You will see a notification in the lower left corner when it is done. + Alt-Tab out and past the output into your text editor. + Make a copy of the stati mission template. + Copy relevant information from the text you just grabbed with the clipboard to the template. + Make any edits or other adjustments needed. + + Once you have done this, add the file to the custom_server\Missions\Static\missions directory then + add an entry for your static mission to GMS_StaticMissionLists.sqf + diff --git a/Tools/Static Missions/pullStaticMissionInfo.Altis/blck_defines.hpp b/Tools/Static Missions/pullStaticMissionInfo.Altis/blck_defines.hpp new file mode 100644 index 0000000..00f0b7b --- /dev/null +++ b/Tools/Static Missions/pullStaticMissionInfo.Altis/blck_defines.hpp @@ -0,0 +1,38 @@ +/* + 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 GRGserver +#define useAPEX +//#define useDynamicSimulation +#define blck_debugMode +#define blck_triggerLoopCompleteTime 40*60 +//#define blck_milServer +//#define GRG_TestServer +//#define blck_useCUP +//#define blck_useRHS + +//////////////////////////// +// Do not touch anything below this line +/////////////////////////// +#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 + + diff --git a/Tools/Static Missions/pullStaticMissionInfo.Altis/directions.txt b/Tools/Static Missions/pullStaticMissionInfo.Altis/directions.txt new file mode 100644 index 0000000..2667f79 --- /dev/null +++ b/Tools/Static Missions/pullStaticMissionInfo.Altis/directions.txt @@ -0,0 +1,60 @@ +This tool formats most of the data required for STATIC missions based on what is present in your mission. +This include the layout of buildings, loot crates, markers, static weapons, and garrisons in buildings. + +A minimal mission would include: + A marker. You may use any marker you like. The new pullMarker script will format scripting needed to spawn that marker at the center of your mission. + The mission system will spawn AI, loot chests, emplaced weapons, vehicles and aircraft according to the defaults for the mission difficulty. + +The basic blckeagls static missions provided as examples have a bit more defined, usually some buildings to provide cover and make things more interesting. +I have added a new example mission, 'garrison.sqf', to illustrate technques you can use to tell the script which buildings to spawn AI in and where to spawn them. + +Note that you can add more detail including defining where infantry and statics spawn, where the one or more loot crates spawn, where vehicle patrols spawn and so forth. +Loot crates, AI, static weapons or autonomous turrets can be spawned inside or on top of buildings. Even vehicles could be spawned on buildings in principle. + To do this just place the representative objects where you want the mission to spawn them and the script should do the rest. + For infantry patrols, put one unit where you want the group to spawn. + Note: uniforms, weapons and other AI gear are not captured. You can however define _uniforms, _weapons and other AI gear for that mission. + See the template and default2 missions for examples. + +You can also have infantry and/or static weapons garrison buildings using either of two approaches. + 1. place an object of type garrisonMarkerObject inside the building you want to garrison. + I use a 100 cm sphere which is the default because it is easy to see and not used for much else. + The script will ensure that this building is identified for a garrison which will be spawned at the Arma pre-defined buildingPositions. + You can define the number of infantry and statics to spawn in these buildings. Their positions should be different each time the garrison is spawned. + Just like the other static AI, garrisons respawn. + + 2. Manualy place statics and units inside buildings where you want them to spawn. + Infantry will change position (crouch, prone, stand) and turn but will not move which prevents their normal behavior to leave the buliding and look for players. + The position of statics (e.g., HMG, GMG) will be recorded accurately. + To tell the script where you want units, turrets (HMG or anything else in the turret category) just place the units where you want them. + This can include some of the new, autonomous turrets. + +Once all that is done you are ready to pull the mission information. +To do that, from the EDEN Editor, + + 1. Preparation: copy all files from the tools\dynamicMissions\pullDynamicMissions folder into the folder containing the mission.sqm for your new mission. + Rename template.sqf to reflect the nature of your mission. + Open 'pullStaticMission.sqf' and check the preset definitions, all of which are set by #define. + Adjust these values as appropriate. + + 2. Pulling Marker data. Start Arma, and select Editor. Load your new mission in the editor and hit Play. + Using the mouse wheel, select pull marker data. + Alt-tab out and paste into the appropriate spot in your new mission.sqf. + + + 3. Pulling all other mission data. + Return to the editor. + Select 'tools' with then 'debug console'. + A window will pop up with a zone toward the center in which you can enter text. + 2. type execVM "pullDynamicMission.sqf"; in the box. + 3. hit Local exec + 4. hit Esc + 5. The script should run as indicated by text appearing in the lower left corner of your screen. + 6. When the text stops being updated, alt-tab out to your editor. + 7. You can now copy/past from that output into the relevant sections of the dynamic mission template. + + 4. Final touchups. + The tools will pull all objects including any spheres, arrows or other aids. + Be sure to remove these or comment them out or they will show up in your final mission on your server. + Adjust the remaining settings in the template such as difficulty level to suit your needs. + Add the name of the mission to the list of missions to be spawned for that difficulty level. + Test everything to be sure diff --git a/Tools/Static Missions/pullStaticMissionInfo.Altis/init.sqf b/Tools/Static Missions/pullStaticMissionInfo.Altis/init.sqf new file mode 100644 index 0000000..3240b7a --- /dev/null +++ b/Tools/Static Missions/pullStaticMissionInfo.Altis/init.sqf @@ -0,0 +1,3 @@ + +player addAction["Pull MARKER Info","pullMarkerInfo.sqf"]; + diff --git a/Tools/Static Missions/pullStaticMissionInfo.Altis/mission.sqm b/Tools/Static Missions/pullStaticMissionInfo.Altis/mission.sqm new file mode 100644 index 0000000000000000000000000000000000000000..f490b1fcf6efc77ffbedb051a9a3d19b47e5cd07 GIT binary patch literal 16486 zcmcIr3z!tul|Hw53CJQUqG+T=1VMr6c`ySqL-hq8_BMp%`@kFG-Fs*n?yjizsezzg@OWSE!+|tcu?y>3agNa_9 zZnhfyXihxcj7(<6677ht`)GU+k6gOYHK49dH}z%<$446M83+u?@Rv*CPH(2YJrQRa zmfPbtJBHgSjefGGFWy~;*OnW@lIz67YaC$H-0+!K=^V5L# z2AE~VlC!4IH;pCnXv~Dgh!p1N=G8G%=}l2@ot})DI;_Ap$pbq@kBcE=nQ1qsc-4P zY2wkx=1&us9i7z~(9?(uyJy!u-YHWYZfaZjrPR~UJc3U*K4$u%Oeq<)~U|Dc{&{;&m+DtqVMdPJ|=sLmN zdc+xe#%eQ6s5RPR$+#YzmBNL9t0BH5h7U7l0@^IAJw0XO#Ey=R2|7|Po6u||r4o7s zM2o-;DBK=fim1MMFl>f=FftV6K^Pw_n;s0uqf!x0m^f}Nu+j4w=hQ1BQ9KU=MUQ5q zodV8ZMH}pX`JmMJl!qsrXm8UINp1*xNnOIQ+R$fk^l|zKJAXcqM#~PadA?zTSd=kM zimAuVl$TjPQx4*8hU0^mq+_P^_ZGdGy!|-EK42fp9WuG#N`{_Ug1} z9zP(CDfxhM)|DA450Sk#bECc?AK;*tkEJo27Yn1f1k+j4Fk{i+Y>HQx#@gb|GSM8T zi8!1VMv;%e_QP)+0!4Aihai)F5eW3qafv2Ondx}bU!(-iAtLMMGun)_wUCl^aPf?V zGrkK{EIt&JTQ2mT}KQS!ipzj^IFhRQmyzT0Pjr4q5(@a>#~?` zwPEVNfAwmrBe*M`io(9Vd#j!A`VyQYJ6h1d&3Za-TDCVgGuu^Q^6YqPo0X!>CaDIN z#dH%s#iS|%Nh4*o0cBkgi0aGWbZ)g78Iuz`4v42RRt$To24TDnM(cD0wG3*nj7=57 z;q2-rT|k*rB9zi>O4=o046>UcIPY)lW+}YxG|S-b!FF#s%s9zzR=`(Ia}qo?#O|$x z_{ny&3Pzk_Hz&iZP7_On+fKE+Lm>zcb=sxyS+-pUFP`S~m&2XIoOT7wCtYxEvoGRWR%Vr#%@)O|aYLCGbeL9fGSSI{l?kQsT7BU?jN#>9f2XKFqc& zpwA?ye-iA?wkzTNDNcVCth~r+qrB6y+bf9TUTV>@_881-x+>O;HTQfYjjPc}%}TWx z@BuoT0Iq54lkL_r+*w$b8E-;|PQwWFIdsq{j-XK%QK3j0S*TxYm>qF5hI<+;|E&aW zLeen{KHk?=!#*3JDx0}rseJvAk@e!_`}S&L&D9$l0=!$G5*&$wxa;$O*0@E?Kze*X z;eq-A0#*$5s}5=^wf&%ed(0;_yu4hf-@6h~kK24$6V2BaM@`H?E>2I>jks=$qP~qD zlCEhh;0N`N16?&730$bVo&^~~3AYtTP0T>X5l__pF|HIv9j1qbnzkywQ19ug z;h^P0{R*60FP0w~9u~7#7e`IZK!!X|)Z2SP{h5QBgSrpDe(1%n8ji0n)Hl70sIPwX zYfXH$uQ+OA1~NK(qRwF8E~@KI^pJE-TRlIz{%~zM zGmweI6ZHj{V~V0~riX-@cA~yeV+`S}-4i5bY8=ZX5Ao=~5G z36fD$E#nt8Cs-HiL5C4FJbZ&D(p|+-6El$M*%S3j0#+>Y{mMa2MVDXHTno5Re?0!Y zdQmm3SrcD>Q5-cf16fIUqMm~_Mp4u^(L?eODv11|=BmYodPRm%C+DGG_re36B3Xu* zfvkBvQTM_Ms3_`-=pmt|!yUhR+uhbi$F_4$8wy~p<0vd zrh%k)O1!EBGi!CzjK@qo2#qwwTO*dyfnQq9SS*!SrQl&?1y{5#nf@+-ne&%{_ON*1 znCkWC?0;Sp!^b?ViP^u{sS$gS^{}TU7GS09OQu_BAjw2&*}qI&iMwP7T!-~MVbXQD<4n2{GOv)OCw+}7> zKI}vzWPXaF=Nd~D;Eh91X`*E022C9JYNtlLu#TlqPXT`ISAc=IXJG*-hxinL_dG5E zru4>|;N|{nG;!++Re*!zcGv>^Zu}OFc!At8c?xhZ;Zh@hv6Zpc5r6`-PXTzN<`Uq+ zc__fTQ}=1&!#h<0M%FxQ3$S_UGaB&%xy|zw;1b*b`V!!F8b~fgG1{j9yt{M>u>1}b zpzp=M*TncWssJ4y?6L*8s&$)2yg=?vJq0)ocdfnzm`ejm01A9Q1>h~QOMol>gaUkf z{|lNp>nT-$yRLBrs9e8YBVHgk)Sd#o=2w8hxDRImD9ZU1fcNn(0ix9yg|54Nk0y5Q zPz7lD{5jhKFF(0UBVHg+0Xzj*MY#N|ftMTsD8%^`fDa#B0vxyt1^CW{2Q@L~B~^fM zzqhJo6gp$wE{%ABJi71{;BWCz!Cm?@g&BV01Ig#2|y9TrvQA+;}RfrEef#lkL4KeKT-tI!JO!|VJ_XoF1IeXm!SyIWvw zgAfaqlr$&vihu2;p&B0tyYO93#|tf+*M`Nhk((NbEXYISKFY?0uP!)XE{oCqh3uP+ zFKCK#bovUOGPA*>X~z9&}Oa;-_7J1arv)bui>+Mmn507xIV_c z+_zRdkiR~bi|<~%UL(xQi5JL||Gqwr`vFZ+jJpGs%W&y6fh+cZd}}AaM<`_M-Z+b9 z;w2i7foT)5(SK%4~@CIR5tX$IrZYmYqKz`QAz3}0;LA~%RFXaFcmrMC0nnleJtVX$LlJ}}! zj3fOR`W_lb8l!hh1q@9b-D&RPqa*6YId?u17FYa1%@t3qMD45_ho>2D-?&pFy1;n7 zu?{3PC{C%W=mJMY;|t?c9Z}4`G0fU=1>koVqa)Uw^jTQE-+NO7(X(|ZHSXzfkLS>J ze~)#*fk&_Dvg#}DaGm$`*Z5VR%i%h2!5mThdEc;jZI`N2K3v%vK2Z~a@J@|*fqYTu z3A!0Qs^}{D2|Xm6U+53CcGjjEekbVy{r5NED*5y9Uxmf9KT<&xNO9`BZ%pG5PrN|B z(ew;Xqfm)1&`v7qO*E8sa|I0~0VZI-53TPwI%XTcNOcKt4q)B6ZI_{mwl`G)0{a$K z%k(s$<2j9Z;VV!2^wj$A@&!;q55X12peOnRz5J~|)bJZ$7wG9XqSk-@&atpK@y9A? zq`6#t`ELiL)`=I$_r-oQ(KR$h(ec@+TZUVL{puDZzkTk5k2zMcd1S2mSE3?g z)n(*e)GURgPO}Vd#&t}jy;D^PC#g}vafV(vSp~X)#*s6Gus`bzX}qI^cX%UV%=8W2 z@G~}7l;}7Q_4@Lx>%*cP&vu9=0FUxC`Y(#$>_a3Jg&uTpmSTSqoUAApt~W;`uGG^H zgvBTKZfqbLAl2!KOGix?(qBHV6*P|YS5_PsSq%p%Z{A-hLtL+H{V*)PhZPag0Jg37 zB01(0*XfP}mKVasW@Sfm!Fr}1VZ9$jSl8dTv4Kd~?j|oxs7jMpe?b-My2mgM-x6-q z#1(kBVc*6}@)hAoh-`+JfT3282Is~)(!pB1$V1lv`SL;%FL~n)IjPACLM(EZ7hp%% zWWJ=~83HfF;NU9+Mrj~fZBkA<^W-&iyzx!Nt&Vs0@?0OUcUAEP5m!h#_-)i#pSAU2 zQF)SDrvLGd$#xv1giZ`WUN7;K;uF78jKko^SVe!xl zYG9lbJ;jz{{)lHaVhHkLjOq(L?Y~yj6lEP>M{%akjCIV8r>;)J3jE3#S@@pkK4{)!@!pj&?hl+9PKT*_WF1eM)+<>auqsRv~fN01k{{QB(zisy>o z{x`+ZoZo(lUs;BWu-omoXKmqIVTJZ0%ZRAV@0Cb^X?m*lbDUI2t@&kL$bnQ%kQ^7z z`L8>V1Dv&mFt~RotM135?xe3wP2Bm28U_x2@c2d2cb6^QTuq#C$3>r>=(iB60t=9L zXo`N1(l~O88l>up{@POpYOFn%Gkkv~qW^knrzSS^fSx$nx(702_mvl<3?x@x88+FR zxs^xAsT(iKb>D3+rU%l(>zt{D7a?28UW8L|lDY`*!>KeKJu8r1gxry%MdpwIN~F$; z(0bQ_fq{Z)5&i)FS_`k?&&LbBNCZ2ike=4O1M_7eYvza3=V%;RlO$8Dnfpyt1aE-j zZ=kw6C10cLZq|wjjrX9c<4OTrfMV$M|zcdg%{6{c7O@9N9QgJz%G=Cv)rg4O^7O8q*JaPBwVbY8{ z2r40VO6rwiX9G6b!*XGVT#UN$HwN9E?oE0ioo*~;cj#|6plb_>>{+HNQOUPJTCyBPZ7grQZ0%WgM4BMmkXB1eOTLm7c&04|;V$G~xRC>ve3se$O>{V)3TwDK&J zK*d$e$}4CbVVvQOv2E+C8fnHI$`~VuGQyY(W%rI4S|dXly~80sxJ2mFQ>UL3rXry% z%r5>r)q9TDdyx?&^U5((p%PP{Dd-EmQ6Strz=NW>_QyMPDGa{>h@1w H@bCWtn9*XN literal 0 HcmV?d00001 diff --git a/Tools/Static Missions/pullStaticMissionInfo.Altis/pullMarkerInfo.sqf b/Tools/Static Missions/pullStaticMissionInfo.Altis/pullMarkerInfo.sqf new file mode 100644 index 0000000..da92aca --- /dev/null +++ b/Tools/Static Missions/pullStaticMissionInfo.Altis/pullMarkerInfo.sqf @@ -0,0 +1,60 @@ + +_cb = ""; + +////////////////// +// *** OPTIONAL **** +// Place a marker over your mission and configure it as you would like to to appear in the tame. +// The marker configuration will be included in the output of this script. +// Note ** Only the first marker placed will be processed ** +// Configure Marker +///////////////// +/* + _markerType = ["ELIPSE",[175,175],"GRID"]; + _markerType = ["mil_triangle",[0,0]]; +*/ + +diag_log format["<< ---- START %1 ---- >>",diag_tickTime]; + +_allmkr = allMapMarkers; +diag_log format["_allmkr = %1",_allmkr]; +if (count _allmkr == 0) then +//if !(typeName _mk isEqualTo "STRING") then +{ + hint "No Marker Found, no Marker Definitions Will Be generated"; + uiSleep 5; +} else { + + _mk = _allmkr select 0; + diag_log format["_mk = %1",_mk]; + systemChat format["marker shape = %1",markerShape _mk]; + systemChat format["marker type = %1",markerType _mk]; + _cb = _cb + format['_missionCenter = %1;%2',MarkerPos _mk,endl]; + //systemChat + switch (markerShape _mk) do + { + case "ELLIPSE": { + _cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl]; + }; + case "RECTANGLE": { + _cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl]; + }; + case "ICON": { + _cb = _cb + format['_markerType = ["%1",[0,0]];%2',getMarkerType _mk,endl]; + }; + }; + _cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl]; + _cb = _cb + format['_markerMissionName = "%1";%2',MarkerText _mk,endl]; + _cb = _cb + format['_markerLabel = "%1";%2',"",endl]; + _cb = _cb + format["%1%1",endl]; +}; + +/////////////////// +// All done, notify the user and copy the output to the clipboard +/////////////////// +_msg = "Marker Data organzied, formated and copied to the Clipboard"; +hint _msg; +systemChat _msg; +systemChat format["_cb has %1 characters",count _cb]; +copyToClipboard _cb; +diag_log "DONE"; + diff --git a/Tools/Static Missions/pullStaticMissionInfo.Altis/pullStaticMission.sqf b/Tools/Static Missions/pullStaticMissionInfo.Altis/pullStaticMission.sqf new file mode 100644 index 0000000..38487ab --- /dev/null +++ b/Tools/Static Missions/pullStaticMissionInfo.Altis/pullStaticMission.sqf @@ -0,0 +1,414 @@ + +_fn_isInside = { // returns true if an object is inside, underneath or on top of a building otherwise returns false. + ////////////////////// + // Determine if a unit is inside a building using two separate checkVisibility + ////////////////////// + // lineIntersects [ eyePos player, aimPos chopper, player, chopper] + _u = _this select 0; + private ["_u","_pos","_above","_below"]; + _pos = getPosASL _u; + _above = lineIntersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u]; + _below = lineintersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 2],_u]; + //diag_log format["_fn_isInside: _u %1 (%8)| typeOf _u %4 | _above %2 | _below %3 ",_u,_above,_below,typeOf _u]; + // If there is something above or below the object do a quick double-check to make sure there is a building there and not something else. + if (_above) then // test if any surfaces above are from buildingPos + { + _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,100]; + _above = false; + { + //diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)]; + if ((_x select 2) isKindOf "House") then {_above = true}; + }forEach _surfacesAbove; + }; + if (_below) then + { + _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100]; + _above = false; + { + //diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)]; + if ((_x select 2) isKindOf "House") then {_above = true}; + }forEach _surfacesBelow; + }; + + _isInside = if (_above || _below) then {true} else {false}; + //diag_log format["_fn_isInside: _isInside = %1",_isInside]; + _isInside +}; + +_fn_buildingContainer = { // returns the builing containing an object or objNull + private["_u","_pos","_building","_surfacesAbove","_surfacesBelow"]; + _u = _this select 0; + _pos = getPosASL _u; + private _building = objNull; + // lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique] + _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,10]; + { + if ((_x select 2) isKindOf "House" && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; + } forEach _surfacesAbove; + if (_building isEqualTo objNull) then + { + _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100]; + { + if ((_x select 2) isKindOf "House" && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; + } forEach _surfacesBelow; + }; + //diag_log format["_fn_buildingContainer: _u = %1 | _building = %2",_u,_building]; + _building +}; + +_fn_isInfantry = { // returns true if a unit is on foot otherwise returns false. + ////////////////////// + // Determine if a unit isinfantry rather than a unit manning a turret or vehicle + ////////////////////// + _u = _this select 0; + private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false}; + //diag_log format["_fn_isInfantry: _isInfantry = %1",_isInfantry]; + _isInfantry +}; + +diag_log "========== =========================="; +_msg = "starting script, please wait"; +systemChat _msg; +hint _msg; +/////////////////// +// Identify any buildings in which a garrison should be spawned using the Arma building positions. +// Tell the script which buildings to garrison by placing an object inside that designates them as such. +// I use a large yellow sphere for this purpose. +// The function below assembles a list of such buildings for use in defining the data for mission buildings. +/////////////////// + +private _cb = ""; + + +/////////////////// +// Change values of these constants to suit your needs +/////////////////// +#define aiDifficulty "Red" +#define minAI 3 +#define maxAI 6 +#define patrolRadius 45 +#define AI_respawnTime 600 +#define AI_timesToRespawn -1 +#define aiVehiclePatrolRadius 75 +#define vehiclePatrolRespawnTime 600 +#define vehiclePatrolTimesToRespawn -1 +#define staticWeaponRespawnTime 600 +#define staticWeaponTimesToRespawn -1 +#define aiAircraftPatrolRespawnTime 600 +#define aiAircraftPatrolRadius 1700 +#define aircraftPatrolTimesToRespawn -1 +#define oddsOfGarrison 0.67 +#define maxGarrisonStatics 3 +#define maxGarrisonUnits 4 +#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls +#define garrisionsTimesToRespawn -1 +#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient. +#define unitMarkerObject "Man" //"Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction. + +//////////////////////// +// Begin pulling data here +/////////////////////// + +_cb = _cb + format["_garrisonedBuildings_BuildingPosnSystem = [",endl]; +private _garrisonedBuildings = []; +_helpers = allMissionObjects garrisonMarkerObject; +//diag_log format["_helpers = %1",_helpers]; +{ + if ( (typeOf _x) isEqualTo garrisonMarkerObject) then + { + private _isInside = [_x] call _fn_isInside; + if (_isInside) then + { + _building = [_x] call _fn_buildingContainer; + _garrisonedBuildings pushbackunique _building; + _garrisonedBuildings pushbackunique _x; + // data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/], + // 1 2 3 4 5 6 7 8 9 10 11 12 13 + _line = format[' ["%1",%2,[%3,%4],[%5,%6],"%7",%8,%9,10,%11,%12,%13]',typeOf _building,getPosASL _building,vectorDir _building, vectorUp _building, 'true','true',aiDifficulty,oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits,AI_respawnTime,garrisionsTimesToRespawn]; + systemChat _line; + //diag_log _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + }; +} forEach _helpers; +_cb = _cb + format["%1];%1%1",endl]; +//diag_log format["line (165): _cb = %1",_cb]; +_configuredStatics = []; +_configuredUnits = []; + +_fn_configureGarrisonForBuildingASL = { + private["_b","_staticsInBuilding","_unitsInBuilding","_staticsText","_unitsText","_buildingGarrisonASL","_staticsInBuilding","_unitsInBuilding","_count"]; + _b = _this select 0; + _count = 0; + if (_b in _garrisonedBuildings) exitWith {""}; + _staticsText = ""; + _unitsText = ""; + _buildingGarrisonASL = ""; + _staticsInBuilding = nearestObjects[getPosASL _building,["StaticWeapon"],sizeOf (typeOf _building)]; + { + if !(_x in _configuredStatics) then + { + _isInside = [_x] call _fn_isInside; + if (_isInside) then {_building = [_x] call _fn_buildingContainer}; + if (_b isEqualTo _building) then + { + _configuredStatics pushBackUnique _x; + + if (_staticsText isEqualTo "") then + { + _staticsText = format['["%1",%2,%3]',typeOf _x,(getPosASL _x) vectorDiff (getPosASL _b),getDir _x]; + } else { + _staticsText = _staticsText + format[',["%1",%2,%3]',typeOf _x,(getPosASL _x) vectorDiff (getPosASL _b),getDir _x]; + }; + }; + }; + } forEach _staticsInBuilding; + _unitsInBuilding = nearestObjects[getPosASL _building,[unitMarkerObject],sizeOf (typeOf _building)]; + + { + if !(_x in _configuredUnits) then + { + _isInside = [_x] call _fn_isInside; + if (_isInside) then {_building = [_x] call _fn_buildingContainer}; + if (_b isEqualTo _building) then + { + _configuredUnits pushBackUnique _x; + + if (_unitsText isEqualTo "") then + { + _unitsText = format["[%1,%2]",(getPosASL _x) vectorDiff (getPosASL _b),getDir _x]; + } else { + _unitsText = _unitsText + format[",[%1,%2]",(getPosASL _x) vectorDiff (getPosASL _b),getDir _x]; + }; + _count = _count + 1; + }; + }; + } forEach _unitsInBuilding; + if ( !(_staticsText isEqualTo "") || !(_unitsText isEqualTo "")) then + { // 1 2 3 4 5 6 7 8 9 10 11 + _buildingGarrisonASL = format[' ["%1",%2,[%3,%4],[%5,%6],"%7",[%8],[%9],%10,%11]',typeOf _b,getPosASL _b,vectorDir _b,vectorUp _b,'true','true',aiDifficulty,_staticsText,_unitsText,AI_respawnTime,garrisionsTimesToRespawn]; + _garrisonedBuildings pushBackUnique _b; + }; + _buildingGarrisonASL +}; + +private _count = 0; +private _buildingCount = 0; +_cb = _cb + "_garrisonedBuilding_ASLsystem = ["; +{ + private _isInside = [_x] call _fn_isInside; + if (_isInside) then + { + private _building = [_x] call _fn_buildingContainer; + private _include = if ( !(_building in _garrisonedBuildings) && !((typeOf _building) isEqualTo unitMarkerObject) && !((typeOf _building) isEqualTo garrisonMarkerObject)) then {true} else {false}; + if (_include) then + { + //diag_log format["building info for garrisonedBuilding_ATL: _x = %1 | _building = %1",_x,_building]; + private _buildingGarrisonInformation = [_building] call _fn_configureGarrisonForBuildingASL; + //diag_log format["_buildingGarrisonInformation(ATL) = %1",_buildingGarrisonInformation]; + //diag_log format["_buildingGarrisonInformation(ATL) = %1",_buildingGarrisonInformation]; + //diag_log format["typeName _buildingGarrisonInformation(ATL) = %1",typeName _buildingGarrisonInformation]; + //if (typeName _buildingGarrisonInformation isEqualTo "STRING") then + //{ + //diag_log format["length _buildingGarrisonInformation(ATL) = %1",count (toArray(_buildingGarrisonInformation))]; + //}; + private _strLength = count(toArray(_buildingGarrisonInformation)); + if (_strLength > 0) then + { + if (_count == 0) then + { + _cb = _cb + format["%1%2",endl,_buildingGarrisonInformation]; + } else { + _cb = _cb + format[",%1%2",endl,_buildingGarrisonInformation]; + }; + + _count = _count + 1; + }; + }; + }; + +} forEach ((allMissionObjects "StaticWeapon") + (allMissionObjects unitMarkerObject)); +_cb = _cb + format["%1];%1%1",endl]; +diag_log format["line (227): _cb = %1",_cb]; +uiSleep 1; +/////////////////// +// Configure info remaining mission landscape +/////////////////// +_land = allMissionObjects "Static"; + +_count = 0; +_cb = _cb + format["_missionLandscape = [",endl]; +{ + diag_log format["evaluating mission landscape: _x = %1 | typeOf _x = %1",_x, typeOf _x]; + //diag_log format["evaluating mission landscape: _x %1 | typeOf _x %1",_x, _x isKindOf "Helper_Base_F"]; + if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then + { + _line = format[' ["%1",%2,[%3,%4],[%5,%6]]',typeOf _x,getPosASL _x,vectorDir _x, vectorUp _x, 'true','true']; + + systemChat _line; + if (_count == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + _count = _count + 1; + }; +}forEach allMissionObjects "Static"; +_cb = _cb + format["%1];%1%1",endl]; +diag_log format["line (276): _cb = %1",_cb]; + +/////////////////// +// Setup information for any remaining infantry groups +/////////////////// +_count = 0; +_cb = _cb + format["_aiGroupParameters = ["]; +{ + //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], + _isInside = [_x] call _fn_isInside; + _isInfantry = [_x] call _fn_isInfantry; + + diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry]; + if (_isInfantry) then + { + if (!(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x) && !(_x in _configuredUnits)) then + { // 1 2 3 4 5 6 7 + _line = format[' [%1,"%2",[%3,%4],%5,%6,%7]',getPosASL _x,aiDifficulty,minAI,maxAI,patrolRadius,AI_respawnTime,AI_timesToRespawn]; + systemChat _line; + if (_count == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + _count = _count + 1; + }; + }; +}forEach allMissionObjects "Man"; +_cb = _cb + format["%1];%1%1",endl]; +diag_log format["line (303): _cb = %1",_cb]; + +_count = 0; +_cb = _cb+ format["_aiScubaGroupParameters = ["]; +{ + //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], + if (surfaceIsWater (getPos _x)) then + { // 1 2 3 4 5 6 7 + _line = format[' [%1,"%2",[%3,%4],%5,%6,%7]',getPosASL _x,aiDifficulty,minAI,maxAI,patrolRadius,AI_respawnTime,AI_timesToRespawn]; + systemChat _line; + if (_count == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + _count = _count + 1; + }; +}forEach allMissionObjects "Man"; +_cb = _cb + format["%1];%1%1",endl]; +diag_log format["line (321)): _cb = %1",_cb]; + +/////////////////// +// Setup Info for vehicle patrols +/////////////////// +_cb = _cb + format["_vehiclePatrolParameters = ["]; +{ + if !((typeOf _x) isKindOf "SDV_01_base_F") then + { + _line = format[' ["%1",%2,"%3",%4,%5,%6]',typeOf _x, getPosASL _x, aiDifficulty,aiVehiclePatrolRadius,vehiclePatrolRespawnTime,vehiclePatrolTimesToRespawn]; //["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10] + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship"); +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Configs for Air Patrols +/////////////////// +_cb = _cb + "_airPatrols = ["; + //[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60] +{ + _line = format[' ["%1",%2,"%3",%4,%5,%6]',typeOf _x, getPosASL _x, aiDifficulty,aiAircraftPatrolRadius,aiAircraftPatrolRespawnTime,aircraftPatrolTimesToRespawn]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; +}forEach allMissionObjects "Air"; +_cb = _cb + format["%1];%1%1",endl]; + +/////////////////// +// Setup info for static/emplaced weapons +/////////////////// +_count = 0; +_cb = _cb + format["_missionEmplacedWeapons = ["]; +{ + if !(_x in _configuredStatics) then + { + // ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10] + // 1 2 3 4 5 6 + _line = format[' ["%1",%2,"%3",%4,%5,%6]',typeOf _x,getPosASL _x,aiDifficulty,0,staticWeaponRespawnTime,staticWeaponTimesToRespawn]; + systemChat _line; + if (_count == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + _count = _count + 1; + }; +}forEach allMissionObjects "StaticWeapon"; +_cb = _cb + format["%1];%1%1",endl]; + +_cb = _cb + "_submarinePatrolParameters = ["; +{ + if ((typeOf _x) isKindOf "SDV_01_base_F") then + { // 1 2 3 4 5 6 + _line = format[' ["%1",%2,"%3",%4,%5,%6]',typeOf _x, getPosASL _x, aiDifficulty,aiSubmarinePatrolRadius,vehicleSubmarineRespawnTime,vehiclePatrolTimesToRespawn]; //["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10] + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; +}forEach allMissionObjects "Ship"; +_cb = _cb + format["%1];%1%1",endl]; + +_cb = _cb + "_missionLootBoxes = ["; +{ + // [selectRandom blck_crateTypes,[22904.8,16742.5,6.30195],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts] + _line = format[' ["%1",%2,%3,[true,false],_crateLoot,_lootCounts]',typeOf _x,getPosASL _x,[VectorDir _x, VectorUp _x]]; + systemChat _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; +}forEach (allMissionObjects "ReammoBox") + (allMissionObjects "ReammoBox_F"); +_cb = _cb + format["%1];%1%1",endl]; + + +/////////////////// +// All done, notify the user and copy the output to the clipboard +/////////////////// +_msg = "All Objects organzied, formated and copied to the Clipboard"; +hint _msg; +systemChat _msg; +systemChat format["_cb has %1 characters",count _cb]; +copyToClipboard _cb; +//if (true) exitWith{diag_log _cb}; \ No newline at end of file diff --git a/Tools/Static Missions/pullStaticMissionInfo.Altis/template.sqf b/Tools/Static Missions/pullStaticMissionInfo.Altis/template.sqf new file mode 100644 index 0000000..d719e41 --- /dev/null +++ b/Tools/Static Missions/pullStaticMissionInfo.Altis/template.sqf @@ -0,0 +1,97 @@ + + +/* + 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) +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 + +/**************************************************** + + PLACE MARKER DEFINITIONS PULLED FROM YOUR MISSION BELOW + +*****************************************************/ + + + +/**************************************************** + + PLACE THE DATA DEFININING THE BUILDINGS, VEHICLES ETC. PULLED FROM YOUR MISSION BELOW + +*****************************************************/ + + + +/**************************************************** + + 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/Tools/centerAtPlayerPos.sqf b/Tools/centerAtPlayerPos.sqf deleted file mode 100644 index 5e608ea..0000000 --- a/Tools/centerAtPlayerPos.sqf +++ /dev/null @@ -1,3 +0,0 @@ - -CENTER = getPosASL player; -systemChat format["Center set to %1",CENTER]; \ No newline at end of file diff --git a/Tools/clearCenter.sqf b/Tools/clearCenter.sqf deleted file mode 100644 index 844f86c..0000000 --- a/Tools/clearCenter.sqf +++ /dev/null @@ -1,3 +0,0 @@ - -CENTER = nil; -systemChat format["Center set to nil"]; \ No newline at end of file diff --git a/Tools/configurForStaticMission.sqf b/Tools/configurForStaticMission.sqf deleted file mode 100644 index 57626d9..0000000 --- a/Tools/configurForStaticMission.sqf +++ /dev/null @@ -1,197 +0,0 @@ -/* -"StaticWeapon" -"Car","Tank" -"Air","Plane","Helicopter" -"Ship", -"Man" - - (_x get3DENAttribute 'enableSimulation') select 0, - (_x get3DENAttribute 'allowDamage') select 0 - -_missionLandscape = [ - ["Land_Cargo_HQ_V2_F",[22885.4,16756.8,3.19],[[0,1,0],[0,0,1]],[true,false]], -_missionEmplacedWeapons = [ - ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10] -_aiGroupParameters = [ - ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10] - [[22819.4,16929.5,0],"red",1, 75, 10] -_vehiclePatrolParameters = [ - ["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10] -_airPatrols = [ - [selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60] - -_missionCenter = [22584.9,15304.8,0]; -_markerLabel = ""; -//_markerType = ["ELIPSE",[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 -*/ -/////////////////// -// Ensure that a center has been set -/////////////////// -_cb = ""; -diag_log "========== =========================="; -////////////////// -// Configure Marker -///////////////// -_mk = allMapMarkers select 0; -_cb = _cb + format["_missionCenter = %1;%2",markerPos _mk,endl]; -_cb = _cb + format['_markerType = "%1";%2;',getMarkerType _mk,endl]; -_cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl]; -_cb = _cb + format['_markerLabel = "%1";%2',MarkerText _mk,endl]; - -if ((getMarkerType _mk) in ["ELIPSE","RECTANGLE"]) then -{ - _cb = _cb + format['_markerBrush = "%1";%2',markerBrush _mk,endl]; - _cb = _cb + format['_markerSize = "%1";%2',getMarkerSize _mk,endl]; -}; -_cb = _cb + format["%1%1",endl]; -/////////////////// -// Configure info for mission landscape -/////////////////// -_land = allMissionObjects "Static"; -systemChat format["%1 static objects",count _land]; -_cb = _cb + format["_missionLandscape = [",endl]; -{ - _line = format["[%1,%2,[%3,%4],%5,%6]",typeOf _x,getPosATL _x,VectorDir _x, vectorUp _x,'true','true']; - systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; -}forEach allMissionObjects "Static"; -_cb = _cb + format["%1];%1%1",endl]; - -/////////////////// -// Setup information for infantry groups -/////////////////// -_cb = _cb + format["_missionGroups = ["]; -{ - //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], - if !(surfaceIsWater (getPos _x)) then - { - _line = format['[%1,%2,[%3,%4],%5,%6]',getPosATL _x,aiDifficulty,minAI,maxAI,patrolRadius,AI_respawnTime]; - systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; - }; -}forEach allMissionObjects "Man"; -_cb = _cb + format["%1];%1%1",endl]; - -_cb = _cb+ format["_aiScubaGroupParameters = ["]; -{ - //[[22920.4,16887.3,3.19144],"red",[1,2], 75,120], - if (surfaceIsWater (getPos _x)) then - { - _line = format['[%1,%2,[%3,%4],%5,%6]',getPosATL _x,aiDifficulty,minAI,maxAI,patrolRadius,AI_respawnTime]; - systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; - }; -}forEach allMissionObjects "Man"; -_cb = _cb + format["%1];%1%1",endl]; - -/////////////////// -// Setup Info for vehicle patrols -/////////////////// -_cb = _cb + format["_missionPatrolVehicles = ["]; -{ - if !((typeOf _x) isKindOf "SDV_01_base_F") then - { - _line = format["[%1,%2,%3,%4,%5]",typeOf _x, getPosATL _x, aiDifficulty,aiVehiclePatrolRadius,vehiclePatrolRespawnTime]; //["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10] - systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; - }; -}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship"); -_cb = _cb + format["%1];%1%1",endl]; - -/////////////////// -// Configs for Air Patrols -/////////////////// -_cb = _cb + "_airPatrols = ["; - //[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60] -{ - _line = format["%1,%2,%3,%4,%5]",typeOf _x, getPosATL _x, aiDifficulty,aiAircraftPatrolRadius,aiAircraftPatrolRespawnTime]; - systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; -}forEach allMissionObjects "Air"; -_cb = _cb + format["%1];%1%1",endl]; - -/////////////////// -// Setup info for static/emplaced weapons -/////////////////// -_cb = _cb + format["_missionEmplacedWeapons = ["]; -{ - // ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10] - _line = format['[%1,%2,%3,%4,%5]',typeOf _x,getPosATL _x,aiDifficulty,0,staticWeaponRespawnTime]; - systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; -}forEach allMissionObjects "StaticWeapon"; -_cb = _cb + format["%1];%1%1",endl]; - -_cb = _cb + "_submarinePatrolParameters = ["; -{ - if ((typeOf _x) isKindOf "SDV_01_base_F") then - { - _line = format["[%1,%2,%3,%4,%5]",typeOf _x, getPosATL _x, aiDifficulty,aiSubmarinePatrolRadius,vehicleSubmarineRespawnTime]; //["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10] - systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; - }; -}forEach allMissionObjects "Ship"; -_cb = _cb + format["%1];%1%1",endl]; - -_cb = _cb + "_missionLootBoxes = ["; -{ - // [selectRandom blck_crateTypes,[22904.8,16742.5,6.30195],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts] - _line = format["%1,%2,%3,[true,false],_crateLoot,_lootCounts]",typeOf _x,getPosATL _x,[VectorDir _x, VectorUp _x]]; - systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; -}forEach allMissionObjects "ThingX"; -_cb = _cb + format["%1];%1%1",endl]; - - -/////////////////// -// All done, notify the user and copy the output to the clipboard -/////////////////// -_msg = "All Objects organzied, formated and copied to the Clipboard"; -hint _msg; -systemChat _msg; -systemChat format["_cb has %1 characters",count _cb]; -copyToClipboard _cb; -//if (true) exitWith{diag_log _cb}; \ No newline at end of file diff --git a/Tools/dynaicMissionTemplate.sqf b/Tools/dynaicMissionTemplate.sqf deleted file mode 100644 index 52531cc..0000000 --- a/Tools/dynaicMissionTemplate.sqf +++ /dev/null @@ -1,154 +0,0 @@ -/* - 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/Tools/init.sqf b/Tools/init.sqf deleted file mode 100644 index 2246176..0000000 --- a/Tools/init.sqf +++ /dev/null @@ -1,26 +0,0 @@ -aiDifficulty = "green"; -minAI = 5; -maxAI = 6; -minAIpatrolRadius = 25; -maxAIpatrolRadius = 40; - - -//////////////// -patrolRadius = 40; -AI_respawnTime = 600; -aiVehiclePatrolRadius = 600; -vehiclePatrolRespawnTime = 600; -aiAircraftPatrolRadius = 1000; -aiAircraftPatrolRespawnTime = 600; -staticWeaponRespawnTime = 600; -aiShipPatrolRadius = 600; -aiShipPatrolRespawnTime = 600; -aiSubmarinePatrolRadius = 200; -vehicleSubmarineRespawnTime = 600; - -player addAction["Center on Player","centerAtPlayerPos.sqf"]; -player addAction["Center on Road Cone","setCenterAtNearestRoadCone.sqf"]; -player addAction["Clear Center","clearCenter.sqf"]; -player AddAction["Add Relative Position for All Mission Objects to Clipboard","pullAllRelativeUnclassified.sqf"]; -player addAction["Add Dynamic Mission Configuration to Clipboard","pullRelativeClassified.sqf"]; -player addAction["Add Static Mission Configuration to Clipboard","configurForStaticMission.sqf"]; diff --git a/Tools/pullAllRelativeUnclassified.sqf b/Tools/pullAllRelativeUnclassified.sqf deleted file mode 100644 index a81b582..0000000 --- a/Tools/pullAllRelativeUnclassified.sqf +++ /dev/null @@ -1,15 +0,0 @@ -if (isNil "CENTER") exitWith {systemChat "Please define the mission center"}; - -_obj = []; -_cb = ""; -_mo = allMissionObjects "All"; -{ - _line = format["[%1,%2,%3]",typeOf _x, ((getPosASL _x) vectorDiff CENTER),getDir _x]; // (CENTER vectorDiff (getPosATL _x)),getDir _x]; - systemChat format["%1",_line]; - _obj pushBack _line; - _cb = _cb + format["%1,%2",_line,endl]; -}forEach _mo; -copyToClipboard _cb; -_msg = format["Objects formated for output and copied to clipboard at %1",diag_tickTime]; -systemChat _msg; -hint _msg; diff --git a/Tools/pullRelativeclassified.sqf b/Tools/pullRelativeclassified.sqf deleted file mode 100644 index 0cd8f2c..0000000 --- a/Tools/pullRelativeclassified.sqf +++ /dev/null @@ -1,161 +0,0 @@ -/* -"StaticWeapon" -"Car","Tank" -"Air","Plane","Helicopter" -"Ship", -"Man" -"ThingX" - - (_x get3DENAttribute 'enableSimulation') select 0, - (_x get3DENAttribute 'allowDamage') select 0 -*/ -/////////////////// -// Ensure that a center has been set -/////////////////// -if (isNil "CENTER") exitWith {systemChat "Please define the mission center"}; - -diag_log "========== =========================="; -_fn_getRelPos_x = { - //_opz = (getPos (_this select 0)) select 2; - //_cpz = CENTER select 2; - //_zd = _opz - _cpz; - private _p = (getPosASL (_this select 0)) vectorDiff CENTER; - //_p set [2,_zd]; - _p; -}; -/////////////////// -// Configure info for mission landscape -/////////////////// -_land = allMissionObjects "Static"; -//systemChat format["%1 static objects",count _land]; -_cb = format["_missionLandscape = [",endl]; -_landscape = allMissionObjects "Static"; -//systemchat format["%1 objects found",count _landscape]; -//uiSleep 3; -{ - //systemChat format["typeOf %1 | posn %2",typeOf _x, getPosASL _x]; - //systemChat format["get3DENAttirbute 'enableSimulation' = 51",(_x get3DENAttribute "enableSimulation") select 0]; - //uiSleep 2; - _line = format["[%1,%2,%3,%4,%5]",typeOf _x,[_x] call _fn_getRelPos_x,getDir _x, 'true','true']; - diag_log _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; -}forEach _landscape; -_cb = _cb + format["%1];%1%1",endl]; - -/////////////////// -// Setup information for infantry groups -/////////////////// -_cb = _cb +format["_missionGroups = ["]; -{ - _line = format['[%1,%2,%3,%4,%5,%6]',[_x] call _fn_getRelPos_x,aiDifficulty,minAI,maxAI,minAIpatrolRadius,maxAIpatrolRadius]; - //systemChat _line; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; -}forEach allMissionObjects "Man"; -_cb = _cb + format["%1];%1%1",endl]; - -/////////////////// -// Setup Info for vehicle patrols -/////////////////// -_cb = _cb + format["_missionPatrolVehicles = ["]; -{ - if (_x getVariable["lootVehilcle",0] == 0) then - { - _line = format['[%1,%2,%3]',typeOf _x,[_x] call _fn_getRelPos_x,getDir _x]; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; - }; -}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank")); -_cb = _cb + format["%1];%1%1",endl]; - -/////////////////// -// Setup Info for loot vehicles -/////////////////// -_cb = _cb + format["_missionLootVehicles = ["]; -{ - if (_x getVariable["lootVehilcle",0] == 1) then - { - //["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]], - _line = format['[%1,%2,%3,_crateLoot,_lootCounts]',typeOf _x,[_x] call _fn_getRelPos_x,getDir _x]; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; - }; -}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank")); -_cb = _cb + format["%1];%1%1",endl]; - -////////////////// -// Setup Info for loot crates -/////////////////// -_cb = _cb + format["_missionLootBoxes = ["]; -{ - //[selectRandom blck_crateTypes,[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts], - systemChat format["Crate %1 | pos %2",_x, getPosATL _x]; - _line = format['[%1,%2,%3,_crateLoot,_lootCounts]',typeOf _x,[_x] call _fn_getRelPos_x,getDir _x]; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; -}forEach ((allMissionObjects "ThingX")); -_cb = _cb + format["%1];%1%1",endl]; -/////////////////// -// for future use -/////////////////// -{ - -}forEach allMissionObjects "Air"; - -/////////////////// -// Setup info for static/emplaced weapons -/////////////////// -_cb = _cb + format["_missionEmplacedWeapons = ["]; -{ - systemChat format["HMB %1 | pos %2",_x, getPosATL _x]; - _line = format['[%1,%2]',typeOf _x,[_x] call _fn_getRelPos_x]; - if (_forEachIndex == 0) then - { - _cb = _cb + format["%1%2",endl,_line]; - } else { - _cb = _cb + format[",%1%2",endl,_line]; - }; -}forEach allMissionObjects "StaticWeapon"; -_cb = _cb + format["%1];%1%1",endl]; - -/////////////////// -// If needed you can uncomment this and configure using the schema above -/////////////////// -/* -_ship = []; -{ - _cn = typeOf _x; - _ship pushback format['[%1,%2,"green"]',_cn,getPos _x]; -} forEach allMissionObjects "Ship"; -*/ - -/////////////////// -// All done, notify the user and copy the output to the clipboard -/////////////////// -_msg = "All Objects organzied, formated and copied to the Clipboard"; -hint _msg; -systemChat _msg; -//systemChat format["_cb has %1 characters",count _cb]; -copyToClipboard _cb; -//if (true) exitWith{diag_log _cb}; \ No newline at end of file diff --git a/Tools/setCenterAtNearestRoadCone.sqf b/Tools/setCenterAtNearestRoadCone.sqf deleted file mode 100644 index 74cbb83..0000000 --- a/Tools/setCenterAtNearestRoadCone.sqf +++ /dev/null @@ -1,3 +0,0 @@ -_cone = "RoadCone_L_F"; -CENTER = getposASL (nearestObject[getPos player, _cone]); -systemChat format["Center set to %1",CENTER]; diff --git a/Tools/staticMissionTemplate.sqf b/Tools/staticMissionTemplate.sqf deleted file mode 100644 index 804ce44..0000000 --- a/Tools/staticMissionTemplate.sqf +++ /dev/null @@ -1,128 +0,0 @@ -/* - 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/ -*/ -private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape", - "_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons", - "_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"]; - -_mission = "UMS mission example #2"; // Included for additional documentation. Not intended to be spawned as a mission per se. -_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 -_missionCenter = [22584.9,15304.8,0]; // I pulled this from the position of the marker. -_markerLabel = ""; -//_markerType = ["ELIPSE",[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. - -]; // 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 - -]; // 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. - -]; // [ ["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 = [ - -]; -// 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 = [ - -]; -_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 = [ - -]; //[ ["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 = [ - -]; - -_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 = [ - -]; - -// 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]; From 91ac249eeb4d7acfd8b6f51fe6c6a59805482314 Mon Sep 17 00:00:00 2001 From: Chris Cardozo Date: Sun, 14 Oct 2018 13:31:17 -0400 Subject: [PATCH 2/3] Update changeLog.sqf --- changeLog.sqf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/changeLog.sqf b/changeLog.sqf index 57e3c7c..6783c7c 100644 --- a/changeLog.sqf +++ b/changeLog.sqf @@ -8,6 +8,14 @@ Ideas or code from that by Vampire and KiloSwiss have been used for certain func Significant Changes: ===================== +6.86 (Experimental) + +Build 153. +Added: tools to pull data from mission.sqm pre-formated for use in static or dynamic blckeagls missions. +Added: functions that allow you to spawn units, statics inside or on top of buildings. +Fixed: an issue that caused vehicles to be destroyed by buildings upon mission spawn. +Fixed: an issue that prevented completion of capture/hostage missions on Exile servers (Thanks to MGTDB). + 6.84 Added Option to load weapons, pistols, uniforms, headgear, vests and backpacks from CfgPricing or the Arsenal Pricing and exclude items above a certain price Add details on configs for enabling this and setting the maximum price From 8d06b9e851020e9251f38463d4b224ed08b076e2 Mon Sep 17 00:00:00 2001 From: Chris Cardozo Date: Sun, 21 Oct 2018 07:56:34 -0400 Subject: [PATCH 3/3] Updated for Build 155 --- .../Compiles/Functions/GMS_fnc_mainThread.sqf | 3 +- .../Functions/GMS_fnc_nearestPlayers.sqf | 10 ++-- .../Groups/GMS_fnc_create_AI_Group.sqf | 8 ++- .../Groups/GMS_fnc_missionGroupMonitor.sqf | 27 ++++----- .../GMS_fnc_garrisonBuilding_ATLsystem.sqf | 12 ++-- .../Missions/GMS_fnc_missionSpawner.sqf | 18 +++--- .../Compiles/Units/GMS_fnc_processAIHit.sqf | 5 +- .../Compiles/Units/GMS_fnc_processAIKill.sqf | 6 +- .../Vehicles/GMS_fnc_revealNearbyPlayers.sqf | 52 ++++++++++++++++ .../GMS_fnc_scanForPlayersNearVehicles.sqf | 9 +++ .../Vehicles/GMS_fnc_spawnBoatPatrol.sqf | 2 + .../Vehicles/GMS_fnc_spawnMissionHeli.sqf | 4 +- .../Vehicles/GMS_fnc_spawnSubPatrol.sqf | 2 + .../Vehicles/GMS_fnc_spawnVehiclePatrol.sqf | 3 + .../custom_server/Compiles/blck_functions.sqf | 4 +- .../custom_server/Compiles/blck_variables.sqf | 29 +++++---- .../custom_server/Configs/blck_configs.sqf | 30 ++++++++-- .../Configs/blck_configs_epoch.sqf | 59 ++++++++++++------- .../Configs/blck_configs_exile.sqf | 24 +++++--- .../Configs/blck_configs_exile_mil.sqf | 16 ++++- .../Configs/blck_configs_mil.sqf | 3 +- .../custom_server/Configs/blck_defines.hpp | 28 +++++++-- .../Configs/blck_dynamicConfigs.sqf | 2 +- .../custom_server/Missions/Blue/default.sqf | 2 +- .../custom_server/init/blck_init_HC.sqf | 17 +++--- .../custom_server/init/blck_init_server.sqf | 44 +++++++++----- @GMS/addons/custom_server/init/build.sqf | 4 +- .../pullDynamicMission.sqf | 15 +++-- changeLog.sqf | 43 +++++++++----- 29 files changed, 333 insertions(+), 148 deletions(-) create mode 100644 @GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf create mode 100644 @GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf index 5bd9a25..3f54f6d 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -41,7 +41,7 @@ while {true} do _timer5sec = diag_tickTime + 5; [] call blck_fnc_missionGroupMonitor; [] call blck_fnc_sm_missionPatrolMonitor; - //[] call blck_fnc_vehiclePatrolPlayerSensor; + //diag_log format["[blckeagls] _fnc_mainThread 5 Second Timer Handled | Timstamp %1",diag_tickTime]; }; if (diag_tickTime > _timer20sec) then @@ -49,6 +49,7 @@ while {true} do [] call blck_fnc_cleanupAliveAI; [] call blck_fnc_cleanupObjects; [] call blck_fnc_cleanupDeadAI; + [] call blck_fnc_scanForPlayersNearVehicles; //[] call blck_fnc_cleanEmptyGroups; _timer20sec = diag_tickTime + 20; //diag_log format["[blckeagls] _fnc_mainThread 20 Second Timer Handled | Timstamp %1",diag_tickTime]; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf index a4bc55e..363fa50 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestPlayers.sqf @@ -1,10 +1,8 @@ - -params["_coords","range"]; +//diag_log format["_fnc_nearestPlayers: _this = %1",_this]; +params["_coords","_range"]; private["_return","_playerClassNames","_epochClasses","_exileClasses"]; -_epochClasses = ["Epoch_Female_F","Epoch_Male_F"]; -_exileClasses = ["Exile_Unit_Player"]; -if (blck_modType isEqualTo "Epoch") then {_playerClassNames = _epochClasses}; -if (blck_modType isEqualTo "Exile") then {_playerClassNames = _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/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf index ceeb554..ac7b3d4 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_create_AI_Group.sqf @@ -16,9 +16,11 @@ private["_groupSpawned"]; _groupSpawned = createGroup [blck_AI_Side, true]; //_groupSpawned setVariable["groupVehicle",objNull]; -#ifdef useDynamicSimulation -_groupSpawned enableDynamicSimulation true; -#endif +if (blck_simulationManager == blck_useDynamicSimulationManagement) then +{ + _groupSpawned enableDynamicSimulation true; +}; + _groupSpawned setcombatmode "RED"; _groupSpawned setBehaviour "COMBAT"; _groupSpawned allowfleeing 0; diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf index 828a3a5..d5f7ecc 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_missionGroupMonitor.sqf @@ -164,28 +164,22 @@ _fn_simulationMonitor = { }else{ _playerType = ["Epoch_Male_F","Epoch_Female_F"]; }; - //diag_log format["_fn_simulationMonitor:: _playerType = %1",_playerType]; { - // player nearEntities [["Car", "Motorcycle", "Tank"], 50]; - _players = (leader _x) nearEntities [_playerType, 1800]; + _players = (leader _x) nearEntities [_playerType, blck_simulationEnabledDistance]; if (count _players > 0) then { - // Be sure simulation is on for all units in the group - if !(_x getVariable["blck_simulationStatus",false]) then + if !(simulationEnabled _x) then { - _x setVariable["blck_simulationStatus",true]; - { - _x enableSimulationGlobal true; - }forEach (units _x); + { + _x enableSimulationGlobal true; + (_players select 0) reveal _x; // Force simulation on + }forEach (units _x); }; }else{ // Be sure simulation is off for all units in the group. - if !(_x getVariable["blck_simulationStatus",true]) then + if (simulationEnabled _x) then { - _x setVariable["blck_simulationStatus",false]; - { - _x enableSimulationGlobal false; - }forEach (units _x); + {_x enableSimulationGlobal false}forEach (units _x); }; }; } forEach blck_monitoredMissionAIGroups; @@ -200,6 +194,5 @@ if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: execut uiSleep 0.1; [] call _fn_monitorGroupWaypoints; -#ifndef useDynamicSimulation -[] call _fn_simulationMonitor; -#endif +if (blck_simulationManager == blck_useBlckeaglsSimulationManagement) then {[] call _fn_simulationMonitor}; + diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf index 5e4c184..bf8f77c 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf @@ -41,9 +41,9 @@ _staticsSpawned = []; _group = call blck_fnc_create_AI_Group; { _g = _x; - { - diag_log format["_g %1 = %2",_forEachIndex,_g select _forEachIndex]; - }forEach _g; + //{ + //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]; @@ -53,8 +53,8 @@ _group = call blck_fnc_create_AI_Group; _buildingsSpawned pushBack _building; _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"]]; +//{ + //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/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index 2e53b64..bdf2de6 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -64,6 +64,7 @@ _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"; @@ -174,14 +175,6 @@ if (blck_debugLevel > 0) then }; #endif -uiSleep delayTime;; - -if (count _missionLootVehicles > 0) then -{ - _temp = [_coords,_missionLootVehicles,_loadCratesTiming] call blck_fnc_spawnMissionLootVehicles; - _crates append _temp; -}; - uiSleep delayTime; _abort = false; @@ -364,7 +357,6 @@ if (_abort) exitWith _vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange; if (blck_useVehiclePatrols && ((_vehToSpawn > 0) || count _missionPatrolVehicles > 0)) then { - #define useRelativePos true _temp = [_coords,_vehToSpawn,_aiDifficultyLevel,_missionPatrolVehicles,useRelativePos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnMissionVehiclePatrols; if (typeName _temp isEqualTo "ARRAY") then @@ -395,6 +387,13 @@ if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then _objects append _crates; }; }; +uiSleep delayTime;; + +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]; @@ -459,6 +458,7 @@ while {_missionComplete isEqualTo -1} do #ifdef blck_debugMode if (blck_debugLevel > 2) exitWith {uiSleep blck_triggerLoopCompleteTime;diag_log "_missionSpawner (492) scripted Mission End blck_debugLevel = 3";}; #endif + if (_endIfPlayerNear) then { if ([_locations,20,true] call blck_fnc_playerInRangeArray) then {_missionComplete = 1}; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf index 924029b..254ecb6 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf @@ -16,7 +16,7 @@ private ["_unit","_instigator","_group","_wp"]; _unit = _this select 0 select 0; _instigator = _this select 0 select 3; - + diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit]; #ifdef blck_debugMode if (blck_debugLevel >= 2) then { @@ -47,8 +47,11 @@ if ((damage _unit) > 0.1 ) then diag_log format["_EH_AIHit::-->> Healing unit %1",_unit]; }; _unit setVariable["hasHealed",true,true]; + /* _unit addMagazine "SmokeShellOrange"; _unit fire "SmokeShellMuzzle"; + */ + "SmokeShellRed" createVehicle ((position _unit) getPos[3,_unit getRelDir _instigator]; _unit addItem "FAK"; _unit action ["HealSoldierSelf", _unit]; _unit setDamage 0; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf index 3d2eada..1f6cdbc 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf @@ -25,10 +25,8 @@ _unit setVariable ["blck_cleanupAt", (diag_tickTime) + blck_bodyCleanUpTimer, tr blck_deadAI pushback _unit; _group = group _unit; [_unit] joinSilent grpNull; -if (count(units _group) < 1) then { - #ifdef useDynamicSimulation - _group enableDynamicSimulation false; - #endif +if (count(units _group) < 1) then +{ deleteGroup _group; }; if (blck_launcherCleanup) then {[_unit] spawn blck_fnc_removeLaunchers;}; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf new file mode 100644 index 0000000..84da46c --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf @@ -0,0 +1,52 @@ + +/* + algorhytm one: pure chance base on inverse of distance. More efficient. + algorhythm two: based on canSee. More detailed. +*/ + +params["_vehicle","_searchRadius","_detectionOdds"]; +private["_player","_detectionOdds","_nearbyPlayers","_knowsAbout","_cansee","_knowledgeGained"]; +_nearbyPlayers = [position _vehicle, _vehicle getVariable["blck_vehicleSearchRange",500]] call blck_fnc_nearestPlayers; + +if (blck_revealMode isEqualTo "detailed") then +{ + private["_crew","_group"]; + _crew = crew _vehicle; + _group = group(_crew select 0); + { + 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]; + //diag_log format["_fnc_revealNearbyPlayers: player %1 revealed to unit %2",_player,_x]; + }forEach _crew; + }; + }forEach _nearbyPlayers; +}; + +if (blck_revealMode isEqualTo "basic") then +{ + { + _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/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf new file mode 100644 index 0000000..c3a52bf --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf @@ -0,0 +1,9 @@ +// 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/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf index e1d800c..58b941e 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf @@ -21,6 +21,8 @@ if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1 _veh = createVehicle[_vehType, _pos, [], 0, "NONE"]; _veh setVariable["blck_vehicle",true]; +_veh setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeSurfaceVehicle]; +_veh setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; [_veh] call blck_fnc_protectVehicle; #ifdef blck_debugMode diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf index 4056a8e..b2fa2d5 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf @@ -72,7 +72,9 @@ if !(isNull _grpPilot) then #endif _patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"]; - //_grpPilot setVariable["groupVehicle",_patrolHeli]; + _patrolHeli setVariable["blck_vehicle",true]; + _patrolHeli setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeAir]; + _patrolHeli setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; [_patrolHeli] call blck_fnc_protectVehicle; _patrolHeli setFuel 1; _patrolHeli engineOn true; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf index e1d800c..cf2359b 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf @@ -22,6 +22,8 @@ if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1 _veh = createVehicle[_vehType, _pos, [], 0, "NONE"]; _veh setVariable["blck_vehicle",true]; [_veh] call blck_fnc_protectVehicle; +_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];}; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf index 41ffed2..aa3219d 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf @@ -40,6 +40,9 @@ if !(isNull _group) then _veh = [_vehType,_pos] call blck_fnc_spawnVehicle; // _veh addEventHandler["HandleDamage",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleDamage}]; _veh addMPEventHandler["MPHit",{ [_this] call compile preprocessFileLineNumbers blck_EH_AIVehicle_HandleHit}]; + _veh setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeGroundVehicle]; + _veh setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; + //_group setVariable["groupVehicle",_veh]; #ifdef blck_debugMode if (blck_debugLevel > 1) then diff --git a/@GMS/addons/custom_server/Compiles/blck_functions.sqf b/@GMS/addons/custom_server/Compiles/blck_functions.sqf index b364ad9..eeadfbe 100644 --- a/@GMS/addons/custom_server/Compiles/blck_functions.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_functions.sqf @@ -41,7 +41,7 @@ blck_fnc_spawnMissionLootBoxesRelative = compileFinal preprocessFileLineNumbers blck_fnc_spawnSingleObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnSingleObject.sqf"; blck_fnc_emptyObjectInventory = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObjectInventory.sqf"; blck_fnc_spawnMissionLandscapeRelative = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_spawnMissionLandscapeRelative.sqf"; - +blck_fnc_nearestPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_nearestPlayers.sqf"; //blck_fnc_getTraderCitiesEpoch = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitiesEpoch.sqf"; //blck_fnc_getTraderCitesExile = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitesExile.sqf"; @@ -123,6 +123,8 @@ blck_fnc_releaseVehicleToPlayers = compileFinal preprocessFileLineNumbers "\q\ad blck_fnc_deleteAIVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_deleteAIVehicle.sqf"; blck_fnc_destroyVehicleAndCrew = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_destroyVehicleAndCrew.sqf"; blck_fnc_reloadVehicleAmmo = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_reloadVehicleAmmo.sqf"; +blck_fnc_scanForPlayersNearVehicles = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_scanForPlayersNearVehicles.sqf"; +blck_fnc_revealNearbyPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealNearbyPlayers.sqf"; // functions to support Units blck_fnc_removeGear = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"; // Strip an AI unit of all gear. diff --git a/@GMS/addons/custom_server/Compiles/blck_variables.sqf b/@GMS/addons/custom_server/Compiles/blck_variables.sqf index 62b529b..eb96142 100644 --- a/@GMS/addons/custom_server/Compiles/blck_variables.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_variables.sqf @@ -12,8 +12,10 @@ */ #include"\q\addons\custom_server\Configs\blck_defines.hpp"; -blck_debugON = true; -blck_debugLevel = 0; // Sets level of detail for debugging info - WIP. +diag_log "[blckeagls] loading variables"; + +// blck_debugON = false; Moved to blck_configs.sqf because of script loading order issues. +// blck_debugLevel = 0; Moved to blck_configs.sqf because of script loading order issues. blck_minFPS = 8; //////////////////////////////////////////////// @@ -22,7 +24,6 @@ blck_minFPS = 8; blck_townLocations = []; //nearestLocations [blck_mapCenter, ["NameCity","NameCityCapital"], 30000]; blck_ActiveMissionCoords = []; blck_recentMissionCoords = []; -blck_locationBlackList = []; blck_monitoredVehicles = []; blck_livemissionai = []; blck_monitoredMissionAIGroups = []; // Used to track groups in active missions for whatever purpose @@ -34,20 +35,26 @@ blck_activeMissions = []; blck_deadAI = []; blck_connectedHCs = []; blck_missionMarkers = []; -blck_groupsOnHC = []; -blck_vehiclesOnHC = []; +//blck_groupsOnHC = []; +//blck_vehiclesOnHC = []; //blck_HC_monitoredVehicles = []; //blck_HC_monitoredGroups = []; -#ifdef useDynamicSimulation -"Group" setDynamicSimulationDistance 1800; -enableDynamicSimulationSystem true; -#endif +if (blck_simulationManager == 2) then +{ + "Group" setDynamicSimulationDistance 1800; + enableDynamicSimulationSystem true; +}; blck_heliCrashSites = []; // radius within whih missions are triggered. The trigger causes the crate and AI to spawn. -blck_TriggerDistance = 1000; +#ifdef blck_milServer +blck_TriggerDistance = 1500; +#else +blck_TriggerDistance = 1500; +#endif + blck_mainThreadUpdateInterval = 60; -//blck_missionSpawning = false; +blck_revealMode = "detailed"; //""basic" /*group or vehicle level reveals*/,detailed /*unit by unit reveals*/"; diag_log "[blckeagls] Variables Loaded"; blck_variablesLoaded = true; diff --git a/@GMS/addons/custom_server/Configs/blck_configs.sqf b/@GMS/addons/custom_server/Configs/blck_configs.sqf index ffe225f..0abfbe1 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs.sqf @@ -13,12 +13,23 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; + /* + 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 execVM "\q\addons\custom_server\Configs\blck_configs_mil.sqf"; if (true) exitWith {}; #endif - diag_log "[blckeagls] Loading configurations for Non-militarized servers: blck_configs.sqf"; + //diag_log "[blckeagls] Loading configurations for Non-militarized servers: blck_configs.sqf"; + /* + ************************************** + Configurations begin here + ************************************** + */ /*************************************************************** BLCKEAGLS SUPPLEMENTAL MODULES **************************************************************** @@ -31,7 +42,14 @@ 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]; + /* + 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 = false; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below. blck_timeAccelerationDay = 0.25; // Daytime time accelearation @@ -87,7 +105,7 @@ 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" - blck_killPercentage = 0.9; // The mission will complete if this fraction of the total AI spawned has been killed. + 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. @@ -367,8 +385,8 @@ { diag_log format["[blckeagles] Dynamic Configs Enabled"]; execVM "\q\addons\custom_server\Configs\blck_dynamicConfigs.sqf"; - waitUntil {(isNil "blck_configsExileLoaded") isEqualTo false;}; - waitUntil{blck_dynamicConfigsLoaded}; - blck_dynamicConfigsLoaded = nil; + //waitUntil {(isNil "blck_configsExileLoaded") isEqualTo false;}; + //waitUntil{blck_dynamicConfigsLoaded}; + //blck_dynamicConfigsLoaded = nil; }; blck_configsLoaded = true; diff --git a/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf b/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf index b53b2e5..f04f016 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_epoch.sqf @@ -538,7 +538,10 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "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","ItemGoldBar2oz","ItemGoldBar3oz","ItemGoldBar4oz","ItemGoldBar5oz","ItemGoldBar6oz","ItemGoldBar7oz","ItemGoldBar8oz","ItemGoldBar9oz","ItemGoldBar10oz","ItemSilverBar","ItemSilverBar2oz","ItemSilverBar3oz","ItemSilverBar4oz","ItemSilverBar5oz","ItemSilverBar6oz","ItemSilverBar7oz","ItemSilverBar8oz","ItemSilverBar9oz","ItemSilverBar10oz","ItemAluminumBar","ItemAluminumBar10oz","ItemCopperBar","ItemCopperBar10oz","ItemTinBar","ItemTinBar10oz","ItemTopaz","ItemOnyx","ItemSapphire","ItemAmethyst","ItemEmerald","ItemCitrine","ItemRuby","ItemQuartz","ItemJade","ItemGarnet","ItemKiloHemp"]; + 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", @@ -594,9 +597,9 @@ for examples of how you can do this see \Major\Compositions.sqf ["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"], + ["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"], @@ -629,8 +632,10 @@ for examples of how you can do this see \Major\Compositions.sqf ["10Rnd_127x54_Mag" ,1,4], ["10Rnd_127x54_Mag",1,4], ["10Rnd_93x64_DMR_05_Mag" ,1,4], - ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ["10Rnd_93x64_DMR_05_Mag" ,1,4], // 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], @@ -662,7 +667,7 @@ for examples of how you can do this see \Major\Compositions.sqf ["ItemAluminumBar",1,3], ["ItemTinBar",1,3], ["ItemCanvas",2,4], - //"SeedPacket_Hemp","SeedPacket_GoldenSeal","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower" + //"SeedPacket_Hemp","SeedPacket_GoldenSeal","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower" ["ItemKiloHemp",1,3], ["ItemRope",1,3], ["ItemBurlap",1,3], @@ -682,7 +687,7 @@ for examples of how you can do this see \Major\Compositions.sqf ["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], - "Towelette" , "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "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" @@ -730,11 +735,22 @@ for examples of how you can do this see \Major\Compositions.sqf ["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","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_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_06_camo_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 @@ -757,7 +773,10 @@ for examples of how you can do this see \Major\Compositions.sqf ["10Rnd_127x54_Mag" ,1,4], ["10Rnd_127x54_Mag",1,4], ["10Rnd_93x64_DMR_05_Mag" ,1,4], - ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + // 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], @@ -789,7 +808,7 @@ for examples of how you can do this see \Major\Compositions.sqf ["ItemAluminumBar",1,3], ["ItemTinBar",1,3], ["ItemCanvas",2,4], - //"SeedPacket_Hemp","SeedPacket_GoldenSeal","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower" + //"SeedPacket_Hemp","SeedPacket_GoldenSeal","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower" ["ItemKiloHemp",1,3], ["ItemRope",1,3], ["ItemBurlap",1,3], @@ -810,7 +829,7 @@ for examples of how you can do this see \Major\Compositions.sqf ["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], - "Towelette" , "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "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" @@ -935,10 +954,10 @@ for examples of how you can do this see \Major\Compositions.sqf ["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], - "Towelette" , "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "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" + "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], @@ -1058,7 +1077,7 @@ for examples of how you can do this see \Major\Compositions.sqf ["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], - "Towelette" , "ItemVitamins", "morphine_epoch", "iodide_pills_epoch", "adrenaline_epoch", + "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" @@ -1077,7 +1096,7 @@ 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"; - blck_configsEpochLoaded = true; \ No newline at end of file +blck_crateTypes = ["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F","Box_NATO_Wps_F","I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F"]; // Default crate type. + +diag_log "[blckeagls] Configurations for Epoch Loaded"; +blck_configsEpochLoaded = true; diff --git a/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf b/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf index e74beaf..e51b1a2 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_exile.sqf @@ -710,9 +710,9 @@ for examples of how you can do this see \Major\Compositions.sqf ["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"], + ["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"], @@ -743,7 +743,10 @@ for examples of how you can do this see \Major\Compositions.sqf ["10Rnd_127x54_Mag" ,1,5], ["10Rnd_127x54_Mag",1,5], ["10Rnd_93x64_DMR_05_Mag" ,1,5], - ["10Rnd_93x64_DMR_05_Mag" ,1,5] + ["10Rnd_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], @@ -805,6 +808,10 @@ for examples of how you can do this see \Major\Compositions.sqf ["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","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"], @@ -830,7 +837,10 @@ for examples of how you can do this see \Major\Compositions.sqf ["10Rnd_127x54_Mag" ,1,4], ["10Rnd_127x54_Mag",1,4], ["10Rnd_93x64_DMR_05_Mag" ,1,4], - ["10Rnd_93x64_DMR_05_Mag" ,1,4] + ["10Rnd_93x64_DMR_05_Mag" ,1,4], + // 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], @@ -1035,10 +1045,10 @@ blck_contructionLootExile = [ ["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_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"] + "Exile_Item_XM8" ], [ // Backpacks diff --git a/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf b/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf index bb44f7f..95cb473 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_exile_mil.sqf @@ -675,6 +675,13 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "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"]; @@ -846,7 +853,10 @@ for examples of how you can do this see \Major\Compositions.sqf ["10Rnd_127x54_Mag",1,4], ["10Rnd_93x64_DMR_05_Mag" ,1,4], ["10Rnd_93x64_DMR_05_Mag" ,1,4], - ["130Rnd_338_Mag",3,5] + ["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], @@ -1051,10 +1061,10 @@ blck_contructionLootExile = [ ["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_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"] + "Exile_Item_XM8" ], [ // Backpacks diff --git a/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf b/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf index 1f6a484..b002760 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf @@ -26,7 +26,8 @@ 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 diff --git a/@GMS/addons/custom_server/Configs/blck_defines.hpp b/@GMS/addons/custom_server/Configs/blck_defines.hpp index a22f1b3..8e328f9 100644 --- a/@GMS/addons/custom_server/Configs/blck_defines.hpp +++ b/@GMS/addons/custom_server/Configs/blck_defines.hpp @@ -11,14 +11,22 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ + #define useAPEX -//#define useDynamicSimulation -//#define blck_debugMode -//#define blck_milServer +#define blck_milServer +#define blck_useCUP +#define blck_useRHS //////////////////////////// // Do not touch anything below this line /////////////////////////// + +//#define useDynamicSimulation +//#define blck_debugMode +//#define GRG_TestServer +#define GRGserver +#define blck_triggerLoopCompleteTime 40*60 + #define onFoot 1 #define inVehicle 2 @@ -29,5 +37,15 @@ #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 diff --git a/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf b/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf index d5a99b8..4ae4aff 100644 --- a/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf +++ b/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf @@ -103,7 +103,7 @@ if (blck_modType isEqualTo "Exile") then { _classnameList = (missionConfigFile >> "CfgExileArsenal" ) call BIS_fnc_getCfgSubClasses; }; -diag_log format["_fnc_dynamicConfigsConfigurator: count _classnameList = %1",count _classnameList]; +//diag_log format["_fnc_dynamicConfigsConfigurator: count _classnameList = %1",count _classnameList]; { private _temp = [_x] call bis_fnc_itemType; //diag_log _temp; diff --git a/@GMS/addons/custom_server/Missions/Blue/default.sqf b/@GMS/addons/custom_server/Missions/Blue/default.sqf index 46e3a86..0323c78 100644 --- a/@GMS/addons/custom_server/Missions/Blue/default.sqf +++ b/@GMS/addons/custom_server/Missions/Blue/default.sqf @@ -79,7 +79,7 @@ private _addedLandscape = ["Land_FoodSacks_01_cargo_brown_F","Land_FoodSacks_01_ "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 +_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 [ diff --git a/@GMS/addons/custom_server/init/blck_init_HC.sqf b/@GMS/addons/custom_server/init/blck_init_HC.sqf index b3c9bb2..ad678eb 100644 --- a/@GMS/addons/custom_server/init/blck_init_HC.sqf +++ b/@GMS/addons/custom_server/init/blck_init_HC.sqf @@ -47,15 +47,14 @@ blck_configsLoaded = nil; call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf"; #ifdef GRGserver -diag_log "[blckegls] Running Ghostridergaming Version"; +diag_log "[blckeagls] Running GRG Version"; #endif -#ifdef useDynamicSimulation -diag_log "[blckegls] dynamic simulation manager enabled"; -#else -diag_log "[blckegls] blckegls simulation manager enabled"; -#endif -//_marker = createMarker ["HomeBase",[24000,18000,0]]; -//_marker setMarkerColor "ColorBlack"; -//_marker setMarkerType "hd_flag"; + +switch (blck_simulationManager) do + case 1: {diag_log "[blckeagls] dynamic simulation manager enabled"}; + case 2: {diag_log "[blckeagls] blckeagls simulation manager enabled"}; + case 0: {diag_log "[blckeagls] simulation management disabled"}; +}; + diag_log format["[blckeagls] for HC version %1 Build %2 Loaded in %3 seconds",_blck_versionDate,_blck_version,diag_tickTime - _blck_loadingStartTime]; //,blck_modType]; [] spawn blck_fnc_HC_monitor; diff --git a/@GMS/addons/custom_server/init/blck_init_server.sqf b/@GMS/addons/custom_server/init/blck_init_server.sqf index e671e69..c82bf89 100644 --- a/@GMS/addons/custom_server/init/blck_init_server.sqf +++ b/@GMS/addons/custom_server/init/blck_init_server.sqf @@ -11,24 +11,19 @@ if ( !(isServer) || hasInterface) exitWith{}; -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; +#include "blck_defines.hpp"; if !(isNil "blck_Initialized") exitWith{}; private _blck_loadingStartTime = diag_tickTime; #include "\q\addons\custom_server\init\build.sqf"; diag_log format["[blckeagls] Loading Server Mission System Version %2 Build Date %1",_blck_versionDate,_blck_version]; -call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf"; -waitUntil {(isNil "blck_variablesLoaded") isEqualTo false;}; -waitUntil{blck_variablesLoaded}; -blck_variablesLoaded = nil; - // compile functions call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_functions.sqf"; waitUntil {(isNil "blck_functionsCompiled") isEqualTo false;}; waitUntil{blck_functionsCompiled}; blck_functionsCompiled = nil; -diag_log format["[blckeagls] debug mode settings:blck_debugON = %1 blck_debugLevel = %2",blck_debugON,blck_debugLevel]; +diag_log format["[blckeagls] functions compiled at %1",diag_tickTime]; blck_modType = call blck_fnc_getModType; publicVariable "blck_modType"; @@ -37,16 +32,26 @@ execVM "\q\addons\custom_server\Configs\blck_configs.sqf"; waitUntil {(isNil "blck_configsLoaded") isEqualTo false;}; waitUntil{blck_configsLoaded}; blck_configsLoaded = nil; -diag_log format["[blckeagls] blck_useHC = %1",blck_useHC]; +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"; +waitUntil {(isNil "blck_variablesLoaded") isEqualTo false;}; +waitUntil{blck_variablesLoaded}; +blck_variablesLoaded = nil; +diag_log format["[blckeagls] blck_variables loaded at %1",diag_tickTime]; // 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 "[blckegls] Map Addons disabled"; + diag_log "[blckeagls] Map Addons disabled"; }; blck_spawnMapAddons = nil; @@ -63,13 +68,24 @@ diag_log "[blckeagls] Mission Lists Loaded Successfully"; [] execVM "\q\addons\custom_server\Missions\Static\GMS_StaticMissions_init.sqf"; [] execVM "q\addons\custom_server\Missions\UMS\GMS_UMS_init.sqf"; // loads functions and spawns any static missions. -diag_log "blck_init_server: ->> Static and UMS systems initialized."; +diag_log "[blckeagls] blck_init_server: ->> Static and UMS systems initialized."; -#ifdef useDynamicSimulation -diag_log "[blckegls] dynamic simulation manager enabled"; -#else -diag_log "[blckegls] blckegls simulation manager enabled"; +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"}; +}; + + +#ifdef GRGserver +// start the dynamic loot crate system +[] execVM "\q\addons\custom_server\DLS\DLS_init.sqf"; +waitUntil {(isNil "blck_DLSComplete") isEqualTo false;}; +waitUntil{blck_DLSComplete}; +blck_DLSComplete = nil; #endif + diag_log format["[blckeagls] version %1 Build %2 Loaded in %3 seconds",_blck_versionDate,_blck_version,diag_tickTime - _blck_loadingStartTime]; //,blck_modType]; diag_log format["blckeagls] waiting for players to join ---- >>>>"]; diff --git a/@GMS/addons/custom_server/init/build.sqf b/@GMS/addons/custom_server/init/build.sqf index fde48c8..36b5f24 100644 --- a/@GMS/addons/custom_server/init/build.sqf +++ b/@GMS/addons/custom_server/init/build.sqf @@ -1,6 +1,6 @@ private ["_version","_versionDate"]; -blck_version = "6.84 Build 149"; +blck_version = "6.86 Build 155"; _blck_version = blck_version; -_blck_versionDate = "8-5-18 5:00 PM"; +_blck_versionDate = "10-20-18 1:30 AM"; blck_pvs_version = _blck_version; publicVariable blck_pvs_version; diff --git a/Tools/Dynamic Missions/pullDynamicMission.VR/pullDynamicMission.sqf b/Tools/Dynamic Missions/pullDynamicMission.VR/pullDynamicMission.sqf index 98f15e8..1955d63 100644 --- a/Tools/Dynamic Missions/pullDynamicMission.VR/pullDynamicMission.sqf +++ b/Tools/Dynamic Missions/pullDynamicMission.VR/pullDynamicMission.sqf @@ -199,6 +199,7 @@ systemChat _logging; //diag_log format["_cb = %1%2",endl,_cb]; _configuredStatics = []; +_configuredStaticsPositions = []; _configuredUnits = []; /* This bit will set up the garrison for each building having units and / or statics inside it or on top. @@ -222,7 +223,7 @@ _fn_configureGarrisonForBuildingATL = { if (_b isEqualTo _building) then { _configuredStatics pushBackUnique _x; - + //_configuredStaticsPositions pushBack (getPosATL _x) vectorDiff CENTER; if (_staticsText isEqualTo "") then { _staticsText = format['["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; @@ -285,7 +286,7 @@ _cb = _cb + "_garrisonedBuilding_ATLsystem = ["; }; }; -} forEach ((allMissionObjects "StaticWeapon") + (allMissionObjects unitMarkerObject)); +} forEach ((allMissionObjects "StaticWeapon") + (allMissionObjects "Man") + (allMissionObjects unitMarkerObject)); _cb = _cb + format["%1];%1%1",endl]; /////////////////// @@ -415,20 +416,24 @@ _cb = _cb + format["%1];%1%1",endl]; /////////////////// // Setup info for remaining static/emplaced weapons /////////////////// +_count = 0; _cb = _cb + format["_missionEmplacedWeapons = ["]; { - if !(_x in _configuredStatics) then - { + //if !(_x in _configuredStatics) then + private _isInside = [_x] call _fn_isInside; + if !(_isInside) then + { // ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10] _line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; systemChat _line; - if (_forEachIndex == 0) then + if (_count == 0) then { _cb = _cb + format["%1%2",endl,_line]; } else { _cb = _cb + format[",%1%2",endl,_line]; }; + _count = _count + 1; }; }forEach allMissionObjects "StaticWeapon"; diff --git a/changeLog.sqf b/changeLog.sqf index 6783c7c..60d0127 100644 --- a/changeLog.sqf +++ b/changeLog.sqf @@ -2,34 +2,49 @@ blck Mission system by Ghostrider [GRG] Loosely based on the AI mission system by blckeagls ver 2.0.2 Contributions by Narines: bug fixes, testing, infinite ammo fix. -Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. - - +Ideas or code from that by He-Man, Vampire and KiloSwiss have been used for certain functions. +Many thanks for new Coding and ideas from Grahame. Significant Changes: ===================== -6.86 (Experimental) +6.86 Build 155 +Added support for spawning infantry and statics inside buildings for forming a garrison using either of two methods. + 1. by placing a marker object such as a sphere in the building you define it as having units/statics inside + 2. by placing units or statics in it you determine the garrison to be placed at mission spawn. +Added tools to facilitate grabbing data from missions in the editor (see the new TOOLS folders for more information). +Added additional error checks for missing mission parameters. +Fixed: issues that prevented completion of capture/hostage missions on exile servers +Added: code that forces air, land and sea vehicles to detect nearby players which should help with frozen AI _noChoppers +Changed: code for blckeagls simulation manager to force simulation when groups are awoken. +Added: additional settings for simulation management (see blck_configs.sqf for details) +Changed: Simulation management is now set using the new variable blck_simulationManager which is defined in blck_configs.sqf +Fixed: issues with AI not throwing smoke when healing themselves. -Build 153. -Added: tools to pull data from mission.sqm pre-formated for use in static or dynamic blckeagls missions. -Added: functions that allow you to spawn units, statics inside or on top of buildings. -Fixed: an issue that caused vehicles to be destroyed by buildings upon mission spawn. -Fixed: an issue that prevented completion of capture/hostage missions on Exile servers (Thanks to MGTDB). - -6.84 -Added Option to load weapons, pistols, uniforms, headgear, vests and backpacks from CfgPricing or the Arsenal Pricing and exclude items above a certain price +6.84 Build 145 +Added Option to load weapons, pistols, uniforms, headgear, vests and backpacks from CfgPricing (Epoch) or the Arsenal (Exile) and exclude items above a certain price Add details on configs for enabling this and setting the maximum price + To use this new feature + Set blck_useConfigsGeneratedLoadouts = true; + + To specify the maximum price for items added to AI, change: + blck_maximumItemPriceInAI_Loadouts = 100; + NOTE: this function overides any loadouts you specify in blck_config.sqf etc. -Added functions to despawn static patrols invehicles on on foot when no players are nearby. This tracks the number of infantry alive in a group and respawns only the number alive when the group was despawned. - +Added functions to despawn static patrols of all types when no players are nearby. This tracks the number of infantry alive in a group and respawns only the number alive when the group was despawned. Added: Static units will now be spawned with gear specific to difficulty level (blue, red, green, orange) as specified in blck_config.sqf etc. +Added: AI now have a chance of spawning with binocs or range finders. +Added: a lit road cone spawns at the center of the mission to help find it and aid in triggering mission completion. Changed: Hostage missions redesigned to reduce chances of AI being glitched into containers and of mission objects flying about when spawned in. +Changed: Units are spawned with greater dispersion. +Changed: method for spawning random landscapes has been changed. Note the added randomization in missions\blue\default.sqf + Fixed: Collisions between objects at missions caused issues. Fixed: Attempted a fix to reduce the chance that AI will spawn inside or under objects like rocks or containers. Fixed: Captive missions now complete properly. Fixed: Hostage missions now complete properly. +Fixed: Paratroops spawned at UMS missions now spawn with scuba gear. Version 1.82 Build 134 Added: configs for blue, red, green and orange pistol, vest, backpack and uniforms (with thanks to Grahame for suggesting this change and doing most of the coding)