SARGE AI Framework - Public Release

Status
Not open for further replies.

Sarge

OpenDayZ Guru!
Staff member
IMPORTANT​
Please use the new forums for any kind of discussion regarding SARGE AI.​
The links are:​
--------------------------------------------------------------------------------------------​
Version 1.1.0​
Changelog:

- Moved all the SAR AI configurations into a single cfg file for easier editing - SAR_config.sqf.
- Static and dynamic groups can respawn (configurable), weapon and item loadouts are applied
- Items and Tools loadout for every single AI class
- Health of units can be adjusted - get that nearly undestroyable bandit
- Med action added to friendly leaders
- different actions for groups (patrol, ambush, fortify)
- implemented skill system
- included many more configuration options

- FIXED the enemies travelling in the same vehicle issue (that was a badass!)

- included a monitor to check for number of groups and warn if too many AI have been spawned
- dynamic spawning can be enabled/disabled
- use of UPSMON can be enabled/disabled
- groups stealing vehicles can be enabled/disabled

- rewrote the reammo and refuel scripts
- fixed the AI talking in sidechat when being shot at
PLEASE MAKE SURE YOU READ THE README on GITHUB!​
Version 1.0.3​
- Fully configurable logging of bandit or survivor AI kills​
- Optimized aggro from friendly fire - one hit is now sufficient to aggro the AI​
- Reworked AI heli turret issue - you should no longer see the error message with 2 elements expected, 3 given​
- Fixed heli spawn bug​
- included functions to query cfg files for turrets (not used atm)​
- Included hit Eventhandler for heli - this will only work if you do a decent amount of damage, with a normal weapon this EH will not trigger​
Version 1.0.2​
- Fully configurable humanity sytem implemented. check out SAR_config.sqf for values to configure.​
- Fixed the AI communicating if under friendly fire - CHECK INSTALL, you need to edit your description.ext!​
Version 1.0.1 IMPORTANT UPDATE​
- fixed the bug with AI not respawning after reentering an area. You only need to download the code scripts, configuration files are unchanged.​
Version 1.0.0​
Maps covered and configured:​
  • Chernarus - Sarge
  • Taviana - thx a lot to Richie
  • Namalsk - thx a lot to Omer
  • Lingor - thx a lot to Wyger
  • Panthera - thx a lot to Sabbath
Maps that are included but need configuration (IF you configure one of these maps (grid & definition for gridsquares), please do me a favour and share it back with me, so i can include it in the framework):​
  • Celle
  • Fallujah
  • Takistan
--------------​
Features:
General
- no addons on the clientside needed​
- tested with Dayz 1.7.5.1, should also work with 1.7.6.x​
- supported maps: see above​
- easy install (dedicated script folder, started by init.sqf)​
- optimized for server performance, all AI handled on the server​
- highly configurable​
- relies on 2 other script packages: UPSMon and SHK_pos (included in the archive)​
Functionality
  • player triggered AI (same concept as Dayz's zombie spawn, this prevents "unused" AI on the map)
- 3 AI factions:​
  1. AI survivors (shoot Zeds and player bandits)
  2. AI bandits (shoot Zeds and player bandits/player survivors)
  3. AI soldiers (shoot Zeds, AI bandits and player bandits)
  • Dynamic "enemy" handling - only units near players will be made "unfriendly" towards Zeds / Bandits etc.
  • Randomized gear/skins and group setups(leader/sniper/riflemen)
  • Randomized patrol waypoints around the player
  • preconfigurable sizes of groups, number of groups and probability of groups spawning close to player
  • static AI configureable (e.g. put a group of bandits in Devils Castle, let 30 soldiers protect your camp, etc.)
  • static Heli patrols predefined (Chernarus south coast, east coast, airfields). custom patrols configurable.
  • automatic despawn if no players present anymore in the area
  • killed AI bodies get deleted after a short amount of time (reduce server lag)
Installation:​
You need to un-pbo your missions folder. (if you dont know how to do this, please google and learn, in that case this framework is not really intended for you)​
  • In your missions folder, create an addons folder.
  • Add the content of the archive (the folders SARGE, UPSMON and SHKPOS)
  • edit your init.sqf file from your missions folder
  • add the following lines at the end of the init.sqf :
Code:
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";

  • add the following line at the end of the description.ext :
Code:
#include "addons\SARGE\SAR_define.hpp"
  • either pbo your missions file again, or use the folder structure instead. (if you do that, make sure to DELETE the pbo)
  • To customize, check out the your corresponding cfg files in /map_config, they are commented and documented in there.
Check out and adjust values in SAR_AI_init.sqf where needed.​
FAQ:
A) I am having battleeye issues with people being kicked.​
  1. Read this: http://opendayz.net/index.php?threads/sarge-ai-framework-public-release.8391/page-3#post-24385
  2. Read this: https://github.com/Swiss-Sarge/SAR_AI/blob/master/README.md
