mirror of
https://github.com/Teh-Dango/Sarge-AI.git
synced 2024-08-30 16:32:11 +00:00
Added files via upload
This commit is contained in:
parent
d527f9c2c3
commit
a9bcca06ba
30
BE Filters
Normal file
30
BE Filters
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
scripts.txt
|
||||||
|
-----------
|
||||||
|
|
||||||
|
compile append !"call compile preprocessFileLineNumbers \"addons\\UPSMON\\scripts\\Init_UPSMON.sqf\";" !="select 0) addRating ((_this select 1) select 1);};\n};\n\ncall compile preprocessFileLineNumbers \"addons\\SARGE\\SAR_config.sqf\";\ndia" !="ndler { if (local ((_this select 1)select 0)) then {\ncall ( compile format[(_this select 1)select 1,(_this select 1)select 0] );" !="arting Sarge AI version %1\",SAR_version];\n\nSAR_AI_trace = compile preprocessFileLineNumbers \"addons\\SARGE\\SAR_trace_entities.s" !="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSHK_pos_getPos = compile preprocessfilelinenumbers \"addons\\shk_pos\\shk_pos_getpos.sqf\";\n"
|
||||||
|
|
||||||
|
exec append !="cVariableEventHandler { if (_this select 1) then { nul=[east] execvm \"addons\\UPSMON\\scripts\\UPSMON\\MON_surrended.sqf\";};};\n\"KRON" !"compile preprocessFile \"addons\\SHK_pos\\shk_pos_init.sqf\";\n\n[] execVM \"addons\\SARGE\\SAR_AI_init.sqf\";" !="SARGE\\SAR_AI_init.sqf"\n\n};\n};\n\nif (SAR_Base_Gaurds) then {\n[] execVM \"addons\\SARGE\\SAR_init_Base_guards.sqf\";\n};\n\nif (SAR_FIX_V"
|
||||||
|
|
||||||
|
eventHandler append !=" [\"_s\",\"_l\"];\n\n\"KRON_UPS_EAST_SURRENDED\" addPublicVariableEventHandler { if (_this select 1) then { nul=[east] execvm \"addons\\UP" !="r && hasInterface) then {\n\"adjustrating\" addPublicVariableEventHandler {((_this select 1) select 0) addRating ((_this select 1) "
|
||||||
|
|
||||||
|
allUnits append !="S_ARTILLERY_UNITS;\n\n\n\nsleep _cycle; \n};\n}; \n};\n\n\n\n\n\n\n_l = allunits + vehicles;\n{\nif ((_x iskindof \"AllVehicles\") && (side _x !" !="hasinterface && !isServer) then {\n_unitss = {local _x}count allUnits;\n_jochen = \"HEADLESSunits: \";\n_zeige = _jochen + str(_units" !="N_UPS_ARTILLERY_UNITS;\n\n\n\nsleep _cycle;\n};\n};\n};\n\n\n\n\n\n\n_l = allunits + vehicles;\n{\nif ((_x iskindof \"AllVehicles\") && (side _x !"
|
||||||
|
|
||||||
|
units append !="total = 0;\nupsmon_east_total = 0;\n\nUPSMON_REINFORCEMENT_WEST_UNITS = [];\nUPSMON_REINFORCEMENT_EAST_UNITS = [];\nUPSMON_REINFORCEM" !="er;\n\n{\n_x doTarget _aikiller;\n_x doFire _aikiller;\n} foreach units group _ai;\n};\n\nif (_aikilled_group_side isEqualTo SAR_AI_unfr" !="total = 0;\nUPSMON_GUER_Total = 0;\n\nUPSMON_REINFORCEMENT_WEST_UNITS = [];\nUPSMON_REINFORCEMENT_EAST_UNITS = [];\nUPSMON_REINFORCEM"
|
||||||
|
|
||||||
|
createMarker append !="ndname = format[\"SAR_area_legend_%1_%2\",_ii,_i];\n\n_this = createMarker[_markername,[_startx + (_ii * _gridwidth * 2),_starty + (" !="MON_Minestype2 = _UPSMON_Minesclassname select 1; \n\n\n_m = createMarker [\"DummyUPSMONMarker\",[0,0]];\n_m setmarkerColor \"Colorblac"
|
||||||
|
|
||||||
|
entities append !="race = compile preprocessFileLineNumbers \"sarge\\SAR_trace_entities.sqf\";\nSAR_AI_base_trace = compile preprocessFileLineNumber" !"sarge\SAR_trace_entities.sqf\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nprivate [\"_ai\",\"_entity_array\",\"_sleeptime\",\"_det"
|
||||||
|
|
||||||
|
isPlayer append !="'%1'] spawn SAR_AI_despawn;\",_triggername];\n\n_trig_cond = \"{isPlayer _x} count thisList > 0;\";\n\nCall Compile Format [\"SAR_trig_%" !="_side,_aikiller_group_side];\n};\n\nif((!isNull _aikiller) && (isPlayer _aikiller) && (_aikiller isKindOf \"Exile_Unit_Player\")) the" !="_log "SAR EXTREME DEBUG: Zombie rated down\";\n};\n};\n};\n};\nif(isPlayer _x && {vehicle _x == _x}) then { \n_respect = _x getVariable"
|
||||||
|
|
||||||
|
Exile_unit_player append !="iller) && (isPlayer _aikiller) && (_aikiller isKindOf \"Exile_Unit_Player\")) then {\n\nif (_aikilled_group_side isEqualTo SAR_AI_fr"
|
||||||
|
|
||||||
|
createUnit append !="group = createGroup _center;\nUPSMON_Logic_civkill = _group createUnit [\"LOGIC\", [1,1,1], [], 0, \"NONE\"];\n_group = nil;\n_center ="
|
||||||
|
|
||||||
|
restriction #1 (should be line #3) append !="layerRespect = _playerRespect - _repChange;\n_aikiller setVariable [\"ExileScore\",_playerRespect];\n\nExileClientPlayerScore = _play"
|
||||||
|
|
||||||
|
|
||||||
|
publicVariable.txt
|
||||||
|
------------------
|
||||||
|
|
||||||
|
append !"SAR_surv_kill_value" !"SAR_band_kill_value" !"SAR_DEBUG" !"SAR_EXTREME_DEBUG" !"SAR_DETECT_HOSTILE" !"SAR_DETECT_INTERVAL" !"SAR_RESPECT_HOSTILE_LIMIT"
|
79
SAR_AI_despawn.sqf
Normal file
79
SAR_AI_despawn.sqf
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private ["_timeout","_triggername","_tmparr","_markername","_valuearray","_grps_band","_grps_sold","_grps_surv","_trigger"];
|
||||||
|
|
||||||
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
|
_timeout = SAR_DESPAWN_TIMEOUT;
|
||||||
|
|
||||||
|
_trigger = _this select 1;
|
||||||
|
_triggername = _this select 2;
|
||||||
|
|
||||||
|
_tmparr = toArray (_triggername);
|
||||||
|
|
||||||
|
_tmparr set [4,97];
|
||||||
|
_tmparr set [5,114];
|
||||||
|
_tmparr set [6,101];
|
||||||
|
_tmparr set [7,97];
|
||||||
|
|
||||||
|
_markername = toString _tmparr;
|
||||||
|
|
||||||
|
sleep _timeout;
|
||||||
|
|
||||||
|
if !(triggerActivated _trigger) then {
|
||||||
|
|
||||||
|
if (SAR_DEBUG) then {
|
||||||
|
diag_log format["Sarge's AI System: Despawning groups in: %1", _markername];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log "SAR EXTREME DEBUG: Content of the Monitor before despawn deletion";
|
||||||
|
call SAR_DEBUG_mon;
|
||||||
|
};
|
||||||
|
|
||||||
|
// get all groups in that area
|
||||||
|
_valuearray = [["grps_band","grps_sold","grps_surv"],_markername] call SAR_AI_mon_read;
|
||||||
|
|
||||||
|
_grps_band = _valuearray select 0;
|
||||||
|
_grps_sold = _valuearray select 1;
|
||||||
|
_grps_surv = _valuearray select 2;
|
||||||
|
|
||||||
|
{
|
||||||
|
{deleteVehicle _x} forEach (units _x);
|
||||||
|
sleep 0.5;
|
||||||
|
deleteGroup _x;
|
||||||
|
} forEach (_grps_band);
|
||||||
|
|
||||||
|
{
|
||||||
|
{deleteVehicle _x} forEach (units _x);
|
||||||
|
sleep 0.5;
|
||||||
|
deleteGroup _x;
|
||||||
|
} forEach (_grps_sold);
|
||||||
|
|
||||||
|
{
|
||||||
|
{deleteVehicle _x} forEach (units _x);
|
||||||
|
sleep 0.5;
|
||||||
|
deleteGroup _x;
|
||||||
|
} forEach (_grps_surv);
|
||||||
|
|
||||||
|
// update SAR_AI_monitor
|
||||||
|
[["grps_band","grps_sold","grps_surv"],[[],[],[]],_markername] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
if (SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log "SAR EXTREME DEBUG: Content of the Monitor after despawn deletion";
|
||||||
|
call SAR_DEBUG_mon;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
160
SAR_AI_init.sqf
Normal file
160
SAR_AI_init.sqf
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private ["_worldname","_startx","_starty","_gridsize_x","_gridsize_y","_gridwidth","_markername","_triggername","_trig_act_stmnt","_trig_deact_stmnt","_trig_cond","_check","_script_handler","_legendname"];
|
||||||
|
|
||||||
|
if (!isNil "A3XAI_isActive") exitWith {diag_log format ["Sarge's AI System: A3XAI has been detected. Sarge AI is not compatibale with A3XAI. Sarge AI is now exiting!"];};
|
||||||
|
|
||||||
|
call compile preprocessFileLineNumbers "sarge\SAR_config.sqf";
|
||||||
|
|
||||||
|
diag_log format["Sarge's AI System: Starting Sarge AI version %1",SAR_version];
|
||||||
|
|
||||||
|
if (!isServer) then {
|
||||||
|
"adjustrating" addPublicVariableEventHandler {((_this select 1) select 0) addRating ((_this select 1) select 1);};
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_AI_hit = compile preprocessFileLineNumbers "sarge\SAR_aihit.sqf";
|
||||||
|
SAR_AI_trace = compile preprocessFileLineNumbers "sarge\SAR_trace_entities.sqf";
|
||||||
|
SAR_AI_base_trace = compile preprocessFileLineNumbers "sarge\SAR_trace_base_entities.sqf";
|
||||||
|
|
||||||
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
|
SAR_AI = compile preprocessFileLineNumbers "sarge\SAR_setup_AI_patrol.sqf";
|
||||||
|
SAR_AI_heli = compile preprocessFileLineNumbers "sarge\SAR_setup_AI_patrol_heli.sqf";
|
||||||
|
SAR_AI_land = compile preprocessFileLineNumbers "sarge\SAR_setup_AI_patrol_land.sqf";
|
||||||
|
SAR_AI_trace_veh = compile preprocessFileLineNumbers "sarge\SAR_trace_from_vehicle.sqf";
|
||||||
|
SAR_AI_reammo = compile preprocessFileLineNumbers "sarge\SAR_reammo_refuel_AI.sqf";
|
||||||
|
SAR_AI_spawn = compile preprocessFileLineNumbers "sarge\SAR_AI_spawn.sqf";
|
||||||
|
SAR_AI_despawn = compile preprocessFileLineNumbers "sarge\SAR_AI_despawn.sqf";
|
||||||
|
SAR_AI_killed = compile preprocessFileLineNumbers "sarge\SAR_aikilled.sqf";
|
||||||
|
SAR_AI_VEH_HIT = compile preprocessFileLineNumbers "sarge\SAR_ai_vehicle_hit.sqf";
|
||||||
|
SAR_AI_GUARDS = compile preprocessFileLineNumbers "sarge\SAR_setup_AI_patrol_guards.sqf";
|
||||||
|
|
||||||
|
call compile preprocessFileLineNumbers "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_RESPECT_HOSTILE_LIMIT";
|
||||||
|
|
||||||
|
createCenter EAST;
|
||||||
|
createCenter WEST;
|
||||||
|
|
||||||
|
// unfriendly AI bandits
|
||||||
|
EAST setFriend [EAST, 1];
|
||||||
|
EAST setFriend [WEST, 0];
|
||||||
|
EAST setFriend [RESISTANCE, 0];
|
||||||
|
|
||||||
|
// Players
|
||||||
|
RESISTANCE setFriend [EAST, 0];
|
||||||
|
RESISTANCE setFriend [WEST, 1];
|
||||||
|
|
||||||
|
// friendly AI
|
||||||
|
WEST setFriend [EAST, 0];
|
||||||
|
WEST setFriend [RESISTANCE, 1];
|
||||||
|
|
||||||
|
_worldname = toLower worldName;
|
||||||
|
diag_log format["Sarge's AI System: Setting up SAR_AI for %1",_worldname];
|
||||||
|
|
||||||
|
waituntil {PublicServerIsLoaded};
|
||||||
|
|
||||||
|
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};
|
||||||
|
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];
|
||||||
|
breakOut "SAR_AI_DYNAI";
|
||||||
|
};
|
||||||
|
|
||||||
|
diag_log format ["Sarge's AI System: Now generating dynamic map grid for %1.",_worldname];
|
||||||
|
|
||||||
|
// Create grid system and triggers
|
||||||
|
SAR_area_ = text format ["SAR_area_%1","x"];
|
||||||
|
for "_i" from 0 to (_gridsize_y - 1) do
|
||||||
|
{
|
||||||
|
for "_ii" from 0 to (_gridsize_x - 1) do
|
||||||
|
{
|
||||||
|
// Marker Creation
|
||||||
|
_markername = format["SAR_area_%1_%2",_ii,_i];
|
||||||
|
_legendname = format["SAR_area_legend_%1_%2",_ii,_i];
|
||||||
|
|
||||||
|
_this = createMarker[_markername,[_startx + (_ii * _gridwidth * 2),_starty + (_i * _gridwidth * 2)]];
|
||||||
|
if (SAR_EXTREME_DEBUG) then {
|
||||||
|
_this setMarkerAlpha 1;
|
||||||
|
} else {
|
||||||
|
_this setMarkerAlpha 0;
|
||||||
|
};
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkerType "mil_flag";
|
||||||
|
_this setMarkerBrush "BORDER";
|
||||||
|
_this setMarkerSize [_gridwidth, _gridwidth];
|
||||||
|
|
||||||
|
call compile format ["SAR_area_%1_%2 = _this",_ii,_i];
|
||||||
|
|
||||||
|
_this = createMarker[_legendname,[_startx + (_ii * _gridwidth * 2) + (_gridwidth - (_gridwidth/2)),_starty + (_i * _gridwidth * 2) - (_gridwidth - (_gridwidth/10))]];
|
||||||
|
if(SAR_EXTREME_DEBUG) then {
|
||||||
|
_this setMarkerAlpha 1;
|
||||||
|
} else {
|
||||||
|
_this setMarkerAlpha 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
_this setMarkerShape "ICON";
|
||||||
|
_this setMarkerType "mil_flag";
|
||||||
|
_this setMarkerColor "ColorBlack";
|
||||||
|
|
||||||
|
_this setMarkerText format["%1/%2",_ii,_i];
|
||||||
|
_this setMarkerSize [.1, .1];
|
||||||
|
|
||||||
|
// Trigger Statements
|
||||||
|
_triggername = format["SAR_trig_%1_%2",_ii,_i];
|
||||||
|
|
||||||
|
_this = createTrigger ["EmptyDetector", [_startx + (_ii * _gridwidth * 2),_starty + (_i * _gridwidth * 2)]];
|
||||||
|
_this setTriggerArea [_gridwidth, _gridwidth, 0, true];
|
||||||
|
_this setTriggerActivation ["ANY", "PRESENT", true];
|
||||||
|
|
||||||
|
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_cond = "{isPlayer _x} count thisList > 0;";
|
||||||
|
|
||||||
|
call compile format ["SAR_trig_%1_%2 ",_ii,_i] setTriggerStatements [_trig_cond,_trig_act_stmnt , _trig_deact_stmnt];
|
||||||
|
|
||||||
|
// standard grid definition - maxgroups (ba,so,su) - probability (ba,so,su) - max group members (ba,so,su)
|
||||||
|
SAR_AI_monitor set[count SAR_AI_monitor, [_markername,[SAR_max_grps_bandits,SAR_max_grps_soldiers,SAR_max_grps_survivors],[SAR_chance_bandits,SAR_chance_soldiers,SAR_chance_survivors],[SAR_max_grpsize_bandits,SAR_max_grpsize_soldiers,SAR_max_grpsize_survivors],[],[],[]]];
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
diag_log format["Sarge's AI System: Map grid has now been established."];
|
||||||
|
|
||||||
|
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: 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."];
|
||||||
|
|
||||||
|
if (SAR_Base_Gaurds) then {
|
||||||
|
[] execVM "sarge\SAR_init_Base_guards.sqf";
|
||||||
|
};
|
178
SAR_AI_spawn.sqf
Normal file
178
SAR_AI_spawn.sqf
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
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 {};
|
||||||
|
|
||||||
|
_playerlist = _this select 0;
|
||||||
|
_triggername = _this select 1;
|
||||||
|
|
||||||
|
_tmparr = toArray (_triggername);
|
||||||
|
|
||||||
|
_tmparr set[4,97];
|
||||||
|
_tmparr set[5,114];
|
||||||
|
_tmparr set[6,101];
|
||||||
|
_tmparr set[7,97];
|
||||||
|
|
||||||
|
_markername = toString _tmparr;
|
||||||
|
|
||||||
|
{if(isPlayer _x) then {_player = _x;};} foreach _playerlist;
|
||||||
|
|
||||||
|
if (SAR_DEBUG) then {diag_log format["Sarge's AI System: Triggered by: %1", _player];};
|
||||||
|
|
||||||
|
if (SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log "SAR EXTREME DEBUG: Content of the Monitor before adding spawned groups.";
|
||||||
|
call SAR_DEBUG_mon;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (SAR_dynamic_group_respawn) then {
|
||||||
|
_respawn = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
_valuearray= [["max_grps","rnd_grps","max_p_grp","grps_band","grps_sold","grps_surv"],_markername] call SAR_AI_mon_read;
|
||||||
|
|
||||||
|
_max_grps = _valuearray select 0;
|
||||||
|
_rnd_grps = _valuearray select 1;
|
||||||
|
_max_p_grp = _valuearray select 2;
|
||||||
|
_grps_band = _valuearray select 3;
|
||||||
|
_grps_sold = _valuearray select 4;
|
||||||
|
_grps_surv = _valuearray select 5;
|
||||||
|
_grps_upd = [];
|
||||||
|
|
||||||
|
if (SAR_HC) then {
|
||||||
|
|
||||||
|
if (!isServer && !hasInterface) then {
|
||||||
|
|
||||||
|
_grps_upd = _grps_band;
|
||||||
|
|
||||||
|
//for [{_i = (count _grps_band)},{_i < (_max_grps select 0)}, {_i=_i+1}] do
|
||||||
|
for "_i" from (count _grps_band) to ((_max_grps select 0) - 1) do
|
||||||
|
{
|
||||||
|
if(_max_p_grp select 0 > 0) then {
|
||||||
|
_probability = _rnd_grps select 0;
|
||||||
|
_chance = (random 100);
|
||||||
|
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;
|
||||||
|
_grps_upd set [count _grps_upd,_group];
|
||||||
|
// update AI monitor
|
||||||
|
_check = [["grps_band"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_grps_upd = _grps_sold;
|
||||||
|
|
||||||
|
//for [{_i = (count _grps_sold)},{_i < (_max_grps select 1)}, {_i=_i+1}] do
|
||||||
|
for "_i" from (count _grps_sold) to ((_max_grps select 1) - 1) do
|
||||||
|
{
|
||||||
|
if(_max_p_grp select 1 > 0) then {
|
||||||
|
_probability = _rnd_grps select 1;
|
||||||
|
_chance = (random 100);
|
||||||
|
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;
|
||||||
|
_grps_upd set [count _grps_upd,_group];
|
||||||
|
// update AI monitor
|
||||||
|
_check = [["grps_sold"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_grps_upd = _grps_surv;
|
||||||
|
|
||||||
|
//for [{_i = (count _grps_surv)},{_i < (_max_grps select 2)}, {_i=_i+1}] do
|
||||||
|
for "_i" from (count _grps_surv) to ((_max_grps select 2) - 1) do
|
||||||
|
{
|
||||||
|
if(_max_p_grp select 2 > 0) then {
|
||||||
|
_probability = _rnd_grps select 2;
|
||||||
|
_chance = (random 100);
|
||||||
|
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;
|
||||||
|
_grps_upd set [count _grps_upd,_group];
|
||||||
|
// update AI monitor
|
||||||
|
_check = [["grps_surv"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if (isServer) then {
|
||||||
|
//for [{_i = (count _grps_band)},{_i < (_max_grps select 0)}, {_i=_i+1}] do
|
||||||
|
for "_i" from (count _grps_band) to ((_max_grps select 0) - 1) do
|
||||||
|
{
|
||||||
|
if(_max_p_grp select 0 > 0) then {
|
||||||
|
_probability = _rnd_grps select 0;
|
||||||
|
_chance = (random 100);
|
||||||
|
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;
|
||||||
|
_grps_upd set [count _grps_upd,_group];
|
||||||
|
// update AI monitor
|
||||||
|
_check = [["grps_band"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_grps_upd = _grps_sold;
|
||||||
|
|
||||||
|
//for [{_i = (count _grps_sold)},{_i < (_max_grps select 1)}, {_i=_i+1}] do
|
||||||
|
for "_i" from (count _grps_sold) to ((_max_grps select 1) - 1) do
|
||||||
|
{
|
||||||
|
if(_max_p_grp select 1 > 0) then {
|
||||||
|
_probability = _rnd_grps select 1;
|
||||||
|
_chance = (random 100);
|
||||||
|
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;
|
||||||
|
_grps_upd set [count _grps_upd,_group];
|
||||||
|
// update AI monitor
|
||||||
|
_check = [["grps_sold"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_grps_upd = _grps_surv;
|
||||||
|
|
||||||
|
//for [{_i = (count _grps_surv)},{_i < (_max_grps select 2)}, {_i=_i+1}] do
|
||||||
|
for "_i" from (count _grps_surv) to ((_max_grps select 2) - 1) do
|
||||||
|
{
|
||||||
|
if(_max_p_grp select 2 > 0) then {
|
||||||
|
_probability = _rnd_grps select 2;
|
||||||
|
_chance = (random 100);
|
||||||
|
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;
|
||||||
|
_grps_upd set [count _grps_upd,_group];
|
||||||
|
// update AI monitor
|
||||||
|
_check = [["grps_surv"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
if (SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log "SAR EXTREME DEBUG: Content of the Monitor after adding spawned groups.";
|
||||||
|
call SAR_DEBUG_mon;
|
||||||
|
};
|
99
SAR_ai_vehicle_hit.sqf
Normal file
99
SAR_ai_vehicle_hit.sqf
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
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 {};
|
||||||
|
|
||||||
|
_ai_veh = _this select 0;
|
||||||
|
_ai_part = _this select 1;
|
||||||
|
_ai_veh_dmg = _this select 2;
|
||||||
|
_ai_veh_hitsource = _this select 3;
|
||||||
|
_ai_veh_projectile = _this select 4;
|
||||||
|
|
||||||
|
_ai_veh_type = typeof _ai_veh;
|
||||||
|
|
||||||
|
|
||||||
|
_ai_veh_side = side _ai_veh;
|
||||||
|
_ai_veh_group_side = side (group _ai_veh);
|
||||||
|
|
||||||
|
_ai_veh_hitsource_type = typeof _ai_veh_hitsource;
|
||||||
|
_ai_veh_hitsource_side = side _ai_veh_hitsource;
|
||||||
|
_ai_veh_hitsource_group_side = side (group _ai_veh_hitsource);
|
||||||
|
|
||||||
|
|
||||||
|
if(isPlayer _ai_veh_hitsource ) then {
|
||||||
|
|
||||||
|
_ai_veh_hitsource_name = name _ai_veh_hitsource;
|
||||||
|
|
||||||
|
if(_ai_veh_projectile iskindof "B_9x18_Ball") then {
|
||||||
|
|
||||||
|
if ((random 100) < 5) then {
|
||||||
|
[nil,_ai_veh_hitsource,rTITLETEXT,"Are you serious? Shooting at a vehicle with a toy? Get a decent weapon ...","PLAIN DOWN",3] call RE;
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((random 100) < 5) then {
|
||||||
|
_message = format["Player %1 throws tincans at vehicles again :-)",_ai_veh_hitsource_name];
|
||||||
|
[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||||
|
} else {
|
||||||
|
if ((random 100) < 5) then {
|
||||||
|
_message = format["%1, stop tickling my vehicle!",_ai_veh_hitsource_name];
|
||||||
|
[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (SAR_HITKILL_DEBUG && {isServer || !hasInterface}) then {
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: AI vehicle hit - Type: %1 Side: %2 Group Side: %3 - Part: %4 with ammo: %5 Damage: %6",_ai_veh_type,_ai_veh_side,_ai_veh_group_side,_ai_part,_ai_veh_projectile,_ai_veh_dmg];
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: AI vehicle attacker - Type: %1 Name: %2 Side: %3 Group Side: %4",_ai_veh_hitsource_type,_ai_veh_hitsource_name, _ai_veh_hitsource_side,_ai_veh_hitsource_group_side];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if(_ai_veh_group_side == SAR_AI_friendly_side) then { // was it a friendly vehcile ?
|
||||||
|
|
||||||
|
_shot_veh = _ai_veh_hitsource getVariable ["SAR_veh_hit",""];
|
||||||
|
|
||||||
|
if( str(_shot_veh) != str(_ai_veh)) then { // check if the vehicle that was shot was shot the first time
|
||||||
|
|
||||||
|
_ai_veh_hitsource setVariable ["SAR_veh_hit",_ai_veh,true];
|
||||||
|
|
||||||
|
_player_rating = rating _ai_veh_hitsource;
|
||||||
|
|
||||||
|
if((_player_rating > -10000)) then {
|
||||||
|
|
||||||
|
//define global variable
|
||||||
|
adjustrating = [_ai_veh_hitsource,(0 - (10000+_player_rating))];
|
||||||
|
|
||||||
|
// get the players machine ID
|
||||||
|
_clientmachine = owner _ai_veh_hitsource;
|
||||||
|
|
||||||
|
// transmit the global variable to this client machine
|
||||||
|
_clientmachine publicVariableClient "adjustrating";
|
||||||
|
|
||||||
|
if(SAR_HITKILL_DEBUG) then {
|
||||||
|
diag_log format["SAR HITKILL DEBUG: reduced rating (shot a friendly vehicle) for player: %1", _ai_veh_hitsource];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
(group _ai_veh) reveal [_ai_veh_hitsource,4];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
_ai_veh_dmg;
|
116
SAR_aihit.sqf
Normal file
116
SAR_aihit.sqf
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private ["_ai","_aikiller","_aikilled_type","_aikilled_side","_aikilled_group_side","_aikiller_group_side","_aikiller_type","_aikiller_name","_aikiller_side","_respect","_message"];
|
||||||
|
|
||||||
|
_ai = _this select 0;
|
||||||
|
_aikiller = _this select 1;
|
||||||
|
|
||||||
|
_aikilled_type = typeof _ai;
|
||||||
|
_aikilled_side = side _ai;
|
||||||
|
_aikilled_group_side = side (group _ai);
|
||||||
|
|
||||||
|
_aikiller_type = typeof _aikiller;
|
||||||
|
|
||||||
|
if (!(_aikiller_type in SAR_heli_type) && !("LandVehicle" countType [vehicle _aikiller]>0)) then {
|
||||||
|
_aikiller_name = name _aikiller;
|
||||||
|
} else {
|
||||||
|
_aikiller_name = _aikiller_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
_aikiller_side = side _aikiller;
|
||||||
|
_aikiller_group_side = side (group _aikiller);
|
||||||
|
|
||||||
|
if (SAR_HITKILL_DEBUG && {isServer}) then {
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: AI hit - %2 - Type: %1 Side: %3 Group Side: %4",_aikilled_type,_ai,_aikilled_side,_aikilled_group_side];
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: AI attacker - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikiller_type,_aikiller_name, _aikiller_side,_aikiller_group_side];
|
||||||
|
};
|
||||||
|
|
||||||
|
if((!isNull _aikiller) && (isPlayer _aikiller) && (_aikiller isKindOf "Exile_Unit_Player")) then {
|
||||||
|
|
||||||
|
_playerUID = getPlayerUID _aikiller;
|
||||||
|
|
||||||
|
if (_aikilled_group_side isEqualTo SAR_AI_friendly_side) then { // hit a friendly AI
|
||||||
|
|
||||||
|
if (SAR_HITKILL_DEBUG && {isServer}) then {
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: friendly AI was hit by Player %1",_aikiller];
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((random 100) > 5) then {
|
||||||
|
_message = format["Sarge AI: Dammit %1! You are firing on a friendly group check your fire!",_aikiller_name];
|
||||||
|
if (isServer) then {systemchat _message;};
|
||||||
|
} else {
|
||||||
|
if ((random 100) < 5) then {
|
||||||
|
_message = format["Sarge AI: %1, this was the last time you shot one of our team! We are coming for you!",_aikiller_name];
|
||||||
|
if (isServer) then {systemchat _message;};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_playerRespect = _aikiller getVariable ["ExileScore", 0];
|
||||||
|
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
|
||||||
|
|
||||||
|
_repChange = SAR_surv_kill_value / 10;
|
||||||
|
|
||||||
|
_playerRespect = _playerRespect - _repChange;
|
||||||
|
_aikiller setVariable ["ExileScore",_playerRespect];
|
||||||
|
|
||||||
|
ExileClientPlayerScore = _playerRespect;
|
||||||
|
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
|
||||||
|
|
||||||
|
format ["setAccountMoneyAndRespect:%1:%2:%3", _playerMoney, _playerRespect, _playerUID] call ExileServer_system_database_query_fireAndForget;
|
||||||
|
|
||||||
|
if (SAR_HITKILL_DEBUG && {isServer}) then {
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: Adjusting respect for survivor hit by %2 for %1",_aikiller,(SAR_surv_kill_value/10)];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (rating _aikiller > -10000) then { //check if shooter is not already marked as enemy
|
||||||
|
|
||||||
|
if (SAR_HITKILL_DEBUG && {isServer}) then {
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: Marking Player %1 as an enemy for a friendly AI hit!",_aikiller];
|
||||||
|
};
|
||||||
|
_aikiller addRating -10000;
|
||||||
|
};
|
||||||
|
|
||||||
|
group _ai reveal _aikiller;
|
||||||
|
|
||||||
|
{
|
||||||
|
_x doTarget _aikiller;
|
||||||
|
_x doFire _aikiller;
|
||||||
|
} foreach units group _ai;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_aikilled_group_side isEqualTo SAR_AI_unfriendly_side) then { // hit an unfriendly AI
|
||||||
|
|
||||||
|
if (SAR_HITKILL_DEBUG && {isServer}) then {
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: unfriendly AI was hit by Player %1",_aikiller];
|
||||||
|
};
|
||||||
|
|
||||||
|
_playerRespect = _aikiller getVariable ["ExileScore", 0];
|
||||||
|
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
|
||||||
|
|
||||||
|
_repChange = SAR_surv_kill_value / 10;
|
||||||
|
|
||||||
|
_playerRespect = _playerRespect + _repChange;
|
||||||
|
_aikiller setVariable ["ExileScore",_playerRespect];
|
||||||
|
|
||||||
|
ExileClientPlayerScore = _playerRespect;
|
||||||
|
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
|
||||||
|
|
||||||
|
format ["setAccountMoneyAndRespect:%1:%2:%3", _playerMoney, _playerRespect, _playerUID] call ExileServer_system_database_query_fireAndForget;
|
||||||
|
|
||||||
|
if (SAR_HITKILL_DEBUG && {isServer}) then {
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: Adjusting respect for bandit hit by %2 for %1",_aikiller,(SAR_band_kill_value/10)];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
129
SAR_aikilled.sqf
Normal file
129
SAR_aikilled.sqf
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
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"];
|
||||||
|
|
||||||
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
|
_ai = _this select 0;
|
||||||
|
_aikiller = _this select 1;
|
||||||
|
|
||||||
|
_aikilled_type = typeof _ai;
|
||||||
|
_aikilled_side = side _ai;
|
||||||
|
_aikilled_group_side = side (group _ai);
|
||||||
|
|
||||||
|
_aikiller_type = typeof _aikiller;
|
||||||
|
|
||||||
|
if (!(_aikiller_type in SAR_heli_type) && !("LandVehicle" countType [vehicle _aikiller]>0)) then {
|
||||||
|
_aikiller_name = name _aikiller;
|
||||||
|
} else {
|
||||||
|
_aikiller_name = _aikiller_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
_aikiller_side = side _aikiller;
|
||||||
|
_aikiller_group_side = side (group _aikiller);
|
||||||
|
|
||||||
|
// retrieve AI type from the killed AI
|
||||||
|
_ai_type = _ai getVariable ["SAR_AI_type",""];
|
||||||
|
|
||||||
|
// retrieve AI type from the killer AI
|
||||||
|
_ai_killer_type = _aikiller getVariable ["SAR_AI_type",""];
|
||||||
|
|
||||||
|
if (SAR_KILL_MSG) then {
|
||||||
|
if(isPlayer _aikiller) then {
|
||||||
|
_message = format["A %2 was killed by Player: %1",_aikiller_name,_ai_type];
|
||||||
|
diag_log _message;
|
||||||
|
|
||||||
|
//[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||||
|
[[[West,"airbase"], _message],{(_this select 0) sideChat (_this select 1)}] call BIS_fnc_MP;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (SAR_HITKILL_DEBUG) then {
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: AI killed - Type: %1 Side: %2 Group Side: %3",_aikilled_type, _aikilled_side,_aikilled_group_side];
|
||||||
|
diag_log format["SAR_HITKILL_DEBUG: AI Killer - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikiller_type,_aikiller_name, _aikiller_side,_aikiller_group_side];
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((!isNull _aikiller) && (_aikiller isKindOf "Exile_Unit_Player")) then {
|
||||||
|
|
||||||
|
_playerUID = getPlayerUID _aikiller;
|
||||||
|
|
||||||
|
if (_aikilled_group_side isEqualTo SAR_AI_friendly_side) then {
|
||||||
|
|
||||||
|
if (SAR_DEBUG) then {diag_log format ["Sarge's AI System: Adjusting respect for survivor or soldier kill by %2 for %1",_aikiller,SAR_surv_kill_value];};
|
||||||
|
|
||||||
|
_playerRespect = _aikiller getVariable ["ExileScore", 0];
|
||||||
|
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
|
||||||
|
|
||||||
|
_repChange = SAR_surv_kill_value / 10;
|
||||||
|
|
||||||
|
_playerRespect = _playerRespect - _repChange;
|
||||||
|
_aikiller setVariable ["ExileScore",_playerRespect];
|
||||||
|
|
||||||
|
ExileClientPlayerScore = _playerRespect;
|
||||||
|
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
|
||||||
|
|
||||||
|
format ["setAccountMoneyAndRespect:%1:%2:%3", _playerMoney, _playerRespect, _playerUID] call ExileServer_system_database_query_fireAndForget;
|
||||||
|
|
||||||
|
if (SAR_log_AI_kills) then {
|
||||||
|
_humankills = _aikiller getVariable["humanKills",0];
|
||||||
|
_aikiller setVariable["humanKills",_humankills+1,true];
|
||||||
|
};
|
||||||
|
if ((random 100) > 3) then {
|
||||||
|
_message = format["%1 killed a friendly AI - sending reinforcements!",_aikiller_name];
|
||||||
|
//[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||||
|
[[[West,"airbase"], _message],{(_this select 0) sideChat (_this select 1)}] call BIS_fnc_MP;
|
||||||
|
} else {
|
||||||
|
if ((random 100) < 3) then {
|
||||||
|
_message = format["Tango down ... we offer a decent reward for the head of %1!",_aikiller_name];
|
||||||
|
//[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||||
|
[[[West,"airbase"], _message],{(_this select 0) sideChat (_this select 1)}] call BIS_fnc_MP;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
if (_aikilled_group_side isEqualTo SAR_AI_unfriendly_side) then {
|
||||||
|
|
||||||
|
if (SAR_DEBUG) then {diag_log format ["Sarge's AI System: Adjusting respect for bandit kill by %2 for %1",_aikiller,SAR_band_kill_value];};
|
||||||
|
|
||||||
|
_playerRespect = _aikiller getVariable ["ExileScore", 0];
|
||||||
|
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
|
||||||
|
|
||||||
|
_repChange = SAR_surv_kill_value / 10;
|
||||||
|
|
||||||
|
_playerRespect = _playerRespect + _repChange;
|
||||||
|
_aikiller setVariable ["ExileScore",_playerRespect];
|
||||||
|
|
||||||
|
ExileClientPlayerScore = _playerRespect;
|
||||||
|
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
|
||||||
|
|
||||||
|
format ["setAccountMoneyAndRespect:%1:%2:%3", _playerMoney, _playerRespect, _playerUID] call ExileServer_system_database_query_fireAndForget;
|
||||||
|
|
||||||
|
if(SAR_log_AI_kills) then {
|
||||||
|
_banditkills = _aikiller getVariable["banditKills",0];
|
||||||
|
_aikiller setVariable["banditKills",_banditkills+1,true];
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((random 100) < 3) then {
|
||||||
|
_message = format["nice bandit kill %1!",_aikiller_name];
|
||||||
|
//[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||||
|
[_message,"(_this select 0) sideChat (_this select 1)",true,false] call BIS_fnc_MP;
|
||||||
|
} else {
|
||||||
|
if ((random 100) < 3) then {
|
||||||
|
_message = format["another bandit down ... %1 is going to be the root cause of bandit extinction :-)",_aikiller_name];
|
||||||
|
//[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||||
|
[_message,"(_this select 0) sideChat (_this select 1)",true,false] call BIS_fnc_MP;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
33
SAR_cfg_grid_altis.sqf
Normal file
33
SAR_cfg_grid_altis.sqf
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// =========================================================================================================
|
||||||
|
// SAR_AI - DayZ AI library
|
||||||
|
// Version: 1.0.0
|
||||||
|
// Author: Sarge (sarge@krumeich.ch)
|
||||||
|
//
|
||||||
|
// Wiki: to come
|
||||||
|
// Forum: to come
|
||||||
|
//
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
// Required:
|
||||||
|
// UPSMon
|
||||||
|
// SHK_pos
|
||||||
|
//
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
// grid cfg file for Chernarus
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=2500;
|
||||||
|
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=8000;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=14;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=9;
|
||||||
|
|
||||||
|
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||||
|
_gridwidth = 1000;
|
33
SAR_cfg_grid_chernarus.sqf
Normal file
33
SAR_cfg_grid_chernarus.sqf
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// =========================================================================================================
|
||||||
|
// SAR_AI - DayZ AI library
|
||||||
|
// Version: 1.0.0
|
||||||
|
// Author: Sarge (sarge@krumeich.ch)
|
||||||
|
//
|
||||||
|
// Wiki: to come
|
||||||
|
// Forum: to come
|
||||||
|
//
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
// Required:
|
||||||
|
// UPSMon
|
||||||
|
// SHK_pos
|
||||||
|
//
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
// grid cfg file for Chernarus
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=2500;
|
||||||
|
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=2800;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=6;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=6;
|
||||||
|
|
||||||
|
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||||
|
_gridwidth = 1000;
|
32
SAR_cfg_grid_fallujah.sqf
Normal file
32
SAR_cfg_grid_fallujah.sqf
Normal 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 Fallujah
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=2500;
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=2800;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=6;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=6;
|
||||||
|
|
||||||
|
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||||
|
_gridwidth = 1000;
|
32
SAR_cfg_grid_lingor.sqf
Normal file
32
SAR_cfg_grid_lingor.sqf
Normal 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 Lingor by Wyqer
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=1000;
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=1000;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=6;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=6;
|
||||||
|
|
||||||
|
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||||
|
_gridwidth = 750;
|
32
SAR_cfg_grid_mbg_celle2.sqf
Normal file
32
SAR_cfg_grid_mbg_celle2.sqf
Normal 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 Celle
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=2500;
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=2800;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=5;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=5;
|
||||||
|
|
||||||
|
// 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 = 650;
|
32
SAR_cfg_grid_namalsk.sqf
Normal file
32
SAR_cfg_grid_namalsk.sqf
Normal 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 Namalsk
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=2900;
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=5600;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=4;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=4;
|
||||||
|
|
||||||
|
// 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 = 900;
|
32
SAR_cfg_grid_panthera.sqf
Normal file
32
SAR_cfg_grid_panthera.sqf
Normal 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 Panthera
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=2500;
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=2800;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=6;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=6;
|
||||||
|
|
||||||
|
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||||
|
_gridwidth = 1000;
|
32
SAR_cfg_grid_takistan.sqf
Normal file
32
SAR_cfg_grid_takistan.sqf
Normal 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 Takistan
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=2500;
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=2800;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=6;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=6;
|
||||||
|
|
||||||
|
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||||
|
_gridwidth = 1000;
|
32
SAR_cfg_grid_tavi.sqf
Normal file
32
SAR_cfg_grid_tavi.sqf
Normal 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 Taviana
|
||||||
|
// last modified: 5.3.2013
|
||||||
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// x coordinate of the first, bottom left grid center point
|
||||||
|
_startx=2500;
|
||||||
|
|
||||||
|
// y coordinate of the first, bottom left grid center point
|
||||||
|
_starty=1500;
|
||||||
|
|
||||||
|
// gridsize x (how many single squares in the grid) for the x-axis
|
||||||
|
_gridsize_x=6;
|
||||||
|
|
||||||
|
// gridsize y (how many single squares in the grid) for the y-axis
|
||||||
|
_gridsize_y=7;
|
||||||
|
|
||||||
|
// 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 = 1500;
|
288
SAR_cfg_grps_altis.sqf
Normal file
288
SAR_cfg_grps_altis.sqf
Normal file
@ -0,0 +1,288 @@
|
|||||||
|
/*
|
||||||
|
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 isEqualTo "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 isEqualTo "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 ----
|
||||||
|
};
|
384
SAR_cfg_grps_chernarus.sqf
Normal file
384
SAR_cfg_grps_chernarus.sqf
Normal file
@ -0,0 +1,384 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
//
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
//
|
||||||
|
|
||||||
|
_type = _this select 0;
|
||||||
|
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
if ((_type isEqualTo "dynamic") && SAR_dynamic_spawning) then {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Dynamic spawning definition / adjustments started"];
|
||||||
|
|
||||||
|
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,100,100],[0,2,1]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Balota, 1 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[80,0,80],[2,0,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Cherno, 2 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[2,0,3],[75,0,75],[4,0,4]],"SAR_area_2_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Prido, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,50],[4,0,2]],"SAR_area_3_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Elektro, 2 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[2,0,3],[50,0,50],[4,0,4]],"SAR_area_4_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Kamyshovo, 0 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_5_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Tulga, 0 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_5_1"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Solni, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[80,0,0],[2,0,0]],"SAR_area_5_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Berezino, 0 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[0,0,3],[0,0,75],[0,0,3]],"SAR_area_5_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Khelm, 1 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[75,0,75],[3,0,3]],"SAR_area_5_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// NEAF, 0 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[0,3,1],[0,50,75],[0,2,4]],"SAR_area_5_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// NWAF, 0 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[0,2,1],[0,50,75],[0,2,4]],"SAR_area_1_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Stary, 3 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[3,0,3],[50,0,50],[3,0,3]],"SAR_area_2_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Devils Castle, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_2_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Skalka, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[75,0,0],[3,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Petrovka1, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_1_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Petrovka2, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_2_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Pobeda, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_3_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Krasno, 0 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[0,1,1],[0,75,75],[0,4,2]],"SAR_area_4_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// test south of lopatino, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[100,0,0],[6,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Dynamic spawning definition / adjustments finished"];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_type isEqualTo "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", [1951.4304, 11905.569]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 1000];
|
||||||
|
_this setMarkerDir -19.085985;
|
||||||
|
SAR_marker_DEBUG_veh = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SAR_marker_DEBUG_devilscastle", [6913.47,11437.2,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_helipatrol_nwaf,1,true] call SAR_AI_heli;
|
||||||
|
|
||||||
|
//Heli Patrol NEAF
|
||||||
|
[SAR_marker_helipatrol_neaf,1,true] call SAR_AI_heli;
|
||||||
|
|
||||||
|
// Heli patrol south coast
|
||||||
|
[SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli;
|
||||||
|
[SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli;
|
||||||
|
|
||||||
|
// heli patrol east coast
|
||||||
|
[SAR_marker_helipatrol_eastcoast,1,true] call SAR_AI_heli;
|
||||||
|
[SAR_marker_helipatrol_eastcoast,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
|
||||||
|
//
|
||||||
|
|
||||||
|
// example war scenario in the northwest. Comment OUT after having had a look at it!
|
||||||
|
/* [
|
||||||
|
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
|
||||||
|
1, // type of group
|
||||||
|
["LandRover_CZ_EP1","M1030","M1030","LandRover_CZ_EP1"], // used vehicle
|
||||||
|
[[1,1,1],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew
|
||||||
|
true, // if this group should respawn or not
|
||||||
|
10
|
||||||
|
] call SAR_AI_land;
|
||||||
|
|
||||||
|
[
|
||||||
|
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
|
||||||
|
3, // type of group
|
||||||
|
["M1030","M1030","M1030","M1030"], // used vehicle
|
||||||
|
[[1,1,0],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew
|
||||||
|
true, // if this group should respawn or not
|
||||||
|
60 // waittime until this group will respawn
|
||||||
|
] call SAR_AI_land;
|
||||||
|
|
||||||
|
[
|
||||||
|
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
|
||||||
|
2, // type of group
|
||||||
|
["M1030"], // used vehicle
|
||||||
|
[[1,1,0]], // Vehicle initial crew
|
||||||
|
true, // if this group should respawn or not
|
||||||
|
60 // waittime until this group will respawn
|
||||||
|
] call SAR_AI_land; */
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for vehicle patrols finished"];
|
||||||
|
// ---- end of configuration area ----
|
||||||
|
};
|
117
SAR_cfg_grps_fallujah.sqf
Normal file
117
SAR_cfg_grps_fallujah.sqf
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
// --------------------------------------------------
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
//
|
||||||
|
// examples see the chernarus file
|
||||||
|
// --------------------------------------------------
|
||||||
|
_type = _this select 0;
|
||||||
|
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
if ((_type isEqualTo "dynamic") && SAR_dynamic_spawning) then {
|
||||||
|
|
||||||
|
// add entries here ...
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_type isEqualTo "static") then {
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Definition of area markers for static spawns
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// 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"];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Static, predefined heli patrol areas with configurable units
|
||||||
|
//
|
||||||
|
// Parameters used:
|
||||||
|
// Areaname
|
||||||
|
// 1,2,3 = soldier, survivors, bandits
|
||||||
|
//
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Static, predefined infantry patrols in defined areas with configurable units
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
//
|
||||||
|
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||||
|
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||||
|
// 0 = amount of snipers in the group
|
||||||
|
// 1 = amount of rifleman in the group
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
// Example entries:
|
||||||
|
// SARGE DEBUG - Debug group
|
||||||
|
// military, 0 snipers, 1 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
|
||||||
|
// military, 2 snipers, 4 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||||
|
|
||||||
|
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||||
|
|
||||||
|
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// add here if needed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---- end of configuration area ----
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||||
|
};
|
205
SAR_cfg_grps_lingor.sqf
Normal file
205
SAR_cfg_grps_lingor.sqf
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
// --------------------------------------------------
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
//
|
||||||
|
// examples see the chernarus file
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
_type = _this select 0;
|
||||||
|
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
if ((_type isEqualTo "dynamic") && SAR_dynamic_spawning) then {
|
||||||
|
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[45,0,45],[0,0,0]],"SAR_area_0_0"] call SAR_AI_mon_upd; //Pintosa, Alma, Corda, Mercadio
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[45,0,45],[0,0,0]],"SAR_area_1_0"] call SAR_AI_mon_upd; //Verto, Medlina
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[4,3,4],[75,70,85],[2,2,1]],"SAR_area_2_0"] call SAR_AI_mon_upd; //Calamar (main+south)
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[20,20,20],[0,0,1]],"SAR_area_3_0"] call SAR_AI_mon_upd; //Wilderness
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,1],[0,25,25],[0,0,1]],"SAR_area_4_0"] call SAR_AI_mon_upd; //Depot (Old Mines)
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[25,0,45],[0,0,0]],"SAR_area_5_0"] call SAR_AI_mon_upd; //Chupinka
|
||||||
|
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[25,0,35],[1,0,1]],"SAR_area_0_1"] call SAR_AI_mon_upd; //Drassen, Rago
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_1_1"] call SAR_AI_mon_upd; //Barro, Aguado - NO SPAWNS
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,2],[35,40,45],[2,1,2]],"SAR_area_2_1"] call SAR_AI_mon_upd; //Bilbado, Montehofo, Calamar (north)
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[15,0,35],[1,0,1]],"SAR_area_3_1"] call SAR_AI_mon_upd; //Negroso, Lagosa, Prospero
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[35,0,35],[0,0,1]],"SAR_area_4_1"] call SAR_AI_mon_upd; //El Villon, Marcella, Monga
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[35,0,35],[1,0,1]],"SAR_area_5_1"] call SAR_AI_mon_upd; //Pikawas, Palida
|
||||||
|
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_2"] call SAR_AI_mon_upd; //Villa Oscura, Motodrom Rapido - NO SPAWNS
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,1],[45,0,35],[1,0,1]],"SAR_area_1_2"] call SAR_AI_mon_upd; //Los Peligron, Morada, OPEN WASTELAND
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,1],[35,30,35],[1,1,1]],"SAR_area_2_2"] call SAR_AI_mon_upd; //San Arluco (south), Aeropuerto Peligron, Pancho
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,2,2],[75,70,65],[2,2,2]],"SAR_area_3_2"] call SAR_AI_mon_upd; //Corazon, Checkpoint Sur
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,2,2],[45,50,55],[0,1,1]],"SAR_area_4_2"] call SAR_AI_mon_upd; //Victorin, SanVigado
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_2"] call SAR_AI_mon_upd; //WATER ONLY - NO SPAWNS
|
||||||
|
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[45,30,45],[0,0,1]],"SAR_area_0_3"] call SAR_AI_mon_upd; //Pocobay, Benio, Pista
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,2],[55,60,55],[2,1,1]],"SAR_area_1_3"] call SAR_AI_mon_upd; //Vidora, Mairango, Fernando, Elcanto
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,2],[50,50,50],[2,2,1]],"SAR_area_2_3"] call SAR_AI_mon_upd; //Mercielo, Guayucca, Tucos, San Arluco (north)
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[65,60,75],[0,1,1]],"SAR_area_3_3"] call SAR_AI_mon_upd; //Calapedro, OPEN WASTELAND
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[4,2,2],[75,60,55],[2,1,2]],"SAR_area_4_3"] call SAR_AI_mon_upd; //Maruko (south), Dump Yard
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_3"] call SAR_AI_mon_upd; //WATER ONLY - NO SPAWNS
|
||||||
|
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_4"] call SAR_AI_mon_upd; //East Island tip - NO SPAWNS
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[75,75,75],[1,1,1]],"SAR_area_1_4"] call SAR_AI_mon_upd; //FOB Eddie, OPEN WASTELAND
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[65,50,55],[1,1,2]],"SAR_area_2_4"] call SAR_AI_mon_upd; //Aculto, Garibosa, Research Lab 101
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[75,60,55],[1,2,1]],"SAR_area_3_4"] call SAR_AI_mon_upd; //San Isobel, Rommelo Raceway, Maruko airport (west)
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[5,3,2],[75,70,65],[1,1,1]],"SAR_area_4_4"] call SAR_AI_mon_upd; //Maruko (north), Maruko airport (east)
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,2,0],[55,50,0],[2,1,0]],"SAR_area_5_4"] call SAR_AI_mon_upd; //NE Island (south)
|
||||||
|
|
||||||
|
_check = [["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; //DEBUG ISLAND - NO SPAWNS
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,2,1],[75,70,45],[2,2,1]],"SAR_area_1_5"] call SAR_AI_mon_upd; //Prison, OPEN WASTELAND
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[75,70,60],[0,0,0]],"SAR_area_2_5"] call SAR_AI_mon_upd; //OPEN WASTELAND
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_3_5"] call SAR_AI_mon_upd; //MAINLY WATER - NO SPAWNS
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,0],[50,50,0],[0,0,0]],"SAR_area_4_5"] call SAR_AI_mon_upd; //SMALL NE ISLAND
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,1],[45,40,35],[2,1,0]],"SAR_area_5_5"] call SAR_AI_mon_upd; //NE Island (north)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_type isEqualTo "static") then {
|
||||||
|
|
||||||
|
_this = createMarker ["SAR_patrol_prison", [3024.6147, 7969.0239]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [1500, 1050];
|
||||||
|
SAR_marker_helipatrol_prison = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SAR_patrol_maruko_airport", [6451.5801, 6991.4985]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [1000, 1500];
|
||||||
|
SAR_marker_helipatrol_maruko_airport = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SAR_patrol_fob_eddie", [3058.3813, 6605.2446]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [1500, 1500];
|
||||||
|
SAR_marker_helipatrol_fob_eddie = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SAR_patrol_calamar", [4261.3984, 1487.6489]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [2000, 2000];
|
||||||
|
SAR_marker_helipatrol_calamar = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SAR_patrol_mainland", [3280.0093, 3431.8176]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [4500, 4500];
|
||||||
|
SAR_marker_helipatrol_mainland = _this;
|
||||||
|
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Definition of area markers for static spawns
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// 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"];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Static, predefined heli patrol areas with configurable units
|
||||||
|
//
|
||||||
|
// Parameters used:
|
||||||
|
// Areaname
|
||||||
|
// 1,2,3 = soldier, survivors, bandits
|
||||||
|
//
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
[SAR_marker_helipatrol_prison,floor(random 2)+1] call SAR_AI_heli;
|
||||||
|
[SAR_marker_helipatrol_maruko_airport,floor(random 2)+1] call SAR_AI_heli;
|
||||||
|
[SAR_marker_helipatrol_fob_eddie,floor(random 2)+1] call SAR_AI_heli;
|
||||||
|
[SAR_marker_helipatrol_calamar,floor(random 2)+1] call SAR_AI_heli;
|
||||||
|
[SAR_marker_helipatrol_mainland,floor(random 2)+1] call SAR_AI_heli;
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Static, predefined infantry patrols in defined areas with configurable units
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
//
|
||||||
|
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||||
|
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||||
|
// 0 = amount of snipers in the group
|
||||||
|
// 1 = amount of rifleman in the group
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
// Example entries:
|
||||||
|
// SARGE DEBUG - Debug group
|
||||||
|
// military, 0 snipers, 1 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
|
||||||
|
// military, 2 snipers, 4 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||||
|
|
||||||
|
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||||
|
|
||||||
|
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// add here if needed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---- end of configuration area ----
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||||
|
};
|
696
SAR_cfg_grps_mbg_celle2.sqf
Normal file
696
SAR_cfg_grps_mbg_celle2.sqf
Normal file
@ -0,0 +1,696 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
// --------------------------------------------------
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
//
|
||||||
|
// examples see the chernarus file
|
||||||
|
// --------------------------------------------------
|
||||||
|
_type = _this select 0;
|
||||||
|
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
if ((_type isEqualTo "dynamic") && SAR_dynamic_spawning) then {
|
||||||
|
|
||||||
|
// Lindwedel & mellendorf
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||||
|
// Schwarmstedt & highway 7 bridge
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_0_1"] call SAR_AI_mon_upd;
|
||||||
|
// Hademstorf
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_0_2"] call SAR_AI_mon_upd;
|
||||||
|
// Fallingbostel & Dushorn
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_0_3"] call SAR_AI_mon_upd;
|
||||||
|
// Benefeld
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_0_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
//-------------------
|
||||||
|
|
||||||
|
// Fuhrberg & South Highway 7
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_1_0"] call SAR_AI_mon_upd;
|
||||||
|
// Thoren
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_1_1"] call SAR_AI_mon_upd;
|
||||||
|
// Melssendorf
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_1_2"] call SAR_AI_mon_upd;
|
||||||
|
// Wasteland
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_1_3"] call SAR_AI_mon_upd;
|
||||||
|
// Dorfmark
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_1_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
//---------------------
|
||||||
|
|
||||||
|
// gas station west of SAF
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_2_0"] call SAR_AI_mon_upd;
|
||||||
|
// Winsen & Sudwinsen
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_2_1"] call SAR_AI_mon_upd;
|
||||||
|
// Walle & Offen
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_2_2"] call SAR_AI_mon_upd;
|
||||||
|
// Bergen
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_2_3"] call SAR_AI_mon_upd;
|
||||||
|
// Wietzendorf
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_2_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
//------------------------
|
||||||
|
|
||||||
|
// Celle & SAF
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_3_0"] call SAR_AI_mon_upd;
|
||||||
|
// Klein Hehlen & Schuen Region
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_3_1"] call SAR_AI_mon_upd;
|
||||||
|
// Eversen
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_3_2"] call SAR_AI_mon_upd;
|
||||||
|
// Beckedorf
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_3_3"] call SAR_AI_mon_upd;
|
||||||
|
// Muden & Northern Pond
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_3_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
//------------------------
|
||||||
|
|
||||||
|
// Wienhausen
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_4_0"] call SAR_AI_mon_upd;
|
||||||
|
// North of Wienhausen
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_4_1"] call SAR_AI_mon_upd;
|
||||||
|
// Eschede
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_4_2"] call SAR_AI_mon_upd;
|
||||||
|
// South of Fassberg & NAF
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_4_3"] call SAR_AI_mon_upd;
|
||||||
|
// Fassberg & NAF
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_4_4"] call SAR_AI_mon_upd;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_type isEqualTo "static") then {
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Definition of area markers for static spawns
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
|
_this = createMarker ["Celle_Courtyard", [8769.3633, 2077.6267, 0]];
|
||||||
|
_this setMarkerText "Celle_Courtyard";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Celle_Courtyard = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SAF_Control_Tower", [7593.5557, 1075.5316, 2.5749207e-005]];
|
||||||
|
_this setMarkerText "SAF_Control_Tower";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_SAF_Control_Tower = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Wienhausen", [10796.543, 794.20032, 1.0967255e-005]];
|
||||||
|
_this setMarkerText "Wienhausen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Wienhausen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Lachendorf", [11945.233, 2269.1538, 9.5367432e-007]];
|
||||||
|
_this setMarkerText "Lachendorf";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Lachendorf = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Hambuhren", [6976.8833, 2576.8459, 4.7683716e-006]];
|
||||||
|
_this setMarkerText "Hambuhren";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Hambuhren = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Ovelgonne", [6156.8647, 2619.8801, -1.1444092e-005]];
|
||||||
|
_this setMarkerText "Ovelgonne";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Ovelgonne = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Fuhrberg", [4671.6343, 443.48831, 9.5367432e-006]];
|
||||||
|
_this setMarkerText "Fuhrberg";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Fuhrberg = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Wietze", [4672.1519, 3009.2664, 2.0980835e-005]];
|
||||||
|
_this setMarkerText "Wietze";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Wietze = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Sudwinsen", [5618.9297, 3712.0496, -4.7683716e-006]];
|
||||||
|
_this setMarkerText "Sudwinsen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Sudwinsen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Winsen", [5576.0605, 4354.6401, -9.5367432e-007]];
|
||||||
|
_this setMarkerText "Winsen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Winsen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Wolthausen", [7112.8071, 4622.9976, -2.0980835e-005]];
|
||||||
|
_this setMarkerText "Wolthausen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Wolthausen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Eschede", [11830.458, 5652.0806, 2.6702881e-005]];
|
||||||
|
_this setMarkerText "Eschede";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Eschede = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Schuen", [9038.9385, 3837.918, -4.9591064e-005]];
|
||||||
|
_this setMarkerText "Schuen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Schuen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["NAF_Control_Tower", [11102.345, 11203.669, 8.5830688e-006]];
|
||||||
|
_this setMarkerText "NAF_Control_Tower";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_NAF_Control_Tower = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Fassberg", [10436.042, 10689.137, -2.8610229e-006]];
|
||||||
|
_this setMarkerText "Fassberg";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Fassberg = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Wietzendorf", [6848.2852, 11163.889, 2.6702881e-005]];
|
||||||
|
_this setMarkerText "Wietzendorf";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Wietzendorf = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Dorfmark", [2984.6731, 10950.419, 1.9073486e-006]];
|
||||||
|
_this setMarkerText "Dorfmark";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Dorfmark = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Benefeld", [715.7384, 11086.646, 7.6293945e-006]];
|
||||||
|
_this setMarkerText "Benefeld";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Benefeld = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Fallingbostel", [1606.4475, 9430.5176, 1.9073486e-006]];
|
||||||
|
_this setMarkerText "Fallingbostel";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Fallingbostel = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Dushorn", [571.11353, 8693.5762, 5.7220459e-006]];
|
||||||
|
_this setMarkerText "Dushorn";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Dushorn = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Schwarmstedt", [447.49429, 3814.2073, -5.7220459e-006]];
|
||||||
|
_this setMarkerText "Schwarmstedt";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Schwarmstedt = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Hademstorf", [614.74182, 5104.7773, -3.8146973e-006]];
|
||||||
|
_this setMarkerText "Hademstorf";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Hademstorf = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Thoren", [2702.6433, 4069.988, -1.9073486e-006]];
|
||||||
|
_this setMarkerText "Thoren";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Thoren = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Mellendorf", [2301.0278, 1215.074, -3.0517578e-005]];
|
||||||
|
_this setMarkerText "Mellendorf";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Mellendorf = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Lindwedel", [1678.7277, 2053.5579, -9.5367432e-006]];
|
||||||
|
_this setMarkerText "Lindwedel";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Lindwedel = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Eversen", [8469.7305, 6320.751, -3.8146973e-006]];
|
||||||
|
_this setMarkerText "Eversen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Eversen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Beckedorf", [8414.5283, 8088.9531, 6.2942505e-005]];
|
||||||
|
_this setMarkerText "Beckedorf";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Beckedorf = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Offen", [6851.1323, 6618.6309, 2.2888184e-005]];
|
||||||
|
_this setMarkerText "Offen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Offen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Walle", [6247.1572, 5803.9072, 3.8146973e-006]];
|
||||||
|
_this setMarkerText "Walle";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Walle = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Meissendorf", [4542.5371, 5519.3491, 3.8146973e-006]];
|
||||||
|
_this setMarkerText "Meissendorf";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Meissendorf = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Bergen", [6760.0996, 7975.769, 5.7220459e-006]];
|
||||||
|
_this setMarkerText "Bergen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Bergen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Bonstorf", [8349.6416, 9591.1768, 3.8146973e-005]];
|
||||||
|
_this setMarkerText "Bonstorf";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Bonstorf = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Muden", [9515.9932, 10121.562, 2.4795532e-005]];
|
||||||
|
_this setMarkerText "Muden";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Muden = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Hermannsburg", [9001.0996, 8901.415, -3.8146973e-005]];
|
||||||
|
_this setMarkerText "Hermannsburg";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Hermannsburg = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Gross_Hehlen", [8513.2227, 3162.3447, 1.1444092e-005]];
|
||||||
|
_this setMarkerText "Gross_Hehlen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Gross_Hehlen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Vorwerk", [9380.126, 3269.1462, 1.9073486e-006]];
|
||||||
|
_this setMarkerText "Vorwerk";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Vorwerk = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Hehlentor", [9036.2773, 2586.5928, 2.8610229e-005]];
|
||||||
|
_this setMarkerText "Hehlentor";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Hehlentor = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Klein_Hehlen", [8350.9766, 2752.293, 2.4795532e-005]];
|
||||||
|
_this setMarkerText "Klein Hehlen";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Klein_Hehlen = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Eastmost_along_river", [12195.065, 977.573, -1.8119812e-005]];
|
||||||
|
_this setMarkerText "Eastmost_along_river";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Eastmost_along_river = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Westmost_along_river", [59.358772, 5208.2036, 3.7670135e-005]];
|
||||||
|
_this setMarkerText "Westmost_along_river";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Westmost_along_river = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["NW_Corner", [17.684713, 12274.881, 0]];
|
||||||
|
_this setMarkerText "NW_Corner";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_NW_Corner = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["NE_Corner", [12186.046, 12218.783, -2.4795532e-005]];
|
||||||
|
_this setMarkerText "NE_Corner";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_NE_Corner = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SE_Corner", [12213.908, 29.648508, -2.0980835e-005]];
|
||||||
|
_this setMarkerText "SE_Corner";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_SE_Corner = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SW_Corner", [46.516766, 31.434532, 0]];
|
||||||
|
_this setMarkerText "SW_Corner";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_SW_Corner = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Northern_point_on_Highway_7", [5035.2646, 12151.317, -6.1988831e-006]];
|
||||||
|
_this setMarkerText "Northern_point_on_Highway_7";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Northern_point_on_Highway_7 = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Southern_end_of_Highway_7", [3567.832, 142.28204, 1.1444092e-005]];
|
||||||
|
_this setMarkerText "Southern_end_of_Highway_7";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Southern_end_of_Highway_7 = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Highway_7_Bridge", [1594.113, 4385.8452, 0]];
|
||||||
|
_this setMarkerText "Highway_7_Bridge";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Highway_7_Bridge = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Wasteland", [4421.6313, 8189.4146, -5.3405762e-005]];
|
||||||
|
_this setMarkerText "Wasteland";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [1300, 1300];
|
||||||
|
Manatee_Wasteland = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["SAF_Hangars", [7556.9375, 1502.7905, 0]];
|
||||||
|
_this setMarkerText "SAF_Hangars";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_SAF_Hangars = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Schuen_Military_Base", [9185.0029, 4135.4775, 0]];
|
||||||
|
_this setMarkerText "Schuen_Military_Base";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_Schuen_Military_Base = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["NAF_Barracks", [10483.776, 11535.362, 0]];
|
||||||
|
_this setMarkerText "NAF_Barracks";
|
||||||
|
_this setMarkerShape "ELLIPSE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [300, 300];
|
||||||
|
Manatee_NAF_Barracks = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["South_East_Quadrant", [9427.334, 3538.8962, 0]];
|
||||||
|
_this setMarkerText "South_East_Quadrant";
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [3500, 3500];
|
||||||
|
Manatee_South_East_Quadrant = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["North_East_Quadrant", [9427.752, 9693.2197, 0]];
|
||||||
|
_this setMarkerText "North_East_Quadrant";
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [3500, 3500];
|
||||||
|
Manatee_North_East_Quadrant = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["South_West_Quadrant", [3027.6523, 3293.8015, 0]];
|
||||||
|
_this setMarkerText "South_West_Quadrant";
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [3500, 3500];
|
||||||
|
Manatee_South_West_Quadrant = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["North_West_Quadrant", [2972.1943, 9165.0508, -1.7166138e-005]];
|
||||||
|
_this setMarkerText "North_West_Quadrant";
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [3500, 3500];
|
||||||
|
Manatee_North_West_Quadrant = _this;
|
||||||
|
|
||||||
|
_this = createMarker ["Map_Center", [6070.0127, 6405.2798, -3.4332275e-005]];
|
||||||
|
_this setMarkerText "Map_Center";
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [7000, 7000];
|
||||||
|
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"];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Static, predefined heli patrol areas with configurable units
|
||||||
|
//
|
||||||
|
// Parameters used:
|
||||||
|
// Areaname
|
||||||
|
// 1,2,3 = soldier, survivors, bandits
|
||||||
|
//
|
||||||
|
|
||||||
|
// Map Center - Soldiers
|
||||||
|
[Manatee_Map_Center,1] call SAR_AI_heli;
|
||||||
|
// North Western Bandits
|
||||||
|
[Manatee_North_West_Quadrant,3] call SAR_AI_heli;
|
||||||
|
// North Eastern Bandits
|
||||||
|
[Manatee_North_East_Quadrant,3] call SAR_AI_heli;
|
||||||
|
// South Eastern Survivors
|
||||||
|
[Manatee_South_East_Quadrant,2] call SAR_AI_heli;
|
||||||
|
// South Western Survivors
|
||||||
|
[Manatee_South_West_Quadrant,2] call SAR_AI_heli;
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Static, predefined infantry patrols in defined areas with configurable units
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
//
|
||||||
|
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||||
|
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||||
|
// 0 = amount of snipers in the group
|
||||||
|
// 1 = amount of rifleman in the group
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
// BANDITS - 3 Snipers, 7 rifleman. SAF & NAF
|
||||||
|
[Manatee_SAF_Control_Tower,3,3,7,""] call SAR_AI;
|
||||||
|
|
||||||
|
[Manatee_NAF_Control_Tower,3,3,7,""] call SAR_AI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Example entries:
|
||||||
|
// SARGE DEBUG - Debug group
|
||||||
|
// military, 0 snipers, 1 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
|
||||||
|
// military, 2 snipers, 4 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||||
|
|
||||||
|
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||||
|
|
||||||
|
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// add here if needed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---- end of configuration area ----
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||||
|
};
|
145
SAR_cfg_grps_namalsk.sqf
Normal file
145
SAR_cfg_grps_namalsk.sqf
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
//
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
//
|
||||||
|
_type = _this select 0;
|
||||||
|
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
if ((_type isEqualTo "dynamic") && SAR_dynamic_spawning) then {
|
||||||
|
|
||||||
|
// West Point, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[50,75,100],[2,3,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Water, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Brensk, 3 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,1],[80,50,75],[2,2,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Tara Bridge, 2 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,2],[70,0,70],[3,0,3]],"SAR_area_2_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// South East coast, 1 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,3],[30,20,60],[2,2,3]],"SAR_area_3_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Lubjansk, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,75],[2,0,4]],"SAR_area_1_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Sebjan airport, 2 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[50,50,30],[3,3,2]],"SAR_area_2_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Norinsk, 2 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,3,1],[75,75,50],[3,3,3]],"SAR_area_1_1"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Object A1, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[80,75,75],[2,2,4]],"SAR_area_1_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Jalovisko, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[20,0,50],[3,0,3]],"SAR_area_3_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// Tara, 2 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,2],[75,0,75],[3,0,3]],"SAR_area_2_1"] call SAR_AI_mon_upd;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_type isEqualTo "static") then {
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Definition of area markers for static spawns
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// 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"];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Static, predefined heli patrol areas with configurable units
|
||||||
|
//
|
||||||
|
// Parameters used:
|
||||||
|
// Areaname
|
||||||
|
// 1,2,3 = soldier, survivors, bandits
|
||||||
|
//
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Static, predefined infantry patrols in defined areas with configurable units
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
//
|
||||||
|
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||||
|
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||||
|
// 0 = amount of snipers in the group
|
||||||
|
// 1 = amount of rifleman in the group
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
// Example entries:
|
||||||
|
// SARGE DEBUG - Debug group
|
||||||
|
// military, 0 snipers, 1 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
|
||||||
|
// military, 2 snipers, 4 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||||
|
|
||||||
|
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||||
|
|
||||||
|
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// add here if needed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---- end of configuration area ----
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||||
|
};
|
117
SAR_cfg_grps_panthera.sqf
Normal file
117
SAR_cfg_grps_panthera.sqf
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
// --------------------------------------------------
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
//
|
||||||
|
// examples see the chernarus file
|
||||||
|
// --------------------------------------------------
|
||||||
|
_type = _this select 0;
|
||||||
|
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
if ((_type isEqualTo "dynamic") && SAR_dynamic_spawning) then {
|
||||||
|
|
||||||
|
// add entries here ...
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_type isEqualTo "static") then {
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Definition of area markers for static spawns
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// 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"];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Static, predefined heli patrol areas with configurable units
|
||||||
|
//
|
||||||
|
// Parameters used:
|
||||||
|
// Areaname
|
||||||
|
// 1,2,3 = soldier, survivors, bandits
|
||||||
|
//
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Static, predefined infantry patrols in defined areas with configurable units
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
//
|
||||||
|
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||||
|
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||||
|
// 0 = amount of snipers in the group
|
||||||
|
// 1 = amount of rifleman in the group
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
// Example entries:
|
||||||
|
// SARGE DEBUG - Debug group
|
||||||
|
// military, 0 snipers, 1 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
|
||||||
|
// military, 2 snipers, 4 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||||
|
|
||||||
|
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||||
|
|
||||||
|
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// add here if needed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---- end of configuration area ----
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||||
|
};
|
117
SAR_cfg_grps_takistan.sqf
Normal file
117
SAR_cfg_grps_takistan.sqf
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
// --------------------------------------------------
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
//
|
||||||
|
// examples see the chernarus file
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
_type = _this select 0;
|
||||||
|
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
if ((_type isEqualTo "dynamic") && SAR_dynamic_spawning) then {
|
||||||
|
// add entries here ...
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_type isEqualTo "static") then {
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Definition of area markers for static spawns
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// 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"];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Static, predefined heli patrol areas with configurable units
|
||||||
|
//
|
||||||
|
// Parameters used:
|
||||||
|
// Areaname
|
||||||
|
// 1,2,3 = soldier, survivors, bandits
|
||||||
|
//
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Static, predefined infantry patrols in defined areas with configurable units
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
//
|
||||||
|
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||||
|
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||||
|
// 0 = amount of snipers in the group
|
||||||
|
// 1 = amount of rifleman in the group
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
// Example entries:
|
||||||
|
// SARGE DEBUG - Debug group
|
||||||
|
// military, 0 snipers, 1 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
|
||||||
|
// military, 2 snipers, 4 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||||
|
|
||||||
|
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||||
|
|
||||||
|
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// add here if needed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---- end of configuration area ----
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||||
|
};
|
320
SAR_cfg_grps_tavi.sqf
Normal file
320
SAR_cfg_grps_tavi.sqf
Normal file
@ -0,0 +1,320 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
// --------------------------------------------------
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
//
|
||||||
|
// examples see the chernarus file
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
_type = _this select 0;
|
||||||
|
|
||||||
|
// grid definition for the automatic spawn system
|
||||||
|
if ((_type isEqualTo "dynamic") && SAR_dynamic_spawning) then {
|
||||||
|
|
||||||
|
// KNIN, 0 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,2,1],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// ASH, 0 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// TOPOLKA, 2 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,3],[75,0,75],[4,0,4]],"SAR_area_2_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// SEVEN, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,50],[4,0,2]],"SAR_area_3_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_4_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_0"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,0],[0,0,0]],"SAR_area_0_1"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// LES SPICAK, 1 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[80,0,60],[2,0,2]],"SAR_area_1_1"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// BRANIBOR, 3 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,3],[60,50,75],[2,3,3]],"SAR_area_2_1"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_3_1"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// OTOK, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[75,50,75],[3,2,3]],"SAR_area_4_1"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// NIZHINA, 0 bandit groups, 3 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,3,3],[0,50,75],[0,2,4]],"SAR_area_5_1"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// MITROVICE, 2 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[90,50,75],[4,2,4]],"SAR_area_0_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// BILGRAD, 3 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,3],[50,50,50],[3,3,3]],"SAR_area_1_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// KRASNOZNAMENSK, 2 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,3,1],[75,50,75],[3,4,4]],"SAR_area_2_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// BRIDGE, 1 bandit groups, 2 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,2,3],[75,100,75],[3,3,2]],"SAR_area_3_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// BOYE, 0 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,2],[0,0,100],[0,0,5]],"SAR_area_4_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// BYELOV, 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,5,4]],"SAR_area_5_2"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// CHERNOVAR, 2 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,1],[75,0,50],[3,0,3]],"SAR_area_1_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// ARMY_BASE, 0 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,3,1],[0,75,75],[0,3,6]],"SAR_area_2_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// ETANOVSK, 3 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,1],[75,75,75],[3,4,2]],"SAR_area_3_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// SABINA, 1 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,3,1],[20,75,100],[4,4,2]],"SAR_area_4_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// DUBOVO_AF, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[75,75,75],[2,4,2]],"SAR_area_5_3"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// KRES, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[75,75,75],[2,4,2]],"SAR_area_0_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_1_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_2_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// CHRVENI, 1 bandit groups, 2 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,2,2],[50,75,75],[4,4,2]],"SAR_area_3_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// SOLIBOR, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[50,75,75],[3,4,2]],"SAR_area_4_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// MOLOTOVSK, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[50,75,75],[4,4,2]],"SAR_area_5_4"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_1_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// YELENI, 0 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,3,1],[0,75,75],[0,4,3]],"SAR_area_2_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// LYPESTOK, 2 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,1],[50,75,75],[5,4,2]],"SAR_area_3_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// SEVASTOPOL, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[75,75,75],[2,4,2]],"SAR_area_4_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_5"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_6"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_1_6"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// KAMENI, 3 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,2,1],[100,75,75],[2,4,5]],"SAR_area_2_6"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// YAROSLAV, 2 bandit groups, 2 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,2],[80,75,75],[3,4,2]],"SAR_area_3_6"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// DALNOGORSK, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[75,75,75],[3,4,4]],"SAR_area_4_6"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||||
|
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_6"] call SAR_AI_mon_upd;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_type isEqualTo "static") then {
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Definition of area markers for static spawns
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
// Sabina, heli patrol area
|
||||||
|
_this = createMarker ["SAR_patrol_sabina", [14894.9, 11081.3]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [1000, 4500];
|
||||||
|
SAR_marker_helipatrol_sabina = _this;
|
||||||
|
|
||||||
|
// Lyepestok, heli patrol area
|
||||||
|
_this = createMarker ["SAR_patrol_lyepestok", [11579.5, 15413.4]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [400, 400];
|
||||||
|
SAR_marker_helipatrol_lyepestok = _this;
|
||||||
|
|
||||||
|
// NWAF, heli patrol area
|
||||||
|
_this = createMarker ["SAR_patrol_nwaf", [10567, 18429.6]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [800, 1000];
|
||||||
|
SAR_marker_helipatrol_nwaf = _this;
|
||||||
|
|
||||||
|
// Dubovo, heli patrol area
|
||||||
|
_this = createMarker ["SAR_patrol_dubovo", [16540.9, 12674.3]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [500, 5000];
|
||||||
|
SAR_marker_helipatrol_dubovo = _this;
|
||||||
|
|
||||||
|
// Krasnoznamensk, heli patrol area
|
||||||
|
_this = createMarker ["SAR_patrol_kraz", [8482.28, 8101.42]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [500, 1700];
|
||||||
|
_this setMarkerDir 262.10;
|
||||||
|
SAR_marker_helipatrol_kraz = _this;
|
||||||
|
|
||||||
|
// Branibor, heli patrol area
|
||||||
|
_this = createMarker ["SAR_patrol_branibor", [7206.91, 4933.56]];
|
||||||
|
_this setMarkerShape "RECTANGLE";
|
||||||
|
_this setMarkeralpha 0;
|
||||||
|
_this setMarkerType "Flag";
|
||||||
|
_this setMarkerBrush "Solid";
|
||||||
|
_this setMarkerSize [400, 5000];
|
||||||
|
_this setMarkerDir 127.30;
|
||||||
|
SAR_marker_helipatrol_branibor = _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"];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Static, predefined heli patrol areas with configurable units
|
||||||
|
//
|
||||||
|
// Parameters used:
|
||||||
|
// Areaname
|
||||||
|
// 1,2,3 = soldier, survivors, bandits
|
||||||
|
//
|
||||||
|
|
||||||
|
//Heli Patrol Sabina
|
||||||
|
[SAR_marker_helipatrol_sabina,1] call SAR_AI_heli;
|
||||||
|
|
||||||
|
//Heli Patrol Lyepestok
|
||||||
|
[SAR_marker_helipatrol_lyepestok,1] call SAR_AI_heli;
|
||||||
|
|
||||||
|
//Heli patrol NWAF
|
||||||
|
[SAR_marker_helipatrol_nwaf,1] call SAR_AI_heli;
|
||||||
|
|
||||||
|
//Heli patrol Dubovo
|
||||||
|
[SAR_marker_helipatrol_dubovo,1] call SAR_AI_heli;
|
||||||
|
|
||||||
|
//Heli patrol Krasnoznamensk
|
||||||
|
[SAR_marker_helipatrol_kraz,1] call SAR_AI_heli;
|
||||||
|
|
||||||
|
//Heli patrol Branibor
|
||||||
|
[SAR_marker_helipatrol_branibor,1] call SAR_AI_heli;
|
||||||
|
|
||||||
|
|
||||||
|
// add if needed, see examples in the chernarus file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Static, predefined infantry patrols in defined areas with configurable units
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
//
|
||||||
|
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||||
|
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||||
|
// 0 = amount of snipers in the group
|
||||||
|
// 1 = amount of rifleman in the group
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
// Example entries:
|
||||||
|
// SARGE DEBUG - Debug group
|
||||||
|
// military, 0 snipers, 1 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||||
|
|
||||||
|
// military, 2 snipers, 4 riflemen, patrol
|
||||||
|
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||||
|
|
||||||
|
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||||
|
|
||||||
|
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||||
|
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// add here if needed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---- end of configuration area ----
|
||||||
|
|
||||||
|
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||||
|
};
|
136
SAR_config.sqf
Normal file
136
SAR_config.sqf
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
SAR_version = "2.1.0";
|
||||||
|
|
||||||
|
/* Debug & RPT 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 = false; // Set to true for announcing AI kills to the server *This is still in development*
|
||||||
|
|
||||||
|
/* Dynamic AI Settings */
|
||||||
|
SAR_dynamic_spawning = true; // Turn dynamic grid spawns on or off
|
||||||
|
SAR_Base_Gaurds = true; // Turn AI territory gurads on or off
|
||||||
|
SAR_dynamic_group_respawn = true; // Turn dynamic grid AI respawn on or off
|
||||||
|
SAR_AI_STEAL_VEHICLE = false; // Turn the option for AI using vehicles to reach their destination on or off
|
||||||
|
SAR_AI_disable_UPSMON_AI = false; // Turning this off could have unintended consequences
|
||||||
|
SAR_respawn_waittime = 300; // How long to wait before dynamic IA respawns
|
||||||
|
SAR_DESPAWN_TIMEOUT = 120; // How long to wait before despawning dynamic AI
|
||||||
|
SAR_DELETE_TIMEOUT = 300; // How long to wait before deleting dead AI
|
||||||
|
SAR_surv_kill_value = 250; // How much respect players lose if killing friendly AI
|
||||||
|
SAR_band_kill_value = 50; // How much respect players lose if killing hostile AI
|
||||||
|
SAR_RESPECT_HOSTILE_LIMIT = -2500; // Friendly AI will shoot at players with respect below this number
|
||||||
|
SAR_REAMMO_INTERVAL = 30; // How often AI will replenish their ammo count
|
||||||
|
SAR_DETECT_HOSTILE = 200; // How far away AI can detect hostile AI & players
|
||||||
|
SAR_DETECT_INTERVAL = 15; // How often AI can detect AI & players
|
||||||
|
SAR_DETECT_HOSTILE_FROM_VEHICLE = 500; // How far AI can detect hostile AI & players while in a vehicle
|
||||||
|
SAR_DETECT_FROM_VEHICLE_INTERVAL = 5; // How often AI can detect hostile AI & players while in a vehicle
|
||||||
|
|
||||||
|
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%
|
||||||
|
SAR_max_grps_bandits = 2; // Total groups per grid
|
||||||
|
SAR_max_grps_soldiers = 2; // Total groups per grid
|
||||||
|
SAR_max_grps_survivors = 2; // Total groups per grid
|
||||||
|
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
|
||||||
|
|
||||||
|
// 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. -------------------------------- */
|
||||||
|
SAR_HC = false;
|
||||||
|
SAR_AI_friendly_side = RESISTANCE;
|
||||||
|
SAR_AI_unfriendly_side = EAST;
|
||||||
|
SAR_leader_number = 0;
|
||||||
|
SAR_AI_monitor = [];
|
43
SAR_define.hpp
Normal file
43
SAR_define.hpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
516
SAR_functions.sqf
Normal file
516
SAR_functions.sqf
Normal file
@ -0,0 +1,516 @@
|
|||||||
|
/*
|
||||||
|
# Original #
|
||||||
|
Sarge AI System 1.5
|
||||||
|
Created for Arma 2: DayZ Mod
|
||||||
|
Author: Sarge
|
||||||
|
https://github.com/Swiss-Sarge
|
||||||
|
|
||||||
|
# Fork #
|
||||||
|
Sarge AI System 2.0pushBack
|
||||||
|
Modded for Arma 3: Exile Mod
|
||||||
|
Changes: Dango
|
||||||
|
http://www.hod-servers.com
|
||||||
|
|
||||||
|
*/
|
||||||
|
SAR_get_road_pos = {
|
||||||
|
/*
|
||||||
|
Parameters:
|
||||||
|
_areaname = the markername where the position should be choosen
|
||||||
|
*/
|
||||||
|
private ["_targetPosTemp","_newpos","_loop2","_tries2","_roads","_area_name","_centerpos","_centerX","_centerY","_areasize","_rangeX","_rangeY","_areadir","_cosdir","_sindir"];
|
||||||
|
|
||||||
|
_area_name = _this select 0;
|
||||||
|
|
||||||
|
// remember center position of area marker
|
||||||
|
_centerpos = getMarkerPos _area_name;
|
||||||
|
_centerX = abs(_centerpos select 0);
|
||||||
|
_centerY = abs(_centerpos select 1);
|
||||||
|
|
||||||
|
// X/Y range of target area
|
||||||
|
_areasize = getMarkerSize _area_name;
|
||||||
|
_rangeX = _areasize select 0;
|
||||||
|
_rangeY = _areasize select 1;
|
||||||
|
|
||||||
|
// marker orientation (needed as negative value!)
|
||||||
|
_areadir = (markerDir _area_name) * -1;
|
||||||
|
|
||||||
|
// store some trig calculations
|
||||||
|
_cosdir=cos(_areadir);
|
||||||
|
_sindir=sin(_areadir);
|
||||||
|
|
||||||
|
_tries2=0;
|
||||||
|
_loop2 = false;
|
||||||
|
|
||||||
|
while {(!_loop2) && (_tries2 <100)} do {
|
||||||
|
_tries2=_tries2pushBack1;
|
||||||
|
_targetPosTemp = [_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos;
|
||||||
|
_roads = (_targetPosTemp nearRoads 50);
|
||||||
|
if ((count _roads) > 0) then {
|
||||||
|
_targetPosTemp = getpos (_roads select 0);
|
||||||
|
_newpos = _targetPosTemp;
|
||||||
|
_loop2 = TRUE;
|
||||||
|
};
|
||||||
|
sleep 0.05;
|
||||||
|
};
|
||||||
|
_newpos;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_break_circle = {
|
||||||
|
/*
|
||||||
|
Parameters:
|
||||||
|
_group = the group
|
||||||
|
*/
|
||||||
|
private ["_group"];
|
||||||
|
|
||||||
|
_group = _this select 0;
|
||||||
|
_group setBehaviour "AWARE";
|
||||||
|
{
|
||||||
|
_x enableAI "TARGET";
|
||||||
|
_x forceSpeed 1;
|
||||||
|
} foreach units _group;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_move_to_circle_pos = {
|
||||||
|
//Parameters:
|
||||||
|
//_unit = the unit to move
|
||||||
|
//_newpos = the position the unit should move to
|
||||||
|
private ["_unit","_centerpos","_newpos","_viewangle","_defend"];
|
||||||
|
|
||||||
|
_unit = _this select 0;
|
||||||
|
_centerpos = _this select 1;
|
||||||
|
_newpos = _this select 2;
|
||||||
|
_viewangle = _this select 3;
|
||||||
|
_defend = _this select 4;
|
||||||
|
|
||||||
|
_unit forceSpeed 1;
|
||||||
|
|
||||||
|
_unit moveTo _newpos;
|
||||||
|
_unit doMove _newpos;
|
||||||
|
|
||||||
|
waituntil {moveToCompleted _unit};
|
||||||
|
_unit forceSpeed 0;
|
||||||
|
|
||||||
|
//_unit doWatch (_veh modelToWorld [(sin (_foreachindex * _angle))*SAR_sit_radius, (cos (_foreachindex * _angle))*SAR_sit_radius, 0]);
|
||||||
|
//_unit doWatch _veh;
|
||||||
|
|
||||||
|
//diag_log format["Unit: %1 Angle to look at: %2",_unit,_viewangle];
|
||||||
|
|
||||||
|
_unit setDir _viewangle;
|
||||||
|
_unit setpos getPos _unit;
|
||||||
|
|
||||||
|
if(!_defend) then {
|
||||||
|
_unit playActionNow "SitDown";
|
||||||
|
sleep 1;
|
||||||
|
} else{
|
||||||
|
_unit setUnitPos "Middle";
|
||||||
|
sleep 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
_unit disableAI "TARGET";
|
||||||
|
//_unit disableAI "FSM";
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_circle_static = {
|
||||||
|
//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;
|
||||||
|
_radius = _this select 2;
|
||||||
|
|
||||||
|
_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;
|
||||||
|
};
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_isKindOf_weapon = {
|
||||||
|
// own function because the BiS one does only search vehicle config
|
||||||
|
// parameters:
|
||||||
|
//_weapon = the weapon for which we search the parent class
|
||||||
|
//_class = class to search for
|
||||||
|
//return value: true if found, otherwise false
|
||||||
|
|
||||||
|
private ["_class","_weapon","_cfg_entry","_found","_search_class"];
|
||||||
|
|
||||||
|
_weapon = _this select 0;
|
||||||
|
_class = _this select 1;
|
||||||
|
|
||||||
|
_cfg_entry = configFile >> "CfgWeapons" >> _weapon;
|
||||||
|
_search_class = configFile >> "CfgWeapons" >> _class;
|
||||||
|
|
||||||
|
_found = false;
|
||||||
|
while {isClass _cfg_entry} do
|
||||||
|
{
|
||||||
|
if (_cfg_entry == _search_class) exitWith { _found = true; };
|
||||||
|
|
||||||
|
_cfg_entry = inheritsFrom _cfg_entry;
|
||||||
|
};
|
||||||
|
|
||||||
|
_found;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_AI_is_unfriendly_group = {
|
||||||
|
// parameters
|
||||||
|
// _trig_player_list = list of players in the trigger array
|
||||||
|
|
||||||
|
private ["_trig_player_list","_bandits_in_trigger","_player_respect"];
|
||||||
|
|
||||||
|
_trig_player_list = _this select 0;
|
||||||
|
|
||||||
|
_bandits_in_trigger = false;
|
||||||
|
{
|
||||||
|
_player_respect = _x getVariable ["ExileScore",0];
|
||||||
|
|
||||||
|
if(_player_respect < SAR_RESPECT_HOSTILE_LIMIT) then {
|
||||||
|
_bandits_in_trigger = true;
|
||||||
|
};
|
||||||
|
} foreach _trig_player_list;
|
||||||
|
|
||||||
|
_bandits_in_trigger;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_unit_loadout_tools = {
|
||||||
|
// Parameters:
|
||||||
|
// _unittype (leader, soldier, sniper)
|
||||||
|
// _side (mili, surv, band
|
||||||
|
// return value: tools array
|
||||||
|
|
||||||
|
private ["_unittype","_side","_unit_tools_list","_unit_tools","_tool","_probability","_chance"];
|
||||||
|
|
||||||
|
_unittype = _this select 0;
|
||||||
|
_side = _this select 1;
|
||||||
|
|
||||||
|
_unit_tools_list = call compile format["SAR_%2_%1_tools",_unittype,_side];
|
||||||
|
|
||||||
|
_unit_tools = [];
|
||||||
|
{
|
||||||
|
_tool = _x select 0;
|
||||||
|
_probability = _x select 1;
|
||||||
|
_chance = (random 100);
|
||||||
|
if(_chance < _probability) then {
|
||||||
|
_unit_tools set [count _unit_tools, _tool];
|
||||||
|
};
|
||||||
|
} foreach _unit_tools_list;
|
||||||
|
|
||||||
|
_unit_tools;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_unit_loadout_items = {
|
||||||
|
// Parameters:
|
||||||
|
// _unittype (leader, soldier, sniper)
|
||||||
|
// _side (mili, surv, band)
|
||||||
|
// return value: items array
|
||||||
|
|
||||||
|
private ["_unittype","_unit_items_list","_unit_items","_item","_probability","_chance","_side"];
|
||||||
|
|
||||||
|
_unittype = _this select 0;
|
||||||
|
_side = _this select 1;
|
||||||
|
|
||||||
|
_unit_items_list = call compile format["SAR_%2_%1_items",_unittype,_side];
|
||||||
|
|
||||||
|
_unit_items = [];
|
||||||
|
{
|
||||||
|
_item = _x select 0;
|
||||||
|
_probability = _x select 1;
|
||||||
|
_chance = (random 100);
|
||||||
|
if(_chance < _probability) then {
|
||||||
|
_unit_items set [count _unit_items, _item];
|
||||||
|
};
|
||||||
|
} foreach _unit_items_list;
|
||||||
|
|
||||||
|
_unit_items;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_unit_loadout_weapons = {
|
||||||
|
// Parameters:
|
||||||
|
// _unittype (leader, rifleman, sniper)
|
||||||
|
// _side (sold,surv,band)
|
||||||
|
// return value: weapons array
|
||||||
|
|
||||||
|
private ["_unittype","_side","_unit_weapon_list","_unit_pistol_list","_unit_pistol_name","_unit_weapon_name","_unit_weapon_names"];
|
||||||
|
|
||||||
|
_unittype = _this select 0;
|
||||||
|
_side = _this select 1;
|
||||||
|
|
||||||
|
_unit_weapon_list = call compile format["SAR_%2_%1_weapon_list",_unittype,_side];
|
||||||
|
_unit_pistol_list = call compile format["SAR_%2_%1_pistol_list",_unittype,_side];
|
||||||
|
|
||||||
|
_unit_weapon_names = [];
|
||||||
|
_unit_weapon_name = "";
|
||||||
|
_unit_pistol_name = "";
|
||||||
|
|
||||||
|
if(count _unit_weapon_list > 0) then {
|
||||||
|
_unit_weapon_name = _unit_weapon_list select (floor(random (count _unit_weapon_list)));
|
||||||
|
};
|
||||||
|
if(count _unit_pistol_list > 0) then {
|
||||||
|
_unit_pistol_name = _unit_pistol_list select (floor(random (count _unit_pistol_list)));
|
||||||
|
};
|
||||||
|
_unit_weapon_names set [0, _unit_weapon_name];
|
||||||
|
_unit_weapon_names set [1, _unit_pistol_name];
|
||||||
|
|
||||||
|
_unit_weapon_names;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_unit_loadout = {
|
||||||
|
// Parameters:
|
||||||
|
// _unit (Unit to apply the loadout to)
|
||||||
|
// _weapons (array with weapons for the loadout)
|
||||||
|
// _items (array with items for the loadout)
|
||||||
|
// _tools (array with tools for the loadout)
|
||||||
|
|
||||||
|
private ["_unit","_weapons","_weapon","_items","_unit_magazine_name","_item","_tool","_tools","_forEachIndex"];
|
||||||
|
|
||||||
|
_unit = _this select 0;
|
||||||
|
_weapons = _this select 1;
|
||||||
|
_items = _this select 2;
|
||||||
|
_tools = _this select 3;
|
||||||
|
|
||||||
|
removeAllWeapons _unit;
|
||||||
|
removeAllAssignedItems _unit;
|
||||||
|
removeAllItems _unit;
|
||||||
|
removeBackpack _unit;
|
||||||
|
removeGoggles _unit;
|
||||||
|
removeVest _unit;
|
||||||
|
if (_unit isKindOf "O_G_Soldier_lite_F") then {removeHeadgear _unit; sleep 1; _unit addHeadGear "H_Shemag_olive";};
|
||||||
|
|
||||||
|
_unit enableFatigue false;
|
||||||
|
_unit allowDamage true;
|
||||||
|
|
||||||
|
{
|
||||||
|
_weapon = _weapons select _forEachIndex;
|
||||||
|
|
||||||
|
if (_weapon !="") then
|
||||||
|
{
|
||||||
|
_unit_magazine_name = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines") select 0;
|
||||||
|
_unit addMagazine _unit_magazine_name;
|
||||||
|
_unit addWeapon _weapon;
|
||||||
|
};
|
||||||
|
} foreach _weapons;
|
||||||
|
|
||||||
|
{
|
||||||
|
_item = _items select _forEachIndex;
|
||||||
|
_unit addMagazine _item;
|
||||||
|
} foreach _items;
|
||||||
|
|
||||||
|
{
|
||||||
|
_tool = _tools select _forEachIndex;
|
||||||
|
_unit addWeapon _tool;
|
||||||
|
} foreach _tools;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_AI_mon_upd = {
|
||||||
|
// Parameters:
|
||||||
|
// _typearray (possible values = "max_grps", "rnd_grps", "max_p_grp", "grps_band","grps_sold","grps_surv")
|
||||||
|
// _valuearray (must be an array)
|
||||||
|
// _gridname (is the areaname of the grid for this change)
|
||||||
|
|
||||||
|
private ["_typearray","_valuearray","_gridname","_path","_success","_forEachIndex"];
|
||||||
|
|
||||||
|
_typearray = _this select 0;
|
||||||
|
_valuearray =_this select 1;
|
||||||
|
_gridname = _this select 2;
|
||||||
|
|
||||||
|
_path = [SAR_AI_monitor, _gridname] call BIS_fnc_findNestedElement;
|
||||||
|
|
||||||
|
{
|
||||||
|
switch (_x) do
|
||||||
|
{
|
||||||
|
case "max_grps":
|
||||||
|
{
|
||||||
|
_path set [1,1];
|
||||||
|
};
|
||||||
|
case "rnd_grps":
|
||||||
|
{
|
||||||
|
_path set [1,2];
|
||||||
|
};
|
||||||
|
case "max_p_grp":
|
||||||
|
{
|
||||||
|
_path set [1,3];
|
||||||
|
};
|
||||||
|
case "grps_band":
|
||||||
|
{
|
||||||
|
_path set [1,4];
|
||||||
|
};
|
||||||
|
case "grps_sold":
|
||||||
|
{
|
||||||
|
_path set [1,5];
|
||||||
|
};
|
||||||
|
case "grps_surv":
|
||||||
|
{
|
||||||
|
_path set [1,6];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_success = [SAR_AI_monitor, _path, _valuearray select _forEachIndex] call BIS_fnc_setNestedElement;
|
||||||
|
|
||||||
|
} foreach _typearray;
|
||||||
|
|
||||||
|
_success;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_AI_mon_read = {
|
||||||
|
// Parameters:
|
||||||
|
// _typearray (possible values = "max_grps", "rnd_grps", "max_p_grp", "grps_band","grps_sold","grps_surv")
|
||||||
|
// _gridname (is the areaname of the grid for this change)
|
||||||
|
|
||||||
|
private ["_typearray","_gridname","_path","_resultarray"];
|
||||||
|
|
||||||
|
_typearray = _this select 0;
|
||||||
|
_gridname = _this select 1;
|
||||||
|
_resultarray = [];
|
||||||
|
|
||||||
|
_path = [SAR_AI_monitor, _gridname] call BIS_fnc_findNestedElement;
|
||||||
|
|
||||||
|
{
|
||||||
|
switch (_x) do
|
||||||
|
{
|
||||||
|
case "max_grps":
|
||||||
|
{
|
||||||
|
_path set [1,1];
|
||||||
|
};
|
||||||
|
case "rnd_grps":
|
||||||
|
{
|
||||||
|
_path set [1,2];
|
||||||
|
};
|
||||||
|
case "max_p_grp":
|
||||||
|
{
|
||||||
|
_path set [1,3];
|
||||||
|
};
|
||||||
|
case "grps_band":
|
||||||
|
{
|
||||||
|
_path set [1,4];
|
||||||
|
};
|
||||||
|
case "grps_sold":
|
||||||
|
{
|
||||||
|
_path set [1,5];
|
||||||
|
};
|
||||||
|
case "grps_surv":
|
||||||
|
{
|
||||||
|
_path set [1,6];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_resultarray set [count _resultarray,[SAR_AI_monitor, _path] call BIS_fnc_returnNestedElement];
|
||||||
|
} foreach _typearray;
|
||||||
|
|
||||||
|
_resultarray;
|
||||||
|
};
|
||||||
|
|
||||||
|
SAR_DEBUG_mon = {
|
||||||
|
diag_log "--------------------Start of AI monitor values -------------------------";
|
||||||
|
{
|
||||||
|
diag_log format["SAR EXTREME DEBUG: %1",_x];
|
||||||
|
}foreach SAR_AI_monitor;
|
||||||
|
|
||||||
|
diag_log "--------------------End of AI monitor values -------------------------";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
SAR_fnc_returnConfigEntry = {
|
||||||
|
private ["_config", "_entryName","_entry", "_value"];
|
||||||
|
|
||||||
|
_config = _this select 0;
|
||||||
|
_entryName = _this select 1;
|
||||||
|
_entry = _config >> _entryName;
|
||||||
|
|
||||||
|
//If the entry is not found and we are not yet at the config root, explore the class' parent.
|
||||||
|
if (((configName (_config >> _entryName)) == "") && {!((configName _config) in ["CfgVehicles", "CfgWeapons", ""])}) then {
|
||||||
|
[inheritsFrom _config, _entryName] call SAR_fnc_returnConfigEntry;
|
||||||
|
}
|
||||||
|
else { if (isNumber _entry) then { _value = getNumber _entry; } else { if (isText _entry) then { _value = getText _entry; }; }; };
|
||||||
|
//Make sure returning 'nil' works.
|
||||||
|
if (isNil "_value") exitWith {nil};
|
||||||
|
|
||||||
|
_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
// *WARNING* BIS FUNCTION RIPOFF - Taken from fn_fnc_returnVehicleTurrets and shortened a bit
|
||||||
|
SAR_fnc_returnVehicleTurrets = {
|
||||||
|
private ["_entry","_turrets","_turretIndex"];
|
||||||
|
|
||||||
|
_entry = _this select 0;
|
||||||
|
_turrets = [];
|
||||||
|
_turretIndex = 0;
|
||||||
|
|
||||||
|
//Explore all turrets and sub-turrets recursively.
|
||||||
|
for "_i" from 0 to ((count _entry) - 1) do {
|
||||||
|
private ["_subEntry"];
|
||||||
|
_subEntry = _entry select _i;
|
||||||
|
if (isClass _subEntry) then {
|
||||||
|
private ["_hasGunner"];
|
||||||
|
_hasGunner = [_subEntry, "hasGunner"] call SAR_fnc_returnConfigEntry;
|
||||||
|
//Make sure the entry was found.
|
||||||
|
if (!(isNil "_hasGunner")) then {
|
||||||
|
if (_hasGunner == 1) then {
|
||||||
|
_turrets = _turrets pushBack [_turretIndex];
|
||||||
|
//Include sub-turrets, if present.
|
||||||
|
if (isClass (_subEntry >> "Turrets")) then { _turrets = _turrets pushBack [[_subEntry >> "Turrets"] call SAR_fnc_returnVehicleTurrets]; }
|
||||||
|
else { _turrets = _turrets pushBack [[]]; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_turretIndex = _turretIndex + 1;
|
||||||
|
};
|
||||||
|
sleep 0.01;
|
||||||
|
};
|
||||||
|
_turrets;
|
||||||
|
};
|
68
SAR_init_Base_guards.sqf
Normal file
68
SAR_init_Base_guards.sqf
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private["_sizeX","_sizeY","_snipers","_rifleMen","_sizeOfBase","_marker","_markername","_tMark","_flagPoles","_baseLevel","_baseName"];
|
||||||
|
|
||||||
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
|
_flagPoles = nearestObjects [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Exile_Construction_Flag_Static"], 25000];
|
||||||
|
|
||||||
|
diag_log "Sarge AI System: Territory Base Gaurds Are Now Initializing";
|
||||||
|
|
||||||
|
diag_log format["Sarge AI System: Total Territory Locations Query Returned With: %1",(count _flagPoles)];
|
||||||
|
|
||||||
|
{
|
||||||
|
_baseName = _x getVariable ["ExileTerritoryName",""];
|
||||||
|
_sizeOfBase = _x getVariable ["ExileTerritorySize",""];
|
||||||
|
|
||||||
|
_padding = 5;
|
||||||
|
_spawnRadius = _sizeOfBase + _padding;
|
||||||
|
|
||||||
|
switch (_sizeOfBase) do {
|
||||||
|
case default {_rifleMen = 1; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 15: {_rifleMen = 1; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 30: {_rifleMen = 1; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 45: {_rifleMen = 2; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 60: {_rifleMen = 2; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 75: {_rifleMen = 1; _snipers = 1; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 90: {_rifleMen = 1; _snipers = 1; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 105: {_rifleMen = 2; _snipers = 1; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 120: {_rifleMen = 2; _snipers = 1; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 135: {_rifleMen = 2; _snipers = 2; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
case 150: {_rifleMen = 2; _snipers = 2; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||||
|
};
|
||||||
|
sleep 1;
|
||||||
|
|
||||||
|
if (SAR_debug) then {
|
||||||
|
diag_log format ["Sarge AI System: Now Processing Territory %1 at Location %2 with a size of %3.",_baseName,(getPosATL _x),_sizeOfBase];
|
||||||
|
};
|
||||||
|
|
||||||
|
_baseMarker = format["Gaurd_Marker_%1",_baseName];
|
||||||
|
_spawnMark = createMarkerLocal [_baseMarker,(getPosATL _x)];
|
||||||
|
_spawnMark setMarkerShape "ELLIPSE";
|
||||||
|
_spawnMark setMarkerType "Flag";
|
||||||
|
_spawnMark setMarkerBrush "Solid";
|
||||||
|
_spawnMark setMarkerSize [_sizeX,_sizeY];
|
||||||
|
_spawnMark setMarkeralpha 0;
|
||||||
|
|
||||||
|
_behaviors = ["patrol"]; // Do not change this!
|
||||||
|
_behavior = _behaviors call BIS_fnc_selectRandom;
|
||||||
|
|
||||||
|
[_x,_spawnMark,2,_snipers,_rifleMen,_behavior,false,5200] call SAR_AI_GUARDS;
|
||||||
|
|
||||||
|
s_player_guardToggle = _x addaction [format[("<t color=""#FFFFFF"">" + ("Toggle Guards to Kill all non-base owners") +"</t>"),""],"dayz_code\actions\toggle_base_guards.sqf",_x,1,false,true,"",""];
|
||||||
|
|
||||||
|
} foreach _flagPoles;
|
||||||
|
|
||||||
|
diag_log "Sarge AI System: Territory base gaurds have now completed spawning.";
|
76
SAR_interact.sqf
Normal file
76
SAR_interact.sqf
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private ["_targetAI","_actingPlayer","_animState","_started","_finished","_isMedic","_leadername"];
|
||||||
|
|
||||||
|
|
||||||
|
if (isServer || !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
|
||||||
|
call compile format ["KRON_UPS_%1=2",_leadername];
|
||||||
|
|
||||||
|
publicVariable format["KRON_UPS_%1",_leadername];
|
||||||
|
sleep 5;
|
||||||
|
|
||||||
|
[_targetAI,"defend",15] spawn SAR_circle_static;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (vehicle _targetAI == _targetAI) then {
|
||||||
|
doMedicAnim = [_targetAI,"Medic"];
|
||||||
|
publicVariable "doMedicAnim";
|
||||||
|
};
|
||||||
|
|
||||||
|
r_interrupt = false;
|
||||||
|
_animState = animationState _targetAI;
|
||||||
|
r_doLoop = true;
|
||||||
|
_started = false;
|
||||||
|
_finished = false;
|
||||||
|
while {r_doLoop} do {
|
||||||
|
_animState = animationState _targetAI;
|
||||||
|
_isMedic = ["medic",_animState] call fnc_inString;
|
||||||
|
if (_isMedic) then {
|
||||||
|
_started = true;
|
||||||
|
};
|
||||||
|
if (_started && {!_isMedic}) then {
|
||||||
|
r_doLoop = false;
|
||||||
|
_finished = true;
|
||||||
|
};
|
||||||
|
if (r_interrupt) then {
|
||||||
|
r_doLoop = false;
|
||||||
|
};
|
||||||
|
sleep 0.1;
|
||||||
|
};
|
||||||
|
r_doLoop = false;
|
||||||
|
|
||||||
|
if (_finished) then {
|
||||||
|
_actingPlayer setVariable["LastTransfusion",time,true];
|
||||||
|
_actingPlayer setVariable["USEC_lowBlood",false,true];
|
||||||
|
_actingPlayer removeMagazine "ItemBloodbag";
|
||||||
|
["usecTransfuse",[_actingPlayer,_targetAI]] call broadcastRpcCallAll;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
r_interrupt = false;
|
||||||
|
doMedicAnim = [_targetAI,"Stop"];
|
||||||
|
publicVariable "doMedicAnim";
|
||||||
|
};
|
||||||
|
|
||||||
|
// resume UPSMON
|
||||||
|
call compile format ["KRON_UPS_%1=1",_leadername];
|
102
SAR_reammo_refuel_AI.sqf
Normal file
102
SAR_reammo_refuel_AI.sqf
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private ["_ai","_sleeptime","_veh_weapons","_vehicle","_weapons","_reloadmag","_magazintypes","_legit_weapon","_weap_obj"];
|
||||||
|
|
||||||
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
|
_ai = _this select 0;
|
||||||
|
|
||||||
|
_magazintypes =[];
|
||||||
|
_reloadmag = false;
|
||||||
|
_weapons = weapons _ai;
|
||||||
|
|
||||||
|
_sleeptime = SAR_REAMMO_INTERVAL;
|
||||||
|
|
||||||
|
while {alive _ai} do {
|
||||||
|
|
||||||
|
_vehicle = vehicle _ai;
|
||||||
|
if(_vehicle != _ai) then { // NPC in vehicle, we are only reloading vehicle ammo and refueling the vehicle if needed
|
||||||
|
|
||||||
|
// check if low on ammo & fuel
|
||||||
|
_veh_weapons = weapons _vehicle;
|
||||||
|
|
||||||
|
_legit_weapon = false;
|
||||||
|
{
|
||||||
|
if (!([_x,"CarHorn"] call SAR_isKindOf_weapon)) then {
|
||||||
|
_legit_weapon = true;
|
||||||
|
_weap_obj = _x;
|
||||||
|
};
|
||||||
|
} foreach _veh_weapons;
|
||||||
|
|
||||||
|
if(_legit_weapon) then {
|
||||||
|
|
||||||
|
if(_vehicle ammo _weap_obj < 11) then {
|
||||||
|
_vehicle setVehicleAmmo 1;
|
||||||
|
if (SAR_EXTREME_DEBUG) then {diag_log "SAR EXTREME DEBUG: Vehicle got new ammo";};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if(fuel _vehicle < 0.2) then {
|
||||||
|
_vehicle setFuel 1;
|
||||||
|
if (SAR_EXTREME_DEBUG) then {diag_log "SAR_EXTREME_DEBUG: Vehicle refueled";};
|
||||||
|
};
|
||||||
|
|
||||||
|
} else { // NPC not in a vehicle
|
||||||
|
|
||||||
|
// loop through weapons array
|
||||||
|
{
|
||||||
|
// check if weapon rifle exists on AI
|
||||||
|
if([_x,"Rifle"] call SAR_isKindOf_weapon) then {
|
||||||
|
|
||||||
|
_reloadmag = true;
|
||||||
|
_magazintypes = getArray (configFile >> "CfgWeapons" >> _x >> "magazines");
|
||||||
|
|
||||||
|
// loop through valid magazines of weapon and check if there is a magazine for that weapon on the AI
|
||||||
|
{
|
||||||
|
if (_x in magazines _ai) then {
|
||||||
|
_reloadmag = false;
|
||||||
|
};
|
||||||
|
} foreach _magazintypes;
|
||||||
|
|
||||||
|
if (!(someAmmo _ai) || {_reloadmag}) then {
|
||||||
|
_ai removeMagazines (_magazintypes select 0);
|
||||||
|
_ai addMagazine (_magazintypes select 0);
|
||||||
|
if (SAR_EXTREME_DEBUG) then {diag_log format["SAR_EXTREME_DEBUG: Infantry reloaded a magazine (%1) for a rifle (%2).",(_magazintypes select 0),_x];};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if([_x,"Pistol"] call SAR_isKindOf_weapon) then {
|
||||||
|
|
||||||
|
_reloadmag = true;
|
||||||
|
_magazintypes = getArray (configFile >> "CfgWeapons" >> _x >> "magazines");
|
||||||
|
// loop through valid magazines of weapon and check if there is a magazine for that weapon on the AI
|
||||||
|
{
|
||||||
|
if (_x in magazines _ai) then {
|
||||||
|
_reloadmag = false;
|
||||||
|
};
|
||||||
|
} foreach _magazintypes;
|
||||||
|
|
||||||
|
if (!(someAmmo _ai) || {_reloadmag}) then {
|
||||||
|
_ai removeMagazines (_magazintypes select 0);
|
||||||
|
_ai addMagazine (_magazintypes select 0);
|
||||||
|
if (SAR_EXTREME_DEBUG) then {diag_log "SAR_EXTREME_DEBUG: Infantry reloaded a magazine for a pistol.";};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} foreach _weapons;
|
||||||
|
};
|
||||||
|
sleep _sleeptime;
|
||||||
|
};
|
234
SAR_setup_AI_patrol.sqf
Normal file
234
SAR_setup_AI_patrol.sqf
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
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, "NONE"];
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
[_leader] spawn SAR_AI_trace;
|
||||||
|
_leader setIdentity "id_SAR_sold_lead";
|
||||||
|
[_leader] spawn SAR_AI_reammo;
|
||||||
|
|
||||||
|
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||||
|
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||||
|
|
||||||
|
[_leader] joinSilent _group;
|
||||||
|
/*
|
||||||
|
// set skills of the leader
|
||||||
|
{
|
||||||
|
_leader setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||||
|
} foreach _leaderskills;
|
||||||
|
|
||||||
|
// define and store the leadername
|
||||||
|
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];
|
||||||
|
/*
|
||||||
|
// set behaviour & speedmode
|
||||||
|
_leader setspeedmode "FULL";
|
||||||
|
_leader setBehaviour "AWARE";
|
||||||
|
|
||||||
|
// if needed broadcast to the clients **I believe the new UPSMON does this already
|
||||||
|
//_leader Call Compile Format ["%1=_This ; PublicVariable ""%1""",_leadername];
|
||||||
|
*/
|
||||||
|
// 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, "NONE"];
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
[_this] spawn SAR_AI_trace;
|
||||||
|
_this setIdentity "id_SAR";
|
||||||
|
[_this] spawn SAR_AI_reammo;
|
||||||
|
|
||||||
|
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||||
|
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||||
|
|
||||||
|
[_this] joinSilent _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];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 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, "NONE"];
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
[_this] spawn SAR_AI_trace;
|
||||||
|
_this setIdentity "id_SAR_sold_man";
|
||||||
|
[_this] spawn SAR_AI_reammo;
|
||||||
|
|
||||||
|
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||||
|
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||||
|
|
||||||
|
[_this] joinSilent _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];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 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];
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(SAR_AI_STEAL_VEHICLE) then {
|
||||||
|
_ups_para_list pushBack ['NOVEH2'];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (SAR_AI_disable_UPSMON_AI) then {
|
||||||
|
_ups_para_list pushBack ['NOAI'];
|
||||||
|
};
|
||||||
|
|
||||||
|
if(_action == "") then {_action = "PATROL";};
|
||||||
|
|
||||||
|
switch (_action) do {
|
||||||
|
|
||||||
|
case "NOUPSMON":
|
||||||
|
{
|
||||||
|
};
|
||||||
|
case "FORTIFY":
|
||||||
|
{
|
||||||
|
_ups_para_list pushBack ['FORTIFY'];
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
};
|
||||||
|
case "PATROL":
|
||||||
|
{
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
};
|
||||||
|
case "AMBUSH":
|
||||||
|
{
|
||||||
|
_ups_para_list pushBack ['AMBUSH'];
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
};
|
||||||
|
default
|
||||||
|
{
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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: Moved group %1 to Headless Client %2",_group,_hcID];
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if (SAR_DEBUG) then {
|
||||||
|
diag_log format ["Sarge's AI System: Moving group %1 to Headless Client %2 has failed",_group,_hcID];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach allPlayers;
|
||||||
|
};
|
||||||
|
|
||||||
|
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)];
|
||||||
|
};
|
||||||
|
|
||||||
|
_group;
|
267
SAR_setup_AI_patrol_guards.sqf
Normal file
267
SAR_setup_AI_patrol_guards.sqf
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
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 {};
|
||||||
|
|
||||||
|
diag_log "Sarge AI System: Territory gaurds are initializing now.";
|
||||||
|
|
||||||
|
_argc = count _this;
|
||||||
|
_flagPole = _this select 0;
|
||||||
|
_patrol_area_name = _this select 1;
|
||||||
|
_grouptype = _this select 2;
|
||||||
|
_snipers = _this select 3;
|
||||||
|
_riflemen = _this select 4;
|
||||||
|
_action = tolower (_this select 5);
|
||||||
|
_respawn = _this select 6;
|
||||||
|
if (_argc > 7) then {
|
||||||
|
_respawn_time = _this select 7;
|
||||||
|
} else {
|
||||||
|
_respawn_time = SAR_respawn_waittime;
|
||||||
|
};
|
||||||
|
|
||||||
|
_authorizedUID = _flagPole getVariable ["ExileTerritoryBuildRights", []];
|
||||||
|
|
||||||
|
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];
|
||||||
|
_riflemanskills = call compile format ["SAR_soldier_%1_skills",_type];
|
||||||
|
_sniperskills = call compile format ["SAR_sniper_%1_skills",_type];
|
||||||
|
*/
|
||||||
|
_rndpos = [_patrol_area_name] call UPSMON_pos;
|
||||||
|
|
||||||
|
_group = createGroup _side;
|
||||||
|
|
||||||
|
_group setVariable ["SAR_protect",true,true];
|
||||||
|
|
||||||
|
_sizeOfBase = _flagPole getVariable ["ExileTerritorySize",""];
|
||||||
|
|
||||||
|
// create leader of the group
|
||||||
|
_leader = _group createunit [_leaderList call BIS_fnc_selectRandom, [getPosATL _flagPole,1,_sizeOfBase,5,0,10,0] call BIS_fnc_findSafePos, [], 0.5, "NONE"];
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
[_leader] spawn SAR_AI_base_trace;
|
||||||
|
_leader setIdentity "id_SAR_sold_lead";
|
||||||
|
[_leader] spawn SAR_AI_reammo;
|
||||||
|
|
||||||
|
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||||
|
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||||
|
/*
|
||||||
|
// TODO: Convert to Exile friendly action
|
||||||
|
_cond="(side _this == west) && (side _target == resistance) && ('ItemBloodbag' in magazines _this)";
|
||||||
|
[nil,_leader,rADDACTION,"Give me a blood transfusion!", "sarge\SAR_interact.sqf","",1,true,true,"",_cond] call RE;
|
||||||
|
*/
|
||||||
|
[_leader] joinSilent _group;
|
||||||
|
/*
|
||||||
|
// set skills of the leader
|
||||||
|
{
|
||||||
|
_leader setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||||
|
} foreach _leaderskills;
|
||||||
|
|
||||||
|
// define and store the leadername
|
||||||
|
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];
|
||||||
|
|
||||||
|
_leader setVariable ["SAR_FLAG_FRIENDLY", _authorizedUID, true];
|
||||||
|
_leader setVariable ["ATTACK_ALL", false, true];
|
||||||
|
/*
|
||||||
|
// set behaviour & speedmode
|
||||||
|
_leader setspeedmode "FULL";
|
||||||
|
_leader setBehaviour "AWARE";
|
||||||
|
|
||||||
|
// Lets broadcast this to be sure.
|
||||||
|
//_leader Call Compile Format ["%1=_This ; PublicVariable ""%1""",_leadername];
|
||||||
|
*/
|
||||||
|
_sniperlist = call compile format ["SAR_sniper_%1_list",_type];
|
||||||
|
|
||||||
|
// create crew
|
||||||
|
for "_i" from 0 to (_snipers - 1) do
|
||||||
|
{
|
||||||
|
|
||||||
|
_this = _group createunit [_sniperlist call BIS_fnc_selectRandom, [getPosATL _flagPole,1,_sizeOfBase,5,0,10,0] call BIS_fnc_findSafePos, [], 0.5, "NONE"];
|
||||||
|
sleep 0.5;
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
[_this] spawn SAR_AI_base_trace;
|
||||||
|
_this setIdentity "id_SAR";
|
||||||
|
[_this] spawn SAR_AI_reammo;
|
||||||
|
|
||||||
|
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||||
|
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||||
|
|
||||||
|
[_this] joinSilent _group;
|
||||||
|
/*
|
||||||
|
// set skills
|
||||||
|
{
|
||||||
|
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||||
|
} foreach _sniperskills;
|
||||||
|
|
||||||
|
//[nil,_this,rADDACTION,"Give me a blood transfusion!", "sarge\SAR_interact.sqf","",1,true,true,"",_cond] call RE;
|
||||||
|
*/
|
||||||
|
// store AI type on the AI
|
||||||
|
_this setVariable ["SAR_AI_type",_ai_type,false];
|
||||||
|
|
||||||
|
_this setVariable ["SAR_FLAG_FRIENDLY", _authorizedUID, true];
|
||||||
|
_this setVariable ["ATTACK_ALL", false, true];
|
||||||
|
|
||||||
|
//Distinguish AI
|
||||||
|
_this setVariable ["Sarge",1,true];
|
||||||
|
};
|
||||||
|
|
||||||
|
_riflemenlist = call compile format ["SAR_soldier_%1_list",_type];
|
||||||
|
|
||||||
|
for "_i" from 0 to (_riflemen - 1) do
|
||||||
|
{
|
||||||
|
_this = _group createunit [_riflemenlist call BIS_fnc_selectRandom, [getPosATL _flagPole,1,_sizeOfBase,5,0,10,0] call BIS_fnc_findSafePos, [], 0.5, "NONE"];
|
||||||
|
sleep 0.5;
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
[_this] spawn SAR_AI_base_trace;
|
||||||
|
_this setIdentity "id_SAR_sold_man";
|
||||||
|
[_this] spawn SAR_AI_reammo;
|
||||||
|
|
||||||
|
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||||
|
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||||
|
|
||||||
|
[_this] joinSilent _group;
|
||||||
|
/*
|
||||||
|
// set skills
|
||||||
|
{
|
||||||
|
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||||
|
} foreach _riflemanskills;
|
||||||
|
|
||||||
|
//[nil,_this,rADDACTION,"Give me a blood transfusion!", "sarge\SAR_interact.sqf","",1,true,true,"",_cond] call RE;
|
||||||
|
*/
|
||||||
|
// store AI type on the AI
|
||||||
|
_this setVariable ["SAR_AI_type",_ai_type,false];
|
||||||
|
|
||||||
|
//flagpole settings
|
||||||
|
_this setVariable ["SAR_FLAG_FRIENDLY", _authorizedUID, true];
|
||||||
|
_this setVariable ["ATTACK_ALL", false, true];
|
||||||
|
|
||||||
|
//Distinguish AI
|
||||||
|
_this setVariable ["Sarge",1,true];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 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 ['RESPAWN TIME:'];
|
||||||
|
_ups_para_list pushBack [_respawn_time];
|
||||||
|
};
|
||||||
|
|
||||||
|
if(!SAR_AI_STEAL_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 (_action) do {
|
||||||
|
|
||||||
|
case "NOUPSMON":
|
||||||
|
{
|
||||||
|
};
|
||||||
|
case "FORTIFY":
|
||||||
|
{
|
||||||
|
_ups_para_list pushBack ['FORTIFY'];
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
};
|
||||||
|
case "PATROL":
|
||||||
|
{
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
};
|
||||||
|
case "AMBUSH":
|
||||||
|
{
|
||||||
|
_ups_para_list pushBack ['AMBUSH'];
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
};
|
||||||
|
default
|
||||||
|
{
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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: Moved group %1 to Headless Client %2",_group,_hcID];
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if (SAR_DEBUG) then {
|
||||||
|
diag_log format ["Sarge's AI System: Moving group %1 to Headless Client %2 has failed",_group,_hcID];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach allPlayers;
|
||||||
|
};
|
||||||
|
|
||||||
|
if(SAR_DEBUG) then {
|
||||||
|
diag_log format["Sarge's AI System: Territory group (%3) spawned in: %1 with action: %2 on side: %4",_patrol_area_name,_action,_group,(side _group)];
|
||||||
|
};
|
||||||
|
|
||||||
|
_group;
|
233
SAR_setup_AI_patrol_heli.sqf
Normal file
233
SAR_setup_AI_patrol_heli.sqf
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
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] 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, "NONE"];
|
||||||
|
|
||||||
|
[_leader,_leader_weapon_names,_leader_items,_leader_tools] call SAR_unit_loadout;
|
||||||
|
|
||||||
|
[_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;
|
||||||
|
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
_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];
|
||||||
|
/*
|
||||||
|
// 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, "NONE"];
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
_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];
|
||||||
|
|
||||||
|
|
||||||
|
//Gunner 2
|
||||||
|
_man3heli = _groupheli createunit [_riflemenlist call BIS_fnc_selectRandom, [_rndpos select 0, (_rndpos select 1) + 30, 0], [], 0.5, "NONE"];
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
_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];
|
||||||
|
|
||||||
|
// 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_HC) then {
|
||||||
|
{
|
||||||
|
_hcID = getPlayerUID _x;
|
||||||
|
if(_hcID select [0,2] isEqualTo 'HC')then {
|
||||||
|
_SAIS_HC = _groupheli setGroupOwner (owner _x);
|
||||||
|
if (_SAIS_HC) then {
|
||||||
|
if (SAR_DEBUG) then {
|
||||||
|
diag_log format ["Sarge's AI System: Moved group %1 to Headless Client %2",_groupheli,_hcID];
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if (SAR_DEBUG) then {
|
||||||
|
diag_log format ["Sarge's AI System: Moving group %1 to Headless Client %2 has failed",_groupheli,_hcID];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach allPlayers;
|
||||||
|
};
|
||||||
|
|
||||||
|
if(SAR_DEBUG) then {
|
||||||
|
diag_log format["Sarge's AI System: AI Heli patrol (%2) spawned in: %1.",_patrol_area_name,_groupheli];
|
||||||
|
};
|
||||||
|
|
||||||
|
_groupheli;
|
291
SAR_setup_AI_patrol_land.sqf
Normal file
291
SAR_setup_AI_patrol_land.sqf
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
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 {};
|
||||||
|
|
||||||
|
_patrol_area_name = _this select 0;
|
||||||
|
|
||||||
|
_error = false;
|
||||||
|
_argc = count _this;
|
||||||
|
|
||||||
|
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 {
|
||||||
|
_vehicles = _this select 2;
|
||||||
|
} else {
|
||||||
|
diag_log "SAR_AI: 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";
|
||||||
|
_error = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_argc > 4) then {
|
||||||
|
_respawn = _this select 4;
|
||||||
|
} else {
|
||||||
|
_respawn = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_argc > 5) then {
|
||||||
|
_respawn_time = _this select 5;
|
||||||
|
} else {
|
||||||
|
_respawn_time = SAR_respawn_waittime;
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
_error = true;
|
||||||
|
};
|
||||||
|
} foreach _vehicles;
|
||||||
|
|
||||||
|
if(_error) exitWith {diag_log "SAR_AI: 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] call UPSMON_pos;
|
||||||
|
|
||||||
|
// create the group
|
||||||
|
_groupvehicles = createGroup _side;
|
||||||
|
|
||||||
|
// create the vehicle and assign crew
|
||||||
|
{
|
||||||
|
// create the vehicle
|
||||||
|
_veh = createVehicle [_x, [_rndpos select 0, _rndpos select 1, 0], [], 0, "NONE"];
|
||||||
|
_veh setFuel 1;
|
||||||
|
//_veh setVariable ["Sarge",1,true];
|
||||||
|
_veh engineon true;
|
||||||
|
|
||||||
|
_veh addMPEventHandler ["HandleDamage", {_this spawn SAR_AI_VEH_HIT;_this select 2;}];
|
||||||
|
|
||||||
|
[_veh] joinSilent _groupvehicles;
|
||||||
|
|
||||||
|
// read the crew definition
|
||||||
|
_veh_setup = _vehicles_crews select _forEachIndex;
|
||||||
|
|
||||||
|
_leaderNPC = call compile format ["SAR_leader_%1_list",_type];
|
||||||
|
|
||||||
|
// vehicle is defined to carry the group leader
|
||||||
|
if((_veh_setup select 0) == 1) then {
|
||||||
|
|
||||||
|
_leader = _groupvehicles createunit [_leaderNPC call BIS_fnc_selectRandom, [(_rndpos select 0) + 10, _rndpos select 1, 0], [], 0.5, "NONE"];
|
||||||
|
|
||||||
|
_leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
|
||||||
|
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
|
||||||
|
_leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
|
||||||
|
|
||||||
|
[_leader,_leader_weapon_names,_leader_items,_leader_tools] call SAR_unit_loadout;
|
||||||
|
|
||||||
|
[_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 _veh;
|
||||||
|
_leader assignAsDriver _veh;
|
||||||
|
|
||||||
|
[_leader] joinSilent _groupvehicles;
|
||||||
|
/*
|
||||||
|
// 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];
|
||||||
|
/*
|
||||||
|
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];
|
||||||
|
|
||||||
|
// set behaviour & speedmode
|
||||||
|
_leader setspeedmode "FULL";
|
||||||
|
_leader setBehaviour "SAFE";
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
_snipers = _veh_setup select 1;
|
||||||
|
_sniperlist = call compile format ["SAR_sniper_%1_list",_type];
|
||||||
|
|
||||||
|
for "_i" from 0 to (_snipers - 1) do
|
||||||
|
{
|
||||||
|
_this = _groupvehicles createunit [_sniperlist call BIS_fnc_selectRandom, [(_rndpos select 0) - 30, _rndpos select 1, 0], [], 0.5, "FORM"];
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
[_this] spawn SAR_AI_trace_veh;
|
||||||
|
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 addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||||
|
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||||
|
|
||||||
|
[_this] joinSilent _groupvehicles;
|
||||||
|
|
||||||
|
if (isnull (assignedDriver _veh)) then {
|
||||||
|
_this moveInDriver _veh;
|
||||||
|
_this assignAsDriver _veh;
|
||||||
|
} else {
|
||||||
|
//move in vehicle
|
||||||
|
_this moveInCargo _veh;
|
||||||
|
_this assignAsCargo _veh;
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
// 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];
|
||||||
|
};
|
||||||
|
|
||||||
|
_riflemen = _veh_setup select 2;
|
||||||
|
_riflemenlist = call compile format ["SAR_soldier_%1_list",_type];
|
||||||
|
|
||||||
|
for "_i" from 0 to (_riflemen - 1) do
|
||||||
|
{
|
||||||
|
_this = _groupvehicles createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) + 30, _rndpos select 1, 0], [], 0.5, "FORM"];
|
||||||
|
|
||||||
|
_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;
|
||||||
|
|
||||||
|
[_this] spawn SAR_AI_trace_veh;
|
||||||
|
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 addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||||
|
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||||
|
|
||||||
|
[_this] joinSilent _groupvehicles;
|
||||||
|
|
||||||
|
// move in vehicle
|
||||||
|
_this moveInCargo _veh;
|
||||||
|
_this assignAsCargo _veh;
|
||||||
|
/*
|
||||||
|
// 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];
|
||||||
|
};
|
||||||
|
} foreach _vehicles;
|
||||||
|
|
||||||
|
if (SAR_HC) then {
|
||||||
|
{
|
||||||
|
_hcID = getPlayerUID _x;
|
||||||
|
if(_hcID select [0,2] isEqualTo 'HC')then {
|
||||||
|
_SAIS_HC = _groupvehicles setGroupOwner (owner _x);
|
||||||
|
if (_SAIS_HC) then {
|
||||||
|
if (SAR_DEBUG) then {
|
||||||
|
diag_log format ["Sarge's AI System: Moved group %1 to Headless Client %2",_groupvehicles,_hcID];
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if (SAR_DEBUG) then {
|
||||||
|
diag_log format ["Sarge's AI System: Moving group %1 to Headless Client %2 has failed",_groupvehicles,_hcID];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach allPlayers;
|
||||||
|
};
|
||||||
|
|
||||||
|
// initialize upsmon for the group
|
||||||
|
_ups_para_list = [_leader,_patrol_area_name,'ONROAD','NOFOLLOW','SAFE','SPAWNED','DELETE:',SAR_DELETE_TIMEOUT];
|
||||||
|
|
||||||
|
if (_respawn) then {
|
||||||
|
_ups_para_list pushBack ['RESPAWN'];
|
||||||
|
_ups_para_list pushBack ['RESPAWNTIME:'];
|
||||||
|
_ups_para_list pushBack [_respawn_time];
|
||||||
|
};
|
||||||
|
|
||||||
|
if(SAR_AI_disable_UPSMON_AI) then {
|
||||||
|
_ups_para_list pushBack ['NOAI'];
|
||||||
|
};
|
||||||
|
|
||||||
|
_ups_para_list spawn UPSMON;
|
||||||
|
|
||||||
|
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];
|
||||||
|
};
|
||||||
|
|
||||||
|
_groupvehicles;
|
69
SAR_trace_base_entities.sqf
Normal file
69
SAR_trace_base_entities.sqf
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private ["_baseOwner","_attackAll","_friendlyPlayers","_ai","_entity_array"];
|
||||||
|
|
||||||
|
if (isServer || !hasInterface) exitWith {}; // Do not execute on server or any headless client(s)
|
||||||
|
|
||||||
|
_ai = _this select 0;
|
||||||
|
|
||||||
|
_friendlyPlayers = _ai getVariable ["SAR_FLAG_FRIENDLY", []];
|
||||||
|
_attackAll = _ai getVariable ["ATTACK_ALL", true];
|
||||||
|
|
||||||
|
_baseOwner = 0;
|
||||||
|
|
||||||
|
while {alive _ai || !isNull _ai} do {
|
||||||
|
_friendlyPlayers = _ai getVariable ["SAR_FLAG_FRIENDLY", []];
|
||||||
|
_attackAll = _ai getVariable ["ATTACK_ALL", false];
|
||||||
|
_entity_array = (getPosATL _ai) nearEntities [["CAManBase","Air","Car","Motorcycle","Tank"],SAR_DETECT_HOSTILE + 200];
|
||||||
|
|
||||||
|
if (SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log format ["Sarge AI System: Territory patrol gaurds ready. Friendly base UID array is: %1",_friendlyPlayers];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_attackAll) then {
|
||||||
|
{
|
||||||
|
if (isPlayer _x) then {
|
||||||
|
_baseOwner = 0;
|
||||||
|
if (_baseOwner == 0) then {
|
||||||
|
if ((getPlayerUID _x) in _friendlyPlayers) then {
|
||||||
|
_x addrating 50000;
|
||||||
|
_x setVariable ["BaseOwner", 1, true];
|
||||||
|
if (SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log format ["Sarge AI System: Rating has been adjusted for authorized player with UID %1",(getPlayerUID _x)];
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
_x addrating -50000;
|
||||||
|
if (SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log format ["Sarge AI System: Rating has been adjusted for unauthorized player with UID %1",(getPlayerUID _x)];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if (_baseOwner == 1 && rating _x < 50000) then {
|
||||||
|
_x addrating 50000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
_tFriendlyPlayers = _x getVariable ["SAR_FLAG_FRIENDLY", []];
|
||||||
|
_result = [_tFriendlyPlayers, _friendlyPlayers] call BIS_fnc_arrayCompare;
|
||||||
|
if (_result) then {
|
||||||
|
_x addrating 50000;
|
||||||
|
} else {
|
||||||
|
_x addrating -50000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _entity_array;
|
||||||
|
};
|
||||||
|
sleep 5;
|
||||||
|
};
|
49
SAR_trace_entities.sqf
Normal file
49
SAR_trace_entities.sqf
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private ["_ai","_entity_array","_sleeptime","_detectrange"];
|
||||||
|
|
||||||
|
if (isServer || !hasInterface) exitWith {}; // Do not execute on server or any headless client(s)
|
||||||
|
|
||||||
|
_ai = _this select 0;
|
||||||
|
|
||||||
|
_detectrange = SAR_DETECT_HOSTILE;
|
||||||
|
_respectlimit = SAR_RESPECT_HOSTILE_LIMIT;
|
||||||
|
_sleeptime = SAR_DETECT_INTERVAL;
|
||||||
|
|
||||||
|
while {alive _ai} do {
|
||||||
|
_entity_array = (position _ai) nearEntities ["CAManBase",_detectrange];
|
||||||
|
{
|
||||||
|
if(vehicle _ai == _ai) then { // AI is not in a vehicle, so we trace Zeds
|
||||||
|
if (_x isKindof "civilclass") then {
|
||||||
|
if(rating _x > -10000) then {
|
||||||
|
_x addrating -10000;
|
||||||
|
if(SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log "SAR EXTREME DEBUG: Zombie rated down";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
if(isPlayer _x && {vehicle _x == _x}) then { // only do this for players not in vehicles
|
||||||
|
_respect = _x getVariable ["ExileScore",0];
|
||||||
|
If (_respect < _respectlimit && {rating _x > -10000}) then {
|
||||||
|
if(SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log format["SAR EXTREME DEBUG: reducing rating (trace_entities) for player: %1", _x];
|
||||||
|
};
|
||||||
|
_x addrating -10000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _entity_array;
|
||||||
|
sleep _sleeptime;
|
||||||
|
};
|
54
SAR_trace_from_vehicle.sqf
Normal file
54
SAR_trace_from_vehicle.sqf
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
private ["_ai","_entity_array","_humanity","_humanitylimit","_sleeptime","_detectrange","_tracewhat","_player_rating","_clientmachine"];
|
||||||
|
|
||||||
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
|
_ai = _this select 0;
|
||||||
|
_tracewhat = "CAManBase";
|
||||||
|
|
||||||
|
_detectrange = SAR_DETECT_HOSTILE_FROM_VEHICLE;
|
||||||
|
_respectlimit = SAR_RESPECT_HOSTILE_LIMIT;
|
||||||
|
_sleeptime = SAR_DETECT_FROM_VEHICLE_INTERVAL;
|
||||||
|
|
||||||
|
while {alive _ai} do {
|
||||||
|
_entity_array = (position _ai) nearEntities [_tracewhat, _detectrange];
|
||||||
|
{
|
||||||
|
if(isPlayer _x && {vehicle _x == _x}) then { // only do that for players that are not in a vehicle
|
||||||
|
|
||||||
|
_player_rating = rating _x;
|
||||||
|
_respect = _x getVariable ["ExileScore",0];
|
||||||
|
If (_respect < _respectlimit && {_player_rating > -10000}) then {
|
||||||
|
|
||||||
|
if(SAR_EXTREME_DEBUG) then {
|
||||||
|
diag_log format["SAR EXTREME DEBUG: reducing rating (trace_from_vehicle) for player: %1", _x];
|
||||||
|
};
|
||||||
|
|
||||||
|
//define global variable
|
||||||
|
adjustrating = [_x,(0 - (10000+_player_rating))];
|
||||||
|
|
||||||
|
// get the players machine ID
|
||||||
|
_clientmachine = owner _x;
|
||||||
|
|
||||||
|
// transmit the global variable to this client machine
|
||||||
|
_clientmachine publicVariableClient "adjustrating";
|
||||||
|
|
||||||
|
// reveal player to vehicle group
|
||||||
|
_ai reveal [_x,4];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _entity_array;
|
||||||
|
sleep _sleeptime;
|
||||||
|
};
|
38
readme.txt
Normal file
38
readme.txt
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
# 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
|
||||||
|
|
||||||
|
*/
|
||||||
|
2.1.0 Changes
|
||||||
|
[Removed] The experience system for the AI has been removed.
|
||||||
|
[Removed] SHK pos was removed since the latest UPSMON already provides the functionality.
|
||||||
|
[Removed] The vehicle fix has been removed as it is no longer required for sarge ai.
|
||||||
|
[Removed] The group monitor function was removed becuase it was not serving much of a purpose.
|
||||||
|
[Removed] The custom random selection function was removed and replaced with the BIS function.
|
||||||
|
[Removed] AI skills have been removed and will be adjusted according to the mission settings for now.
|
||||||
|
[New] An updated version of the UPSMON feature has replaced the outdated Arma 2 version.
|
||||||
|
[Fix] A fix has been applied to prevent territory guards from spawning inside of objects such as boulders and rocks.
|
||||||
|
[Fix] Updated UPSMON string paramters to use Arma 3 functions rather than the older Arma 2 versions.
|
||||||
|
|
||||||
|
2.0.5 Changes
|
||||||
|
[Fix] Added a catch to ensure variables are established before they are called to prevent log spamming.
|
||||||
|
[Fix] Fixed an issue where static spawns woudl not be loaded if the map did not support dynamic spawns.
|
||||||
|
[Change] Headless client is currently being reviewed and is disabled. This will also ensure the player respect rewads/penalties will work.
|
||||||
|
|
||||||
|
2.0.4 Changes
|
||||||
|
[New] Added a catch for maps that are not supported currently. Dynamic spawns will be disabled but static spawns will not be affected.
|
||||||
|
[Change] Vehicle fix has been disabled as it may no longer be needed.
|
||||||
|
[Bug] Respect rewards and penalties are not currently saving to the database when using the headless client.
|
||||||
|
|
||||||
|
2.0.3 Changes
|
||||||
|
[Fixed] Resolved an issue with variable SAR_Heli_Shield.
|
||||||
|
[Fixed] Resolved an issue with variable SAR_Circle.
|
44
toggle_base_guards.sqf
Normal file
44
toggle_base_guards.sqf
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
private["_authorizedUID","_authorizedPUID","_flagRadius","_attackAllToggle","_tGuard","_isBaseGuard","_flag","_nearestGuards","_friendlyPlayers"];
|
||||||
|
_flag = _this select 0;
|
||||||
|
_authorizedUID = _flag getVariable ["ExileTerritoryBuildRights", []];
|
||||||
|
_authorizedPUID = _authorizedUID select 0;
|
||||||
|
_flagRadius = _flag getVariable ["ExileTerritorySize",""];;
|
||||||
|
_isBaseGuard = false;
|
||||||
|
if (!(isNull _flag)) then {
|
||||||
|
_nearestGuards = (getPosATL _flag) nearEntities [["AllVehicles","CAManBase"], _flagRadius + 100];
|
||||||
|
} else {
|
||||||
|
_nearestGuards = (getPosATL player) nearEntities [["AllVehicles","CAManBase"], _flagRadius + 100];
|
||||||
|
};
|
||||||
|
if (count _nearestGuards > 0) then {
|
||||||
|
{
|
||||||
|
_tGuard = _x;
|
||||||
|
if (!(isPlayer _tGuard)) then {
|
||||||
|
_friendlyPlayers = _tGuard getVariable ["SAR_FLAG_FRIENDLY", []];
|
||||||
|
// If group has array
|
||||||
|
if (count _friendlyPlayers > 0) then {
|
||||||
|
{
|
||||||
|
if (_x in _friendlyPlayers) exitWith {
|
||||||
|
_isBaseGuard = true; // Guard is part of the base owners guards
|
||||||
|
};
|
||||||
|
} foreach _authorizedPUID;
|
||||||
|
// Toggle his attack mode
|
||||||
|
if (_isBaseGuard) then {
|
||||||
|
_attackAllToggle = _tGuard getVariable ["ATTACK_ALL", true];
|
||||||
|
if (_attackAllToggle) then {
|
||||||
|
_tGuard setVariable ["ATTACK_ALL", false, true];
|
||||||
|
cutText ["Guards will only attack those who attack it.\nGive them 15-20 seconds to receive orders.", "PLAIN DOWN"];
|
||||||
|
hintsilent "Guards will only attack those who attack it.\nGive them 15-20 seconds to receive orders.";
|
||||||
|
Breakout "exit";
|
||||||
|
} else {
|
||||||
|
_tGuard setVariable ["ATTACK_ALL", true, true];
|
||||||
|
cutText ["Guards will attack any players or npcs that is not tied to FlagPole.\nGive them 15-20 seconds to receive orders.", "PLAIN DOWN"];
|
||||||
|
hintsilent "Guards will attack any players or npcs that is not tied to FlagPole.\nGive them 15-20 seconds to receive orders.";
|
||||||
|
Breakout "exit";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _nearestGuards;
|
||||||
|
cutText ["No guards were found in the area", "PLAIN DOWN"];
|
||||||
|
hintsilent "No guards were found in the area";
|
||||||
|
} else {cutText ["No guards in the area", "PLAIN DOWN"]; hintsilent "No guards were found in the area";};
|
Loading…
Reference in New Issue
Block a user