This commit is contained in:
Teh Dango 2016-08-21 12:48:06 -04:00
parent 7067ad9b0a
commit 3b2cfcb974
52 changed files with 1065 additions and 1251 deletions

View File

@ -1,11 +1,12 @@
ATTENTION! Tips:
All code from prior versions of 2.0.0 MUST be removed from the init.sqf and the descriptions.ext! - To configure Sarge AI use the fn_preInit.sqf file inside the init folder of the sarge PBO.
- You can make groups size, type and percentage adjustments by using the *_grps_mapName.sqf file inside the code\map_config folder.
### Step 1 ### Step 1
Place the sarge and upsmon PBOs inside the @ExileServer\addons folder. Place the sarge PBO inside the @ExileServer\addons folder.
### Step 2 ### Step 2
Place the ratingFix.sqf inside the mission root then open the config.cpp file in the mission PBO root and search for the word CfgExileCustomCode and make it look like the following: Place the ratingFix.sqf inside the mission root then open the config.cpp file in the mission root and search for the word CfgExileCustomCode and add this line:
```html ```html
class CfgExileCustomCode class CfgExileCustomCode
{ {
@ -40,5 +41,3 @@ Now change it to this:
```html ```html
if(0==1)then if(0==1)then
``` ```
If you want to make changes in the sarge code then unpackage the PBO, make changes and repackage. Most customizations can be found in the SAR_config.sqf file.

BIN
sarge.pbo

Binary file not shown.

View File

@ -1,288 +0,0 @@
/*
# 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
https://www.hod-servers.com
*/
SAR_version = "2.2.3";
SAR_HC = true; // If there is no HC it will spawn on server
SAR_maps = ["altis","chernarus","taviana","namalsk","lingor3","mbg_celle2","takistan","fallujah","panthera2","tanoa"];
/* Debug & RPT Settings */
SAR_DEBUG = true; // 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 = true; // Set to true for RPT info on AI shooting and killing
SAR_log_AI_kills = true; // 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
/* Dynamic 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_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_respawn_waittime = 300; // How long to wait before dynamic IA respawns
SAR_DESPAWN_TIMEOUT = 120; // How long to wait before despawning dynamic AI
SAR_DELETE_TIMEOUT = 300; // How long to wait before deleting dead AI
SAR_surv_kill_value = 250; // How much respect players lose if killing friendly AI
SAR_band_kill_value = 50; // How much respect players lose if killing hostile AI
SAR_RESPECT_HOSTILE_LIMIT = -2500; // Friendly AI will shoot at players with respect below this number
SAR_REAMMO_INTERVAL = 30; // How often AI will replenish their ammo count
SAR_DETECT_HOSTILE = 200; // How far away AI can detect hostile AI & players
SAR_DETECT_INTERVAL = 15; // How often AI can detect AI & players
SAR_DETECT_HOSTILE_FROM_VEHICLE = 500; // How far AI can detect hostile AI & players while in a vehicle
SAR_DETECT_FROM_VEHICLE_INTERVAL = 5; // How often AI can detect hostile AI & players while in a vehicle
// Chance the AI will spawn
SAR_chance_bandits = 90; // Chance to spawn 1-100%
SAR_chance_soldiers = 75; // Chance to spawn 1-100%
SAR_chance_survivors = 80; // Chance to spawn 1-100%
// Max number of AI groups allowed at once
SAR_max_grps_bandits = 2; // Total groups per grid
SAR_max_grps_soldiers = 2; // Total groups per grid
SAR_max_grps_survivors = 2; // Total groups per grid
// Size of AI groups plus a leader
SAR_max_grpsize_bandits = 2; // Size of the group
SAR_max_grpsize_soldiers = 2; // Size of the group
SAR_max_grpsize_survivors = 2; // Size of the group
// Chance the AI Helicopters will spawn - IN DEVELOPMENT
SAR_chance_band_heli = 35;
SAR_chance_surv_heli = 35;
SAR_chance_mili_heli = 35;
// AI experience system
SAR_AI_XP_SYSTEM = true; // Turn this feature on or off
// Level 1 settings
SAR_AI_XP_LVL_1 = 0; // xp needed to reach this level
SAR_AI_XP_NAME_1 = "Rookie"; // name of the level range
SAR_AI_XP_ARMOR_1 = 1; // armor value for this level - values: 0.1 - 1, 1 = no change, 0.5 = damage taken reduced by 50%, 0.1 = damage taken reduced by 90%
// Level 2 settings
SAR_AI_XP_LVL_2 = 5;
SAR_AI_XP_NAME_2 = "Veteran";
SAR_AI_XP_ARMOR_2 = 0.5;
// Level 3 settings
SAR_AI_XP_LVL_3 = 20;
SAR_AI_XP_NAME_3 = "Legendary";
SAR_AI_XP_ARMOR_3 = 0.3;
// Bonus factors for leaders
SAR_leader_health_factor = 1; // values: 0.1 - 1, 1 = no change, 0.5 = damage taken reduced by 50%, 0.1 = damage taken reduced by 90% - EXPERIMENTAL
// military AI
SAR_leader_sold_skills = [
["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0.10],
["aimingSpeed", 0.80, 0.20],
["spotDistance", 0.70, 0.30],
["spotTime", 0.65, 0.20],
["endurance", 0.80, 0.20],
["courage", 0.80, 0.20],
["reloadSpeed", 0.80, 0.20],
["commanding", 0.80, 0.20],
["general", 0.80, 0.20]
];
SAR_soldier_sold_skills = [
["aimingAccuracy",0.25, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.25, 0.10],
["aimingSpeed", 0.70, 0.20],
["spotDistance", 0.55, 0.30],
["spotTime", 0.30, 0.20],
["endurance", 0.60, 0.20],
["courage", 0.60, 0.20],
["reloadSpeed", 0.60, 0.20],
["commanding", 0.60, 0.20],
["general", 0.60, 0.20]
];
SAR_sniper_sold_skills = [
["aimingAccuracy",0.80, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.90, 0.10],
["aimingSpeed", 0.70, 0.20],
["spotDistance", 0.70, 0.30],
["spotTime", 0.75, 0.20],
["endurance", 0.70, 0.20],
["courage", 0.70, 0.20],
["reloadSpeed", 0.70, 0.20],
["commanding", 0.70, 0.20],
["general", 0.70, 0.20]
];
// bandit AI
SAR_leader_band_skills = [
["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0.10],
["aimingSpeed", 0.60, 0.20],
["spotDistance", 0.40, 0.30],
["spotTime", 0.45, 0.20],
["endurance", 0.40, 0.20],
["courage", 0.50, 0.20],
["reloadSpeed", 0.60, 0.20],
["commanding", 0.50, 0.20],
["general", 0.50, 0.20]
];
SAR_soldier_band_skills = [
["aimingAccuracy",0.15, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.15, 0.10],
["aimingSpeed", 0.60, 0.20],
["spotDistance", 0.40, 0.20],
["spotTime", 0.40, 0.20],
["endurance", 0.40, 0.20],
["courage", 0.40, 0.20],
["reloadSpeed", 0.40, 0.20],
["commanding", 0.40, 0.20],
["general", 0.40, 0.20]
];
SAR_sniper_band_skills = [
["aimingAccuracy",0.70, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.80, 0.10],
["aimingSpeed", 0.70, 0.20],
["spotDistance", 0.90, 0.10],
["spotTime", 0.55, 0.20],
["endurance", 0.70, 0.20],
["courage", 0.70, 0.20],
["reloadSpeed", 0.70, 0.20],
["commanding", 0.50, 0.20],
["general", 0.60, 0.20]
];
// survivor AI
SAR_leader_surv_skills = [
["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.35, 0.10],
["aimingSpeed", 0.60, 0.20],
["spotDistance", 0.40, 0.30],
["spotTime", 0.45, 0.20],
["endurance", 0.40, 0.20],
["courage", 0.50, 0.20],
["reloadSpeed", 0.60, 0.20],
["commanding", 0.50, 0.20],
["general", 0.50, 0.20]
];
SAR_soldier_surv_skills = [
["aimingAccuracy",0.15, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.15, 0.10],
["aimingSpeed", 0.60, 0.20],
["spotDistance", 0.45, 0.30],
["spotTime", 0.20, 0.20],
["endurance", 0.40, 0.20],
["courage", 0.40, 0.20],
["reloadSpeed", 0.40, 0.20],
["commanding", 0.40, 0.20],
["general", 0.40, 0.20]
];
SAR_sniper_surv_skills = [
["aimingAccuracy",0.70, 0.10], // skilltype, <min value>, <random value added to min>;
["aimingShake", 0.80, 0.10],
["aimingSpeed", 0.70, 0.20],
["spotDistance", 0.70, 0.30],
["spotTime", 0.65, 0.20],
["endurance", 0.70, 0.20],
["courage", 0.70, 0.20],
["reloadSpeed", 0.70, 0.20],
["commanding", 0.50, 0.20],
["general", 0.60, 0.20]
];
// Military AI ----------------------------------------------------------
// ----------------------------------------------------------------------
SAR_leader_sold_list = ["B_officer_F"];
SAR_sniper_sold_list = ["B_ghillie_lsh_F","B_sniper_F"];
SAR_soldier_sold_list = ["B_G_medic_F","B_G_engineer_F","b_soldier_survival_F","B_G_Soldier_TL_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_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_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_tools = [["ItemMap",50],["ItemCompass",30]];
// Survivor AI ----------------------------------------------------------
// ---------------------------------------------------------------------
SAR_leader_surv_list = ["B_G_Soldier_A_F"];
SAR_sniper_surv_list = ["B_G_Soldier_LAT_F"];
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_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_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_tools = [["ItemMap",50],["ItemCompass",30]];
// Hostile AI ----------------------------------------------------------
// ---------------------------------------------------------------------
SAR_leader_band_list = ["O_G_Soldier_lite_F"];
SAR_sniper_band_list = ["O_G_Soldier_lite_F"];
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_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_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_tools = [["ItemMap",50],["ItemCompass",30]];
// Helicopter Types ----------------------------------------------------
// ---------------------------------------------------------------------
SAR_heli_type = ["B_Heli_Light_01_stripped_F"];
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
SAR_AI_friendly_side = RESISTANCE;
SAR_AI_unfriendly_side = EAST;
SAR_AI_monitor = [];
SAR_leader_number = 0;

View File

@ -1,43 +0,0 @@
/*
# 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
https://www.hod-servers.com
*/
class CfgIdentities {
class id_SAR {
name = "id_SAR";
face = "WhiteHead_06";
glasses = "None";
speaker = "NoVoice";
pitch = 1.00;
};
class id_SAR_band : id_SAR {
name = "id_SAR_band";
face = "PersianHead_A3_02";
};
class id_SAR_sold_lead : id_SAR {
name = "id_SAR_sold_lead";
face = "WhiteHead_02";
};
class id_SAR_sold_man : id_SAR {
name = "id_SAR_sold_man";
face = "WhiteHead_02";
};
class id_SAR_surv_lead : id_SAR {
name = "id_SAR_surv_lead";
face = "WhiteHead_02";
};
class id_SAR_surv_man : id_SAR {
name = "id_SAR_surv_man";
face = "WhiteHead_04";
};
};

View File

@ -1,242 +0,0 @@
/*
# 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
https://www.hod-servers.com
*/
private ["_ai_type","_riflemenlist","_side","_leader_group","_patrol_area_name","_rndpos","_groupheli","_heli","_leader","_man2heli","_man3heli","_argc","_grouptype","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_leaderskills","_sniperskills","_ups_para_list","_type","_error","_respawn_time","_leadername"];
if (!isServer) exitWith {};
_patrol_area_name = _this select 0;
_argc = count _this;
_error = false;
if (_argc > 1) then {
_grouptype = _this select 1;
switch (_grouptype) do
{
case 1:
{
_side = SAR_AI_friendly_side;
_type = "sold";
_ai_type = "AI Military";
_ai_id = "id_SAR_sold_man";
};
case 2:
{
_side = SAR_AI_friendly_side;
_type = "surv";
_ai_type = "AI Survivor";
_ai_id = "id_SAR_surv_lead";
};
case 3:
{
_side = SAR_AI_unfriendly_side;
_type = "band";
_ai_type = "AI Bandit";
_ai_id = "id_SAR_band";
};
};
} else {
_error = true;
};
if (_argc > 2) then {
_respawn = _this select 2;
} else {
_respawn = false;
};
if (_argc > 3) then {
_respawn_time = _this select 3;
} else {
_respawn_time = SAR_respawn_waittime;
};
if (_error) exitWith {diag_log "SAR_AI: Heli patrol setup failed, wrong parameters passed!";};
_leaderNPC = call compile format ["SAR_leader_%1_list",_type];
_riflemenlist = call compile format ["SAR_soldier_%1_list",_type];
_leaderskills = call compile format ["SAR_leader_%1_skills",_type];
_sniperskills = call compile format ["SAR_sniper_%1_skills",_type];
_leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
_leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
// get a random starting position, UPSMON will handle the rest
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
_groupheli = createGroup _side;
// protect group from being deleted by DayZ
_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 engineon true;
_heli setVehicleAmmo 1;
[_heli] joinSilent _groupheli;
sleep 1;
_leader = _groupheli createunit [(_leaderNPC call BIS_fnc_selectRandom), [(_rndpos select 0) + 10, _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
[_leader,_leader_weapon_names,_leader_items,_leader_tools] call SAR_unit_loadout;
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
[_leader] spawn SAR_AI_trace_veh;
switch (_grouptype) do
{
case 1:{_leader setIdentity "id_SAR_sold_man";};
case 2:{_leader setIdentity "id_SAR_surv_lead";};
case 3:{_leader setIdentity "id_SAR_band";};
};
[_leader] spawn SAR_AI_reammo;
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
_leader moveInDriver _heli;
_leader assignAsDriver _heli;
[_leader] joinSilent _groupheli;
// set skills of the leader
{
_leader setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
} foreach _leaderskills;
// store AI type on the AI
_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 "FULL";
_leader setBehaviour "AWARE";
// Gunner 1
_man2heli = _groupheli createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) - 30, _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
_soldier_weapon_names = ["rifleman",_type] call SAR_unit_loadout_weapons;
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
[_man2heli,_soldier_weapon_names,_soldier_items,_soldier_tools] call SAR_unit_loadout;
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _man2heli; _man2heli addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
_man2heli moveInTurret [_heli,[0]];
[_man2heli] spawn SAR_AI_trace_veh;
switch (_grouptype) do
{
case 1:{_man2heli setIdentity "id_SAR_sold_man";};
case 2:{_man2heli setIdentity "id_SAR_surv_lead";};
case 3:{_man2heli setIdentity "id_SAR_band";};
};
[_man2heli] spawn SAR_AI_reammo;
_man2heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
_man2heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
[_man2heli] joinSilent _groupheli;
// set skills
{
_man2heli setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
} foreach _sniperskills;
// store AI type on the AI
_man2heli setVariable ["SAR_AI_type",_ai_type,false];
// store experience value on AI
_man2heli setVariable ["SAR_AI_experience",0,false];
//Gunner 2
_man3heli = _groupheli createunit [_riflemenlist call BIS_fnc_selectRandom, [_rndpos select 0, (_rndpos select 1) + 30, 0], [], 0.5, "CAN_COLLIDE"];
_soldier_weapon_names = ["rifleman",_type] call SAR_unit_loadout_weapons;
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
[_man3heli,_soldier_weapon_names,_soldier_items,_soldier_tools] call SAR_unit_loadout;
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _man3heli; _man3heli addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
_man3heli moveInTurret [_heli,[1]];
[_man3heli] spawn SAR_AI_trace_veh;
switch (_grouptype) do
{
case 1:{_man3heli setIdentity "id_SAR_sold_man";};
case 2:{_man3heli setIdentity "id_SAR_surv_lead";};
case 3:{_man3heli setIdentity "id_SAR_band";};
};
[_man3heli] spawn SAR_AI_reammo;
_man3heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
_man3heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
[_man3heli] joinSilent _groupheli;
// set skills
{
_man3heli setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
} foreach _sniperskills;
// store AI type on the AI
_man3heli setVariable ["SAR_AI_type",_ai_type,false];
// store experience value on AI
_man3heli setVariable ["SAR_AI_experience",0,false];
// initialize upsmon for the group
_ups_para_list = [_leader,_patrol_area_name,'NOFOLLOW','AWARE','SPAWNED','DELETE:',SAR_DELETE_TIMEOUT];
if (_respawn) then {
_ups_para_list pushBack ['RESPAWN'];
_ups_para_list pushBack ['RESPAWNTIME:'];
_ups_para_list pushBack [_respawn_time];
};
_ups_para_list spawn UPSMON;
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 = _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;
};
_groupheli;

View File

@ -159,7 +159,7 @@ UPSMON_Logic_civkill = _group createUnit ["LOGIC", [1,1,1], [], 0, "NONE"];
_group = nil; _group = nil;
_center = nil; _center = nil;
UPSMON = compile preProcessFileLineNumbers "\addons\sarge\UPSMON.sqf"; UPSMON = compile preProcessFileLineNumbers "\addons\sarge\UPSMON\UPSMON.sqf";
UPSMON_CreateGroup = compile preProcessFileLineNumbers "\addons\sarge\UPSMON\UPSMON_CreateGroup.sqf"; UPSMON_CreateGroup = compile preProcessFileLineNumbers "\addons\sarge\UPSMON\UPSMON_CreateGroup.sqf";
//Core //Core

View File

@ -12,6 +12,6 @@ If (!IsNull _npc && alive _npc && _grp in UPSMON_NPCs) then
If (alive _npc) then If (alive _npc) then
{ {
_this execvm "\addons\sarge\UPSMON.sqf"; _this execvm "\addons\sarge\UPSMON\UPSMON.sqf";
}; };
}; };

