Merge pull request #6 from Ghostrider-DbD-/v6.42

V6 42
This commit is contained in:
Ghostrider-DbD- 2016-11-11 16:15:46 -05:00 committed by GitHub
commit 92227f1a88
25 changed files with 901 additions and 507 deletions

View File

@ -19,12 +19,15 @@ while {true} do
};
}forEach blck_liveMissionAI;
{
//diag_log format["mainThread::-->> missionObjects _x = %1",_x];
if (diag_tickTime > (_x select 1) ) then {
//diag_log format["_fnc_mainTread:: cleaning up mission objects %1",_x];
[_x select 0] call blck_fnc_cleanupObjects;
};
}forEach blck_oldMissionObjects;
[] call GMS_fnc_cleanupDeadAI;
//[] call blck_fnc_timeAcceleration;
//if (blck_useHC) then {[] call blck_fnc_monitorHC;};
/*
{
if (_x select 6 > 0) then // The mission is not running, check the time left till it is spawned

View File

@ -0,0 +1,23 @@
/*
Check if an HC is connected and if so transfer some AI to it.
By Ghostrider-DbD-
Last modified 11-8-16
*/
private _hc = missionNamespace getVariable["HC1","null"];
diag_log format["monitorHC::->> _hc = %1",_hc];
if !( (typeName _hc isEqualTo "OBJECT" || _hc isEqualTo "null") ) exitWith {};
if (typeOf _hc isEqualTo "HeadlessClient_F") then // a valid headless client is connected
{
private _hcOwner = owner _hc;
private _xfered = 0;
{
if (!(isPlayer _x) && (groupOwner _x != _hcOwner) ) then {
_x setGroupOwner (_hcOwner);
_xfered = +1;
diag_log format["monitorHC::-->> group %1 transfered to HC1",_x];
};
if (_xfered isEqualTo 6) exitWith {};
}forEach allGroups;
};

View File

@ -3,7 +3,7 @@
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last Modified 9-4-16
Last Modified 11-11-16
Fill a crate with items
*/
@ -27,8 +27,21 @@
// Add some randomly selected weapons and corresponding magazines
for "_i" from 1 to _wepCnt do {
_item = selectRandom _a1;
_crate addWeaponCargoGlobal [_item select 0,1];
_crate addMagazineCargoGlobal [_item select 1, 1 + round(random(3))];
if (typeName _item isEqualTo "ARRAY") then // Check whether weapon name is part of an array that might also specify an ammo to use
{
_crate addWeaponCargoGlobal [_item select 0,1]; // if yes then assume the first element in the array is the weapon name
if (count _item >1) then { // if the array has more than one element assume the second is the ammo to use.
_crate addMagazineCargoGlobal [_item select 1, 1 + round(random(3))];
} else { // if the array has only one element then lets load random ammo for it
_crate addMagazineCargoGlobal [selectRandom (getArray (configFile >> "CfgWeapons" >> (_item select 0) >> "magazines")), 1 + round(random(3))];
};
} else {
if (_item isKindOf ["Rifle", configFile >> "CfgWeapons"]) then
{
_crate addWeaponCargoGlobal [_item, 1];
_crate addMagazineCargoGlobal [selectRandom (getArray (configFile >> "CfgWeapons" >> _item >> "magazines")), 1 + round(random(3))];
};
};
};
};
if (_magCnt > 0) then

View File

