Advertisement
Guest User

Untitled

a guest
Jun 7th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.72 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 (including the leader)
  55. 0 bandits
  56. max 4 soldiers
  57. max 3 survivors
  58. this number is randomized
  59.  
  60.  
  61. */
  62. //
  63. // grid definition for the automatic spawn system
  64. //
  65.  
  66. // Kamenka, 0 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"],[[0,0,3],[0,0,100],[0,0,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
  68.  
  69. // Balota, 1 bandit groups, 0 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"],[[1,0,2],[80,0,80],[2,0,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
  71.  
  72. // Cherno, 2 bandit groups, 0 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"],[[2,0,3],[75,0,75],[4,0,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, 2 bandit groups, 0 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"],[[2,0,3],[50,0,50],[4,0,4]],"SAR_area_4_0"] call SAR_AI_mon_upd;
  80.  
  81. // Kamyshovo, 0 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"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_5_0"] call SAR_AI_mon_upd;
  83.  
  84. // Tulga, 0 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"],[[0,0,1],[0,0,80],[0,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, 0 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"],[[0,0,3],[0,0,75],[0,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, 0 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"],[[0,3,1],[0,50,75],[0,2,4]],"SAR_area_5_5"] call SAR_AI_mon_upd;
  98.  
  99. // NWAF, 0 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],[100,50,75],[3,2,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,4],[100,0,75],[4,0,2]],"SAR_area_2_2"] call SAR_AI_mon_upd;
  104.  
  105. // Devils Castle, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  106. _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;
  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, 0 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"],[[0,0,1],[0,0,75],[0,0,2]],"SAR_area_4_5"] call SAR_AI_mon_upd;
  122.  
  123. // test south of lopatino, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
  124. _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;
  125.  
  126.  
  127.  
  128.  
  129. //
  130. // Definition of area markers for static spawns
  131. //
  132.  
  133. // soutcoast, heli patrol area
  134. _this = createMarker ["SAR_patrol_soutcoast", [7997.2837, 2687.6707]];
  135. _this setMarkerShape "RECTANGLE";
  136. _this setMarkeralpha 0;
  137. _this setMarkerType "Flag";
  138. _this setMarkerBrush "Solid";
  139. _this setMarkerSize [6500, 1200];
  140. SAR_marker_helipatrol_southcoast = _this;
  141.  
  142. // eastcoast, heli patrol area
  143. _this = createMarker ["SAR_patrol_eastcoast", [13304.196, 8220.9795]];
  144. _this setMarkerShape "RECTANGLE";
  145. _this setMarkeralpha 0;
  146. _this setMarkerType "Flag";
  147. _this setMarkerBrush "Solid";
  148. _this setMarkerSize [1200, 6000];
  149. SAR_marker_helipatrol_eastcoast = _this;
  150.  
  151. // NWAF, heli patrol area
  152. _this = createMarker ["SAR_patrol_NWAF", [4525.3335, 10292.299]];
  153. _this setMarkerShape "RECTANGLE";
  154. _this setMarkeralpha 0;
  155. _this setMarkerType "Flag";
  156. _this setMarkerBrush "Solid";
  157. _this setMarkerSize [1500, 500];
  158. _this setMarkerDir 59.354115;
  159. SAR_marker_helipatrol_nwaf = _this;
  160.  
  161. // NEAF, heli patrol area
  162. _this = createMarker ["SAR_patrol_NEAF", [12034.16, 12725.376, 0]];
  163. _this setMarkerShape "RECTANGLE";
  164. _this setMarkeralpha 0;
  165. _this setMarkerType "Flag";
  166. _this setMarkerBrush "Solid";
  167. _this setMarkerSize [1000, 600];
  168. SAR_marker_helipatrol_neaf = _this;
  169.  
  170.  
  171. // SAR DEBUG AREA - at NWAF
  172. _this = createMarker ["SAR_marker_DEBUG", [4600.3335, 10240.299]];
  173. _this setMarkerShape "RECTANGLE";
  174. _this setMarkeralpha 1;
  175. _this setMarkerType "Flag";
  176. _this setMarkerBrush "Solid";
  177. _this setMarkerSize [100, 100];
  178. _this setMarkerDir 59.354115;
  179. SAR_marker_DEBUG = _this;
  180.  
  181. // SAR DEBUG AREA - at Skaly
  182. _this = createMarker ["SAR_marker_DEBUG1", [2519.3335, 13140.299]];
  183. _this setMarkerShape "RECTANGLE";
  184. _this setMarkeralpha 1;
  185. _this setMarkerType "Flag";
  186. _this setMarkerBrush "Solid";
  187. _this setMarkerSize [100, 100];
  188. SAR_marker_DEBUG1 = _this;
  189.  
  190. // bandit camp
  191. _this = createMarker ["SAR_area_admin", [11502.267, 11332.707]];
  192. _this setMarkerShape "RECTANGLE";
  193. _this setMarkeralpha 0;
  194. _this setMarkerType "Flag";
  195. _this setMarkerBrush "Solid";
  196. _this setMarkerSize [50, 50];
  197. _this setMarkerDir 120.050;
  198. SAR_marker_castle = _this;
  199.  
  200. // soldier camp
  201. _this = createMarker ["SAR_area_admin", [6888.957, 11436.873, -3.0517578e-005]];
  202. _this setMarkerShape "RECTANGLE";
  203. _this setMarkeralpha 0;
  204. _this setMarkerType "Flag";
  205. _this setMarkerBrush "Solid";
  206. _this setMarkerSize [50, 50];
  207. _this setMarkerDir 120.050;
  208. SAR_marker_castle = _this;
  209.  
  210. // ----------------------------------------------------------------------------------------
  211. // End of area marker definition section
  212. // ----------------------------------------------------------------------------------------
  213.  
  214. diag_log format["SAR_AI: Area & Trigger definition finalized"];
  215. diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
  216.  
  217. //
  218. // Static, predefined heli patrol areas with configurable units
  219. //
  220. // Parameters used:
  221. // Areaname
  222. // 1,2,3 = soldier, survivors, bandits
  223. //
  224. // respawn
  225. // true or false
  226.  
  227. //Heli Patrol NWAF
  228. [SAR_marker_helipatrol_nwaf,1,true] call SAR_AI_heli;
  229.  
  230. //Heli Patrol NEAF
  231. [SAR_marker_helipatrol_neaf,1,true] call SAR_AI_heli;
  232.  
  233. // Heli patrol south coast
  234. [SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli;
  235. [SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli;
  236.  
  237. // heli patrol east coast
  238. [SAR_marker_helipatrol_eastcoast,1,true] call SAR_AI_heli;
  239. [SAR_marker_helipatrol_eastcoast,1,true] call SAR_AI_heli;
  240.  
  241. diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
  242.  
  243. //---------------------------------------------------------------------------------
  244. // Static, predefined infantry patrols in defined areas with configurable units
  245. //---------------------------------------------------------------------------------
  246. // Example: [SAR_marker_DEBUG,1,0,1,"",true] call SAR_AI;
  247. //
  248. // SAR_marker_DEBUG = areaname (must have been defined further up, and MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!
  249. // 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
  250. // 0 = amount of snipers in the group
  251. // 1 = amount of rifleman in the group
  252. // "" = action, possible values: "noupsmon","fortify","ambush","patrol"
  253. // true = respawning group, true or false
  254.  
  255. // Example entries:
  256. // SARGE DEBUG - Debug group
  257. // military, 0 snipers, 1 riflemen, patrol
  258. //[SAR_marker_DEBUG,1,0,1,"fortify",true] call SAR_AI;
  259.  
  260. //[SAR_marker_DEBUG1,1,0,2,"patrol",false] call SAR_AI;
  261. //[SAR_marker_DEBUG1,2,0,2,"patrol",false] call SAR_AI;
  262.  
  263. //---------------------------------------------------------------------------------
  264.  
  265. // add here if needed
  266.  
  267. //bandit camp
  268. [SAR_marker_castle,3,12,15,"fortify",true] call SAR_AI;
  269.  
  270. //soldier camp
  271. [SAR_marker_castle,1,8,12,"fortify",true] call SAR_AI;
  272.  
  273.  
  274.  
  275.  
  276.  
  277. // ---- end of configuration area ----
  278.  
  279. diag_log format["SAR_AI: Static Spawning for infantry and heli patrols finished"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement