Advertisement
Guest User

Untitled

a guest
Mar 12th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.40 KB | None | 0 0
  1. // =========================================================================================================
  2. // SAR_AI - DayZ AI library
  3. // Version: 1.0.0
  4. // Author: Sarge (sarge@krumeich.ch)
  5. //
  6. // Wiki: to come
  7. // Forum: to come
  8. //
  9. // ---------------------------------------------------------------------------------------------------------
  10. // Required:
  11. // UPSMon
  12. // SHK_pos
  13. //
  14. // ---------------------------------------------------------------------------------------------------------
  15. // area, group & spawn cfg file for Chernarus
  16. // last modified: 5.3.2013
  17. // ---------------------------------------------------------------------------------------------------------
  18.  
  19. /* reconfiguring the properties of the grid (keep in mind the grid has default settings, but these you should overwrite where needed.
  20.  
  21. IMPORTANT: The grid squares are named like : SAR_area_0_0
  22.  
  23. where the first 0 is the x counter, and the second 0 the y counter.
  24.  
  25. So to adress the bottom left square in the grid, you use SAR_area_0_0.
  26. The square above that one would be: SAR_area_0_1
  27. the square one to the right of the bottom left square is SAR_area_1_0
  28.  
  29. You want to change the number arrays in the below lines:
  30.  
  31. The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
  32.  
  33. Lets take an example for Chernarus
  34.  
  35. // Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  36. _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;
  37.  
  38. [[0,1,2],[0,75,100],[0,4,3]]
  39.  
  40. the first set of numbers : 0,1,2
  41. stands for
  42. 0 bandit groups
  43. 1 soldier group
  44. 2 surivors groups
  45. thats the max that can spawn in this grid
  46.  
  47. the second set of numbers : 0,75,100
  48. that means:
  49. 0% probability to spawn bandit groups
  50. 75% for soldiers
  51. 100% for survivors
  52.  
  53. the last set of numbers : 0,4,3
  54. thats the maximum number of ppl in the group (plus 1 leader)
  55. 0 bandits
  56. max 4 (+1 leader) soldiers
  57. max 3 (+1 leader) survivors
  58. this number is randomized
  59.  
  60.  
  61. */
  62. //
  63. // grid definition for the automatic spawn system
  64. //
  65.  
  66. // Kamenka, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  67. _check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[0,75,100],[4,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
  68.  
  69. // Balota, 4 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  70. _check = [["max_grps","rnd_grps","max_p_grp"],[[4,1,2],[80,0,80],[4,3,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
  71.  
  72. // Cherno, 3 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  73. _check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,3],[75,0,75],[4,3,4]],"SAR_area_2_0"] call SAR_AI_mon_upd;
  74.  
  75. // Prido, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  76. _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;
  77.  
  78. // Elektro, 4 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  79. _check = [["max_grps","rnd_grps","max_p_grp"],[[4,1,3],[50,0,50],[4,3,4]],"SAR_area_4_0"] call SAR_AI_mon_upd;
  80.  
  81. // Kamyshovo, 2 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  82. _check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,1],[0,0,80],[4,0,3]],"SAR_area_5_0"] call SAR_AI_mon_upd;
  83.  
  84. // Tulga, 1 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  85. _check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[0,0,80],[4,0,3]],"SAR_area_5_1"] call SAR_AI_mon_upd;
  86.  
  87. // Solni, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  88. _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;
  89.  
  90. // Berezino, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  91. _check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[0,0,75],[4,0,3]],"SAR_area_5_3"] call SAR_AI_mon_upd;
  92.  
  93. // Khelm, 1 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  94. _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;
  95.  
  96. // NEAF, 2 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  97. _check = [["max_grps","rnd_grps","max_p_grp"],[[2,3,1],[0,50,75],[4,4,4]],"SAR_area_5_5"] call SAR_AI_mon_upd;
  98.  
  99. // NWAF, 4 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  100. _check = [["max_grps","rnd_grps","max_p_grp"],[[4,2,1],[0,50,75],[4,4,4]],"SAR_area_1_4"] call SAR_AI_mon_upd;
  101.  
  102. // Stary, 3 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  103. _check = [["max_grps","rnd_grps","max_p_grp"],[[3,0,3],[50,0,50],[4,0,3]],"SAR_area_2_2"] call SAR_AI_mon_upd;
  104.  
  105. // Devils Castle, 4 bandit groups, 2 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  106. _check = [["max_grps","rnd_grps","max_p_grp"],[[4,2,2],[75,0,0],[4,4,4]],"SAR_area_2_4"] call SAR_AI_mon_upd;
  107.  
  108. // Skalka, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  109. _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;
  110.  
  111. // Petrovka1, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  112. _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;
  113.  
  114. // Petrovka2, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  115. _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;
  116.  
  117. // Pobeda, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  118. _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;
  119.  
  120. // Krasno, 2 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  121. _check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,1],[0,75,75],[3,4,2]],"SAR_area_4_5"] call SAR_AI_mon_upd;
  122.  
  123. //
  124. // Definition of area markers for static spawns
  125. //
  126.  
  127. // soutcoast, heli patrol area
  128. _this = createMarker ["SAR_patrol_soutcoast", [7997.2837, 2687.6707]];
  129. _this setMarkerShape "RECTANGLE";
  130. _this setMarkeralpha 0;
  131. _this setMarkerType "Flag";
  132. _this setMarkerBrush "Solid";
  133. _this setMarkerSize [6500, 1200];
  134. SAR_marker_helipatrol_southcoast = _this;
  135.  
  136. // eastcoast, heli patrol area
  137. _this = createMarker ["SAR_patrol_eastcoast", [13304.196, 8220.9795]];
  138. _this setMarkerShape "RECTANGLE";
  139. _this setMarkeralpha 0;
  140. _this setMarkerType "Flag";
  141. _this setMarkerBrush "Solid";
  142. _this setMarkerSize [1200, 6000];
  143. SAR_marker_helipatrol_eastcoast = _this;
  144.  
  145. // NWAF, heli patrol area
  146. _this = createMarker ["SAR_patrol_NWAF", [4525.3335, 10292.299]];
  147. _this setMarkerShape "RECTANGLE";
  148. _this setMarkeralpha 0;
  149. _this setMarkerType "Flag";
  150. _this setMarkerBrush "Solid";
  151. _this setMarkerSize [1500, 500];
  152. _this setMarkerDir 59.354115;
  153. SAR_marker_helipatrol_nwaf = _this;
  154.  
  155. // NEAF, heli patrol area
  156. _this = createMarker ["SAR_patrol_NEAF", [12034.16, 12725.376]];
  157. _this setMarkerShape "RECTANGLE";
  158. _this setMarkeralpha 0;
  159. _this setMarkerType "Flag";
  160. _this setMarkerBrush "Solid";
  161. _this setMarkerSize [1000, 600];
  162. _this setMarkerDir 59.354115;
  163. SAR_marker_helipatrol_neaf = _this;
  164.  
  165. // Devils, heli patrol area
  166. _this = createMarker ["SAR_patrol_DEVIL", [6891.9189, 11438.73]];
  167. _this setMarkerShape "RECTANGLE";
  168. _this setMarkeralpha 0;
  169. _this setMarkerType "Flag";
  170. _this setMarkerBrush "Solid";
  171. _this setMarkerSize [800, 800];
  172. _this setMarkerDir 59.354115;
  173. SAR_marker_helipatrol_devil = _this;
  174.  
  175.  
  176. // SAR DEBUG AREA - at DEVIL
  177. _this = createMarker ["SAR_area_DEVILN", [6891.9189, 11438.73]];
  178. _this setMarkerShape "RECTANGLE";
  179. _this setMarkeralpha 0;
  180. _this setMarkerType "Flag";
  181. _this setMarkerBrush "Solid";
  182. _this setMarkerSize [500, 500];
  183. _this setMarkerDir 59.354115;
  184. SAR_area_DEVILI= _this;
  185.  
  186. // ----------------------------------------------------------------------------------------
  187. // End of area marker definition section
  188. // ----------------------------------------------------------------------------------------
  189.  
  190. diag_log format["SAR_AI: Area & Trigger definition finalized"];
  191. diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
  192.  
  193. //
  194. // Static, predefined heli patrol areas with configurable units
  195. //
  196. // Parameters used:
  197. // Areaname
  198. // 1,2,3 = soldier, survivors, bandits
  199. //
  200.  
  201. //Heli Patrol NWAF
  202. [SAR_marker_helipatrol_nwaf,1] call SAR_AI_heli;
  203.  
  204. //Heli Patrol NEAF
  205. [SAR_marker_helipatrol_neaf,1] call SAR_AI_heli;
  206.  
  207. // Heli patrol south coast
  208. [SAR_marker_helipatrol_southcoast,1] call SAR_AI_heli;
  209. [SAR_marker_helipatrol_southcoast,1] call SAR_AI_heli;
  210.  
  211. // heli patrol east coast
  212. [SAR_marker_helipatrol_eastcoast,1] call SAR_AI_heli;
  213. [SAR_marker_helipatrol_eastcoast,1] call SAR_AI_heli;
  214.  
  215. // heli patrol DEVIL
  216. [SAR_marker_helipatrol_devil,3] call SAR_AI_heli;
  217. [SAR_marker_helipatrol_devil,3] call SAR_AI_heli;
  218.  
  219. diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
  220.  
  221. //---------------------------------------------------------------------------------
  222. // Static, predefined infantry patrols in defined areas with configurable units
  223. //---------------------------------------------------------------------------------
  224. // Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
  225. //
  226. // SAR_area_DEBUG = areaname (must have been defined further up)
  227. // 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
  228. // 0 = amount of snipers in the group
  229. // 1 = amount of rifleman in the group
  230. //
  231. //
  232.  
  233. // Example entries:
  234. // SARGE DEBUG - Debug group
  235. // military, 0 snipers, 1 riflemen, patrol
  236. //[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
  237.  
  238. // military, 2 snipers, 4 riflemen, patrol
  239. //[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
  240.  
  241. // bandits, 1 snipers, 3 riflemen, patrolling the DEVIL
  242. [SAR_area_DEVILI,3,1,3,""] call SAR_AI;
  243.  
  244. // bandits, 5 snipers, 2 riflemen, patrolling the DEVIL
  245. [SAR_area_DEVILI,3,5,2,""] call SAR_AI;
  246.  
  247. // bandits, 1 snipers, 3 riflemen, patrolling the DEVIL
  248. [SAR_area_DEVILI,3,1,3,""] call SAR_AI;
  249.  
  250. // bandits, 2 snipers, 5 riflemen, patrolling the DEVIL
  251. [SAR_area_DEVILI,3,2,5,""] call SAR_AI;
  252.  
  253. // bandits, 1 snipers, 3 riflemen, patrolling the DEVIL
  254. [SAR_area_DEVILI,3,1,3,""] call SAR_AI;
  255.  
  256. // bandits, 5 snipers, 2 riflemen, patrolling the DEVIL
  257. [SAR_area_DEVILI,3,5,2,""] call SAR_AI;
  258.  
  259. // bandits, 1 snipers, 3 riflemen, patrolling the DEVIL
  260. [SAR_area_DEVILI,3,1,3,""] call SAR_AI;
  261.  
  262. // bandits, 2 snipers, 5 riflemen, patrolling the DEVIL
  263. [SAR_area_DEVILI,3,2,5,""] call SAR_AI;
  264. //---------------------------------------------------------------------------------
  265.  
  266. // add here if needed
  267.  
  268.  
  269.  
  270.  
  271. // ---- end of configuration area ----
  272.  
  273. diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement