Small Patch:Small Patch:
Added support for Tanoa.
Added dynamic blacklisting for Alts, Namalsk and Tanoa.
Added variable to control supported maps.
Added AI leader damage modifier.
Current focus on AI interaction.
This commit is contained in:
Teh Dango 2016-07-19 17:42:04 -04:00
parent 09a918b4f9
commit 397933226a
7 changed files with 476 additions and 39 deletions

View File

@ -36,7 +36,7 @@ SAR_AI_VEH_HIT = compile preprocessFileLineNumbers "sarge\SAR_ai_vehicle_hit.s
SAR_AI_trace_veh = compile preprocessFileLineNumbers "sarge\SAR_trace_from_vehicle.sqf";
SAR_AI_spawn = compile preprocessFileLineNumbers "sarge\SAR_AI_spawn.sqf";
SAR_AI_Heli_spawn = compile preprocessFileLineNumbers "sarge\SAR_AI_Heli_spawn.sqf";
//SAR_AI_Heli_spawn = compile preprocessFileLineNumbers "sarge\SAR_AI_Heli_spawn.sqf";
SAR_AI_despawn = compile preprocessFileLineNumbers "sarge\SAR_AI_despawn.sqf";
SAR_AI_reammo = compile preprocessFileLineNumbers "sarge\SAR_reammo_refuel_AI.sqf";
@ -84,7 +84,7 @@ if (SAR_dynamic_spawning) then {
scopeName "SAR_AI_DYNAI";
try {
if (!(_worldname in ["altis","chernarus","taviana","namalsk","lingor3","mbg_celle2","takistan","fallujah","panthera2"])) then {throw _worldName};
if (!(_worldname in SAR_Maps)) then {throw _worldName};
call compile preprocessFileLineNumbers (format ["sarge\map_config\SAR_cfg_grid_%1.sqf",_worldname]);
} catch {
diag_log format ["Sarge's AI System: %1 does not currently support dynamic AI spawning! Dynamic AI spawning has been disabled!",_worldName];
@ -151,17 +151,25 @@ if (SAR_dynamic_spawning) then {
};
};
diag_log format["Sarge's AI System: Map grid has now been established."];
diag_log format["Sarge's AI System: The map grid has been established for %1.",worldName];
diag_log format["Sarge's AI System: Now initializing spawn definitions for %1.",_worldname];
["dynamic"] call compile preprocessFileLineNumbers (format ["sarge\map_config\SAR_cfg_grps_%1.sqf",_worldname]);
diag_log format["Sarge's AI System: Spawn definitions have been configured."];
diag_log format["Sarge's AI System: Dynamic spawn definitions have been configured for %1.",worldName];
};
diag_log format["Sarge's AI System: Now initializing spawn definitions for %1.",_worldname];
["static"] call compile preprocessFileLineNumbers (format ["sarge\map_config\SAR_cfg_grps_%1.sqf",_worldname]);
diag_log format["Sarge's AI System: Spawn definitions have been configured."];
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: ERROR! Blacklisted zones have not been established!",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];
if (SAR_Base_Gaurds) then {
[] execVM "sarge\SAR_init_Base_guards.sqf";
};

View File

@ -12,10 +12,11 @@
https://www.hod-servers.com
*/
SAR_version = "2.1.0";
SAR_version = "2.1.7";
SAR_HC = true;
SAR_maps = ["altis","chernarus","taviana","namalsk","lingor3","mbg_celle2","takistan","fallujah","panthera2","tanoa"];
/* Debug & RPT Settings */
SAR_DEBUG = true; // Set to true for RPT info on AI
SAR_EXTREME_DEBUG = false; // Set to true for RPT info on damn near everything
@ -43,35 +44,47 @@ SAR_DETECT_INTERVAL = 15; // How often AI can detect AI & players
SAR_DETECT_HOSTILE_FROM_VEHICLE = 500; // How far AI can detect hostile AI & players while in a vehicle
SAR_DETECT_FROM_VEHICLE_INTERVAL = 5; // How often AI can detect hostile AI & players while in a vehicle
// Chance the AI will spawn
SAR_chance_bandits = 75; // Chance to spawn 1-100%
SAR_chance_soldiers = 25; // Chance to spawn 1-100%
SAR_chance_survivors = 50; // 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 = 2; // Size of the group
SAR_max_grpsize_soldiers = 2; // Size of the group
SAR_max_grpsize_survivors = 2; // Size of the group
// Chance the AI Helicopters will spawn - IN DEVELOPMENT
SAR_chance_band_heli = 35;
SAR_chance_surv_heli = 35;
SAR_chance_mili_heli = 35;
SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];
// 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 = [
@ -269,7 +282,7 @@ 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_HC = false // Depreciated
SAR_AI_friendly_side = RESISTANCE;
SAR_AI_unfriendly_side = EAST;
SAR_AI_monitor = [];
SAR_AI_monitor = [];
SAR_leader_number = 0;