View File

@ -14,7 +14,7 @@
*/ */
private ["_timeout","_triggername","_tmparr","_markername","_valuearray","_grps_band","_grps_sold","_grps_surv","_trigger"]; private ["_timeout","_triggername","_tmparr","_markername","_valuearray","_grps_band","_grps_sold","_grps_surv","_trigger"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_timeout = SAR_DESPAWN_TIMEOUT; _timeout = SAR_DESPAWN_TIMEOUT;

View File

@ -14,7 +14,7 @@
*/ */
private ["_sizeOfBase","_authorizedGateCodes","_authorizedUID","_flagPole","_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"]; private ["_sizeOfBase","_authorizedGateCodes","_authorizedUID","_flagPole","_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"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
diag_log "Sarge AI System: Territory gaurds are initializing now."; diag_log "Sarge AI System: Territory gaurds are initializing now.";
@ -62,7 +62,11 @@ _leaderskills = call compile format ["SAR_leader_%1_skills",_type];
_riflemanskills = call compile format ["SAR_soldier_%1_skills",_type]; _riflemanskills = call compile format ["SAR_soldier_%1_skills",_type];
_sniperskills = call compile format ["SAR_sniper_%1_skills",_type]; _sniperskills = call compile format ["SAR_sniper_%1_skills",_type];
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos; if (SAR_useBlacklist) then {
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
} else {
_rndpos = [_patrol_area_name] call UPSMON_pos;
};
_group = createGroup _side; _group = createGroup _side;
@ -81,12 +85,12 @@ _leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
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);}; 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_AI_base_trace; [_leader] spawn SAR_fnc_AI_trace_base;
_leader setIdentity "id_SAR_sold_lead"; _leader setIdentity "id_SAR_sold_lead";
[_leader] spawn SAR_AI_reammo; [_leader] spawn SAR_fnc_AI_refresh;
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
/* /*
// TODO: Convert to Exile friendly action // TODO: Convert to Exile friendly action
_cond="(side _this == west) && (side _target == resistance) && ('ItemBloodbag' in magazines _this)"; _cond="(side _this == west) && (side _target == resistance) && ('ItemBloodbag' in magazines _this)";
@ -128,12 +132,12 @@ for "_i" from 0 to (_snipers - 1) do
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);}; 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_AI_base_trace; [_this] spawn SAR_fnc_AI_trace_base;
_this setIdentity "id_SAR"; _this setIdentity "id_SAR";
[_this] spawn SAR_AI_reammo; [_this] spawn SAR_fnc_AI_refresh;
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
[_this] joinSilent _group; [_this] joinSilent _group;
@ -171,12 +175,12 @@ for "_i" from 0 to (_riflemen - 1) do
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);}; 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_AI_base_trace; [_this] spawn SAR_fnc_AI_trace_base;
_this setIdentity "id_SAR_sold_man"; _this setIdentity "id_SAR_sold_man";
[_this] spawn SAR_AI_reammo; [_this] spawn SAR_fnc_AI_refresh;
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
[_this] joinSilent _group; [_this] joinSilent _group;

View File

@ -14,7 +14,7 @@
*/ */
private ["_ai_type","_riflemenlist","_side","_leader_group","_patrol_area_name","_rndpos","_groupheli","_heli","_leader","_man2heli","_man3heli","_argc","_grouptype","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_leaderskills","_sniperskills","_ups_para_list","_type","_error","_respawn_time","_leadername"]; private ["_ai_type","_riflemenlist","_side","_leader_group","_patrol_area_name","_rndpos","_groupheli","_heli","_leader","_man2heli","_man3heli","_argc","_grouptype","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_leaderskills","_sniperskills","_ups_para_list","_type","_error","_respawn_time","_leadername"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_patrol_area_name = _this select 0; _patrol_area_name = _this select 0;
_argc = count _this; _argc = count _this;
@ -62,7 +62,7 @@ if (_argc > 3) then {
_respawn_time = SAR_respawn_waittime; _respawn_time = SAR_respawn_waittime;
}; };
if (_error) exitWith {diag_log "SAR_AI: Heli patrol setup failed, wrong parameters passed!";}; if (_error) exitWith {diag_log "SAR_fnc_AI_infantry: Heli patrol setup failed, wrong parameters passed!";};
_leaderNPC = call compile format ["SAR_leader_%1_list",_type]; _leaderNPC = call compile format ["SAR_leader_%1_list",_type];
_riflemenlist = call compile format ["SAR_soldier_%1_list",_type]; _riflemenlist = call compile format ["SAR_soldier_%1_list",_type];
@ -74,8 +74,12 @@ _leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
_leader_items = ["leader",_type] call SAR_unit_loadout_items; _leader_items = ["leader",_type] call SAR_unit_loadout_items;
_leader_tools = ["leader",_type] call SAR_unit_loadout_tools; _leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
// get a random starting position, UPSMON will handle the rest // get a random starting position that is on land
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos; if (SAR_useBlacklist) then {
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
} else {
_rndpos = [_patrol_area_name] call UPSMON_pos;
};
_groupheli = createGroup _side; _groupheli = createGroup _side;
@ -98,17 +102,17 @@ _leader = _groupheli createunit [(_leaderNPC call BIS_fnc_selectRandom), [(_rndp
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);}; if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
[_leader] spawn SAR_AI_trace_veh; [_leader] spawn SAR_fnc_AI_trace_vehicle;
switch (_grouptype) do switch (_grouptype) do
{ {
case 1:{_leader setIdentity "id_SAR_sold_man";}; case 1:{_leader setIdentity "id_SAR_sold_man";};
case 2:{_leader setIdentity "id_SAR_surv_lead";}; case 2:{_leader setIdentity "id_SAR_surv_lead";};
case 3:{_leader setIdentity "id_SAR_band";}; case 3:{_leader setIdentity "id_SAR_band";};
}; };
[_leader] spawn SAR_AI_reammo; [_leader] spawn SAR_fnc_AI_refresh;
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
_leader moveInDriver _heli; _leader moveInDriver _heli;
_leader assignAsDriver _heli; _leader assignAsDriver _heli;
@ -143,17 +147,17 @@ if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _man2heli; _man2heli a
_man2heli moveInTurret [_heli,[0]]; _man2heli moveInTurret [_heli,[0]];
[_man2heli] spawn SAR_AI_trace_veh; [_man2heli] spawn SAR_fnc_AI_trace_vehicle;
switch (_grouptype) do switch (_grouptype) do
{ {
case 1:{_man2heli setIdentity "id_SAR_sold_man";}; case 1:{_man2heli setIdentity "id_SAR_sold_man";};
case 2:{_man2heli setIdentity "id_SAR_surv_lead";}; case 2:{_man2heli setIdentity "id_SAR_surv_lead";};
case 3:{_man2heli setIdentity "id_SAR_band";}; case 3:{_man2heli setIdentity "id_SAR_band";};
}; };
[_man2heli] spawn SAR_AI_reammo; [_man2heli] spawn SAR_fnc_AI_refresh;
_man2heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _man2heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_man2heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _man2heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
[_man2heli] joinSilent _groupheli; [_man2heli] joinSilent _groupheli;
@ -181,17 +185,17 @@ if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _man3heli; _man3heli a
_man3heli moveInTurret [_heli,[1]]; _man3heli moveInTurret [_heli,[1]];
[_man3heli] spawn SAR_AI_trace_veh; [_man3heli] spawn SAR_fnc_AI_trace_vehicle;
switch (_grouptype) do switch (_grouptype) do
{ {
case 1:{_man3heli setIdentity "id_SAR_sold_man";}; case 1:{_man3heli setIdentity "id_SAR_sold_man";};
case 2:{_man3heli setIdentity "id_SAR_surv_lead";}; case 2:{_man3heli setIdentity "id_SAR_surv_lead";};
case 3:{_man3heli setIdentity "id_SAR_band";}; case 3:{_man3heli setIdentity "id_SAR_band";};
}; };
[_man3heli] spawn SAR_AI_reammo; [_man3heli] spawn SAR_fnc_AI_refresh;
_man3heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _man3heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_man3heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _man3heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
[_man3heli] joinSilent _groupheli; [_man3heli] joinSilent _groupheli;
@ -221,22 +225,4 @@ if(SAR_DEBUG) then {
diag_log format["Sarge's AI System: AI Heli patrol (%2) spawned in: %1.",_patrol_area_name,_groupheli]; 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 = _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;
};
_groupheli; _groupheli;

View File

@ -14,7 +14,7 @@
*/ */
private ["_ai_veh_dmg","_ai_veh","_ai_veh_hitsource","_ai_veh_type","_ai_veh_side","_ai_veh_group_side","_ai_veh_hitsource_group_side","_ai_veh_hitsource_type","_ai_veh_hitsource_name","_ai_veh_hitsource_side","_clientmachine","_player_rating","_shot_veh","_ai_part","_ai_veh_projectile","_message"]; private ["_ai_veh_dmg","_ai_veh","_ai_veh_hitsource","_ai_veh_type","_ai_veh_side","_ai_veh_group_side","_ai_veh_hitsource_group_side","_ai_veh_hitsource_type","_ai_veh_hitsource_name","_ai_veh_hitsource_side","_clientmachine","_player_rating","_shot_veh","_ai_part","_ai_veh_projectile","_message"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_ai_veh = _this select 0; _ai_veh = _this select 0;
_ai_part = _this select 1; _ai_part = _this select 1;

View File

@ -14,7 +14,7 @@
*/ */
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"]; 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"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_patrol_area_name = _this select 0; _patrol_area_name = _this select 0;
_grouptype = _this select 1; _grouptype = _this select 1;
@ -56,7 +56,11 @@ _leaderList = call compile format ["SAR_leader_%1_list", _type];
_leaderskills = call compile format ["SAR_leader_%1_skills", _type]; _leaderskills = call compile format ["SAR_leader_%1_skills", _type];
// get a random starting position that is on land // get a random starting position that is on land
_rndpos = [_patrol_area_name] call UPSMON_pos; if (SAR_useBlacklist) then {
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
} else {
_rndpos = [_patrol_area_name] call UPSMON_pos;
};
_group = createGroup _side; _group = createGroup _side;
@ -71,12 +75,12 @@ _leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);}; if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
[_leader] spawn SAR_AI_trace; [_leader] spawn SAR_fnc_AI_trace;
_leader setIdentity "id_SAR_sold_lead"; _leader setIdentity "id_SAR_sold_lead";
[_leader] spawn SAR_AI_reammo; [_leader] spawn SAR_fnc_AI_refresh;
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _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}}];
@ -104,9 +108,9 @@ _leader setVariable ["SAR_AI_type",_ai_type + " Leader",false];
// store experience value on AI // store experience value on AI
_leader setVariable ["SAR_AI_experience",0,false]; _leader setVariable ["SAR_AI_experience",0,false];
/* // set behaviour & speedmode // set behaviour & speedmode
_leader setspeedmode "FULL"; _leader setspeedmode "FULL";
_leader setBehaviour "AWARE"; */ _leader setBehaviour "AWARE";
// Establish siper unit type and skills // Establish siper unit type and skills
_sniperlist = call compile format ["SAR_sniper_%1_list", _type]; _sniperlist = call compile format ["SAR_sniper_%1_list", _type];
@ -125,12 +129,12 @@ for "_i" from 0 to (_snipers - 1) do
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);}; 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_AI_trace; [_this] spawn SAR_fnc_AI_trace;
_this setIdentity "id_SAR"; _this setIdentity "id_SAR";
[_this] spawn SAR_AI_reammo; [_this] spawn SAR_fnc_AI_refresh;
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
_this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}]; _this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}];
@ -164,12 +168,12 @@ for "_i" from 0 to (_riflemen - 1) do
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);}; 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_AI_trace; [_this] spawn SAR_fnc_AI_trace;
_this setIdentity "id_SAR_sold_man"; _this setIdentity "id_SAR_sold_man";
[_this] spawn SAR_AI_reammo; [_this] spawn SAR_fnc_AI_refresh;
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
_this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}]; _this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}];
@ -188,24 +192,24 @@ for "_i" from 0 to (_riflemen - 1) do
}; };
// initialize upsmon for the group // initialize upsmon for the group
_ups_para_list = [_leader,_patrol_area_name,'FULL','AWARE','NOSHARE','NOFOLLOW','AWARE','SPAWNED','DELETE:',SAR_DELETE_TIMEOUT]; _ups_para_list = [_leader,_patrol_area_name,"NOSHARE","NOFOLLOW","SPAWNED","DELETE:",SAR_DELETE_TIMEOUT];
if (_respawn) then { if (_respawn) then {
_ups_para_list pushBack ['RESPAWN']; _ups_para_list pushBack ["RESPAWN"];
_ups_para_list pushBack ['RESPAWNTIME:']; _ups_para_list pushBack ["RESPAWNTIME:"];
_ups_para_list pushBack [_respawn_time]; _ups_para_list pushBack [_respawn_time];
}; };
if (!SAR_AI_STEAL_VEHICLE) then { if (!SAR_AI_STEAL_VEHICLE) then {
_ups_para_list pushBack ['NOVEH2']; _ups_para_list pushBack ["NOVEH2"];
}; };
if (!SAR_AI_COMBAT_VEHICLE) then { if (!SAR_AI_COMBAT_VEHICLE) then {
_ups_para_list pushBack ['NOVEH']; _ups_para_list pushBack ["NOVEH"];
}; };
if (SAR_AI_disable_UPSMON_AI) then { if (SAR_AI_disable_UPSMON_AI) then {
_ups_para_list pushBack ['NOAI']; _ups_para_list pushBack ["NOAI"];
}; };
if(_action == "") then {_action = "PATROL";}; if(_action == "") then {_action = "PATROL";};
@ -217,7 +221,7 @@ switch (_action) do {
}; };
case "FORTIFY": case "FORTIFY":
{ {
_ups_para_list pushBack ['FORTIFY']; _ups_para_list pushBack ["FORTIFY"];
_ups_para_list spawn UPSMON; _ups_para_list spawn UPSMON;
}; };
case "PATROL": case "PATROL":
@ -226,7 +230,7 @@ switch (_action) do {
}; };
case "AMBUSH2": case "AMBUSH2":
{ {
_ups_para_list pushBack ['AMBUSH']; _ups_para_list pushBack ["AMBUSH"];
_ups_para_list spawn UPSMON; _ups_para_list spawn UPSMON;
}; };
default default
@ -239,22 +243,4 @@ 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)]; 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; _group;

View File

@ -14,7 +14,7 @@
*/ */
private ["_message","_ai","_aikiller","_aikilled_type","_aikilled_side","_aikilled_group_side","_aikiller_group_side","_aikiller_type","_aikiller_name","_aikiller_side","_respect","_humankills","_banditkills","_tmp","_sphere_alpha","_sphere_red","_sphere_green","_sphere_blue","_obj_text_string","_ai_type","_ai_killer_type","_ai_xp_type"]; private ["_message","_ai","_aikiller","_aikilled_type","_aikilled_side","_aikilled_group_side","_aikiller_group_side","_aikiller_type","_aikiller_name","_aikiller_side","_respect","_humankills","_banditkills","_tmp","_sphere_alpha","_sphere_red","_sphere_green","_sphere_blue","_obj_text_string","_ai_type","_ai_killer_type","_ai_xp_type"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_ai = _this select 0; _ai = _this select 0;
_aikiller = _this select 1; _aikiller = _this select 1;

View File

@ -14,7 +14,7 @@
*/ */
private ["_ai","_sleeptime","_veh_weapons","_vehicle","_weapons","_reloadmag","_magazintypes","_legit_weapon","_weap_obj"]; private ["_ai","_sleeptime","_veh_weapons","_vehicle","_weapons","_reloadmag","_magazintypes","_legit_weapon","_weap_obj"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_ai = _this select 0; _ai = _this select 0;

View File

@ -14,7 +14,7 @@
*/ */
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"]; 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"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_playerlist = _this select 0; _playerlist = _this select 0;
_triggername = _this select 1; _triggername = _this select 1;
@ -62,10 +62,27 @@ for "_i" from (count _grps_band) to ((_max_grps select 0) - 1) do
if(_chance < _probability) then { if(_chance < _probability) then {
_snipers=floor (random ((_max_p_grp select 0)-1)); _snipers=floor (random ((_max_p_grp select 0)-1));
_soldiers =((_max_p_grp select 0)-1) - _snipers; _soldiers =((_max_p_grp select 0)-1) - _snipers;
_group = [_markername,3,_snipers,_soldiers,"",_respawn] call SAR_AI; _group = [_markername,3,_snipers,_soldiers,"",_respawn] call SAR_fnc_AI_infantry;
_grps_upd set [count _grps_upd,_group]; _grps_upd set [count _grps_upd,_group];
// update AI monitor // update AI monitor
_check = [["grps_band"],[_grps_upd],_markername] call SAR_AI_mon_upd; _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;
};
}; };
}; };
}; };
@ -81,10 +98,27 @@ for "_i" from (count _grps_sold) to ((_max_grps select 1) - 1) do
if(_chance < _probability) then { if(_chance < _probability) then {
_snipers=floor (random ((_max_p_grp select 1)-1)); _snipers=floor (random ((_max_p_grp select 1)-1));
_soldiers =((_max_p_grp select 1)-1) - _snipers; _soldiers =((_max_p_grp select 1)-1) - _snipers;
_group = [_markername,1,_snipers,_soldiers,"",_respawn] call SAR_AI; _group = [_markername,1,_snipers,_soldiers,"",_respawn] call SAR_fnc_AI_infantry;
_grps_upd set [count _grps_upd,_group]; _grps_upd set [count _grps_upd,_group];
// update AI monitor // update AI monitor
_check = [["grps_sold"],[_grps_upd],_markername] call SAR_AI_mon_upd; _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;
};
}; };
}; };
}; };
@ -100,10 +134,27 @@ for "_i" from (count _grps_surv) to ((_max_grps select 2) - 1) do
if(_chance < _probability) then { if(_chance < _probability) then {
_snipers=floor (random ((_max_p_grp select 2)-1)); _snipers=floor (random ((_max_p_grp select 2)-1));
_soldiers =((_max_p_grp select 2)-1) - _snipers; _soldiers =((_max_p_grp select 2)-1) - _snipers;
_group = [_markername,2,_snipers,_soldiers,"",_respawn] call SAR_AI; _group = [_markername,2,_snipers,_soldiers,"",_respawn] call SAR_fnc_AI_infantry;
_grps_upd set [count _grps_upd,_group]; _grps_upd set [count _grps_upd,_group];
// update AI monitor // update AI monitor
_check = [["grps_surv"],[_grps_upd],_markername] call SAR_AI_mon_upd; _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

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

View File

@ -0,0 +1,259 @@
/*
# 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
https://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"];
//if (!isServer) exitWith {};
_patrol_area_name = _this select 0;
_grouptype = _this select 1;
_snipers = _this select 2;
_riflemen = _this select 3;
_action = toLower (_this select 4);
_respawn = _this select 5;
_argc = count _this;
if (_argc > 6) then {
_respawn_time = _this select 6;
} else {
_respawn_time = SAR_respawn_waittime;
};
switch (_grouptype) do
{
case 1: // military
{
_side = SAR_AI_friendly_side;
_type = "sold";
_ai_type = "AI Military";
};
case 2: // survivors
{
_side = SAR_AI_friendly_side;
_type = "surv";
_ai_type = "AI Survivor";
};
case 3: // bandits
{
_side = SAR_AI_unfriendly_side;
_type = "band";
_ai_type = "AI Bandit";
};
};
_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;
_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_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
_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 _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
[_leader] spawn SAR_fnc_AI_trace;
_leader setIdentity "id_SAR_sold_lead";
[_leader] spawn SAR_fnc_AI_refresh;
_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, ["I need help!", {"\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)))];
} foreach _leaderskills;
SAR_leader_number = SAR_leader_number + 1;
_leadername = format["SAR_leader_%1",SAR_leader_number];
_leader setVehicleVarname _leadername;
_leader setVariable ["SAR_leader_name",_leadername,false];
// store AI type on the AI
_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];
// 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"];
_sniper_weapon_names = ["sniper",_type] call SAR_unit_loadout_weapons;
_sniper_items = ["sniper",_type] call SAR_unit_loadout_items;
_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;
_this setIdentity "id_SAR";
[_this] spawn SAR_fnc_AI_refresh;
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
_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)))];
} foreach _sniperskills;
// store AI type on the AI
_this setVariable ["SAR_AI_type",_ai_type,false];
// store experience value on AI
_this setVariable ["SAR_AI_experience",0,false];
// set behaviour & speedmode
_this setspeedmode "NORMAL";
_this setBehaviour "CARELESS";
_this setCombatMode "RED";
};
// Establish rifleman unit type and skills
_riflemenlist = call compile format ["SAR_soldier_%1_list", _type];
_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"];
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
_soldier_weapon_names = ["rifleman",_type] call SAR_unit_loadout_weapons;
[_this,_soldier_weapon_names,_soldier_items,_soldier_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;
_this setIdentity "id_SAR_sold_man";
[_this] spawn SAR_fnc_AI_refresh;
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
_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)))];
} foreach _riflemanskills;
// store AI type on the AI
_this setVariable ["SAR_AI_type",_ai_type,false];
// 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];
if (_respawn) then {
_ups_para_list pushBack ["RESPAWN","RESPAWNTIME:",_respawn_time];
};
if (!SAR_AI_STEAL_VEHICLE) then {
_ups_para_list pushBack ["NOVEH2"];
};
if (!SAR_AI_COMBAT_VEHICLE) then {
_ups_para_list pushBack ["NOVEH"];
};
if (SAR_AI_disable_UPSMON_AI) then {
_ups_para_list pushBack ["NOAI"];
};
//if(_action == "") then {_action = "PATROL";};
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 spawn UPSMON;
};
default
{
// Patrol action is default
_ups_para_list spawn UPSMON;
};
};
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

@ -14,7 +14,7 @@
*/ */
private ["_riflemenlist","_side","_leader_group","_patrol_area_name","_rndpos","_argc","_grouptype","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_leaderskills","_sniperskills","_ups_para_list","_sniperlist","_riflemanskills","_vehicles","_error","_vehicles_crews","_leader","_leadername","_snipers","_riflemen","_veh","_veh_setup","_forEachIndex","_groupvehicles","_sniper_weapon_names","_sniper_items","_sniper_tools","_leader_veh_crew","_type","_respawn_time","_ai_type"]; private ["_riflemenlist","_side","_leader_group","_patrol_area_name","_rndpos","_argc","_grouptype","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_leaderskills","_sniperskills","_ups_para_list","_sniperlist","_riflemanskills","_vehicles","_error","_vehicles_crews","_leader","_leadername","_snipers","_riflemen","_veh","_veh_setup","_forEachIndex","_groupvehicles","_sniper_weapon_names","_sniper_items","_sniper_tools","_leader_veh_crew","_type","_respawn_time","_ai_type"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_patrol_area_name = _this select 0; _patrol_area_name = _this select 0;
@ -56,14 +56,14 @@ if (_argc > 1) then {
if (_argc > 2) then { if (_argc > 2) then {
_vehicles = _this select 2; _vehicles = _this select 2;
} else { } else {
diag_log "SAR_AI: Error, you need to define vehicles for this land AI group"; diag_log "SAR_fnc_AI_infantry: Error, you need to define vehicles for this land AI group";
_error = true; _error = true;
}; };
if (_argc > 3) then { if (_argc > 3) then {
_vehicles_crews = _this select 3; _vehicles_crews = _this select 3;
} else { } else {
diag_log "SAR_AI: Error, you need to define crews for vehicles for this land AI group"; diag_log "SAR_fnc_AI_infantry: Error, you need to define crews for vehicles for this land AI group";
_error = true; _error = true;
}; };
@ -81,20 +81,24 @@ if (_argc > 5) then {
{ {
if (_x isKindof "Air" || _x isKindof "Ship") then { if (_x isKindof "Air" || _x isKindof "Ship") then {
diag_log "SAR_AI: Error, you need to define land vehicles only for this land AI group"; diag_log "SAR_fnc_AI_infantry: Error, you need to define land vehicles only for this land AI group";
_error = true; _error = true;
}; };
} foreach _vehicles; } foreach _vehicles;
if(_error) exitWith {diag_log "SAR_AI: Vehicle patrol setup failed, wrong parameters passed!";}; if(_error) exitWith {diag_log "SAR_fnc_AI_infantry: Vehicle patrol setup failed, wrong parameters passed!";};
_leaderskills = call compile format ["SAR_leader_%1_skills",_type]; _leaderskills = call compile format ["SAR_leader_%1_skills",_type];
_riflemanskills = call compile format ["SAR_soldier_%1_skills",_type]; _riflemanskills = call compile format ["SAR_soldier_%1_skills",_type];
_sniperskills = call compile format ["SAR_sniper_%1_skills",_type]; _sniperskills = call compile format ["SAR_sniper_%1_skills",_type];
// get a random starting position, UPSMON will handle the rest // get a random starting position that is on land
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos; if (SAR_useBlacklist) then {
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
} else {
_rndpos = [_patrol_area_name] call UPSMON_pos;
};
// create the group // create the group
_groupvehicles = createGroup _side; _groupvehicles = createGroup _side;
@ -107,7 +111,7 @@ _groupvehicles = createGroup _side;
_veh setVariable ["Sarge",1,true]; _veh setVariable ["Sarge",1,true];
_veh engineon true; _veh engineon true;
_veh addMPEventHandler ["HandleDamage", {_this spawn SAR_AI_VEH_HIT;_this select 2;}]; _veh addMPEventHandler ["HandleDamage", {_this spawn SAR_fnc_AI_hit_vehicle;_this select 2;}];
[_veh] joinSilent _groupvehicles; [_veh] joinSilent _groupvehicles;
@ -129,17 +133,17 @@ _groupvehicles = createGroup _side;
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);}; if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
[_leader] spawn SAR_AI_trace_veh; [_leader] spawn SAR_fnc_AI_trace_vehicle;
switch (_grouptype) do switch (_grouptype) do
{ {
case 1:{_leader setIdentity "id_SAR_sold_man";}; case 1:{_leader setIdentity "id_SAR_sold_man";};
case 2:{_leader setIdentity "id_SAR_surv_lead";}; case 2:{_leader setIdentity "id_SAR_surv_lead";};
case 3:{_leader setIdentity "id_SAR_band";}; case 3:{_leader setIdentity "id_SAR_band";};
}; };
[_leader] spawn SAR_AI_reammo; [_leader] spawn SAR_fnc_AI_refresh;
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
_leader moveInDriver _veh; _leader moveInDriver _veh;
_leader assignAsDriver _veh; _leader assignAsDriver _veh;
@ -178,17 +182,17 @@ _groupvehicles = createGroup _side;
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);}; 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_AI_trace_veh; [_this] spawn SAR_fnc_AI_trace_vehicle;
switch (_grouptype) do switch (_grouptype) do
{ {
case 1:{_this setIdentity "id_SAR_sold_man";}; case 1:{_this setIdentity "id_SAR_sold_man";};
case 2:{_this setIdentity "id_SAR_surv_lead";}; case 2:{_this setIdentity "id_SAR_surv_lead";};
case 3:{_this setIdentity "id_SAR_band";}; case 3:{_this setIdentity "id_SAR_band";};
}; };
[_this] spawn SAR_AI_reammo; [_this] spawn SAR_fnc_AI_refresh;
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
[_this] joinSilent _groupvehicles; [_this] joinSilent _groupvehicles;
@ -228,17 +232,17 @@ _groupvehicles = createGroup _side;
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);}; 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_AI_trace_veh; [_this] spawn SAR_fnc_AI_trace_vehicle;
switch (_grouptype) do switch (_grouptype) do
{ {
case 1:{_this setIdentity "id_SAR_sold_man";}; case 1:{_this setIdentity "id_SAR_sold_man";};
case 2:{_this setIdentity "id_SAR_surv_lead";}; case 2:{_this setIdentity "id_SAR_surv_lead";};
case 3:{_this setIdentity "id_SAR_band";}; case 3:{_this setIdentity "id_SAR_band";};
}; };
[_this] spawn SAR_AI_reammo; [_this] spawn SAR_fnc_AI_refresh;
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}];
[_this] joinSilent _groupvehicles; [_this] joinSilent _groupvehicles;
@ -286,22 +290,4 @@ 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]; 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 = _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;
};
_groupvehicles; _groupvehicles;