@ -0,0 +1,443 @@
/*
Generic Mission Spawner
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
*/
private ["_crates","_aiGroup","_objects","_vehicles","_groupPatrolRadius","_missionLandscape","_compositions","_missionCfg","_compSel","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles"];
params["_coords","_missionType","_aiDifficultyLevel"];
/*
_aiDifficultyLevel = _this select 2; // "blue","red","green" and "orange"
*/
// *************************
// Once the entire mission system can support timeout cleanup of vehicles (specifically the AI vehicle patrols) then each mission layout can define this varialbe. Until then disable timouts.
//////////////////////////////////
// To simplify debugging and also reduce load on server besure only once instance of the mission spawner is initializing at a time.
/////////////////////////////////
waitUntil {blck_missionSpawning isEqualTo false};
blck_missionSpawning = true;
diag_log format["[blckeagls] missionSpawner:: Initializing mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot"];
if (isNil "_chanceReinforcements") then
{
_chanceReinforcements = 0;
_noPara = 0;
_reinforcementLootCounts = [0,0,0,0,0,0];
_chanceHeliPatrol = 0;
_chanceLoot = 0;
};
private["_timeOut"]; // _timeOut is the time in seconds after which a mission is deactivated.
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
if (isNil "_timeOut") then {_timeOut = -1;};
if (isNil "_noPara") then {_noPara = 0};
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = 0;};
if (isNil "_chanceLoot") then {_chanceLoot = 0};
if (isNil "_reinforcementLootCounts") then
{
_weap = 2 + floor(random(4));
_mags = 5 + floor(random(6));
_backpacks = 1 + floor(random(2));
_optics = 1 + floor(random(6));
_loadout = 1 + floor(random(3));
_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks];
//diag_log "missionSpawner:: default values used for _reinforcementLootCounts";
}
else
{
//diag_log "missionSpawner:: Mission specific values used for _reinforcementLootCounts";
};
if (blck_debugON) then {
diag_log format["[blckEagle] Mission Reinforcement Parameters: changeReinforcements %1 numAI %2 changePatrol %3 chanceLoot %4",_chanceReinforcements,_noPara,_chanceHeliPatrol,_chanceLoot];
};
private["_useMines"];
if (isNil "_useMines") then {_useMines = blck_useMines; /*diag_log "[blckEagles] Using default setting for _useMines";*/};
_objects = [];
_mines = [];
_crates = [];
_aiGroup = [];
_missionAIVehicles = [];
_blck_AllMissionAI = [];
_AI_Vehicles = [];
_blck_localMissionMarker = [_missionType,_coords,"","",_markerColor,_markerType];
_delayTime = 1;
_groupPatrolRadius = 50;
if (blck_labelMapMarkers select 0) then
{
//diag_log "SM1.sqf: labeling map markers *****";
_blck_localMissionMarker set [2, _markerMissionName];
};
if !(blck_preciseMapMarkers) then
{
//diag_log "SM1.sqf: 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?
["start",_startMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf";
_fn_timedOut = {
params["_startTime"];
private["_return"];
_return = ( (diag_tickTime - _startTime) > blck_MissionTimout );
_return;
};
_fn_playerWithinRange = {
params["_pos"];
private["_return"];
_return = false;
{
if (isPlayer _x and _x distance _pos <= blck_TriggerDistance) then {_return = true};
}forEach playableunits;
_return;
};
uiSleep 1;
/////////////////////////////
// Everything has been set up for the mission and it is now waiting to be triggered by a nearby player or to time out.
// Lets let other instances of the mission spawner know it is OK to go ahead
////////////////////////////
blck_missionSpawning = false;
//diag_log "missionSpawner:: waiting for player to trigger the mission";
private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"];
_missionStartTime = diag_tickTime;
_playerInRange = false;
_missionTimedOut = false;
_wait = true;
while {_wait} do
{
if ([_coords] call _fn_playerWithinRange) then
{
_wait = false;
_playerInRange = true;
} else
{
if ((diag_tickTime - _missionStartTime) > blck_MissionTimout) then
{
_wait = false;
_missionTimedOut = true;
};
};
uiSleep 1;
};
//waitUntil{ { (isPlayer _x && _x distance _coords <= blck_TriggerDistance /*&& vehicle _x == _x*/) || ([_missionStartTime] call _fn_timedOut) } count playableunits > 0 };
if (blck_debugON) then
{
diag_log format["missionSpawner:: Mission Triggerred contition playerInRange %1 and timout = %2",_playerInRange, _missionTimedOut];
};
if (!_playerInRange && _missionTimedOut) exitWith
{
//["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
_blck_localMissionMarker set [1,[0,0,0]];
_blck_localMissionMarker set [2,""];
[_objects, 1] spawn blck_fnc_cleanupObjects;
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: Mission Timed Out: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
};
if (_playerInRange) then
{
if (blck_debugON) then
{ diag_log format["[blckeagls] missionSpawner:: -- >> Mission tripped by nearby player: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
if (count _missionLootBoxes > 0) then
{
_crates = [_coords,_missionCfg select 2/* array of crates*/] call blck_fnc_spawnMissionCrates;
}
else
{
_crates = [_coords,[[selectRandom blck_crateTypes /*"Box_NATO_Wps_F"*/,[0,0,0],_crateLoot,_lootCounts]]] call blck_fnc_spawnMissionCrates;
};
_objects = _objects + _crates;
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: Crates Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
uiSleep _delayTime;
if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate
{
private ["_temp"];
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
_objects = _objects + _temp;
};
uiSleep _delayTime;
if (_useMines) then
{
_mines = [_coords] call blck_fnc_spawnMines;
//waitUntil{!(_mines isEqualTo [];);
uiSleep _delayTime;;
};
uiSleep _delayTime;
if (_missionLandscapeMode isEqualTo "random") then
{
_objects = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
} else {
_objects = [_coords, round(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects;
};
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: Landscape spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
uiSleep _delayTime;;
if ((count _missionLootVehicles) > 0) then // spawn loot vehicles
{
{
//diag_log format["spawnMissionCVehicles.sqf _x = %1",_x];
_offset = _x select 1; // offset relative to _coords at which to spawn the vehicle
_pos = [(_coords select 0)+(_offset select 0),(_coords select 1) + (_offset select 1),(_coords select 2)+(_offset select 2)];
_veh = [_x select 0 /* vehicle class name*/, _pos] call blck_fnc_spawnVehicle;
_vehs pushback _veh;
[_veh,_x select 2 /*loot array*/, _x select 3 /*array of values specifying number of items of each loot type to load*/] call blck_fnc_fillBoxes;
}forEach _missionLootVehicles;
uiSleep _delayTime;
};
if (blck_useStatic && (_noEmplacedWeapons > 0)) then
{
private["_static","_count"];
if ( count (_missionEmplacedWeapons) > 0 ) then
{
_static = _missionCfg select 4 select 1;
_count = _missionCfg select 4 select 0;
}
else
{
_static = blck_staticWeapons;
_count = _noEmplacedWeapons;
};
private ["_emplacedGroup","_emplacedPositions"];
_emplacedPositions = [_coords,_count,35,50] call blck_fnc_findPositionsAlongARadius;
//diag_log format["missionSpawner:: _emplacedPositions = %1",_emplacedPositions];
{
_emplacedGroup = [_x,1,1,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
//_emplacedUnits = units _emplacedGroup;
_blck_AllMissionAI = _blck_AllMissionAI + (units _emplacedGroup);
_emplacedWeapon = [_x,_emplacedGroup,blck_staticWeapons,5,15] call blck_fnc_spawnEmplacedWeapon;
_missionAIVehicles pushback _emplacedWeapon;
uiSleep _delayTime;
}forEach _emplacedPositions;
//diag_log format["missionSpawner:: emplaced weapons data: _AI_Vehicles %1 _blck_AllMissionAI %1",_AI_Vehicles,_blck_AllMissionAI];
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: Static Weapons Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
};
//diag_log format["_fnc_missionSpawner:: after adding any static weapons, _blck_AllMissionAI is %1",_blck_AllMissionAI];
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
{
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns"];
_vehiclePatrolSpawns= [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
diag_log format["missionSpawner:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
//for "_i" from 1 to _noVehiclePatrols do
{
_vehGroup = [_x,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
//diag_log format["missionSpawner:: group for AI Patrol vehicle spawn: group is %1 with units of %2",_vehGroup, units _vehGroup];
_blck_AllMissionAI = _blck_AllMissionAI + (units _vehGroup);
_randomVehicle = blck_AIPatrolVehicles call BIS_fnc_selectRandom;
//diag_log format["missionSpawner:: vehicle selected is %1", _randomVehicle];
_patrolVehicle = [_coords,_x,_randomVehicle,(_x distance _coords) -5,(_x distance _coords) + 5,_vehGroup] call blck_fnc_spawnVehiclePatrol;
//diag_log format["missionSpawner:: patrol vehicle spawned was %1",_patrolVehicle];
_vehGroup setVariable["groupVehicle",_patrolVehicle,true];
//uiSleep _delayTime;
_AI_Vehicles pushback _patrolVehicle;
}forEach _vehiclePatrolSpawns;
//diag_log format["missionSpawner:: vehicle patrols data: _AI_Vehicles %1 _blck_AllMissionAI %1",_AI_Vehicles,_blck_AllMissionAI];
uiSleep _delayTime;
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: Vehicle Patrols Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
};
//diag_log format["_fnc_missionSpawner:: after adding any vehicle patrols, _blck_AllMissionAI is %1",_blck_AllMissionAI];
//diag_log format["missionSpawner:: _noAIGroups = %1; spawning AI Groups now",_noAIGroups];
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup"];
_unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
_ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups);
//diag_log format["missionSpawner:: _unitsToSpawn %1 ; _unitsPerGroup %2 _ResidualUnits %3",_unitsToSpawn,_unitsPerGroup,_ResidualUnits];
switch (_noAIGroups) do
{
case 1: { // spawn the group near the mission center
//params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ];
_newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,3,18,_uniforms,_headGear] call blck_fnc_spawnGroup;
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=1 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
};
case 2: {
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=2"]; // spawn groups on either side of the mission area
_groupLocations = [_coords,_noAIGroups,15,30] call blck_fnc_findPositionsAlongARadius;
{
private["_adjusttedGroupSize"];
if (_ResidualUnits > 0) then
{
_adjusttedGroupSize = _unitsPerGroup + _ResidualUnits;
_ResidualUnits = 0;
} else {
_adjusttedGroupSize = _unitsPerGroup;
};
_newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning 2 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI];
}forEach _groupLocations;
};
case 3: { // spawn one group near the center of the mission and the rest on the perimeter
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=3"];
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=3 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
_groupLocations = [_coords,2,20,35] call blck_fnc_findPositionsAlongARadius;
{
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning 2 Groups:_newGroup=%1 _newAI = %2",_newGroup, _newAI];
}forEach _groupLocations;
};
default { // spawn one group near the center of the mission and the rest on the perimeter
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=default"];
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=%3 _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
_groupLocations = [_coords,(_noAIGroups - 1),20,40] call blck_fnc_findPositionsAlongARadius;
{
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
_newAI = units _newGroup;
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
//diag_log format["missionSpawner: Spawning %3 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
}forEach _groupLocations;
};
};
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: AI Patrols Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
if ((random(1) < _chanceReinforcements)) then
{
_weaponList = blck_WeaponList_Red;
switch (_aiDifficultyLevel) do {
case "blue": {_weaponList = blck_WeaponList_Blue;};
case "red": {_weaponList = blck_WeaponList_Red;};
case "green": {_weaponList = blck_WeaponList_Green;};
case "orange": {_weaponList = blck_WeaponList_Orange;};
default {_weaponList = blck_WeaponList_Blue;};
};
diag_log format["missionSpawner:: weaponList = %1",_weaponList];
private["_grpReinforcements"];
_grpReinforcements = grpNull;
diag_log format["[blckeagls] missionSpawner:: calling in reinforcements: Current mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
[] spawn {
//[_coords,_noPara,_aiDifficultyLevel,_chanceLoot,_reinforcementLootCounts,_weaponList,_uniforms,_headgear,_chanceHeliPatrol] call blck_fnc_Reinforcements;
//waitUntil {_grpReinforcements != grpNull};
//diag_log format["[blckeagls] missionSpawner::reinforcement spawner started: Current mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
if !(_grpReinforcements isEqualTo grpNull) then
{
_blck_AllMissionAI = _blck_AllMissionAI + (units _grpReinforcements);
//diag_log format["missionSpawner:: _grpReinforcements = %1",_grpReinforcements];
};
};
// Trigger for mission end
//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition];
private["_missionComplete"];
_missionComplete = -1;
_endIfPlayerNear = false;
_endIfAIKilled = false;
_startTime = diag_tickTime;
_missionTimedOut = false;
switch (_endCondition) do
{
case "playerNear": {_endIfPlayerNear = true;};
case "allUnitsKilled": {_endIfAIKilled = true;};
case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;};
};
//diag_log format["missionSpawner :: _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
private["_locations"];
_locations = [_coords] + _crates;
//diag_log format["missionSpawner:: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled];
while {_missionComplete == -1} do
{
if (_endIfPlayerNear) then {
if ( { (isPlayer _x) && ([_x,_locations,20] call blck_fnc_playerInRange) && (vehicle _x == _x) } count playableunits > 0) then {
_missionComplete = 1;
};
};
//diag_log format["missionSpawner:: count alive _blck_AllMissionAI = %1",{alive _x} count _blck_AllMissionAI];
if (_endIfAIKilled) then {
if (({alive _x} count _blck_AllMissionAI) < 1 ) then {
_missionComplete = 1;
//diag_log format["missionSpawner:: _blck_AllMissionAI = %1","testing case _endIfAIKilled"];
};
};
uiSleep 2;
};
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: Mission completion criteria fulfilled: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
if (blck_useSignalEnd) then
{
//diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0];
[_crates select 0] spawn blck_fnc_signalEnd;
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: SignalEnd called: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
};
[_mines] spawn blck_fnc_clearMines;
[_objects, blck_cleanupCompositionTimer] call blck_fnc_addObjToQue;
[_blck_AllMissionAI,blck_AliveAICleanUpTime] call blck_fnc_addLiveAItoQue;
["end",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
[_blck_localMissionMarker select 1, _missionType] execVM "debug\missionCompleteMarker.sqf";
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
//[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
diag_log format["[blckeagls] missionSpawner:: end of mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};

View File

@ -170,7 +170,7 @@ if (_playerInRange) then
_crates = [_coords,[[selectRandom blck_crateTypes /*"Box_NATO_Wps_F"*/,[0,0,0],_crateLoot,_lootCounts]]] call blck_fnc_spawnMissionCrates;
};
_objects = _objects + _crates;
_objects append _crates;
if (blck_debugON) then
{
@ -183,7 +183,8 @@ if (_playerInRange) then
{
private ["_temp"];
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
_objects = _objects + _temp;
_objects append _temp;
_temp = nil;
};
uiSleep _delayTime;
if (_useMines) then
@ -193,13 +194,17 @@ if (_playerInRange) then
uiSleep _delayTime;;
};
uiSleep _delayTime;
_obj = [];
if (_missionLandscapeMode isEqualTo "random") then
{
_objects = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
_obj = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
} else {
_objects = [_coords, round(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects;
_obj = [_coords, floor(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects;
};
//diag_log format["_fnc_missionSpawner::->> _obj = %1",_obj];
_objects append _obj;
//diag_log format["_fnc_missionSpawner::->> _objects = %1",_objects];
_obj= nil;
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: Landscape spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
@ -217,9 +222,9 @@ if (_playerInRange) then
_vehs pushback _veh;
[_veh,_x select 2 /*loot array*/, _x select 3 /*array of values specifying number of items of each loot type to load*/] call blck_fnc_fillBoxes;
}forEach _missionLootVehicles;
uiSleep _delayTime;
};
uiSleep _delayTime;
if (blck_useStatic && (_noEmplacedWeapons > 0)) then
{
private["_static","_count"];
@ -251,13 +256,13 @@ if (_playerInRange) then
diag_log format["[blckeagls] missionSpawner:: Static Weapons Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
};
};
uiSleep _delayTime;
//diag_log format["_fnc_missionSpawner:: after adding any static weapons, _blck_AllMissionAI is %1",_blck_AllMissionAI];
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
{
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns"];
_vehiclePatrolSpawns= [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
diag_log format["missionSpawner:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
//diag_log format["missionSpawner:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
//for "_i" from 1 to _noVehiclePatrols do
{
_vehGroup = [_x,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
@ -280,7 +285,7 @@ if (_playerInRange) then
};
//diag_log format["_fnc_missionSpawner:: after adding any vehicle patrols, _blck_AllMissionAI is %1",_blck_AllMissionAI];
//diag_log format["missionSpawner:: _noAIGroups = %1; spawning AI Groups now",_noAIGroups];
uiSleep _delayTime;
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup"];
_unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
@ -344,7 +349,7 @@ if (_playerInRange) then
}forEach _groupLocations;
};
};
uiSleep _delayTime;
if (blck_debugON) then
{
diag_log format["[blckeagls] missionSpawner:: AI Patrols Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
@ -362,7 +367,7 @@ if (_playerInRange) then
default {_weaponList = blck_WeaponList_Blue;};
};
diag_log format["missionSpawner:: weaponList = %1",_weaponList];
//diag_log format["missionSpawner:: weaponList = %1",_weaponList];
private["_grpReinforcements"];
_grpReinforcements = grpNull;

View File

@ -0,0 +1,43 @@
/*
Spawn objects from an array using offsects from a central location.
The code provided by M3Editor EDEN has been addapted to add checks for vehicles, should they be present.
Returns an array of spawned objects.
version of 11/9/16
*/
//diag_log format["_fnc_spawnBaseObjects: _this = %1",_this];
params["_center","_azi","_objects","_setVector"];
//diag_log format["_fnc_spawnBaseObjects: _objs = %1",_objects];
private ["_newObjs"];
_newObjs = [];
{
//diag_log format["_fnc_spawnBaseObjects::-->> _x = %1",_x];
private _obj = (_x select 0) createVehicle [0,0,0];
_newObjs pushback _obj;
_obj setDir ( (_x select 2) + _azi);
_obj setPosATL (_center vectorAdd (_x select 1));
_obj enableSimulationGlobal true;
_obj allowDamage true;
// Lock any vehicles placed as part of the mission landscape. Note that vehicles that can be taken by players can be added via the mission template.
if ( (typeOf _obj) isKindOf "LandVehicle" || (typeOf _obj) isKindOf "Air" || (typeOf _obj) isKindOf "Sea") then
{
//diag_log format["_fnc_spawnBaseObjects:: Locking vehicle of type %1",typeOf _obj];
//_obj = _x select 0;
_obj setVehicleLock "LOCKEDPLAYER";
_obj addEventHandler ["GetIn",{ // forces player to be ejected if he/she tries to enter the vehicle
private ["_theUnit"];
_theUnit = _this select 2;
_theUnit action ["Eject", vehicle _theUnit];
hint "Use of this vehicle is forbidden";
}];
clearItemCargoGlobal _obj;
clearWeaponCargoGlobal _obj;
clearMagazineCargoGlobal _obj;
clearBackpackCargoGlobal _obj;
};
} forEach _objects;
diag_log format["_fnc_spawnBaseObjects _newObjs = %1",_newObjs];
_newObjs

View File

@ -24,5 +24,5 @@ _objects = [];
_objects pushback _wreck;
sleep 0.1;
} forEach _missionLandscape;
_objects;
diag_log format["_fnc_spawnRandomLandscape::-->> _objects = %1",_objects];
_objects

View File

@ -1,29 +1,9 @@
scriptName "otl7_Mapper.sqf";
/*
Author: Joris-Jan van 't Land, modified for ArmA3: Outlawz7
Description:
Takes an array of data about a dynamic object template and creates the objects.
Parameter(s):
_this select 0: position of the template - Array [X, Y, Z]
_this select 1: azimuth of the template in degrees - Number
_this select 2: object template script name - script
(optional) _this select 3: set vector up - boolean
Example(s):
_newComp = [(getPos this), (getDir this), "dyno_a3\doc\csat_guardpost01.sqf", false] call (compile (preprocessFileLineNumbers "dyno_a3\otl7_Mapper.sqf"));
_newComp = [(getPos this), (getDir this), "dyno_a3\doc\csat_guardpost01.sqf", true] call (compile (preprocessFileLineNumbers "dyno_a3\otl7_Mapper.sqf"));
Modified by Ghostrider-DBD- for blckeagls mission system
version of 11/9/16
*/
private ["_rdm"];
params["_pos","_azi","_objs","_setVector"];
//_pos = _this select 0;
//_azi = _this select 1;
//_objs = _this select 2;
//_setVector = _this select 3;
params["_center","_azi","_objs","_setVector"];
private ["_newObjs"];
@ -32,67 +12,33 @@ private ["_newObjs"];
_newObjs = [];
private ["_posX", "_posY"];
_posX = _pos select 0;
_posY = _pos select 1;
//Function to multiply a [2, 2] matrix by a [2, 1] matrix.
private ["_multiplyMatrixFunc"];
_multiplyMatrixFunc =
{
private ["_array1", "_array2", "_result"];
_array1 = _this select 0;
_array2 = _this select 1;
_result =
[
(((_array1 select 0) select 0) * (_array2 select 0)) + (((_array1 select 0) select 1) * (_array2 select 1)),
(((_array1 select 1) select 0) * (_array2 select 0)) + (((_array1 select 1) select 1) * (_array2 select 1))
];
_result
};
for "_i" from 0 to ((count _objs) - 1) do
{
private ["_obj", "_type", "_relPos", "_azimuth", "_fuel", "_damage", "_newObj"];
_obj = _objs select _i;
_type = _obj select 0;
_relPos = _obj select 1;
_azimuth = _obj select 2;
private _object = (_x select 0) createVehicle [0,0,0];
_newObjs pushback _object;
_object setDir ( (_x select 2) + _azi);
_object setPosATL (_center vectorAdd (_x select 1));
_object enableSimulationGlobal true;
_object allowDamage true;
// Lock any vehicles placed as part of the mission landscape. Note that vehicles that can be taken by players can be added via the mission template.
if ( (typeOf _object) isKindOf "LandVehicle" || (typeOf _object) isKindOf "Air" || (typeOf _object) isKindOf "Sea") then
{
diag_log format["MAP ADDONS:: Locking vehicle of type %1",typeOf _object];
//_object = _x select 0;
_object setVehicleLock "LOCKEDPLAYER";
_object addEventHandler ["GetIn",{ // forces player to be ejected if he/she tries to enter the vehicle
private ["_theUnit"];
_theUnit = _this select 2;
_theUnit action ["Eject", vehicle _theUnit];
hint "Use of this vehicle is forbidden";
}];
//Optionally map fuel and damage for backwards compatibility.
if ((count _obj) > 3) then {_fuel = _obj select 3};
if ((count _obj) > 4) then {_damage = _obj select 4};
//Rotate the relative position using a rotation matrix.
private ["_rotMatrix", "_newRelPos", "_newPos"];
_rotMatrix =
[
[cos _azi, sin _azi],
[-(sin _azi), cos _azi]
];
_newRelPos = [_rotMatrix, _relPos] call _multiplyMatrixFunc;
//Backwards compatability causes for height to be optional.
private ["_z"];
if ((count _relPos) > 2) then {_z = _relPos select 2} else {_z = 0};
_newPos = [_posX + (_newRelPos select 0), _posY + (_newRelPos select 1), _z];
//Create the object and make sure it's in the correct location.
_newObj = _type createVehicle _newPos;
_newObj setDir (_azi + _azimuth);
_newObj setPos _newPos;
if (_setVector) then {_newObj setVectorUp [0,0,1];};
//If fuel and damage were grabbed, map them.
if (!isNil "_fuel") then {_newObj setFuel _fuel};
if (!isNil "_damage") then {_newObj setDamage _damage};
_newObjs = _newObjs + [_newObj];
clearItemCargoGlobal _object;
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
clearBackpackCargoGlobal _object;
};
} forEach _objects;
_newObjs
};
_newObjs

View File

@ -1,12 +1,11 @@
// time.sqf
// by CRE4MPIE
// GamersInc.NET 2015
// Creds to AWOL, A3W, LouD for inspiration
// GMS_fnc_time.sqf
// by Ghostrider-DBD_
//
// Creds to AWOL, A3W, LouD and Creampie for insights.
if (!isServer) exitWith {};
private["_startTime"];
_startTime = diag_tickTime;
if (!isServer) exitWith {};
diag_log "[blckeagls] Time Acceleration Begun ----- >>>>>";
_world = toLower format ["%1", worldName];
private["_nightAccel","_dayAccel","_duskAccel"];
switch (_world) do {
@ -16,14 +15,13 @@ switch (_world) do {
case "tanoa":{_nightAccel = 12; _dayAccel = 3.2;_duskAccel = 6;};
};
while {true} do
{
switch (sunOrMoon) do {
switch (sunOrMoon) do {
// Nighttime
case {sunOrMoon < 0.1}: {setTimeMultiplier _nightAccel; diag_log format["time accel updated to %1; sunOrMoon = %2; time of day = %3",_nightAccel,sunOrMoon,dayTime];};
// Daylight
case {sunOrMoon > 0.5}: {setTimeMultiplier _dayAccel;diag_log format["time accel updated to %1; sunOrMoon = %2; time of day = %3",_dayAccel,sunOrMoon,dayTime];};
// Dusk
default {setTimeMultiplier _duskAccel;diag_log format["time accel updated to %1; sunOrMoon = %2; time of day = %3",_duskAccel,sunOrMoon,dayTime];};
};
uiSleep 300;
};
diag_log format["Time Acceleration Module Loaded in %1 seconds",(diag_tickTime - _startTime)];

View File

@ -0,0 +1,17 @@
// Adds a bipod, optic and suppressor to AI weapons.
// 11/11/16
_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"];
params["_unit"];
_wep = primaryWeapon _unit;
_muzzles = = getArray (configFile >> "CfgWeapons" >> _wep >> "muzzles");
_optics = configfile >> "CfgWeapons" >> _wep >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems";
if (random 1 < 0.3) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)};
if (random 1 < 0.3) then {_unit addPrimaryWeaponItem (selectRandom _optics; _unit addPrimaryWeaponItem (selectRandom _bipods);};

View File

@ -1,32 +1,49 @@
/*
Deal with the various processes of:
removing the AI from the list of active AI
Alerting nearby units
Rewarding for legal kills
Handle AI Deaths
Last Modified 11/6/16
By Ghostrider-DBD-
Copyright 2016
*/
private["_group","_isLegal","_weapon","_lastkill","_kills","_message","_killstreakMsg"];
params["_unit","_killer","_isLegal"];
//diag_log format["#- processAIKill.sqf -# called for unit %1",_unit];
_unit setVariable ["GMS_DiedAt", (diag_tickTime),true];
blck_deadAI pushback _unit;
_group = group _unit;
[_unit] joinSilent grpNull;
if (count(units _group) < 1) then {deleteGroup _group;};
[_unit] spawn blck_fnc_removeLaunchers;
[_unit] spawn blck_fnc_removeNVG;
if (blck_launcherCleanup) then {[_unit] spawn blck_fnc_removeLaunchers;};
if (blck_removeNVG) then {[_unit] spawn blck_fnc_removeNVG;};
if !(isPlayer _killer) exitWith {};
[_unit,_killer] call blck_fnc_alertNearbyUnits;
_isLegal = [_unit,_killer] call blck_fnc_processIlleagalAIKills;
if (_isLegal) then {[_unit,_killer] call blck_fnc_rewardKiller;};
_lastkill = _killer getVariable["blck_lastkill",diag_tickTime];
_killer setVariable["blck_lastkill",diag_tickTime];
_kills = (_killer getVariable["blck_kills",0]) + 1;
if ((diag_tickTime - _lastkill) < 240) then
{
_killer setVariable["blck_kills",_kills];
} else {
_killer setVariable["blck_kills",0];
};
if (_isLegal) then {[_unit,_killer,_kills] call blck_fnc_rewardKiller;};
_weapon = currentWeapon _killer;
_message = format["[blck] %1: AI killed with %2 from %3 meters",name _killer,getText(configFile >> "CfgWeapons" >> _weapon >> "DisplayName"), round(_unit distance _killer)];
if (_kills > 1) then
{
_killstreakMsg = format[" %1X KILLSTREAK",_kills];
}else{
_killstreakMsg = "";
};
if (blck_useKilledAIName) then
{
_message = format["[blck] %2: killed by %1 from %3m",name _killer,name _unit,round(_unit distance _killer)];
}else{
_message = format["[blck] %1 killed with %2 from %3 meters",name _killer,getText(configFile >> "CfgWeapons" >> _weapon >> "DisplayName"), round(_unit distance _killer)];
};
_message =_message + _killstreakMsg;
//diag_log format["[blck] unit killed message is %1",_message,""];
["aikilled",_message,"victory"] call blck_fnc_messageplayers;
{

View File

@ -1,7 +1,6 @@
/*
by Ghostrider
9-20-15
Because this is precompiled there is less concern about keeping comments in.
11-7-16
*/
private["_missionType","_wasRunover","_launcher","_legal"];
@ -32,7 +31,7 @@ _legal = true;
fn_applyVehicleDamage = { // apply a bit of damage
private["_vd"];
params["_vk"];
_vk = _this select 0;
//_vk = _this select 0;
_vd = getDammage _vk;
_vk setDamage (_vd + blck_RunGearDamage);
};

View File

@ -1,8 +1,9 @@
params["_unit"];
removeVest _unit;
//removeHeadgear _this;
removeHeadgear _unit;
removeGoggles _unit;
removeAllItems _unit;
removeAllWeapons _unit;
removeBackpackGlobal _unit;
removeUniform _unit;

View File

@ -1,42 +1,23 @@
/*
by Ghostrider
8-13-16
11-11-16
*/
private["_launcher","_launcherRounds","_objects","_weapons","_container"];
params["_unit"]; // = _this select 0;
_launcher = _unit getVariable ["Launcher",""];
//diag_log format["#- removeLauncher.sqf -# called for unit %1",_unit];
if (blck_launcherCleanup) then
_unit removeWeapon _Launcher;
if (_launcher != "") then
{
if (_launcher != "") then
_unit removeWeapon _Launcher;
{
//diag_log format["!----! removing launchers for unit %1",_unit];
_launcherRounds = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines"); //0;
_unit removeWeapon _Launcher;
removeBackpack _unit;
/*
{
if(_x in _launcherRounds) then {
_unit removeMagazine _x;
};
} count magazines _unit;
private["_objects","_weapons","_container"];
{
// https://community.bistudio.com/wiki/weaponsItems
if (_launcher in (weaponsItems _x select 1) then {deleteVehicle _x};
}forEach nearestObjects [getPos _unit,["WeaponHolderSimulated", "GroundWeaponHolder"],7];
*/
};
}
else
{
if (_launcher != "") then
{
{
if (_launcher in weaponCargo _x) exitWith {
deleteVehicle _x;
}forEach nearestObjects [getPos _unit,["WeaponHolderSimulated", "GroundWeaponHolder"],7];
_unit addWeaponGlobal _launcher;
};
};
} forEach ((getPosATL _unit) nearObjects ["WeaponHolderSimulated",10]);
_launcherRounds = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines"); //0;
{
if(_x in _launcherRounds) then {_unit removeMagazine _x;};
} count magazines _unit;
};

View File

@ -6,7 +6,7 @@
NOTE the dependency on HALV_server_takegive_crypto !!
*/
params["_unit","_killer"];
params["_unit","_killer","_kills"];
//diag_log format["rewardKiller:: _unit = %1 and _killer %2",_unit,_killer];
private["_modType","_reward"];
@ -33,7 +33,8 @@ if (_modType isEqualTo "Epoch") then
if (_dist < 100) then { _reward = _maxReward - (_maxReward / 1.5); _reward };
if (_dist < 800) then { _reward = _maxReward - (_maxReward / 2); _reward };
if (_dist > 800) then { _reward = _maxReward - (_maxReward / 4); _reward };
_reward=+(_kills*2);
//diag_log format["fnd_rewardKiller:: _bonus returned will be %1",_reward];
[_killer,_reward] call blck_fnc_giveTakeCrypto;
};
@ -53,12 +54,10 @@ if (_modType isEqualTo "Exile") then
_newKillerFrags = _newKillerFrags + 1;
_killer setVariable ["ExileKills", _newKillerFrags];
format["addAccountKill:%1", getPlayerUID _killer] call ExileServer_system_database_query_fireAndForget;
_money = _killer getVariable ["ExileMoney", 0];
_money = _money + (_overallRespectChange/2);
_money = _money + (_overallRespectChange/2) + (_kills * 2);
_killer setVariable ["ExileMoney", _money];
format["setAccountMoney:%1:%2", _money, (getPlayerUID _killer)] call ExileServer_system_database_query_fireAndForget;
_message = ["showFragRequest",_overallRespectChange];
//_message remoteExecCall ["ExileClient_system_network_dispatchIncomingMessage", (owner _killer)];
_killer call ExileServer_object_player_sendStatsUpdate;

View File

@ -13,27 +13,49 @@ private ["_pos","_i","_weap","_ammo","_other","_skin","_aiGroup","_ai1","_magazi
params["_pos","_weaponList","_aiGroup",["_skillLevel","red"],["_Launcher","none"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_underwater",false]];
//_pos = _this select 0; // Position at which to spawn AI
//_weaponList = _this select 1;
//_weaponList = _this select 1; // List of weapons with which to arm the AI
//_aiGroup = _this select 2; // Group to which AI belongs
//_skillLevel = [_this,3,"red"] call BIS_fnc_param; // Assign a skill level in case one was not passed."blue", "red", "green", "orange"
//_Launcher = [_this, 4, "none"] call BIS_fnc_param; // Set launchers to "none" if no setting was passed.
//_uniforms = [_this, 5, blck_SkinList] call BIS_fnc_param;
//_headGear = [_this, 6, _shemag] call BIS_fnc_param;//_headGear
//_uniforms = [_this, 5, blck_SkinList] call BIS_fnc_param; // skins to add to AI
//_headGear = [_this, 6, _shemag] call BIS_fnc_param;// headGear to add to AI
_ai1 = ObjNull;
_modType = call blck_getModType;
if (_modType isEqualTo "Epoch") then
{
"I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "COLONEL"];
/*switch(_skillLevel) do
{
case "blue":{_ai1 setVariable["Crypto",1 + floor(random(blck_maxMoneyBlue)),true];};
case "red":{_ai1 setVariable["Crypto",2 + floor(random(blck_maxMoneyRed)),true];};
case "green":{_ai1 setVariable["Crypto",3 + floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_ai1 setVariable["Crypto",4 + floor(random(blck_maxMoneyOrange)),true];};
}; */
};
if (_modType isEqualTo "Exile") then
{
"i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "COLONEL"];
switch(_skillLevel) do
{
case "blue":{_ai1 setVariable["ExileMoney",floor(random(blck_maxMoneyBlue)),true];};
case "red":{_ai1 setVariable["ExileMoney",floor(random(blck_maxMoneyRed)),true];};
case "green":{_ai1 setVariable["ExileMoney",floor(random(blck_maxMoneyGreen)),true];};
case "orange":{_ai1 setVariable["ExileMoney",floor(random(blck_maxMoneyOrange)),true];};
};
};
[_ai1] call blck_fnc_removeGear;
_skin = selectRandom _uniforms; // call BIS_fnc_selectRandom;
_ai1 forceAddUniform _skin;
_skin = "";
_counter = 1;
while {_skin isEqualTo "" && _counter < 10} do
{
_skin = selectRandom _uniforms; // call BIS_fnc_selectRandom;
//_ai1 forceAddUniform _skin;
_ai1 forceAddUniform _skin;
_skin = uniform _ai1;
//diag_log format["_fnc_spawnUnit::-->> for unit _ai1 % uniform is %2",_ai1, uniform _ai1];
_counter =+1;
};
//Stops the AI from being cleaned up
_ai1 setVariable["DBD_AI",1];
@ -55,85 +77,77 @@ if (_modType isEqualTo "Epoch") then
_ai1 addHeadgear (selectRandom _headGear);
// Add a vest to AI for storage
_vest = selectRandom blck_vests; // call BIS_fnc_selectRandom;
_ai1 addVest _vest;
//_vest = selectRandom blck_vests; // call BIS_fnc_selectRandom;
_ai1 addVest selectRandom blck_vests;
if ( random (1) < blck_chanceBackpack) then
{
_bpck = selectRandom blck_backpack; // call BIS_fnc_selectRandom;
_ai1 addBackpack _bpck;
//_bpck = selectRandom blck_backpack;
_ai1 addBackpack selectRandom blck_backpacks;
};
// Add a primary weapon : Vampires logic used here.
_weap = selectRandom _weaponList; // call BIS_fnc_selectRandom;
_weap = selectRandom _weaponList;
//diag_log format["[spawnUnit.sqf] _weap os %1",_weap];
_ai1 addWeaponGlobal _weap;
// get the ammo that can be used with this weapon. This function returns an array with all possible ammo choices in it.
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
_ammo = selectRandom _ammoChoices; // call BIS_fnc_selectRandom;
//_muzzles = = getArray (configFile >> "CfgWeapons" >> _weap >> "muzzles");
_optics = getArray (configfile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
_legalOptics = [];
{
if !(_x in blck_blacklistedOptics) then {_legalOptics pushback _x};
}forEach _optics;
_ammo = selectRandom _ammoChoices;
//diag_log format["[spawnUnit.sqf] _ammo returned as %1",_ammo];
for "_i" from 2 to (floor(random 3)) do {
_ai1 addMagazine _ammo;
};
//if (random 1 < 0.3) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)};
if (random 1 < 0.3) then {
_ai1 addPrimaryWeaponItem (selectRandom _legalOptics);
};
if (random 1 < 0.3) then {
_ai1 addPrimaryWeaponItem (selectRandom blck_bipods);
};
// If the weapon has a GL, add some rounds for it: based on Vampires code
if ((count(getArray (configFile >> "cfgWeapons" >> _weap >> "muzzles"))) > 1) then {
_ai1 addMagazine "1Rnd_HE_Grenade_shell";
};
// Add a pistol : Vampires logic used here.
//_weap = selectRandom _pistols; // call BIS_fnc_selectRandom;
_weap = selectRandom blck_Pistols;
//_ai1 setVariable["PrimaryWeap",_weap];
//diag_log format["[spawnUnit.sqf] _weap os %1",_weap];
_ai1 addWeaponGlobal _weap;
// get the ammo that can be used with this weapon. This function returns an array with all possible ammo choices in it.
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
_ammo = selectRandom _ammoChoices; // call BIS_fnc_selectRandom;
//diag_log format["[spawnUnit.sqf] _ammo returned as %1",_ammo];
_ai1 addMagazine _ammo;
_ai1 addMagazine selectRandom _ammoChoices;
//adds 3 random items to AI. _other = ["ITEM","COUNT"]
_noItems = floor(random(3));
for "_i" from 1 to _noItems do {
//add random items to AI. _other = ["ITEM","COUNT"]
for "_i" from 1 to (1+floor(random(3))) do {
_i = _i + 1;
//_ai1 addItem (selectRandom _aiConsumableItems);
_ai1 addItem (selectRandom blck_ConsumableItems);
};
// Add an First Aid or Grenade 50% of the time
if (round(random 10) <= 5) then
{
//_item = selectRandom _specialItems; // call BIS_fnc_selectRandom;
_item = selectRandom blck_specialItems;
//_item = selectRandom blck_specialItems;
//diag_log format["spawnUnit.sqf] -- Item is %1", _item];
_ai1 addItem _item;
_ai1 addItem selectRandom blck_specialItems;
};
if (_Launcher != "none") then
{
private["_bpck"];
//diag_log format["spawnUnit.sqf: Available Launcher Rounds are %1",getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines")];
_ai1 addWeaponGlobal _Launcher;
_launcherRound = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0;
//diag_log format["[spawnUnit.sqf] Launcher round is %1",_launcherRound];
for "_i" from 1 to 3 do
{
//diag_log format["[spawnUnit.saf] Adding Launcher Round %1 ",_launcherRound];
//private["_round"];
//_round = selectRandom _launcherRound;
_ai1 addItemToBackpack _launcherRound call BIS_fnc_selectRandom;
_ai1 addItemToBackpack (getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0); // call BIS_fnc_selectRandom;
};
_ai1 selectWeapon (secondaryWeapon _ai1);
_ai1 setVariable["Launcher",_launcher];
};
if(sunOrMoon < 0.2 && blck_useNVG)then
{
_ai1 addWeapon "NVG_EPOCH";
_ai1 addWeapon selectRandom blck_NVG;
_ai1 setVariable ["hasNVG", true];
}
else
{
@ -142,8 +156,6 @@ else
// Infinite ammo
_ai1 addeventhandler ["fired", {(_this select 0) setvehicleammo 1;}];
// Do something if AI is killed
_ai1 addEventHandler ["killed",{ [(_this select 0), (_this select 1)] execVM blck_EH_AIKilled;}]; // changed to reduce number of concurrent threads, but also works as spawn blck_AIKilled; }];
//_ai addEventHandler ["HandleDamage",{ [(_this select 0), (_this select 1)] execVM blck_EH_AIHandleDamage;}];
@ -156,12 +168,12 @@ switch (_skillLevel) do
default {_index = 0;_aiSkills = blck_SkillsBlue;};
};
_alertDist = blck_AIAlertDistance select _index;
_intelligence = blck_AIIntelligence select _index;
//_alertDist = blck_AIAlertDistance select _index;
//_intelligence = blck_AIIntelligence select _index;
[_ai1,_aiSkills] call blck_fnc_setSkill;
_ai1 setVariable ["alertDist",_alertDist,true];
_ai1 setVariable ["intelligence",_intelligence,true];
_ai1 setVariable ["alertDist",blck_AIAlertDistance select _index,true];
_ai1 setVariable ["intelligence",blck_AIIntelligence select _index,true];
_ai1 setVariable ["GMS_AI",true,true];
_ai1

View File

@ -10,7 +10,7 @@ params["_vehType","_pos"];
//_vehType = _this select 0; // type of vehicle to be spawned
//_pos = _this select 1; // position at which vehicle is to be spawned
diag_log format["spawnVehicle.sqf: _this = %1",_this];
//diag_log format["spawnVehicle.sqf: _this = %1",_this];
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
_modType = call blck_getModType;
if (_modType isEqualTo "Epoch") then

View File

@ -1,9 +1,8 @@
/*
AI Mission for Epoch Mod for Arma 3
For the Mission System originally coded by blckeagls
By Ghostrider
Functions and global variables used by the mission system.
Last modified 2/10/16
Last modified 11/10/16
*/
blck_functionsCompiled = false;
@ -13,6 +12,9 @@ blck_fnc_FindSafePosn = compileFinal preprocessFileLineNumbers "\q\addons\custo
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";
// 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
@ -28,7 +30,7 @@ blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\cust
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\otl7_Mapper.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_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

View File

@ -8,7 +8,7 @@
//blck_variablesLoaded = false;
blck_debugON = false;
blck_debugLevel = 3;
blck_minFPS = 13;
blck_minFPS = 10;
//Minimum distance for between missions
MinDistanceFromMission = 1500;

View File

@ -11,7 +11,7 @@
*
*/
if (!isServer) exitWith {};
if (!isServer || !blck_useHC) exitWith {};
diag_log "passToHCs: Started";
@ -19,173 +19,65 @@ diag_log "passToHCs: Started";
//waitUntil {!isNull HC};
_wait = true;
while {_wait} do{
if (isNil "HC") then
if (isNil "HC1") then
{
diag_log "passToHCs: HC not connected";} else
{
diag_log format["passToHCs: owner HC = %1", owner HC];
diag_log "passToHCs: HC not connected";
} else {
diag_log format["passToHCs: owner HC1 = %1", owner HC1];
_wait = false;
};
sleep 5;
sleep 15;
};
_HC_ID = -1; // Will become the Client ID of HC
_HC1_ID = -1; // Will become the Client ID of HC
_HC2_ID = -1; // Will become the Client ID of HC2
_HC3_ID = -1; // Will become the Client ID of HC3
rebalanceTimer = 60; // Rebalance sleep timer in seconds
rebalanceTimer = 10; // Rebalance sleep timer in seconds
cleanUpThreshold = 200; // Threshold of number of dead bodies + destroyed vehicles before forcing a clean up
diag_log format["passToHCs: First pass will begin in %1 seconds", rebalanceTimer];
while {true} do {
// Rebalance every rebalanceTimer seconds to avoid hammering the server
uisleep rebalanceTimer;
// Do not enable load balancing unless more than one HC is present
// Leave this variable false, we'll enable it automatically under the right conditions
_loadBalance = false;
// Get HC Client ID else set variables to null
uisleep rebalanceTimer;
try {
_HC_ID = owner HC;
_HC1_ID = owner HC1;
if (_HC_ID > 2) then {
//diag_log format ["passToHCs: Found HC with Client ID %1", _HC_ID];
if (_HC1_ID > 2) then {
diag_log format ["passToHCs: Found HC with Client ID %1", _HC1_ID];
} else {
//diag_log "passToHCs: [WARN] HC disconnected";
diag_log "passToHCs: [WARN] HC disconnected";
HC = objNull;
_HC_ID = -1;
HC1 = objNull;
_HC1_ID = -1;
};
} catch { diag_log format ["passToHCs: [ERROR] [HC] %1", _exception]; HC = objNull; _HC_ID = -1; };
// Get HC2 Client ID else set variables to null
if (!isNil "HC2") then {
try {
_HC2_ID = owner HC2;
if (_HC2_ID > 2) then {
//diag_log format ["passToHCs: Found HC2 with Client ID %1", _HC2_ID];
} else {
//diag_log "passToHCs: [WARN] HC2 disconnected";
HC2 = objNull;
_HC2_ID = -1;
};
} catch { diag_log format ["passToHCs: [ERROR] [HC2] %1", _exception]; HC2 = objNull; _HC2_ID = -1; };
};
// Get HC3 Client ID else set variables to null
if (!isNil "HC3") then {
try {
_HC3_ID = owner HC3;
if (_HC3_ID > 2) then {
//diag_log format ["passToHCs: Found HC2 with Client ID %1", _HC3_ID];
} else {
//diag_log "passToHCs: [WARN] HC3 disconnected";
HC3 = objNull;
_HC3_ID = -1;
};
} catch { diag_log format ["passToHCs: [ERROR] [HC3] %1", _exception]; HC3 = objNull; _HC3_ID = -1; };
};
// If no HCs present, wait for HC to rejoin
//if ( (isNull HC) && (isNull HC2) && (isNull HC3) ) then { waitUntil {!isNull HC}; };
// Check to auto enable Round-Robin load balancing strategy
//if ( (!isNull HC && !isNull HC2) || (!isNull HC && !isNull HC3) || (!isNull HC2 && !isNull HC3) ) then { _loadBalance = true; };
if ( _loadBalance ) then {
//diag_log "passToHCs: Starting load-balanced transfer of AI groups to HCs";
} else {
// No load balancing
//diag_log "passToHCs: Starting transfer of AI groups to HC";
};
// Determine first HC to start with
_currentHC = 0;
if (!isNull HC) then { _currentHC = 1; } else {
if (!isNull HC2) then { _currentHC = 2; } else { _currentHC = 3; };
};
// Pass the AI
_numTransfered = 0;
} catch { diag_log format ["passToHCs: [ERROR] [HC] %1", _exception]; HC = objNull; _HC1_ID = -1; };
{
_swap = false;
// If a player is in this group, don't swap to an HC
// If the group belongs to the blckeagls mission system then transfer it to the HC
if (_x getVariable["blck_group",false]) then {
//diag_log format["group belongs to blckeagls mission system so time to transfer it"];
_id = groupOwner _x;
//diag_log format["Owner of group %1 is %2",_x,_id];
if (_id > 2) then
{
//diag_log format["group %1 is already assigned to an HC with _id of %2",_x,_id];
_swap = false;
} else {
//diag_log format["group %1 should be moved to an HC",_x];
_swap = true;
};
if (!isNull HC1) then
{
// Pass the AI
_numTransfered = 0;
} else {
//diag_log format["group %1 does not belong to blckeagls mission system",_x];
};
// If load balance enabled, round robin between the HCs - else pass all to HC
if ( _swap ) then {
_rc = false;
if (_x getVariable["blck_group",false]) then {
diag_log format["group belongs to blckeagls mission system so time to transfer it"];
_id = groupOwner _x;
diag_log format["Owner of group %1 is %2",_x,_id];
if (_id > 2) then
{
diag_log format["group %1 is already assigned to an HC with _id of %2",_x,_id];
_swap = false;
} else {
if (_numTransfered < 5) then
{
diag_log format["group %1 should be moved to an HC",_x];
_rc = _x setGroupOwner _HC1_ID;
if ( _rc ) then { _numTransfered = _numTransfered + 1; };
};
};
} else {
diag_log format["group %1 does not belong to blckeagls mission system",_x];
};
if ( _loadBalance ) then {
switch (_currentHC) do {
case 1: { _rc = _x setGroupOwner _HC_ID; if (!isNull HC2) then { _currentHC = 2; } else { _currentHC = 3; }; };
case 2: { _rc = _x setGroupOwner _HC2_ID; if (!isNull HC3) then { _currentHC = 3; } else { _currentHC = 1; }; };
case 3: { _rc = _x setGroupOwner _HC3_ID; if (!isNull HC) then { _currentHC = 1; } else { _currentHC = 2; }; };
default { diag_log format["passToHCs: [ERROR] No Valid HC to pass to. _currentHC = %1", _currentHC]; };
};
} else {
switch (_currentHC) do {
case 1: { _rc = _x setGroupOwner _HC_ID; };
case 2: { _rc = _x setGroupOwner _HC2_ID; };
case 3: { _rc = _x setGroupOwner _HC3_ID; };
default { diag_log format["passToHCs: [ERROR] No Valid HC to pass to. _currentHC = %1", _currentHC]; };
};
};
// If the transfer was successful, count it for accounting and diagnostic information
if ( _rc ) then { _numTransfered = _numTransfered + 1; };
};
} forEach (allGroups);
if (_numTransfered > 0) then {
// More accounting and diagnostic information
diag_log format ["passToHCs: Transfered %1 AI groups to HC(s)", _numTransfered];
_numHC = 0;
_numHC2 = 0;
_numHC3 = 0;
{
switch (owner ((units _x) select 0)) do {
case _HC_ID: { _numHC = _numHC + 1; };
case _HC2_ID: { _numHC2 = _numHC2 + 1; };
case _HC3_ID: { _numHC3 = _numHC3+ 1; };
};
} forEach (allGroups);
if (_numHC > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC", _numHC]; };
if (_numHC2 > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC2", _numHC2]; };
if (_numHC3 > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC3", _numHC3]; };
diag_log format ["passToHCs: %1 AI groups total across all HC(s)", (_numHC + _numHC2 + _numHC3)];
} else {
diag_log "passToHCs: No rebalance or transfers required this round";
};
};

View File

@ -24,6 +24,9 @@ Last modified 8/1/15
GENERAL MISSION SYSTEM CONFIGURATION
***********************************************************/
////////
// Headless Client Configurations
blck_useHC = false; // Not Yet Working
// MISSION MARKER CONFIGURATION
// blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type
@ -49,9 +52,10 @@ Last modified 8/1/15
blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC",/*"HMG_M2",*/"HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","HMG_127_LSV_01"]; // Add any vehicles for which you wish to forbid vehicle kills, o
// GLOBAL MISSION PARAMETERS
blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate.
blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player and AI unit killed are shown.
blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Note that this is a default and that mission-specific settings can be defined for each mission using the template
blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area.
blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out.
blck_killEmptyAIVehicles = true; // when true, the AI vehicle will be extensively damaged once all AI have gotten out.
blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases
//Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission.
@ -59,8 +63,8 @@ Last modified 8/1/15
blck_enableGreenMissions = 1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = 1;
blck_enableHunterMissions = 2;
blck_enableScoutsMissions = 2;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
// AI VEHICLE PATROL PARAMETERS
//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
@ -120,10 +124,15 @@ Last modified 8/1/15
blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack
blck_useNVG = true; // When true, AI will be spawned with NVG if is dark
blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed.
blck_useLaunchers = true; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now
//blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"];
blck_launcherTypes = ["launch_RPG32_F"];
blck_backpack = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ];
blck_baseBackpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ];
blck_ApexBackpacks = ["B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F",
"B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F",
"B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F"];
blck_backpacks = blck_baseBackpacks + blck_ApexBackpacks;
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
@ -133,8 +142,8 @@ Last modified 8/1/15
// values are ordered as follows [blue, red, green, orange];
blck_AliveAICleanUpTime = 900; // Time after mission completion at which any remaining live AI are deleted.
blck_cleanupCompositionTimer = 1200;
//blck_AIAlertDistance = [150,225,250,300];
blck_AIAlertDistance = [150,225,400,500];
blck_AIAlertDistance = [150,225,250,300];
//blck_AIAlertDistance = [150,225,400,500];
// How precisely player locations will be revealed to AI after an AI kill
// values are ordered as follows [blue, red, green, orange];
blck_AIIntelligence = [0.5, 1, 2, 4];
@ -176,6 +185,11 @@ Last modified 8/1/15
blck_SkillsBlue = [
["aimingAccuracy",0.1],["aimingShake",0.25],["aimingSpeed",0.3],["endurance",0.50],["spotDistance",0.4],["spotTime",0.4],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60]
];
// Add some money to AI; only works with Exile for now.
blck_maxMoneyOrange = 25;
blck_maxMoneyGreen = 20;
blck_maxMoneyRed = 15;
blck_maxMoneyBlue = 10;
// AI Settings for scouts, Hunters and crashes are definded in thos missions.
/*********************************************************************************
@ -183,43 +197,54 @@ Last modified 8/1/15
AI WEAPONS, UNIFORMS, VESTS AND GEAR
**********************************************************************************/
blck_RifleSniper = [
"srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F"
];
blck_RifleAsault = [
"arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_SDAR_F",
"arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F"
];
// Blacklisted itesm
blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"];
// AI Weapons and Attachments
blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"];
blck_RifleSniper = [
"srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F"
];
blck_RifleLMG = [
"LMG_Mk200_F","LMG_Zafir_F"
];
blck_RifleAsault = [
"arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_SDAR_F",
"arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F"
];
blck_RifleOther = [
"SMG_01_F","SMG_02_F"
];
blck_RifleLMG = [
"LMG_Mk200_F","LMG_Zafir_F"
];
blck_Pistols = [
"hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F"
];
blck_DLC_MMG = [
"MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F"
];
blck_DLC_Sniper = [
"srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F"
];
blck_RifleOther = [
"SMG_01_F","SMG_02_F"
];
blck_Pistols = [
"hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F"
];
blck_DLC_MMG = [
"MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F"
];
blck_DLC_Sniper = [
"srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F"
];
blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"];
//This defines the random weapon to spawn on the AI
//https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons
blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG;
blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault +blck_RifleLMG + blck_DLC_MMG;
blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG + blck_apexWeapons;
blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault +blck_RifleLMG + blck_DLC_MMG + blck_apexWeapons;
blck_WeaponList_Blue = blck_RifleOther + blck_RifleAsault +blck_RifleLMG;
blck_WeaponList_Red = blck_RifleOther + blck_RifleSniper + blck_RifleAsault + blck_RifleLMG;
blck_headgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"]; blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"];
blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"];
//This defines the skin list, some skins are disabled by default to permit players to have high visibility uniforms distinct from those of the AI.
blck_headgear = [
"H_Cap_blk",
@ -433,24 +458,13 @@ for examples of how you can do this see \Major\Compositions.sqf
["MultiGun","EnergyPackLg"],
["arifle_Katiba_F","30Rnd_65x39_caseless_green"],
["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"],
["arifle_Mk20_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"],
["arifle_Mk20C_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"],
["arifle_MX_F","30Rnd_65x39_caseless_mag"],
["arifle_MXC_F","30Rnd_65x39_caseless_mag"],
["arifle_MXM_F","30Rnd_65x39_caseless_mag"],
["arifle_SDAR_F","20Rnd_556x45_UW_mag"],
["arifle_TRG20_F","30Rnd_556x45_Stanag"],
["m16_EPOCH","30Rnd_556x45_Stanag"],
["m16Red_EPOCH","30Rnd_556x45_Stanag"],
["M14_EPOCH","20Rnd_762x51_Mag"],
["M14Grn_EPOCH","20Rnd_762x51_Mag"],
["m4a3_EPOCH","30Rnd_556x45_Stanag"],
["SMG_02_F","30Rnd_9x21_Mag"],
["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"],
["Hgun_PDW2000_F","30Rnd_9x21_Mag"],
["M14_EPOCH","20Rnd_762x51_Mag"],
["M14Grn_EPOCH","20Rnd_762x51_Mag"],
["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"],
@ -461,9 +475,6 @@ for examples of how you can do this see \Major\Compositions.sqf
["srifle_LRR_F","7Rnd_408_Mag"],
["srifle_EBR_F","20Rnd_762x51_Mag"],
["srifle_GM6_F","5Rnd_127x108_APDS_Mag"],
["m249_EPOCH","200Rnd_556x45_M249"],
["m249Tan_EPOCH","200Rnd_556x45_M249"],
["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"],
["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"],
["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"],
["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"],
@ -483,7 +494,11 @@ for examples of how you can do this see \Major\Compositions.sqf
["srifle_DMR_06_camo_F","10Rnd_338_Mag"],
["srifle_DMR_04_F","10Rnd_127x54_Mag"],
["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"],
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"]
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"],
"arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"
],
[//Magazines
["3rnd_HE_Grenade_Shell",3,6],
@ -553,25 +568,12 @@ for examples of how you can do this see \Major\Compositions.sqf
["MultiGun","EnergyPackLg"],
["arifle_Katiba_F","30Rnd_65x39_caseless_green"],
["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"],
["arifle_Mk20_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"],
["arifle_Mk20C_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"],
["arifle_MX_F","30Rnd_65x39_caseless_mag"],
["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"],
["arifle_MXC_F","30Rnd_65x39_caseless_mag"],
["arifle_MXM_F","30Rnd_65x39_caseless_mag"],
["arifle_SDAR_F","20Rnd_556x45_UW_mag"],
["arifle_TRG20_F","30Rnd_556x45_Stanag"],
["m16_EPOCH","30Rnd_556x45_Stanag"],
["m16Red_EPOCH","30Rnd_556x45_Stanag"],
["M14_EPOCH","20Rnd_762x51_Mag"],
["M14Grn_EPOCH","20Rnd_762x51_Mag"],
["m4a3_EPOCH","30Rnd_556x45_Stanag"],
["SMG_02_F","30Rnd_9x21_Mag"],
["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"],
["Hgun_PDW2000_F","30Rnd_9x21_Mag"],
["M14_EPOCH","20Rnd_762x51_Mag"],
["M14Grn_EPOCH","20Rnd_762x51_Mag"],
["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"],
@ -582,8 +584,6 @@ for examples of how you can do this see \Major\Compositions.sqf
["srifle_LRR_F","7Rnd_408_Mag"],
["srifle_EBR_F","20Rnd_762x51_Mag"],
["srifle_GM6_F","5Rnd_127x108_APDS_Mag"],
["m249_EPOCH","200Rnd_556x45_M249"],
["m249Tan_EPOCH","200Rnd_556x45_M249"],
["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"],
["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"],
["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"],
@ -593,7 +593,11 @@ for examples of how you can do this see \Major\Compositions.sqf
["srifle_DMR_03_F","10Rnd_338_Mag"],
["srifle_DMR_04_Tan_F","10Rnd_338_Mag"],
["srifle_DMR_05_hex_F","10Rnd_338_Mag"],
["srifle_DMR_06_camo_F","10Rnd_338_Mag"]
["srifle_DMR_06_camo_F","10Rnd_338_Mag"],
"arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"
],
[//Magazines
// Format is ["Magazine name, Minimum number to add, Maximum number to add],

View File

@ -25,6 +25,9 @@ Last modified 8/1/15
GENERAL MISSION SYSTEM CONFIGURATION
***********************************************************/
////////
// Headless Client Configurations
blck_useHC = false; // Not Yet Working
// MISSION MARKER CONFIGURATION
// blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type
@ -52,7 +55,8 @@ Last modified 8/1/15
blck_forbidenVehicleGuns = ["LMG_RCWS","LMG_M200","HMG_127","HMG_127_APC","HMG_M2","HMG_NSVT","GMG_40mm","GMG_UGV_40mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","autocannon_35mm","LMG_coax","autocannon_30mm","DShKM","DSHKM","HMG_127_LSV_01"]; // Add any vehicles for which you wish to forbid vehicle kills, o
// GLOBAL MISSION PARAMETERS
blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate.
blck_useKilledAIName = true; // When false, the name of the killer (player), weapon and distance are displayed; otherwise the name of the player and AI unit killed are shown.
blck_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Note that this is a default and that mission-specific settings can be defined for each mission using the template
blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area.
blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out.
blck_AIPatrolVehicles = ["Exile_Car_Offroad_Armed_Guerilla01","Exile_Car_Offroad_Armed_Guerilla02","Exile_Car_HMMWV_M2_Green","Exile_Car_HMMWV_M2_Desert","Exile_Car_BTR40_MG_Green","Exile_Car_BTR40_MG_Camo"]; // Type of vehicle spawned to defend AI bases
@ -61,9 +65,9 @@ Last modified 8/1/15
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = 1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = -1;
blck_enableHunterMissions = 2;
blck_enableScoutsMissions = 2;
blck_enableBlueMissions = 1;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
// AI VEHICLE PATROL PARAMETERS
//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
@ -124,47 +128,25 @@ Last modified 8/1/15
blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack
blck_useNVG = true; // When true, AI will be spawned with NVG if is dark
blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed.
blck_useLaunchers = false; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
//blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"];
blck_launcherTypes = ["launch_RPG32_F"];
blck_chanceAIBackpack = 0.33; // the chance that AI will be spawned with a backpack from the list below.
blck_backpack = [
"B_AssaultPack_blk",
"B_AssaultPack_cbr",
"B_AssaultPack_dgtl",
"B_AssaultPack_khk",
"B_AssaultPack_mcamo",
"B_AssaultPack_rgr",
"B_AssaultPack_sgg",
"B_Bergen_blk",
"B_Bergen_mcamo",
"B_Bergen_rgr",
"B_Bergen_sgg",
"B_Carryall_cbr",
"B_Carryall_khk",
"B_Carryall_mcamo",
"B_Carryall_ocamo",
"B_Carryall_oli",
"B_Carryall_oucamo",
"B_FieldPack_blk",
"B_FieldPack_cbr",
"B_FieldPack_ocamo",
"B_FieldPack_oucamo",
"B_HuntingBackpack",
"B_Kitbag_cbr",
"B_Kitbag_mcamo",
"B_Kitbag_sgg",
"B_OutdoorPack_blk",
"B_OutdoorPack_blu",
"B_OutdoorPack_tan",
"B_TacticalPack_blk",
"B_TacticalPack_mcamo",
"B_TacticalPack_ocamo",
"B_TacticalPack_oli",
"B_TacticalPack_rgr"
];
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
blck_baseBackpacks = [
"B_AssaultPack_blk","B_AssaultPack_cbr","B_AssaultPack_dgtl","B_AssaultPack_khk","B_AssaultPack_mcamo","B_AssaultPack_rgr","B_AssaultPack_sgg",
"B_Bergen_blk","B_Bergen_mcamo","B_Bergen_rgr","B_Bergen_sgg",
"B_Carryall_cbr","B_Carryall_khk","B_Carryall_mcamo","B_Carryall_ocamo","B_Carryall_oli","B_Carryall_oucamo",
"B_FieldPack_blk","B_FieldPack_cbr","B_FieldPack_ocamo","B_FieldPack_oucamo",
"B_HuntingBackpack","B_Kitbag_cbr","B_Kitbag_mcamo","B_Kitbag_sgg",
"B_OutdoorPack_blk","B_OutdoorPack_blu","B_OutdoorPack_tan","B_TacticalPack_blk",
"B_TacticalPack_mcamo","B_TacticalPack_ocamo","B_TacticalPack_oli","B_TacticalPack_rgr"];
blck_ApexBackpacks = ["B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F",
"B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F",
"B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F"];
blck_backpacks = blck_baseBackpacks + blck_ApexBackpacks;
//This defines how long after an AI dies that it's body disappears.
blck_bodyCleanUpTimer = 1200; // time in seconds after which dead AI bodies are deleted
@ -216,12 +198,22 @@ Last modified 8/1/15
["aimingAccuracy",0.10],["aimingShake",0.2],["aimingSpeed",0.55],["endurance",0.50],["spotDistance",0.65],["spotTime",0.80],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60]
];
blck_maxMoneyOrange = 25;
blck_maxMoneyGreen = 20;
blck_maxMoneyRed = 15;
blck_maxMoneyBlue = 10;
/*********************************************************************************
AI WEAPONS, UNIFORMS, VESTS AND GEAR
**********************************************************************************/
blck_RifleSniper = [
// Blacklisted itesm
blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"];
// AI Weapons and Attachments
blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"];
blck_RifleSniper = [
"srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F"
];
@ -577,7 +569,11 @@ for examples of how you can do this see \Major\Compositions.sqf
["srifle_DMR_06_camo_F","10Rnd_338_Mag"],
["srifle_DMR_04_F","10Rnd_127x54_Mag"],
["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"],
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"]
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"],
"arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"
],
[//Magazines
["3rnd_HE_Grenade_Shell",3,6],
@ -637,20 +633,10 @@ for examples of how you can do this see \Major\Compositions.sqf
// Format is ["Weapon Name","Magazine Name"],
["arifle_Katiba_F","30Rnd_65x39_caseless_green"],
["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"],
["arifle_Mk20_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"],
["arifle_Mk20C_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"],
["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"],
["arifle_MX_F","30Rnd_65x39_caseless_mag"],
["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"],
["arifle_MXC_F","30Rnd_65x39_caseless_mag"],
["arifle_MXM_F","30Rnd_65x39_caseless_mag"],
["arifle_SDAR_F","20Rnd_556x45_UW_mag"],
["arifle_TRG20_F","30Rnd_556x45_Stanag"],
["SMG_02_F","30Rnd_9x21_Mag"],
["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"],
["Hgun_PDW2000_F","30Rnd_9x21_Mag"],
["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"],
["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"],
["srifle_DMR_01_F","10Rnd_762x51_Mag"],
@ -666,7 +652,11 @@ for examples of how you can do this see \Major\Compositions.sqf
["srifle_DMR_03_F","10Rnd_338_Mag"],
["srifle_DMR_04_Tan_F","10Rnd_338_Mag"],
["srifle_DMR_05_hex_F","10Rnd_338_Mag"],
["srifle_DMR_06_camo_F","10Rnd_338_Mag"]
["srifle_DMR_06_camo_F","10Rnd_338_Mag"],
"arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"
],
[//Magazines
// Format is ["Magazine name, Minimum number to add, Maximum number to add],

View File

@ -13,7 +13,7 @@ switch (_world) do
case"tanoa": {blck_maxCrashSites = 2};
case"namalsk": {
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = 1;
blck_enableGreenMissions = -1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = -1;
blck_enableHunterMissions = 1;
@ -36,12 +36,11 @@ if (blck_debugON) then
blck_enableBlueMissions = 1;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
//blck_maxCrashSites = -3;
blck_maxCrashSites = 3;
blck_enabeUnderwaterMissions = 1;
blck_enabeUnderwaterMissions = -1;
blck_cleanupCompositionTimer = 5; // Time after mission completion at which items in the composition are deleted.
blck_cleanupCompositionTimer = 10; // Time after mission completion at which items in the composition are deleted.
blck_AliveAICleanUpTime = 10; // Time after mission completion at which any remaining live AI are deleted.
blck_bodyCleanUpTimer = 20;

View File

@ -4,18 +4,29 @@ 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.
Version 6.4 10/25/16
Reworked all code for spawning, monitoring and cleaning up vehicle patrols and static weapons.
This consolidated a bunch of code used to spawn these items and eliminated quite a few spawned loops used to monitor the condition of vehicles.
Switched from a system that simply destroyed a vehicle when all AI in it were dead to one that destroys wheels, motor and guns rendering the vehicle inoperable.
Redid the code that blocks players from getting in unless that is allowed by blck_killEmptyAIVehicles = false
11/11/16 Version 6.42 build 10
Redid the code that spawns the objects at missions to work properly with the new formats generated by M3Arma EDEN Editor whilc being backwards compatible with older formats used in the existing missions.
Added code to add scopes and other attachments to AI weapons.
Added new variable blck_blacklistedOptics which you can use to block spawning optics like TMS.
Added new parameter blck_removeNVG which when true will cause NVG to be deleted from AI bodies.
Fixed: launchers and rounds should now be deleted when blck_removeLaunchers = true;
Fixed: All AI should spawn with a uniform.
More bug fixes and correction of typos.
Version 6.3-16
system for cleanup of mission objects, live AI and dead AI was re-worked to minimize the number of spawned code running at one time and reduced the number of loops checked.
11/2/16 Version 6.41 Build 9
Added a parameter blck_useKilledAIName that, when true, changes the kill messages to show player name and AI unit name
Added message to players for killstreaks and a crypto/Tabs bonus for killstreaks.
Exile: AI spawn with a few tabs.
//Epoch: AI spawn with a few Crypto
Corrected an error that would spawn Epoch NVG on AI in Exile.
10/25/16 Version 6.4 Build 8
Reworked the code to spawn vehicle patrols and static weapons and clean them up.
Reworked the code that messages players to be sure that calling titleText does not hang the messaging function and delay hints or system chat notifications.
10/22/16 Version 6.2 Build 8-14-16
bug fixes
10/22/16 v 6.3 Build 8-14-16
Moved routines that delete dead AI, Alive AI and mission objects from individual loops to a single loop spawned by blck_init.sqf.
Added functions to cache these data with time stamps for later time-based deletion.
10/21/16 Version 6.2 Build 7
Redid system for markers which are now defined in the mission template reducing dependence on client side configurations for each mission or marker type.

View File

@ -1,15 +1,12 @@
/*
AI Mission for Epoch and Exile Mods to Arma 3
Originally Compiled by blckeagls @ Zombieville.net
Code was modified by Narines fixing several bugs.
Modified by Ghostrider with thanks to ctbcrwker for input, testing, and troubleshooting.
by Ghostrider-DbD-
Credits to Vampire, Narines, KiloSwiss, blckeagls, theFUCHS, lazylink, Mark311 who wrote mission systems upon which this one is based and who's code is used with modification in some parts of this addon.
Thanks to cyncrwler for testing and bug fixes.
*/
private ["_version","_versionDate"];
_blck_version = "6.4 Build 9";
_blck_versionDate = "10-25-16 7:00 PM";
_blck_version = "6.42 Build 10";
_blck_versionDate = "11-11-16 11:00 AM";
private["_blck_loadingStartTime"];
_blck_loadingStartTime = diag_tickTime;
@ -25,11 +22,11 @@ call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\bl
waitUntil {(isNil "blck_functionsCompiled") isEqualTo false;};
waitUntil{blck_functionsCompiled};
blck_functionsCompiled = nil;
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf";
private["_modType"];
_modType = [] call blck_getModType;
diag_log format["[blckeagls] Loading version %1 Build %2 for mod = %3",_blck_versionDate,_blck_version,_modType];
// this will be a feature of an upcoming release
//call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf";
if (_modType isEqualTo "Epoch") then
{
@ -57,8 +54,7 @@ blck_worldSet = nil;
// set up the lists of available missions for each mission category
diag_log "[blckeagls] Loading Mission Lists";
#include "\q\addons\custom_server\Missions\GMS_missionLists.sqf";
diag_log format["[blckeagls] version %1 Build %2 for mod = %3 Loaded in %4 seconds",_blck_versionDate,_blck_version,_modType,diag_tickTime - _blck_loadingStartTime]; //,blck_modType];
diag_log format["[blckeagls] Loaded in %1 seconds",diag_tickTime - _blck_loadingStartTime];
diag_log format["blckeagls] waiting for players to join ---- >>>>"];
waitUntil{{isPlayer _x}count playableUnits > 0};
diag_log "[blckeagls] Player Connected, loading mission system";