SARGE AI Framework - Public Release

Status
Not open for further replies.
okay thanks.

about d: maybe that will disappear if the humanity system is working? But okay, i'll set some BE exceptions.

About b: I'll try it and watch more carefully next time, but i think if i shoot a survivor of a group the other ones just don't take even notice of it. Also don't shoot at me after that. But i'll have a look at it.

i just tested this. I needed to shoot 2 survivors, the rest of the group ran away like chickens (ARMA close combat is aweful). While i still was laughing at them, another survivor group perforated me from 200m away .-)
 
Well, couldn't sleep .-)

Fixed the issue that AI was communicating friendly fire. Check the readme on github how to install.
 
Ok so I was thinking if we now have the humanity element why not also register Bandit Kills, (Solidier/Survivor Kills) on the debug monitor and in database just edit SAR_aikilled.sqf to this:

Code:
private ["_ai","_aikiller","_aikilled_type","_aikilled_name","_aikilled_side","_aikilled_group_side","_aikiller_group_side","_aikiller_type","_aikiller_name","_aikiller_side","_humanity"];
 
if (!isServer) exitWith {}; // only run this on the server
 
_ai = _this select 0;
_aikiller = _this select 1;
 
_aikilled_type = typeof _ai;
_aikilled_name = name _ai;
_aikilled_side = side _ai;
_aikilled_group_side = side (group _ai);
 
_aikiller_type = typeof _aikiller;
_aikiller_name = name _aikiller;
_aikiller_side = side _aikiller;
_aikiller_group_side = side (group _aikiller);
_banditKills = 0;
_humanKills = 0;
 
