Merge pull request #10 from Ghostrider-DbD-/v6.44

V 6.44 Build 15
This commit is contained in:
Ghostrider-DbD- 2016-11-18 06:04:33 -05:00 committed by GitHub
commit de7b297ddc
10 changed files with 16 additions and 336 deletions

View File

@ -4,7 +4,7 @@
By Ghostrider-DbD-
11/16/16
*/
if (blck_debugON) then
if (_fnc_cleanEmptyGroups) then
{
diag_log format ["_fnc_cleanEmptyGroups:: -- >> group count = %1 ",(count allGroups)];
};

View File

@ -89,6 +89,7 @@ while {_findNew} do {
_pole = "";
if (_mod isEqualTo "Epoch") then {_pole = "PlotPole_EPOCH"};
if (_mod isEqualTo "Exile") then {_pole = "Exile_Construction_Flag_Static"};
//diag_log format["_fnc_findSafePosn:: -- >> _mod = %1 and _pole = %2",_mod,_pole];
{
if ((_x distance _coords) < 600) then
{

View File

@ -1,120 +0,0 @@
// self explanatory. Checks to see if the position is in either a black listed location or near a player spawn.
// As written this relies on BIS_fnc_findSafePos to ensure that the spawn point is not on water or an excessively steep slope.
//
/*
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last Modified 11-16-16
*/
private["_findNew","_coords","_blackListCenter","_blackListRadius","_dist","_xpos","_ypos","_newPos","_townPos"];
_findNew = true;
while {_findNew} do {
_findNew = false;
//[_centerForSearch,_minDistFromCenter,_maxDistanceFromCenter,_minDistanceFromNearestObj,_waterMode,_maxTerainGradient,_shoreMode] call BIS_fnc_findSafePos
// https://community.bistudio.com/wiki/BIS_fnc_findSafePos
_coords = [blck_mapCenter,0,blck_mapRange,30,0,5,0] call BIS_fnc_findSafePos;
//diag_log format["<<--->> _coords = %1",_coords];
{
if ((_x distance _coords) < blck_MinDistanceFromMission) then {
_FindNew = true;
};
}forEach DBD_HeliCrashSites;
{
if ( ((_x select 0) distance _coords) < (_x select 1)) exitWith
{
_FindNew = true;
};
} forEach blck_locationBlackList;
//diag_log format["#- findSafePosn -# blck_ActiveMissionCoords isEqualTo %1", blck_ActiveMissionCoords];
{
//diag_log format["#- findSafePosn -# blck_ActiveMissionCoords active mission item is %1", _x];
if ( (_x distance _coords) < blck_MinDistanceFromMission) exitWith
{
_FindNew = true;
};
} forEach blck_ActiveMissionCoords;
//diag_log format["#- findSafePosn -# blck_recentMissionCoords isEqualTo %1", blck_recentMissionCoords];
{
private["_oldPos","_ignore"];
_ignore = false;
//diag_log format["-# findSafePosn.sqf -# Old Mission element is %1", _x];
if (diag_tickTime > ((_x select 1) + 1200)) then // if the prior mission was completed more than 20 min ago then delete it from the list and ignore the check for this location.
{
_ignore = true;
blck_recentMissionCoords= blck_recentMissionCoords - _x;
//diag_log format["-# findSafePosn.sqf -# Removing Old Mission element: %1", _x];
};
if !(_ignore) then
{
//diag_log format["-# findSafePosn.sqf -# testing _coords against Old Mission coords is %1", _x select 0];
if ( ((_x select 0) distance _coords) < blck_MinDistanceFromMission) then
{
_FindNew = true;
//diag_log format["-# findSafePosn.sqf -# Too Close to Old Mission element: %1", _x];
};
};
} forEach blck_recentMissionCoords;
// test for water nearby
private ["_i"];
_dist = 100;
for [{_i=0}, {_i<360}, {_i=_i+20}] do
{
_xpos = (_coords select 0) + sin (_i) * _dist;
_ypos = (_coords select 1) + cos (_i) * _dist;
_newPos = [_xpos,_ypos,0];
if (surfaceIsWater _newPos) then
{
_FindNew = true;
_i = 361;
};
};
// check that missions spawn at least 1 kkm from towns
{
_townPos = [((locationPosition _x) select 0), ((locationPosition _x) select 1), 0];
if (_townPos distance _coords < 200) exitWith {
_FindNew = true;
};
} forEach blck_townLocations;
// check for nearby plot pole/freq jammer within 800 meters
if (call blck_getModType isEqualTo "Epoch") then {_pole = "PlotPole_EPOCH"};
if (call blck_getModType isEqualTo "Exile") then {_pole = "Exile_Construction_Flag_Static"};
{
if ((_x distance _coords) < 600) then
{
_FindNew = true;
};
}forEach nearestObjects[player, [_pole], 800];
// check to be sure we do not spawn a mission on top of a player.
{
if (isPlayer _x && (_x distance _coords) < 600) then
{
_FindNew = true;
};
}forEach playableUnits;
if (toLower(worldName) isEqualTo "taviana") then
{
_tavTest = createVehicle ["SmokeShell",_coords,[], 0, "CAN_COLLIDE"];
_tavHeight = (getPosASL _tavTest) select 2;
deleteVehicle _tavTest;
if (_tavHeight > 100) then {_FindNew = true;};
};
};
if ((count _coords) > 2) then
{
private["_temp"];
_temp = [_coords select 0, _coords select 1];
_coords = _temp;
};
_coords;

View File

@ -1,85 +0,0 @@
/*
Determine the map name, set the map center and size, and return the map name.
Trader coordinates were pulled from the config.cfg
Inspired by the Vampire and DZMS
Last Modified 9/3/16
*/
private["_blck_WorldName"];
_blck_WorldName = toLower format ["%1", worldName];
_blck_worldSize = worldSize;
private["_modType"];
_modType = [] call blck_getModType;
diag_log format["[blckeagls] Loading Map-specific settings with worldName = %1 and modType = %2",_blck_WorldName,_modType];
if (_modType isEqualTo "Epoch") then
{
switch (_blck_WorldName) do {// These may need some adjustment - including a test for shore or water should help as well to avoid missions spawning on water.
case "altis":{
diag_log "[blckeagls] Altis-specific settings for Epoch loaded";
blck_mapCenter = [6322,7801,0];
blck_mapRange = 21000;
};
case "stratis":{
diag_log "[blckeagls] Stratis-specific settings loaded";
blck_mapCenter = [6322,7801,0];
blck_mapRange = 4500;
}; // Add Central, East and West respawns/traders
case "chernarus":{
diag_log "[blckeagls] Chernarus-specific settings loaded";
blck_mapCenter = [7100, 7750, 0]; //centerPosition = {7100, 7750, 300};
blck_mapRange = 5300;
};
case "chernarus_summer":{blck_mapCenter = [7100, 7750, 0]; blck_mapRange = 6000;};
case "bornholm":{
//diag_log "Bornholm-specific settings loaded";
blck_mapCenter = [11240, 11292, 0];
blck_mapRange = 14400;
};
case "esseker":{
diag_log "Esseker-specific settings loaded";
blck_mapCenter = [6144, 6144, 0]; //centerPosition = {7100, 7750, 300};
blck_mapRange = 5300;
};
case "taviana":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14400;};
case "namalsk":{blck_mapCenter = [4352, 7348, 0];blck_mapRange = 10000;};
case "napf": {blck_mapCenter = [10240,10240,0]; blck_mapRange = 14000}; // {_centerPos = [10240, 10240, 0];_isMountainous = true;_maxHeight = 50;};
case "australia": {blck_mapCenter = [20480,20480, 150];blck_mapRange = 40960;};
case "panthera2":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;};
case "isladuala":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;};
case "sauerland":{blck_mapCenter = [12800, 12800, 0];blck_mapRange = 12800;};
case "trinity":{blck_mapCenter = [6400, 6400, 0];blck_mapRange = 6400;};
case "utes":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;};
case "zargabad":{blck_mapCenter = [4096, 4096, 0];blck_mapRange = 4096;};
case "fallujah":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;};
case "tavi":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14090;};
case "lingor":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;};
case "takistan":{blck_mapCenter = [5500, 6500, 0];blck_mapRange = 5000;};
default {_blck_WorldName = "default";blck_mapCenter = [6322,7801,0]; blck_mapRange = 12000};
};
};
if (_modType isEqualTo "Exile") then
{
switch (_blck_WorldName) do {
// These may need some adjustment - including a test for shore or water should help as well to avoid missions spawning on water.
case "altis":{diag_log "Altis-specific settings loaded";blck_mapCenter = [6322,7801,0];blck_mapRange = 21000;};
case "taviana":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14400;};
case "namalsk":{blck_mapCenter = [4352, 7348, 0];blck_mapRange = 10000;};
case "napf": {blck_mapCenter = [10240,10240,0]; blck_mapRange = 14000}; // {_centerPos = [10240, 10240, 0];_isMountainous = true;_maxHeight = 50;};
case "tanoa": {blck_mapCenter = [ (_blck_worldSize/2),(_blck_worldSize/2),0];blck_mapRange = _blck_worldSize;};
case "panthera2":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;};
case "isladuala":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;};
case "sauerland":{blck_mapCenter = [12800, 12800, 0];blck_mapRange = 12800;};
case "trinity":{blck_mapCenter = [6400, 6400, 0];blck_mapRange = 6400;};
case "utes":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;};
case "zargabad":{blck_mapCenter = [4096, 4096, 0];blck_mapRange = 4096;};
case "fallujah":{blck_mapCenter = [3500, 3500, 0];blck_mapRange = 3500;};
case "tavi":{blck_mapCenter = [10370, 11510, 0];blck_mapRange = 14090;};
case "lingor":{blck_mapCenter = [4400, 4400, 0];blck_mapRange = 4400;};
case "takistan":{blck_mapCenter = [5500, 6500, 0];blck_mapRange = 5000;};
default {_blck_WorldName = "default";blck_mapCenter = [6322,7801,0]; blck_mapRange = 12000;};
};
};
blck_worldSet = true;

View File

@ -9,7 +9,7 @@
private["_numbertospawn","_i","_groupSpawned","_safepos","_x","_weaponList","_useLauncher","_launcherType","_aiSkills"];
params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ];
if (blck_debugON) then
if (blck_debugLevel isEqualTo 3) then
{
diag_log format["[blckeagls] _fnc_spawnGroup called parameters: _numai1 %1, _numbai2 %2, _skillLevel %3, _center %4",_numai1,_numai2,_skillLevel,_center];
};
@ -19,7 +19,7 @@ if (_numai2 > _numai1) then {
} else {
_numbertospawn = _numai2;
};
if (blck_debugON) then
if (blck_debugLevel isEqualTo 3) then
{
diag_log format["spawnGroup.sqf: _numbertospawn = %1",_numbertospawn];
};

View File

@ -39,5 +39,5 @@ _newObjs = [];
clearBackpackCargoGlobal _obj;
};
} forEach _objects;
diag_log format["_fnc_spawnBaseObjects _newObjs = %1",_newObjs];
//diag_log format["_fnc_spawnBaseObjects _newObjs = %1",_newObjs];
_newObjs

View File

@ -38,12 +38,12 @@ while {true} do
_v setHitPointDamage [_x, 1];
//diag_log format["vehicleMonitor: hitpart %1 for vehicle %1 set to 1",_x,_v];
} forEach ["HitLFWheel","HitLF2Wheel","HitRFWheel","HitRF2Wheel","HitEngine","HitLBWheel","HitLMWheel","HitRBWheel","HitRMWheel","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun"];
if (blck_debugOn) then
if (blck_debugLevel isEqualTo 3) then
{
diag_log format["_fnc_vehicleMonitor:: damage applied to a patrol vehicle -- >> current damage for vehicle %1 is = %2",_v, (getAllHitPointsDamage _v)];
};
uiSleep 60;
if (blck_debugOn) then {
if (blck_debugLevel isEqualTo 3) then {
diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle:deleting vehicle _veh",_v];
};
deleteVehicle _v;

View File

@ -51,8 +51,12 @@ blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\c
blck_fnc_spawnEmplacedWeapon = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnEmplaced.sqf"; // Self-evident
blck_fnc_spawnVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf"; // Spawn a temporary vehicle of a specified type at a specific position
blck_fnc_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehiclePatrol.sqf"; // Spawn an AI vehicle control and have it patrol the mission perimeter
//blck_fnc_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf"; // Process events wherein all AI in a vehicle are killed
// Revisit
// *************
//blck_fnc_spawnMissionVehicles = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionVehicles.sqf"; // Spawn non-AI vehicles at missions; these will be filled with loot following the parameters in the composition array for the mission
// *************
blck_fnc_Reinforcements = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_reinforcements.sqf";
blck_spawnHeliParaTroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_heliSpawnParatroops.sqf";
blck_spawnHeliParaCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_heliSpawnCrate.sqf";

View File

@ -1,120 +0,0 @@
/*
AI Mission for Epoch Mod for Arma 3
By Ghostrider
Functions and global variables used by the mission system.
Last modified 11/14/16
*/
blck_functionsCompiled = false;
// General functions
blck_fnc_waitTimer = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_waitTimer.sqf";
blck_fnc_FindSafePosn = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_findSafePosn.sqf";
blck_fnc_randomPosition = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_randomPosn.sqf";// find a randomPosn. see script for details.
blck_fnc_findPositionsAlongARadius = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_findPositionsAlongARadius.sqf";
blck_fnc_giveTakeCrypto = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_giveTakeCrypto.sqf";
blck_fnc_monitorHC = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_monitorHC.sqf";
blck_fnc_timeAcceleration = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\TimeAccel\GMS_fnc_Time.sqf";
blck_getModType = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_getModType.sqf"; // Test if Epoch or Exile is loaded
// Player-related functions
blck_fnc_rewardKiller = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_rewardKiller.sqf";
blck_fnc_MessagePlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_AIM.sqf"; // Send messages to players regarding Missions
// Mission-related functions
blck_fnc_missionTimer = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionTimer.sqf";
//blck_fnc_addMissionToQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addMissionToQue.sqf"; //
//blck_fnc_updateMissionQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_updateMissionQue.sqf"; //
blck_fnc_addLiveAItoQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addLiveAItoQue.sqf";
blck_fnc_addObjToQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addObjToQue.sqf"; //
blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_playerInRange.sqf";
blck_fnc_spawnCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnCrate.sqf"; // Simply spawns a crate of a specified type at a specific position.
blck_fnc_spawnMissionCrates = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionCrates.sqf"; // Spawn loot crates at specific positions relative to the mission center; these will be filled with loot following the parameters in the composition array for the mission
blck_fnc_cleanupObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_cleanUpObjects.sqf";
blck_fnc_spawnCompositionObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnBaseObjects.sqf";
blck_fnc_spawnRandomLandscape = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnRandomLandscape.sqf";
blck_fnc_addItemToCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addItemToCrate.sqf";
blck_fnc_loadLootItemsFromArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc__loadLootItemsFromArray.sqf";
blck_fnc_fillBoxes = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_fillBoxes.sqf"; // Adds items to an object according to passed parameters. See the script for details.
blck_fnc_smokeAtCrates = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_smokeAtCrates.sqf"; // Spawns a wreck and adds smoke to it
blck_fnc_spawnMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMines.sqf"; // Deploys mines at random locations around the mission center
blck_fnc_clearMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"; // clears mines in an array passed as a parameter
blck_fnc_signalEnd = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_signalEnd.sqf"; // deploy smoke grenades at loot crates at the end of the mission.
// Group-related functions
blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units]
blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setWaypoints.sqf"; // Set default waypoints for a group
blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"; // GMS_fnc_cleanEmptyGroups
// Functions specific to vehicles, whether wheeled or static
blck_fnc_spawnEmplacedWeapon = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnEmplaced.sqf"; // Self-evident
blck_fnc_spawnVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf"; // Spawn a temporary vehicle of a specified type at a specific position
blck_fnc_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehiclePatrol.sqf"; // Spawn an AI vehicle control and have it patrol the mission perimeter
//blck_fnc_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf"; // Process events wherein all AI in a vehicle are killed
//blck_fnc_spawnMissionVehicles = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionVehicles.sqf"; // Spawn non-AI vehicles at missions; these will be filled with loot following the parameters in the composition array for the mission
blck_fnc_Reinforcements = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_reinforcements.sqf";
blck_spawnHeliParaTroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_heliSpawnParatroops.sqf";
blck_spawnHeliParaCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_heliSpawnCrate.sqf";
blck_spawnHeliPatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Reinforcements\GMS_fnc_heliSpawnPatrol.sqf";
blck_fnc_protectVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_protectVehicle.sqf";
blck_fnc_configureMissionVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_configureMissionVehicle.sqf";
// functions to support Units
blck_fnc_removeGear = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"; // Strip an AI unit of all gear.
blck_fnc_spawnAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnUnit.sqf"; // spawn individual AI
blck_EH_AIKilled = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIKilled.sqf"; // Event handler to process AI deaths
//blck_EH_AIHandleDamage = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIHandleDamage.sqf"; // GRMS_EH_AIHandleDamage
blck_fnc_processAIKill = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIKill.sqf";
blck_fnc_removeLaunchers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeLaunchers.sqf";
blck_fnc_removeNVG = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeNVG.sqf";
blck_fnc_alertNearbyUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_alertNearbyUnits.sqf";
blck_fnc_processIlleagalAIKills = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_processIlleagalAIKills.sqf";
GMS_fnc_cleanupDeadAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupDeadAI.sqf"; // handles deletion of AI bodies and gear when it is time.
blck_fnc_setSkill = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_setSkill.sqf";
blck_fnc_cleanupAliveAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_cleanupAliveAI.sqf";
// Event handlers
"blck_PVS_aiKilled" addPublicVariableEventHandler {
diag_log format["blck_PVS_aiKilled handler:: unit = %1 and killer = %2 and this = #3",_this select 1 select 0,_this select 1 select 1, _this];
[_this select 1 select 0,_this select 1 select 1] call blck_fnc_processAIKill;
};
"blck_PVS_aiVehicleEmpty" addPublicVariableEventHandler {
private ["_veh"];
_veh = _this select 1;
//diag_log format["blck_PVS_aiVehicleEmpty:: _this = %1 and _veh = %2",_this,0];
if (typeOf _veh in blck_staticWeapons) then // always destroy mounted weapons
{
//diag_log format["vehicleMonitor.sqf: _veh %1 is (in blck_staticWeapons) = true",_veh];
_veh removealleventhandlers "GetIn";
_veh removealleventhandlers "GetOut";
_veh setDamage 1;
} else {
//diag_log format["vehicleMonitor.sqf: _veh %1 is (in blck_staticWeapons) = false",_veh];
if (blck_killEmptyAIVehicles) then
{
//diag_log format["vehicleMonitor.sqf: _veh %1 is about to be killed",_veh];
_veh removealleventhandlers "GetIn";
_veh removealleventhandlers "GetOut";
_veh setVehicleLock "UNLOCKED" ;
uiSleep 1;
_veh setDamage 1.1;
uiSleep 15;
deleteVehicle _veh;
}
else
{
//diag_log format["vehicleMonitor.sqf: make vehicle available to players; stripping eventHandlers from_veh %1",_veh];
_veh removealleventhandlers "GetIn";
_veh removealleventhandlers "GetOut";
_veh setVehicleLock "UNLOCKED" ;
};
};
};
diag_log "[blckeagls] Functions Loaded";
blck_functionsCompiled = true;

View File

@ -4,18 +4,18 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
Contributions by Narines: bug fixes, testing, 'fired' event handler
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
11/14/16 Version 6.44 Build 13
11/16/16 Version 6.44 Build 15
Added parameters
blck_blacklistTraderCities=true; // the locations of the Epoch/Exile trader cities will be pulled from the config and added to the location blacklist for the mission system.
blcklistConcreteMixerZones = true; // Locations of the concrete mixers will be pulled from the configs; no missions will be spawned within 1000 m of these locations.
blck_blacklistSpawns = true; // Locations of Exile spawns will be pulled from the config. No missions will spawn within 1000 m of these locations.
Added: the main thread now runs a function that checks for empty groups.
Fixed: The mission system would hang on epoch after a while because createGroup returned nullGroup. this appeared to occur because the maximum number of active groups had been reached. Deleting empty groups periodically solved the issue on a test machine.
Teaked: code to check whether a possible mission spawn location is near a flag or plot pole. Still needs work.
Added: Completed adding EDEN weapons, optics, bipods, optics to AI configurations and mission loot crates.
Added APEX headgear and uniforms. (Note, you would need to add any of these you wished for players to sell to Epoch\<Map Name>\epoch_config\CfgPricing.hpp on Epoch)
Changed: Definitions of blacklist locations such as spawns moved from GMS_findWorld.sqf to the blck_configs_(epoch|exile).
Changed: Divided rifles and optics into subcategories to better enable assigning weapons to AI difficulties in a sort of class-based way, e.g., 556, 6.5, or LMG are separate classes.
Changed: DLS crate loader (not publically available yet) now uses blck_fnc_loadLootItemsFromArray rather than the prior approach for which specific crate loading functions were called depending on the loadout type (weapons, building supplies, foord etc).
Fixed: You can now loot AI bodies in Epoch.