Jump to content

Recommended Posts

There are three different places I can set the skill of the AI in ArmA.

  1. In my difficulty settings

  2. The skill slider when placing a unit on the map

  3. Using a script in the mission

Which one takes precedence? Which one has the most impact on the AI's behavior? If I have the AI's skill set to .99 in my difficulty and have the skill slider full in the mission editor, but then execute a script in the mission to make the AI skill .15, what will happen? How do these setting work together? Any help is greatly appreciated.

EDIT: Would it matter if playing on a dedicated server with it's own difficulty settings?

Share this post


Link to post
Share on other sites

For a single player mode, the setting would apply.

For dedicated. That would depend on server side settings.

To put it simply, in a multiplayer mode the server dictates the AIs skill settings.

Unless you use third party scripts.

Sent from my phone

Share this post


Link to post
Share on other sites
For a single player mode, the setting would apply.

Which setting would apply?

For dedicated. That would depend on server side settings.

To put it simply, in a multiplayer mode the server dictates the AIs skill settings.

Unless you use third party scripts.

So if I don't execute a script in my mission to modify the AI settings, the server difficulty settings will control the AI? So that means adjusting the skill slider on a unit in the mission editor does nothing?

Share this post


Link to post
Share on other sites

personally.. i hard set the ai skills in the mission i build, as the default AI.. is a little rough.

this is just a quick and dirty way.. could be smoothed out for dynamics...

someScript.sqf

//setSkill for ai on map from editor
//AI Skill  
{
_x setUnitAbility 0.1;
_x setskill ["aimingAccuracy",0.05];
_x setskill ["aimingShake",0.9];
_x setskill ["aimingSpeed",0.1];
_x setskill ["Endurance",0.1];
_x setskill ["spotDistance",0.5];
_x setskill ["spotTime",0.5];
_x setskill ["courage",0.1];
_x setskill ["reloadSpeed",0.1];

_aA = _x skill "aimingAccuracy";
_aS = _x skill "aimingShake";
_aSp = _x skill "aimingSpeed";
_e = _x skill "Endurance";
_sD = _x skill "spotDistance";
_sT = _x skill "spotTime";
_c = _x skill "courage";
_rS =_x skill "reloadSpeed";

if (DebugDeep) then {
hint format [
			"unit: %1\naimingAccuracy: %2\naimingShake: %3
			\naimingSpeed: %4\nEndurance: %5\nspotDistance: %6
			\nspotTime: %7\ncourage: %8\nreloadSpeed: %9"

			,_x,_aA,_aS,_aSp,_e,_sD,_sT,_c,_rS];
//sleep 0.1;
};
} forEach allUnits;  

hope it helps.. its just another way to do the same thing.

Share this post


Link to post
Share on other sites

@Loki

That's the same thing I've been doing. I just didn't know if it overruled the other skill settings in the game.

Share this post


Link to post
Share on other sites

The scripting does take precedence. I am not sure, but i would guess that the skill setting in game options would be a multiplier of ai skill rather than actually setting the skill. Because if it weren't either the the editor skill slider or options skill slider would be absolutely useless no? That's just a guess, I don't really know, but I am sure the scripting one definitely takes precedence over the other two.

Share this post


Link to post
Share on other sites
@Loki

That's the same thing I've been doing. I just didn't know if it overruled the other skill settings in the game.

because scripts are read last by the engine..it does.. unless another script changes it.

edit: -Coulum- makes a good point. if you look... i have the aimingAccuracy set to 0.05 || 500ths of 1%.. with ai in open field 100m spread.. each takes 2-3 shot before 1 dies.

i have noticed at even 0.1% the ai 'auto-magically' headshot each other 90% of the time.

im no ai cfg expert.. but i hope someone will get the ai straight.. the code is in there to do it.

Edited by Loki

Share this post


Link to post
Share on other sites

@Loki & @Coulum

That's interesting stuff. I appreciate the feedback. I've come across the same results as Loki. If I set the aimingAccuracy above .05, they seem to be pretty deadly.

Share this post


Link to post
Share on other sites
personally.. i hard set the ai skills in the mission i build, as the default AI.. is a little rough.

this is just a quick and dirty way.. could be smoothed out for dynamics...

someScript.sqf

//setSkill for ai on map from editor
//AI Skill  
{
_x setUnitAbility 0.1;
_x setskill ["aimingAccuracy",0.05];
_x setskill ["aimingShake",0.9];
_x setskill ["aimingSpeed",0.1];
_x setskill ["Endurance",0.1];
_x setskill ["spotDistance",0.5];
_x setskill ["spotTime",0.5];
_x setskill ["courage",0.1];
_x setskill ["reloadSpeed",0.1];

_aA = _x skill "aimingAccuracy";
_aS = _x skill "aimingShake";
_aSp = _x skill "aimingSpeed";
_e = _x skill "Endurance";
_sD = _x skill "spotDistance";
_sT = _x skill "spotTime";
_c = _x skill "courage";
_rS =_x skill "reloadSpeed";

if (DebugDeep) then {
hint format [
			"unit: %1\naimingAccuracy: %2\naimingShake: %3
			\naimingSpeed: %4\nEndurance: %5\nspotDistance: %6
			\nspotTime: %7\ncourage: %8\nreloadSpeed: %9"

			,_x,_aA,_aS,_aSp,_e,_sD,_sT,_c,_rS];
//sleep 0.1;
};
} forEach allUnits;  

hope it helps.. its just another way to do the same thing.

Loki, thanks for summing them up for us.

I am wondering about the function of this line:_x setUnitAbility 0.1. Do you have any more information than the current listed in the scripting library. According to that information, the function of that command is (in arma) same as setskill. If this is correct, would it be redundant or even conflict with the rest that follow? I am going to try to find out the hard way by commenting it out and see what difference it makes but if you can shed some light on this I would welcome it very much.

Share this post


Link to post
Share on other sites

So is this sorted can I edit the ArmA.cfg or whatever in the server files to tweak ai difficulty? Will/does this now work as I thought it was broken. At the present the ai are a bit to accurate. Hmm just looked at server files, what file on server manages the ai difficulty?

Edited by Call_911

Share this post


Link to post
Share on other sites

The administrator.arma3alphaprofile file located in documents\ArmA 3 Alpha (if your server is using different username, then replace "administrator" with that username). Edit it with any text editor. If you have more than 1 file there, delete all of them, start the server, and the one that appears (with the .arma3alphaprofile extension) is the one you need to modify.

Share this post


Link to post
Share on other sites

I don't know about you guys but I just hopped online for some invade and annex and the AI seem more deadly than when I last played a few days ago. I think I read something about AI tweaked to use optics better in the last update?

It shows!

Share this post


Link to post
Share on other sites
because scripts are read last by the engine..it does.. unless another script changes it.

edit: -Coulum- makes a good point. if you look... i have the aimingAccuracy set to 0.05 || 500ths of 1%.. with ai in open field 100m spread.. each takes 2-3 shot before 1 dies.

i have noticed at even 0.1% the ai 'auto-magically' headshot each other 90% of the time.

im no ai cfg expert.. but i hope someone will get the ai straight.. the code is in there to do it.

after all these years of arma action the AI setings are so tricky? that is interesting and worrying that there is so much conjecture.

editing these settings are essential. i always get confused by spottime. i think the lower the value the longer the ai takes to spot something?

Share this post


Link to post
Share on other sites

I'm slightly confused, is the value "_x setskill ["aimingAccuracy",0.05];" higher or lower than "_x setskill ["aimingAccuracy",0.02];", as in would 0.02 make them less accurate?

Share this post


Link to post
Share on other sites

As far as I'm aware it's a "skill", so the higher it is, the more skill they have, thus having more chance to hit.

Share this post


Link to post
Share on other sites

Thanks! Does this script work for AI that are spawned after the .sqf has been loaded? Or would I have to loop the .sqf for it to work with them?

Share this post


Link to post
Share on other sites
The administrator.arma3alphaprofile file located in documents\ArmA 3 Alpha (if your server is using different username, then replace "administrator" with that username). Edit it with any text editor. If you have more than 1 file there, delete all of them, start the server, and the one that appears (with the .arma3alphaprofile extension) is the one you need to modify.

So I take it doing this in the server files will change the AI difficulty settings? Hav'nt really tried this yet in Dev Buld-Beta,,has anyone tried this does it work, have researched this everywhere an hav'nt found a way to manage the servers (AI difficulty)settings. thanx.

Call911-Kirk

edit..

Is the .vars profile the one that has the ai difficulty settings? have tried to get Elitness to view this(as recommended in another post) an or unrapify but can't find a dl for it an tried to install Elitness with no luck/w the .dll required.

Edited by Call_911

Share this post


Link to post
Share on other sites

No, not the "vars" file. Look for the one that has a "class difficulties" in it with all the custom difficulty settings for each difficulty level. Keep in mind that if you don't pick any difficulty level when selecting a mission then the server will default to "regular".

Of course, whether the bug where the skill/precision settings take no effect has been fixed or not is something I do not know... You'll have to test it yourself.

Share this post


Link to post
Share on other sites
personally.. i hard set the ai skills in the mission i build, as the default AI.. is a little rough.

this is just a quick and dirty way.. could be smoothed out for dynamics...

someScript.sqf

//setSkill for ai on map from editor
//AI Skill  
{
_x setUnitAbility 0.1;
_x setskill ["aimingAccuracy",0.05];
_x setskill ["aimingShake",0.9];
_x setskill ["aimingSpeed",0.1];
_x setskill ["Endurance",0.1];
_x setskill ["spotDistance",0.5];
_x setskill ["spotTime",0.5];
_x setskill ["courage",0.1];
_x setskill ["reloadSpeed",0.1];

_aA = _x skill "aimingAccuracy";
_aS = _x skill "aimingShake";
_aSp = _x skill "aimingSpeed";
_e = _x skill "Endurance";
_sD = _x skill "spotDistance";
_sT = _x skill "spotTime";
_c = _x skill "courage";
_rS =_x skill "reloadSpeed";

if (DebugDeep) then {
hint format [
			"unit: %1\naimingAccuracy: %2\naimingShake: %3
			\naimingSpeed: %4\nEndurance: %5\nspotDistance: %6
			\nspotTime: %7\ncourage: %8\nreloadSpeed: %9"

			,_x,_aA,_aS,_aSp,_e,_sD,_sT,_c,_rS];
//sleep 0.1;
};
} forEach allUnits;  

hope it helps.. its just another way to do the same thing.

Is this for all AI in the mission, or do you have to set up arrays(which I don't know how to do)?

If not, is there an easy to set it up for all AI in the mission on each faction period?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×