From 3b2cfcb97491a6e42c4183f95796943d8b981aab Mon Sep 17 00:00:00 2001 From: Teh Dango Date: Sun, 21 Aug 2016 12:48:06 -0400 Subject: [PATCH] 2.2.4 --- installation.md | 11 +- sarge.pbo | Bin 744854 -> 739438 bytes sarge/SAR_config.sqf | 288 ----------------- sarge/SAR_define.hpp | 43 --- sarge/SAR_setup_AI_patrol_heli.sqf | 242 -------------- sarge/{ => UPSMON}/Init_UPSMON.sqf | 2 +- sarge/UPSMON/MODULES/UPSMON_ModifyUcthis.sqf | 2 +- sarge/{ => UPSMON}/UPSMON.sqf | 0 .../{ => UPSMON}/bonus/Composition_table.sqf | 0 sarge/{ => UPSMON}/bonus/UPSMON_Anim.sqf | 0 .../functions/fn_AI_despawn.sqf} | 2 +- .../functions/fn_AI_guards.sqf} | 32 +- .../functions/fn_AI_heli.sqf} | 54 ++-- .../functions/fn_AI_hit.sqf} | 0 .../functions/fn_AI_hit_vehicle.sqf} | 2 +- .../functions/fn_AI_infantry.sqf} | 70 ++--- .../functions/fn_AI_interact.sqf} | 0 .../functions/fn_AI_killed.sqf} | 2 +- .../functions/fn_AI_refresh.sqf} | 2 +- .../functions/fn_AI_spawn.sqf} | 59 +++- .../functions/fn_AI_trace.sqf} | 0 .../functions/fn_AI_trace_base.sqf} | 0 .../functions/fn_AI_trace_vehicle.sqf} | 2 +- sarge/code/functions/fn_AI_traders.sqf | 259 +++++++++++++++ .../functions/fn_AI_vehicle.sqf} | 62 ++-- .../functions/fn_functions.sqf} | 2 +- .../init_base_guards.sqf} | 8 +- .../map_config/SAR_cfg_grid_altis.sqf | 2 +- .../map_config/SAR_cfg_grid_chernarus.sqf | 2 +- .../map_config/SAR_cfg_grid_fallujah.sqf | 2 +- .../map_config/SAR_cfg_grid_lingor.sqf | 2 +- .../map_config/SAR_cfg_grid_mbg_celle2.sqf | 2 +- .../map_config/SAR_cfg_grid_namalsk.sqf | 2 +- .../map_config/SAR_cfg_grid_panthera.sqf | 2 +- .../map_config/SAR_cfg_grid_takistan.sqf | 2 +- .../map_config/SAR_cfg_grid_tanoa.sqf | 2 +- .../map_config/SAR_cfg_grid_taviana.sqf | 2 +- sarge/code/map_config/SAR_cfg_grps_altis.sqf | 133 ++++++++ .../map_config/SAR_cfg_grps_chernarus.sqf | 80 ++--- .../map_config/SAR_cfg_grps_fallujah.sqf | 20 +- .../map_config/SAR_cfg_grps_lingor.sqf | 30 +- .../map_config/SAR_cfg_grps_mbg_celle2.sqf | 34 +- .../map_config/SAR_cfg_grps_namalsk.sqf | 18 +- .../map_config/SAR_cfg_grps_panthera.sqf | 20 +- .../map_config/SAR_cfg_grps_takistan.sqf | 20 +- .../map_config/SAR_cfg_grps_tanoa.sqf | 78 ++--- .../map_config/SAR_cfg_grps_taviana.sqf | 32 +- sarge/{ => code}/toggle_base_guards.sqf | 0 sarge/config.cpp | 45 ++- sarge/init/fn_postInit.sqf | 75 ++--- sarge/init/fn_preInit.sqf | 295 ++++++++++++++++++ sarge/map_config/SAR_cfg_grps_altis.sqf | 272 ---------------- 52 files changed, 1065 insertions(+), 1251 deletions(-) delete mode 100644 sarge/SAR_config.sqf delete mode 100644 sarge/SAR_define.hpp delete mode 100644 sarge/SAR_setup_AI_patrol_heli.sqf rename sarge/{ => UPSMON}/Init_UPSMON.sqf (99%) rename sarge/{ => UPSMON}/UPSMON.sqf (100%) rename sarge/{ => UPSMON}/bonus/Composition_table.sqf (100%) rename sarge/{ => UPSMON}/bonus/UPSMON_Anim.sqf (100%) rename sarge/{SAR_AI_despawn.sqf => code/functions/fn_AI_despawn.sqf} (98%) rename sarge/{SAR_setup_AI_patrol_guards.sqf => code/functions/fn_AI_guards.sqf} (92%) rename sarge/{SAR_AI_landDrop.sqf => code/functions/fn_AI_heli.sqf} (83%) rename sarge/{SAR_aihit.sqf => code/functions/fn_AI_hit.sqf} (100%) rename sarge/{SAR_ai_vehicle_hit.sqf => code/functions/fn_AI_hit_vehicle.sqf} (98%) rename sarge/{SAR_setup_AI_patrol.sqf => code/functions/fn_AI_infantry.sqf} (81%) rename sarge/{SAR_interact.sqf => code/functions/fn_AI_interact.sqf} (100%) rename sarge/{SAR_aikilled.sqf => code/functions/fn_AI_killed.sqf} (99%) rename sarge/{SAR_reammo_refuel_AI.sqf => code/functions/fn_AI_refresh.sqf} (99%) rename sarge/{SAR_AI_spawn.sqf => code/functions/fn_AI_spawn.sqf} (67%) rename sarge/{SAR_trace_entities.sqf => code/functions/fn_AI_trace.sqf} (100%) rename sarge/{SAR_trace_base_entities.sqf => code/functions/fn_AI_trace_base.sqf} (100%) rename sarge/{SAR_trace_from_vehicle.sqf => code/functions/fn_AI_trace_vehicle.sqf} (98%) create mode 100644 sarge/code/functions/fn_AI_traders.sqf rename sarge/{SAR_setup_AI_patrol_land.sqf => code/functions/fn_AI_vehicle.sqf} (85%) rename sarge/{SAR_functions.sqf => code/functions/fn_functions.sqf} (99%) rename sarge/{SAR_init_Base_guards.sqf => code/init_base_guards.sqf} (93%) rename sarge/{ => code}/map_config/SAR_cfg_grid_altis.sqf (96%) rename sarge/{ => code}/map_config/SAR_cfg_grid_chernarus.sqf (96%) rename sarge/{ => code}/map_config/SAR_cfg_grid_fallujah.sqf (94%) rename sarge/{ => code}/map_config/SAR_cfg_grid_lingor.sqf (96%) rename sarge/{ => code}/map_config/SAR_cfg_grid_mbg_celle2.sqf (95%) rename sarge/{ => code}/map_config/SAR_cfg_grid_namalsk.sqf (95%) rename sarge/{ => code}/map_config/SAR_cfg_grid_panthera.sqf (96%) rename sarge/{ => code}/map_config/SAR_cfg_grid_takistan.sqf (94%) rename sarge/{ => code}/map_config/SAR_cfg_grid_tanoa.sqf (96%) rename sarge/{ => code}/map_config/SAR_cfg_grid_taviana.sqf (94%) create mode 100644 sarge/code/map_config/SAR_cfg_grps_altis.sqf rename sarge/{ => code}/map_config/SAR_cfg_grps_chernarus.sqf (86%) rename sarge/{ => code}/map_config/SAR_cfg_grps_fallujah.sqf (84%) rename sarge/{ => code}/map_config/SAR_cfg_grps_lingor.sqf (90%) rename sarge/{ => code}/map_config/SAR_cfg_grps_mbg_celle2.sqf (95%) rename sarge/{ => code}/map_config/SAR_cfg_grps_namalsk.sqf (89%) rename sarge/{ => code}/map_config/SAR_cfg_grps_panthera.sqf (84%) rename sarge/{ => code}/map_config/SAR_cfg_grps_takistan.sqf (84%) rename sarge/{ => code}/map_config/SAR_cfg_grps_tanoa.sqf (81%) rename sarge/{ => code}/map_config/SAR_cfg_grps_taviana.sqf (93%) rename sarge/{ => code}/toggle_base_guards.sqf (100%) delete mode 100644 sarge/map_config/SAR_cfg_grps_altis.sqf diff --git a/installation.md b/installation.md index 71570c2..d886573 100644 --- a/installation.md +++ b/installation.md @@ -1,11 +1,12 @@ -ATTENTION! -All code from prior versions of 2.0.0 MUST be removed from the init.sqf and the descriptions.ext! +Tips: +- 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 -Place the sarge and upsmon PBOs inside the @ExileServer\addons folder. +Place the sarge PBO inside the @ExileServer\addons folder. ### 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 class CfgExileCustomCode { @@ -40,5 +41,3 @@ Now change it to this: ```html 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. diff --git a/sarge.pbo b/sarge.pbo index fcbdbb730f169b49466b0899a1136f601f7af740..bd566d56ac91286ff34e2c7c8e6a89b52eb3c3ba 100644 GIT binary patch delta 14180 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, ; - ["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, , ; - ["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, , ; - ["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, , ; - ["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, , ; - ["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, , ; - ["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, , ; - ["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, , ; - ["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, , ; - ["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; \ No newline at end of file diff --git a/sarge/SAR_define.hpp b/sarge/SAR_define.hpp deleted file mode 100644 index ae71460..0000000 --- a/sarge/SAR_define.hpp +++ /dev/null @@ -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"; - }; -}; \ No newline at end of file diff --git a/sarge/SAR_setup_AI_patrol_heli.sqf b/sarge/SAR_setup_AI_patrol_heli.sqf deleted file mode 100644 index 3306f60..0000000 --- a/sarge/SAR_setup_AI_patrol_heli.sqf +++ /dev/null @@ -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; \ No newline at end of file diff --git a/sarge/Init_UPSMON.sqf b/sarge/UPSMON/Init_UPSMON.sqf similarity index 99% rename from sarge/Init_UPSMON.sqf rename to sarge/UPSMON/Init_UPSMON.sqf index 979ddea..49fb3ce 100644 --- a/sarge/Init_UPSMON.sqf +++ b/sarge/UPSMON/Init_UPSMON.sqf @@ -159,7 +159,7 @@ UPSMON_Logic_civkill = _group createUnit ["LOGIC", [1,1,1], [], 0, "NONE"]; _group = 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"; //Core diff --git a/sarge/UPSMON/MODULES/UPSMON_ModifyUcthis.sqf b/sarge/UPSMON/MODULES/UPSMON_ModifyUcthis.sqf index 6ceaf90..96f9a62 100644 --- a/sarge/UPSMON/MODULES/UPSMON_ModifyUcthis.sqf +++ b/sarge/UPSMON/MODULES/UPSMON_ModifyUcthis.sqf @@ -12,6 +12,6 @@ If (!IsNull _npc && alive _npc && _grp in UPSMON_NPCs) then If (alive _npc) then { - _this execvm "\addons\sarge\UPSMON.sqf"; + _this execvm "\addons\sarge\UPSMON\UPSMON.sqf"; }; }; \ No newline at end of file diff --git a/sarge/UPSMON.sqf b/sarge/UPSMON/UPSMON.sqf similarity index 100% rename from sarge/UPSMON.sqf rename to sarge/UPSMON/UPSMON.sqf diff --git a/sarge/bonus/Composition_table.sqf b/sarge/UPSMON/bonus/Composition_table.sqf similarity index 100% rename from sarge/bonus/Composition_table.sqf rename to sarge/UPSMON/bonus/Composition_table.sqf diff --git a/sarge/bonus/UPSMON_Anim.sqf b/sarge/UPSMON/bonus/UPSMON_Anim.sqf similarity index 100% rename from sarge/bonus/UPSMON_Anim.sqf rename to sarge/UPSMON/bonus/UPSMON_Anim.sqf diff --git a/sarge/SAR_AI_despawn.sqf b/sarge/code/functions/fn_AI_despawn.sqf similarity index 98% rename from sarge/SAR_AI_despawn.sqf rename to sarge/code/functions/fn_AI_despawn.sqf index 50a49b0..261cd87 100644 --- a/sarge/SAR_AI_despawn.sqf +++ b/sarge/code/functions/fn_AI_despawn.sqf @@ -14,7 +14,7 @@ */ private ["_timeout","_triggername","_tmparr","_markername","_valuearray","_grps_band","_grps_sold","_grps_surv","_trigger"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _timeout = SAR_DESPAWN_TIMEOUT; diff --git a/sarge/SAR_setup_AI_patrol_guards.sqf b/sarge/code/functions/fn_AI_guards.sqf similarity index 92% rename from sarge/SAR_setup_AI_patrol_guards.sqf rename to sarge/code/functions/fn_AI_guards.sqf index 0a2b4ef..b17374b 100644 --- a/sarge/SAR_setup_AI_patrol_guards.sqf +++ b/sarge/code/functions/fn_AI_guards.sqf @@ -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"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; 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]; _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; @@ -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);}; -[_leader] spawn SAR_AI_base_trace; +[_leader] spawn SAR_fnc_AI_trace_base; _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 ["MPHit", {Null = _this spawn SAR_AI_hit;}]; +_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; +_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; /* // TODO: Convert to Exile friendly action _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);}; - [_this] spawn SAR_AI_base_trace; + [_this] spawn SAR_fnc_AI_trace_base; _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 ["MPHit", {Null = _this spawn SAR_AI_hit;}]; + _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; + _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; [_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);}; - [_this] spawn SAR_AI_base_trace; + [_this] spawn SAR_fnc_AI_trace_base; _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 ["MPHit", {Null = _this spawn SAR_AI_hit;}]; + _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; + _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; [_this] joinSilent _group; diff --git a/sarge/SAR_AI_landDrop.sqf b/sarge/code/functions/fn_AI_heli.sqf similarity index 83% rename from sarge/SAR_AI_landDrop.sqf rename to sarge/code/functions/fn_AI_heli.sqf index 3306f60..fc1f1e3 100644 --- a/sarge/SAR_AI_landDrop.sqf +++ b/sarge/code/functions/fn_AI_heli.sqf @@ -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"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _patrol_area_name = _this select 0; _argc = count _this; @@ -62,7 +62,7 @@ if (_argc > 3) then { _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]; _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_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; +// get a random starting position that is on land +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; @@ -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);}; -[_leader] spawn SAR_AI_trace_veh; +[_leader] spawn SAR_fnc_AI_trace_vehicle; 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] spawn SAR_fnc_AI_refresh; -_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; -_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; +_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; +_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; _leader moveInDriver _heli; _leader assignAsDriver _heli; @@ -143,17 +147,17 @@ if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _man2heli; _man2heli a _man2heli moveInTurret [_heli,[0]]; -[_man2heli] spawn SAR_AI_trace_veh; +[_man2heli] spawn SAR_fnc_AI_trace_vehicle; 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] spawn SAR_fnc_AI_refresh; -_man2heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; -_man2heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; +_man2heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; +_man2heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; [_man2heli] joinSilent _groupheli; @@ -181,17 +185,17 @@ if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _man3heli; _man3heli a _man3heli moveInTurret [_heli,[1]]; -[_man3heli] spawn SAR_AI_trace_veh; +[_man3heli] spawn SAR_fnc_AI_trace_vehicle; 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] spawn SAR_fnc_AI_refresh; -_man3heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; -_man3heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; +_man3heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; +_man3heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; [_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]; }; -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; \ No newline at end of file diff --git a/sarge/SAR_aihit.sqf b/sarge/code/functions/fn_AI_hit.sqf similarity index 100% rename from sarge/SAR_aihit.sqf rename to sarge/code/functions/fn_AI_hit.sqf diff --git a/sarge/SAR_ai_vehicle_hit.sqf b/sarge/code/functions/fn_AI_hit_vehicle.sqf similarity index 98% rename from sarge/SAR_ai_vehicle_hit.sqf rename to sarge/code/functions/fn_AI_hit_vehicle.sqf index 863454f..4a10397 100644 --- a/sarge/SAR_ai_vehicle_hit.sqf +++ b/sarge/code/functions/fn_AI_hit_vehicle.sqf @@ -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"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _ai_veh = _this select 0; _ai_part = _this select 1; diff --git a/sarge/SAR_setup_AI_patrol.sqf b/sarge/code/functions/fn_AI_infantry.sqf similarity index 81% rename from sarge/SAR_setup_AI_patrol.sqf rename to sarge/code/functions/fn_AI_infantry.sqf index d03ccc9..f8e6a03 100644 --- a/sarge/SAR_setup_AI_patrol.sqf +++ b/sarge/code/functions/fn_AI_infantry.sqf @@ -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"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _patrol_area_name = _this select 0; _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]; // 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; @@ -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);}; -[_leader] spawn SAR_AI_trace; +[_leader] spawn SAR_fnc_AI_trace; _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 ["MPHit", {Null = _this spawn SAR_AI_hit;}]; +_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}}]; @@ -104,9 +108,9 @@ _leader setVariable ["SAR_AI_type",_ai_type + " Leader",false]; // store experience value on AI _leader setVariable ["SAR_AI_experience",0,false]; -/* // set behaviour & speedmode +// set behaviour & speedmode _leader setspeedmode "FULL"; -_leader setBehaviour "AWARE"; */ +_leader setBehaviour "AWARE"; // Establish siper unit type and skills _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);}; - [_this] spawn SAR_AI_trace; + [_this] spawn SAR_fnc_AI_trace; _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 ["MPHit", {Null = _this spawn SAR_AI_hit;}]; + _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}}]; @@ -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);}; - [_this] spawn SAR_AI_trace; + [_this] spawn SAR_fnc_AI_trace; _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 ["MPHit", {Null = _this spawn SAR_AI_hit;}]; + _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}}]; @@ -188,24 +192,24 @@ for "_i" from 0 to (_riflemen - 1) do }; // 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 { - _ups_para_list pushBack ['RESPAWN']; - _ups_para_list pushBack ['RESPAWNTIME:']; + _ups_para_list pushBack ["RESPAWN"]; + _ups_para_list pushBack ["RESPAWNTIME:"]; _ups_para_list pushBack [_respawn_time]; }; if (!SAR_AI_STEAL_VEHICLE) then { - _ups_para_list pushBack ['NOVEH2']; + _ups_para_list pushBack ["NOVEH2"]; }; if (!SAR_AI_COMBAT_VEHICLE) then { - _ups_para_list pushBack ['NOVEH']; + _ups_para_list pushBack ["NOVEH"]; }; if (SAR_AI_disable_UPSMON_AI) then { - _ups_para_list pushBack ['NOAI']; + _ups_para_list pushBack ["NOAI"]; }; if(_action == "") then {_action = "PATROL";}; @@ -217,7 +221,7 @@ switch (_action) do { }; case "FORTIFY": { - _ups_para_list pushBack ['FORTIFY']; + _ups_para_list pushBack ["FORTIFY"]; _ups_para_list spawn UPSMON; }; case "PATROL": @@ -226,7 +230,7 @@ switch (_action) do { }; case "AMBUSH2": { - _ups_para_list pushBack ['AMBUSH']; + _ups_para_list pushBack ["AMBUSH"]; _ups_para_list spawn UPSMON; }; 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)]; }; -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; \ No newline at end of file diff --git a/sarge/SAR_interact.sqf b/sarge/code/functions/fn_AI_interact.sqf similarity index 100% rename from sarge/SAR_interact.sqf rename to sarge/code/functions/fn_AI_interact.sqf diff --git a/sarge/SAR_aikilled.sqf b/sarge/code/functions/fn_AI_killed.sqf similarity index 99% rename from sarge/SAR_aikilled.sqf rename to sarge/code/functions/fn_AI_killed.sqf index 4d1593b..cbfb2df 100644 --- a/sarge/SAR_aikilled.sqf +++ b/sarge/code/functions/fn_AI_killed.sqf @@ -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"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _ai = _this select 0; _aikiller = _this select 1; diff --git a/sarge/SAR_reammo_refuel_AI.sqf b/sarge/code/functions/fn_AI_refresh.sqf similarity index 99% rename from sarge/SAR_reammo_refuel_AI.sqf rename to sarge/code/functions/fn_AI_refresh.sqf index a2cc4a7..4e5b70d 100644 --- a/sarge/SAR_reammo_refuel_AI.sqf +++ b/sarge/code/functions/fn_AI_refresh.sqf @@ -14,7 +14,7 @@ */ private ["_ai","_sleeptime","_veh_weapons","_vehicle","_weapons","_reloadmag","_magazintypes","_legit_weapon","_weap_obj"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _ai = _this select 0; diff --git a/sarge/SAR_AI_spawn.sqf b/sarge/code/functions/fn_AI_spawn.sqf similarity index 67% rename from sarge/SAR_AI_spawn.sqf rename to sarge/code/functions/fn_AI_spawn.sqf index 2a7cf36..1f8e078 100644 --- a/sarge/SAR_AI_spawn.sqf +++ b/sarge/code/functions/fn_AI_spawn.sqf @@ -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"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _playerlist = _this select 0; _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 { _snipers=floor (random ((_max_p_grp select 0)-1)); _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]; // update AI monitor _check = [["grps_band"],[_grps_upd],_markername] call SAR_AI_mon_upd; + if (SAR_HC) then { + { + _hcID = getPlayerUID _x; + if(_hcID select [0,2] isEqualTo 'HC')then { + _SAIS_HC = _group setGroupOwner (owner _x); + if (_SAIS_HC) then { + if (SAR_DEBUG) then { + diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID]; + }; + } else { + if (SAR_DEBUG) then { + diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID]; + }; + }; + }; + } forEach allPlayers; + }; }; }; }; @@ -81,10 +98,27 @@ for "_i" from (count _grps_sold) to ((_max_grps select 1) - 1) do if(_chance < _probability) then { _snipers=floor (random ((_max_p_grp select 1)-1)); _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]; // update AI monitor _check = [["grps_sold"],[_grps_upd],_markername] call SAR_AI_mon_upd; + if (SAR_HC) then { + { + _hcID = getPlayerUID _x; + if(_hcID select [0,2] isEqualTo 'HC')then { + _SAIS_HC = _group setGroupOwner (owner _x); + if (_SAIS_HC) then { + if (SAR_DEBUG) then { + diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID]; + }; + } else { + if (SAR_DEBUG) then { + diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID]; + }; + }; + }; + } forEach allPlayers; + }; }; }; }; @@ -100,10 +134,27 @@ for "_i" from (count _grps_surv) to ((_max_grps select 2) - 1) do if(_chance < _probability) then { _snipers=floor (random ((_max_p_grp select 2)-1)); _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]; // update AI monitor _check = [["grps_surv"],[_grps_upd],_markername] call SAR_AI_mon_upd; + if (SAR_HC) then { + { + _hcID = getPlayerUID _x; + if(_hcID select [0,2] isEqualTo 'HC')then { + _SAIS_HC = _group setGroupOwner (owner _x); + if (_SAIS_HC) then { + if (SAR_DEBUG) then { + diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID]; + }; + } else { + if (SAR_DEBUG) then { + diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID]; + }; + }; + }; + } forEach allPlayers; + }; }; }; }; diff --git a/sarge/SAR_trace_entities.sqf b/sarge/code/functions/fn_AI_trace.sqf similarity index 100% rename from sarge/SAR_trace_entities.sqf rename to sarge/code/functions/fn_AI_trace.sqf diff --git a/sarge/SAR_trace_base_entities.sqf b/sarge/code/functions/fn_AI_trace_base.sqf similarity index 100% rename from sarge/SAR_trace_base_entities.sqf rename to sarge/code/functions/fn_AI_trace_base.sqf diff --git a/sarge/SAR_trace_from_vehicle.sqf b/sarge/code/functions/fn_AI_trace_vehicle.sqf similarity index 98% rename from sarge/SAR_trace_from_vehicle.sqf rename to sarge/code/functions/fn_AI_trace_vehicle.sqf index 6a0b409..40661a4 100644 --- a/sarge/SAR_trace_from_vehicle.sqf +++ b/sarge/code/functions/fn_AI_trace_vehicle.sqf @@ -14,7 +14,7 @@ */ private ["_ai","_entity_array","_humanity","_humanitylimit","_sleeptime","_detectrange","_tracewhat","_player_rating","_clientmachine"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _ai = _this select 0; _tracewhat = "CAManBase"; diff --git a/sarge/code/functions/fn_AI_traders.sqf b/sarge/code/functions/fn_AI_traders.sqf new file mode 100644 index 0000000..3ed5edc --- /dev/null +++ b/sarge/code/functions/fn_AI_traders.sqf @@ -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; \ No newline at end of file diff --git a/sarge/SAR_setup_AI_patrol_land.sqf b/sarge/code/functions/fn_AI_vehicle.sqf similarity index 85% rename from sarge/SAR_setup_AI_patrol_land.sqf rename to sarge/code/functions/fn_AI_vehicle.sqf index 9ff5216..fe252fe 100644 --- a/sarge/SAR_setup_AI_patrol_land.sqf +++ b/sarge/code/functions/fn_AI_vehicle.sqf @@ -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"]; -if (!isServer) exitWith {}; +//if (!isServer) exitWith {}; _patrol_area_name = _this select 0; @@ -56,14 +56,14 @@ if (_argc > 1) then { if (_argc > 2) then { _vehicles = _this select 2; } 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; }; if (_argc > 3) then { _vehicles_crews = _this select 3; } 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; }; @@ -81,20 +81,24 @@ if (_argc > 5) 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; }; } 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]; _riflemanskills = call compile format ["SAR_soldier_%1_skills",_type]; _sniperskills = call compile format ["SAR_sniper_%1_skills",_type]; -// get a random starting position, UPSMON will handle the rest -_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos; +// get a random starting position that is on land +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 _groupvehicles = createGroup _side; @@ -107,7 +111,7 @@ _groupvehicles = createGroup _side; _veh setVariable ["Sarge",1,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; @@ -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);}; - [_leader] spawn SAR_AI_trace_veh; + [_leader] spawn SAR_fnc_AI_trace_vehicle; 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] spawn SAR_fnc_AI_refresh; - _leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}]; - _leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}]; + _leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; + _leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; _leader moveInDriver _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);}; - [_this] spawn SAR_AI_trace_veh; + [_this] spawn SAR_fnc_AI_trace_vehicle; switch (_grouptype) do { case 1:{_this setIdentity "id_SAR_sold_man";}; case 2:{_this setIdentity "id_SAR_surv_lead";}; 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 ["MPHit", {Null = _this spawn SAR_AI_hit;}]; + _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; + _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; [_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);}; - [_this] spawn SAR_AI_trace_veh; + [_this] spawn SAR_fnc_AI_trace_vehicle; switch (_grouptype) do { case 1:{_this setIdentity "id_SAR_sold_man";}; case 2:{_this setIdentity "id_SAR_surv_lead";}; 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 ["MPHit", {Null = _this spawn SAR_AI_hit;}]; + _this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_fnc_AI_killed;}]; + _this addMPEventHandler ["MPHit", {Null = _this spawn SAR_fnc_AI_hit;}]; [_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]; }; -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; \ No newline at end of file diff --git a/sarge/SAR_functions.sqf b/sarge/code/functions/fn_functions.sqf similarity index 99% rename from sarge/SAR_functions.sqf rename to sarge/code/functions/fn_functions.sqf index a984230..866abe3 100644 --- a/sarge/SAR_functions.sqf +++ b/sarge/code/functions/fn_functions.sqf @@ -22,7 +22,7 @@ SAR_circle_static = { _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; _action = _this select 1; diff --git a/sarge/SAR_init_Base_guards.sqf b/sarge/code/init_base_guards.sqf similarity index 93% rename from sarge/SAR_init_Base_guards.sqf rename to sarge/code/init_base_guards.sqf index 48f199e..f6e4587 100644 --- a/sarge/SAR_init_Base_guards.sqf +++ b/sarge/code/init_base_guards.sqf @@ -14,7 +14,7 @@ */ 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]; @@ -59,12 +59,12 @@ diag_log format["Sarge AI System: Total Territory Locations Query Returned With: _spawnMark setMarkerSize [_sizeX,_sizeY]; _spawnMark setMarkeralpha 0; - _behaviors = ["patrol"]; // Do not change this! + _behaviors = ["fortify"]; _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[("" + ("Make guards hostile") +""),""],"dayz_code\actions\toggle_base_guards.sqf",_x,1,false,true,"",""]; + s_player_guardToggle = _x addaction [format[("" + ("Make guards hostile") +""),""],"\addons\sarge\code\toggle_base_guards.sqf",_x,1,false,true,"",""]; }; } foreach _flagPoles; diff --git a/sarge/map_config/SAR_cfg_grid_altis.sqf b/sarge/code/map_config/SAR_cfg_grid_altis.sqf similarity index 96% rename from sarge/map_config/SAR_cfg_grid_altis.sqf rename to sarge/code/map_config/SAR_cfg_grid_altis.sqf index 9c023b2..695e6d9 100644 --- a/sarge/map_config/SAR_cfg_grid_altis.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_altis.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_chernarus.sqf b/sarge/code/map_config/SAR_cfg_grid_chernarus.sqf similarity index 96% rename from sarge/map_config/SAR_cfg_grid_chernarus.sqf rename to sarge/code/map_config/SAR_cfg_grid_chernarus.sqf index 6521c98..8e5e105 100644 --- a/sarge/map_config/SAR_cfg_grid_chernarus.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_chernarus.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_fallujah.sqf b/sarge/code/map_config/SAR_cfg_grid_fallujah.sqf similarity index 94% rename from sarge/map_config/SAR_cfg_grid_fallujah.sqf rename to sarge/code/map_config/SAR_cfg_grid_fallujah.sqf index 2070e36..5af8bb5 100644 --- a/sarge/map_config/SAR_cfg_grid_fallujah.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_fallujah.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_lingor.sqf b/sarge/code/map_config/SAR_cfg_grid_lingor.sqf similarity index 96% rename from sarge/map_config/SAR_cfg_grid_lingor.sqf rename to sarge/code/map_config/SAR_cfg_grid_lingor.sqf index 6a800d9..3e7ae29 100644 --- a/sarge/map_config/SAR_cfg_grid_lingor.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_lingor.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_mbg_celle2.sqf b/sarge/code/map_config/SAR_cfg_grid_mbg_celle2.sqf similarity index 95% rename from sarge/map_config/SAR_cfg_grid_mbg_celle2.sqf rename to sarge/code/map_config/SAR_cfg_grid_mbg_celle2.sqf index 6d3a476..51d8cbc 100644 --- a/sarge/map_config/SAR_cfg_grid_mbg_celle2.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_mbg_celle2.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_namalsk.sqf b/sarge/code/map_config/SAR_cfg_grid_namalsk.sqf similarity index 95% rename from sarge/map_config/SAR_cfg_grid_namalsk.sqf rename to sarge/code/map_config/SAR_cfg_grid_namalsk.sqf index d16b762..e83ac87 100644 --- a/sarge/map_config/SAR_cfg_grid_namalsk.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_namalsk.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_panthera.sqf b/sarge/code/map_config/SAR_cfg_grid_panthera.sqf similarity index 96% rename from sarge/map_config/SAR_cfg_grid_panthera.sqf rename to sarge/code/map_config/SAR_cfg_grid_panthera.sqf index 911f09d..ec6d757 100644 --- a/sarge/map_config/SAR_cfg_grid_panthera.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_panthera.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_takistan.sqf b/sarge/code/map_config/SAR_cfg_grid_takistan.sqf similarity index 94% rename from sarge/map_config/SAR_cfg_grid_takistan.sqf rename to sarge/code/map_config/SAR_cfg_grid_takistan.sqf index 7273e68..1042cc8 100644 --- a/sarge/map_config/SAR_cfg_grid_takistan.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_takistan.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_tanoa.sqf b/sarge/code/map_config/SAR_cfg_grid_tanoa.sqf similarity index 96% rename from sarge/map_config/SAR_cfg_grid_tanoa.sqf rename to sarge/code/map_config/SAR_cfg_grid_tanoa.sqf index f85d10d..bbda1de 100644 --- a/sarge/map_config/SAR_cfg_grid_tanoa.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_tanoa.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/map_config/SAR_cfg_grid_taviana.sqf b/sarge/code/map_config/SAR_cfg_grid_taviana.sqf similarity index 94% rename from sarge/map_config/SAR_cfg_grid_taviana.sqf rename to sarge/code/map_config/SAR_cfg_grid_taviana.sqf index d67cab8..b377b29 100644 --- a/sarge/map_config/SAR_cfg_grid_taviana.sqf +++ b/sarge/code/map_config/SAR_cfg_grid_taviana.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // diff --git a/sarge/code/map_config/SAR_cfg_grps_altis.sqf b/sarge/code/map_config/SAR_cfg_grps_altis.sqf new file mode 100644 index 0000000..13ec815 --- /dev/null +++ b/sarge/code/map_config/SAR_cfg_grps_altis.sqf @@ -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"]; +}; diff --git a/sarge/map_config/SAR_cfg_grps_chernarus.sqf b/sarge/code/map_config/SAR_cfg_grps_chernarus.sqf similarity index 86% rename from sarge/map_config/SAR_cfg_grps_chernarus.sqf rename to sarge/code/map_config/SAR_cfg_grps_chernarus.sqf index 32933e4..8b5ff54 100644 --- a/sarge/map_config/SAR_cfg_grps_chernarus.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_chernarus.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.5.0 // 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 [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,100,100],[0,2,1]],"SAR_area_0_0"] call SAR_AI_mon_upd; @@ -129,7 +129,7 @@ if (SAR_dynamic_spawning) then { // test south of lopatino, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su [["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[100,0,0],[6,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd; - diag_log format["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 // -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 _this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]]; @@ -195,7 +195,7 @@ _this setMarkerBrush "Solid"; _this setMarkerSize [10, 10]; SAR_marker_DEBUG_devilscastle = _this; -diag_log format["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 @@ -206,7 +206,7 @@ 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; +// 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!) // 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 // -// [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, // -// [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 // -// [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 // //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 -[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 -[SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli; -[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 Sarge's AI System:; // heli patrol east coast -[SAR_marker_helipatrol_eastcoast,1,true] call SAR_AI_heli; -[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 Sarge's AI System:; // 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; +[SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:; +[SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:; +[SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:; +[SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:; -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 //--------------------------------------------------------------------------------- // -// 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!) // 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 // -// [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 // -// [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 // -// [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 // -[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! -[SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call SAR_AI; -[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_AI; -[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI; -[SAR_marker_DEBUG_veh,3,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 Sarge's AI System:; +[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:; +[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:; -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 // -// 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 @@ -345,7 +345,7 @@ diag_log format["SAR_AI: Static Spawning for infantry patrols finished"]; ["UAZ_Unarmed_TK_EP1"], // used vehicles [[1,1,1]], // Vehicle initial crew 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 @@ -357,11 +357,11 @@ diag_log format["SAR_AI: Static Spawning for infantry patrols finished"]; [[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; + ] 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 @@ -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 true, // if this group should respawn or not 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 @@ -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 true, // if this group should respawn or not 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 @@ -393,8 +393,8 @@ diag_log format["SAR_AI: Static Spawning for vehicle patrols started"]; [[1,1,0]], // Vehicle initial crew true, // if this group should respawn or not 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 ---- diff --git a/sarge/map_config/SAR_cfg_grps_fallujah.sqf b/sarge/code/map_config/SAR_cfg_grps_fallujah.sqf similarity index 84% rename from sarge/map_config/SAR_cfg_grps_fallujah.sqf rename to sarge/code/map_config/SAR_cfg_grps_fallujah.sqf index 6951a8f..6b4491f 100644 --- a/sarge/map_config/SAR_cfg_grps_fallujah.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_fallujah.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // @@ -81,8 +81,8 @@ this number is randomized // End of area marker definition section // ---------------------------------------------------------------------------------------- -diag_log format["SAR_AI: Area & Trigger definition finalized"]; -diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; +diag_log format["Sarge's AI System: Area & Trigger definition finalized"]; +diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"]; // // 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 -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 //--------------------------------------------------------------------------------- -// 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) // 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: // SARGE DEBUG - Debug group // 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 -//[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 -//[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 -//[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 @@ -130,5 +130,5 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; // ---- 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"]; diff --git a/sarge/map_config/SAR_cfg_grps_lingor.sqf b/sarge/code/map_config/SAR_cfg_grps_lingor.sqf similarity index 90% rename from sarge/map_config/SAR_cfg_grps_lingor.sqf rename to sarge/code/map_config/SAR_cfg_grps_lingor.sqf index 5ae55bf..a807b31 100644 --- a/sarge/map_config/SAR_cfg_grps_lingor.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_lingor.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // @@ -164,8 +164,8 @@ SAR_marker_helipatrol_mainland = _this; // End of area marker definition section // ---------------------------------------------------------------------------------------- -diag_log format["SAR_AI: Area & Trigger definition finalized"]; -diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; +diag_log format["Sarge's AI System: Area & Trigger definition finalized"]; +diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"]; // // 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 -[SAR_marker_helipatrol_prison,floor(random 2)+1] call SAR_AI_heli; -[SAR_marker_helipatrol_maruko_airport,floor(random 2)+1] call SAR_AI_heli; -[SAR_marker_helipatrol_fob_eddie,floor(random 2)+1] call SAR_AI_heli; -[SAR_marker_helipatrol_calamar,floor(random 2)+1] call SAR_AI_heli; -[SAR_marker_helipatrol_mainland,floor(random 2)+1] call SAR_AI_heli; +[SAR_marker_helipatrol_prison,floor(random 2)+1] call Sarge's AI System:; +[SAR_marker_helipatrol_maruko_airport,floor(random 2)+1] call Sarge's AI System:; +[SAR_marker_helipatrol_fob_eddie,floor(random 2)+1] call Sarge's AI System:; +[SAR_marker_helipatrol_calamar,floor(random 2)+1] call Sarge's AI System:; +[SAR_marker_helipatrol_mainland,floor(random 2)+1] call Sarge's AI System:; -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 //--------------------------------------------------------------------------------- -// 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) // 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: // SARGE DEBUG - Debug group // 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 -//[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 -//[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 -//[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 @@ -219,5 +219,5 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; // ---- 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"]; diff --git a/sarge/map_config/SAR_cfg_grps_mbg_celle2.sqf b/sarge/code/map_config/SAR_cfg_grps_mbg_celle2.sqf similarity index 95% rename from sarge/map_config/SAR_cfg_grps_mbg_celle2.sqf rename to sarge/code/map_config/SAR_cfg_grps_mbg_celle2.sqf index a45b0de..67f04e1 100644 --- a/sarge/map_config/SAR_cfg_grps_mbg_celle2.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_mbg_celle2.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // @@ -643,8 +643,8 @@ Manatee_Map_Center = _this; // End of area marker definition section // ---------------------------------------------------------------------------------------- -diag_log format["SAR_AI: Area & Trigger definition finalized"]; -diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; +diag_log format["Sarge's AI System: Area & Trigger definition finalized"]; +diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"]; // // 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 -[Manatee_Map_Center,1] call SAR_AI_heli; +[Manatee_Map_Center,1] call Sarge's AI System:; // 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 -[Manatee_North_East_Quadrant,3] call SAR_AI_heli; +[Manatee_North_East_Quadrant,3] call Sarge's AI System:; // 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 -[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 -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 //--------------------------------------------------------------------------------- -// 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) // 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 -[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: // SARGE DEBUG - Debug group // 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 -//[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 -//[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 -//[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 @@ -710,5 +710,5 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; // ---- 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"]; diff --git a/sarge/map_config/SAR_cfg_grps_namalsk.sqf b/sarge/code/map_config/SAR_cfg_grps_namalsk.sqf similarity index 89% rename from sarge/map_config/SAR_cfg_grps_namalsk.sqf rename to sarge/code/map_config/SAR_cfg_grps_namalsk.sqf index ca8a4b9..f3175a1 100644 --- a/sarge/map_config/SAR_cfg_grps_namalsk.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_namalsk.sqf @@ -92,8 +92,8 @@ if (_type == "static") then { // End of area marker definition section // ---------------------------------------------------------------------------------------- - diag_log format["SAR_AI: Area & Trigger definition finalized"]; - diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; + diag_log format["Sarge's AI System: Area & Trigger definition finalized"]; + diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"]; // // 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 - 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 //--------------------------------------------------------------------------------- - // 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) // 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits) @@ -122,16 +122,16 @@ if (_type == "static") then { // Example entries: // SARGE DEBUG - Debug group // 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 - //[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 - //[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 - //[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 @@ -141,5 +141,5 @@ if (_type == "static") then { // ---- 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"]; }; diff --git a/sarge/map_config/SAR_cfg_grps_panthera.sqf b/sarge/code/map_config/SAR_cfg_grps_panthera.sqf similarity index 84% rename from sarge/map_config/SAR_cfg_grps_panthera.sqf rename to sarge/code/map_config/SAR_cfg_grps_panthera.sqf index c0e74f7..25826ba 100644 --- a/sarge/map_config/SAR_cfg_grps_panthera.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_panthera.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // @@ -81,8 +81,8 @@ this number is randomized // End of area marker definition section // ---------------------------------------------------------------------------------------- -diag_log format["SAR_AI: Area & Trigger definition finalized"]; -diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; +diag_log format["Sarge's AI System: Area & Trigger definition finalized"]; +diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"]; // // 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 -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 //--------------------------------------------------------------------------------- -// 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) // 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: // SARGE DEBUG - Debug group // 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 -//[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 -//[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 -//[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 @@ -130,5 +130,5 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; // ---- 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"]; diff --git a/sarge/map_config/SAR_cfg_grps_takistan.sqf b/sarge/code/map_config/SAR_cfg_grps_takistan.sqf similarity index 84% rename from sarge/map_config/SAR_cfg_grps_takistan.sqf rename to sarge/code/map_config/SAR_cfg_grps_takistan.sqf index ecb7842..b52f245 100644 --- a/sarge/map_config/SAR_cfg_grps_takistan.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_takistan.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // @@ -81,8 +81,8 @@ this number is randomized // End of area marker definition section // ---------------------------------------------------------------------------------------- -diag_log format["SAR_AI: Area & Trigger definition finalized"]; -diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; +diag_log format["Sarge's AI System: Area & Trigger definition finalized"]; +diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"]; // // 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 -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 //--------------------------------------------------------------------------------- -// 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) // 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: // SARGE DEBUG - Debug group // 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 -//[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 -//[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 -//[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 @@ -130,5 +130,5 @@ diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"]; // ---- 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"]; diff --git a/sarge/map_config/SAR_cfg_grps_tanoa.sqf b/sarge/code/map_config/SAR_cfg_grps_tanoa.sqf similarity index 81% rename from sarge/map_config/SAR_cfg_grps_tanoa.sqf rename to sarge/code/map_config/SAR_cfg_grps_tanoa.sqf index 345dfb9..3bcb49a 100644 --- a/sarge/map_config/SAR_cfg_grps_tanoa.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_tanoa.sqf @@ -44,7 +44,7 @@ _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"]; + diag_log format["Sarge's AI System: 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_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_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 { // 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 _this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]]; @@ -116,7 +116,7 @@ if (_type == "static") then { _this setMarkerSize [10, 10]; 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 // ---------------------------------------------------------------------------------------- @@ -126,7 +126,7 @@ if (_type == "static") then { // 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!) // 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 // - // [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, // - // [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 // - // [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 /* //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 - [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 - [SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli; - [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 Sarge's AI System:; // heli patrol east coast - [SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli; - [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 Sarge's AI System:; */ // 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; */ + /* [SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:; + [SAR_marker_DEBUG_veh,1,true,30] call Sarge's AI System:; + [SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:; + [SAR_marker_DEBUG_veh,3,true,30] call Sarge's AI System:; */ - 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 //--------------------------------------------------------------------------------- // - // 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!) // 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 // - // [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 // - // [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 // - // [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 - /* [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! - /* [SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call SAR_AI; - [SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_AI; - [SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI; - [SAR_marker_DEBUG_veh,3,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 Sarge's AI System:; + [SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:; + [SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call Sarge's AI System:; */ - 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 // - // 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 @@ -256,7 +256,7 @@ if (_type == "static") then { ["UAZ_Unarmed_TK_EP1"], // used vehicles [[1,1,1]], // Vehicle initial crew 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 @@ -268,17 +268,17 @@ if (_type == "static") then { [[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; + ] 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 - /* [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; */ + /* [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["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 ---- }; diff --git a/sarge/map_config/SAR_cfg_grps_taviana.sqf b/sarge/code/map_config/SAR_cfg_grps_taviana.sqf similarity index 93% rename from sarge/map_config/SAR_cfg_grps_taviana.sqf rename to sarge/code/map_config/SAR_cfg_grps_taviana.sqf index 817b665..d832e85 100644 --- a/sarge/map_config/SAR_cfg_grps_taviana.sqf +++ b/sarge/code/map_config/SAR_cfg_grps_taviana.sqf @@ -1,5 +1,5 @@ // ========================================================================================================= -// SAR_AI - DayZ AI library +// Sarge's AI System: - DayZ AI library // Version: 1.0.0 // Author: Sarge (sarge@krumeich.ch) // @@ -264,8 +264,8 @@ this number is randomized // End of area marker definition section // ---------------------------------------------------------------------------------------- -diag_log format["SAR_AI: Area & Trigger definition finalized"]; -diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"]; +diag_log format["Sarge's AI System: Area & Trigger definition finalized"]; +diag_log format["Sarge's AI System: Static Spawning for Helicopter patrols started"]; // // 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 - [SAR_marker_helipatrol_sabina,1] call SAR_AI_heli; + [SAR_marker_helipatrol_sabina,1] call Sarge's AI System:; //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 - [SAR_marker_helipatrol_nwaf,1] call SAR_AI_heli; + [SAR_marker_helipatrol_nwaf,1] call Sarge's AI System:; //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 - [SAR_marker_helipatrol_kraz,1] call SAR_AI_heli; + [SAR_marker_helipatrol_kraz,1] call Sarge's AI System:; //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 -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 //--------------------------------------------------------------------------------- -// 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) // 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: // SARGE DEBUG - Debug group // 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 -//[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 -//[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 -//[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 ---- -diag_log format["SAR_AI: Static Spawning for infantry patrols finished"]; +diag_log format["Sarge's AI System: Static Spawning for infantry patrols finished"]; diff --git a/sarge/toggle_base_guards.sqf b/sarge/code/toggle_base_guards.sqf similarity index 100% rename from sarge/toggle_base_guards.sqf rename to sarge/code/toggle_base_guards.sqf diff --git a/sarge/config.cpp b/sarge/config.cpp index a2e7cb7..1609886 100644 --- a/sarge/config.cpp +++ b/sarge/config.cpp @@ -11,7 +11,7 @@ class CfgPatches { }; class CfgFunctions { - class SargeAI { + class SAR { class main { file = "addons\sarge\init"; class preInit { @@ -21,31 +21,24 @@ class CfgFunctions { postInit = 1; }; }; - /* class SAR_compiles { - class SAR_AI_base_trace {}; - class SAR_AI_despawn {}; - class SAR_AI_guards {}; - class SAR_AI_hit {}; - class SAR_AI_infantry {}; - class SAR_AI_killed {}; - class SAR_AI_mon_read {}; - class SAR_AI_mon_upd {}; - class SAR_AI_spawn {}; - class SAR_AI_trace {}; - class SAR_AI_trace_veh {}; - class SAR_AI_veh_hit {}; - class SAR_AI_vehicle {}; - class SAR_debug_mon {}; - class SAR_isKindOfWeapon {}; - class SAR_returnConfigEntry {}; - 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 {}; - }; */ + class compiles { + file = "addons\sarge\code\functions"; + class AI_despawn {}; + class AI_guards {}; + class AI_heli {}; + class AI_hit {}; + class AI_hit_vehicle {}; + class AI_infantry {}; + class AI_interact {}; + class AI_killed {}; + class AI_refresh {}; + class AI_spawn {}; + class AI_trace {}; + class AI_trace_base {}; + class AI_trace_vehicle {}; + class AI_traders {}; + class AI_vehicle {}; + }; }; }; diff --git a/sarge/init/fn_postInit.sqf b/sarge/init/fn_postInit.sqf index 7a0d7aa..3d31c47 100644 --- a/sarge/init/fn_postInit.sqf +++ b/sarge/init/fn_postInit.sqf @@ -9,48 +9,16 @@ Sarge AI System 2.0+ Modded for Arma 3: Exile Mod Changes: Dango - https://www.hod-servers.com + http://www.hod-servers.com https://github.com/Teh-Dango */ private ["_worldname","_startx","_starty","_gridsize_x","_gridsize_y","_gridwidth","_markername","_triggername","_trig_act_stmnt","_trig_deact_stmnt","_trig_cond","_check","_script_handler","_legendname"]; -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"; -SAR_AI_trace = compile preprocessFileLineNumbers "\addons\sarge\SAR_trace_entities.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; +call compile preProcessFileLineNumbers "\addons\sarge\UPSMON\Init_UPSMON.sqf"; +call compile preProcessFileLineNumbers "\addons\sarge\code\functions\fn_functions.sqf"; // unfriendly AI bandits EAST setFriend [EAST, 1]; @@ -70,16 +38,14 @@ WEST setFriend [RESISTANCE, 1]; waituntil {(!isNil "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 { + _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];}; 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 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]; - _trig_act_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger on in %1';};[thislist,'%1'] spawn SAR_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_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_fnc_AI_despawn;",_triggername]; _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]; - ["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]; }; -["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]; -switch (_worldname) do { - case "namalsk": {SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];}; - case "altis": {SAR_Blacklist = ["MafiaTraderCity","TraderZoneSilderas","TraderZoneFolia"];}; - case "tanoa": {SAR_Blacklist = ["ExileMarker1","ExileMarker13","ExileMarker15","ExileMarker35","ExileMarker51"];}; - default {diag_log format ["Sarge's AI System: Blacklisted zones are not currently supported for %1!",worldName];}; +if (SAR_useBlacklist) then { + switch (_worldname) do { + case "namalsk": {SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];}; + case "altis": {SAR_Blacklist = ["MafiaTraderCity","TraderZoneSilderas","TraderZoneFolia"];}; + case "tanoa": {SAR_Blacklist = ["ExileMarker1","ExileMarker13","ExileMarker15","ExileMarker35","ExileMarker51"];}; + default {diag_log format ["Sarge's AI System: Blacklisted zones are not currently supported for %1!",worldName];}; + }; + diag_log format ["Sarge's AI System: Blacklisted zones have been established for %1",worldName]; + diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist]; }; -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 { - call compile PreprocessFileLineNumbers "\addons\sarge\SAR_init_Base_guards.sqf"; + call compile PreprocessFileLineNumbers "\addons\sarge\code\init_base_guards.sqf"; }; diff --git a/sarge/init/fn_preInit.sqf b/sarge/init/fn_preInit.sqf index 03b549f..dea211c 100644 --- a/sarge/init/fn_preInit.sqf +++ b/sarge/init/fn_preInit.sqf @@ -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, , ; + ["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, , ; + ["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, , ; + ["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, , ; + ["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, , ; + ["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, , ; + ["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, , ; + ["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, , ; + ["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, , ; + ["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; \ No newline at end of file diff --git a/sarge/map_config/SAR_cfg_grps_altis.sqf b/sarge/map_config/SAR_cfg_grps_altis.sqf deleted file mode 100644 index fe7331a..0000000 --- a/sarge/map_config/SAR_cfg_grps_altis.sqf +++ /dev/null @@ -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 ---- -};