View File

@ -22,7 +22,7 @@ SAR_circle_static = {
_count = 0; _count = 0;
diag_log "SAR_AI: Group should form a circle"; diag_log "SAR_fnc_AI_infantry: Group should form a circle";
_leader = _this select 0; _leader = _this select 0;
_action = _this select 1; _action = _this select 1;

View File

@ -14,7 +14,7 @@
*/ */
private["_sizeX","_sizeY","_snipers","_rifleMen","_sizeOfBase","_marker","_markername","_tMark","_flagPoles","_baseLevel","_baseName"]; private["_sizeX","_sizeY","_snipers","_rifleMen","_sizeOfBase","_marker","_markername","_tMark","_flagPoles","_baseLevel","_baseName"];
if (!isServer) exitWith {}; //if (!isServer) exitWith {};
_flagPoles = nearestObjects [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Exile_Construction_Flag_Static"], 25000]; _flagPoles = nearestObjects [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Exile_Construction_Flag_Static"], 25000];
@ -59,12 +59,12 @@ diag_log format["Sarge AI System: Total Territory Locations Query Returned With:
_spawnMark setMarkerSize [_sizeX,_sizeY]; _spawnMark setMarkerSize [_sizeX,_sizeY];
_spawnMark setMarkeralpha 0; _spawnMark setMarkeralpha 0;
_behaviors = ["patrol"]; // Do not change this! _behaviors = ["fortify"];
_behavior = _behaviors call BIS_fnc_selectRandom; _behavior = _behaviors call BIS_fnc_selectRandom;
[_x,_spawnMark,2,_snipers,_rifleMen,_behavior,false,5200] call SAR_AI_GUARDS; [_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>"),""],"dayz_code\actions\toggle_base_guards.sqf",_x,1,false,true,"",""]; s_player_guardToggle = _x addaction [format[("<t color=""#FFFFFF"">" + ("Make guards hostile") +"</t>"),""],"\addons\sarge\code\toggle_base_guards.sqf",_x,1,false,true,"",""];
}; };
} foreach _flagPoles; } foreach _flagPoles;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,133 @@
/*
This file is currently under development.
Please refer to previous versions if you need a reminder.
If you do not have previous versions please post a message on the exile thread for Sarge AI
*/
private ["_type"];
_type = _this select 0;
if (SAR_dynamic_spawning && (_type == "dynamic")) then {
diag_log format ["Sarge's AI System: Dynamic spawning definition / adjustments started"];
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd;// Top left safezone
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_6_4"] call SAR_AI_mon_upd;// Airbase safezone
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_6_5"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_7_4"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_7_5"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_8"] call SAR_AI_mon_upd;// Top right safezone
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_11_8"] call SAR_AI_mon_upd;
diag_log format ["Sarge's AI System: Dynamic spawning definition / adjustments finished"];
};
if (_type == "static") then {
diag_log format["Sarge's AI System: Static spawning area definition started"];
/* _this = createMarker ["SAR_marker_MafiaTraderCity_Outer_Patrol", [14599.7,16797.7,0.101437]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [175, 175];
SAR_marker_MafiaTraderCity_Outer_Patrol = _this;
_this = createMarker ["SAR_marker_MafiaTraderCity_Inner_Patrol", [14599.7,16797.7,0.101437]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [100, 100];
SAR_marker_MafiaTraderCity_Inner_Patrol = _this; */
_this = createMarker ["SAR_marker_MafiaTraderCity_Fortify", [14599.7,16797.7,0.101437]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [25, 25];
SAR_marker_MafiaTraderCity_Fortify = _this;
/*
// TraderZoneSilderas Markers
_this = createMarker ["SAR_marker_TraderZoneSilderas", [23334.605,4.0095582,0]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [175, 175];
SAR_marker_TraderZoneSilderas = _this;
// TraderZoneFolia Markers
_this = createMarker ["SAR_marker_TraderZoneFolia", [2998.0603,3.7756021,0]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [175, 175];
SAR_marker_TraderZoneFolia = _this;
*/
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
[SAR_marker_DEBUG_veh,1,true] call SAR_fnc_AI_heli;
//Heli Patrol NEAF
[SAR_marker_DEBUG_veh,1,true] call SAR_fnc_AI_heli;
// Heli patrol south coast
[SAR_marker_DEBUG_veh,1,true] call SAR_fnc_AI_heli;
[SAR_marker_DEBUG_veh,1,true] call SAR_fnc_AI_heli;
// heli patrol east coast
[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; */
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; */
diag_log format["Sarge's AI System: Static Spawning for vehicle patrols finished"];
};

View File

@ -1,5 +1,5 @@
// ========================================================================================================= // =========================================================================================================
// SAR_AI - DayZ AI library // Sarge's AI System: - DayZ AI library
// Version: 1.5.0 // Version: 1.5.0
// Author: Sarge (sarge@krumeich.ch) // Author: Sarge (sarge@krumeich.ch)
// //
@ -67,7 +67,7 @@ if (SAR_dynamic_spawning) then {
diag_log format["SAR_AI: Dynamic spawning definition / adjustments started"]; diag_log format["Sarge's AI System: 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 // 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; [["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 // 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; [["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"]; diag_log format["Sarge's AI System: Dynamic spawning definition / adjustments finished"];
@ -138,7 +138,7 @@ if (SAR_dynamic_spawning) then {
// Definition of area markers for static spawns // Definition of area markers for static spawns
// //
diag_log format["SAR_AI: Static spawning area definition started"]; diag_log format["Sarge's AI System: Static spawning area definition started"];
// soutcoast, heli patrol area // soutcoast, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]]; _this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]];
@ -195,7 +195,7 @@ _this setMarkerBrush "Solid";
_this setMarkerSize [10, 10]; _this setMarkerSize [10, 10];
SAR_marker_DEBUG_devilscastle = _this; SAR_marker_DEBUG_devilscastle = _this;
diag_log format["SAR_AI: Static spawning area definition finished"]; diag_log format["Sarge's AI System: Static spawning area definition finished"];
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
// End of area marker definition section // End of area marker definition section
@ -206,7 +206,7 @@ diag_log format["SAR_AI: Static spawning area definition finished"];
// Static, predefined heli patrol areas with configurable units // Static, predefined heli patrol areas with configurable units
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// //
// format: [areamarker,type_of_group,(respawn),(respawntime)] call SAR_AI; // format: [areamarker,type_of_group,(respawn),(respawntime)] call Sarge's AI System:;
// //
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!) // 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 // type_of_group : 1 = military, 2 = survivors, 3 = bandits
@ -222,52 +222,52 @@ diag_log format["SAR_AI: Static spawning area definition finished"];
// //
// A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles // A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles
// //
// [SAR_marker_DEBUG,1,true] call SAR_AI_heli; // [SAR_marker_DEBUG,1,true] call Sarge's AI System:;
// //
// B) bandit air group patrolling, not respawning, // B) bandit air group patrolling, not respawning,
// //
// [SAR_marker_DEBUG,3] call SAR_AI_heli; // [SAR_marker_DEBUG,3] call Sarge's AI System:;
// //
// C) survivor air group patrolling, respawning, respawn time = 120 seconds // C) survivor air group patrolling, respawning, respawn time = 120 seconds
// //
// [SAR_marker_DEBUG,true,120] call SAR_AI_heli; // [SAR_marker_DEBUG,true,120] call Sarge's AI System:;
// //
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
// //
// define your static air patrols here // define your static air patrols here
// //
//Heli Patrol NWAF //Heli Patrol NWAF
[SAR_marker_helipatrol_nwaf,1,true] call SAR_AI_heli; [SAR_marker_helipatrol_nwaf,1,true] call Sarge's AI System:;
//Heli Patrol NEAF //Heli Patrol NEAF
[SAR_marker_helipatrol_neaf,1,true] call SAR_AI_heli; [SAR_marker_helipatrol_neaf,1,true] call Sarge's AI System:;
// Heli patrol south coast // Heli patrol south coast
[SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli; [SAR_marker_helipatrol_southcoast,1,true] call Sarge's AI System:;
[SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli; [SAR_marker_helipatrol_southcoast,1,true] call Sarge's AI System:;
// heli patrol east coast // heli patrol east coast
[SAR_marker_helipatrol_eastcoast,1,true] call SAR_AI_heli; [SAR_marker_helipatrol_eastcoast,1,true] call Sarge's AI System:;
[SAR_marker_helipatrol_eastcoast,1,true] call SAR_AI_heli; [SAR_marker_helipatrol_eastcoast,1,true] call Sarge's AI System:;
// example war scenario in the northwest. Comment OUT after having had a look at it! // example war scenario in the northwest. Comment OUT after having had a look at it!
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli; [SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli; [SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:;
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units // 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_AI; // format: [areamarker,type_of_group,number_of_snipers,number_of_riflemen,action_to_do,(respawn),(respawntime)] call Sarge's AI System:;
// //
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!) // 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 // type_of_group : 1 = military, 2 = survivors, 3 = bandits
@ -287,40 +287,40 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
// //
// A) military group patrolling, with 1 leader and 1 rifleman, respawning, respawn time = default configured time // 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_AI; // [SAR_marker_DEBUG,1,0,1,"patrol",true] call Sarge's AI System:;
// //
// B) bandit group patrolling, with 1 leader, 2 snipers and 1 rifleman, respawning, respawn time = 30 seconds // 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_AI; // [SAR_marker_DEBUG,3,2,1,"patrol",true,30] call Sarge's AI System:;
// //
// C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning // C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning
// //
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call SAR_AI; // [SAR_marker_DEBUG,2,1,3,"fortify",false] call Sarge's AI System:;
// //
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
diag_log format["SAR_AI: Static Spawning for infantry patrols started"]; diag_log format["Sarge's AI System: Static Spawning for infantry patrols started"];
// //
// define your static infantry patrols here // define your static infantry patrols here
// //
[SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call SAR_AI; [SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call Sarge's AI System:;
// example war scenario in the northwest. Comment OUT after having had a look at it! // 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_AI; [SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_AI; [SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI; [SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI; [SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:;
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
// ------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------
// //
// Static spawns for vehicle groups // Static spawns for vehicle groups
// //
// format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_AI_land; // format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_fnc_AI_vehicle;
// //
// //
// areamarker : Name of an area, as defined in your area definitions // areamarker : Name of an area, as defined in your area definitions
@ -345,7 +345,7 @@ diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
["UAZ_Unarmed_TK_EP1"], // used vehicles ["UAZ_Unarmed_TK_EP1"], // used vehicles
[[1,1,1]], // Vehicle initial crew [[1,1,1]], // Vehicle initial crew
false // if this group should respawn or not false // if this group should respawn or not
] call SAR_AI_land; ] 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 // B) This will spawn an AI group with 1 vehicle, 3 AI in the UAZ, and this group will respawn after 60 seconds
@ -357,11 +357,11 @@ diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
[[1,1,1]], // Vehicle initial crews [[1,1,1]], // Vehicle initial crews
true, // if this group should respawn or not true, // if this group should respawn or not
60 // waittime until this group will respawn 60 // waittime until this group will respawn
] call SAR_AI_land; ] call SAR_fnc_AI_vehicle;
*/ */
// //
// ------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------
diag_log format["SAR_AI: Static Spawning for vehicle patrols started"]; diag_log format["Sarge's AI System: Static Spawning for vehicle patrols started"];
// //
// define your static vehicle patrols here // define your static vehicle patrols here
@ -375,7 +375,7 @@ diag_log format["SAR_AI: Static Spawning for vehicle patrols started"];
[[1,1,1],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew [[1,1,1],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew
true, // if this group should respawn or not true, // if this group should respawn or not
10 10
] call SAR_AI_land; ] call SAR_fnc_AI_vehicle;
[ [
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
@ -384,7 +384,7 @@ diag_log format["SAR_AI: Static Spawning for vehicle patrols started"];
[[1,1,0],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew [[1,1,0],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew
true, // if this group should respawn or not true, // if this group should respawn or not
60 // waittime until this group will respawn 60 // waittime until this group will respawn
] call SAR_AI_land; ] call SAR_fnc_AI_vehicle;
[ [
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
@ -393,8 +393,8 @@ diag_log format["SAR_AI: Static Spawning for vehicle patrols started"];
[[1,1,0]], // Vehicle initial crew [[1,1,0]], // Vehicle initial crew
true, // if this group should respawn or not true, // if this group should respawn or not
60 // waittime until this group will respawn 60 // waittime until this group will respawn
] call SAR_AI_land; ] call SAR_fnc_AI_vehicle;
diag_log format["SAR_AI: Static Spawning for vehicle patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for vehicle patrols finished"];
// ---- end of configuration area ---- // ---- end of configuration area ----

View File

@ -1,5 +1,5 @@
// ========================================================================================================= // =========================================================================================================
// SAR_AI - DayZ AI library // Sarge's AI System: - DayZ AI library
// Version: 1.0.0 // Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch) // Author: Sarge (sarge@krumeich.ch)
// //
@ -81,8 +81,8 @@ this number is randomized
// End of area marker definition section // End of area marker definition section
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
diag_log format["SAR_AI: Area & Trigger definition finalized"]; diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
// //
// Static, predefined heli patrol areas with configurable units // Static, predefined heli patrol areas with configurable units
@ -94,12 +94,12 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
// add if needed, see examples in the chernarus file // add if needed, see examples in the chernarus file
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units // Static, predefined infantry patrols in defined areas with configurable units
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI; // Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// //
// SAR_area_DEBUG = areaname (must have been defined further up) // SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits) // 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -111,16 +111,16 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
// Example entries: // Example entries:
// SARGE DEBUG - Debug group // SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol // military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI; //[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// military, 2 snipers, 4 riflemen, patrol // military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI; //[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF // survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI; //[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF // bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI; //[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// add here if needed // add here if needed
@ -130,5 +130,5 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
// ---- 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 @@
// ========================================================================================================= // =========================================================================================================
// SAR_AI - DayZ AI library // Sarge's AI System: - DayZ AI library
// Version: 1.0.0 // Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch) // Author: Sarge (sarge@krumeich.ch)
// //
@ -164,8 +164,8 @@ SAR_marker_helipatrol_mainland = _this;
// End of area marker definition section // End of area marker definition section
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
diag_log format["SAR_AI: Area & Trigger definition finalized"]; diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
// //
// Static, predefined heli patrol areas with configurable units // Static, predefined heli patrol areas with configurable units
@ -177,18 +177,18 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
// add if needed, see examples in the chernarus file // add if needed, see examples in the chernarus file
[SAR_marker_helipatrol_prison,floor(random 2)+1] call SAR_AI_heli; [SAR_marker_helipatrol_prison,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_maruko_airport,floor(random 2)+1] call SAR_AI_heli; [SAR_marker_helipatrol_maruko_airport,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_fob_eddie,floor(random 2)+1] call SAR_AI_heli; [SAR_marker_helipatrol_fob_eddie,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_calamar,floor(random 2)+1] call SAR_AI_heli; [SAR_marker_helipatrol_calamar,floor(random 2)+1] call Sarge's AI System:;
[SAR_marker_helipatrol_mainland,floor(random 2)+1] call SAR_AI_heli; [SAR_marker_helipatrol_mainland,floor(random 2)+1] call Sarge's AI System:;
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units // Static, predefined infantry patrols in defined areas with configurable units
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI; // Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// //
// SAR_area_DEBUG = areaname (must have been defined further up) // SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits) // 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -200,16 +200,16 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
// Example entries: // Example entries:
// SARGE DEBUG - Debug group // SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol // military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI; //[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// military, 2 snipers, 4 riflemen, patrol // military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI; //[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF // survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI; //[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF // bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI; //[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// add here if needed // add here if needed
@ -219,5 +219,5 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
// ---- 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 @@
// ========================================================================================================= // =========================================================================================================
// SAR_AI - DayZ AI library // Sarge's AI System: - DayZ AI library
// Version: 1.0.0 // Version: 1.0.0
// Author: Sarge (sarge@krumeich.ch) // Author: Sarge (sarge@krumeich.ch)
// //
@ -643,8 +643,8 @@ Manatee_Map_Center = _this;
// End of area marker definition section // End of area marker definition section
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
diag_log format["SAR_AI: Area & Trigger definition finalized"]; diag_log format["Sarge's AI System: Area & Trigger definition finalized"];
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
// //
// Static, predefined heli patrol areas with configurable units // Static, predefined heli patrol areas with configurable units
@ -655,24 +655,24 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
// //
// Map Center - Soldiers // Map Center - Soldiers
[Manatee_Map_Center,1] call SAR_AI_heli; [Manatee_Map_Center,1] call Sarge's AI System:;
// North Western Bandits // North Western Bandits
[Manatee_North_West_Quadrant,3] call SAR_AI_heli; [Manatee_North_West_Quadrant,3] call Sarge's AI System:;
// North Eastern Bandits // North Eastern Bandits
[Manatee_North_East_Quadrant,3] call SAR_AI_heli; [Manatee_North_East_Quadrant,3] call Sarge's AI System:;
// South Eastern Survivors // South Eastern Survivors
[Manatee_South_East_Quadrant,2] call SAR_AI_heli; [Manatee_South_East_Quadrant,2] call Sarge's AI System:;
// South Western Survivors // South Western Survivors
[Manatee_South_West_Quadrant,2] call SAR_AI_heli; [Manatee_South_West_Quadrant,2] call Sarge's AI System:;
// add if needed, see examples in the chernarus file // add if needed, see examples in the chernarus file
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units // Static, predefined infantry patrols in defined areas with configurable units
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI; // Example: [SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// //
// SAR_area_DEBUG = areaname (must have been defined further up) // SAR_area_DEBUG = areaname (must have been defined further up)
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits) // 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
@ -682,25 +682,25 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
// //
// BANDITS - 3 Snipers, 7 rifleman. SAF & NAF // BANDITS - 3 Snipers, 7 rifleman. SAF & NAF
[Manatee_SAF_Control_Tower,3,3,7,""] call SAR_AI; [Manatee_SAF_Control_Tower,3,3,7,""] call Sarge's AI System:;
[Manatee_NAF_Control_Tower,3,3,7,""] call SAR_AI; [Manatee_NAF_Control_Tower,3,3,7,""] call Sarge's AI System:;
// Example entries: // Example entries:
// SARGE DEBUG - Debug group // SARGE DEBUG - Debug group
// military, 0 snipers, 1 riflemen, patrol // military, 0 snipers, 1 riflemen, patrol
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI; //[SAR_area_DEBUG,1,0,1,""] call Sarge's AI System:;
// military, 2 snipers, 4 riflemen, patrol // military, 2 snipers, 4 riflemen, patrol
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI; //[SAR_area_DEBUG,1,2,4,""] call Sarge's AI System:;
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF // survivors, 1 snipers, 3 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI; //[SAR_marker_helipatrol_nwaf,2,1,3,""] call Sarge's AI System:;
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF // bandits, 5 snipers, 2 riflemen, patrolling the NWAF
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI; //[SAR_marker_helipatrol_nwaf,3,5,2,""] call Sarge's AI System:;
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// add here if needed // add here if needed
@ -710,5 +710,5 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
// ---- 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

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

@ -44,7 +44,7 @@ _type = _this select 0;
// grid definition for the automatic spawn system // grid definition for the automatic spawn system
if ((_type == "dynamic") && SAR_dynamic_spawning) then { if ((_type == "dynamic") && SAR_dynamic_spawning) then {
diag_log format["SAR_AI: Dynamic spawning definition / adjustments started"]; diag_log format["Sarge's AI System: Dynamic spawning definition / adjustments started"];
// Blacklist Safezones using 0s // Blacklist Safezones using 0s
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_3_6"] call SAR_AI_mon_upd; [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_3_6"] call SAR_AI_mon_upd;
@ -54,12 +54,12 @@ if ((_type == "dynamic") && SAR_dynamic_spawning) then {
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_9"] call SAR_AI_mon_upd; [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_9"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_10"] call SAR_AI_mon_upd; [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_10"] call SAR_AI_mon_upd;
diag_log format["SAR_AI: Dynamic spawning definition / adjustments finished"]; diag_log format["Sarge's AI System: Dynamic spawning definition / adjustments finished"];
}; };
if (_type == "static") then { if (_type == "static") then {
// Definition of area markers for static spawns // Definition of area markers for static spawns
diag_log format["SAR_AI: Static spawning area definition started"]; diag_log format["Sarge's AI System: Static spawning area definition started"];
// soutcoast, heli patrol area // soutcoast, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]]; _this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]];
@ -116,7 +116,7 @@ if (_type == "static") then {
_this setMarkerSize [10, 10]; _this setMarkerSize [10, 10];
SAR_marker_DEBUG_devilscastle = _this; SAR_marker_DEBUG_devilscastle = _this;
diag_log format["SAR_AI: Static spawning area definition finished"]; diag_log format["Sarge's AI System: Static spawning area definition finished"];
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
// End of area marker definition section // End of area marker definition section
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
@ -126,7 +126,7 @@ if (_type == "static") then {
// Static, predefined heli patrol areas with configurable units // Static, predefined heli patrol areas with configurable units
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// //
// format: [areamarker,type_of_group,(respawn),(respawntime)] call SAR_AI; // format: [areamarker,type_of_group,(respawn),(respawntime)] call Sarge's AI System:;
// //
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!) // 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 // type_of_group : 1 = military, 2 = survivors, 3 = bandits
@ -142,48 +142,48 @@ if (_type == "static") then {
// //
// A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles // A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles
// //
// [SAR_marker_DEBUG,1,true] call SAR_AI_heli; // [SAR_marker_DEBUG,1,true] call Sarge's AI System:;
// //
// B) bandit air group patrolling, not respawning, // B) bandit air group patrolling, not respawning,
// //
// [SAR_marker_DEBUG,3] call SAR_AI_heli; // [SAR_marker_DEBUG,3] call Sarge's AI System:;
// //
// C) survivor air group patrolling, respawning, respawn time = 120 seconds // C) survivor air group patrolling, respawning, respawn time = 120 seconds
// //
// [SAR_marker_DEBUG,true,120] call SAR_AI_heli; // [SAR_marker_DEBUG,true,120] call Sarge's AI System:;
// //
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"];
// define your static air patrols here // define your static air patrols here
/* /*
//Heli Patrol NWAF //Heli Patrol NWAF
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true] call Sarge's AI System:;
//Heli Patrol NEAF //Heli Patrol NEAF
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true] call Sarge's AI System:;
// Heli patrol south coast // Heli patrol south coast
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true] call Sarge's AI System:;
// heli patrol east coast // heli patrol east coast
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true] call Sarge's AI System:;
*/ */
// example war scenario in the northwest. Comment OUT after having had a look at it! // example war scenario in the northwest. Comment OUT after having had a look at it!
/* [SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli; /* [SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli; [SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli; [SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli; */ [SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:; */
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols finished"];
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// Static, predefined infantry patrols in defined areas with configurable units // 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_AI; // format: [areamarker,type_of_group,number_of_snipers,number_of_riflemen,action_to_do,(respawn),(respawntime)] call Sarge's AI System:;
// //
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!) // 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 // type_of_group : 1 = military, 2 = survivors, 3 = bandits
@ -203,35 +203,35 @@ if (_type == "static") then {
// //
// A) military group patrolling, with 1 leader and 1 rifleman, respawning, respawn time = default configured time // 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_AI; // [SAR_marker_DEBUG,1,0,1,"patrol",true] call Sarge's AI System:;
// //
// B) bandit group patrolling, with 1 leader, 2 snipers and 1 rifleman, respawning, respawn time = 30 seconds // 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_AI; // [SAR_marker_DEBUG,3,2,1,"patrol",true,30] call Sarge's AI System:;
// //
// C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning // C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning
// //
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call SAR_AI; // [SAR_marker_DEBUG,2,1,3,"fortify",false] call Sarge's AI System:;
// //
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
diag_log format["SAR_AI: Static Spawning for infantry patrols started"]; diag_log format["Sarge's AI System: Static Spawning for infantry patrols started"];
// define your static infantry patrols here // define your static infantry patrols here
/* [SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call SAR_AI; */ /* [SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call Sarge's AI System:; */
// example war scenario in the northwest. Comment OUT after having had a look at it! // 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_AI; /* [SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_AI; [SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI; [SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:;
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI; */ [SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:; */
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"];
// ------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------
// //
// Static spawns for vehicle groups // Static spawns for vehicle groups
// //
// format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_AI_land; // format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_fnc_AI_vehicle;
// //
// //
// areamarker : Name of an area, as defined in your area definitions // areamarker : Name of an area, as defined in your area definitions
@ -256,7 +256,7 @@ if (_type == "static") then {
["UAZ_Unarmed_TK_EP1"], // used vehicles ["UAZ_Unarmed_TK_EP1"], // used vehicles
[[1,1,1]], // Vehicle initial crew [[1,1,1]], // Vehicle initial crew
false // if this group should respawn or not false // if this group should respawn or not
] call SAR_AI_land; ] 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 // B) This will spawn an AI group with 1 vehicle, 3 AI in the UAZ, and this group will respawn after 60 seconds
@ -268,17 +268,17 @@ if (_type == "static") then {
[[1,1,1]], // Vehicle initial crews [[1,1,1]], // Vehicle initial crews
true, // if this group should respawn or not true, // if this group should respawn or not
60 // waittime until this group will respawn 60 // waittime until this group will respawn
] call SAR_AI_land; ] call SAR_fnc_AI_vehicle;
*/ */
// //
// ------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------
diag_log format["SAR_AI: Static Spawning for vehicle patrols started"]; diag_log format["Sarge's AI System: Static Spawning for vehicle patrols started"];
// define your static vehicle patrols here // define your static vehicle patrols here
/* [SAR_marker_DEBUG_veh,1,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land; /* [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_AI_land; [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_AI_land; */ [SAR_marker_DEBUG_veh,3,["SUV_Base"],[[1,1,1]],true,60] call SAR_fnc_AI_vehicle; */
diag_log format["SAR_AI: Static Spawning for vehicle patrols finished"]; diag_log format["Sarge's AI System: Static Spawning for vehicle patrols finished"];
// ---- end of configuration area ---- // ---- end of configuration area ----
}; };

View File

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

@ -11,7 +11,7 @@ class CfgPatches {
}; };
class CfgFunctions { class CfgFunctions {
class SargeAI { class SAR {
class main { class main {
file = "addons\sarge\init"; file = "addons\sarge\init";
class preInit { class preInit {
@ -21,31 +21,24 @@ class CfgFunctions {
postInit = 1; postInit = 1;
}; };
}; };
/* class SAR_compiles { class compiles {
class SAR_AI_base_trace {}; file = "addons\sarge\code\functions";
class SAR_AI_despawn {}; class AI_despawn {};
class SAR_AI_guards {}; class AI_guards {};
class SAR_AI_hit {}; class AI_heli {};
class SAR_AI_infantry {}; class AI_hit {};
class SAR_AI_killed {}; class AI_hit_vehicle {};
class SAR_AI_mon_read {}; class AI_infantry {};
class SAR_AI_mon_upd {}; class AI_interact {};
class SAR_AI_spawn {}; class AI_killed {};
class SAR_AI_trace {}; class AI_refresh {};
class SAR_AI_trace_veh {}; class AI_spawn {};
class SAR_AI_veh_hit {}; class AI_trace {};
class SAR_AI_vehicle {}; class AI_trace_base {};
class SAR_debug_mon {}; class AI_trace_vehicle {};
class SAR_isKindOfWeapon {}; class AI_traders {};
class SAR_returnConfigEntry {}; class AI_vehicle {};
class SAR_returnVehicleTurrets {}; };
class SAR_unit_loadout {};
class SAR_unit_loadout_items {};
class SAR_unit_loadout_tools {};
class SAR_unit_loadout_weapons {};
class SAR_unit_refresh {};
class toggle_base_guards {};
}; */
}; };
}; };

View File

@ -9,48 +9,16 @@
Sarge AI System 2.0+ Sarge AI System 2.0+
Modded for Arma 3: Exile Mod Modded for Arma 3: Exile Mod
Changes: Dango Changes: Dango
https://www.hod-servers.com http://www.hod-servers.com
https://github.com/Teh-Dango 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"]; private ["_worldname","_startx","_starty","_gridsize_x","_gridsize_y","_gridwidth","_markername","_triggername","_trig_act_stmnt","_trig_deact_stmnt","_trig_cond","_check","_script_handler","_legendname"];
call compile preProcessFileLineNumbers "\addons\sarge\Init_UPSMON.sqf"; diag_log format ["Sarge's AI System: Welcome to Sarge AI!"];
diag_log format ["Sarge's AI System: Now initializing Sarge AI version %1 for %2",SAR_version,worldName];
SAR_AI_hit = compile preprocessFileLineNumbers "\addons\sarge\SAR_aihit.sqf"; call compile preProcessFileLineNumbers "\addons\sarge\UPSMON\Init_UPSMON.sqf";
SAR_AI_trace = compile preprocessFileLineNumbers "\addons\sarge\SAR_trace_entities.sqf"; call compile preProcessFileLineNumbers "\addons\sarge\code\functions\fn_functions.sqf";
SAR_AI_base_trace = compile preprocessFileLineNumbers "\addons\sarge\SAR_trace_base_entities.sqf";
call compile preprocessFileLineNumbers "\addons\sarge\SAR_config.sqf";
diag_log format["Sarge's AI System: Starting Sarge AI version %1",SAR_version];
SAR_AI_killed = compile preprocessFileLineNumbers "\addons\sarge\SAR_aikilled.sqf";
SAR_AI_VEH_HIT = compile preprocessFileLineNumbers "\addons\sarge\SAR_ai_vehicle_hit.sqf";
SAR_AI_trace_veh = compile preprocessFileLineNumbers "\addons\sarge\SAR_trace_from_vehicle.sqf";
SAR_AI_spawn = compile preprocessFileLineNumbers "\addons\sarge\SAR_AI_spawn.sqf";
//SAR_AI_Heli_spawn = compile preprocessFileLineNumbers "\addons\sarge\SAR_AI_Heli_spawn.sqf";
SAR_AI_despawn = compile preprocessFileLineNumbers "\addons\sarge\SAR_AI_despawn.sqf";
SAR_AI_reammo = compile preprocessFileLineNumbers "\addons\sarge\SAR_reammo_refuel_AI.sqf";
SAR_AI = compile preprocessFileLineNumbers "\addons\sarge\SAR_setup_AI_patrol.sqf";
SAR_AI_heli = compile preprocessFileLineNumbers "\addons\sarge\SAR_setup_AI_patrol_heli.sqf";
SAR_AI_land = compile preprocessFileLineNumbers "\addons\sarge\SAR_setup_AI_patrol_land.sqf";
SAR_AI_GUARDS = compile preprocessFileLineNumbers "\addons\sarge\SAR_setup_AI_patrol_guards.sqf";
call compile preprocessFileLineNumbers "\addons\sarge\SAR_functions.sqf";
publicvariable "SAR_surv_kill_value";
publicvariable "SAR_band_kill_value";
publicvariable "SAR_DEBUG";
publicvariable "SAR_EXTREME_DEBUG";
publicvariable "SAR_DETECT_HOSTILE";
publicvariable "SAR_DETECT_INTERVAL";
publicvariable "SAR_HUMANITY_HOSTILE_LIMIT";
createCenter EAST;
createCenter WEST;
// unfriendly AI bandits // unfriendly AI bandits
EAST setFriend [EAST, 1]; EAST setFriend [EAST, 1];
@ -70,16 +38,14 @@ WEST setFriend [RESISTANCE, 1];
waituntil {(!isNil "PublicServerIsLoaded")}; waituntil {(!isNil "PublicServerIsLoaded")};
waituntil {(PublicServerIsLoaded)}; waituntil {(PublicServerIsLoaded)};
_worldname = toLower worldName;
diag_log format["Sarge's AI System: Setting up SAR_AI for %1",_worldname];
if (SAR_dynamic_spawning) then { if (SAR_dynamic_spawning) then {
_worldname = toLower worldName;
if (!(_worldname in SAR_Maps)) exitWith {diag_log format ["Sarge's AI System: %1 does not currently support dynamic AI spawning! Dynamic AI spawning has been disabled!",_worldName];}; if (!(_worldname in SAR_Maps)) exitWith {diag_log format ["Sarge's AI System: %1 does not currently support dynamic AI spawning! Dynamic AI spawning has been disabled!",_worldName];};
diag_log format ["Sarge's AI System: Now generating dynamic map grid for %1.",_worldname]; diag_log format ["Sarge's AI System: Now generating dynamic map grid for %1.",_worldname];
call compile preprocessFileLineNumbers (format ["\addons\sarge\map_config\SAR_cfg_grid_%1.sqf",_worldname]); call compile preprocessFileLineNumbers (format ["\addons\sarge\code\map_config\SAR_cfg_grid_%1.sqf",_worldname]);
// Create grid system and triggers // Create grid system and triggers
SAR_area_ = text format ["SAR_area_%1","x"]; SAR_area_ = text format ["SAR_area_%1","x"];
@ -127,8 +93,8 @@ if (SAR_dynamic_spawning) then {
call compile format ["SAR_trig_%1_%2 = _this",_ii,_i]; call compile format ["SAR_trig_%1_%2 = _this",_ii,_i];
_trig_act_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger on in %1';};[thislist,'%1'] spawn SAR_AI_spawn;",_triggername]; _trig_act_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger on in %1';};[thislist,'%1'] spawn SAR_fnc_AI_spawn;",_triggername];
_trig_deact_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger off in %1';};[thislist,thisTrigger,'%1'] spawn SAR_AI_despawn;",_triggername]; _trig_deact_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger off in %1';};[thislist,thisTrigger,'%1'] spawn SAR_fnc_AI_despawn;",_triggername];
_trig_cond = "{isPlayer _x} count thisList > 0;"; _trig_cond = "{isPlayer _x} count thisList > 0;";
@ -141,23 +107,24 @@ if (SAR_dynamic_spawning) then {
}; };
diag_log format["Sarge's AI System: The map grid has been established for %1.",worldName]; diag_log format["Sarge's AI System: The map grid has been established for %1.",worldName];
["dynamic"] call compile preprocessFileLineNumbers (format ["\addons\sarge\map_config\SAR_cfg_grps_%1.sqf",_worldname]); ["dynamic"] call compile preprocessFileLineNumbers (format ["\addons\sarge\code\map_config\SAR_cfg_grps_%1.sqf",_worldname]);
diag_log format["Sarge's AI System: Dynamic spawn definitions have been configured for %1.",worldName]; diag_log format["Sarge's AI System: Dynamic spawn definitions have been configured for %1.",worldName];
}; };
["static"] call compile preprocessFileLineNumbers (format ["\addons\sarge\map_config\SAR_cfg_grps_%1.sqf",_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]; diag_log format["Sarge's AI System: Static spawn definitions have been configured for %1.",_worldname];
switch (_worldname) do { if (SAR_useBlacklist) then {
case "namalsk": {SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];}; switch (_worldname) do {
case "altis": {SAR_Blacklist = ["MafiaTraderCity","TraderZoneSilderas","TraderZoneFolia"];}; case "namalsk": {SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];};
case "tanoa": {SAR_Blacklist = ["ExileMarker1","ExileMarker13","ExileMarker15","ExileMarker35","ExileMarker51"];}; case "altis": {SAR_Blacklist = ["MafiaTraderCity","TraderZoneSilderas","TraderZoneFolia"];};
default {diag_log format ["Sarge's AI System: Blacklisted zones are not currently supported for %1!",worldName];}; 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];
}; };
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];
if (SAR_Base_Gaurds) then { if (SAR_Base_Gaurds) then {
call compile PreprocessFileLineNumbers "\addons\sarge\SAR_init_Base_guards.sqf"; call compile PreprocessFileLineNumbers "\addons\sarge\code\init_base_guards.sqf";
}; };

View File

@ -1,2 +1,297 @@
/*
# 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
Tips:
- All time formats are configured in seconds
- All distance formats are in meters
- Secondary AI skills can be decimal values i.e. 0.23
- Lower time intervals for detections require more CPU resources
*/
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_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
/* 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_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_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_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
SAR_DETECT_HOSTILE_FROM_VEHICLE = 400; // How far AI can detect hostile AI & players while in a vehicle
SAR_DETECT_FROM_VEHICLE_INTERVAL = 5; // How often AI can detect hostile AI & players while in a vehicle
// Chance the AI will spawn
SAR_chance_bandits = 100; // Chance to spawn 1-100%
SAR_chance_soldiers = 25; // Chance to spawn 1-100%
SAR_chance_survivors = 75; // Chance to spawn 1-100%
// Max number of AI groups allowed at once
SAR_max_grps_bandits = 4; // Total groups per grid
SAR_max_grps_soldiers = 2; // Total groups per grid
SAR_max_grps_survivors = 2; // Total groups per grid
// Size of AI groups plus a leader
SAR_max_grpsize_bandits = 3; // Size of the group If using HC use +1 at least to offset AI side bug only for bandits
SAR_max_grpsize_soldiers = 2; // Size of the group
SAR_max_grpsize_survivors = 2; // Size of the group
// Chance the AI Helicopters will spawn - IN DEVELOPMENT
SAR_chance_band_heli = 35;
SAR_chance_surv_heli = 35;
SAR_chance_mili_heli = 35;
// AI experience system
SAR_AI_XP_SYSTEM = true; // Turn this feature on or off
// Level 1 settings
SAR_AI_XP_LVL_1 = 0; // xp needed to reach this level
SAR_AI_XP_NAME_1 = "Rookie"; // name of the level range
SAR_AI_XP_ARMOR_1 = 1; // armor value for this level - values: 0.1 - 1, 1 = no change, 0.5 = damage taken reduced by 50%, 0.1 = damage taken reduced by 90%
// Level 2 settings
SAR_AI_XP_LVL_2 = 5;
SAR_AI_XP_NAME_2 = "Veteran";
SAR_AI_XP_ARMOR_2 = 0.5;
// Level 3 settings
SAR_AI_XP_LVL_3 = 20;
SAR_AI_XP_NAME_3 = "Legendary";
SAR_AI_XP_ARMOR_3 = 0.3;
// Bonus factors for leaders
SAR_leader_health_factor = 1; // values: 0.1 - 1, 1 = no change, 0.5 = damage taken reduced by 50%, 0.1 = damage taken reduced by 90% - EXPERIMENTAL
// military AI
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]
];
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]
];
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]
];
// 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]
];
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]
];
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]
];
// 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]
];
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]
];
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]
];
// Military AI ----------------------------------------------------------
// ----------------------------------------------------------------------
SAR_leader_sold_list = ["B_officer_F"];
SAR_sniper_sold_list = ["B_ghillie_lsh_F","B_sniper_F"];
SAR_soldier_sold_list = ["B_G_medic_F","B_G_engineer_F","b_soldier_survival_F","B_G_Soldier_TL_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_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_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_tools = [["ItemMap",50],["ItemCompass",30]];
// Survivor AI ----------------------------------------------------------
// ---------------------------------------------------------------------
SAR_leader_surv_list = ["B_G_Soldier_A_F"];
SAR_sniper_surv_list = ["B_G_Soldier_LAT_F"];
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_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_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_tools = [["ItemMap",50],["ItemCompass",30]];
// Hostile AI ----------------------------------------------------------
// ---------------------------------------------------------------------
SAR_leader_band_list = ["O_G_Soldier_lite_F"];
SAR_sniper_band_list = ["O_G_Soldier_lite_F"];
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_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_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_tools = [["ItemMap",50],["ItemCompass",30]];
// Helicopter Types ----------------------------------------------------
// ---------------------------------------------------------------------
SAR_heli_type = ["B_Heli_Light_01_stripped_F"];
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
SAR_AI_friendly_side = RESISTANCE;
SAR_AI_unfriendly_side = EAST;
SAR_AI_monitor = [];
SAR_leader_number = 0;
true; true;

View File

@ -1,272 +0,0 @@
/*
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 (plus 1 leader)
0 bandits
max 4 (+1 leader) soldiers
max 3 (+1 leader) survivors
this number is randomized
*/
private ["_type"];
_type = _this select 0;
// grid definition for the automatic spawn system
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
diag_log format ["SAR_AI: Dynamic spawning definition / adjustments started"];
// Blacklist Safezones using 0s
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd;// Top left safezone
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_6_4"] call SAR_AI_mon_upd;// Airbase safezone
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_6_5"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_7_4"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_7_5"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_8"] call SAR_AI_mon_upd;// Top right safezone
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_11_8"] call SAR_AI_mon_upd;
diag_log format ["SAR_AI: Dynamic spawning definition / adjustments finished"];
};
if (_type == "static") then {
// Definition of area markers for static spawns
diag_log format["SAR_AI: Static spawning area definition started"];
// MafiaTraderCity Markers
_this = createMarker ["SAR_marker_MafiaTraderCity_Outer_Patrol", [14599.7,16797.7,0.101437]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [150, 150];
SAR_marker_MafiaTraderCity_Outer_Patrol = _this;
_this = createMarker ["SAR_marker_MafiaTraderCity_Inner_Patrol", [14599.7,16797.7,0.101437]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [80, 80];
SAR_marker_MafiaTraderCity_Inner_Patrol = _this;
_this = createMarker ["SAR_marker_MafiaTraderCity_Fortify", [14599.7,16797.7,0.101437]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [25, 25];
SAR_marker_MafiaTraderCity_Fortify = _this;
/*
// TraderZoneSilderas Markers
_this = createMarker ["SAR_marker_TraderZoneSilderas", [23334.605,4.0095582,0]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [175, 175];
SAR_marker_TraderZoneSilderas = _this;
// TraderZoneFolia Markers
_this = createMarker ["SAR_marker_TraderZoneFolia", [2998.0603,3.7756021,0]];
_this setMarkerShape "Ellipse";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [175, 175];
SAR_marker_TraderZoneFolia = _this;
*/
diag_log format["SAR_AI: Static spawning area definition finished"];
//---------------------------------------------------------------------------------
// 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_AI_heli;
//
// B) bandit air group patrolling, not respawning,
//
// [SAR_marker_DEBUG,3] call SAR_AI_heli;
//
// C) survivor air group patrolling, respawning, respawn time = 120 seconds
//
// [SAR_marker_DEBUG,true,120] call SAR_AI_heli;
//
//---------------------------------------------------------------------------------
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
// define your static air patrols here
/*
//Heli Patrol NWAF
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
//Heli Patrol NEAF
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
// Heli patrol south coast
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
// heli patrol east coast
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
[SAR_marker_DEBUG_veh,1,true] call SAR_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_AI_heli;
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli;
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli;
*/
diag_log format["SAR_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_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
// 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_AI;
//
// 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_AI;
//
// C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning
//
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call SAR_AI;
//
//---------------------------------------------------------------------------------
diag_log format["SAR_AI: Static Spawning for infantry patrols started"];
// define your static infantry patrols here
/* [SAR_marker_MafiaTraderCity_Outer_Patrol,1,2,3,"patrol",true] call SAR_AI;
[SAR_marker_MafiaTraderCity_Inner_Patrol,1,2,3,"patrol",true] call SAR_AI;
[SAR_marker_MafiaTraderCity_Fortify,1,3,2,"fortify",true] call SAR_AI; */
/*
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_AI;
[SAR_marker_TraderZoneSilderas,1,2,3,"patrol",true] call SAR_AI;
[SAR_marker_TraderZoneSilderas,1,3,2,"fortify",true] call SAR_AI;
[SAR_marker_TraderZoneFolia,1,2,3,"patrol",true] call SAR_AI;
[SAR_marker_TraderZoneFolia,1,2,3,"patrol",true] call SAR_AI;
[SAR_marker_TraderZoneFolia,1,3,2,"fortify",true] call SAR_AI; */
diag_log format["SAR_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_AI_land;
*/
// 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_AI_land;
*/
// -------------------------------------------------------------------------------------
diag_log format["SAR_AI: 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_AI_land;
[SAR_marker_DEBUG_veh,2,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land;
[SAR_marker_DEBUG_veh,3,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land; */
diag_log format["SAR_AI: Static Spawning for vehicle patrols finished"];
// ---- end of configuration area ----
};