Epoch Update

This commit is contained in:
Teh Dango 2017-10-25 21:04:52 -04:00
parent 7146eb3e40
commit 15463e4eb4
39 changed files with 1169 additions and 516 deletions

View File

@ -1 +0,0 @@
addons\sarge

View File

@ -45,7 +45,11 @@ _dstX = abs(_posX - _centerX);
_dstY = abs(_posY - _centerY);
private ["_sum"];
_sum = ((_dstX * _dstX)/(_sizeX * _sizeX)) + ((_dstY * _dstY)/(_sizeY * _sizeY));
if (_dstX != 0 && _sizeX != 0 && _dstY != 0 && _sizeY != 0) then {
_sum = ((_dstX * _dstX)/(_sizeX * _sizeX)) + ((_dstY * _dstY)/(_sizeY * _sizeY));
} else {
_sum = 0;
};
if (_sum <= 1) then {
_return = true;

View File

@ -13,7 +13,7 @@ UPSMON_Debug = 0;
UPSMON_maxwaiting = 10;
// Set How many time a unit will search around a suspect position
UPSMON_SRCHTIME = 90;
UPSMON_SRCHTIME = 120;
// if you are spotted by AI group, how close the other AI group have to be to You , to be informed about your present position. over this, will lose target
UPSMON_sharedist = 800; // org value 800 => increased for ArmA3 map sizes for less predictable missions..
@ -89,7 +89,7 @@ UPSMON_USE_SMOKE = 20; // org 13: decreased while AI is popping smoke a bit too
UPSMON_Allowfireplace = true;
//Allow Units to Rearm
UPSMON_AllowRearm = false;
UPSMON_AllowRearm = true;
//=============================================================================================================================
//=============================== DO NOT TOUCH THESE VARIABLES ================================================================

View File

@ -0,0 +1,149 @@
private ["_crashDamage","_lootRadius","_preWaypoints","_preWaypointPos","_endTime","_startTime","_safetyPoint","_heliStart","_deadBody","_exploRange","_heliModel","_lootPos","_list","_craters","_dummy","_wp2","_wp3","_landingzone","_aigroup","_wp","_helipilot","_crash","_crashwreck","_smokerand","_staticcoords","_pos","_dir","_position","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_crashModel","_lootTable","_guaranteedLoot","_randomizedLoot","_frequency","_variance","_spawnChance","_spawnMarker","_spawnRadius","_spawnFire","_permanentFire","_crashName"];
if (!isServer) exitWith {};
_frequency = _this select 0;
_spawnChance = _this select 1;
_spawnRadius = _this select 2;
_preWaypoints = _this select 3;
_spawnFire = _this select 4;
_mapCenter = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition");
diag_log format ["Sarge AI System: Animated helicopter crash script initializing for %1",worldName];
while {true} do {
private["_timeToSpawn","_spawnRoll","_crash","_hasAdjustment","_newHeight","_adjustedPos"];
_timeToSpawn = time + _frequency;
_heliModel = ["B_Heli_Attack_01_F"] call BIS_fnc_selectRandom;
//_planeModel = [] call BIS_fnc_selectRandom;
_rndStartPos = [_mapCenter,1,10000,0,2,1.0,0] call BIS_fnc_findSafePos;
_heliStart = [(_rndStartPos select 0),(_rndStartPos select 1),600];
_safetyPoint = [0,0,0];
_crashName = getText (configFile >> "CfgVehicles" >> _heliModel >> "displayName");
_crashModel = "Land_UWreck_Heli_Attack_02_F";
_exploRange = 195;
/* if(_heliModel == "Mi17_DZ") then {
_crashModel = "Mi8Wreck";
_exploRange = 285;
_lootRadius = 0.3;
}; */
waitUntil {(time < _timeToSpawn) && ((count playableUnits) > 0)};
_spawnRoll = random 1;
if (_spawnRoll <= _spawnChance) then {
_position = [_mapCenter,0,_spawnRadius,10,0,1.0,0] call BIS_fnc_findSafePos;
diag_log format ["Sarge AI System: Animated %1 flying from %2 to %3.", _crashName, str(_heliStart), str(_position)];
_startTime = time;
_aigroup = creategroup civilian;
_crashwreck = createVehicle [_heliModel,_heliStart, [], 0, "FLY"];
[_crashwreck] joinSilent _aigroup;
_crashwreck setVariable ["SAR_protect",true,true];
_crashwreck engineOn true;
_crashwreck flyInHeight 120;
_crashwreck forceSpeed 140;
_crashwreck setspeedmode "LIMITED";
_landingzone = createVehicle ["Land_HelipadEmpty_F", [_position select 0, _position select 1,0], [], 0, "CAN_COLLIDE"];
_landingzone setVariable ["SAR_protect",true,true];
_helipilot = _aigroup createUnit ["C_Driver_1_black_F",getPos _crashwreck,[],0,"FORM"];
_helipilot moveindriver _crashwreck;
_helipilot assignAsDriver _crashwreck;
[_helipilot] joinSilent _aigroup;
sleep 1;
if (_preWaypoints > 0) then {
for "_x" from 1 to _preWaypoints do {
_preWaypointPos = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,1.0,0] call BIS_fnc_findSafePos;
_wp = _aigroup addWaypoint [_preWaypointPos, 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "CARELESS";
};
};
_wp2 = _aigroup addWaypoint [position _landingzone, 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointBehaviour "CARELESS";
//Even when the Heli flys to high, it will burn when reaching its Waypoint
_wp2 setWaypointStatements ["true", "_crashwreck setdamage 1;"];
//Adding a last Waypoint up in the North, so the Heli doesnt Hover at WP1 (OR2)
//and would also come back to WP1 if somehow it doesnt explode.
_wp3 = _aigroup addWaypoint [_safetyPoint, 0];
_wp3 setWaypointType "CYCLE";
_wp3 setWaypointBehaviour "CARELESS";
if (SAR_HC) then {
{
_hcID = getPlayerUID _x;
if(_hcID select [0,2] isEqualTo 'HC')then {
_SAIS_HC = _aigroup setGroupOwner (owner _x);
if (_SAIS_HC) then {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: Now moving heli crash group %1 to Headless Client %2",_aigroup,_hcID];
};
} else {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: ERROR! Moving heli crash group %1 to Headless Client %2 has failed!",_aigroup,_hcID];
};
};
};
} forEach allPlayers;
};
//Get some more Speed when close to the Crashpoint and go on even if Heli died or hit the ground
waituntil {(_crashwreck distance _position) <= 1000 || !(alive _crashwreck) || (getPosATL _crashwreck select 2) < 5};
_crashwreck flyInHeight 95;
_crashwreck forceSpeed 80;
_crashwreck setspeedmode "NORMAL";
//BOOOOOOM!
waituntil {(_crashwreck distance _position) <= _exploRange || !(alive _crashwreck) || (getPosATL _crashwreck select 2) < 5};
_crashwreck setdamage 1;
_crashwreck setfuel 0;
diag_log format ["Sarge AI System: Animated %1 just exploded at %2!", _crashName, str(getPosATL _crashwreck)];
_helipilot setdamage 1;
//Giving the crashed Heli some time to find its "Parkingposition"
sleep 15;
//Get position of the helis wreck, but make sure its on the ground;
_pos = [getpos _crashwreck select 0, getpos _crashwreck select 1,0];
_landedPos = [getpos _crashwreck select 0, getpos _crashwreck select 1];
//Clean Up the Crashsite
deletevehicle _crashwreck;
deletevehicle _helipilot;
deletevehicle _landingzone;
//Animation is done, lets create the actual Crashside
_crash = createVehicle [_crashModel, _pos, [], 0, "CAN_COLLIDE"];
_crash setVariable ["SAR_protect",true,true];
//Make it burn (or not)
if (_spawnFire) then {
_fire = "test_EmptyObjectForFireBig" createVehicle (position _crash);
_fire attachto [_crash, [0,0,-1]];
};
};
};

View File

@ -83,8 +83,6 @@ _leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
[_leader,_leader_weapon_names,_leader_items,_leader_tools] call SAR_unit_loadout;
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
[_leader] spawn SAR_fnc_AI_trace_base;
_leader setIdentity "id_SAR_sold_lead";
[_leader] spawn SAR_fnc_AI_refresh;
@ -112,16 +110,9 @@ _leader setVariable ["SAR_AI_experience",0,false];
_leader setVariable ["SAR_FLAG_FRIENDLY", _authorizedUID, true];
_leader setVariable ["ATTACK_ALL", false, true];
// set behaviour & speedmode
_leader setspeedmode "FULL";
_leader setBehaviour "AWARE";
_sniperlist = call compile format ["SAR_sniper_%1_list",_type];
// create crew
for "_i" from 0 to (_snipers - 1) do
{
_this = _group createunit [_sniperlist call BIS_fnc_selectRandom, [getPosATL _flagPole,1,_sizeOfBase,5,0,10,0] call BIS_fnc_findSafePos, [], 0.5, "CAN_COLLIDE"];
_sniper_weapon_names = ["sniper",_type] call SAR_unit_loadout_weapons;
@ -129,8 +120,6 @@ for "_i" from 0 to (_snipers - 1) do
_sniper_tools = ["sniper",_type] call SAR_unit_loadout_tools;
[_this,_sniper_weapon_names,_sniper_items,_sniper_tools] call SAR_unit_loadout;
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
[_this] spawn SAR_fnc_AI_trace_base;
_this setIdentity "id_SAR";
@ -162,7 +151,6 @@ for "_i" from 0 to (_snipers - 1) do
};
_riflemenlist = call compile format ["SAR_soldier_%1_list",_type];
for "_i" from 0 to (_riflemen - 1) do
{
_this = _group createunit [_riflemenlist call BIS_fnc_selectRandom, [getPosATL _flagPole,1,_sizeOfBase,5,0,10,0] call BIS_fnc_findSafePos, [], 0.5, "CAN_COLLIDE"];
@ -236,20 +224,20 @@ switch (_action) do {
case "FORTIFY":
{
_ups_para_list pushBack ['FORTIFY'];
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
};
case "PATROL":
{
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
};
case "AMBUSH":
{
_ups_para_list pushBack ['AMBUSH'];
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
};
default
{
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
};
};

View File

@ -89,7 +89,7 @@ _groupheli setVariable ["SAR_protect",true,true];
// create the vehicle
_heli = createVehicle [(SAR_heli_type call BIS_fnc_selectRandom), [(_rndpos select 0) + 10, _rndpos select 1, 80], [], 0, "FLY"];
_heli setFuel 1;
_heli setVariable ["Sarge",1,true];
_heli setVariable ["SAR_protect",true,true];
_heli engineon true;
_heli setVehicleAmmo 1;
@ -219,10 +219,28 @@ if (_respawn) then {
_ups_para_list pushBack [_respawn_time];
};
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
if(SAR_DEBUG) then {
diag_log format["Sarge's AI System: AI Heli patrol (%2) spawned in: %1.",_patrol_area_name,_groupheli];
};
if (SAR_HC) then {
{
_hcID = getPlayerUID _x;
if(_hcID select [0,2] isEqualTo 'HC')then {
_SAIS_HC = _groupheli setGroupOwner (owner _x);
if (_SAIS_HC) then {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_groupheli,_hcID];
};
} else {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_groupheli,_hcID];
};
};
};
} forEach allPlayers;
};
_groupheli;

