From 35263b75e6242b111b93791907286fab12a63d59 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sun, 13 Aug 2017 18:45:16 -0400 Subject: [PATCH] Added options for certain parameters to be defined as a range. --- .../Compiles/Functions/GMS_fnc_allPlayers.sqf | 5 +- .../Functions/GMS_fnc_getNumberFromRange.sqf | 30 ++ .../GMS_fnc_loadLootItemsFromArray.sqf | 5 +- .../Compiles/Missions/GMS_fnc_fillBoxes.sqf | 35 +- .../GMS_fnc_missionSpawner - Copy (2).sqf | 446 ++++++++++++++++++ .../Missions/GMS_fnc_missionSpawner.sqf | 21 +- .../Missions/GMS_fnc_spawnMissionAI.sqf | 4 +- .../Compiles/Units/GMS_fnc_setSkill.sqf | 7 +- .../custom_server/Compiles/blck_functions.sqf | 1 + .../custom_server/Compiles/blck_variables.sqf | 4 +- .../custom_server/Configs/blck_configs.sqf | 20 +- .../Configs/blck_configs_epoch.sqf | 4 +- .../Configs/blck_configs_exile.sqf | 10 +- .../Configs/blck_configs_mil.sqf | 12 +- .../Configs/blck_custom_config.sqf | 18 +- .../custom_server/Configs/blck_defines.hpp | 3 +- .../custom_server/SLS/SLS_defines_exile.sqf | 61 ++- .../custom_server/SLS/SLS_functions.sqf | 16 +- .../addons/custom_server/init/build.sqf | 4 +- .../Compiles/Functions/GMS_fnc_allPlayers.sqf | 5 +- .../Functions/GMS_fnc_getNumberFromRange.sqf | 30 ++ .../GMS_fnc_loadLootItemsFromArray.sqf | 5 +- .../Compiles/Missions/GMS_fnc_fillBoxes.sqf | 35 +- .../GMS_fnc_missionSpawner - Copy (2).sqf | 446 ++++++++++++++++++ .../Missions/GMS_fnc_missionSpawner.sqf | 21 +- .../Missions/GMS_fnc_spawnMissionAI.sqf | 4 +- .../Compiles/Units/GMS_fnc_setSkill.sqf | 7 +- .../custom_server/Compiles/blck_functions.sqf | 1 + .../custom_server/Compiles/blck_variables.sqf | 4 +- .../custom_server/Configs/blck_configs.sqf | 20 +- .../Configs/blck_configs_epoch.sqf | 4 +- .../Configs/blck_configs_exile.sqf | 10 +- .../Configs/blck_configs_mil.sqf | 12 +- .../Configs/blck_custom_config.sqf | 18 +- .../custom_server/Configs/blck_defines.hpp | 3 +- .../custom_server/SLS/SLS_defines_exile.sqf | 61 ++- .../custom_server/SLS/SLS_functions.sqf | 16 +- .../addons/custom_server/init/build.sqf | 4 +- changeLog.sqf | 26 +- 39 files changed, 1242 insertions(+), 196 deletions(-) create mode 100644 @ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf create mode 100644 @ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf create mode 100644 @epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf create mode 100644 @epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf diff --git a/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf b/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf index 88809e1..0150779 100644 --- a/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf +++ b/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf @@ -4,7 +4,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last Modified 2/24/17 + Last Modified 8/12/17 -------------------------- License -------------------------- @@ -17,8 +17,11 @@ private ["_result"]; +/* _result = []; { if (isPlayer _x) then { _result pushback _x }; } forEach playableUnits; +*/ +_result = allPlayers; _result diff --git a/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf b/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf new file mode 100644 index 0000000..3a3ba3c --- /dev/null +++ b/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf @@ -0,0 +1,30 @@ + +// Last modified 8/13/17 by Ghostrider-DBD- +/* + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_data"]; +_value = objNull; +if (typeName _data isEqualTo "ARRAY") then +{ + _min = _data select 0; + _max = _data select 1; + if (_max > _min) then + { + _value = _min + round(random(_max - _min)); + } else { + _value = _min; + }; +}; +if (typeName _data isEqualTo "SCALAR") then +{ + _value = _data; +}; +_value \ No newline at end of file diff --git a/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf b/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf index 1e8a2d2..3f88703 100644 --- a/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf +++ b/@ExileServer/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf @@ -16,7 +16,7 @@ case 2: [["item1",...,"itemN"],6, 9]; As above except that an item will be selected a minimum of 6 and maximum of 9 times. by Ghostrider-DbD- - 6/7/17 + 8/13/17 -------------------------- License @@ -41,6 +41,8 @@ diag_log format["blck_fnc_loadLootFromItemsArray:: -- >> now loading for %1",_x]; #endif _q = _x select 1; // this can be a number or array. + _tries = [_q] call blck_fnc_getNumberFromRange; + /* if ( (typeName _q) isEqualTo "ARRAY") then // Assume the array contains a min/max number to add { if ((count _q) isEqualTo 2) then {_tries = (_q select 0) + round(random(((_q select 1) - (_q select 0))));} else {_tries = 0;}; @@ -49,6 +51,7 @@ { _tries = _q; }; + */ for "_i" from 1 to _tries do { _item = selectRandom (_x select 0); diff --git a/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf b/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf index d9df832..76a2a2d 100644 --- a/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf +++ b/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last Modified 11-11-16 + Last Modified 8-13-17 Fill a crate with items -------------------------- @@ -15,16 +15,16 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - private["_a1","_item","_diff"]; + private["_a1","_item","_diff","_tries"]; params["_crate","_boxLoot","_itemCnts"]; _itemCnts params["_wepCnt","_magCnt","_opticsCnt","_materialsCnt","_itemCnt","_bkcPckCnt"]; - - if (_wepCnt > 0) then + _tries = [_wepCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { _a1 = _boxLoot select 0; // choose the subarray of weapons and corresponding magazines // Add some randomly selected weapons and corresponding magazines - for "_i" from 1 to _wepCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; if (typeName _item isEqualTo "ARRAY") then // Check whether weapon name is part of an array that might also specify an ammo to use { @@ -43,50 +43,55 @@ }; }; }; - if (_magCnt > 0) then + _tries = [_magCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { // Add Magazines, grenades, and 40mm GL shells _a1 = _boxLoot select 1; - for "_i" from 1 to _magCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); // Take difference between max and min number of items to load and randomize based on this value _crate addMagazineCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; }; }; - if (_opticsCnt > 0) then + _tries = [_opticsCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { // Add Optics _a1 = _boxLoot select 2; - for "_i" from 1 to _opticsCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; }; }; - if (_materialsCnt > 0) then + _tries = [_materialsCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { // Add materials (cindar, mortar, electrical parts etc) _a1 = _boxLoot select 3; - for "_i" from 1 to _materialsCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; }; }; - if (_itemCnt > 0) then + _tries = [_itemCnt] call blck_fnc_getNumberFromRange; + 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 _itemCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; }; }; - if (_bkcPckCnt > 0) then + _tries = [_bkcPckCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { _a1 = _boxLoot select 5; - for "_i" from 1 to _bkcPckCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); _crate addbackpackcargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; diff --git a/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf b/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf new file mode 100644 index 0000000..20aca76 --- /dev/null +++ b/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf @@ -0,0 +1,446 @@ +/* + Generic Mission Spawner + for DBD Clan + By Ghostrider-DBD- + Copyright 2016 + Last modified 4/11/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 ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"]; +params["_coords","_mission",["_allowReinforcements",true]]; +diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements]; + +//////// +// set all variables needed for the missions +// data is pulled either from the mission description or from the _mission variable passsed as a parameter +// Deal with situations where some of these variables might not be defined as well. +//////// + +// _mission params[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange]; +_markerClass = _mission select 2; +_aiDifficultyLevel = _mission select 3; + +if (blck_debugLevel > 0) then {diag_log format["_fnc_mainThread:: -->> _markerClass = %1",_markerClass];}; + +[_mission,"active",_coords] call blck_fnc_updateMissionQue; +blck_ActiveMissionCoords pushback _coords; +diag_log format["[blckeagls] missionSpawner (17):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + +private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"]; + +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +//if (isNil "_timeOut") then {_timeOut = -1;}; +if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + +private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"]; +if (isNil "_useMines") then {_useMines = blck_useMines;}; + +_objects = []; +_mines = []; +_crates = []; +_aiGroup = []; +_missionAIVehicles = []; +_blck_AllMissionAI = []; +_AI_Vehicles = []; +_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType]; +_delayTime = 1; +_groupPatrolRadius = 50; + +if (blck_labelMapMarkers select 0) then +{ + //diag_log "labeling map markers *****"; + _blck_localMissionMarker set [2, _markerMissionName]; +}; +if !(blck_preciseMapMarkers) then +{ + //diag_log "Map marker will be OFFSET from the mission position"; + _blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition]; +}; +_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name? +if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (91) message players and spawn a mission marker";}; +[["start",_startMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers; +[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf"; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (94) waiting for player to trigger the mission";}; +#endif +//////// +// All parameters are defined, lets wait until a player is nearby or the mission has timed out +//////// + +private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"]; +_missionStartTime = diag_tickTime; +_playerInRange = false; +_missionTimedOut = false; +_wait = true; +if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (105) starting mission trigger loop"}; + +while {_wait} do +{ + #ifdef blck_debugMode + //diag_log "missionSpawner:: top of mission trigger loop"; + if (blck_debugLevel > 2) exitWith {_playerInRange = true;}; + #endif + + if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; + if ([_missionStartTime] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; + uiSleep 5; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["missionSpawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords]; + diag_log format["missionSpawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers]; + diag_log format["missionSpawner:: Trigger Loop - timeout = %1", [_missionStartTime] call blck_fnc_timedOut]; + }; + #endif +}; + +if (_missionTimedOut) exitWith +{ +/* + +*/ + // Deal with the case in which the mission timed out. + //["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers; + blck_recentMissionCoords pushback [_coords,diag_tickTime]; + blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords]; + [_mission,"inactive",[0,0,0]] call blck_fnc_updateMissionQue; + blck_missionsRunning = blck_missionsRunning - 1; + [_blck_localMissionMarker select 0] call compile preprocessfilelinenumbers "debug\deleteMarker.sqf"; + //_blck_localMissionMarker set [1,[0,0,0]]; + //_blck_localMissionMarker set [2,""]; + [_objects, 0.1] spawn blck_fnc_cleanupObjects; + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] missionSpawner:: (105) Mission Timed Out: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif +}; + +//////// +// Spawn the mission objects, loot chest, and AI +//////// +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (112) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +if (count _missionLootBoxes > 0) then +{ + _crates = [_coords,_missionLootBoxes,_loadCratesTiming] call blck_fnc_spawnMissionCrates; +} +else +{ + _crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming] call blck_fnc_spawnMissionCrates; + +}; + +if (blck_cleanUpLootChests) then +{ + _objects append _crates; +}; + +//uisleep 2; +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (136) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +private ["_temp"]; +if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate +{ + _temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates; + if (typeName _temp isEqualTo "ARRAY") then + { + _objects append _temp; + }; +}; + +uiSleep _delayTime; +if (_useMines) then +{ + _mines = [_coords] call blck_fnc_spawnMines; + //uiSleep _delayTime;; +}; +uiSleep _delayTime; +_temp = []; +if (_missionLandscapeMode isEqualTo "random") then +{ + _temp = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape; +} else { + _temp = [_coords, floor(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects; + //uiSleep 1; +}; +if (typeName _temp isEqualTo "ARRAY") then +{ + _objects append _temp; +}; +//diag_log format["_fnc_missionSpawner:: (181)->> _objects = %1",_objects]; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (170) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +uiSleep _delayTime;; + +_temp = [_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles; +//uisleep 1; +_crates append _temp; + +uiSleep _delayTime; + +_abort = false; +_temp = [[],[],false]; +_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI; +//[_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then { + diag_log format["missionSpawner :: (185) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1; +}; + +_abort = _temp select 1; +if (blck_debugLevel > 2) then { + diag_log format["missionSpawner :: (190) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; +}; +#endif + +if (_abort) exitWith +{ + if (blck_debugLevel > 1) then { + diag_log "missionSpawner:: (194) grpNull returned, mission termination criteria met, calling blck_fnc_endMission" + }; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission; +}; +if !(_abort) then +{ + _blck_AllMissionAI append (_temp select 0); +}; + +uiSleep _delayTime; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (202) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +_temp = [[],[],false]; +_abort = false; +private["_patrolVehicles"]; +if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then +{ + _temp = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; + //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then { + diag_log format["missionSpawner :: (216) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] missionSpawner:: (272) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + + }; +}; + +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 0) then { + diag_log "missionSpawner:: (222) grpNull returned, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission; +}; + +uiSleep _delayTime; +_temp = [[],[],false]; +_abort = false; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (234) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];}; +#endif + +if (blck_useStatic && (_noEmplacedWeapons > 0)) then +{ + // params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; + _temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["missionSpawner:: (232) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["missionSpawner:: (241) _abort = %1",_abort]; + + }; + #endif + + if !(_abort) then + { + _objects append (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] missionSpawner:: (253) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + }; +}; +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log "missionSpawner:: (261) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true,_patrolVehicles] call blck_fnc_endMission; +}; + +if (_allowReinforcements) then +{ + _weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout; + _temp = []; + + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["[blckeagls] missionSpawner:: (268) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + private _noChoppers = 3; + switch (toLower _aiDifficultyLevel) do + { + case "blue":{_noChoppers = blck_noPatrolHelisBlue}; + case "red":{_noChoppers = blck_noPatrolHelisRed}; + case "green":{_noChoppers = blck_noPatrolHelisGreen}; + case "orange":{_noChoppers = blck_noPatrolHelisOrange}; + }; + + for "_i" from 1 to (_noChoppers) do + { + //params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"]; + + _temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear] call blck_fnc_spawnMissionReinforcements; + + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["missionSpawner:: blck_fnc_spawnMissionReinforcements call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers]; + diag_log format["missionSpawner:: _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + _objects pushback (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + }; + if (_abort) then + { + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log "missionSpawner:: (276) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true,_patrolVehicles] call blck_fnc_endMission; + }; + }; +}; +// Trigger for mission end +//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition]; +private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"]; +_missionComplete = -1; +_startTime = diag_tickTime; + +switch (_endCondition) do +{ + case "playerNear": {_endIfPlayerNear = true;_endIfAIKilled = false;}; + case "allUnitsKilled": {_endIfPlayerNear = false;_endIfAIKilled = true;}; + case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;}; +}; +//diag_log format["missionSpawner :: (269) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled]; +private["_locations"]; +_locations = [_coords]; +{ + _locations pushback (getPos _x); +} forEach _crates; + +//diag_log format["missionSpawner:: _coords = %1 | _crates = %2 | _locations = %3",_coords,_crates,_locations]; +//diag_log format["missionSpawner:: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled]; +while {_missionComplete isEqualTo -1} do +{ + //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300}; + if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {}; + if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1 /*[_blck_AllMissionAI] call blck_fnc_missionAIareDead*/ ) exitWith {}; + //diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI]; + uiSleep 4; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (414) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + diag_log format["missionSpawner :: (415) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled]; +}; +#endif +//diag_log format["[blckeagls] missionSpawner:: (418) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + +private["_result"]; +_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,false,_patrolVehicles] call blck_fnc_endMission; + +//diag_log format["[blckeagls] missionSpawner:: (420)end of mission: blck_fnc_endMission returned value of %1","pending"]; + diff --git a/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index 20aca76..b05bc46 100644 --- a/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last modified 4/11/17 + Last modified 8/13/17 -------------------------- License @@ -247,8 +247,9 @@ if (blck_debugLevel > 0) then _temp = [[],[],false]; _abort = false; -private["_patrolVehicles"]; -if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then +private["_patrolVehicles","_vehToSpawn"]; +_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange; +if (blck_useVehiclePatrols && (_vehToSpawn > 0)) then { _temp = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; @@ -296,7 +297,9 @@ _abort = false; if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (234) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];}; #endif -if (blck_useStatic && (_noEmplacedWeapons > 0)) then +private["_noEmplacedToSpawn"]; +_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange; +if (blck_useStatic && (_noEmplacedToSpawn > 0)) then { // params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; _temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; @@ -360,10 +363,10 @@ if (_allowReinforcements) then private _noChoppers = 3; switch (toLower _aiDifficultyLevel) do { - case "blue":{_noChoppers = blck_noPatrolHelisBlue}; - case "red":{_noChoppers = blck_noPatrolHelisRed}; - case "green":{_noChoppers = blck_noPatrolHelisGreen}; - case "orange":{_noChoppers = blck_noPatrolHelisOrange}; + case "blue":{_noChoppers = [blck_noPatrolHelisBlue] call blck_fnc_getNumberFromRange}; + case "red":{_noChoppers = [blck_noPatrolHelisRed] call blck_fnc_getNumberFromRange}; + case "green":{_noChoppers = [blck_noPatrolHelisGreen] call blck_fnc_getNumberFromRange}; + case "orange":{_noChoppers = [blck_noPatrolHelisOrange] call blck_fnc_getNumberFromRange}; }; for "_i" from 1 to (_noChoppers) do @@ -423,7 +426,7 @@ _locations = [_coords]; //diag_log format["missionSpawner:: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled]; while {_missionComplete isEqualTo -1} do { - //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300}; + //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180}; if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {}; if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1 /*[_blck_AllMissionAI] call blck_fnc_missionAIareDead*/ ) exitWith {}; //diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI]; diff --git a/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf b/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf index b54dace..a96b599 100644 --- a/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf +++ b/@ExileServer/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf @@ -1,7 +1,7 @@ /* blck_fnc_spawnMissionAI by Ghostrider-DbD- - 3/17/17 + 8/13/17 [_coords, // center of the area within which to spawn AI _minNoAI, // minimum number of AI to spawn _maxNoAI, // Max number of AI to spawn @@ -22,7 +22,7 @@ params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAI","_abort"]; - _unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI))); + _unitsToSpawn = [[_minNoAI,_maxNoAI]] call blck_fnc_getNumberFromRange; //round(_minNoAI + round(random(_maxNoAI - _minNoAI))); _unitsPerGroup = floor(_unitsToSpawn/_noAIGroups); _ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups); _blck_AllMissionAI = []; diff --git a/@ExileServer/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf b/@ExileServer/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf index 85b8fa6..2831502 100644 --- a/@ExileServer/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf +++ b/@ExileServer/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf @@ -1,7 +1,7 @@ /* Set skills for an AI Unit by Ghostrider - Last updated 8/14/16 + Last updated 8/14/17 -------------------------- License -------------------------- @@ -14,7 +14,8 @@ // Self explanatory // [_group, _skill] call blck_setSkill; params ["_unit","_skillsArrray"]; - +private["_skillLevel"]; { - _unit setSkill [(_x select 0),(_x select 1)]; + _skillLevel = [_x select 1] call blck_fnc_getNumberFromRange; + _unit setSkill [(_x select 0), _skillLevel]; } forEach _skillsArrray; diff --git a/@ExileServer/addons/custom_server/Compiles/blck_functions.sqf b/@ExileServer/addons/custom_server/Compiles/blck_functions.sqf index 2169262..7a5c6c8 100644 --- a/@ExileServer/addons/custom_server/Compiles/blck_functions.sqf +++ b/@ExileServer/addons/custom_server/Compiles/blck_functions.sqf @@ -32,6 +32,7 @@ blck_fnc_mainThread = compileFinal preprocessFileLineNumbers "\q\addons\custom_ blck_fnc_allPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_allPlayers.sqf"; blck_fnc_addItemToCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_addItemToCrate.sqf"; blck_fnc_loadLootItemsFromArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_loadLootItemsFromArray.sqf"; +blck_fnc_getNumberFromRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getNumberFromRange.sqf"; #ifdef DBDserver blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf"; diff --git a/@ExileServer/addons/custom_server/Compiles/blck_variables.sqf b/@ExileServer/addons/custom_server/Compiles/blck_variables.sqf index 8dfbf12..4cbd6cc 100644 --- a/@ExileServer/addons/custom_server/Compiles/blck_variables.sqf +++ b/@ExileServer/addons/custom_server/Compiles/blck_variables.sqf @@ -12,8 +12,8 @@ */ #include"\q\addons\custom_server\Configs\blck_defines.hpp"; -blck_debugON = false; -blck_debugLevel = 0; // Sets level of detail for debugging info - WIP. +blck_debugON = true; +blck_debugLevel = 3; // Sets level of detail for debugging info - WIP. blck_minFPS = 10; //////////////////////////////////////////////// diff --git a/@ExileServer/addons/custom_server/Configs/blck_configs.sqf b/@ExileServer/addons/custom_server/Configs/blck_configs.sqf index f4189bb..286ddd2 100644 --- a/@ExileServer/addons/custom_server/Configs/blck_configs.sqf +++ b/@ExileServer/addons/custom_server/Configs/blck_configs.sqf @@ -165,11 +165,11 @@ blck_chanceHeliPatrolGreen = 0.4; blck_patrolHelisGreen = _blck_littleBirds; - blck_noPatrolHelisGreen = 1; + blck_noPatrolHelisGreen = [1,1]; blck_chanceHeliPatrolOrange = 0.5; blck_patrolHelisOrange = _blck_armed_hellcats+_blck_armed_orcas; - blck_noPatrolHelisOrange = 1; + blck_noPatrolHelisOrange = [1,1]; //////////////////// // Enable / Disable Missions @@ -233,7 +233,7 @@ // Mission Vehicle Settings //////////////////// //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high - blck_SpawnVeh_Orange = 3; // Number of static weapons at Orange Missions + blck_SpawnVeh_Orange = [2,4]; // Number of static weapons at Orange Missions blck_SpawnVeh_Green = 2; // Number of static weapons at Green Missions blck_SpawnVeh_Blue = -1; // Number of static weapons at Blue Missions blck_SpawnVeh_Red = 1; // Number of static weapons at Red Missions @@ -251,7 +251,7 @@ //////////////////// // Defines how many static weapons to spawn. Set this to -1 to disable spawning - blck_SpawnEmplaced_Orange = 3; // Number of static weapons at Orange Missions + blck_SpawnEmplaced_Orange = [2,4]; // Number of static weapons at Orange Missions blck_SpawnEmplaced_Green = 2; // Number of static weapons at Green Missions blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions blck_SpawnEmplaced_Red = 1; // Number of static weapons at Red Missions @@ -304,7 +304,7 @@ blck_MaxAI_Orange = 25; blck_AIGrps_Orange = 5; blck_SkillsOrange = [ - ["aimingAccuracy",0.4],["aimingShake",0.7],["aimingSpeed",0.7],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] + ["aimingAccuracy",[0.35,0.45]],["aimingShake",[0.65,0.75]],["aimingSpeed",[0.65,0.75]],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] ]; // Green Missions @@ -338,7 +338,7 @@ blck_maxMoneyBlue = 10; #ifdef DBDserver - blck_AIAlertDistance = [150,225,250,300]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. + blck_AIAlertDistance = [250,450,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. //blck_AIAlertDistance = [150,225,400,500]; // How precisely player locations will be revealed to AI after an AI kill // values are ordered as follows [blue, red, green, orange]; @@ -357,7 +357,7 @@ blck_MaxAI_Orange = 25; blck_AIGrps_Orange = 5; blck_SkillsOrange = [ - ["aimingAccuracy",0.5],["aimingShake",0.5],["aimingSpeed",0.7],["endurance",1.00],["spotDistance",1.0],["spotTime",0.7],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] + ["aimingAccuracy",[0.45,0.56]],["aimingShake",[0.45,0.55]],["aimingSpeed",[0.65,0.75]],["endurance",1.00],["spotDistance",1.0],["spotTime",0.7],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] ]; // Green Missions @@ -365,7 +365,7 @@ blck_MaxAI_Green = 21; blck_AIGrps_Green = 4; blck_SkillsGreen = [ - ["aimingAccuracy",0.4],["aimingShake",0.45],["aimingSpeed",0.65],["endurance",0.9],["spotDistance",0.9],["spotTime",0.65],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75] + ["aimingAccuracy",[0.35,0.45]],["aimingShake",[0.4,0.5]],["aimingSpeed",[0.55,0.7]],["endurance",0.9],["spotDistance",0.9],["spotTime",0.65],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75] ]; // Red Missions @@ -373,7 +373,7 @@ blck_MaxAI_Red = 15; blck_AIGrps_Red = 3; blck_SkillsRed = [ - ["aimingAccuracy",0.3],["aimingShake",0.4],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.6],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70] + ["aimingAccuracy",[0.25,0.35]],["aimingShake",[0.35,0.4]],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.6],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70] ]; // Blue Missions @@ -381,7 +381,7 @@ blck_MaxAI_Blue = 12; blck_AIGrps_Blue = 2; blck_SkillsBlue = [ - ["aimingAccuracy",0.12],["aimingShake",0.3],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] + ["aimingAccuracy",[0.08,16]],["aimingShake",[0.25,0.35]],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] ]; // Add some money to AI; only works with Exile for now. diff --git a/@ExileServer/addons/custom_server/Configs/blck_configs_epoch.sqf b/@ExileServer/addons/custom_server/Configs/blck_configs_epoch.sqf index 8b06060..dc4e158 100644 --- a/@ExileServer/addons/custom_server/Configs/blck_configs_epoch.sqf +++ b/@ExileServer/addons/custom_server/Configs/blck_configs_epoch.sqf @@ -60,8 +60,8 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "optic_LRPS", "optic_Nightstalker", "optic_NVS", - "optic_SOS" - //"optic_tws", + "optic_SOS", + "optic_tws" //"optic_tws_mg", ]; blck_Optics_Apex = [ diff --git a/@ExileServer/addons/custom_server/Configs/blck_configs_exile.sqf b/@ExileServer/addons/custom_server/Configs/blck_configs_exile.sqf index 5fc93fb..c1e1bc6 100644 --- a/@ExileServer/addons/custom_server/Configs/blck_configs_exile.sqf +++ b/@ExileServer/addons/custom_server/Configs/blck_configs_exile.sqf @@ -66,8 +66,8 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "optic_LRPS", "optic_Nightstalker", "optic_NVS", - "optic_SOS" - //"optic_tws", + "optic_SOS", + "optic_tws" //"optic_tws_mg", ]; @@ -508,9 +508,9 @@ for examples of how you can do this see \Major\Compositions.sqf ***************************************************************************************/ // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. - blck_lootCountsOrange = [8,32,8,30,16,1]; // Orange - blck_lootCountsGreen = [7,24,6,16,18,1]; // Green - blck_lootCountsRed = [5,16,4,10,6,1]; // Red + blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + blck_lootCountsGreen = [[4,8],[20,30],[5,9],[15,18],18,1]; // Green + blck_lootCountsRed = [[4,6],[12,18],4,[6,12],6,1]; // Red blck_lootCountsBlue = [4,12,3,6,6,1]; // Blue blck_BoxLoot_Orange = diff --git a/@ExileServer/addons/custom_server/Configs/blck_configs_mil.sqf b/@ExileServer/addons/custom_server/Configs/blck_configs_mil.sqf index 323a746..34bdebc 100644 --- a/@ExileServer/addons/custom_server/Configs/blck_configs_mil.sqf +++ b/@ExileServer/addons/custom_server/Configs/blck_configs_mil.sqf @@ -238,8 +238,8 @@ // Mission Vehicle Settings //////////////////// //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high - blck_SpawnVeh_Orange = 4; // Number of static weapons at Orange Missions - blck_SpawnVeh_Green = 3; // Number of static weapons at Green Missions + blck_SpawnVeh_Orange = [3,5]; // Number of static weapons at Orange Missions + blck_SpawnVeh_Green = [3,4]; // Number of static weapons at Green Missions blck_SpawnVeh_Blue = -1; // Number of static weapons at Blue Missions blck_SpawnVeh_Red = 2; // Number of static weapons at Red Missions @@ -256,8 +256,8 @@ //////////////////// // Defines how many static weapons to spawn. Set this to -1 to disable spawning - blck_SpawnEmplaced_Orange = 5; // Number of static weapons at Orange Missions - blck_SpawnEmplaced_Green = 4; // Number of static weapons at Green Missions + blck_SpawnEmplaced_Orange = [3,5]; // Number of static weapons at Orange Missions + blck_SpawnEmplaced_Green = [3,4]; // Number of static weapons at Green Missions blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions blck_SpawnEmplaced_Red = 2; // Number of static weapons at Red Missions @@ -290,7 +290,7 @@ // How precisely player locations will be revealed to AI after an AI kill // values are ordered as follows [blue, red, green, orange]; - blck_AIAlertDistance = [250,325,450,500]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. + blck_AIAlertDistance = [250,425,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. //blck_AIAlertDistance = [150,225,400,500]; // How precisely player locations will be revealed to AI after an AI kill // values are ordered as follows [blue, red, green, orange]; @@ -343,7 +343,7 @@ blck_maxMoneyBlue = 20; #ifdef DBDserver - blck_AIAlertDistance = [250,325,450,500]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. + blck_AIAlertDistance = [250,425,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. //blck_AIAlertDistance = [150,225,400,500]; // How precisely player locations will be revealed to AI after an AI kill // values are ordered as follows [blue, red, green, orange]; diff --git a/@ExileServer/addons/custom_server/Configs/blck_custom_config.sqf b/@ExileServer/addons/custom_server/Configs/blck_custom_config.sqf index fc670f5..a3c4495 100644 --- a/@ExileServer/addons/custom_server/Configs/blck_custom_config.sqf +++ b/@ExileServer/addons/custom_server/Configs/blck_custom_config.sqf @@ -111,18 +111,18 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in blck_mainThreadUpdateInterval = 10; blck_enableOrangeMissions = 1; - blck_enableGreenMissions = -1; - blck_enableRedMissions = -1; - blck_enableBlueMissions = -1; - blck_enableHunterMissions = -1; - blck_enableScoutsMissions = -1; - blck_maxCrashSites = -3; + blck_enableGreenMissions = 1; + blck_enableRedMissions = 1; + blck_enableBlueMissions = 1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = 1; + blck_maxCrashSites = 3; //blck_enabeUnderwaterMissions = 1; - blck_cleanupCompositionTimer = 120; // Time after mission completion at which items in the composition are deleted. - blck_AliveAICleanUpTimer = 120; // Time after mission completion at which any remaining live AI are deleted. - blck_bodyCleanUpTimer = 120; + blck_cleanupCompositionTimer = 20; // Time after mission completion at which items in the composition are deleted. + blck_AliveAICleanUpTimer = 20; // Time after mission completion at which any remaining live AI are deleted. + blck_bodyCleanUpTimer = 20; //blck_chanceHeliPatrolBlue = 1; blck_SpawnEmplaced_Orange = 4; // Number of static weapons at Orange Missions diff --git a/@ExileServer/addons/custom_server/Configs/blck_defines.hpp b/@ExileServer/addons/custom_server/Configs/blck_defines.hpp index 1e51318..49da0dc 100644 --- a/@ExileServer/addons/custom_server/Configs/blck_defines.hpp +++ b/@ExileServer/addons/custom_server/Configs/blck_defines.hpp @@ -12,8 +12,7 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -#define modUsed -#define DBDserver +//#define DBDserver #define wpModeMove #define useAPEX #define useDynamicSimulation diff --git a/@ExileServer/addons/custom_server/SLS/SLS_defines_exile.sqf b/@ExileServer/addons/custom_server/SLS/SLS_defines_exile.sqf index 65d365d..15b30fe 100644 --- a/@ExileServer/addons/custom_server/SLS/SLS_defines_exile.sqf +++ b/@ExileServer/addons/custom_server/SLS/SLS_defines_exile.sqf @@ -242,7 +242,7 @@ _loot_Misc = ["Exile_Item_InstaDoc","Exile_Item_Matches","Exile_Item_CookingPot" //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ _loot_build = ["Exile_Item_Rope","Exile_Item_DuctTape","Exile_Item_ExtensionCord","Exile_Item_FuelCanisterEmpty", "Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_CamoTentKit","Exile_Item_WorkBenchKit", - "Exile_Item_MetalBoard","Exile_Item_MetalPole"]; + "Exile_Item_MetalBoard","Exile_Item_MetalPole","Exile_Item_Sand","Exile_Item_Cement","Exile_Item_MetalWire","Exile_Item_MetalScrews" ]; _loot_tools = ["Exile_Item_Handsaw","Exile_Item_Pliers","Exile_Item_Grinder","Exile_Item_Foolbox"]; // Explosives @@ -251,40 +251,50 @@ _loot_explosives = [["HandGrenade",3],["MiniGrenade",3],["SatchelCharge_Remote_M _loot_launchers = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_Titan_short_F"]; // Loot Configuration 1: Heavy Weapons and explosives -_box1_Pistols = 3; -_box1_Rifles = 5; -_box1_LMG = 4; -_box1_Snipers = 3; -_box1_Mags = [2,6]; -_box1_Optics = 6; -_box1_Silencers = 5; -_box1_Explosives = 6; -_box1_FoodDrink = 6; -_box1_Misc = 3; +_box1_Pistols = [2,4]; +_box1_Rifles = [5,8]; +_box1_LMG = [1,4]; +_box1_Snipers = 0; +_box1_Mags = [4,8]; +_box1_Optics = [3,6]; +_box1_Silencers = [3,6]; +_box1_Explosives = [3,6]; +_box1_FoodDrink = 3; +_box1_Misc = 0; _box1_Backpacks = 3; -_box1_BuildingSupplies = 3; +_box1_BuildingSupplies = 0; _box1_Tools = 0; + +#ifdef blck_milServer +_box1_launchers = 4; +#else _box1_launchers = 0; +#endif // Note that the bonus items are listed in a nexted array within the _box1_cbonus array. It was more difficult to ocde otherwise and would have needed indexing to make it work. _box1_bonus_items = [["ItemGPS",1],["Rangefinder",1],["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]]; _box1_bonus = 1; // Loot Configuration 2: Sniper Weapons and sniper scopes -_box2_Pistols = 3; -_box2_Rifles = 5; -_box2_LMG = 4; -_box2_Snipers = 3; +_box2_Pistols = 2; +_box2_Rifles = 2; +_box2_LMG = [3,6]; +_box2_Snipers = [4,8]; _box2_Mags = [2,6]; // [number of times to select a mag, min # of that mag to add, max # of that mag to add] _box2_Optics = 6; _box2_Silencers = 5; _box2_Explosives = 6; -_box2_FoodDrink = 6; -_box2_Misc = 3; +_box2_FoodDrink = 2; +_box2_Misc = 1; _box2_Backpacks = 3; -_box2_BuildingSupplies = 3; +_box2_BuildingSupplies = 0; _box2_Tools = 0; _box2_Misc = 0; +#ifdef blck_milServer +_box2_launchers = 4; +#else _box2_launchers = 0; +#endif + _box2_bonus_items = [["ItemGPS",2],["Rangefinder",2],["SatchelCharge_Remote_Mag",1],["DemoCharge_Remote_Mag",10]]; _box2_bonus = 1; @@ -293,17 +303,22 @@ _box3_Pistols = 2; _box3_Rifles = 2; _box3_LMG = 1; _box3_Snipers = 1; -_box3_Mags = [4,2,6]; +_box3_Mags = [4,6]; _box3_Optics = 1; _box3_Silencers = 1; _box3_Explosives = 2; -_box3_FoodDrink = 3; -_box3_Misc = 3; +_box3_FoodDrink = 12; +_box3_Misc = 6; _box3_Backpacks = 1; -_box3_BuildingSupplies = [8,15]; // [Number of items, min for item, max for item] +_box3_BuildingSupplies = [12,20]; // [Number of items, min for item, max for item] _box3_Tools = 4; _box3_Misc = 6; +#ifdef blck_milServer +_box3_launchers = 4; +#else _box3_launchers = 0; +#endif + _box3_bonus_items = [["Exile_Item_Matches",2],[ "Exile_Item_CookingPot",2],["Exile_Item_CanOpener",3],["Exile_Item_Handsaw",2],["Exile_Item_Pliers",2],["Exile_Item_Grinder",1],["Exile_Item_Foolbox",1]]; _box3_bonus = 1; diff --git a/@ExileServer/addons/custom_server/SLS/SLS_functions.sqf b/@ExileServer/addons/custom_server/SLS/SLS_functions.sqf index a2a0b98..439168f 100644 --- a/@ExileServer/addons/custom_server/SLS/SLS_functions.sqf +++ b/@ExileServer/addons/custom_server/SLS/SLS_functions.sqf @@ -2,7 +2,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last Modified 3-14-17 + Last Modified 8-23-17 -------------------------- License @@ -59,16 +59,20 @@ _fn_spawnCrate = { _pos = _cratePos; //diag_log format["crate spawner using exact position %1",_pos]; }; - if (blck_debugON) then + #ifdef blck_debugMode + if (blck_debugLevel > 0) then { diag_log format["[blckeagls[ SLS :: _fn_spawnCrate %1 _randomLocation %2 crate position %3",_cratePos,_randomLocation,_pos]; }; + #endif private["_crateTypes","_selectedCrateType"]; //_crateTypes = ["I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F","I_supplyCrate_F","Box_East_AmmoVeh_F","Box_NATO_AmmoVeh_F"]; _selectedCrateType = selectRandom blck_crateTypes; _crate = [[0,0,0],_selectedCrateType] call blck_fnc_spawnCrate; _crate setPosATL _pos; _crate setDir round(random(360)); + //uiSleep 1; + _crate setVectorUp surfaceNormal _pos; _crate }; @@ -77,7 +81,7 @@ _fn_setupCrates = { private["_crate"]; _crate = [_location,_randomPos] call _fn_SpawnCrate; - if (_lootType isEqualTo 0) then {_lootType = round(random(3));}; + while {_lootType == 0} do {_lootType = round(random(3));}; switch(_lootType) do { // format here is [_arrayOfLoot, crateToLoad, magazinesToAddForEachWeaponLoaded] @@ -86,6 +90,7 @@ _fn_setupCrates = { case 3:{[_box3_loadout, _crate,3] call blck_fnc_loadLootItemsFromArray;}; }; if (_useSmoke) then {[getPos _crate] call _fn_smokeAtCrate;}; + #ifdef blck_debugMode if (blck_debugON) then { _blck_localMissionMarker = [format["SLS%1%2",_location select 0, _location select 1],(getPos _crate),"","","ColorGreen",["mil_box",[]]]; @@ -93,6 +98,7 @@ _fn_setupCrates = { // params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"]; [_blck_localMissionMarker] execVM "debug\spawnMarker.sqf"; }; + #endif _crate }; @@ -107,8 +113,8 @@ private["_cratePosnList","_no","_ar","_x","_cratePos","_lootType","_randomPos"," _index = 1; if (blck_debugON) then { - //diag_log format["[blckeagls] SLS :: main function: Location name = %3 |count _ar = %1 | _index = %2", count _ar, _index, _name]; - //diag_log format["[blckeagls] SLS :: main function: count _ar = %1", _ar]; + diag_log format["[blckeagls] SLS :: main function: Location name = %3 |count _ar = %1 | _index = %2", count _ar, _index, _name]; + diag_log format["[blckeagls] SLS :: main function: count _ar = %1", _ar]; }; if (_map isEqualto (toLower(worldName))) then { diff --git a/@ExileServer/addons/custom_server/init/build.sqf b/@ExileServer/addons/custom_server/init/build.sqf index dcd1ad5..8274ae3 100644 --- a/@ExileServer/addons/custom_server/init/build.sqf +++ b/@ExileServer/addons/custom_server/init/build.sqf @@ -1,3 +1,3 @@ private ["_version","_versionDate"]; -_blck_version = "6.61 Build 70"; -_blck_versionDate = "8-11-17 9:00 PM"; +_blck_version = "6.61 Build 71"; +_blck_versionDate = "8-13-17 9:00 PM"; diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf index 88809e1..0150779 100644 --- a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf +++ b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf @@ -4,7 +4,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last Modified 2/24/17 + Last Modified 8/12/17 -------------------------- License -------------------------- @@ -17,8 +17,11 @@ private ["_result"]; +/* _result = []; { if (isPlayer _x) then { _result pushback _x }; } forEach playableUnits; +*/ +_result = allPlayers; _result diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf new file mode 100644 index 0000000..3a3ba3c --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf @@ -0,0 +1,30 @@ + +// Last modified 8/13/17 by Ghostrider-DBD- +/* + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +#include "\q\addons\custom_server\Configs\blck_defines.hpp"; + +params["_data"]; +_value = objNull; +if (typeName _data isEqualTo "ARRAY") then +{ + _min = _data select 0; + _max = _data select 1; + if (_max > _min) then + { + _value = _min + round(random(_max - _min)); + } else { + _value = _min; + }; +}; +if (typeName _data isEqualTo "SCALAR") then +{ + _value = _data; +}; +_value \ No newline at end of file diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf index 1e8a2d2..3f88703 100644 --- a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf +++ b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf @@ -16,7 +16,7 @@ case 2: [["item1",...,"itemN"],6, 9]; As above except that an item will be selected a minimum of 6 and maximum of 9 times. by Ghostrider-DbD- - 6/7/17 + 8/13/17 -------------------------- License @@ -41,6 +41,8 @@ diag_log format["blck_fnc_loadLootFromItemsArray:: -- >> now loading for %1",_x]; #endif _q = _x select 1; // this can be a number or array. + _tries = [_q] call blck_fnc_getNumberFromRange; + /* if ( (typeName _q) isEqualTo "ARRAY") then // Assume the array contains a min/max number to add { if ((count _q) isEqualTo 2) then {_tries = (_q select 0) + round(random(((_q select 1) - (_q select 0))));} else {_tries = 0;}; @@ -49,6 +51,7 @@ { _tries = _q; }; + */ for "_i" from 1 to _tries do { _item = selectRandom (_x select 0); diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf index d9df832..76a2a2d 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last Modified 11-11-16 + Last Modified 8-13-17 Fill a crate with items -------------------------- @@ -15,16 +15,16 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - private["_a1","_item","_diff"]; + private["_a1","_item","_diff","_tries"]; params["_crate","_boxLoot","_itemCnts"]; _itemCnts params["_wepCnt","_magCnt","_opticsCnt","_materialsCnt","_itemCnt","_bkcPckCnt"]; - - if (_wepCnt > 0) then + _tries = [_wepCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { _a1 = _boxLoot select 0; // choose the subarray of weapons and corresponding magazines // Add some randomly selected weapons and corresponding magazines - for "_i" from 1 to _wepCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; if (typeName _item isEqualTo "ARRAY") then // Check whether weapon name is part of an array that might also specify an ammo to use { @@ -43,50 +43,55 @@ }; }; }; - if (_magCnt > 0) then + _tries = [_magCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { // Add Magazines, grenades, and 40mm GL shells _a1 = _boxLoot select 1; - for "_i" from 1 to _magCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); // Take difference between max and min number of items to load and randomize based on this value _crate addMagazineCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; }; }; - if (_opticsCnt > 0) then + _tries = [_opticsCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { // Add Optics _a1 = _boxLoot select 2; - for "_i" from 1 to _opticsCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; }; }; - if (_materialsCnt > 0) then + _tries = [_materialsCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { // Add materials (cindar, mortar, electrical parts etc) _a1 = _boxLoot select 3; - for "_i" from 1 to _materialsCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; }; }; - if (_itemCnt > 0) then + _tries = [_itemCnt] call blck_fnc_getNumberFromRange; + 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 _itemCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); _crate additemCargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; }; }; - if (_bkcPckCnt > 0) then + _tries = [_bkcPckCnt] call blck_fnc_getNumberFromRange; + if (_tries > 0) then { _a1 = _boxLoot select 5; - for "_i" from 1 to _bkcPckCnt do { + for "_i" from 1 to _tries do { _item = selectRandom _a1; _diff = (_item select 2) - (_item select 1); _crate addbackpackcargoGlobal [_item select 0, (_item select 1) + round(random(_diff))]; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf new file mode 100644 index 0000000..20aca76 --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner - Copy (2).sqf @@ -0,0 +1,446 @@ +/* + Generic Mission Spawner + for DBD Clan + By Ghostrider-DBD- + Copyright 2016 + Last modified 4/11/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 ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"]; +params["_coords","_mission",["_allowReinforcements",true]]; +diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements]; + +//////// +// set all variables needed for the missions +// data is pulled either from the mission description or from the _mission variable passsed as a parameter +// Deal with situations where some of these variables might not be defined as well. +//////// + +// _mission params[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange]; +_markerClass = _mission select 2; +_aiDifficultyLevel = _mission select 3; + +if (blck_debugLevel > 0) then {diag_log format["_fnc_mainThread:: -->> _markerClass = %1",_markerClass];}; + +[_mission,"active",_coords] call blck_fnc_updateMissionQue; +blck_ActiveMissionCoords pushback _coords; +diag_log format["[blckeagls] missionSpawner (17):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + +private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"]; + +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +//if (isNil "_timeOut") then {_timeOut = -1;}; +if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn"; + +private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"]; +if (isNil "_useMines") then {_useMines = blck_useMines;}; + +_objects = []; +_mines = []; +_crates = []; +_aiGroup = []; +_missionAIVehicles = []; +_blck_AllMissionAI = []; +_AI_Vehicles = []; +_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType]; +_delayTime = 1; +_groupPatrolRadius = 50; + +if (blck_labelMapMarkers select 0) then +{ + //diag_log "labeling map markers *****"; + _blck_localMissionMarker set [2, _markerMissionName]; +}; +if !(blck_preciseMapMarkers) then +{ + //diag_log "Map marker will be OFFSET from the mission position"; + _blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition]; +}; +_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name? +if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (91) message players and spawn a mission marker";}; +[["start",_startMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers; +[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf"; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (94) waiting for player to trigger the mission";}; +#endif +//////// +// All parameters are defined, lets wait until a player is nearby or the mission has timed out +//////// + +private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"]; +_missionStartTime = diag_tickTime; +_playerInRange = false; +_missionTimedOut = false; +_wait = true; +if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (105) starting mission trigger loop"}; + +while {_wait} do +{ + #ifdef blck_debugMode + //diag_log "missionSpawner:: top of mission trigger loop"; + if (blck_debugLevel > 2) exitWith {_playerInRange = true;}; + #endif + + if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;}; + if ([_missionStartTime] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;}; + uiSleep 5; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format["missionSpawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords]; + diag_log format["missionSpawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers]; + diag_log format["missionSpawner:: Trigger Loop - timeout = %1", [_missionStartTime] call blck_fnc_timedOut]; + }; + #endif +}; + +if (_missionTimedOut) exitWith +{ +/* + +*/ + // Deal with the case in which the mission timed out. + //["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers; + blck_recentMissionCoords pushback [_coords,diag_tickTime]; + blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords]; + [_mission,"inactive",[0,0,0]] call blck_fnc_updateMissionQue; + blck_missionsRunning = blck_missionsRunning - 1; + [_blck_localMissionMarker select 0] call compile preprocessfilelinenumbers "debug\deleteMarker.sqf"; + //_blck_localMissionMarker set [1,[0,0,0]]; + //_blck_localMissionMarker set [2,""]; + [_objects, 0.1] spawn blck_fnc_cleanupObjects; + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] missionSpawner:: (105) Mission Timed Out: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif +}; + +//////// +// Spawn the mission objects, loot chest, and AI +//////// +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (112) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +if (count _missionLootBoxes > 0) then +{ + _crates = [_coords,_missionLootBoxes,_loadCratesTiming] call blck_fnc_spawnMissionCrates; +} +else +{ + _crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming] call blck_fnc_spawnMissionCrates; + +}; + +if (blck_cleanUpLootChests) then +{ + _objects append _crates; +}; + +//uisleep 2; +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (136) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +private ["_temp"]; +if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate +{ + _temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates; + if (typeName _temp isEqualTo "ARRAY") then + { + _objects append _temp; + }; +}; + +uiSleep _delayTime; +if (_useMines) then +{ + _mines = [_coords] call blck_fnc_spawnMines; + //uiSleep _delayTime;; +}; +uiSleep _delayTime; +_temp = []; +if (_missionLandscapeMode isEqualTo "random") then +{ + _temp = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape; +} else { + _temp = [_coords, floor(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects; + //uiSleep 1; +}; +if (typeName _temp isEqualTo "ARRAY") then +{ + _objects append _temp; +}; +//diag_log format["_fnc_missionSpawner:: (181)->> _objects = %1",_objects]; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (170) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +uiSleep _delayTime;; + +_temp = [_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles; +//uisleep 1; +_crates append _temp; + +uiSleep _delayTime; + +_abort = false; +_temp = [[],[],false]; +_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI; +//[_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI; + +#ifdef blck_debugMode +if (blck_debugLevel > 2) then { + diag_log format["missionSpawner :: (185) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1; +}; + +_abort = _temp select 1; +if (blck_debugLevel > 2) then { + diag_log format["missionSpawner :: (190) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1; +}; +#endif + +if (_abort) exitWith +{ + if (blck_debugLevel > 1) then { + diag_log "missionSpawner:: (194) grpNull returned, mission termination criteria met, calling blck_fnc_endMission" + }; + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission; +}; +if !(_abort) then +{ + _blck_AllMissionAI append (_temp select 0); +}; + +uiSleep _delayTime; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (202) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; +}; +#endif + +_temp = [[],[],false]; +_abort = false; +private["_patrolVehicles"]; +if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then +{ + _temp = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; + //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; + #ifdef blck_debugMode + if (blck_debugLevel > 1) then { + diag_log format["missionSpawner :: (216) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + if !(_abort) then + { + _patrolVehicles = _temp select 0; + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] missionSpawner:: (272) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + + }; +}; + +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 0) then { + diag_log "missionSpawner:: (222) grpNull returned, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission; +}; + +uiSleep _delayTime; +_temp = [[],[],false]; +_abort = false; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (234) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];}; +#endif + +if (blck_useStatic && (_noEmplacedWeapons > 0)) then +{ + // params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; + _temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["missionSpawner:: (232) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + }; + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log format ["missionSpawner:: (241) _abort = %1",_abort]; + + }; + #endif + + if !(_abort) then + { + _objects append (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + + #ifdef blck_debugMode + if (blck_debugLevel > 0) then + { + diag_log format["[blckeagls] missionSpawner:: (253) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + }; +}; +if (_abort) exitWith +{ + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log "missionSpawner:: (261) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true,_patrolVehicles] call blck_fnc_endMission; +}; + +if (_allowReinforcements) then +{ + _weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout; + _temp = []; + + #ifdef blck_debugMode + if (blck_debugLevel > 1) then + { + diag_log format["[blckeagls] missionSpawner:: (268) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + }; + #endif + private _noChoppers = 3; + switch (toLower _aiDifficultyLevel) do + { + case "blue":{_noChoppers = blck_noPatrolHelisBlue}; + case "red":{_noChoppers = blck_noPatrolHelisRed}; + case "green":{_noChoppers = blck_noPatrolHelisGreen}; + case "orange":{_noChoppers = blck_noPatrolHelisOrange}; + }; + + for "_i" from 1 to (_noChoppers) do + { + //params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"]; + + _temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear] call blck_fnc_spawnMissionReinforcements; + + #ifdef blck_debugMode + if (blck_debugLevel >= 2) then + { + diag_log format["missionSpawner:: blck_fnc_spawnMissionReinforcements call for chopper # %1 out of a total of %2 choppers",_i, _noChoppers]; + diag_log format["missionSpawner:: _temp = %1",_temp]; + }; + #endif + + if (typeName _temp isEqualTo "ARRAY") then + { + _abort = _temp select 2; + _objects pushback (_temp select 0); + _blck_AllMissionAI append (_temp select 1); + }; + if (_abort) then + { + + #ifdef blck_debugMode + if (blck_debugLevel > 2) then + { + diag_log "missionSpawner:: (276) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission"; + }; + #endif + + [_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true,_patrolVehicles] call blck_fnc_endMission; + }; + }; +}; +// Trigger for mission end +//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition]; +private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"]; +_missionComplete = -1; +_startTime = diag_tickTime; + +switch (_endCondition) do +{ + case "playerNear": {_endIfPlayerNear = true;_endIfAIKilled = false;}; + case "allUnitsKilled": {_endIfPlayerNear = false;_endIfAIKilled = true;}; + case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;}; +}; +//diag_log format["missionSpawner :: (269) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled]; +private["_locations"]; +_locations = [_coords]; +{ + _locations pushback (getPos _x); +} forEach _crates; + +//diag_log format["missionSpawner:: _coords = %1 | _crates = %2 | _locations = %3",_coords,_crates,_locations]; +//diag_log format["missionSpawner:: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled]; +while {_missionComplete isEqualTo -1} do +{ + //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300}; + if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {}; + if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1 /*[_blck_AllMissionAI] call blck_fnc_missionAIareDead*/ ) exitWith {}; + //diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI]; + uiSleep 4; +}; + +#ifdef blck_debugMode +if (blck_debugLevel > 0) then +{ + diag_log format["[blckeagls] missionSpawner:: (414) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + diag_log format["missionSpawner :: (415) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled]; +}; +#endif +//diag_log format["[blckeagls] missionSpawner:: (418) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; + +private["_result"]; +_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,false,_patrolVehicles] call blck_fnc_endMission; + +//diag_log format["[blckeagls] missionSpawner:: (420)end of mission: blck_fnc_endMission returned value of %1","pending"]; + diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index 20aca76..b05bc46 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -3,7 +3,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last modified 4/11/17 + Last modified 8/13/17 -------------------------- License @@ -247,8 +247,9 @@ if (blck_debugLevel > 0) then _temp = [[],[],false]; _abort = false; -private["_patrolVehicles"]; -if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then +private["_patrolVehicles","_vehToSpawn"]; +_vehToSpawn = [_noVehiclePatrols] call blck_fnc_getNumberFromRange; +if (blck_useVehiclePatrols && (_vehToSpawn > 0)) then { _temp = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; //[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols; @@ -296,7 +297,9 @@ _abort = false; if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (234) preparing to spawn emplaced weapons for _coords %4 | _markerClass %3 | blck_useStatic = %1 | _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass,_coords];}; #endif -if (blck_useStatic && (_noEmplacedWeapons > 0)) then +private["_noEmplacedToSpawn"]; +_noEmplacedToSpawn = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange; +if (blck_useStatic && (_noEmplacedToSpawn > 0)) then { // params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear"]; _temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; @@ -360,10 +363,10 @@ if (_allowReinforcements) then private _noChoppers = 3; switch (toLower _aiDifficultyLevel) do { - case "blue":{_noChoppers = blck_noPatrolHelisBlue}; - case "red":{_noChoppers = blck_noPatrolHelisRed}; - case "green":{_noChoppers = blck_noPatrolHelisGreen}; - case "orange":{_noChoppers = blck_noPatrolHelisOrange}; + case "blue":{_noChoppers = [blck_noPatrolHelisBlue] call blck_fnc_getNumberFromRange}; + case "red":{_noChoppers = [blck_noPatrolHelisRed] call blck_fnc_getNumberFromRange}; + case "green":{_noChoppers = [blck_noPatrolHelisGreen] call blck_fnc_getNumberFromRange}; + case "orange":{_noChoppers = [blck_noPatrolHelisOrange] call blck_fnc_getNumberFromRange}; }; for "_i" from 1 to (_noChoppers) do @@ -423,7 +426,7 @@ _locations = [_coords]; //diag_log format["missionSpawner:: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled]; while {_missionComplete isEqualTo -1} do { - //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300}; + //if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 180}; if ((_endIfPlayerNear) && [_locations,10,true] call blck_fnc_playerInRangeArray) exitWith {}; if ((_endIfAIKilled) && ({alive _x} count _blck_AllMissionAI) < 1 /*[_blck_AllMissionAI] call blck_fnc_missionAIareDead*/ ) exitWith {}; //diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI]; diff --git a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf index b54dace..a96b599 100644 --- a/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf +++ b/@epochhive/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionAI.sqf @@ -1,7 +1,7 @@ /* blck_fnc_spawnMissionAI by Ghostrider-DbD- - 3/17/17 + 8/13/17 [_coords, // center of the area within which to spawn AI _minNoAI, // minimum number of AI to spawn _maxNoAI, // Max number of AI to spawn @@ -22,7 +22,7 @@ params["_coords",["_minNoAI",3],["_maxNoAI",6],["_aiDifficultyLevel","red"],["_uniforms",blck_SkinList],["_headGear",blck_BanditHeadgear]]; private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup","_blck_AllMissionAI","_abort"]; - _unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI))); + _unitsToSpawn = [[_minNoAI,_maxNoAI]] call blck_fnc_getNumberFromRange; //round(_minNoAI + round(random(_maxNoAI - _minNoAI))); _unitsPerGroup = floor(_unitsToSpawn/_noAIGroups); _ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups); _blck_AllMissionAI = []; diff --git a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf index 85b8fa6..2831502 100644 --- a/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf +++ b/@epochhive/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf @@ -1,7 +1,7 @@ /* Set skills for an AI Unit by Ghostrider - Last updated 8/14/16 + Last updated 8/14/17 -------------------------- License -------------------------- @@ -14,7 +14,8 @@ // Self explanatory // [_group, _skill] call blck_setSkill; params ["_unit","_skillsArrray"]; - +private["_skillLevel"]; { - _unit setSkill [(_x select 0),(_x select 1)]; + _skillLevel = [_x select 1] call blck_fnc_getNumberFromRange; + _unit setSkill [(_x select 0), _skillLevel]; } forEach _skillsArrray; diff --git a/@epochhive/addons/custom_server/Compiles/blck_functions.sqf b/@epochhive/addons/custom_server/Compiles/blck_functions.sqf index 2169262..7a5c6c8 100644 --- a/@epochhive/addons/custom_server/Compiles/blck_functions.sqf +++ b/@epochhive/addons/custom_server/Compiles/blck_functions.sqf @@ -32,6 +32,7 @@ blck_fnc_mainThread = compileFinal preprocessFileLineNumbers "\q\addons\custom_ blck_fnc_allPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_allPlayers.sqf"; blck_fnc_addItemToCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_addItemToCrate.sqf"; blck_fnc_loadLootItemsFromArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_loadLootItemsFromArray.sqf"; +blck_fnc_getNumberFromRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getNumberFromRange.sqf"; #ifdef DBDserver blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf"; diff --git a/@epochhive/addons/custom_server/Compiles/blck_variables.sqf b/@epochhive/addons/custom_server/Compiles/blck_variables.sqf index 8dfbf12..4cbd6cc 100644 --- a/@epochhive/addons/custom_server/Compiles/blck_variables.sqf +++ b/@epochhive/addons/custom_server/Compiles/blck_variables.sqf @@ -12,8 +12,8 @@ */ #include"\q\addons\custom_server\Configs\blck_defines.hpp"; -blck_debugON = false; -blck_debugLevel = 0; // Sets level of detail for debugging info - WIP. +blck_debugON = true; +blck_debugLevel = 3; // Sets level of detail for debugging info - WIP. blck_minFPS = 10; //////////////////////////////////////////////// diff --git a/@epochhive/addons/custom_server/Configs/blck_configs.sqf b/@epochhive/addons/custom_server/Configs/blck_configs.sqf index f4189bb..286ddd2 100644 --- a/@epochhive/addons/custom_server/Configs/blck_configs.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_configs.sqf @@ -165,11 +165,11 @@ blck_chanceHeliPatrolGreen = 0.4; blck_patrolHelisGreen = _blck_littleBirds; - blck_noPatrolHelisGreen = 1; + blck_noPatrolHelisGreen = [1,1]; blck_chanceHeliPatrolOrange = 0.5; blck_patrolHelisOrange = _blck_armed_hellcats+_blck_armed_orcas; - blck_noPatrolHelisOrange = 1; + blck_noPatrolHelisOrange = [1,1]; //////////////////// // Enable / Disable Missions @@ -233,7 +233,7 @@ // Mission Vehicle Settings //////////////////// //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high - blck_SpawnVeh_Orange = 3; // Number of static weapons at Orange Missions + blck_SpawnVeh_Orange = [2,4]; // Number of static weapons at Orange Missions blck_SpawnVeh_Green = 2; // Number of static weapons at Green Missions blck_SpawnVeh_Blue = -1; // Number of static weapons at Blue Missions blck_SpawnVeh_Red = 1; // Number of static weapons at Red Missions @@ -251,7 +251,7 @@ //////////////////// // Defines how many static weapons to spawn. Set this to -1 to disable spawning - blck_SpawnEmplaced_Orange = 3; // Number of static weapons at Orange Missions + blck_SpawnEmplaced_Orange = [2,4]; // Number of static weapons at Orange Missions blck_SpawnEmplaced_Green = 2; // Number of static weapons at Green Missions blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions blck_SpawnEmplaced_Red = 1; // Number of static weapons at Red Missions @@ -304,7 +304,7 @@ blck_MaxAI_Orange = 25; blck_AIGrps_Orange = 5; blck_SkillsOrange = [ - ["aimingAccuracy",0.4],["aimingShake",0.7],["aimingSpeed",0.7],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] + ["aimingAccuracy",[0.35,0.45]],["aimingShake",[0.65,0.75]],["aimingSpeed",[0.65,0.75]],["endurance",1.00],["spotDistance",1.0],["spotTime",1.0],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] ]; // Green Missions @@ -338,7 +338,7 @@ blck_maxMoneyBlue = 10; #ifdef DBDserver - blck_AIAlertDistance = [150,225,250,300]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. + blck_AIAlertDistance = [250,450,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. //blck_AIAlertDistance = [150,225,400,500]; // How precisely player locations will be revealed to AI after an AI kill // values are ordered as follows [blue, red, green, orange]; @@ -357,7 +357,7 @@ blck_MaxAI_Orange = 25; blck_AIGrps_Orange = 5; blck_SkillsOrange = [ - ["aimingAccuracy",0.5],["aimingShake",0.5],["aimingSpeed",0.7],["endurance",1.00],["spotDistance",1.0],["spotTime",0.7],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] + ["aimingAccuracy",[0.45,0.56]],["aimingShake",[0.45,0.55]],["aimingSpeed",[0.65,0.75]],["endurance",1.00],["spotDistance",1.0],["spotTime",0.7],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00] ]; // Green Missions @@ -365,7 +365,7 @@ blck_MaxAI_Green = 21; blck_AIGrps_Green = 4; blck_SkillsGreen = [ - ["aimingAccuracy",0.4],["aimingShake",0.45],["aimingSpeed",0.65],["endurance",0.9],["spotDistance",0.9],["spotTime",0.65],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75] + ["aimingAccuracy",[0.35,0.45]],["aimingShake",[0.4,0.5]],["aimingSpeed",[0.55,0.7]],["endurance",0.9],["spotDistance",0.9],["spotTime",0.65],["courage",0.9],["reloadSpeed",0.9],["commanding",0.9],["general",0.75] ]; // Red Missions @@ -373,7 +373,7 @@ blck_MaxAI_Red = 15; blck_AIGrps_Red = 3; blck_SkillsRed = [ - ["aimingAccuracy",0.3],["aimingShake",0.4],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.6],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70] + ["aimingAccuracy",[0.25,0.35]],["aimingShake",[0.35,0.4]],["aimingSpeed",0.6],["endurance",0.80],["spotDistance",0.7],["spotTime",0.6],["courage",0.80],["reloadSpeed",0.70],["commanding",0.8],["general",0.70] ]; // Blue Missions @@ -381,7 +381,7 @@ blck_MaxAI_Blue = 12; blck_AIGrps_Blue = 2; blck_SkillsBlue = [ - ["aimingAccuracy",0.12],["aimingShake",0.3],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] + ["aimingAccuracy",[0.08,16]],["aimingShake",[0.25,0.35]],["aimingSpeed",0.5],["endurance",0.50],["spotDistance",0.6],["spotTime",0.6],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60] ]; // Add some money to AI; only works with Exile for now. diff --git a/@epochhive/addons/custom_server/Configs/blck_configs_epoch.sqf b/@epochhive/addons/custom_server/Configs/blck_configs_epoch.sqf index 8b06060..dc4e158 100644 --- a/@epochhive/addons/custom_server/Configs/blck_configs_epoch.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_configs_epoch.sqf @@ -60,8 +60,8 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "optic_LRPS", "optic_Nightstalker", "optic_NVS", - "optic_SOS" - //"optic_tws", + "optic_SOS", + "optic_tws" //"optic_tws_mg", ]; blck_Optics_Apex = [ diff --git a/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf b/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf index 5fc93fb..c1e1bc6 100644 --- a/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf @@ -66,8 +66,8 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR "optic_LRPS", "optic_Nightstalker", "optic_NVS", - "optic_SOS" - //"optic_tws", + "optic_SOS", + "optic_tws" //"optic_tws_mg", ]; @@ -508,9 +508,9 @@ for examples of how you can do this see \Major\Compositions.sqf ***************************************************************************************/ // values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively. - blck_lootCountsOrange = [8,32,8,30,16,1]; // Orange - blck_lootCountsGreen = [7,24,6,16,18,1]; // Green - blck_lootCountsRed = [5,16,4,10,6,1]; // Red + blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange + blck_lootCountsGreen = [[4,8],[20,30],[5,9],[15,18],18,1]; // Green + blck_lootCountsRed = [[4,6],[12,18],4,[6,12],6,1]; // Red blck_lootCountsBlue = [4,12,3,6,6,1]; // Blue blck_BoxLoot_Orange = diff --git a/@epochhive/addons/custom_server/Configs/blck_configs_mil.sqf b/@epochhive/addons/custom_server/Configs/blck_configs_mil.sqf index 323a746..34bdebc 100644 --- a/@epochhive/addons/custom_server/Configs/blck_configs_mil.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_configs_mil.sqf @@ -238,8 +238,8 @@ // Mission Vehicle Settings //////////////////// //Defines how many AI Vehicles to spawn. Set this to -1 to disable spawning of static weapons or vehicles. To discourage players runniing with with vehicles, spawn more B_GMG_01_high - blck_SpawnVeh_Orange = 4; // Number of static weapons at Orange Missions - blck_SpawnVeh_Green = 3; // Number of static weapons at Green Missions + blck_SpawnVeh_Orange = [3,5]; // Number of static weapons at Orange Missions + blck_SpawnVeh_Green = [3,4]; // Number of static weapons at Green Missions blck_SpawnVeh_Blue = -1; // Number of static weapons at Blue Missions blck_SpawnVeh_Red = 2; // Number of static weapons at Red Missions @@ -256,8 +256,8 @@ //////////////////// // Defines how many static weapons to spawn. Set this to -1 to disable spawning - blck_SpawnEmplaced_Orange = 5; // Number of static weapons at Orange Missions - blck_SpawnEmplaced_Green = 4; // Number of static weapons at Green Missions + blck_SpawnEmplaced_Orange = [3,5]; // Number of static weapons at Orange Missions + blck_SpawnEmplaced_Green = [3,4]; // Number of static weapons at Green Missions blck_SpawnEmplaced_Blue = 1; // Number of static weapons at Blue Missions blck_SpawnEmplaced_Red = 2; // Number of static weapons at Red Missions @@ -290,7 +290,7 @@ // How precisely player locations will be revealed to AI after an AI kill // values are ordered as follows [blue, red, green, orange]; - blck_AIAlertDistance = [250,325,450,500]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. + blck_AIAlertDistance = [250,425,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. //blck_AIAlertDistance = [150,225,400,500]; // How precisely player locations will be revealed to AI after an AI kill // values are ordered as follows [blue, red, green, orange]; @@ -343,7 +343,7 @@ blck_maxMoneyBlue = 20; #ifdef DBDserver - blck_AIAlertDistance = [250,325,450,500]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. + blck_AIAlertDistance = [250,425,650,800]; // Radius within which AI will be notified of enemy activity. Depricated as a group-sed system is used now. The group is informed of the enemy location when a group member is hit or killed. //blck_AIAlertDistance = [150,225,400,500]; // How precisely player locations will be revealed to AI after an AI kill // values are ordered as follows [blue, red, green, orange]; diff --git a/@epochhive/addons/custom_server/Configs/blck_custom_config.sqf b/@epochhive/addons/custom_server/Configs/blck_custom_config.sqf index fc670f5..a3c4495 100644 --- a/@epochhive/addons/custom_server/Configs/blck_custom_config.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_custom_config.sqf @@ -111,18 +111,18 @@ if (blck_debugON || (blck_debugLevel > 0)) then // These variables are found in blck_mainThreadUpdateInterval = 10; blck_enableOrangeMissions = 1; - blck_enableGreenMissions = -1; - blck_enableRedMissions = -1; - blck_enableBlueMissions = -1; - blck_enableHunterMissions = -1; - blck_enableScoutsMissions = -1; - blck_maxCrashSites = -3; + blck_enableGreenMissions = 1; + blck_enableRedMissions = 1; + blck_enableBlueMissions = 1; + blck_enableHunterMissions = 1; + blck_enableScoutsMissions = 1; + blck_maxCrashSites = 3; //blck_enabeUnderwaterMissions = 1; - blck_cleanupCompositionTimer = 120; // Time after mission completion at which items in the composition are deleted. - blck_AliveAICleanUpTimer = 120; // Time after mission completion at which any remaining live AI are deleted. - blck_bodyCleanUpTimer = 120; + blck_cleanupCompositionTimer = 20; // Time after mission completion at which items in the composition are deleted. + blck_AliveAICleanUpTimer = 20; // Time after mission completion at which any remaining live AI are deleted. + blck_bodyCleanUpTimer = 20; //blck_chanceHeliPatrolBlue = 1; blck_SpawnEmplaced_Orange = 4; // Number of static weapons at Orange Missions diff --git a/@epochhive/addons/custom_server/Configs/blck_defines.hpp b/@epochhive/addons/custom_server/Configs/blck_defines.hpp index 1e51318..49da0dc 100644 --- a/@epochhive/addons/custom_server/Configs/blck_defines.hpp +++ b/@epochhive/addons/custom_server/Configs/blck_defines.hpp @@ -12,8 +12,7 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -#define modUsed -#define DBDserver +//#define DBDserver #define wpModeMove #define useAPEX #define useDynamicSimulation diff --git a/@epochhive/addons/custom_server/SLS/SLS_defines_exile.sqf b/@epochhive/addons/custom_server/SLS/SLS_defines_exile.sqf index 65d365d..15b30fe 100644 --- a/@epochhive/addons/custom_server/SLS/SLS_defines_exile.sqf +++ b/@epochhive/addons/custom_server/SLS/SLS_defines_exile.sqf @@ -242,7 +242,7 @@ _loot_Misc = ["Exile_Item_InstaDoc","Exile_Item_Matches","Exile_Item_CookingPot" //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ _loot_build = ["Exile_Item_Rope","Exile_Item_DuctTape","Exile_Item_ExtensionCord","Exile_Item_FuelCanisterEmpty", "Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_CamoTentKit","Exile_Item_WorkBenchKit", - "Exile_Item_MetalBoard","Exile_Item_MetalPole"]; + "Exile_Item_MetalBoard","Exile_Item_MetalPole","Exile_Item_Sand","Exile_Item_Cement","Exile_Item_MetalWire","Exile_Item_MetalScrews" ]; _loot_tools = ["Exile_Item_Handsaw","Exile_Item_Pliers","Exile_Item_Grinder","Exile_Item_Foolbox"]; // Explosives @@ -251,40 +251,50 @@ _loot_explosives = [["HandGrenade",3],["MiniGrenade",3],["SatchelCharge_Remote_M _loot_launchers = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_Titan_short_F"]; // Loot Configuration 1: Heavy Weapons and explosives -_box1_Pistols = 3; -_box1_Rifles = 5; -_box1_LMG = 4; -_box1_Snipers = 3; -_box1_Mags = [2,6]; -_box1_Optics = 6; -_box1_Silencers = 5; -_box1_Explosives = 6; -_box1_FoodDrink = 6; -_box1_Misc = 3; +_box1_Pistols = [2,4]; +_box1_Rifles = [5,8]; +_box1_LMG = [1,4]; +_box1_Snipers = 0; +_box1_Mags = [4,8]; +_box1_Optics = [3,6]; +_box1_Silencers = [3,6]; +_box1_Explosives = [3,6]; +_box1_FoodDrink = 3; +_box1_Misc = 0; _box1_Backpacks = 3; -_box1_BuildingSupplies = 3; +_box1_BuildingSupplies = 0; _box1_Tools = 0; + +#ifdef blck_milServer +_box1_launchers = 4; +#else _box1_launchers = 0; +#endif // Note that the bonus items are listed in a nexted array within the _box1_cbonus array. It was more difficult to ocde otherwise and would have needed indexing to make it work. _box1_bonus_items = [["ItemGPS",1],["Rangefinder",1],["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]]; _box1_bonus = 1; // Loot Configuration 2: Sniper Weapons and sniper scopes -_box2_Pistols = 3; -_box2_Rifles = 5; -_box2_LMG = 4; -_box2_Snipers = 3; +_box2_Pistols = 2; +_box2_Rifles = 2; +_box2_LMG = [3,6]; +_box2_Snipers = [4,8]; _box2_Mags = [2,6]; // [number of times to select a mag, min # of that mag to add, max # of that mag to add] _box2_Optics = 6; _box2_Silencers = 5; _box2_Explosives = 6; -_box2_FoodDrink = 6; -_box2_Misc = 3; +_box2_FoodDrink = 2; +_box2_Misc = 1; _box2_Backpacks = 3; -_box2_BuildingSupplies = 3; +_box2_BuildingSupplies = 0; _box2_Tools = 0; _box2_Misc = 0; +#ifdef blck_milServer +_box2_launchers = 4; +#else _box2_launchers = 0; +#endif + _box2_bonus_items = [["ItemGPS",2],["Rangefinder",2],["SatchelCharge_Remote_Mag",1],["DemoCharge_Remote_Mag",10]]; _box2_bonus = 1; @@ -293,17 +303,22 @@ _box3_Pistols = 2; _box3_Rifles = 2; _box3_LMG = 1; _box3_Snipers = 1; -_box3_Mags = [4,2,6]; +_box3_Mags = [4,6]; _box3_Optics = 1; _box3_Silencers = 1; _box3_Explosives = 2; -_box3_FoodDrink = 3; -_box3_Misc = 3; +_box3_FoodDrink = 12; +_box3_Misc = 6; _box3_Backpacks = 1; -_box3_BuildingSupplies = [8,15]; // [Number of items, min for item, max for item] +_box3_BuildingSupplies = [12,20]; // [Number of items, min for item, max for item] _box3_Tools = 4; _box3_Misc = 6; +#ifdef blck_milServer +_box3_launchers = 4; +#else _box3_launchers = 0; +#endif + _box3_bonus_items = [["Exile_Item_Matches",2],[ "Exile_Item_CookingPot",2],["Exile_Item_CanOpener",3],["Exile_Item_Handsaw",2],["Exile_Item_Pliers",2],["Exile_Item_Grinder",1],["Exile_Item_Foolbox",1]]; _box3_bonus = 1; diff --git a/@epochhive/addons/custom_server/SLS/SLS_functions.sqf b/@epochhive/addons/custom_server/SLS/SLS_functions.sqf index a2a0b98..439168f 100644 --- a/@epochhive/addons/custom_server/SLS/SLS_functions.sqf +++ b/@epochhive/addons/custom_server/SLS/SLS_functions.sqf @@ -2,7 +2,7 @@ for DBD Clan By Ghostrider-DBD- Copyright 2016 - Last Modified 3-14-17 + Last Modified 8-23-17 -------------------------- License @@ -59,16 +59,20 @@ _fn_spawnCrate = { _pos = _cratePos; //diag_log format["crate spawner using exact position %1",_pos]; }; - if (blck_debugON) then + #ifdef blck_debugMode + if (blck_debugLevel > 0) then { diag_log format["[blckeagls[ SLS :: _fn_spawnCrate %1 _randomLocation %2 crate position %3",_cratePos,_randomLocation,_pos]; }; + #endif private["_crateTypes","_selectedCrateType"]; //_crateTypes = ["I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F","I_supplyCrate_F","Box_East_AmmoVeh_F","Box_NATO_AmmoVeh_F"]; _selectedCrateType = selectRandom blck_crateTypes; _crate = [[0,0,0],_selectedCrateType] call blck_fnc_spawnCrate; _crate setPosATL _pos; _crate setDir round(random(360)); + //uiSleep 1; + _crate setVectorUp surfaceNormal _pos; _crate }; @@ -77,7 +81,7 @@ _fn_setupCrates = { private["_crate"]; _crate = [_location,_randomPos] call _fn_SpawnCrate; - if (_lootType isEqualTo 0) then {_lootType = round(random(3));}; + while {_lootType == 0} do {_lootType = round(random(3));}; switch(_lootType) do { // format here is [_arrayOfLoot, crateToLoad, magazinesToAddForEachWeaponLoaded] @@ -86,6 +90,7 @@ _fn_setupCrates = { case 3:{[_box3_loadout, _crate,3] call blck_fnc_loadLootItemsFromArray;}; }; if (_useSmoke) then {[getPos _crate] call _fn_smokeAtCrate;}; + #ifdef blck_debugMode if (blck_debugON) then { _blck_localMissionMarker = [format["SLS%1%2",_location select 0, _location select 1],(getPos _crate),"","","ColorGreen",["mil_box",[]]]; @@ -93,6 +98,7 @@ _fn_setupCrates = { // params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"]; [_blck_localMissionMarker] execVM "debug\spawnMarker.sqf"; }; + #endif _crate }; @@ -107,8 +113,8 @@ private["_cratePosnList","_no","_ar","_x","_cratePos","_lootType","_randomPos"," _index = 1; if (blck_debugON) then { - //diag_log format["[blckeagls] SLS :: main function: Location name = %3 |count _ar = %1 | _index = %2", count _ar, _index, _name]; - //diag_log format["[blckeagls] SLS :: main function: count _ar = %1", _ar]; + diag_log format["[blckeagls] SLS :: main function: Location name = %3 |count _ar = %1 | _index = %2", count _ar, _index, _name]; + diag_log format["[blckeagls] SLS :: main function: count _ar = %1", _ar]; }; if (_map isEqualto (toLower(worldName))) then { diff --git a/@epochhive/addons/custom_server/init/build.sqf b/@epochhive/addons/custom_server/init/build.sqf index dcd1ad5..8274ae3 100644 --- a/@epochhive/addons/custom_server/init/build.sqf +++ b/@epochhive/addons/custom_server/init/build.sqf @@ -1,3 +1,3 @@ private ["_version","_versionDate"]; -_blck_version = "6.61 Build 70"; -_blck_versionDate = "8-11-17 9:00 PM"; +_blck_version = "6.61 Build 71"; +_blck_versionDate = "8-13-17 9:00 PM"; diff --git a/changeLog.sqf b/changeLog.sqf index 0961961..c3aa702 100644 --- a/changeLog.sqf +++ b/changeLog.sqf @@ -4,9 +4,31 @@ 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. -8/3/17 Version 6.60 Build 66 +Significant Changes: + +8/13/17 Version 6.61 Build 71 + +[Added] Most parameters for numbers of loot, AI, and vehicle patrols can be defined as either a scalar value or range. + Note that there is backwards compatability to prior versions so you need make no changes to your configs if you do not wish to. + The major reason to include this feature is so that players to do not go looking for that third static weapon at an orange mission. They have to scope out the situation. + +[Added] options to have multiple aircraft spawn per mission. + [Note that if you spawn more than one aircraft I recommend that you disable the paratroop spawns to avoid spawning more than 124 groups]. +[Added] an optional militarized setting whereby missions use a full complement of Arma air and ground vehicles including fighter jets and tanks. This is OFF by default. + Uncomment #define blck_milServer in custom_server\Configs\blck_defines to enable this. + [ Note!!! There are both general and mod-specific configs for the militarized missions.] +[Added] Support for setting a range for certain configurations rather than setting a single value. +This should make missions a little more varied in that players will no longer be looking for the 4 statics that always spawn at an orange mission. +This pertains to: + Numbers of Emplaced Weapons + Numbers of Vehicles Patrols + Numbers of Air Patrols + AI Skills; for example you can now set ["aimingAccuracy",[0.08,16]],["aimingShake",[0.25,0.35]],["aimingSpeed",0.5],["endurance",0.50], .... ]; + Numbers of Items to load into Mission and Static loot crates; for example, for the orange level of difficulty item counts could be revised as follows: + blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; + +7/27/17 Version 6.59 Build 60 [added] AI units in mission vehicles and emplaced weapons are notified of the location of the shooter when an AI unit is hit or killed. Location of the unit is revealed gradually between 0.1 and 4 where 4 is precise. Increments increase with increasing mission difficulty. -[Changed] Removed some unused code from files in the debug folder of the mission.pbo. 6/1/17 Version 6.59 Build 59 [changed] Players are no longer given crypto for each AI kill. Crypto added to AI Bodies was increased.