From b89156d7fbf9dcadd0f12c8d7612f394cde41cfb Mon Sep 17 00:00:00 2001 From: Chris Cardozo Date: Mon, 23 Mar 2020 18:12:59 -0400 Subject: [PATCH] Minor bug fixes removed all references to GRGserver. Added scope definitions that were missing. --- .../Functions/GMS_fnc_addMoneyToObject.sqf | 13 +--- .../Functions/GMS_fnc_findSafePosn.sqf | 8 +- .../Compiles/Functions/GMS_fnc_mainThread.sqf | 7 +- .../Functions/GMS_fnc_nearestMarkerOfType.sqf | 9 +++ .../GMS_fnc_findNearestInfantryGroup.sqf | 4 +- .../Compiles/Missions/GMS_fnc_endMission.sqf | 4 +- .../Missions/GMS_fnc_missionSpawner.sqf | 10 ++- .../Missions/GMS_fnc_spawnMissionCrates.sqf | 2 +- .../Missions/GMS_fnc_spawnPendingMissions.sqf | 6 +- .../Units/GMS_fnc_alertNearbyUnits.sqf | 4 +- .../Units/GMS_fnc_handlePlayerUpdates.sqf | 10 +++ .../Compiles/Units/GMS_fnc_spawnCharacter.sqf | 6 +- .../Compiles/Units/GMS_fnc_spawnUnit.sqf | 16 +--- .../custom_server/Compiles/blck_functions.sqf | 7 +- .../custom_server/Configs/blck_configs.sqf | 29 +------ .../custom_server/Configs/blck_defines.hpp | 2 +- .../UMS/GMS_fnc_spawnDynamicUMSMission.sqf | 76 ++++++++++++------- .../custom_server/SLS/SLS_defines_epoch.sqf | 16 ---- @GMS/addons/custom_server/SLS/SLS_init.sqf | 4 +- .../custom_server/init/GMS_fnc_findWorld.sqf | 4 +- .../custom_server/init/blck_init_server.sqf | 40 +++++++++- @GMS/addons/custom_server/init/build.sqf | 4 +- 22 files changed, 147 insertions(+), 134 deletions(-) create mode 100644 @GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestMarkerOfType.sqf diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf index 4123b05..7f4c32d 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addMoneyToObject.sqf @@ -11,14 +11,10 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; +if (toLower(blck_modType) isEqualTo "default") exitWith {}; + params["_obj","_difficulty"]; - -#ifdef blck_debugMode -{ - diag_log format["_fnc_addMoneyToOject: _this select %1 = %2",_foreachindex, _this select _foreachindex]; -}forEach _this; -#endif if (blck_modType isEqualTo "Exile") then { switch (_difficulty) do @@ -27,11 +23,7 @@ if (blck_modType isEqualTo "Exile") then case "red":{_obj setVariable["ExileMoney", floor(random([blck_crateMoneyRed] call blck_fnc_getNumberFromRange)),true];}; case "green":{_obj setVariable["ExileMoney", floor(random([blck_crateMoneyGreen] call blck_fnc_getNumberFromRange)),true];}; case "orange":{_obj setVariable["ExileMoney", floor(random([blck_crateMoneyGreen] call blck_fnc_getNumberFromRange)),true];}; - //#ifdef blck_debugMode - - //#endif }; - //diag_log format["_fnc_addMoneyToOject: ExileMoney set to %1", _obj getVariable "ExileMoney"]; }; if (blck_modType isEqualTo "Epoch") then @@ -43,5 +35,4 @@ if (blck_modType isEqualTo "Epoch") then case "green":{_obj setVariable["Crypto", floor(random([blck_crateMoneyGreen] call blck_fnc_getNumberFromRange)),true];}; case "orange":{_obj setVariable["Crypto", floor(random([blck_crateMoneyGreen] call blck_fnc_getNumberFromRange)),true];}; }; - //diag_log format["_fnc_addMoneyToOject: Crypto set to %1", _obj getVariable "Crypto"]; }; \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf index a9bf51b..922eb4a 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findSafePosn.sqf @@ -35,10 +35,10 @@ for '_i' from 1 to count blck_recentMissionCoords do { } forEach blck_ActiveMissionCoords; // Check for bases every time this function is called so that we account for any new bases started during that server uptime period. -private "_pole"; -if (blck_modType isEqualTo "Epoch") then {_pole = "PlotPole_EPOCH"}; -if (blck_modType isEqualTo "Exile") then {_pole = "Exile_Construction_Flag_Static"}; -private _bases = nearestObjects[blck_mapCenter, [_pole], blck_mapRange + 25000]; +private _bases = []; +if (blck_modType isEqualTo "Epoch") then {_bases = nearestObjects[blck_mapCenter, ["PlotPole_EPOCH"], blck_mapRange + 25000]}; +if (blck_modType isEqualTo "Exile") then {_bases = nearestObjects[blck_mapCenter, ["Exile_Construction_Flag_Static"], blck_mapRange + 25000]}; + //diag_log format["_fnc_findSafePosn: count _bases = %1 | _bases = %2", count _bases, _bases]; { diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf index 156fa0e..38b59d7 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -33,12 +33,7 @@ while {true} do if (blck_simulationManager isEqualTo blck_useBlckeaglsSimulationManagement) then {[] call blck_fnc_simulationManager}; [] call blck_fnc_sm_staticPatrolMonitor; [] call blck_fnc_vehicleMonitor; - //[] call blck_fnc_cleanupAliveAI; - //[] call blck_fnc_cleanupObjects; - //[] call blck_fnc_cleanupDeadAI; - #ifdef GRGserver - [] call blck_fnc_broadcastServerFPS; - #endif + }; if (diag_tickTime > _timer20sec) then { diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestMarkerOfType.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestMarkerOfType.sqf new file mode 100644 index 0000000..113fc74 --- /dev/null +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_nearestMarkerOfType.sqf @@ -0,0 +1,9 @@ +/* + Purpose: returns the nearest marker of a specific type + Parameters: type of marker to search for as a "STRING" + Returns: The nearest marker of that type +*/ + +params["_mType"]; +private _nearestMarker = [player, (allMapMarkers select {(getMarkerType _x) isEqualTo _mType})] BIS_fnc_nearestPosition; +_nearestMarker; diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf index a8650ed..e442555 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_findNearestInfantryGroup.sqf @@ -13,7 +13,7 @@ params["_pos"]; private["_units"]; -if (blck_modType == "Epoch") then {_units = (nearestObjects[_pos,["I_Soldier_EPOCH"], 1000]) select {vehicle _x isEqualTo _x}}; -if (blck_modType == "Exile") then {_units = (nearestObjects[_pos ,["i_g_soldier_unarmed_f"], 1000]) select {vehicle _x isEqualTo _x}}; +if (blck_modType isEqualTo "Epoch") then {_units = (nearestObjects[_pos,["I_Soldier_EPOCH"], 1000]) select {vehicle _x isEqualTo _x}}; +if !(toLower(blck_modType) isEqualTo "epoch") then {_units = (nearestObjects[_pos ,["i_g_soldier_unarmed_f"], 1000]) select {vehicle _x isEqualTo _x}}; private _nearestGroup = group(_units select 0); _nearestGroup diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf index 0a54ad4..403b95e 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf @@ -42,11 +42,11 @@ _fn_missionCleanup = { params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_endCondition",0],["_vehicles",[]],["_isScubaMission",false]]; private _param = ["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission","_endCondition","_vehicles","_isScubaMission"]; - /* + if (blck_debugLevel >=3) then { diag_log format["_fnc_endMission: param %1 = %2",_param select _forEachIndex,_x]; } forEach _this; - */ + if (_endCondition > 0) exitWith // Mision aborted for some reason { [_blck_localMissionMarker select 0] call blck_fnc_deleteMarker; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index 513d4da..c6600b5 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -16,7 +16,8 @@ private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_assetKilledMsg","_enemyLeaderConfig", "_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned","_hostageConfig", "_chanceHeliPatrol","_noPara","_chanceLoot","_heliCrew","_loadCratesTiming","_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius", - "_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_paraSkill","_marker","_vehicleCrewCount"]; + "_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_noChoppers","_chancePara","_paraSkill","_marker","_vehicleCrewCount", + "_defaultMissionLocations"]; params["_coords","_markerClass","_aiDifficultyLevel"]; @@ -74,6 +75,13 @@ if (isNil "_isScubaMission") then {_isScubaMission = false}; if (isNil "_missionLootBoxes") then {_missionLootBoxes = []}; private "_temp"; +// If the mission is to be spawned at pre-defined coordinates then select one from the array that defines them +// otherwise use the _coords that were passed to the script in _this +if !(_defaultMissionLocations isEqualTo []) then +{ + _coords = selectRandom _defaultMissionLocations; +}; + _objects = []; _mines = []; _crates = []; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf index 507e83f..a410831 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionCrates.sqf @@ -48,9 +48,9 @@ _fnc_dropMissionCrates = { }; params[ ["_coords", [0,0,0]], ["_cratesToSpawn",[]], ["_loadCrateTiming","atMissionSpawn"],["_spawnCrateTiming","atMissionSpawn"],["_missionState","start"], ["_difficulty","red"] ]; -private _params = ["_coords","_cratesToSpawn","_loadCrateTiming","_spawnCrateTiming","_missionState","_difficulty"]; /* +private _params = ["_coords","_cratesToSpawn","_loadCrateTiming","_spawnCrateTiming","_missionState","_difficulty"]; { diag_log format["_fnc_spawnMissionCrates: %1 = %2 with _foreachindex = %3",_params select _foreachindex, _this select _foreachindex, _foreachindex]; }forEach _this; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf index dd2d3c3..0f3a946 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf @@ -16,7 +16,7 @@ #ifdef blck_debugMode if (blck_debugLevel >= 2) then { - //diag_log format["_fnc_spawnPendingMissions:: count blck_pendingMissions = %1", count blck_pendingMissions]; + diag_log format["_fnc_spawnPendingMissions:: count blck_pendingMissions = %1", count blck_pendingMissions]; }; #endif @@ -24,7 +24,7 @@ if (blck_missionsRunning >= blck_maxSpawnedMissions) exitWith { #ifdef blck_debugMode if (blck_debugLevel > 2) then { - //diag_log "_fnc_spawnPendingMissions:: --- >> Maximum number of missions is running; function exited without attempting to find a new mission to spawn"; + diag_log "_fnc_spawnPendingMissions:: --- >> Maximum number of missions is running; function exited without attempting to find a new mission to spawn"; }; #endif }; @@ -44,7 +44,7 @@ _readyToSpawnQue = []; #ifdef blck_debugMode if (blck_debugLevel > 2) then { - //diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue diag_tickTime %6 _marker %1 _difficulty %2 _tMin %3 _tMax %4 _waitTime %5",_readyToSpawnQue select 1, _readyToSpawnQue select 2, _readyToSpawnQue select 3, _readyToSpawnQue select 4, _readyToSpawnQue select 5, diag_tickTime]; + diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue diag_tickTime %6 _marker %1 _difficulty %2 _tMin %3 _tMax %4 _waitTime %5",_readyToSpawnQue select 1, _readyToSpawnQue select 2, _readyToSpawnQue select 3, _readyToSpawnQue select 4, _readyToSpawnQue select 5, diag_tickTime]; }; #endif //diag_log format["_fnc_spawnPendingMissions: count _readyToSpawnQue = %1", count _readyToSpawnQue]; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf index 1555b28..e52d81c 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf @@ -14,8 +14,8 @@ params["_unit","_killer"]; private["_units"]; -if (toLower(blck_modType) == "epoch") then {_units = _unit nearEntities ["I_Soldier_EPOCH", (_unit getVariable ["alertDist",300])]}; -if (toLower(blck_modType) == "exile") then {_units = _unit nearEntities ["i_g_soldier_unarmed_f", (_unit getVariable ["alertDist",300])]}; +if (toLower(blck_modType) isEqualTo "epoch") then {_units = _unit nearEntities ["I_Soldier_EPOCH", (_unit getVariable ["alertDist",300])]}; +if !(toLower(blck_modType) isEqualTo "epoch") then {_units = _unit nearEntities ["i_g_soldier_unarmed_f", (_unit getVariable ["alertDist",300])]}; { _x reveal[_killer, (_x knowsAbout _killer) + (_unit getVariable ["intelligence",1])] }forEach _units; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf index 8d90378..ecdcf83 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf @@ -54,6 +54,16 @@ _fn_doUpdates = { [["showScore",[_respectGained,_distanceBonus,_kills]], [_player]] call blck_fnc_messageplayers; }; }; + if (toLower(blck_modType) isEqualTo "default") then + { + private _newKillerFrags = _player getVariable ["ExileKills", 0]; + _newKillerFrags = _newKillerFrags + 1; + _player setVariable ["ExileKills", _newKillerFrags,true]; + if (blck_useKillScoreMessage) then + { + [["showScore",[_respectGained,_distanceBonus,_kills]], [_player]] call blck_fnc_messageplayers; + }; + }; if (blck_useKillMessages) then { private _weapon = currentWeapon _player; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf index 8d0d7d2..8bf7da0 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnCharacter.sqf @@ -35,10 +35,6 @@ if (count _uniforms > 0) then _posn = (_coords vectorAdd _posn); _char setPos [_posn select 0, _posn select 1, 0]; -#ifdef blck_debugMode -diag_log format["_fnc_spawnchar _char = %1 at Position = %2 | _coords = %3",_char, getPos _char,_coords]; -#endif - if (blck_modType isEqualTo "Epoch") then {_char setVariable ["LAST_CHECK",28800,true]}; _char setPos (_posn); _char setDir (_dir); @@ -52,5 +48,5 @@ _char allowDamage true; _char enableSimulationGlobal true; _char setVariable["GMSAnimations",_animations,true]; _char setUnitPos "UP"; -//diag_log format["_fnc_spawncharacter: _char = %1",_char]; + _char \ No newline at end of file diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf index 4de64d8..6f9b73c 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf @@ -48,7 +48,7 @@ if (blck_modType isEqualTo "Epoch") then }; //diag_log format["_fnc_spawnUnit: for unit %1 Crypto set to %2",_unit,_unit getVariable "Crypto"]; }; -if (blck_modType isEqualTo "Exile") then +if !(blck_modType isEqualTo "Epoch") then { "i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_unit = this", blck_baseSkill, "COLONEL"]; switch(_skillLevel) do @@ -64,12 +64,7 @@ if (blck_modType isEqualTo "Exile") then private _tempPos = _pos findEmptyPosition [0.1, 3, typeOf _unit]; //diag_log format["_fnc_spawnUnit: _pos = %1 | _tempPos = %2",_pos,_tempPos]; if !(_tempPos isEqualTo []) then {_unit setPos _tempPos}; -#ifdef blck_debugMode -if (blck_debugLevel >= 2) then -{ - diag_log format["_fnc_spawnUnit::-->> unit spawned = %1",_unit]; -}; -#endif + [_unit] call blck_fnc_removeGear; if (_scuba) then { @@ -78,12 +73,7 @@ if (_scuba) then _skin = ""; _counter = 1; -#ifdef blck_debugMode -if (blck_debugLevel >= 2) then -{ - diag_log format["_fnc_spawnUnit: _uniforms = %1",_uniforms]; -}; -#endif + while {_skin isEqualTo "" && _counter < 10} do { _unit forceAddUniform (selectRandom _uniforms); diff --git a/@GMS/addons/custom_server/Compiles/blck_functions.sqf b/@GMS/addons/custom_server/Compiles/blck_functions.sqf index af205a9..3796a64 100644 --- a/@GMS/addons/custom_server/Compiles/blck_functions.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_functions.sqf @@ -213,11 +213,6 @@ private _functions = [ missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path]; } foreach _functions; -#ifdef GRGserver -if (isServer) then {blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf";}; -diag_log "blck_functions loaded using GRGserver settings ---- >>>> "; -#endif - -//onPlayerDisconnected {[_name,_owner] call blck_fnc_onPlayerDisconnected;}; + diff --git a/@GMS/addons/custom_server/Configs/blck_configs.sqf b/@GMS/addons/custom_server/Configs/blck_configs.sqf index bd1818a..0ad856d 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs.sqf @@ -227,14 +227,7 @@ // Enable / Disable Missions //////////////////// - // Maximum number of missions shown on the map at any one time. - #ifdef GRGserver - blck_maxSpawnedMissions = 15; - #else - // Change this value to reduce the number of spawned missions at any one time. - blck_maxSpawnedMissions = 4; - #endif - + //Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission - this feature is not recommended because you may run out of available groups. blck_enableOrangeMissions = 1; blck_enableGreenMissions = 2; @@ -242,12 +235,6 @@ blck_enableBlueMissions = 2; blck_numberUnderwaterDynamicMissions = 3; // Values from -1 (no UMS) to N (N Underwater missions will be spawned; static UMS units and subs will be spawned. - #ifdef GRGserver - blck_enableHunterMissions = 1; - blck_enableScoutsMissions = 1; - blck_maxcrashsites = 3; - #endif - //////////////////// // MISSION TIMERS //////////////////// @@ -259,12 +246,7 @@ blck_TMin_Red = 150; blck_TMin_UMS = 180; - #ifdef GRGserver - blck_TMin_Hunter = 120; - blck_TMin_Scouts = 115; - blck_TMin_Crashes = 115; - #endif - + //Maximum Spawn time between missions in seconds blck_TMax_Orange = 360; blck_TMax_Green = 300; @@ -272,12 +254,7 @@ blck_TMax_Red = 250; blck_TMax_UMS = 400; - #ifdef GRGserver - blck_TMax_Hunter = 200; - blck_TMax_Scouts = 200; - blck_TMax_Crashes = 200; - #endif - + /////////////////////////////// // AI VEHICLE PATROL PARAMETERS /////////////////////////////// diff --git a/@GMS/addons/custom_server/Configs/blck_defines.hpp b/@GMS/addons/custom_server/Configs/blck_defines.hpp index 5c782f8..9225c97 100644 --- a/@GMS/addons/custom_server/Configs/blck_defines.hpp +++ b/@GMS/addons/custom_server/Configs/blck_defines.hpp @@ -13,7 +13,7 @@ #define useAPEX -//#define blck_milServer +#define blck_milServer //#define blck_useCUP //#define blck_useRHS //#define blck_useLAGO diff --git a/@GMS/addons/custom_server/Missions/UMS/GMS_fnc_spawnDynamicUMSMission.sqf b/@GMS/addons/custom_server/Missions/UMS/GMS_fnc_spawnDynamicUMSMission.sqf index 61fcccf..4478060 100644 --- a/@GMS/addons/custom_server/Missions/UMS/GMS_fnc_spawnDynamicUMSMission.sqf +++ b/@GMS/addons/custom_server/Missions/UMS/GMS_fnc_spawnDynamicUMSMission.sqf @@ -16,7 +16,8 @@ #define delayTime 1 private ["_abort","_crates","_aiGroup","_objects","_mines","_blck_AllMissionAI","_blck_localMissionMarker", "_AI_Vehicles","_timeOut","_aiDifficultyLevel","_missionPatrolVehicles","_missionGroups","_loadCratesTiming","_spawnCratesTiming","_assetSpawned", - "_blck_AllMissionAI","_delayTime","_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_marker","_vehicleCrewCount"]; + "_blck_AllMissionAI","_delayTime","_wait","_missionStartTime","_playerInRange","_missionTimedOut","_temp","_patrolVehicles","_vehToSpawn","_marker","_vehicleCrewCount", + "_defaultMissionLocations"]; params["_coords","_mission",["_allowReinforcements",false]]; @@ -25,33 +26,52 @@ _aiDifficultyLevel = _difficulty; // _difficulty is defined in the mission desc diag_log format["[blckeagls Dynamic UMS] dynamicUMSspawner (34):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; -if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; -if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; -//if (isNil "_timeOut") then {_timeOut = -1;}; -if (isNil "_missionGroups") then {_missionGroups = []}; -if (isNil "_endCondition") then {_endCondition = blck_missionEndCondition}; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"}; -if (isNil "_spawnCratesTiming") then {_spawnCratesTiming = blck_spawnCratesTiming}; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir". -if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn"; -if (isNil "_useMines") then {_useMines = blck_useMines;}; -if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; -if (isNil "_sideArms") then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; -if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; -if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; -if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; -if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; - -if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol}; -if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols}; -if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops}; -if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis}; -if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops}; - -if (isNil "_chanceLoot") then {_chanceLoot = 0}; -if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;}; -if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Blue}; -if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed}; +if (isNil "_assetKilledMsg") then {_assetKilledMsg = ""}; +if (isNil "_markerColor") then {_markerColor = "ColorBlack"}; +if (isNil "_markerType") then {_markerType = ["mil_box",[]]}; +if (isNil "_markerSize") then {_markerSize = []}; +if (isNil "_endCondition") then {_endCondition = blck_missionEndCondition}; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"}; +if (isNil "_spawnCratesTiming") then {_spawnCratesTiming = blck_spawnCratesTiming}; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir". +if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn"; +if (isNil "_missionPatrolVehicles") then {_missionPatrolVehicles = []}; +if (isNil "_missionGroups") then {_missionGroups = []}; +if (isNil "_hostageConfig") then {_hostageConfig = []}; +if (isNil "_enemyLeaderConfig") then {_enemyLeaderConfig = []}; +if (isNil "_useMines") then {_useMines = blck_useMines;}; +if (isNil "_weaponList") then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; +if (isNil "_sideArms") then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; +if (isNil "_uniforms") then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; +if (isNil "_headGear") then {_headGear = [_aiDifficultyLevel] call blck_fnc_selectAIHeadgear}; +if (isNil "_vests") then {_vests = [_aiDifficultyLevel] call blck_fnc_selectAIVests}; +if (isNil "_backpacks") then {_backpacks = [_aiDifficultyLevel] call blck_fnc_selectAIBackpacks}; +if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = [_aiDifficultyLevel] call blck_fnc_selectChanceHeliPatrol}; +if (isNil "_noChoppers") then {_noChoppers = [_aiDifficultyLevel] call blck_fnc_selectNumberAirPatrols}; +if (isNil "_chancePara") then {_chancePara = [_aiDifficultyLevel] call blck_fnc_selectChanceParatroops}; +if (isNil "_missionHelis") then {_missionHelis = [_aiDifficultyLevel] call blck_fnc_selectMissionHelis}; +if (isNil "_noPara") then {_noPara = [_aiDifficultyLevel] call blck_fnc_selectNumberParatroops}; +if (isNil "_paraSkill") then {_paraSkill = _aiDifficultyLevel}; +if (isNil "_chanceLoot") then {_chanceLoot = 1.0}; //0.5}; +if (isNil "_paraTriggerDistance") then {_paraTriggerDistance = 400;}; +if (isNil "_paraLoot") then {_paraLoot = blck_BoxLoot_Green}; // Add diffiiculty based settings +if (isNil "_paraLootCounts") then {_paraLootCounts = blck_lootCountsRed}; // Add difficulty based settings +if (isNil "_missionLootVehicles") then {_missionLootVehicles = []}; +if (isNil "_garrisonedBuilding_ATLsystem") then {_garrisonedBuilding_ATLsystem = []}; +if (isNil "_garrisonedBuildings_BuildingPosnSystem") then {_garrisonedBuildings_BuildingPosnSystem = []}; if (isNil "_vehicleCrewCount") then {_vehicleCrewCount = [_aiDifficultyLevel] call GMS_fnc_selectVehicleCrewCount}; +if (isNil "_defaultMissionLocations") then {_defaultMissionLocations = []}; +if (isNil "_submarinePatrolParameters") then {_submarinePatrolParameters = []}; +if (isNil "_airpatrols") then {_airpatrols = []}; +if (isNil "_scubagroupparameters") then {_scubagroupparameters = []}; +if (isNil "_markerMissionName") then { + diag_log format["_fnc_missionSpawner: _markerMissionName not defined, using default value"]; + _markerMissionName = "Default Mission Name"; +}; +if (isNil "_noLootCrates") then {_noLootCrates = 1}; +if (isNil "_lootCrates") then {_lootCrates = blck_crateTypes}; +if (isNil "_lootCratePositions") then {_lootCratePositions = []}; +if (isNil "_isScubaMission") then {_isScubaMission = false}; +if (isNil "_missionLootBoxes") then {_missionLootBoxes = []}; _objects = []; _mines = []; @@ -231,6 +251,8 @@ if (blck_useStatic && ((_noEmplacedToSpawn > 0)) || count _missionEmplacedWeapon }; uiSleep _delayTime; +if (isNil "blck_UMS_crates") then {blck_UMS_crates = blck_crateTypes}; +if (blck_UMS_crates isEqualTo []) then {blck_UMS_crates = blck_crateTypes}; if (_spawnCratesTiming isEqualTo "atMissionSpawnGround") then { if (count _missionLootBoxes > 0) then @@ -393,4 +415,4 @@ if (blck_showCountAliveAI) then _result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,0,_missionAIVehicles,isScubaMission] call blck_fnc_endMission; blck_missionsRun = blck_missionsRun + 1; -diag_log format["[blckeagls] dynamicUMSspawner:: Total Dyanamic Land and UMS Run = %1", blck_missionsRun]; \ No newline at end of file +diag_log format["[blckeagls] dynamicUMSspawner:: Total Dyanamic Land and UMS Run = %1", blck_missionsRun]; diff --git a/@GMS/addons/custom_server/SLS/SLS_defines_epoch.sqf b/@GMS/addons/custom_server/SLS/SLS_defines_epoch.sqf index df18bee..0932937 100644 --- a/@GMS/addons/custom_server/SLS/SLS_defines_epoch.sqf +++ b/@GMS/addons/custom_server/SLS/SLS_defines_epoch.sqf @@ -16,22 +16,6 @@ //diag_log "Loading Static Loot Container Spawning System for Epoch"; _lootBoxes = [ - #ifdef GRG_TestServer - ["altis","APTrader",10, - [ - [[14658.1, 16790.9, 18.3795],0,false,false], - [[14660, 16788.5, 18.3795],0,false,false], - [[17518.4,13260.7,12.7337],0,false,false], - [[17528.1,13270.2,12.725],0,false,false], - [[17537.4,13278.2,12.706],0,false,false], - [[17547.9,13286,12.6121],0,false,false], - [[17599.5,13240.5,13.327],0,false,false], - [[17593.1,13231.9,13.4375],0,false,false], - [[17586.5,13224.6,13.5832],0,false,false], - [[17580.5,13217.8,13.6708],0,false,false] - ] - ], - #endif // Ferres /* diff --git a/@GMS/addons/custom_server/SLS/SLS_init.sqf b/@GMS/addons/custom_server/SLS/SLS_init.sqf index 8907920..03a4f23 100644 --- a/@GMS/addons/custom_server/SLS/SLS_init.sqf +++ b/@GMS/addons/custom_server/SLS/SLS_init.sqf @@ -10,9 +10,7 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -#ifdef blck_debugMode -//diag_log "[blckeagls] SLS System: Initializing Static Loot Crate System!"; -#endif + #include "\q\addons\custom_server\Configs\blck_defines.hpp"; if ((tolower blck_modType) isEqualto "epoch") then diff --git a/@GMS/addons/custom_server/init/GMS_fnc_findWorld.sqf b/@GMS/addons/custom_server/init/GMS_fnc_findWorld.sqf index 5ffb46b..f865ba5 100644 --- a/@GMS/addons/custom_server/init/GMS_fnc_findWorld.sqf +++ b/@GMS/addons/custom_server/init/GMS_fnc_findWorld.sqf @@ -34,8 +34,8 @@ switch (toLower worldName) do blck_mapRange = 6000; }; case "livonia":{ - blck_mapCenter = [6500,6500,0]; - blck_mapRange = 6100; + blck_mapCenter = [6500,5500,0]; + blck_mapRange = 6000; }; case "chernarus":{ diag_log "[blckeagls] Chernarus-specific settings loaded"; diff --git a/@GMS/addons/custom_server/init/blck_init_server.sqf b/@GMS/addons/custom_server/init/blck_init_server.sqf index 6820aed..15dae0a 100644 --- a/@GMS/addons/custom_server/init/blck_init_server.sqf +++ b/@GMS/addons/custom_server/init/blck_init_server.sqf @@ -23,7 +23,7 @@ if !(isNil "blck_Initialized") exitWith{}; blck_Initialized = true; // find and set Mod -blck_modType = if (!isNull (configFile >> "CfgPatches" >> "exile_server")) then {"Exile"} else {if (!isnull (configFile >> "CfgPatches" >> "a3_epoch_server")) then {"Epoch"} else {""}}; +blck_modType = if (!isNull (configFile >> "CfgPatches" >> "exile_server")) then {"Exile"} else {if (!isnull (configFile >> "CfgPatches" >> "a3_epoch_server")) then {"Epoch"} else {"default"}}; publicVariable "blck_modType"; // This block waits for the mod to start but is disabled for now @@ -182,6 +182,33 @@ if (blck_enableBlueMissions > 0) then [_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue,blck_enableBlueMissions] call blck_fnc_addMissionToQue; }; +#ifdef GRGserver +diag_log "[blckeagls] Running GhostriderGaming Version"; +//diag_log format["[blckeagls] _init_server: blck_enableScoutsMissions = %1",blck_enableScoutsMissions]; +if (blck_enableScoutsMissions > 0) then +{ + //[_missionListScouts,_pathScouts,"ScoutsMarker","red",blck_TMin_Scouts,blck_TMax_Scouts] spawn blck_fnc_missionTimer; + [_missionListScouts,_pathScouts,"ScoutsMarker","red",blck_TMin_Scouts,blck_TMax_Scouts,blck_enableScoutsMissions,false] call blck_fnc_addMissionToQue; +}; + +//diag_log format["[blckeagls] _init_server: blck_enableHunterMissions = %1",blck_enableHunterMissions]; +if (blck_enableHunterMissions > 0) then +{ + //[_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter] spawn blck_fnc_missionTimer; + // params["_missionList","_path","_marker","_difficulty","_tMin","_tMax","_noMissions"]; + [_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter,blck_enableHunterMissions,false] call blck_fnc_addMissionToQue; +}; + +// Running new version of Crash sites. +//diag_log format["[blckeagls] _init_server: blck_maxCrashSites = %1",blck_maxCrashSites]; +if (blck_maxCrashSites > 0) then +{ + [] execVM "\q\addons\custom_server\Missions\HeliCrashs\Crashes2.sqf"; +}; +//diag_log "loading DLS System"; +call compile preprocessfilelinenumbers "\q\addons\custom_server\DLS\DLS_init.sqf"; +#endif + // Setup a group for AI corpses blck_graveyardGroup = createGroup [blck_AI_Side,false]; blck_graveyardGroup setGroupId ["blck_graveyard"]; @@ -192,3 +219,14 @@ blck_graveyardGroup setVariable ["blck_group",1]; blck_pvs_version = blck_versionNumber; publicVariable "blck_pvs_version"; diag_log format["[blckeagls] version %1 Build %2 Loaded in %3 seconds",blck_versionNumber,blck_buildNumber,diag_tickTime - _blck_loadingStartTime]; //,blck_modType]; + +if (blck_debugOn || (blck_debugLevel >= 1)) then +{ + private _pos = [] call blck_fnc_findSafePosn; + private _root = ""; + private _path = "Orange"; + private _mission = "bunkerMission"; + private _compiledMission = compilefinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\%1\%2.sqf",_path,_mission]; + diag_log format["[blckeagls] mission test sequence run for mission path %1 name %2",_path,_mission]; + [_pos,"testMarkerGRG","blue"] call _compiledMission; +}; \ No newline at end of file diff --git a/@GMS/addons/custom_server/init/build.sqf b/@GMS/addons/custom_server/init/build.sqf index 92b0715..5c0aea6 100644 --- a/@GMS/addons/custom_server/init/build.sqf +++ b/@GMS/addons/custom_server/init/build.sqf @@ -1,4 +1,4 @@ -#define blck_buildNumber 198 +#define blck_buildNumber 200 #define blck_versionNumber 6.96 -#define blck_buildDate "2-29-20" +#define blck_buildDate "3-17-20"