Jump to content
MassAsster

grid for ai (sarge)

Recommended Posts

I have setup a grid for Napf and have dynamic and static spawns working, only problem I have so far is the following error in my RPT.

 

 

17:10:58 Error in expression <ectRandom, [(_rndpos select 0), _rndpos select 1, 0], [], 0.5, "NONE"];
 
_sniper>
17:10:58   Error position: <select 1, 0], [], 0.5, "NONE"];
 
_sniper>
17:10:58   Error Zero divisor
17:10:58 File mpmissions\__cur_mp.Napf\addons\SARGE\SAR_setup_AI_patrol.sqf, line 154
17:10:58 Error in expression <ectRandom, [(_rndpos select 0), _rndpos select 1, 0], [], 0.5, "NONE"];
 
_sniper>
17:10:58   Error position: <select 1, 0], [], 0.5, "NONE"];
 
_sniper>
17:10:58   Error Zero divisor
 
______________________________________________
 
I have checked the file it refers to but I am not sure exactly what the problem is.
 
even with this the Ai do work just fine far as i can tell

Share this post


Link to post
Share on other sites

so far so good without a grid in place - they do spawn - and the odd thing is they use less FPS to do what ever it is they do...  soo it's kind of a win/win NOT having the grid..

 

Have you created a config groups for napf? would think you would have to in order to get static spawns to work such as heli patrols etc.

Share this post


Link to post
Share on other sites

Have you created a config groups for napf? would think you would have to in order to get static spawns to work such as heli patrols etc.

 

I don't use/like Sarges Helipatrols - I get custom setups out of WAI mission system and give them spawn location and patrol radius. I like the control I have that way. All I wanted Sarge for was a few random spawned bandit patrols, and it's doing very well with that even not having the grid, dare I say even performing better.

Share this post


Link to post
Share on other sites

its quite simple really, just switch on debug (in SAR_AI_Config.sqf) and be first player on the server, then you can see the grid.

 

make a new file called SAR_cfg_grid_napf.sqf (just copy whats in one of the other ones) and change values like this (or however you like it):

// x coordinate of the first, bottom left grid center point
_startx=2000;


// y coordinate of the first, bottom left grid center point
_starty=2000;

// gridsize x (how many single squares in the grid) for the x-axis
_gridsize_x=9;

// 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;

next make a file called SAR_cfg_grps_napf.sqf and put this in it:

http://pastebin.com/EUu5WMqD

 

next is the important part for it to load ... in SAR_AI_init.sqf find this:

    switch (_worldname) do {

underneath both instances of this add in, so it will look like this:

    switch (_worldname) do {
        case "napf":
        {
            #include "map_config\SAR_cfg_grid_napf.sqf"
        };

and this:

switch (_worldname) do {
    case "napf":
    {
        #include "map_config\SAR_cfg_grps_napf.sqf"
    };

 and your done ... you now have worldsetup for napf and i even commented on what towns are near the gridareas in SAR_cfg_grps_napf.sqf and added 6 heli/patrol areas with ai ... however i did not add any ai via the grids so if you want this, you will need to change the amounts

Share this post


Link to post
Share on other sites

its quite simple really, just switch on debug (in SAR_AI_Config.sqf) and be first player on the server, then you can see the grid.

 

make a new file called SAR_cfg_grid_napf.sqf (just copy whats in one of the other ones) and change values like this (or however you like it):

// x coordinate of the first, bottom left grid center point
_startx=2000;


// y coordinate of the first, bottom left grid center point
_starty=2000;

// gridsize x (how many single squares in the grid) for the x-axis
_gridsize_x=9;

// 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;

next make a file called SAR_cfg_grps_napf.sqf and put this in it:

http://pastebin.com/EUu5WMqD

 

next is the important part for it to load ... in SAR_AI_init.sqf find this:

    switch (_worldname) do {

underneath both instances of this add in, so it will look like this:

    switch (_worldname) do {
        case "napf":
        {
            #include "map_config\SAR_cfg_grid_napf.sqf"
        };

and this:

switch (_worldname) do {
    case "napf":
    {
        #include "map_config\SAR_cfg_grps_napf.sqf"
    };

 and your done ... you now have worldsetup for napf and i even commented on what towns are near the gridareas in SAR_cfg_grps_napf.sqf and added 6 heli/patrol areas with ai ... however i did not add any ai via the grids so if you want this, you will need to change the amounts

 

 

Perfect.

Share this post


Link to post
Share on other sites

Hi guys 

 

so im trying to install sarges ai on a vilayer server on napf ive redone the install several times and am almost positive im installing correctly(emphasis on almost most likely ive missed something silly lol) but it does not seem to be activating.Any help would be appreciated below is how ive installed it below ive tried to provide as much code ss and finally a zip file of my mission 

 

90815c62cd0301395561eb0134590825.png

 

0c978462af62c62678535cdc350f6bc9.png

 

96c00a0a68c6ebe0e595da9db2dcd990.png

 

58efb7e819c8d1a1dfc5155a543f689c.png

// x coordinate of the first, bottom left grid center point
_startx=2000;


// y coordinate of the first, bottom left grid center point
_starty=2000;

// gridsize x (how many single squares in the grid) for the x-axis
_gridsize_x=9;

// 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;
// =========================================================================================================
// SAR_AI - DayZ AI library
// Version: 1.5.0
// Author: Sarge ([email protected])
//
//        Wiki: to come
//        Forum: to come
//        
// ---------------------------------------------------------------------------------------------------------
// Required:
// UPSMon
// SHK_pos
//
// ---------------------------------------------------------------------------------------------------------
// area, group & spawn cfg file for Chernarus
// last modified: 28.5.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

if (SAR_dynamic_spawning) then {
//outcommented sample below
// Froburg, 2 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability [ba/75%,so/50%,su/50%] - maximum group members [ba/4,so/3,su/3]
//[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20]],"SAR_area_8_1"] call SAR_AI_mon_upd;
    
// Mostly water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_0"] call SAR_AI_mon_upd;

// Mostly water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_0"] call SAR_AI_mon_upd;

// South of airbase, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_0"] call SAR_AI_mon_upd;

// South of Hungerswand, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_0"] call SAR_AI_mon_upd;

// Half water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_0"] call SAR_AI_mon_upd;

// Mostly water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"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
[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_0"] call SAR_AI_mon_upd;
    
// Mostly water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_0"] call SAR_AI_mon_upd;
    
// South airstip (close to water), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_0"] call SAR_AI_mon_upd;

// Mostly water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_1"] call SAR_AI_mon_upd;

// Airbase west west, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_1"] call SAR_AI_mon_upd;

// Airbase west east, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_1"] call SAR_AI_mon_upd;

// South of Eggwil, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_1"] call SAR_AI_mon_upd;

// Hungerschwand, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_1"] call SAR_AI_mon_upd;

// Schrattendamm, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_5_1"] call SAR_AI_mon_upd;
    
// Rothorn/just above Brienz, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_1"] call SAR_AI_mon_upd;
    
// west of Froburg, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_1"] call SAR_AI_mon_upd;
    
// Froburg, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_1"] call SAR_AI_mon_upd;

// Mostly water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_2"] call SAR_AI_mon_upd;

// Homborg, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_2"] call SAR_AI_mon_upd;

// Buckten, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_2"] call SAR_AI_mon_upd;

// Eggwill, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_2"] call SAR_AI_mon_upd;

// Schangen, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_2"] call SAR_AI_mon_upd;

// Schrattenfluh, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_5_2"] call SAR_AI_mon_upd;
    
// Sorenberg, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_2"] call SAR_AI_mon_upd;
    
// Rorenwald, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_2"] call SAR_AI_mon_upd;
    
// Giswil, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_2"] call SAR_AI_mon_upd;

// Worb half water, 0 bandit groups, 1 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_3"] call SAR_AI_mon_upd;

// Munsingen, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_3"] call SAR_AI_mon_upd;

// Goms, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_3"] call SAR_AI_mon_upd;

// Rämiabode, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_3"] call SAR_AI_mon_upd;

// Rämiabode east, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_3"] call SAR_AI_mon_upd;

// Sissach, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_5_3"] call SAR_AI_mon_upd;
    
// just above Farnen, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_3"] call SAR_AI_mon_upd;
    
// Above Rorenwald, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_3"] call SAR_AI_mon_upd;
    
// East of above, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_3"] call SAR_AI_mon_upd;

// Ittingen (some water), 0 bandit groups, 1 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_4"] call SAR_AI_mon_upd;

// Hasle, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_4"] call SAR_AI_mon_upd;

// Muenchenstien, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_4"] call SAR_AI_mon_upd;

// Chatzbach, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_4"] call SAR_AI_mon_upd;

// Bruderholz, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_4"] call SAR_AI_mon_upd;

// Liestal (Arxhof), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_5_4"] call SAR_AI_mon_upd;
    
// Liestal, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_4"] call SAR_AI_mon_upd;
    
// Schimbrig, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_4"] call SAR_AI_mon_upd;
    
// Hindelbank, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_4"] call SAR_AI_mon_upd;

// Huttwill (half water), 0 bandit groups, 1 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_5"] call SAR_AI_mon_upd;

// Oberdorf, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_5"] call SAR_AI_mon_upd;

// Hof Horn, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_5"] call SAR_AI_mon_upd;

// North of Brudenholz, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_5"] call SAR_AI_mon_upd;

// Romoos west, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_5"] call SAR_AI_mon_upd;

// Romoos east, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_5_5"] call SAR_AI_mon_upd;
    
// South of Emmen, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_5"] call SAR_AI_mon_upd;
    
// South of Horw, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_5"] call SAR_AI_mon_upd;
    
// East of above, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_5"] call SAR_AI_mon_upd;

// Mostly water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_6"] call SAR_AI_mon_upd;

// Bubendorf (half water), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_6"] call SAR_AI_mon_upd;

// Nue Welt, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_6"] call SAR_AI_mon_upd;

// Trueb, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_6"] call SAR_AI_mon_upd;

// Hirsegg, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_6"] call SAR_AI_mon_upd;

// Bunig (south of Lausen), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_5_6"] call SAR_AI_mon_upd;
    
// Luzern, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_6"] call SAR_AI_mon_upd;
    
// Emmen, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_6"] call SAR_AI_mon_upd;
    
// Horw (mostly water), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_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
[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_7"] call SAR_AI_mon_upd;

// Mostly water, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_7"] call SAR_AI_mon_upd;

// Seltisberg, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_7"] call SAR_AI_mon_upd;

// Lenzburg west, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_7"] call SAR_AI_mon_upd;

// Lenzburg east, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_7"] call SAR_AI_mon_upd;

// Lausen, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_5_7"] call SAR_AI_mon_upd;
    
// Airport (mostly water, use defined area), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_7"] call SAR_AI_mon_upd;
    
// Meggen, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_7"] 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
[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_7"] call SAR_AI_mon_upd;

// Water, 0 bandit groups, 1 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_0_8"] 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
[["max_grps","rnd_grps","max_p_grp"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_1_8"] call SAR_AI_mon_upd;

// Water mostly, 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_2_8"] call SAR_AI_mon_upd;

// Friedorf (mostly water), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_3_8"] call SAR_AI_mon_upd;

// Nordstern (mostly water), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_4_8"] call SAR_AI_mon_upd;

// Hasenmatt (mostly water), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_5_8"] call SAR_AI_mon_upd;
    
// mostly water (north of airport), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_6_8"] call SAR_AI_mon_upd;
    
// Suhrenfeld Array (half water), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_7_8"] call SAR_AI_mon_upd;
    
// Pfeffikon (half water), 0 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"],[[3,3,3],[100,100,100],[20,20,20],"SAR_area_8_8"] call SAR_AI_mon_upd;


diag_log format["SAR_AI: Dynamic spawning definition / adjustments finished"];
};

//
// Definition of area markers for static spawns
//
// east airbase, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_1", [4567.9692, 4605.0352]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1600, 900];
_this setMarkerDir -10.619659;
SAR_marker_helipatrol_1 = _this;

// south airstrip, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_2", [18333.195, 2209.176]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1000, 600];
_this setMarkerDir -50.770599;
SAR_marker_helipatrol_2 = _this;

// north airfield, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_3", [14704.932, 16580.525]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [600, 1200];
_this setMarkerDir -39.218773;
SAR_marker_helipatrol_3 = _this;

// Muench-Muttenz, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_4", [6937.5254, 9874.8291]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1500, 1500];
_this setMarkerDir -43.389454;
SAR_marker_helipatrol_4 = _this;

// Lutzer, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_5", [14834.083, 13689.121]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1200, 1200];
_this setMarkerDir 73.918686;
SAR_marker_helipatrol_5 = _this;

// Lenzburg, heli patrol area
_this = createMarker ["SAR_marker_helipatrol_6", [9566.29, 16550.889]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [1500, 1500];
SAR_marker_helipatrol_6 = _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;
//
//  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;
//
//---------------------------------------------------------------------------------
// define your static air patrols here

// east airbase, heli patrol area
//[SAR_marker_helipatrol_1,2] call SAR_AI_heli;
[SAR_marker_helipatrol_1,3] call SAR_AI_heli;

// south airstrip, heli patrol area
//[SAR_marker_helipatrol_2,2] call SAR_AI_heli;
[SAR_marker_helipatrol_2,3] call SAR_AI_heli;

// north airfield, heli patrol area
//[SAR_marker_helipatrol_3,1,true,1200] call SAR_AI_heli;
[SAR_marker_helipatrol_3,3,true,600] call SAR_AI_heli;

// Muench-Muttenz, heli patrol area
//[SAR_marker_helipatrol_4,1,true,1200] call SAR_AI_heli;
[SAR_marker_helipatrol_4,3,true,600] call SAR_AI_heli;

// Lutzer, heli patrol area
//[SAR_marker_helipatrol_4,1,true,1200] call SAR_AI_heli;
[SAR_marker_helipatrol_5,3] call SAR_AI_heli;

// Lenzburg, heli patrol area
//[SAR_marker_helipatrol_4,1,true,1200] call SAR_AI_heli;
[SAR_marker_helipatrol_6,3] 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;
//
//  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;
//
//---------------------------------------------------------------------------------

// define your static infantry patrols here
// east airbase, foot patrol area
[SAR_marker_helipatrol_1,3,1,2,"patrol",false] call SAR_AI;

// south airstrip, foot patrol area
[SAR_marker_helipatrol_2,3,1,2,"patrol",false] call SAR_AI;

// north airfield, foot patrol area
[SAR_marker_helipatrol_3,3,1,2,"patrol",false] call SAR_AI;

// Muench-Muttenz, foot patrol area
[SAR_marker_helipatrol_4,1,1,2,"patrol",false] call SAR_AI;

// Lutzer, foot patrol area
[SAR_marker_helipatrol_5,1,1,2,"patrol",false] call SAR_AI;

// Lenzburg, foot patrol area
[SAR_marker_helipatrol_6,1,1,2,"patrol",false] 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;
*/
//
//  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;
*/
//
// -------------------------------------------------------------------------------------

// define your static vehicle patrols here
/*
// example war scenario in the northwest. Comment OUT after having had a look at it!
[
SAR_marker_helipatrol_5, // 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_helipatrol_5, // 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_helipatrol_5, // 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"];
*/
//
// get grid configuration for the different maps
//

switch (_worldname) do {
case "napf":
{
#include "map_config\SAR_cfg_grid_napf.sqf"
};


diag_log format["SAR_AI: Dynamic and static spawning Started"];

switch (_worldname) do {
case "napf":
{
#include "map_config\SAR_cfg_grps_napf.sqf"
};

};

Mission zip

http://www.datafilehost.com/d/88a0cdab

 

If anyone could exsplain to me where im going wrong so i can fix it and learn from it id be most appreciative 

 

Thanks

Stef

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...