View File

@ -45,7 +45,7 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
diag_log format["SAR_HITKILL_DEBUG: friendly AI was hit by Player %1",_aikiller];
};
_playerRespect = _aikiller getVariable ["ExileScore", 0];
/* _playerRespect = _aikiller getVariable ["ExileScore", 0];
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
_repChange = SAR_surv_kill_value / 20;
@ -57,8 +57,12 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
ExileClientPlayerScore = nil;
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget;
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget; */
_humanity = _aikiller getVariable ["humanity",0];
_humanity = _humanity - (SAR_surv_kill_value/10); //substract 10% of kill penalty from humanity
_aikiller setVariable["humanity", _humanity,true];
if ((random 100) < 3) then {
_message = format["Sarge AI: Dammit %1! You are firing on a friendly group check your fire!",_aikiller_name];
_message remoteExec ["systemChat",0];
@ -98,7 +102,11 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
diag_log format["SAR_HITKILL_DEBUG: Adjusting respect for bandit hit by %2 for %1",_aikiller,(SAR_band_kill_value/10)];
};
_playerRespect = _aikiller getVariable ["ExileScore", 0];
_humanity = _aikiller getVariable ["humanity",0];
_humanity = _humanity + (SAR_band_kill_value/10);
_aikiller setVariable["humanity", _humanity,true];
/* _playerRespect = _aikiller getVariable ["ExileScore", 0];
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
_repChange = SAR_surv_kill_value / 20;
@ -110,6 +118,6 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
ExileClientPlayerScore = nil;
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget;
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget; */
};
};

View File

@ -65,7 +65,12 @@ if (SAR_useBlacklist) then {
_group = createGroup _side;
// create leader of the group
_leader = _group createunit [_leaderList call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
_leader = _group createunit [_leaderList call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "NONE"];
_leader setVariable ["SAR_protect",true,true];
[_leader] joinSilent _group;
sleep 1;
_leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
@ -82,15 +87,13 @@ _leader setIdentity "id_SAR_sold_lead";
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
_leader addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*SAR_leader_health_factor}}];
_leader addEventHandler ["HandleDamage",{if (_this select 1 != "") then {_unit = _this select 0; damage _unit + ((_this select 2) - damage _unit) * SAR_leader_health_factor}}];
[_leader, ["Wait Here!", {"\addons\sarge\SAR_interact.sqf","",1,true,true,"","((side _leader != east) && (alive _leader))"}]] remoteExec ["addAction", 0, true];
//["I need assistance!",{"sarge\SAR_interact.sqf","",1,true,true,"","(side _target != EAST)"}]
//_leader addaction ["Help Me!", {"sarge\SAR_interact.sqf" remoteExec [ "BIS_fnc_execVM",0]}];
[_leader] join _group;
// set skills of the leader
{
_leader setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
@ -109,8 +112,8 @@ _leader setVariable ["SAR_AI_type",_ai_type + " Leader",false];
_leader setVariable ["SAR_AI_experience",0,false];
// set behaviour & speedmode
_leader setspeedmode "FULL";
_leader setBehaviour "AWARE";
/* _leader setspeedmode "FULL";
_leader setBehaviour "AWARE"; */
// Establish siper unit type and skills
_sniperlist = call compile format ["SAR_sniper_%1_list", _type];
@ -119,7 +122,10 @@ _sniperskills = call compile format ["SAR_sniper_%1_skills", _type];
// create crew
for "_i" from 0 to (_snipers - 1) do
{
_this = _group createunit [_sniperlist call BIS_fnc_selectRandom, [(_rndpos select 0), _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
_this = _group createunit [_sniperlist call BIS_fnc_selectRandom, [(_rndpos select 0), _rndpos select 1, 0], [], 0.5, "NONE"];
[_this] joinSilent _group;
sleep 1;
_sniper_weapon_names = ["sniper",_type] call SAR_unit_loadout_weapons;
_sniper_items = ["sniper",_type] call SAR_unit_loadout_items;
@ -138,8 +144,6 @@ for "_i" from 0 to (_snipers - 1) do
_this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}];
[_this] join _group;
// set skills
{
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
@ -158,7 +162,10 @@ _riflemanskills = call compile format ["SAR_soldier_%1_skills", _type];
for "_i" from 0 to (_riflemen - 1) do
{
_this = _group createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
_this = _group createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "NONE"];
[_this] joinSilent _group;
sleep 1;
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
@ -177,8 +184,6 @@ for "_i" from 0 to (_riflemen - 1) do
_this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}];
[_this] join _group;
// set skills
{
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
@ -222,20 +227,20 @@ switch (_action) do {
case "FORTIFY":
{
_ups_para_list pushBack ["FORTIFY"];
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
};
case "PATROL":
{
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
};
case "AMBUSH2":
case "AMBUSH":
{
_ups_para_list pushBack ["AMBUSH"];
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
};
default
{
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
};
};
@ -243,4 +248,22 @@ if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: Infantry group (%3) spawned in: %1 with action: %2 on side: %4",_patrol_area_name,_action,_group,(side _group)];
};
if (SAR_HC) then {
{
_hcID = getPlayerUID _x;
if(_hcID select [0,2] isEqualTo 'HC')then {
_SAIS_HC = _group setGroupOwner (owner _x);
if (_SAIS_HC) then {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID];
};
} else {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID];
};
};
};
} forEach allPlayers;
};
_group;

View File

@ -41,10 +41,10 @@ _ai_type = _ai getVariable ["SAR_AI_type",""];
_ai_killer_type = _aikiller getVariable ["SAR_AI_type",""];
// retrieve experience value from the killed AI
_ai_xp = _ai getVariable["SAR_AI_experience",0];
_ai_xp = _ai getVariable ["SAR_AI_experience",0];
// retrieve experience value from the killing AI
_ai_killer_xp = _aikiller getVariable["SAR_AI_experience",0];
_ai_killer_xp = _aikiller getVariable ["SAR_AI_experience",0];
if (_ai_xp < SAR_AI_XP_LVL_2) then {
_ai_xp_type = SAR_AI_XP_NAME_1;
@ -73,10 +73,12 @@ if (SAR_KILL_MSG) then {
_message = format["Sarge AI: A %3 %2 was killed by Player: %1",_aikiller_name,_ai_type,_ai_xp_type];
_message remoteExec ["systemChat",0];
};
if (_ai_xp >= SAR_AI_XP_LVL_2) then {
_message = format["Sarge AI: A %3 %2 was killed by a %3 %4!",_ai_xp_type,_ai_type,_ai_killer_xp_type,_ai_killer_type];
diag_log _message;
_message remoteExec ["systemChat",0];
if (!(isPlayer _aikiller) && !(isNull _aikiller) && (alive _aikiller)) then {
if (_ai_xp >= SAR_AI_XP_LVL_2) then {
_message = format["Sarge AI: A %3 %2 was killed by a %3 %4!",_ai_xp_type,_ai_type,_ai_killer_xp_type,_ai_killer_type];
diag_log _message;
_message remoteExec ["systemChat",0];
};
};
};
@ -85,9 +87,13 @@ if (SAR_HITKILL_DEBUG) then {
diag_log format["SAR_HITKILL_DEBUG: AI Killer - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikiller_type,_aikiller_name, _aikiller_side,_aikiller_group_side];
};
if((alive _aiKiller) && (isPlayer _aikiller)) then {
if ((alive _aiKiller) && (isPlayer _aikiller)) then {
if (_aikilled_group_side == SAR_AI_friendly_side) then {
_humanity = _aikiller getVariable ["humanity",0];
_humanity = _humanity - SAR_surv_kill_value;
_aikiller setVariable["humanity", _humanity,true];
if (SAR_HITKILL_DEBUG) then {
diag_log format ["Sarge's AI System: Adjusting respect for survivor or soldier kill by %2 for %1",_aikiller_name,SAR_surv_kill_value];
};
@ -96,10 +102,10 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
_aikiller setVariable ["SAR_FRIENDLY_KILLS",(_friendlyCount + 1),true];
};
_playerRespect = _aikiller getVariable ["ExileScore", 0];
/* _playerRespect = _aikiller getVariable ["ExileScore", 0];
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
_repChange = SAR_surv_kill_value / 10;
_repChange = SAR_surv_kill_value;
_playerRespect = _playerRespect - _repChange;
_aikiller setVariable ["ExileScore",_playerRespect];
@ -111,7 +117,7 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
ExileClientPlayerScore = nil;
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget;
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget; */
if ((random 100) < 3) then {
_message = format["Sarge AI: %1 killed a friendly AI - sending reinforcements!",_aikiller_name];
@ -125,6 +131,10 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
};
if (_aikilled_group_side == SAR_AI_unfriendly_side) then {
_humanity = _aikiller getVariable ["humanity",0];
_humanity = _humanity + SAR_band_kill_value;
_aikiller setVariable["humanity", _humanity,true];
if (SAR_HITKILL_DEBUG) then {
diag_log format ["Sarge's AI System: Adjusting respect for bandit kill by %2 for %1",_aikiller_name,SAR_band_kill_value];
};
@ -133,10 +143,10 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
_aikiller setVariable ["SAR_HOSTILE_KILLS",(_hostileCount + 1),true];
};
_playerRespect = _aikiller getVariable ["ExileScore", 0];
/* _playerRespect = _aikiller getVariable ["ExileScore", 0];
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
_repChange = SAR_band_kill_value / 10;
_repChange = SAR_band_kill_value;
_playerRespect = _playerRespect + _repChange;
_aikiller setVariable ["ExileScore",_playerRespect];
@ -148,7 +158,7 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
ExileClientPlayerScore = nil;
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget;
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget; */
if ((random 100) < 3) then {
_message = format["Sarge AI: Nice bandit kill %1!",_aikiller_name];
@ -203,7 +213,6 @@ if((alive _aiKiller) && (isPlayer _aikiller)) then {
_message = format["Sarge AI: A %1 %2 was promoted!",_ai_killer_xp_type,_ai_killer_type];
_message remoteExec ["systemChat",0];
// restore health to full
_aikiller setDamage 0;

View File

@ -9,7 +9,7 @@
Sarge AI System 2.0+
Modded for Arma 3: Exile Mod
Changes: Dango
https://www.hod-servers.com
http://www.hod-servers.com
*/
private ["_snipers","_soldiers","_group","_check","_probability","_chance","_playerlist","_triggername","_tmparr","_markername","_player","_valuearray","_max_grps","_rnd_grps","_max_p_grp","_grps_band","_grps_sold","_grps_surv","_grps_upd","_respawn"];
@ -39,6 +39,8 @@ if (SAR_EXTREME_DEBUG) then {
if (SAR_dynamic_group_respawn) then {
_respawn = true;
} else {
_respawn = false;
};
_valuearray= [["max_grps","rnd_grps","max_p_grp","grps_band","grps_sold","grps_surv"],_markername] call SAR_AI_mon_read;
@ -66,23 +68,6 @@ for "_i" from (count _grps_band) to ((_max_grps select 0) - 1) do
_grps_upd set [count _grps_upd,_group];
// update AI monitor
_check = [["grps_band"],[_grps_upd],_markername] call SAR_AI_mon_upd;
if (SAR_HC) then {
{
_hcID = getPlayerUID _x;
if(_hcID select [0,2] isEqualTo 'HC')then {
_SAIS_HC = _group setGroupOwner (owner _x);
if (_SAIS_HC) then {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID];
};
} else {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID];
};
};
};
} forEach allPlayers;
};
};
};
};
@ -102,23 +87,6 @@ for "_i" from (count _grps_sold) to ((_max_grps select 1) - 1) do
_grps_upd set [count _grps_upd,_group];
// update AI monitor
_check = [["grps_sold"],[_grps_upd],_markername] call SAR_AI_mon_upd;
if (SAR_HC) then {
{
_hcID = getPlayerUID _x;
if(_hcID select [0,2] isEqualTo 'HC')then {
_SAIS_HC = _group setGroupOwner (owner _x);
if (_SAIS_HC) then {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID];
};
} else {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID];
};
};
};
} forEach allPlayers;
};
};
};
};
@ -138,23 +106,6 @@ for "_i" from (count _grps_surv) to ((_max_grps select 2) - 1) do
_grps_upd set [count _grps_upd,_group];
// update AI monitor
_check = [["grps_surv"],[_grps_upd],_markername] call SAR_AI_mon_upd;
if (SAR_HC) then {
{
_hcID = getPlayerUID _x;
if(_hcID select [0,2] isEqualTo 'HC')then {
_SAIS_HC = _group setGroupOwner (owner _x);
if (_SAIS_HC) then {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID];
};
} else {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID];
};
};
};
} forEach allPlayers;
};
};
};
};

View File

@ -12,38 +12,33 @@
http://www.hod-servers.com
*/
private ["_ai","_entity_array","_sleeptime","_detectrange"];
private ["_ai","_entity_array"];
if (isServer && !hasInterface) exitWith {}; // Do not execute on server or any headless client(s)
// Prevent server and/or dedicated clients from running this script!!
if (isServer || !hasInterface) exitWith {};
_ai = _this select 0;
_detectrange = SAR_DETECT_HOSTILE;
_respectlimit = SAR_RESPECT_HOSTILE_LIMIT;
_sleeptime = SAR_DETECT_INTERVAL;
while {alive _ai} do {
_entity_array = (position _ai) nearEntities ["CAManBase",_detectrange];
_entity_array = (position _ai) nearEntities ["CAManBase",SAR_DETECT_HOSTILE];
{
if(vehicle _ai == _ai) then { // AI is not in a vehicle, so we trace Zeds
// Only do this for AI not in a vehicle!!
if (vehicle _ai == _ai) then {
if (_x isKindof "civilclass") then {
if(rating _x > -10000) then {
if (rating _x > -10000) then {
_x addrating -10000;
if(SAR_EXTREME_DEBUG) then {
diag_log "SAR EXTREME DEBUG: Zombie rated down";
};
if (SAR_EXTREME_DEBUG) then {diag_log format ["SAR EXTREME DEBUG: %1 rating reduced by 10,000!", typeOf _x];};
};
};
};
if(isPlayer _x && {vehicle _x == _x}) then { // only do this for players not in vehicles
_respect = _x getVariable ["ExileScore",0];
If (_respect < _respectlimit && {rating _x > -10000}) then {
if(SAR_EXTREME_DEBUG) then {
diag_log format["SAR EXTREME DEBUG: reducing rating (trace_entities) for player: %1", _x];
};
// only do this for players not in a vehicle!!
if (isPlayer _x && (vehicle _x == _x)) then {
//_respect = _x getVariable ["ExileScore",0];
If (rating < SAR_RESPECT_HOSTILE_LIMIT && {rating _x > -10000}) then {
_x addrating -10000;
if (SAR_EXTREME_DEBUG) then {diag_log format["SAR EXTREME DEBUG: %1 rating reduced by 10,000!", name _x];};
};
};
} forEach _entity_array;
sleep _sleeptime;
sleep SAR_DETECT_INTERVAL;
};

View File

@ -14,7 +14,7 @@
*/
private ["_ai","_entity_array","_humanity","_humanitylimit","_sleeptime","_detectrange","_tracewhat","_player_rating","_clientmachine"];
//if (!isServer) exitWith {};
if (!isServer) exitWith {};
_ai = _this select 0;
_tracewhat = "CAManBase";

View File

@ -9,7 +9,7 @@
Sarge AI System 2.0+
Modded for Arma 3: Exile Mod
Changes: Dango
https://www.hod-servers.com
http://www.hod-servers.com
*/
private ["_leadername","_type","_patrol_area_name","_grouptype","_snipers","_riflemen","_action","_side","_leaderList","_riflemenlist","_sniperlist","_rndpos","_group","_leader","_cond","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_sniper_weapon_names","_sniper_items","_sniper_tools","_leaderskills","_riflemanskills","_sniperskills","_ups_para_list","_respawn_time","_argc","_ai_type"];
@ -56,12 +56,12 @@ _leaderList = call compile format ["SAR_leader_%1_list", _type];
_leaderskills = call compile format ["SAR_leader_%1_skills", _type];
// get a random starting position that is on land
_rndpos = [_patrol_area_name] call UPSMON_pos;
_rndpos = [_patrol_area_name,0] call UPSMON_pos;
_group = createGroup _side;
// create leader of the group
_leader = _group createunit [_leaderList call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
_leader = _group createunit [_leaderList call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "NONE"];
_leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
@ -85,7 +85,7 @@ _leader addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_th
//["I need assistance!",{"sarge\SAR_interact.sqf","",1,true,true,"","(side _target != EAST)"}]
//_leader addaction ["Help Me!", {"sarge\SAR_interact.sqf" remoteExec [ "BIS_fnc_execVM",0]}];
[_leader] join _group;
[_leader] joinSilent _group;
// set skills of the leader
{
@ -104,11 +104,6 @@ _leader setVariable ["SAR_AI_type",_ai_type + " Leader",false];
// store experience value on AI
_leader setVariable ["SAR_AI_experience",0,false];
// set behaviour & speedmode
_leader setspeedmode "NORMAL";
_leader setBehaviour "CARELESS";
_leader setCombatMode "RED";
// Establish siper unit type and skills
_sniperlist = call compile format ["SAR_sniper_%1_list", _type];
_sniperskills = call compile format ["SAR_sniper_%1_skills", _type];
@ -116,7 +111,7 @@ _sniperskills = call compile format ["SAR_sniper_%1_skills", _type];
// create crew
for "_i" from 0 to (_snipers - 1) do
{
_this = _group createunit [_sniperlist call BIS_fnc_selectRandom, [(_rndpos select 0), _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
_this = _group createunit [_sniperlist call BIS_fnc_selectRandom, [(_rndpos select 0), _rndpos select 1, 0], [], 0.5, "NONE"];
_sniper_weapon_names = ["sniper",_type] call SAR_unit_loadout_weapons;
_sniper_items = ["sniper",_type] call SAR_unit_loadout_items;
@ -135,7 +130,7 @@ for "_i" from 0 to (_snipers - 1) do
_this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}];
[_this] join _group;
[_this] joinSilent _group;
// set skills
{
@ -147,11 +142,6 @@ for "_i" from 0 to (_snipers - 1) do
// store experience value on AI
_this setVariable ["SAR_AI_experience",0,false];
// set behaviour & speedmode
_this setspeedmode "NORMAL";
_this setBehaviour "CARELESS";
_this setCombatMode "RED";
};
@ -161,7 +151,7 @@ _riflemanskills = call compile format ["SAR_soldier_%1_skills", _type];
for "_i" from 0 to (_riflemen - 1) do
{
_this = _group createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
_this = _group createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "NONE"];
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
@ -180,7 +170,7 @@ for "_i" from 0 to (_riflemen - 1) do
_this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}];
[_this] join _group;
[_this] joinSilent _group;
// set skills
{
@ -192,15 +182,10 @@ for "_i" from 0 to (_riflemen - 1) do
// store experience value on AI
_this setVariable ["SAR_AI_experience",0,false];
// set behaviour & speedmode
_this setspeedmode "NORMAL";
_this setBehaviour "CARELESS";
_this setCombatMode "RED";
};
// initialize upsmon for the group
_ups_para_list = [_leader,_patrol_area_name,"NOFOLLOW","SPAWNED","DELETE:",SAR_DELETE_TIMEOUT];
_ups_para_list = [_leader,_patrol_area_name,"LANDDROP","NORMAL","CARELESS","NOFOLLOW","SPAWNED","DELETE:",SAR_DELETE_TIMEOUT];
if (_respawn) then {
_ups_para_list pushBack ["RESPAWN","RESPAWNTIME:",_respawn_time];
@ -224,7 +209,7 @@ switch (_patrol_area_name) do {
case "SAR_marker_MafiaTraderCity_Fortify":
{
// Tell group in terminal to fortify
_ups_para_list pushBack ["RANDOMA","NOWP"];
_ups_para_list pushBack [/* "RANDOMA", */"NOWP"];
_ups_para_list spawn UPSMON;
};
default

View File

@ -108,7 +108,7 @@ _groupvehicles = createGroup _side;
// create the vehicle
_veh = createVehicle [_x, [_rndpos select 0, _rndpos select 1, 0], [], 0, "CAN_COLLIDE"];
_veh setFuel 1;
_veh setVariable ["Sarge",1,true];
_veh setVariable ["SAR_protect",true,true];
_veh engineon true;
_veh addMPEventHandler ["HandleDamage", {_this spawn SAR_fnc_AI_hit_vehicle;_this select 2;}];
@ -160,11 +160,6 @@ _groupvehicles = createGroup _side;
// store experience value on AI
_leader setVariable ["SAR_AI_experience",0,false];
// set behaviour & speedmode
_leader setspeedmode "FULL";
_leader setBehaviour "SAFE";
};
_snipers = _veh_setup select 1;
@ -284,10 +279,28 @@ if (SAR_AI_disable_UPSMON_AI) then {
_ups_para_list pushBack ['NOAI'];
};
_ups_para_list spawn UPSMON;
_ups_para_list execVM "\addons\sarge\UPSMON\UPSMON.sqf";
if(SAR_DEBUG) then {
diag_log format["Sarge's AI System: Land vehicle group (%2), side %3 spawned in %1 in a %4, side %5.",_patrol_area_name,_groupvehicles, _side, typeOf _veh, side _veh];
};
if (SAR_HC) then {
{
_hcID = getPlayerUID _x;
if(_hcID select [0,2] isEqualTo 'HC')then {
_SAIS_HC = _groupvehicles setGroupOwner (owner _x);
if (_SAIS_HC) then {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_groupvehicles,_hcID];
};
} else {
if (SAR_DEBUG) then {
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_groupvehicles,_hcID];
};
};
};
} forEach allPlayers;
};
_groupvehicles;

View File

@ -159,17 +159,21 @@ SAR_unit_loadout_items = {
_unit_items_list = call compile format["SAR_%2_%1_items",_unittype,_side];
_unit_items = [];
{
_item = _x select 0;
_probability = _x select 1;
_chance = (random 100);
if(_chance < _probability) then {
_unit_items set [count _unit_items, _item];
};
} foreach _unit_items_list;
_unit_items;
if ((count _unit_items_list) > 0) then {
_unit_items = [];
{
_item = _x select 0;
_probability = _x select 1;
_chance = (random 100);
if(_chance < _probability) then {
_unit_items set [count _unit_items, _item];
};
} foreach _unit_items_list;
} else {
_unit_items = [];
};
_unit_items;
};
SAR_unit_loadout_weapons = {

View File

@ -18,9 +18,7 @@ private["_sizeX","_sizeY","_snipers","_rifleMen","_sizeOfBase","_marker","_marke
_flagPoles = nearestObjects [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Exile_Construction_Flag_Static"], 25000];
diag_log "Sarge AI System: Territory Base Gaurds Are Now Initializing";
diag_log format["Sarge AI System: Total Territory Locations Query Returned With: %1",(count _flagPoles)];
diag_log format ["Sarge AI System: Starting territory guards for %1!",worldName];
{
_baseName = _x getVariable ["ExileTerritoryName",""];
@ -28,7 +26,7 @@ diag_log format["Sarge AI System: Total Territory Locations Query Returned With:
_fakeFlag = _x getVariable ["ExileDatabaseID", 0];
if (_fakeFlag == 0) then {
diag_log "Sarge AI System: Non territory flag detected! Skipping fake flag!";
} else {
_padding = 5;
_spawnRadius = _sizeOfBase + _padding;
@ -64,9 +62,9 @@ diag_log format["Sarge AI System: Total Territory Locations Query Returned With:
[_x,_spawnMark,2,_snipers,_rifleMen,_behavior,false,5200] call SAR_fnc_AI_guards;
s_player_guardToggle = _x addaction [format[("<t color=""#FFFFFF"">" + ("Make guards hostile") +"</t>"),""],"\addons\sarge\code\toggle_base_guards.sqf",_x,1,false,true,"",""];
s_player_guardToggle = _x addaction [format[("<t color=""#FFFFFF"">" + ("Make guards hostile") +"</t>"),""],"\addons\sarge\code\scripts\toggle_base_guards.sqf",_x,1,false,true,"",""];
};
} foreach _flagPoles;
} forEach _flagPoles;
diag_log "Sarge AI System: Territory base gaurds have now completed spawning.";
diag_log format ["Sarge AI System: Territory guards have completed successfully!",worldName,(count _flagPoles)];

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//

View File

@ -0,0 +1,33 @@
// =========================================================================================================
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//
// Wiki: to come
// Forum: to come
//
// ---------------------------------------------------------------------------------------------------------
// Required:
// UPSMon
// SHK_pos
//
// ---------------------------------------------------------------------------------------------------------
// grid cfg file for Chernarus
// last modified: 5.3.2013
// ---------------------------------------------------------------------------------------------------------
// x coordinate of the first, bottom left grid center point
_startx=2500;
// y coordinate of the first, bottom left grid center point
_starty=2800;
// gridsize x (how many single squares in the grid) for the x-axis
_gridsize_x=6;
// gridsize y (how many single squares in the grid) for the y-axis
_gridsize_y=6;
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
_gridwidth = 1000;

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//

View File

@ -51,6 +51,15 @@ if (_type == "static") then {
_this setMarkerBrush "Solid";
_this setMarkerSize [25, 25];
SAR_marker_MafiaTraderCity_Fortify = _this;
_this = createMarker ["SAR_marker_Hotel_Mission", [14599.7,16797.7,0.101437]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [50, 50];
SAR_marker_Hotel_Mission = _this;
/*
// TraderZoneSilderas Markers
_this = createMarker ["SAR_marker_TraderZoneSilderas", [23334.605,4.0095582,0]];
@ -72,6 +81,7 @@ if (_type == "static") then {
*/
diag_log format["Sarge's AI System: Static spawning area definition finished"];
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
/*
//Heli Patrol NWAF
@ -88,43 +98,32 @@ if (_type == "static") then {
[SAR_marker_DEBUG_veh,1,true] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,1,true] call SAR_fnc_AI_heli;
// example war scenario in the northwest. Comment OUT after having had a look at it!
[SAR_marker_DEBUG_veh,1,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,1,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_fnc_AI_heli;
*/
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["Sarge's AI System: Static Spawning for infantry patrols started"];
// These are safe zone guards only! Notice the call --> call SAR_fnc_AI_traders
/* [SAR_marker_MafiaTraderCity_Outer_Patrol,1,0,0,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_MafiaTraderCity_Outer_Patrol,1,0,0,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_MafiaTraderCity_Outer_Patrol,1,0,0,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_MafiaTraderCity_Inner_Patrol,1,0,0,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_MafiaTraderCity_Inner_Patrol,1,0,0,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_MafiaTraderCity_Inner_Patrol,1,0,0,"patrol",true] call SAR_fnc_AI_traders; */
[SAR_marker_MafiaTraderCity_Fortify,1,0,0,"fortify",true] call SAR_fnc_AI_traders;
[SAR_marker_MafiaTraderCity_Fortify,1,0,0,"fortify",true] call SAR_fnc_AI_traders;
[SAR_marker_MafiaTraderCity_Fortify,1,0,0,"fortify",true] call SAR_fnc_AI_traders;
//CAUTION! These are not currently working. DO NOT use these unless you know how to fix the markers!
/* [SAR_marker_TraderZoneSilderas,1,2,3,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_TraderZoneSilderas,1,2,3,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_TraderZoneSilderas,1,3,2,"fortify",true] call SAR_fnc_AI_traders;
[SAR_marker_TraderZoneFolia,1,2,3,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_TraderZoneFolia,1,2,3,"patrol",true] call SAR_fnc_AI_traders;
[SAR_marker_TraderZoneFolia,1,3,2,"fortify",true] call SAR_fnc_AI_traders; */
// Hotel Mission AI
/* [SAR_marker_Hotel_Mission,1,floor(round(random 1)),floor(round(random 1)),["fortify","patrol","ambush"] call BIS_fnc_selectRandom,true,random 60] call SAR_fnc_AI_infantry;
[SAR_marker_Hotel_Mission,1,floor(round(random 1)),floor(round(random 1)),["fortify","patrol","ambush"] call BIS_fnc_selectRandom,true,random 60] call SAR_fnc_AI_infantry;
[SAR_marker_Hotel_Mission,2,floor(round(random 1)),floor(round(random 1)),["fortify","patrol","ambush"] call BIS_fnc_selectRandom,true,random 60] call SAR_fnc_AI_infantry;
[SAR_marker_Hotel_Mission,2,floor(round(random 1)),floor(round(random 1)),["fortify","patrol","ambush"] call BIS_fnc_selectRandom,true,random 60] call SAR_fnc_AI_infantry;
[SAR_marker_Hotel_Mission,3,floor(round(random 1)),floor(round(random 1)),["fortify","patrol","ambush"] call BIS_fnc_selectRandom,true,random 60] call SAR_fnc_AI_infantry;
[SAR_marker_Hotel_Mission,3,floor(round(random 1)),floor(round(random 1)),["fortify","patrol","ambush"] call BIS_fnc_selectRandom,true,random 60] call SAR_fnc_AI_infantry; */
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
diag_log format["Sarge's AI System: Static Spawning for vehicle patrols started"];
// define your static vehicle patrols here
/* [SAR_marker_DEBUG_veh,1,["SUV_Base"],[[1,1,1]],true,60] call SAR_fnc_AI_vehicle;
[SAR_marker_DEBUG_veh,2,["SUV_Base"],[[1,1,1]],true,60] call SAR_fnc_AI_vehicle;
[SAR_marker_DEBUG_veh,3,["SUV_Base"],[[1,1,1]],true,60] call SAR_fnc_AI_vehicle; */

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.5.0
// Author: Sarge (sarge@krumeich.ch)
//
@ -67,7 +67,7 @@ if (SAR_dynamic_spawning) then {
diag_log format["Sarge's AI System: Dynamic spawning definition / adjustments started"];
diag_log format["SAR_AI: Dynamic spawning definition / adjustments started"];
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,100,100],[0,2,1]],"SAR_area_0_0"] call SAR_AI_mon_upd;
@ -129,7 +129,7 @@ if (SAR_dynamic_spawning) then {
// test south of lopatino, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[100,0,0],[6,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
diag_log format["Sarge's AI System: Dynamic spawning definition / adjustments finished"];
diag_log format["SAR_AI: Dynamic spawning definition / adjustments finished"];
@ -138,7 +138,7 @@ if (SAR_dynamic_spawning) then {
// Definition of area markers for static spawns
//
diag_log format["Sarge's AI System: Static spawning area definition started"];
diag_log format["SAR_AI: Static spawning area definition started"];
// soutcoast, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]];
@ -195,7 +195,7 @@ _this setMarkerBrush "Solid";
_this setMarkerSize [10, 10];
SAR_marker_DEBUG_devilscastle = _this;
diag_log format["Sarge's AI System: Static spawning area definition finished"];
diag_log format["SAR_AI: Static spawning area definition finished"];
// ----------------------------------------------------------------------------------------
// End of area marker definition section
@ -206,7 +206,7 @@ diag_log format["Sarge's AI System: Static spawning area definition finished"];
// Static, predefined heli patrol areas with configurable units
//---------------------------------------------------------------------------------
//
// format: [areamarker,type_of_group,(respawn),(respawntime)] call Sarge's AI System:;
// format: [areamarker,type_of_group,(respawn),(respawntime)] call SAR_AI;
//
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
@ -222,52 +222,52 @@ diag_log format["Sarge's AI System: Static spawning area definition finished"];
//
// A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles
//
// [SAR_marker_DEBUG,1,true] call Sarge's AI System:;
// [SAR_marker_DEBUG,1,true] call SAR_fnc_AI_heli;
//
// B) bandit air group patrolling, not respawning,
//
// [SAR_marker_DEBUG,3] call Sarge's AI System:;
// [SAR_marker_DEBUG,3] call SAR_fnc_AI_heli;
//
// C) survivor air group patrolling, respawning, respawn time = 120 seconds
//
// [SAR_marker_DEBUG,true,120] call Sarge's AI System:;
// [SAR_marker_DEBUG,true,120] call SAR_fnc_AI_heli;
//
//---------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
diag_log format["Sarge AI: Static Spawning for Helicopter patrols started"];
//
// define your static air patrols here
//
//Heli Patrol NWAF
[SAR_marker_helipatrol_nwaf,1,true] call Sarge's AI System:;
[SAR_marker_helipatrol_nwaf,1,true] call SAR_fnc_AI_heli;
//Heli Patrol NEAF
[SAR_marker_helipatrol_neaf,1,true] call Sarge's AI System:;
[SAR_marker_helipatrol_neaf,1,true] call SAR_fnc_AI_heli;
// Heli patrol south coast
[SAR_marker_helipatrol_southcoast,1,true] call Sarge's AI System:;
[SAR_marker_helipatrol_southcoast,1,true] call Sarge's AI System:;
[SAR_marker_helipatrol_southcoast,1,true] call SAR_fnc_AI_heli;
[SAR_marker_helipatrol_southcoast,1,true] call SAR_fnc_AI_heli;
// heli patrol east coast
[SAR_marker_helipatrol_eastcoast,1,true] call Sarge's AI System:;
[SAR_marker_helipatrol_eastcoast,1,true] call Sarge's AI System:;
[SAR_marker_helipatrol_eastcoast,1,true] call SAR_fnc_AI_heli;
[SAR_marker_helipatrol_eastcoast,1,true] call SAR_fnc_AI_heli;
// example war scenario in the northwest. Comment OUT after having had a look at it!
[SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,1,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,1,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_fnc_AI_heli;
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["Sarge AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
//
// format: [areamarker,type_of_group,number_of_snipers,number_of_riflemen,action_to_do,(respawn),(respawntime)] call Sarge's AI System:;
// format: [areamarker,type_of_group,number_of_snipers,number_of_riflemen,action_to_do,(respawn),(respawntime)] call SAR_fnc_AI_infantry;
//
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
@ -287,40 +287,40 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
//
// A) military group patrolling, with 1 leader and 1 rifleman, respawning, respawn time = default configured time
//
// [SAR_marker_DEBUG,1,0,1,"patrol",true] call Sarge's AI System:;
// [SAR_marker_DEBUG,1,0,1,"patrol",true] call SAR_fnc_AI_infantry;
//
// B) bandit group patrolling, with 1 leader, 2 snipers and 1 rifleman, respawning, respawn time = 30 seconds
//
// [SAR_marker_DEBUG,3,2,1,"patrol",true,30] call Sarge's AI System:;
// [SAR_marker_DEBUG,3,2,1,"patrol",true,30] call SAR_fnc_AI_infantry;
//
// C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning
//
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call Sarge's AI System:;
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call SAR_fnc_AI_infantry;
//
//---------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Static Spawning for infantry patrols started"];
diag_log format["Sarge AI: Static Spawning for infantry patrols started"];
//
// define your static infantry patrols here
//
[SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call Sarge's AI System:;
[SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call SAR_fnc_AI_infantry;
// example war scenario in the northwest. Comment OUT after having had a look at it!
[SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call SAR_fnc_AI_infantry;
[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_fnc_AI_infantry;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_fnc_AI_infantry;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_fnc_AI_infantry;
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
diag_log format["Sarge AI: Static Spawning for infantry patrols finished"];
// -------------------------------------------------------------------------------------
//
// Static spawns for vehicle groups
//
// format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_fnc_AI_vehicle;
// format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_AI_land;
//
//
// areamarker : Name of an area, as defined in your area definitions
@ -361,7 +361,7 @@ diag_log format["Sarge's AI System: Static Spawning for infantry patrols finishe
*/
//
// -------------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Static Spawning for vehicle patrols started"];
diag_log format["Sarge AI: Static Spawning for vehicle patrols started"];
//
// define your static vehicle patrols here
@ -395,6 +395,6 @@ diag_log format["Sarge's AI System: Static Spawning for vehicle patrols started"
60 // waittime until this group will respawn
] call SAR_fnc_AI_vehicle;
diag_log format["Sarge's AI System: Static Spawning for vehicle patrols finished"];
diag_log format["Sarge AI: Static Spawning for vehicle patrols finished"];
// ---- end of configuration area ----

View File

@ -0,0 +1,437 @@
// =========================================================================================================
// SAR_AI - DayZ AI library
// Version: 1.5.0
// Author: Sarge (sarge@krumeich.ch)
//
// Wiki: to come
// Forum: to come
//
// ---------------------------------------------------------------------------------------------------------
// Required:
// UPSMon
// SHK_pos
//
// ---------------------------------------------------------------------------------------------------------
// area, group & spawn cfg file for Chernarus
// last modified: 28.5.2013
// ---------------------------------------------------------------------------------------------------------
/*
reconfiguring the properties of the grid (keep in mind the grid has default settings, but these you should overwrite where needed.
IMPORTANT: The grid squares are named like : SAR_area_0_0
where the first 0 is the x counter, and the second 0 the y counter.
So to adress the bottom left square in the grid, you use SAR_area_0_0.
The square above that one would be: SAR_area_0_1
the square one to the right of the bottom left square is SAR_area_1_0
You want to change the number arrays in the below lines:
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
Lets take an example for Chernarus
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
[[0,1,2],[0,75,100],[0,4,3]]
the first set of numbers : 0,1,2
stands for
0 bandit groups
1 soldier group
2 surivors groups
thats the max that can spawn in this grid
the second set of numbers : 0,75,100
that means:
0% probability to spawn bandit groups
75% for soldiers
100% for survivors
the last set of numbers : 0,4,3
thats the maximum number of ppl in the group (including the leader)
0 bandits
max 4 soldiers
max 3 survivors
this number is randomized
*/
if (SAR_dynamic_spawning) then {
diag_log format["SAR_AI: Dynamic spawning definition / adjustments started"];
/* // Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,100,100],[0,2,1]],"SAR_area_0_0"] call SAR_AI_mon_upd;
// Balota, 1 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[80,0,80],[2,0,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
// Cherno, 2 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[2,0,3],[75,0,75],[4,0,4]],"SAR_area_2_0"] call SAR_AI_mon_upd;
// Prido, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,50],[4,0,2]],"SAR_area_3_0"] call SAR_AI_mon_upd;
// Elektro, 2 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[2,0,3],[50,0,50],[4,0,4]],"SAR_area_4_0"] call SAR_AI_mon_upd;
// Kamyshovo, 0 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_5_0"] call SAR_AI_mon_upd;
// Tulga, 0 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_5_1"] call SAR_AI_mon_upd;
// Solni, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[80,0,0],[2,0,0]],"SAR_area_5_2"] call SAR_AI_mon_upd;
// Berezino, 0 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[0,0,3],[0,0,75],[0,0,3]],"SAR_area_5_3"] call SAR_AI_mon_upd;
// Khelm, 1 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[75,0,75],[3,0,3]],"SAR_area_5_4"] call SAR_AI_mon_upd;
// NEAF, 0 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[0,3,1],[0,50,75],[0,2,4]],"SAR_area_5_5"] call SAR_AI_mon_upd;
// NWAF, 0 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[0,2,1],[0,50,75],[0,2,4]],"SAR_area_1_4"] call SAR_AI_mon_upd;
// Stary, 3 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[3,0,3],[50,0,50],[3,0,3]],"SAR_area_2_2"] call SAR_AI_mon_upd;
// Devils Castle, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_2_4"] call SAR_AI_mon_upd;
// Skalka, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[75,0,0],[3,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd;
// Petrovka1, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_1_5"] call SAR_AI_mon_upd;
// Petrovka2, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_2_5"] call SAR_AI_mon_upd;
// Pobeda, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_3_5"] call SAR_AI_mon_upd;
// Krasno, 0 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[0,1,1],[0,75,75],[0,4,2]],"SAR_area_4_5"] call SAR_AI_mon_upd;
// test south of lopatino, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[100,0,0],[6,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd; */
diag_log format["SAR_AI: Dynamic spawning definition / adjustments finished"];
};
//
// Definition of area markers for static spawns
//
diag_log format["SAR_AI: Static spawning area definition started"];
// soutcoast, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [6500, 1200];
SAR_marker_helipatrol_southcoast = _this;
// eastcoast, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_eastcoast", [13304.196, 8220.9795]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1200, 6000];
SAR_marker_helipatrol_eastcoast = _this;
// NWAF, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_nwaf", [4525.3335, 10292.299]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1500, 500];
_this setMarkerDir 59.354115;
SAR_marker_helipatrol_nwaf = _this;
// NEAF, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_neaf", [12034.16, 12725.376]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1000, 600];
SAR_marker_helipatrol_neaf = _this;
_this = createMarker ["SAR_marker_DEBUG_veh", [1951.4304, 11905.569]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [300, 1000];
_this setMarkerDir -19.085985;
SAR_marker_DEBUG_veh = _this;
_this = createMarker ["SAR_marker_DEBUG_devilscastle", [6913.47,11437.2]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [10, 10];
SAR_marker_DEBUG_devilscastle = _this;
diag_log format["SAR_AI: Static spawning area definition finished"];
// ----------------------------------------------------------------------------------------
// End of area marker definition section
// ----------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------
// Static, predefined heli patrol areas with configurable units
//---------------------------------------------------------------------------------
//
// format: [areamarker,type_of_group,(respawn),(respawntime)] call SAR_AI;
//
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
//
// respawn : true or false (optional)
// respawntime : time in secs until group respawns (optional)
// air_vehicle_type : classnema of the air vehicle you want to use
//
//
// Note: The crew will be automatically seized to man any available gun in the airplane / heli.
//
// Examples:
//
// A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles
//
// [SAR_marker_DEBUG,1,true] call SAR_fnc_AI_heli;
//
// B) bandit air group patrolling, not respawning,
//
// [SAR_marker_DEBUG,3] call SAR_fnc_AI_heli;
//
// C) survivor air group patrolling, respawning, respawn time = 120 seconds
//
// [SAR_marker_DEBUG,true,120] call SAR_fnc_AI_heli;
//
//---------------------------------------------------------------------------------
diag_log format["Sarge AI: Static Spawning for Helicopter patrols started"];
//
// define your static air patrols here
//
//Heli Patrol NWAF
[SAR_marker_helipatrol_nwaf,3,true] call SAR_fnc_AI_heli;
//Heli Patrol NEAF
[SAR_marker_helipatrol_neaf,3,true] call SAR_fnc_AI_heli;
// Heli patrol south coast
[SAR_marker_helipatrol_southcoast,1,true] call SAR_fnc_AI_heli;
//[SAR_marker_helipatrol_southcoast,1,true] call SAR_fnc_AI_heli;
// heli patrol east coast
[SAR_marker_helipatrol_eastcoast,1,true] call SAR_fnc_AI_heli;
//[SAR_marker_helipatrol_eastcoast,1,true] call SAR_fnc_AI_heli;
// example war scenario in the northwest. Comment OUT after having had a look at it!
/* [SAR_marker_DEBUG_veh,1,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,1,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_fnc_AI_heli; */
diag_log format["Sarge AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
//
// format: [areamarker,type_of_group,number_of_snipers,number_of_riflemen,action_to_do,(respawn),(respawntime)] call SAR_fnc_AI_infantry;
//
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
// number_of_snipers : amount of snipers in the group
// number_of_riflemen : amount of riflemen in the group
//
// action_to_do : groupaction (optional, default is "patrol")
// possible values:
// "fortify" -> the group will search for nearby buildings and move in them. They will stay there until an enemy spotted, then they will chase him.
// "ambush" -> the group will look for a nearby road, and setup an ambush. They will not move until an enemy was spotted.
// "patrol" -> the group will patrol random waypoints in the area, and engage any enemy they see.
//
// respawn : true or false (optional)
// respawntime : time in secs until group respawns (optional)
//
// Examples:
//
// A) military group patrolling, with 1 leader and 1 rifleman, respawning, respawn time = default configured time
//
// [SAR_marker_DEBUG,1,0,1,"patrol",true] call SAR_fnc_AI_infantry;
//
// B) bandit group patrolling, with 1 leader, 2 snipers and 1 rifleman, respawning, respawn time = 30 seconds
//
// [SAR_marker_DEBUG,3,2,1,"patrol",true,30] call SAR_fnc_AI_infantry;
//
// C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning
//
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call SAR_fnc_AI_infantry;
//
//---------------------------------------------------------------------------------
diag_log format["Sarge AI: Static Spawning for infantry patrols started"];
//
// define your static infantry patrols here
//
[SAR_marker_DEBUG_devilscastle,3,0,6,"fortify",true] call SAR_fnc_AI_infantry;
// example war scenario in the northwest. Comment OUT after having had a look at it!
/* [SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call SAR_fnc_AI_infantry;
[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_fnc_AI_infantry;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_fnc_AI_infantry;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_fnc_AI_infantry; */
diag_log format["Sarge AI: Static Spawning for infantry patrols finished"];
// -------------------------------------------------------------------------------------
//
// Static spawns for vehicle groups
//
// format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_AI_land;
//
//
// areamarker : Name of an area, as defined in your area definitions
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
// vehicle array : e.g. ["car1"], MUST be enclosed by [], and MUST be valid vehicle classnames. multiple vehicles are possible, like this: ["car1","car1","car1"]
// crew array : e.g. [[1,2,3]] -> the first entry in the array element sets if the leader travels in that vehicle, the second is the number of snipers in the vehicle, the third is the number of riflemen.
// must match to the number of defined vehicles, so for the above example, you need: [[1,2,3],[0,1,2],[0,1,1]]
//
//
// respawn : true or false (optional)
// respawntime : time in secs until group respawns (optional)
//
//
//
// Examples:
//
// A) This will spawn an AI group with 1 vehicle(UAZ), and 3 AI in it
/*
[
SAR_marker_DEBUG_veh_1, // Name of the area that the vehicle patrol will spawn in
1, // type of group
["UAZ_Unarmed_TK_EP1"], // used vehicles
[[1,1,1]], // Vehicle initial crew
false // if this group should respawn or not
] call SAR_fnc_AI_vehicle;
*/
//
// B) This will spawn an AI group with 1 vehicle, 3 AI in the UAZ, and this group will respawn after 60 seconds
/*
[
SAR_marker_DEBUG_veh_1, // Name of the area that the vehicle patrol will spawn in
1, // type of group
["UAZ_Unarmed_TK_EP1"], // used vehicle
[[1,1,1]], // Vehicle initial crews
true, // if this group should respawn or not
60 // waittime until this group will respawn
] call SAR_fnc_AI_vehicle;
*/
//
// -------------------------------------------------------------------------------------
diag_log format["Sarge AI: Static Spawning for vehicle patrols started"];
//
// define your static vehicle patrols here
//
// example war scenario in the northwest. Comment OUT after having had a look at it!
/* [
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
1, // type of group
["LandRover_CZ_EP1","M1030","M1030","LandRover_CZ_EP1"], // used vehicle
[[1,1,1],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew
true, // if this group should respawn or not
10
] call SAR_fnc_AI_vehicle;
[
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
3, // type of group
["M1030","M1030","M1030","M1030"], // used vehicle
[[1,1,0],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew
true, // if this group should respawn or not
60 // waittime until this group will respawn
] call SAR_fnc_AI_vehicle;
[
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
2, // type of group
["M1030"], // used vehicle
[[1,1,0]], // Vehicle initial crew
true, // if this group should respawn or not
60 // waittime until this group will respawn
] call SAR_fnc_AI_vehicle; */
[
SAR_marker_helipatrol_nwaf, // Name of the area that the vehicle patrol will spawn in
3, // type of group
["CUP_C_UAZ_Unarmed_TK_CIV"], // used vehicle
[[1,1,1]], // Vehicle initial crew
true, // if this group should respawn or not
(random 300) // waittime until this group will respawn
] call SAR_fnc_AI_vehicle;
[
SAR_marker_helipatrol_nwaf, // Name of the area that the vehicle patrol will spawn in
3, // type of group
["CUP_B_Ural_CDF"], // used vehicle
[[1,2,5]], // Vehicle initial crew
true, // if this group should respawn or not
(random 300) // waittime until this group will respawn
] call SAR_fnc_AI_vehicle;
[
SAR_marker_helipatrol_nwaf, // Name of the area that the vehicle patrol will spawn in
3, // type of group
["CUP_C_UAZ_Unarmed_TK_CIV"], // used vehicle
[[1,1,2]], // Vehicle initial crew
true, // if this group should respawn or not
(random 300) // waittime until this group will respawn
] call SAR_fnc_AI_vehicle;
/* [
SAR_marker_helipatrol_nwaf, // Name of the area that the vehicle patrol will spawn in
3, // type of group
["CUP_B_Ural_CDF"], // used vehicle
[[1,2,5]], // Vehicle initial crew
true, // if this group should respawn or not
(random 300) // waittime until this group will respawn
] call SAR_fnc_AI_vehicle;
[
SAR_marker_helipatrol_nwaf, // Name of the area that the vehicle patrol will spawn in
3, // type of group
["CUP_C_UAZ_Unarmed_TK_CIV"], // used vehicle
[[1,1,2]], // Vehicle initial crew
true, // if this group should respawn or not
(random 300) // waittime until this group will respawn
] call SAR_fnc_AI_vehicle; */
diag_log format["Sarge AI: Static Spawning for vehicle patrols finished"];
// ---- end of configuration area ----

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//
@ -81,8 +81,8 @@ this number is randomized
// End of area marker definition section
// ----------------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
diag_log format["SAR_AI: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
//
// Static, predefined heli patrol areas with configurable units
@ -94,12 +94,12 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols start
// add if needed, see examples in the chernarus file
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
//
// SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -111,16 +111,16 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// Example entries:
// SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
// military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
//---------------------------------------------------------------------------------
// add here if needed
@ -130,5 +130,5 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// ---- end of configuration area ----
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//
@ -164,8 +164,8 @@ SAR_marker_helipatrol_mainland = _this;
// End of area marker definition section
// ----------------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
diag_log format["SAR_AI: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
//
// Static, predefined heli patrol areas with configurable units
@ -177,18 +177,18 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols start
// add if needed, see examples in the chernarus file
[SAR_marker_helipatrol_prison,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_maruko_airport,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_fob_eddie,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_calamar,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_mainland,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_prison,floor(random 2)+1] call SAR_AI_heli;
[SAR_marker_helipatrol_maruko_airport,floor(random 2)+1] call SAR_AI_heli;
[SAR_marker_helipatrol_fob_eddie,floor(random 2)+1] call SAR_AI_heli;
[SAR_marker_helipatrol_calamar,floor(random 2)+1] call SAR_AI_heli;
[SAR_marker_helipatrol_mainland,floor(random 2)+1] call SAR_AI_heli;
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
//
// SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -200,16 +200,16 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// Example entries:
// SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
// military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
//---------------------------------------------------------------------------------
// add here if needed
@ -219,5 +219,5 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// ---- end of configuration area ----
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//
@ -643,8 +643,8 @@ Manatee_Map_Center = _this;
// End of area marker definition section
// ----------------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
diag_log format["SAR_AI: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
//
// Static, predefined heli patrol areas with configurable units
@ -655,24 +655,24 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols start
//
// Map Center - Soldiers
[Manatee_Map_Center,1] call Sarge's AI System:;
[Manatee_Map_Center,1] call SAR_AI_heli;
// North Western Bandits
[Manatee_North_West_Quadrant,3] call Sarge's AI System:;
[Manatee_North_West_Quadrant,3] call SAR_AI_heli;
// North Eastern Bandits
[Manatee_North_East_Quadrant,3] call Sarge's AI System:;
[Manatee_North_East_Quadrant,3] call SAR_AI_heli;
// South Eastern Survivors
[Manatee_South_East_Quadrant,2] call Sarge's AI System:;
[Manatee_South_East_Quadrant,2] call SAR_AI_heli;
// South Western Survivors
[Manatee_South_West_Quadrant,2] call Sarge's AI System:;
[Manatee_South_West_Quadrant,2] call SAR_AI_heli;
// add if needed, see examples in the chernarus file
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
//
// SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -682,25 +682,25 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
//
// BANDITS - 3 Snipers, 7 rifleman. SAF & NAF
[Manatee_SAF_Control_Tower,3,3,7,""] call Sarge's AI System:;
[Manatee_SAF_Control_Tower,3,3,7,""] call SAR_AI;
[Manatee_NAF_Control_Tower,3,3,7,""] call Sarge's AI System:;
[Manatee_NAF_Control_Tower,3,3,7,""] call SAR_AI;
// Example entries:
// SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
// military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
//---------------------------------------------------------------------------------
// add here if needed
@ -710,5 +710,5 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// ---- end of configuration area ----
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];

View File

@ -1,4 +1,23 @@
/*
// =========================================================================================================
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//
// Wiki: to come
// Forum: to come
//
// ---------------------------------------------------------------------------------------------------------
// Required:
// UPSMon
// SHK_pos
//
// ---------------------------------------------------------------------------------------------------------
// area, group & spawn cfg file for Namalsk
// last modified: 5.3.2013
// ---------------------------------------------------------------------------------------------------------
/* reconfiguring the properties of the grid (keep in mind the grid has default settings, but these you should overwrite where needed).
IMPORTANT: The grid squares are named like : SAR_area_0_0
where the first 0 is the x counter, and the second 0 the y counter.
@ -37,109 +56,105 @@ thats the maximum number of ppl in the group (plus 1 leader)
max 4 (+1 leader) soldiers
max 3 (+1 leader) survivors
this number is randomized
*/
*/
//
// grid definition for the automatic spawn system
//
_type = _this select 0;
// West Point, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[50,75,100],[2,3,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
// grid definition for the automatic spawn system
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
// Water, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
/* // West Point, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[50,75,100],[2,3,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
// Brensk, 3 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,1],[80,50,75],[2,2,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
// Water, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
// Tara Bridge, 2 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,2],[70,0,70],[3,0,3]],"SAR_area_2_0"] call SAR_AI_mon_upd;
// Brensk, 3 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,1],[80,50,75],[2,2,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
// South East coast, 1 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,3],[30,20,60],[2,2,3]],"SAR_area_3_0"] call SAR_AI_mon_upd;
// Tara Bridge, 2 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,2],[70,0,70],[3,0,3]],"SAR_area_2_0"] call SAR_AI_mon_upd;
// Lubjansk, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,75],[2,0,4]],"SAR_area_1_3"] call SAR_AI_mon_upd;
// South East coast, 1 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,3],[30,20,60],[2,2,3]],"SAR_area_3_0"] call SAR_AI_mon_upd;
// Sebjan airport, 2 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[50,50,30],[3,3,2]],"SAR_area_2_2"] call SAR_AI_mon_upd;
// Lubjansk, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,75],[2,0,4]],"SAR_area_1_3"] call SAR_AI_mon_upd;
// Norinsk, 2 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,3,1],[75,75,50],[3,3,3]],"SAR_area_1_1"] call SAR_AI_mon_upd;
// Sebjan airport, 2 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[50,50,30],[3,3,2]],"SAR_area_2_2"] call SAR_AI_mon_upd;
// Object A1, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[80,75,75],[2,2,4]],"SAR_area_1_2"] call SAR_AI_mon_upd;
// Norinsk, 2 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,3,1],[75,75,50],[3,3,3]],"SAR_area_1_1"] call SAR_AI_mon_upd;
// Jalovisko, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[20,0,50],[3,0,3]],"SAR_area_3_3"] call SAR_AI_mon_upd;
// Object A1, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[80,75,75],[2,2,4]],"SAR_area_1_2"] call SAR_AI_mon_upd;
// Tara, 2 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,2],[75,0,75],[3,0,3]],"SAR_area_2_1"] call SAR_AI_mon_upd;
// Jalovisko, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[20,0,50],[3,0,3]],"SAR_area_3_3"] call SAR_AI_mon_upd;
// ---------------------------------------------------------------
// Definition of area markers for static spawns
// ---------------------------------------------------------------
// Tara, 2 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,2],[75,0,75],[3,0,3]],"SAR_area_2_1"] call SAR_AI_mon_upd;
}; */
if (_type == "static") then {
// ---------------------------------------------------------------
// Definition of area markers for static spawns
// ---------------------------------------------------------------
// add if needed, see examples in the chernarus file
// add if needed, see examples in the chernarus file
// ----------------------------------------------------------------------------------------
// End of area marker definition section
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// End of area marker definition section
// ----------------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
diag_log format["SAR_AI: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
//
// Static, predefined heli patrol areas with configurable units
//
// Parameters used:
// Areaname
// 1,2,3 = soldier, survivors, bandits
//
//
// Static, predefined heli patrol areas with configurable units
//
// Parameters used:
// Areaname
// 1,2,3 = soldier, survivors, bandits
//
// add if needed, see examples in the chernarus file
// add if needed, see examples in the chernarus file
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
//
// SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
// 0 = amount of snipers in the group
// 1 = amount of rifleman in the group
//
//
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
//
// SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
// 0 = amount of snipers in the group
// 1 = amount of rifleman in the group
//
//
// Example entries:
// SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// Example entries:
// SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
// military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
// military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//---------------------------------------------------------------------------------
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
//---------------------------------------------------------------------------------
// add here if needed
// add here if needed
// ---- end of configuration area ----
// ---- end of configuration area ----
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
};

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//
@ -81,8 +81,8 @@ this number is randomized
// End of area marker definition section
// ----------------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
diag_log format["SAR_AI: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
//
// Static, predefined heli patrol areas with configurable units
@ -94,12 +94,12 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols start
// add if needed, see examples in the chernarus file
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
//
// SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -111,16 +111,16 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// Example entries:
// SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
// military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
//---------------------------------------------------------------------------------
// add here if needed
@ -130,5 +130,5 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// ---- end of configuration area ----
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//
@ -81,8 +81,8 @@ this number is randomized
// End of area marker definition section
// ----------------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
diag_log format["SAR_AI: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
//
// Static, predefined heli patrol areas with configurable units
@ -94,12 +94,12 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols start
// add if needed, see examples in the chernarus file
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
//
// SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -111,16 +111,16 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// Example entries:
// SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
// military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
//---------------------------------------------------------------------------------
// add here if needed
@ -130,5 +130,5 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// ---- end of configuration area ----
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];

View File

@ -1,5 +1,5 @@
// =========================================================================================================
// Sarge's AI System: - DayZ AI library
// SAR_AI - DayZ AI library
// Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch)
//
@ -264,8 +264,8 @@ this number is randomized
// End of area marker definition section
// ----------------------------------------------------------------------------------------
diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
diag_log format["SAR_AI: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
//
// Static, predefined heli patrol areas with configurable units
@ -276,34 +276,34 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols start
//
//Heli Patrol Sabina
[SAR_marker_helipatrol_sabina,1] call Sarge's AI System:;
[SAR_marker_helipatrol_sabina,1] call SAR_AI_heli;
//Heli Patrol Lyepestok
[SAR_marker_helipatrol_lyepestok,1] call Sarge's AI System:;
[SAR_marker_helipatrol_lyepestok,1] call SAR_AI_heli;
//Heli patrol NWAF
[SAR_marker_helipatrol_nwaf,1] call Sarge's AI System:;
[SAR_marker_helipatrol_nwaf,1] call SAR_AI_heli;
//Heli patrol Dubovo
[SAR_marker_helipatrol_dubovo,1] call Sarge's AI System:;
[SAR_marker_helipatrol_dubovo,1] call SAR_AI_heli;
//Heli patrol Krasnoznamensk
[SAR_marker_helipatrol_kraz,1] call Sarge's AI System:;
[SAR_marker_helipatrol_kraz,1] call SAR_AI_heli;
//Heli patrol Branibor
[SAR_marker_helipatrol_branibor,1] call Sarge's AI System:;
[SAR_marker_helipatrol_branibor,1] call SAR_AI_heli;
// add if needed, see examples in the chernarus file
diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
//---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units
//---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
//
// SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -315,16 +315,16 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// Example entries:
// SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
// military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
//---------------------------------------------------------------------------------
@ -335,5 +335,5 @@ diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finis
// ---- end of configuration area ----
diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];

View File

@ -1,8 +1,23 @@
/*
# Original #
Sarge AI System 1.5
Created for Arma 2: DayZ Mod
Author: Sarge
https://github.com/Swiss-Sarge
# Fork #
Sarge AI System 2.0+
Modded for Arma 3: Exile Mod
Changes: Dango
http://www.hod-servers.com
https://github.com/Teh-Dango
*/
class CfgPatches {
class Sarge_AI {
requiredVersion = 1.36;
SAR_version = 2.2;
requiredAddons[] = {"exile_client","exile_server_config"};
requiredAddons[] = {};
units[] = {};
weapons[] = {};
magazines[] = {};
@ -23,6 +38,7 @@ class CfgFunctions {
};
class compiles {
file = "addons\sarge\code\functions";
class AI_anim_heli {};
class AI_despawn {};
class AI_guards {};
class AI_heli {};

View File

@ -9,7 +9,7 @@
Sarge AI System 2.0+
Modded for Arma 3: Exile Mod
Changes: Dango
http://www.hod-servers.com
https://www.hod-servers.com
https://github.com/Teh-Dango
*/
private ["_worldname","_startx","_starty","_gridsize_x","_gridsize_y","_gridwidth","_markername","_triggername","_trig_act_stmnt","_trig_deact_stmnt","_trig_cond","_check","_script_handler","_legendname"];
@ -20,6 +20,11 @@ diag_log format ["Sarge's AI System: Now initializing Sarge AI version %1 for %2
call compile preProcessFileLineNumbers "\addons\sarge\UPSMON\Init_UPSMON.sqf";
call compile preProcessFileLineNumbers "\addons\sarge\code\functions\fn_functions.sqf";
createCenter EAST;
createCenter WEST;
createCenter RESISTANCE;
createCenter CIVILIAN;
// unfriendly AI bandits
EAST setFriend [EAST, 1];
EAST setFriend [CIVILIAN, 1];
@ -35,8 +40,8 @@ WEST setFriend [EAST, 0];
WEST setFriend [RESISTANCE, 1];
// Lets hope this helps with the AI's view of object locality
waituntil {(!isNil "PublicServerIsLoaded")};
waituntil {(PublicServerIsLoaded)};
/* waituntil {(!isNil "PublicServerIsLoaded")};
waituntil {(PublicServerIsLoaded)}; */
if (SAR_dynamic_spawning) then {
@ -102,7 +107,6 @@ if (SAR_dynamic_spawning) then {
// standard grid definition - maxgroups (ba,so,su) - probability (ba,so,su) - max group members (ba,so,su)
SAR_AI_monitor set[count SAR_AI_monitor, [_markername,[SAR_max_grps_bandits,SAR_max_grps_soldiers,SAR_max_grps_survivors],[SAR_chance_bandits,SAR_chance_soldiers,SAR_chance_survivors],[SAR_max_grpsize_bandits,SAR_max_grpsize_soldiers,SAR_max_grpsize_survivors],[],[],[]]];
};
};
diag_log format["Sarge's AI System: The map grid has been established for %1.",worldName];
@ -111,20 +115,22 @@ if (SAR_dynamic_spawning) then {
diag_log format["Sarge's AI System: Dynamic spawn definitions have been configured for %1.",worldName];
};
["static"] call compile preprocessFileLineNumbers (format ["\addons\sarge\code\map_config\SAR_cfg_grps_%1.sqf",_worldname]);
diag_log format["Sarge's AI System: Static spawn definitions have been configured for %1.",_worldname];
if (SAR_useBlacklist) then {
switch (_worldname) do {
case "namalsk": {SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];};
case "altis": {SAR_Blacklist = ["MafiaTraderCity","TraderZoneSilderas","TraderZoneFolia"];};
case "tanoa": {SAR_Blacklist = ["ExileMarker1","ExileMarker13","ExileMarker15","ExileMarker35","ExileMarker51"];};
default {diag_log format ["Sarge's AI System: Blacklisted zones are not currently supported for %1!",worldName];};
};
diag_log format ["Sarge's AI System: Blacklisted zones have been established for %1",worldName];
diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist];
case "namalsk": {SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist];};
case "altis": {SAR_Blacklist = ["MafiaTraderCity","TraderZoneSilderas","TraderZoneFolia"];diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist];};
case "tanoa": {SAR_Blacklist = ["ExileMarker1","ExileMarker13","ExileMarker15","ExileMarker35","ExileMarker51"];diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist];};
default {SAR_Blacklist = [];diag_log format ["Sarge's AI System: Blacklisted zones are not currently supported for %1!",worldName];};
};
};
["static"] call compile preprocessFileLineNumbers (format ["\addons\sarge\code\map_config\SAR_cfg_grps_%1.sqf",_worldname]);
diag_log format["Sarge's AI System: Static spawn definitions have been configured for %1.",_worldname];
if (SAR_Base_Gaurds) then {
call compile PreprocessFileLineNumbers "\addons\sarge\code\init_base_guards.sqf";
};
if (SAR_anim_heli) then {
nul = [900,1,10000,0,true] spawn SAR_fnc_AI_anim_heli;
};

View File

@ -9,7 +9,8 @@
Sarge AI System 2.0+
Modded for Arma 3: Exile Mod
Changes: Dango
http://www.hod-servers.com
https://www.hod-servers.com
https://www.hod-servers.com
Tips:
- All time formats are configured in seconds
@ -21,30 +22,31 @@ SAR_version = "2.2.4";
SAR_HC = true; // If there is no HC it will spawn on server automatically
// TODO: Create dynamic map support for any map
SAR_maps = ["altis","chernarus","taviana","namalsk","lingor3","mbg_celle2","takistan","fallujah","panthera2","tanoa"];
SAR_maps = ["altis","chernarus","chernarus_summer","taviana","namalsk","lingor3","mbg_celle2","takistan","fallujah","panthera2","tanoa"];
SAR_useBlacklist = false;
/* Debug Settings */
SAR_DEBUG = false; // Set to true for RPT info on AI
SAR_EXTREME_DEBUG = false; // Set to true for RPT info on damn near everything
SAR_HITKILL_DEBUG = false; // Set to true for RPT info on AI shooting and killing
SAR_log_AI_kills = false; // Set to true for kill logging by variable. *These variables do not save to the database currently*
SAR_KILL_MSG = true; // Set to true for announcing AI kills to the server
SAR_log_AI_kills = false; // Set to true for kill logging by variable. ! IN DEVELOPMENT !
SAR_KILL_MSG = false; // Set to true for announcing AI kills to the server ! IN DEVELOPMENT !
/* AI Settings */
SAR_dynamic_spawning = true; // Turn dynamic grid spawns on or off
SAR_Base_Gaurds = true; // Turn AI territory gurads on or off
SAR_Base_Gaurds = false; // Turn AI territory gurads on or off ! ONLY USE FOR EXILE MOD !
SAR_anim_heli = true; // Turn animated heli crashes on or off ! Loot only configured for EXILE !
SAR_dynamic_group_respawn = true; // Turn dynamic grid AI respawn on or off
SAR_dynamic_heli_respawn = true; // Turn dynamic grid AI respawn on or off
SAR_AI_COMBAT_VEHICLE = false; // Turn the option for AI using vehicles when in combat on or off
SAR_AI_STEAL_VEHICLE = false; // Turn the option for AI using vehicles to reach their destination on or off
SAR_AI_disable_UPSMON_AI = false; // Turning this off could have unintended consequences
SAR_AI_COMBAT_VEHICLE = false; // AI will steal a vehicle while in combat.
SAR_AI_STEAL_VEHICLE = false; // AI will steal any vehicle to reach target location.
SAR_AI_disable_UPSMON_AI = false; // Turn of UPSMON scripts for all AI ! May cause AI to act in unexpected ways !
SAR_respawn_waittime = 300; // How long to wait before dynamic AI respawns
SAR_DESPAWN_TIMEOUT = 120; // How long to wait before despawning dynamic AI
SAR_DELETE_TIMEOUT = 600; // How long to wait before deleting dead AI
SAR_surv_kill_value = 50; // How much respect players lose if killing friendly AI
SAR_band_kill_value = 50; // How much respect players gain if killing hostile AI
SAR_RESPECT_HOSTILE_LIMIT = -2000; // Friendly AI will shoot at players with respect below this number
SAR_surv_kill_value = 50; // How much respect players lose if killing friendly AI ! ONLY USE FOR EXILE MOD !
SAR_band_kill_value = 100; // How much respect players gain if killing hostile AI ! ONLY USE FOR EXILE MOD !
SAR_RESPECT_HOSTILE_LIMIT = -2000; // Friendly AI will shoot at players with respect below this number ! ONLY USE FOR EXILE MOD !
SAR_REAMMO_INTERVAL = 30; // How often AI will replenish their ammunitions
SAR_DETECT_HOSTILE = 200; // How far away AI can detect hostile AI & players
SAR_DETECT_INTERVAL = 10; // How often AI can detect AI & players
@ -73,6 +75,7 @@ SAR_chance_mili_heli = 35;
// AI experience system
SAR_AI_XP_SYSTEM = true; // Turn this feature on or off
SAR_SHOW_XP_LVL = false;
// Level 1 settings
SAR_AI_XP_LVL_1 = 0; // xp needed to reach this level
@ -97,115 +100,115 @@ SAR_leader_health_factor = 1; // values: 0.1 - 1, 1 = no change, 0.5 = damage ta
SAR_leader_sold_skills = [
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.80, 0],
["spotDistance", 0.70, 0],
["spotTime", 0.65, 0],
["endurance", 0.80, 0],
["courage", 0.80, 0],
["reloadSpeed", 0.80, 0],
["commanding", 0.80, 0],
["general", 0.80, 0]
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
SAR_soldier_sold_skills = [
["aimingAccuracy",0.25, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.25, 0],
["aimingSpeed", 0.70, 0],
["spotDistance", 0.55, 0],
["spotTime", 0.30, 0],
["endurance", 0.60, 0],
["courage", 0.60, 0],
["reloadSpeed", 0.60, 0],
["commanding", 0.60, 0],
["general", 0.60, 0]
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
SAR_sniper_sold_skills = [
["aimingAccuracy",0.80, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.90, 0],
["aimingSpeed", 0.70, 0],
["spotDistance", 0.70, 0],
["spotTime", 0.75, 0],
["endurance", 0.70, 0],
["courage", 0.70, 0],
["reloadSpeed", 0.70, 0],
["commanding", 0.70, 0],
["general", 0.70, 0]
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
// bandit AI
SAR_leader_band_skills = [
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.60, 0],
["spotDistance", 0.40, 0],
["spotTime", 0.45, 0],
["endurance", 0.40, 0],
["courage", 0.50, 0],
["reloadSpeed", 0.60, 0],
["commanding", 0.50, 0],
["general", 0.50, 0]
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
SAR_soldier_band_skills = [
["aimingAccuracy",0.15, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.15, 0],
["aimingSpeed", 0.60, 0],
["spotDistance", 0.40, 0],
["spotTime", 0.40, 0],
["endurance", 0.40, 0],
["courage", 0.40, 0],
["reloadSpeed", 0.40, 0],
["commanding", 0.40, 0],
["general", 0.40, 0]
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
SAR_sniper_band_skills = [
["aimingAccuracy",0.70, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.80, 0],
["aimingSpeed", 0.70, 0],
["spotDistance", 0.90, 0],
["spotTime", 0.55, 0],
["endurance", 0.70, 0],
["courage", 0.70, 0],
["reloadSpeed", 0.70, 0],
["commanding", 0.50, 0],
["general", 0.60, 0]
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
// survivor AI
SAR_leader_surv_skills = [
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.60, 0],
["spotDistance", 0.40, 0],
["spotTime", 0.45, 0],
["endurance", 0.40, 0],
["courage", 0.50, 0],
["reloadSpeed", 0.60, 0],
["commanding", 0.50, 0],
["general", 0.50, 0]
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
SAR_soldier_surv_skills = [
["aimingAccuracy",0.15, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.15, 0],
["aimingSpeed", 0.60, 0],
["spotDistance", 0.45, 0],
["spotTime", 0.20, 0],
["endurance", 0.40, 0],
["courage", 0.40, 0],
["reloadSpeed", 0.40, 0],
["commanding", 0.40, 0],
["general", 0.40, 0]
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
SAR_sniper_surv_skills = [
["aimingAccuracy",0.70, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.80, 0],
["aimingSpeed", 0.70, 0],
["spotDistance", 0.70, 0],
["spotTime", 0.65, 0],
["endurance", 0.70, 0],
["courage", 0.70, 0],
["reloadSpeed", 0.70, 0],
["commanding", 0.50, 0],
["general", 0.60, 0]
["aimingAccuracy",0.35, 0], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0],
["aimingSpeed", 0.35, 0],
["spotDistance", 0.35, 0],
["spotTime", 0.35, 0],
["endurance", 0.35, 0],
["courage", 0.35, 0],
["reloadSpeed", 0.35, 0],
["commanding", 0.35, 0],
["general", 0.35, 0]
];
// Military AI ----------------------------------------------------------
@ -217,19 +220,19 @@ SAR_soldier_sold_list = ["B_G_medic_F","B_G_engineer_F","b_soldier_survival_F","
SAR_sold_leader_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
SAR_sold_leader_pistol_list = [];
SAR_sold_leader_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60],["Exile_Item_InstaDoc",100]];
SAR_sold_leader_items = [];
SAR_sold_leader_tools = [["ItemMap",50],["ItemCompass",30],["NVGoggles",5],["ItemRadio",100]];
SAR_sold_rifleman_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
SAR_sold_rifleman_pistol_list = [];
SAR_sold_rifleman_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
SAR_sold_rifleman_items = [];
SAR_sold_rifleman_tools = [["ItemMap",50],["ItemCompass",30]];
SAR_sold_sniper_weapon_list = ["srifle_DMR_02_F","arifle_MXM_F","srifle_DMR_04_F"];
SAR_sold_sniper_pistol_list = [];
SAR_sold_sniper_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
SAR_sold_sniper_items = [];
SAR_sold_sniper_tools = [["ItemMap",50],["ItemCompass",30]];
// Survivor AI ----------------------------------------------------------
@ -241,19 +244,19 @@ SAR_soldier_surv_list = ["B_G_Soldier_M_F"];
SAR_surv_leader_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
SAR_surv_leader_pistol_list = [];
SAR_surv_leader_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
SAR_surv_leader_items = [];
SAR_surv_leader_tools = [["ItemMap",50],["ItemCompass",30],["NVGoggles",5],["ItemRadio",100]];
SAR_surv_rifleman_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
SAR_surv_rifleman_pistol_list = [];
SAR_surv_rifleman_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
SAR_surv_rifleman_items = [];
SAR_surv_rifleman_tools = [["ItemMap",50],["ItemCompass",30]];
SAR_surv_sniper_weapon_list = ["srifle_DMR_02_F","arifle_MXM_F","srifle_DMR_04_F"];
SAR_surv_sniper_pistol_list = [];
SAR_surv_sniper_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
SAR_surv_sniper_items = [];
SAR_surv_sniper_tools = [["ItemMap",50],["ItemCompass",30]];
// Hostile AI ----------------------------------------------------------
@ -265,19 +268,19 @@ SAR_soldier_band_list = ["O_G_Soldier_lite_F"];
SAR_band_leader_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
SAR_band_leader_pistol_list = [];
SAR_band_leader_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
SAR_band_leader_items = [];
SAR_band_leader_tools = [["ItemMap",50],["ItemCompass",30],["NVGoggles",5],["ItemRadio",100]];
SAR_band_rifleman_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
SAR_band_rifleman_pistol_list = [];
SAR_band_rifleman_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
SAR_band_rifleman_items = [];
SAR_band_rifleman_tools = [["ItemMap",50],["ItemCompass",30]];
SAR_band_sniper_weapon_list = ["srifle_DMR_02_F","arifle_MXM_F","srifle_DMR_04_F"];
SAR_band_sniper_pistol_list = [];
SAR_band_sniper_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
SAR_band_sniper_items = [];
SAR_band_sniper_tools = [["ItemMap",50],["ItemCompass",30]];