B) my heli patrols get blown up - rpt shows "killed a hacker"​
  1. adjust this in your server_cleanup.fsm (depends on your server.pbo build, adjust where needed).
  2. If you have a line looking like this ins your server_cleabup.fsm:

    Code:
    "    if  (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") ) then {" \n

    change it to

    Code:
    "    if  (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") && (vehicle _x getVariable [""Sarge"",0] != 1) ) then {" \n
  3. If your line looks like this:

    Code:
    if(vehicle _x != _x  && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

    change to

    Code:
    if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
C) I am totally lost, what to do ? : Ask here in this thread, i am sure people will help you out.​
D) I see AI shooting through walls / walking through walls.​
This seems to happen on some maps. If AI shoot walls, it is the Arma AI logic that actually does that, no way to fix it.​
E) Helis fly against obstacles and explode:​
Seen that happen with the bridge on Taviana - seems to be an Arma glitch.​
F) Zeds do not attack AI: this is intended behaviour.​
G) AI have stolen my CAR! : Well, that happens. AI use vehicles if their next waypoint is further away than a configured distance. If you want to adjust this, check out Init_UPSMON.sqf​
 
This AI is exellent :D
* AI that follow you in hueys and shoot at you
* AI that will steal and drive away in your vehicle
* AI that will steal loot out your vehicle
* AI that respawn and have unlimited ammo
and so much more, Cheers Sarge for the exellent work and the chance to test it :)
 
sorry i got one stupid question:( Sarge on the top said "automatic despawn if no players present anymore in the area"
wt does it mean? it is like AI will dissappear if i gone away? if it does, is there anyway i can keep the AI on the map (forever until they die)
 
Sarge, we keep getting kicked for battleeye #8 and #80 after installing... any ideas?
 
Here are the issues I am having with them. Static AI aren't respawning, what are the conditions to get them to respawn and if it is timer based, where can I adjust it to be more frequent?


Random questions:

Can you white list UIDs so the Bandits don't attack certain predefined players?

Can i make it so Bandit AI don't shoot bandit players?
 
sorry i got one stupid question:( Sarge on the top said "automatic despawn if no players present anymore in the area"
wt does it mean? it is like AI will dissappear if i gone away? if it does, is there anyway i can keep the AI on the map (forever until they die)

why would you want that?
 
I have updated the filters with your code.. and have changed the kick #'s from kick to log, but they are still kicking..
 
Here are the issues I am having with them. Static AI aren't respawning, what are the conditions to get them to respawn and if it is timer based, where can I adjust it to be more frequent?


Random questions:

Can you white list UIDs so the Bandits don't attack certain predefined players?

Can i make it so Bandit AI don't shoot bandit players?

a) Bandit AI are acting like real bandits - they shoot everything.

b) static AI is not respawning at the moment, will be part of a next release and will be configurable. In theory i can let em respawn already, but then they are missing their weapon loadout :) Static heli patrols should not need to respawn, they rarely die anyhow. Too many respawns will lead to people farming these ...

c) whitelist - you could in theory. if more people request this, i might put it in.
 
I have updated the filters with your code.. and have changed the kick #'s from kick to log, but they are still kicking..

Then you are adjusting the wrong lines. You are aware that the line that is reported in the scripts.log is not equal to the line in scripts.txt ?

Please checkout the guides that can be found online how to adjust your BE filters.
 
becoz like when i was far from the AI position they will dissappear then they won't able to walk around? sorry i m kinda stupid :confused:

You will always have AI around you (as long as the grids are configured correctly). AI where no players are around is just a waste of server ressources.
 
I just tried it on cherno and i got killed everytime on spawn the only thing that were running was factions refuel and bt3 logic at that time . and i was forced to turn of be duo script restriciton 80 i chekt it twice if i did everything correct like it was on the readme .
 
You will always have AI around you (as long as the grids are configured correctly). AI where no players are around is just a waste of server ressources.
ok thank you very much, another question. if the AI will dissappear when no player near, if they stolen my car that mean they wont get too far right?
 
Status
Not open for further replies.
Back
Top