if (SAR_EXTREME_DEBUG) then {
    diag_log format["SAR_EXTREME_DEBUG: AI killed - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikilled_type,_aikilled_name, _aikilled_side,_aikilled_group_side];
    diag_log format["SAR_EXTREME_DEBUG: AI Killer - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikiller_type,_aikiller_name, _aikiller_side,_aikiller_group_side];
};
 
 
if(isPlayer _aikiller) then {
 
    if (_aikilled_group_side == west) then {
        if(SAR_DEBUG)then{diag_log format["SAR_DEBUG: Adjusting humanity for survivor or soldier kill by %2 for %1",_aikiller,SAR_surv_kill_value];};
        _humanity = _aikiller getVariable ["humanity",0];
        _humanity = _humanity - SAR_surv_kill_value;
        _aikiller setVariable["humanity", _humanity,true];
 
        _humanKills = _aikiller getVariable["humanKills",0];
        _aikiller setVariable["humanKills",_humanKills+1,true];
    };
    if (_aikilled_group_side == east) then {
        if(SAR_DEBUG)then{diag_log format["SAR_DEBUG: Adjusting humanity for bandit kill by %2 for %1",_aikiller,SAR_band_kill_value];};
        _humanity = _aikiller getVariable ["humanity",0];
        _humanity = _humanity + SAR_band_kill_value;
        _aikiller setVariable["humanity", _humanity,true];
 
        _banditKills = _aikiller getVariable["banditKills",0];
        _aikiller setVariable["banditKills",_banditKills+1,true];
    };
 
 
};

Quick and dirty but it works, feel free to tidy it up if you like sarge and good job adding the humanity :D
 
Ok so I was thinking if we now have the humanity element why not also register Bandit Kills, (Solidier/Survivor Kills) on the debug monitor and in database just edit SAR_aikilled.sqf to this:

Code:
private ["_ai","_aikiller","_aikilled_type","_aikilled_name","_aikilled_side","_aikilled_group_side","_aikiller_group_side","_aikiller_type","_aikiller_name","_aikiller_side","_humanity"];
 
if (!isServer) exitWith {}; // only run this on the server
 
_ai = _this select 0;
_aikiller = _this select 1;
 
_aikilled_type = typeof _ai;
_aikilled_name = name _ai;
_aikilled_side = side _ai;
_aikilled_group_side = side (group _ai);
 
_aikiller_type = typeof _aikiller;
_aikiller_name = name _aikiller;
_aikiller_side = side _aikiller;
_aikiller_group_side = side (group _aikiller);
_banditKills = 0;
_humanKills = 0;
 
if (SAR_EXTREME_DEBUG) then {
    diag_log format["SAR_EXTREME_DEBUG: AI killed - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikilled_type,_aikilled_name, _aikilled_side,_aikilled_group_side];
    diag_log format["SAR_EXTREME_DEBUG: AI Killer - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikiller_type,_aikiller_name, _aikiller_side,_aikiller_group_side];
};
 
 
if(isPlayer _aikiller) then {
 
    if (_aikilled_group_side == west) then {
        if(SAR_DEBUG)then{diag_log format["SAR_DEBUG: Adjusting humanity for survivor or soldier kill by %2 for %1",_aikiller,SAR_surv_kill_value];};
        _humanity = _aikiller getVariable ["humanity",0];
        _humanity = _humanity - SAR_surv_kill_value;
        _aikiller setVariable["humanity", _humanity,true];
 
        _humanKills = _aikiller getVariable["humanKills",0];
        _aikiller setVariable["humanKills",_humanKills+1,true];
    };
    if (_aikilled_group_side == east) then {
        if(SAR_DEBUG)then{diag_log format["SAR_DEBUG: Adjusting humanity for bandit kill by %2 for %1",_aikiller,SAR_band_kill_value];};
        _humanity = _aikiller getVariable ["humanity",0];
        _humanity = _humanity + SAR_band_kill_value;
        _aikiller setVariable["humanity", _humanity,true];
 
        _banditKills = _aikiller getVariable["banditKills",0];
        _aikiller setVariable["banditKills",_banditKills+1,true];
    };
 
 
};

Quick and dirty but it works, feel free to tidy it up if you like sarge and good job adding the humanity :D


thx mate, already included and optimized a bit in my version here. Upload coming later today.
 
So what do I need to do to update the files? Are they just new script files? Do I need to redo the whole "install"
Hey man, saw your question, maybe I can help you out.


What I did, was download the whole 1.0.3 zip.... then I went to the github, and all the files which had been updated to say they had been changed, I copied and overwrote my files, I didn't overwrite the UPS MON files, or the chernarus group file, just added the new panthera files, and changed all the Sarge_AI files out. I had changed a few things in the AI Init.sqf,so I just copied what I had changed into the new version, then pasted into my mpmission folder.

As long as you add any new files, and make the changes that were made, (don't forget to add that line at the end of description.ext), you will be fine.
 
sins the update iam getting a strange problem on login

22:43:43 "STARTING LOGIN: ["87414214",B 1-1-A:1 (MrRitchietos) REMOTE]"
22:43:43 "LOGIN ATTEMPT: "87414214" MrRitchietos"
22:43:43 "LOGIN LOADED: B 1-1-A:1 (MrRitchietos) REMOTE Type: Survivor1_DZ"
22:43:44 "LOGIN PUBLISHING: B 1-1-H:1 (MrRitchietos) REMOTE Type: Survivor2_DZ"
22:43:44 Warning: z\addons\dayz_communityassets\models\compass.p3d:0 Error while trying to generate ST for points: 863, 853, 852
22:43:54 "TELEPORT REVERT: MrRitchietos (1978) from [6915.12,11429.1,30.2055] to [-18688.1,25929.8,0.00146484] now at [6915.12,11429.1,30.2055]"

i loging defauld skin then i get tp back to debug my skin changes and i get tp back to the original place .
 
For some reason, my server is not keeping track of murders or bandit kills in the debug menu, but it does affect humanity. 1.7.6.1, 1.0.3 Sarge AI , everything else working wonderful.

Anyone else having this problem?
 
I really don't understand this. I've edited the MPeventhandler.txt file whenever someone is kicked for a restriction but they are STILL being kicked. I even tried a blank MPeventhandler.txt but somehow I was still kicked.

Can someone with a confirmed 100% correct MPeventhander.txt that they can share? It DOES go into your BattlEye folder, right?
 
Hey man, saw your question, maybe I can help you out.


What I did, was download the whole 1.0.3 zip.... then I went to the github, and all the files which had been updated to say they had been changed, I copied and overwrote my files, I didn't overwrite the UPS MON files, or the chernarus group file, just added the new panthera files, and changed all the Sarge_AI files out. I had changed a few things in the AI Init.sqf,so I just copied what I had changed into the new version, then pasted into my mpmission folder.

As long as you add any new files, and make the changes that were made, (don't forget to add that line at the end of description.ext), you will be fine.


I deleted everything from the folder I had set up, took a previous pbo and it worked. I might have left something somewhere. Need to configure these surviors/heli patrols/bandits. Literally every person on my server is running into something. Its nice to see the humanity works.

I do have a question, I am curious to run the debug flags. What does this actually do, just output to the rpt file?
 
Status
Not open for further replies.
Back
Top