SARGE AI Framework - Public Release

Status
Not open for further replies.
Thats a well known Arma II AI issue. usually the spotting distance is around 300m for the AI, might be less. Even if that specific skill is set to max, they won't spot a sniper that is far awyay. What you can try to do is run ASR_AI (get it from Armaholic) in addition. With this you can adjust skills on a very detailled level per unit, and it works very well with my addon.
Alright and how do i make the Soldiers shoot everyone instead of bandits only
 
I am very new to messing around with adding scripts into my server and I have no actual knowledge yet of scripting itself. The problem I keep running into is, any other script I attempt to add in that adds lines to init.sqf in the mission file makes me get an error in game about "addons\SARGE\SAR_AI_init.sqf" not being found. Any other scripts seem to be working fine together, as far as I can tell. What am I doing wrong?
end of the init.sqf put
// UPSMON
call compile preprocessFileLineNumbers "addons\UPSMON\scripts\Init_UPSMON.sqf";
// SHK
call compile preprocessfile "addons\SHK_pos\shk_pos_init.sqf";
// run SAR_AI
[] execVM "addons\SARGE\SAR_AI_init.sqf";

Excluding the commented out portions, that is already what I have at the end of the init.sqf. I will post the portion of my init.sqf that I have edited and maybe you can help me spot what I'm doing wrong.

Code:
if ((!isServer) && (player != player)) then
{
  waitUntil {player == player};
  waitUntil {time > 3};
};
player_wearClothes = compile preprocessFileLineNumbers "fixes\player_wearClothes.sqf";
 
if (isServer) then {
    _serverMonitor =    [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};
 
if (!isDedicated) then {
    //Conduct map operations
    0 fadeSound 0;
    waitUntil {!isNil "dayz_loadScreenMsg"};
    dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
 
    //Run the player monitor
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    _playerMonitor =    [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
};
 
call compile preprocessFileLineNumbers "addons\UPSMON\scripts\Init_UPSMON.sqf";
 
call compile preprocessFileLineNumbers "addons\SHK_pos\shk_pos_init.sqf";
 
[] execVM "addons\SARGE\SAR_AI_init.sqf";
 
Excluding the commented out portions, that is already what I have at the end of the init.sqf. I will post the portion of my init.sqf that I have edited and maybe you can help me spot what I'm doing wrong.

Code:
if ((!isServer) && (player != player)) then
{
  waitUntil {player == player};
  waitUntil {time > 3};
};
player_wearClothes = compile preprocessFileLineNumbers "fixes\player_wearClothes.sqf";
 
if (isServer) then {
    _serverMonitor =    [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};
 
if (!isDedicated) then {
    //Conduct map operations
    0 fadeSound 0;
    waitUntil {!isNil "dayz_loadScreenMsg"};
    dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
 
    //Run the player monitor
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    _playerMonitor =    [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
};
 
call compile preprocessFileLineNumbers "addons\UPSMON\scripts\Init_UPSMON.sqf";
 
call compile preprocessFileLineNumbers "addons\SHK_pos\shk_pos_init.sqf";
 
[] execVM "addons\SARGE\SAR_AI_init.sqf";

all fine in there. make sure you did setup the addons folder in your missions pbo.
 
all fine in there. make sure you did setup the addons folder in your missions pbo.

I have the addons folder in my missions pbo and haven't touched anything in there since when it was working. The only thing I have edited is the following line to my init.sqf.

Code:
player_wearClothes = compile preprocessFileLineNumbers "fixes\player_wearClothes.sqf";

I added that line directly under

Code:
if ((!isServer) && (player != player)) then
{
  waitUntil {player == player};
  waitUntil {time > 3};
};

for a custom skins script I was trying out.

Once I added that line, my AI stopped working and I got the error about "addons\SARGE_AI_init.sqf" not being found upon joining my server.
 
I have the addons folder in my missions pbo and haven't touched anything in there since when it was working. The only thing I have edited is the following line to my init.sqf.

Code:
player_wearClothes = compile preprocessFileLineNumbers "fixes\player_wearClothes.sqf";

I added that line directly under

Code:
if ((!isServer) && (player != player)) then
{
  waitUntil {player == player};
  waitUntil {time > 3};
};

for a custom skins script I was trying out.

Once I added that line, my AI stopped working and I got the error about "addons\SARGE_AI_init.sqf" not being found upon joining my server.

well, try to comment that out and see if it fixes it? if yes, that script is bugged.
 
is there a way to spawn a solitary person for the auto spawn? the numbers suggest it will be X + 1 leader, so would that mean if I wanted a single bandit, I'd set the number of groups to 1 and the number of people in the group to 0, so it would become 0 + 1 leader?
 
is there a way to spawn a solitary person for the auto spawn? the numbers suggest it will be X + 1 leader, so would that mean if I wanted a single bandit, I'd set the number of groups to 1 and the number of people in the group to 0, so it would become 0 + 1 leader?

correct, that's how i would do it.
 
cool, thanks. i'm just trying to work on a grplist file for lingor using the new gridlist that was posted here. once i get it working right and get some heli patrols in i'll post it up :)
 
i know its probably been mentioned in here, but when spawning the heli patrols, what are a couple of the numbers in relation to? primarily these two?
// NEAF, heli patrol area
_this = createMarker ["SAR_AREA_NEAF", [12034.16, 12725.376, 0]];
_this setMarkerSize [1000, 600];

Is it the first one is the start point for the patrol (where it will be spawned) in a worldspace format (X,Y,Z) and the second is the distance the rectangle takes up in X,Y meters?
So that would start at worldspace 12034.16, 12725.376, 0 and would patrol in an area 1000m north and south from the spawn point and 600m east and west?
 
i know its probably been mentioned in here, but when spawning the heli patrols, what are a couple of the numbers in relation to? primarily these two?
// NEAF, heli patrol area
_this = createMarker ["SAR_AREA_NEAF", [12034.16, 12725.376, 0]];
_this setMarkerSize [1000, 600];

Is it the first one is the start point for the patrol (where it will be spawned) in a worldspace format (X,Y,Z) and the second is the distance the rectangle takes up in X,Y meters?
So that would start at worldspace 12034.16, 12725.376, 0 and would patrol in an area 1000m north and south from the spawn point and 600m east and west?
Yes to both, worldspace start point and patrol radius, You can also control the direction they fly so it isn't just up/down left/right by adding the following code under the setMarkerSize line - The values are 360 degrees so 180 is south and 0 is north etc
Code:
_this setMarkerDir 59.354115;
 
@Richie if i don't set it, will it just randomly fly in that rectangle? also do survivor and bandit choppers fire on each other? if i spawned two in the same rectangular area, would they fight on seeing each other, or only engage ground units?
 
If you don't include it then they fly in a rectangle yes, what i mean is you can tilt the rectangle.
For example the NWAF on Chernarus is on an angle, you can set the angle so the AI fly around the runway exactly how it's laid out.

I've no idea about setting to heli patrols with 2 different factions, Sarge will know if it can be done but i've not tried it.
 
Status
Not open for further replies.
Back
Top