Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f// =========================================================================================================
- // SAR_AI - DayZ AI library
- // Version: 1.0.0
- // Author: Sarge ([email protected])
- //
- // Wiki: to come
- // Forum: to come
- //
- // ---------------------------------------------------------------------------------------------------------
- // Required:
- // UPSMon
- // SHK_pos
- //
- // ---------------------------------------------------------------------------------------------------------
- // area, group & spawn cfg file for Panthera
- // 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 (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
- // --------------------------------------------------
- // add entries here ...
- // ---------------------------------------------------------------
- // Definition of area markers for static spawns
- // ---------------------------------------------------------------
- // add if needed, see examples in the chernarus file
- diag_log format["SAR_AI: Static spawning area definition started"];
- // SECTION 1
- //SW Island Static Spawns
- _this = createMarker ["SAR_marker_grocery1", [507.00, 365.04]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [50, 50];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT1 = _this;
- _this = createMarker ["SAR_marker_grocery2", [498.84, 446.64]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [50, 50];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT2 = _this;
- _this = createMarker ["SAR_marker_grocery3", [444.27, 450.59]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [50, 50];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT3 = _this;
- _this = createMarker ["SAR_marker_grocery4", [414.28, 451.79]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [50, 50];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT4 = _this;
- _this = createMarker ["SAR_marker_grocery5", [373.32, 408.74]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [50, 50];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT5 = _this;
- _this = createMarker ["SAR_marker_grocery6", [386.39, 337.08]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [15, 15];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT6 = _this;
- _this = createMarker ["SAR_marker_grocery7", [424.26, ,302.15]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [15, 15];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT7 = _this;
- _this = createMarker ["SAR_marker_grocery8", [493.04, 295.19]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [15, 15];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT8 = _this;
- _this = createMarker ["SAR_marker_grocery9", [528.40, 305.83]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [15, 15];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUT9 = _this;
- _this = createMarker ["SAR_marker_house1", [954.47, 9645.48]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [15, 15];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUG1 = _this;
- _this = createMarker ["SAR_marker_house2", [971.94, 9670.06]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [5, 5];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUG2 = _this;
- _this = createMarker ["SAR_marker_house3", [921.91, 9627.09]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [5, 5];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUG3 = _this;
- _this = createMarker ["SAR_marker_house4", [1018.85, 9697.18]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [5, 5];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUG4 = _this;
- _this = createMarker ["SAR_marker_house5", [1038.79, 9608.49]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [5, 5];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUG5 = _this;
- _this = createMarker ["SAR_marker_house6", [967.076, 9608.11]];
- _this setMarkerShape "RECTANGLE";
- _this setMarkeralpha 0;
- _this setMarkerType "Flag";
- _this setMarkerBrush "Solid";
- _this setMarkerSize [5, 5];
- _this setMarkerDir 120.050;
- SAR_marker_DEBUG6 = _this;
- diag_log format["SAR_AI: Static spawning area definition finished"];
- // ----------------------------------------------------------------------------------------
- // 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;
- //---------------------------------------------------------------------------------
- diag_log format["SAR_AI: Static Spawning for infantry patrols started"];
- // add here if needed
- [SAR_marker_DEBUT1,3,0,5,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUT2,3,0,6,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUT3,3,0,5,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUT4,3,1,4,"fortify",true] call SAR_AI;
- [SAR_marker_DEBUT5,3,0,6,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUT6,3,0,4,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUT7,3,0,5,"fortify",true] call SAR_AI;
- [SAR_marker_DEBUT8,3,1,4,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUT9,3,0,6,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUG1,3,0,5,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUG2,3,0,6,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUG3,3,0,5,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUG4,3,1,4,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUG5,3,0,6,"fortify",true] call SAR_AI;
- [SAR_marker_DEBUG6,3,0,4,"fortify",false] call SAR_AI;
- [SAR_marker_DEBUG7,3,0,5,"fortify",true] call SAR_AI;
- // ---- end of configuration area ----
- 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
- //
- diag_log format["SAR_AI: Static Spawning for vehicle patrols finished"];
- // ---- end of configuration area ----
Advertisement
Add Comment
Please, Sign In to add comment