SARGE AI Framework - Public Release

Status
Not open for further replies.
same for Stubbs, check you are only having either the pbo there or the directory structure.
 
Also if I don't want any heli patrols should I change the number to zero like
Should I change the 1 after Sabina to a zero? Also I attached my gprs sqf file if you could check to see if everything is ok as I don't have a test server :)

Code:
//Heli Patrol Sabina
    [SAR_marker_helipatrol_sabina,1] call SAR_AI_heli;
 

Attachments

  • SAR_cfg_grps_tavi.sqf
    17.6 KB · Views: 11
Also if I don't want any heli patrols should I change the number to zero like
Should I change the 1 after Sabina to a zero? Also I attached my gprs sqf file if you could check to see if everything is ok as I don't have a test server :)

Code:
//Heli Patrol Sabina
    [SAR_marker_helipatrol_sabina,1] call SAR_AI_heli;

if you dont want the heli patrols, just comment them out with // athe the beginning of the line.

You are using the same name twice for an area: "SAR_area_admin", change that.

Other then that all seems fine. Make sure you use the latest version.
 
Hi mate, great you like it!

If you want absolutely no survivor and soldier AI, you need to edit the default settings for grids as well - the entries in the grps file do not cover all 36 grids in chernarus.

look for

Code:
// -----------------------------------------------
// default values for dynamic grid spawning
// -----------------------------------------------
 
// maximum number of groups / grid
SAR_max_grps_bandits = 1;
SAR_max_grps_soldiers = 1;
SAR_max_grps_survivors = 1;
 
// chance for a group to spawn (1-100)
SAR_chance_bandits = 50;
SAR_chance_soldiers = 30;
SAR_chance_survivors = 50;
 
// maximum size of group (including Leader)
SAR_max_grpsize_bandits = 3;
SAR_max_grpsize_soldiers = 3;
SAR_max_grpsize_survivors = 3;

and change to

Code:
// -----------------------------------------------
// default values for dynamic grid spawning
// -----------------------------------------------
 
// maximum number of groups / grid
SAR_max_grps_bandits = 1;
SAR_max_grps_soldiers = 0;
SAR_max_grps_survivors = 0;
 
// chance for a group to spawn (1-100)
SAR_chance_bandits = 100;
SAR_chance_soldiers = 0;
SAR_chance_survivors = 0;
 
// maximum size of group (including Leader)
SAR_max_grpsize_bandits = 3;
SAR_max_grpsize_soldiers = 0;
SAR_max_grpsize_survivors = 0;


Great, I'd worked out the missing grids and added them in, debug and RPT helped loads. Nice to get something right for a change :)

Thanks for the help - Kindest regards

Mac
 
Implemented the AI into my server and wow they are amazing, tractor vs tractor and stealing my players vehicles :D

Thanks Sarge!
 
Sarge, is there a way to delete an AI if then enter a trigger (its a 50x50 area). I don't want to turn that grid off totally, just delete them if they enter this one spot :D
 
Sarge, is there a way to delete an AI if then enter a trigger (its a 50x50 area). I don't want to turn that grid off totally, just delete them if they enter this one spot :D

Not that easy. I keep the Ai groups that are in a grid in a huge array on the server to be able to control them. If you delete them manually in your trigger (which is possible, just kill all east and resistance units) they will respawn. (if respawn is enabled). Other then that, killing em via a trigger is not much different to players killing them, so shouldnt be an issue.

If the above is good enough for you, give it a try :-=)

Keep in mind they will shoot at players in that area from outside though, they rarely get into close combat. Also keep in mind they might randomly get spawned in that area, and then insta killed.


cheers, Sarge
 
Another question, do the leaders have to have the radio for it all to work? [ItemRadio",100]

Thanks

Mac


nope they don't. If you set KRON_UPS_comradio = 0; to 2, they will use the radio though to inform other groups of your location. The range over which they do that can be set in KRON_UPS_sharedist = 200;

I tried that once with only one big grid over Chernarus and the distance set to 4000 - they came driving with vehicles and flying in with choppers to kill me from all around the map :)

cheers, Sarge
 
Just a quick feedback what's next on my list:

- AI vehicle patrols (cars / trucks / bikes)
- AI convoys
- some "not to be announced goodies" .-)

WHAT I WOULD NEED FROM YOU:

I need feedback about lag / performance with my framework to be able to optimize it. I am already measuring runtime on the server, but dont have access to a high pop server.

If you are able to provide feedback, please make it detailed and specific (my server lags sometimes is NOT specific and NOT detailed .-))

include pls:

- average number of players active
- average number of configured AI active
- server fps

If you see slowdowns, please copy the rpt of these phases (no, not the whole rpt, just that timespan.

Thx a lot for your help, with this we can make SAR_AI even better :)

cheers

Sarge
 
Hi Sarge
thanks for this great work. I am having a sligt problem..could you please help me with it?
This is the edit i made to the server_cleanup.fsm

Code:
      name = "general_cleanup";
      init = /*%FSM<STATEINIT""">*/"//Clean groups" \n
      "{" \n
      "    //diag_log (""CLEANUP: CHECKING GROUP WITH "" + str(count units _x) + "" UNITS"");" \n
      "    if (count units _x==0) && !(_x getVariable[""SAR_protect"",false])) then {" \n
      "        deleteGroup _x;" \n
      "        //diag_log (""CLEANUP: DELETING A GROUP"");" \n
      "    };" \n
      "} forEach allGroups;" \n
      "" \n
      "//Check for hackers" \n
      " {" \n
      "      if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
      "        diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
      "          (vehicle _x) setDamage 1;" \n
      "          _x setDamage 1;" \n
      "    };" \n
      " } forEach allUnits;" \n
      "" \n

and i get in my report

Code:
22:30:01 Error in expression <& !(_x getVariable["SAR_protect",false])) then {
deleteGroup _x;
 
};
} forEach a>
22:30:01  Error position: <) then {
deleteGroup _x;
 
};
} forEach a>
22:30:01  Error Missing ;
22:30:01 Error in expression <& !(_x getVariable["SAR_protect",false])) then {
deleteGroup _x;
 
};
} forEach a>
22:30:01  Error position: <) then {
deleteGroup _x;
 
};
} forEach a>
22:30:01  Error Missing ;

I tried several times (fresh copy of my file, then edit) and i get the same thing. I can not write my own code and really dont know if i did something wrong or my original file needs to be edited differntly. i did compare it with the file from github and its just different enough to realy throw me off.
Im running Taviana 2.0 on a Dayz.st server. heres the original file http://pastebin.com/3zMikTtS .
Everything is working well i think..chopper patrols spawn and shoot at me. I see markers in the grids in debug.
Ive seen all three types of AI.. been killed several times lol , Thanks in advance
Del
 
change
Code:
"    if (count units _x==0) && !(_x getVariable[""SAR_protect"",false])) then {" \n

to

Code:
"    if ((count units _x==0) && !(_x getVariable[""SAR_protect"",false])) then {" \n

and you are set :)

cheers, Sarge
 
I am now dreaming of my AIs having a motorbike convoy down the Taviana highway! :p Can't wait for the extra goodies as well!
 
I just realised (more like, noticed to my surprise) that AI's spawn in the same places each time. So my initial question about stopping them from roaming into an area within a grid is pointless, because they spawn right in the middle of that area lol. I've added a custom grid setting with zero AI's , should have done this in the first instance.

This brings me to a feature request, if you don't mind me suggesting. Can you make the AI's spawn in a radius of a few hundred to a thousand meters from the main spawn point, to make it more random ? :)
 
Not sure if it will bug out but I notice inconsistency on this part.

Code:
SAR_soldier_band_list = ['Bandit1_DZ', 'BanditW1_DZ',"Survivor2_DZ","SurvivorW2_DZ","Soldier_Crew_PMC"]; // the potential classes of the bandit of a soldier group

Notice 'Bandit1_DZ' and later on "SurvivorW2_DZ"
Should be a typo, maybe " for all
 
Not sure if it will bug out but I notice inconsistency on this part.

Code:
SAR_soldier_band_list = ['Bandit1_DZ', 'BanditW1_DZ',"Survivor2_DZ","SurvivorW2_DZ","Soldier_Crew_PMC"]; // the potential classes of the bandit of a soldier group

Notice 'Bandit1_DZ' and later on "SurvivorW2_DZ"
Should be a typo, maybe " for all

Nope, it was needed in the past because i needed to use ' later on for these values. I changed that, so now it doesnt really matter if you use ' or ".
 
I just realised (more like, noticed to my surprise) that AI's spawn in the same places each time. So my initial question about stopping them from roaming into an area within a grid is pointless, because they spawn right in the middle of that area lol. I've added a custom grid setting with zero AI's , should have done this in the first instance.

This brings me to a feature request, if you don't mind me suggesting. Can you make the AI's spawn in a radius of a few hundred to a thousand meters from the main spawn point, to make it more random ? :)

Confirmed, UPSMON was overwriting my random placement. Fixed for the next release.
 
Status
Not open for further replies.
Back
Top