View File

@ -22,7 +22,7 @@ SAR_circle_static = {
_count = 0;
//diag_log "SAR_AI: Group should form a circle";
diag_log "SAR_AI: Group should form a circle";
_leader = _this select 0;
_action = _this select 1;
@ -42,13 +42,21 @@ SAR_circle_static = {
sleep .5;
//play leader stop animation
_leader playAction "gestureFreeze";
sleep 2;
/* _leader playAction "gestureFreeze";
sleep 2; */
if(_action == "defend") then {
_center = _leader;
_leader forceSpeed 0;
_defend = true;
_leader disableAI "move";
_leader setunitpos "up";
_leader disableAI "target";
_grp enableAttack false;
//["NOAI"] spawn UPSMON;
};
if(_action == "campfire") then {

View File

@ -15,11 +15,12 @@
private ["_targetAI","_actingPlayer","_animState","_started","_finished","_isMedic","_leadername"];
if (isServer || !hasInterface) exitWith {}; // only run this on the client
//if (isServer) exitWith {}; // only run this on the client
//if (!hasInterface) exitWith {}; // only run this on the client
_targetAI = _this select 0;
_actingPlayer = _this select 1;
/*
_leadername = _targetAI getVariable ["SAR_leader_name",false];
// suspend UPSMON
@ -27,13 +28,13 @@ call compile format ["KRON_UPS_%1=2",_leadername];
publicVariable format["KRON_UPS_%1",_leadername];
sleep 5;
*/
[_targetAI,"defend",15] spawn SAR_circle_static;
diag_log ["Sarge AI System: Sarge Interact feature activated!"];
//[_targetAI,"defend",15] spawn SAR_circle_static;
if (vehicle _targetAI == _targetAI) then {
/* if (vehicle _targetAI == _targetAI) then {
doMedicAnim = [_targetAI,"Medic"];
publicVariable "doMedicAnim";
};
@ -70,7 +71,4 @@ if (_finished) then {
r_interrupt = false;
doMedicAnim = [_targetAI,"Stop"];
publicVariable "doMedicAnim";
};
// resume UPSMON
call compile format ["KRON_UPS_%1=1",_leadername];
}; */

View File

@ -78,6 +78,93 @@ _leader setIdentity "id_SAR_sold_lead";
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_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, ["Help Me!", {
//Parameters:
//_leader = the leader of the group
//_action = the action to execute while forming a circle
//_radius = the radius of the circle
private ["_center","_defend","_veh","_angle","_dir","_newpos","_forEachIndex","_leader","_action","_grp","_pos","_units","_count","_viewangle","_radius"];
_count = 0;
diag_log "SAR_AI: Group should form a circle";
_leader = _this select 0;
//_action = _this select 1;
_action = "defend";
//_radius = _this select 2;
_radius = 15;
_grp = group _leader;
_defend = false;
_units = units _grp;
_count = count _units;
if(_count > 1) then { // only do this for groups > 1 unit
_pos = getposASL _leader;
_pos = (_leader) modelToWorld[0,0,0];
doStop _leader;
sleep .5;
//play leader stop animation
_leader playAction "gestureFreeze";
sleep 2;
if (_action == "defend") then {
_center = _leader;
_leader forceSpeed 0;
_defend = true;
_leader disableAI "move";
_leader setunitpos "up";
_leader disableAI "target";
_grp enableAttack false;
["NOAI"] spawn UPSMON;
};
if (_action == "campfire") then {
_veh = createvehicle ["Land_Campfire_burning",_pos,[],0,"NONE"];
_center = _veh;
};
if (_defend) then {
_angle = 360/(_count-1);
} else {
_angle = 360/(_count);
};
_grp enableGunLights "AUTO";
_grp setBehaviour "CARELESS";
{
if (_x != _leader || {_x == _leader && !_defend}) then {
_newpos = (_center modelToWorld [(sin (_forEachIndex * _angle))*_radius, (cos (_forEachIndex *_angle))*_radius, 0]);
//diag_log format["Newpos %1: %2",_foreachindex,_newpos];
if (_defend) then {
_dir = 0;
} else {
_dir = 180;
};
_viewangle = (_foreachIndex * _angle) pushBack _dir;
[_x,_pos,_newpos,_viewangle,_defend]spawn SAR_move_to_circle_pos;
};
} foreach _units;
//_leader disableAI "MOVE";
};
}]] 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
@ -85,15 +172,21 @@ _leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
_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
/* // 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];
@ -119,6 +212,8 @@ for "_i" from 0 to (_snipers - 1) do
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_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
@ -156,6 +251,8 @@ for "_i" from 0 to (_riflemen - 1) do
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_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
@ -171,18 +268,9 @@ for "_i" from 0 to (_riflemen - 1) do
};
// 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 = [_leader,_patrol_area_name,'FULL','AWARE','NOSHARE','NOFOLLOW','AWARE','SPAWNED','DELETE:',SAR_DELETE_TIMEOUT];
if (!SAR_AI_STEAL_VEHICLE) then {
_ups_para_list pushBack ['NOVEH'];
};
if (!SAR_AI_COMBAT_VEHICLE) then {
_ups_para_list pushBack ['NOVEH2'];
};
@ -190,6 +278,12 @@ if (SAR_AI_disable_UPSMON_AI) then {
_ups_para_list pushBack ['NOAI'];
};
if (_respawn) then {
_ups_para_list pushBack ['RESPAWN'];
_ups_para_list pushBack ['RESPAWNTIME:'];
_ups_para_list pushBack [_respawn_time];
};
if(_action == "") then {_action = "PATROL";};
switch (_action) do {
@ -206,7 +300,7 @@ switch (_action) do {
{
_ups_para_list spawn UPSMON;
};
case "AMBUSH":
case "AMBUSH2":
{
_ups_para_list pushBack ['AMBUSH'];
_ups_para_list spawn UPSMON;

View File

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

View File

@ -0,0 +1,284 @@
/*
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
*/
_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_3_6"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_6"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_9_9"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_4_9"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_9"] call SAR_AI_mon_upd;
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_10"] call SAR_AI_mon_upd;
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"];
// soutcoast, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [6500, 1200];
SAR_marker_helipatrol_southcoast = _this;
// eastcoast, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_eastcoast", [13304.196, 8220.9795]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1200, 6000];
SAR_marker_helipatrol_eastcoast = _this;
// NWAF, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_nwaf", [4525.3335, 10292.299]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1500, 500];
_this setMarkerDir 59.354115;
SAR_marker_helipatrol_nwaf = _this;
// NEAF, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_neaf", [12034.16, 12725.376, 0]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1000, 600];
SAR_marker_helipatrol_neaf = _this;
_this = createMarker ["SAR_marker_DEBUG_veh", [11514.385,11679.752]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [300, 1000];
_this setMarkerDir -19.085985;
SAR_marker_DEBUG_veh = _this;
_this = createMarker ["SAR_marker_DEBUG_devilscastle", [6913.47,11437.2,0.001]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [10, 10];
SAR_marker_DEBUG_devilscastle = _this;
diag_log format["SAR_AI: Static spawning area definition finished"];
// ----------------------------------------------------------------------------------------
// End of area marker definition section
// ----------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------
// Static, predefined heli patrol areas with configurable units
//---------------------------------------------------------------------------------
//
// format: [areamarker,type_of_group,(respawn),(respawntime)] call SAR_AI;
//
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
//
// respawn : true or false (optional)
// respawntime : time in secs until group respawns (optional)
// air_vehicle_type : classnema of the air vehicle you want to use
//
//
// Note: The crew will be automatically seized to man any available gun in the airplane / heli.
//
// Examples:
//
// A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles
//
// [SAR_marker_DEBUG,1,true] call SAR_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_DEBUG_devilscastle,1,0,6,"fortify",true] call SAR_AI; */
// 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; */
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 ----
};