Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // =========================================================================================================
- // SAR_AI - DayZ AI library
- // Version: 1.0.0
- // Author: Sarge (sarge@krumeich.ch)
- //
- // Wiki: to come
- // Forum: to come
- //
- // ---------------------------------------------------------------------------------------------------------
- // Required:
- // UPSMon
- // SHK_pos
- //
- // ---------------------------------------------------------------------------------------------------------
- // area, group & spawn cfg file for Chernarus
- // last modified: 5.3.2013
- // ---------------------------------------------------------------------------------------------------------
- /* reconfiguring the properties of the grid (keep in mind the grid has default settings, but these you should overwrite where needed.
- 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 (including the leader)
- 0 bandits
- max 4 soldiers
- max 3 survivors
- this number is randomized
- */
- //
- // grid definition for the automatic spawn system
- //
- // 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,0,3],[0,0,100],[0,0,3]],"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
- _check = [["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
- _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;
- // Prido, 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;
- // Elektro, 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],[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
- _check = [["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
- _check = [["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
- _check = [["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
- _check = [["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
- _check = [["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
- _check = [["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
- _check = [["max_grps","rnd_grps","max_p_grp"],[[4,2,1],[100,50,75],[3,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
- _check = [["max_grps","rnd_grps","max_p_grp"],[[3,0,4],[100,0,75],[4,0,2]],"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
- _check = [["max_grps","rnd_grps","max_p_grp"],[[0,3,0],[0,100,0],[0,4,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
- _check = [["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
- _check = [["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
- _check = [["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
- _check = [["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
- _check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,75],[0,0,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
- _check = [["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;
- //
- // Definition of area markers for static spawns
- //
- // soutcoast, heli patrol area
- _this = createMarker ["SAR_patrol_soutcoast", [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_patrol_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_patrol_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_patrol_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;
- // SAR DEBUG AREA - at NWAF
- _this = createMarker ["SAR_marker_DEBUG", [4600.3335, 10240.299]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 1;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [100, 100];
- _this setMarkerDir 59.354115;
- SAR_marker_DEBUG = _this;
- // SAR DEBUG AREA - at Skaly
- _this = createMarker ["SAR_marker_DEBUG1", [2519.3335, 13140.299]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 1;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [100, 100];
- SAR_marker_DEBUG1 = _this;
- // bandit camp
- _this = createMarker ["SAR_area_admin", [11502.267, 11332.707]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [50, 50];
- _this setMarkerDir 120.050;
- SAR_marker_castle = _this;
- // soldier camp
- _this = createMarker ["SAR_area_admin", [6888.957, 11436.873, -3.0517578e-005]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [50, 50];
- _this setMarkerDir 120.050;
- SAR_marker_castle = _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
- //
- // respawn
- // true or false
- //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;
- diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
- //---------------------------------------------------------------------------------
- // Static, predefined infantry patrols in defined areas with configurable units
- //---------------------------------------------------------------------------------
- // Example: [SAR_marker_DEBUG,1,0,1,"",true] call SAR_AI;
- //
- // SAR_marker_DEBUG = areaname (must have been defined further up, and MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!
- // 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
- // 0 = amount of snipers in the group
- // 1 = amount of rifleman in the group
- // "" = action, possible values: "noupsmon","fortify","ambush","patrol"
- // true = respawning group, true or false
- // Example entries:
- // SARGE DEBUG - Debug group
- // military, 0 snipers, 1 riflemen, patrol
- //[SAR_marker_DEBUG,1,0,1,"fortify",true] call SAR_AI;
- //[SAR_marker_DEBUG1,1,0,2,"patrol",false] call SAR_AI;
- //[SAR_marker_DEBUG1,2,0,2,"patrol",false] call SAR_AI;
- //---------------------------------------------------------------------------------
- // add here if needed
- //bandit camp
- [SAR_marker_castle,3,12,15,"fortify",true] call SAR_AI;
- //soldier camp
- [SAR_marker_castle,1,8,12,"fortify",true] call SAR_AI;
- // ---- end of configuration area ----
- diag_log format["SAR_AI: Static Spawning for infantry and heli patrols finished"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement