Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // =========================================================================================================
- // =========================================================================================================
- // SAR_AI - DayZ AI library
- // Version: 1.1.0
- // Author: Sarge (sarge@krumeich.ch)
- //
- // Wiki: to come
- // Forum: http://opendayz.net/index.php?threads/sarge-ai-framework-public-release.8391/
- //
- // ---------------------------------------------------------------------------------------------------------
- // Required:
- // UPSMon (special version, the standard one will NOT work
- // SHK_pos
- //
- // ---------------------------------------------------------------------------------------------------------
- // SAR_config.sqf - User adjustable config values
- // last modified:1.4.2013
- // ---------------------------------------------------------------------------------------------------------
- // -----------------------------------------------
- // enable or disable dynamic grid spawning
- // -----------------------------------------------
- SAR_dynamic_spawning = true;
- // -----------------------------------------------
- // default values for dynamic grid spawning
- // -----------------------------------------------
- // maximum number of groups / grid
- SAR_max_grps_bandits = 2;
- SAR_max_grps_soldiers = 2;
- SAR_max_grps_survivors = 2;
- // chance for a group to spawn (1-100)
- SAR_chance_bandits = 20;
- SAR_chance_soldiers = 10;
- SAR_chance_survivors = 15;
- // maximum size of group (including Leader)
- SAR_max_grpsize_bandits = 6;
- SAR_max_grpsize_soldiers = 6;
- SAR_max_grpsize_survivors = 4;
- // -----------------------------------------------
- // run fix for the issue that bandits cant travel in a vehicle with survivors EXPERIMENTAL, might not work 100% DO NOT ENABLE for the time being
- // -----------------------------------------------
- SAR_FIX_VEHICLE_ISSUE = false;
- // -----------------------------------------------
- // modify AI behaviour
- // -----------------------------------------------
- // disable UPSMON AI behaviour - this means there will be no evasive/flanking, AI WILL follow players around the map outside of grids etc. EXPERIMENTAL
- SAR_AI_disable_UPSMON_AI = false;
- // enable / disable AI stealing vehicles - if you enable this, be sure to check KRON_UPS_searchVehicledist value below
- SAR_AI_STEAL_VEHICLE = true;
- // -----------------------------------------------
- // Humanity values
- // -----------------------------------------------
- // Humanity Value that gets substracted for a survivor or soldier AI kill
- SAR_surv_kill_value = 1000;
- // Humanity Value that gets ADDED for a bandit AI kill
- SAR_band_kill_value = 100;
- // the humanity value below which a player will be considered hostile
- SAR_HUMANITY_HOSTILE_LIMIT = -500;
- // -----------------------------------------------
- // Track and show AI kills in the debug monitor of the player
- // -----------------------------------------------
- // Log AI kills
- SAR_log_AI_kills = false;
- // -----------------------------------------------
- // Special health values for specific units
- // -----------------------------------------------
- // values: 0.1 - 1, 1 = no change, 0.5 = damage taken reduced by 50%, 0.1 = damage taken reduced by 90% - EXPERIMENTAL
- SAR_leader_health_factor = 0.4;
- // -----------------------------------------------
- // respawning of groups & vehicles that are dynamically spawned in the grid system
- // -----------------------------------------------
- SAR_dynamic_group_respawn = true;
- // time after which AI are respawned if configured
- SAR_respawn_waittime = 1800; // 30 Mintues
- // -----------------------------------------------
- // Timeout values
- // -----------------------------------------------
- // time after which units and groups despawn after players have left the area
- SAR_DESPAWN_TIMEOUT = 120; // 5 minutes
- // time after which dead AI bodies are deleted
- SAR_DELETE_TIMEOUT = 900; // 15 minutes
- // -----------------------------------------------
- // System performance
- // -----------------------------------------------
- // the max range within AI is detecting Zombies and player bandits and makes them hostile - the bigger this value, the more CPU needed
- SAR_DETECT_HOSTILE = 300;
- // the interval in seconds that an AI scans for new hostiles. The lower this value, the more accurate, but your server will see an impact. Recommended value: 15
- SAR_DETECT_INTERVAL = 15;
- // -----------------------------------------------
- // Debug
- // -----------------------------------------------
- // Show AI hits and kills by players
- SAR_HITKILL_DEBUG = false;
- // Shows extra debug info in .rpt
- SAR_DEBUG = false;
- // careful with setting this, this shows a LOT, including the grid properties and definitions for every spawn and despawn event
- SAR_EXTREME_DEBUG = false;
- //
- // SET THIS TO 0 to hide the group markers on the map
- //
- //1=Enable or 0=disable debug. In debug could see a mark positioning de leader and another mark of the destination of movement, very useful for editing mission
- KRON_UPS_Debug = 0;
- //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- //
- // Overwriting UPSMON standard values, so they dont have to be changed in the UPSMON package. Be careful with changing these.
- //
- //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- //Efective distance for doing perfect ambush (max distance is this x2)
- KRON_UPS_ambushdist = 100;
- //Frequency for doing calculations for each squad.
- KRON_UPS_Cycle = 20; //org 20 , try to adjust for server performance
- //Time that leader waits until doing another movement, this time reduced dynamically under fire, and on new targets
- KRON_UPS_react = 60;
- //Min time to wait for doing another reaction
- KRON_UPS_minreact = 10; // org 30
- //Max waiting is the maximum time patrol groups will wait when arrived to target for doing another target.
- KRON_UPS_maxwaiting = 15;
- // how long AI units should be in alert mode after initially spotting an enemy
- KRON_UPS_alerttime = 90;
- // how close unit has to be to target to generate a new one target or to enter stealth mode
- // SARGE DEBUG CHANGE
- KRON_UPS_closeenough = 150; // if you have vast plain areas, increase this to sth around 150-300
- // if you are spotted by AI group, how close the other AI group have to be to You , to be informed about your present position. over this, will lose target
- KRON_UPS_sharedist = 500; //was 200
- // If enabled IA communication between them with radio defined sharedist distance, 0/2
- // (must be set to 2 in order to use reinforcement !R)
- KRON_UPS_comradio = 2;
- // Distance from destination for searching vehicles. (Search area is about 200m),
- // If your destination point is further than KRON_UPS_searchVehicledist, AI will try to find a vehicle to go there.
- KRON_UPS_searchVehicledist = 1500; // 700, 900
- //Sides that are enemies of resistance // DO NOT CHANGE THIS
- KRON_UPS_Res_enemy = [east];
- //
- // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- //
- // definition of classes and weapon loadouts
- //
- //
- // type of soldier lists, only allowed DayZ classes listed. adjust if you run rmod or another map that allows different classes
- //
- // IMPORTANT: The leader types must be different to each other! So you need 3 different leader types here!
- // military AI
- SAR_leader_sold_list = ["Rocket_DZ"]; // the potential classes of the leader of a soldier group
- SAR_sniper_sold_list = ["Sniper1_DZ"]; // the potential classes of the snipers of a soldier group
- SAR_soldier_sold_list = ["Soldier1_DZ","Soldier1_DZ","Camo1_DZ"]; // the potential classes of the riflemen of a soldier group
- // bandit AI
- SAR_leader_band_list = ["Bandit1_DZ"]; // the potential classes of the leader of a bandit group
- SAR_sniper_band_list = ["Survivor2_DZ","Sniper1_DZ","Bandit1_DZ","BanditW1_DZ","Bandit1_DZ","BanditW1_DZ"]; // the potential classes of the snipers of a bandit group
- SAR_soldier_band_list = ["Camo1_DZ","Bandit1_DZ","BanditW1_DZ","Bandit1_DZ","Survivor2_DZ"]; // the potential classes of the bandit of a soldier group
- // survivor AI
- SAR_leader_surv_list = ["Survivor3_DZ"]; // the potential classes of the leaders of a survivor group
- SAR_sniper_surv_list = ["Survivor2_DZ","SurvivorW2_DZ","Soldier_Crew_PMC"]; // the potential classes of the snipers of a survivor group
- SAR_soldier_surv_list = ["Survivor2_DZ","SurvivorW2_DZ","Soldier_Crew_PMC"]; // the potential classes of the riflemen of a soldier group
- // ---------------------------------------------------------------------------------------------------------------------
- // Skills for all possible units
- // ---------------------------------------------------------------------------------------------------------------------
- //
- // military AI
- //
- // Leader
- SAR_leader_sold_skills = [
- ["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.35, 0.10],
- ["aimingSpeed", 0.80, 0.20],
- ["spotDistance", 0.70, 0.30],
- ["spotTime", 0.65, 0.20],
- ["endurance", 0.80, 0.20],
- ["courage", 0.80, 0.20],
- ["reloadSpeed", 0.80, 0.20],
- ["commanding", 0.80, 0.20],
- ["general", 0.80, 0.20]
- ];
- // rifleman
- SAR_soldier_sold_skills = [
- ["aimingAccuracy",0.25, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.25, 0.10],
- ["aimingSpeed", 0.70, 0.20],
- ["spotDistance", 0.55, 0.30],
- ["spotTime", 0.30, 0.20],
- ["endurance", 0.60, 0.20],
- ["courage", 0.60, 0.20],
- ["reloadSpeed", 0.60, 0.20],
- ["commanding", 0.60, 0.20],
- ["general", 0.60, 0.20]
- ];
- // Sniper
- SAR_sniper_sold_skills = [
- ["aimingAccuracy",0.80, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.90, 0.10],
- ["aimingSpeed", 0.70, 0.20],
- ["spotDistance", 0.70, 0.30],
- ["spotTime", 0.75, 0.20],
- ["endurance", 0.70, 0.20],
- ["courage", 0.70, 0.20],
- ["reloadSpeed", 0.70, 0.20],
- ["commanding", 0.70, 0.20],
- ["general", 0.70, 0.20]
- ];
- //
- // bandit AI
- //
- // Leader
- SAR_leader_band_skills = [
- ["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.35, 0.10],
- ["aimingSpeed", 0.60, 0.20],
- ["spotDistance", 0.40, 0.30],
- ["spotTime", 0.45, 0.20],
- ["endurance", 0.40, 0.20],
- ["courage", 0.50, 0.20],
- ["reloadSpeed", 0.60, 0.20],
- ["commanding", 0.50, 0.20],
- ["general", 0.50, 0.20]
- ];
- // Rifleman
- SAR_soldier_band_skills = [
- ["aimingAccuracy",0.15, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.15, 0.10],
- ["aimingSpeed", 0.60, 0.20],
- ["spotDistance", 0.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]
- ];
- // Sniper
- SAR_sniper_band_skills = [
- ["aimingAccuracy",0.70, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.80, 0.10],
- ["aimingSpeed", 0.70, 0.20],
- ["spotDistance", 0.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]
- ];
- //
- // survivor AI
- //
- // Leader
- SAR_leader_surv_skills = [
- ["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.35, 0.10],
- ["aimingSpeed", 0.60, 0.20],
- ["spotDistance", 0.40, 0.30],
- ["spotTime", 0.45, 0.20],
- ["endurance", 0.40, 0.20],
- ["courage", 0.50, 0.20],
- ["reloadSpeed", 0.60, 0.20],
- ["commanding", 0.50, 0.20],
- ["general", 0.50, 0.20]
- ];
- // Rifleman
- SAR_soldier_surv_skills = [
- ["aimingAccuracy",0.15, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.15, 0.10],
- ["aimingSpeed", 0.60, 0.20],
- ["spotDistance", 0.45, 0.30],
- ["spotTime", 0.20, 0.20],
- ["endurance", 0.40, 0.20],
- ["courage", 0.40, 0.20],
- ["reloadSpeed", 0.40, 0.20],
- ["commanding", 0.40, 0.20],
- ["general", 0.40, 0.20]
- ];
- // Sniper
- SAR_sniper_surv_skills = [
- ["aimingAccuracy",0.70, 0.10], // skilltype, <min value>, <random value added to min>;
- ["aimingShake", 0.80, 0.10],
- ["aimingSpeed", 0.70, 0.20],
- ["spotDistance", 0.70, 0.30],
- ["spotTime", 0.65, 0.20],
- ["endurance", 0.70, 0.20],
- ["courage", 0.70, 0.20],
- ["reloadSpeed", 0.70, 0.20],
- ["commanding", 0.50, 0.20],
- ["general", 0.60, 0.20]
- ];
- // ---------------------------------------------------------------------------------------------------------------------
- // Weapon & Item Loadout
- // ---------------------------------------------------------------------------------------------------------------------
- // a general note: you CAN use either rifles OR pistols. Do not use both. AI will get stuck after switching weapons.
- //---------------------------------------------------------
- // Leaders
- //---------------------------------------------------------
- // potential weapon list for Leaders
- SAR_leader_sold_weapon_list = ["Sa58V_CCO_EP1","Sa58V_EP1","FN_FAL","BAF_L85A2_RIS_CWS","Sa58P_EP1","m16a4_acg","Sa58V_RCO_EP1","M4A1_AIM_SD_camo","M4A1_HWS_GL_camo"];
- SAR_leader_sold_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- SAR_leader_band_weapon_list = ["M16A2","Winchester1866","AK_74","AKS_74_kobra","LeeEnfield","M1014","AKS_74_U","M40A3","M4A1","AK_47_M","AK_47_M","M4A1_Aim"];
- SAR_leader_band_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- //SAR_leader_surv_weapon_list = ["M16A2","Winchester1866","AK_74","LeeEnfield","M1014","MP5A5","MP5SD","M40A3","M4A1","M4A3_CCO_EP1","AK_47_M","FN_FAL","M4A1_Aim","DMR"];
- SAR_leader_surv_weapon_list = ["M1014","MP5A5","LeeEnfield","AKS_74_U","AK_47_M","AK_74","MP5A5","MP5SD","Winchester1866","MP5SD","M4A1_Aim"];
- SAR_leader_surv_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- // potential item list for leaders -> Item / Chance 1 - 100
- SAR_leader_sold_items = [["ItemWaterbottleBoiled",75],["FoodMRE",60],["ItemBandage",50],["ItemBloodbag",10],["ItemMorphine",10],["PipeBomb",2],["SmokeShellGreen",20],["HandGrenade_West",25],["HandGrenade_West",10],["HandGrenade_West",5] ];
- SAR_leader_sold_tools = [["ItemMap",50],["ItemCompass",30],["ItemFlashlightRed",80],["Binocular",60],["NVGoggles",50],["ItemRadio",100],["ItemMatchbox",30]];
- SAR_leader_band_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["ItemBloodbag",5],["ItemMorphine",5],["ItemBandage",25],["ItemWaterbottle",40],["SmokeShellGreen",20],["SmokeShellRed",20],["SmokeShell",20]];
- SAR_leader_band_tools = [["ItemMap",30],["ItemCompass",30],["Binocular",30],["NVGoggles",1],["ItemRadio",100],["ItemMatchbox",30],["ItemFlashlight",50]];
- SAR_leader_surv_items = [["ItemSodaCoke",40],["ItemWaterbottleBoiled",40],["FoodCanBakedBeans",40],["ItemBloodbag",30],["ItemMorphine",20],["SmokeShellGreen",20],["SmokeShellRed",20],["SmokeShell",20]];
- SAR_leader_surv_tools = [["ItemMap",50],["ItemCompass",30],["Binocular",10],["ItemRadio",100],["ItemMatchbox",30],["ItemFlashlight",50]];
- //---------------------------------------------------------
- // RIFLEMAN
- //---------------------------------------------------------
- //potential weapon list for miliatary riflemen
- SAR_rifleman_sold_weapon_list = ["M16A2","bizon_silenced","M240","Mk_48_DZ","Mk_48","M40A3","M14_EP1","FN_FAL","Sa58V_RCO_EP1","M4A1","Sa58V_EP1","M1014","Sa58V_CCO_EP1","Sa58V_EP1","Sa58P_EP1","m16a4_acg","Sa58V_RCO_EP1","M4A1_AIM_SD_camo","M4A1_HWS_GL_camo"];
- SAR_rifleman_sold_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- //potential weapon list for bandit riflemen
- SAR_rifleman_band_weapon_list = ["LeeEnfield","M16A2","Winchester1866","AK_74","M1014","MP5A5","M40A3","AKS_74_U","AK_47_M","M1014","Remington870","Remington870_lamp","AK_74"];
- SAR_rifleman_band_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- //potential weapon list for survivor riflemen
- SAR_rifleman_surv_weapon_list = ["Winchester1866","MR43","LeeEnfield","M1014","Remington870","Remington870_lamp","AK_74"];
- SAR_rifleman_surv_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- // potential item list for military riflemen
- SAR_rifleman_sold_items = [["ItemWaterbottleBoiled",75],["FoodMRE",60],["ItemBandage",50],["ItemBloodbag",10],["ItemMorphine",10],["PipeBomb",2],["SmokeShellGreen",20],["HandGrenade_West",25],["HandGrenade_West",10],["HandGrenade_West",5]];
- SAR_rifleman_sold_tools = [["ItemMap",50],["ItemCompass",30],["ItemFlashlightRed",80],["Binocular",60],["NVGoggles",30],["ItemMatchbox",30]];
- // potential item list for bandit riflemen
- SAR_rifleman_band_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["HandRoadFlare",60],["SmokeShellRed",20],["HandGrenade_West",20]];
- SAR_rifleman_band_tools = [["ItemMap",50],["ItemCompass",30],["ItemFlashlight",50],["ItemMatchbox",30]];
- // potential item list for survivor riflemen
- SAR_rifleman_surv_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["HandRoadFlare",60],["SmokeShell",20],["HandGrenade_West",5]];
- SAR_rifleman_surv_tools = [["ItemMap",50],["ItemCompass",30],["ItemFlashlight",50],["ItemMatchbox",30]];
- //---------------------------------------------------------
- // Snipers
- //---------------------------------------------------------
- //potential weapon list for military snipers
- SAR_sniper_sold_weapon_list = ["BAF_AS50_scoped","DMR","M24","SVD_CAMO","DMR","M24","SVD_CAMO","M4A1_Aim","M107_DZ"];
- SAR_sniper_sold_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- //potential weapon list for bandit snipers
- SAR_sniper_band_weapon_list = ["M4A1_Aim","Huntingrifle","LeeEnfield","M24"];
- SAR_sniper_band_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- //potential weapon list for survivor snipers
- SAR_sniper_surv_weapon_list = ["Huntingrifle","LeeEnfield","Huntingrifle","LeeEnfield","M4A1_Aim"];
- SAR_sniper_surv_pistol_list = []; // do NOT populate, Arma still has a bug that renders AI unresponsive after switching to the sidearm
- // potential item list for military snipers
- SAR_sniper_sold_items = [["ItemWaterbottleBoiled",75],["FoodMRE",60],["ItemBandage",50],["ItemBloodbag",10],["ItemMorphine",10],["Skin_Sniper1_DZ",10],["SmokeShellGreen",20],["HandGrenade_West",20]];
- SAR_sniper_sold_tools = [["ItemMap",50],["ItemCompass",30],["ItemFlashlightRed",80],["Binocular",60],["NVGoggles",30],["ItemMatchbox",30]];
- // potential item list for snipers
- SAR_sniper_band_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["SmokeShellRed",25]];
- SAR_sniper_band_tools = [["ItemMap",50],["ItemCompass",30],["ItemMatchbox",30]];
- // potential item list for snipers
- SAR_sniper_surv_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["SmokeShell",25]];
- SAR_sniper_surv_tools = [["ItemMap",50],["ItemCompass",30],["ItemMatchbox",30]];
- //---------------------------------------------------------
- // Pistol
- //---------------------------------------------------------
- //potential weapon list for military sidearm only
- SAR_sniper_sold_pistol_list = [];
- SAR_leader_sold_pistol_weapon_list= [];// do NOT populate - only using sidearms for this character class
- //potential weapon list for bandit sidearm only
- SAR_sniper_band_pistol_list = [];
- SAR_leader_band_pistol_weapon_list= [];// do NOT populate - only using sidearms for this character class
- //potential weapon list for survivor sidearm only
- SAR_sniper_surv_pistol_list = [];
- SAR_leader_survivor_pistol_weapon_list= [];// do NOT populate - only using sidearms for this character class
- // potential item list for military sidearm only
- SAR_sniper_sold_pist_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["Skin_Sniper1_DZ",10],["SmokeShellGreen",25]];
- SAR_sniper_sold_pist_tools = [["ItemMap",50],["ItemCompass",30]];
- // potential item list for bandit sidearm only
- SAR_sniper_band_pist_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["Skin_Sniper1_DZ",10],["SmokeShellGreen",25]];
- SAR_sniper_band_pist_tools = [["ItemMap",50],["ItemCompass",30]];
- // potential item list for survivor sidearm only
- SAR_sniper_surv_pist_items = [["ItemSodaCoke",75],["FoodCanBakedBeans",60],["Skin_Sniper1_DZ",10],["SmokeShellGreen",25]];
- SAR_sniper_surv_pist_tools = [["ItemMap",50],["ItemCompass",30]];
- // ---------------------------------------------------------------------------------------------------------------------
- // heli patrol definiton
- // ---------------------------------------------------------------------------------------------------------------------
- // define the type of heli(s) you want to use here for the heli patrols - make sure you include helis that have minimum 2 gunner positions, anything else might fail
- // SAR_heli_type=["UH1H_DZ","Mi17_DZ"];
- SAR_heli_type=["UH1H_DZ"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement