Jump to content

Recommended Posts

I've been trying to get my head around the Ai skill settings.  I understand that there's various ways of setting the skill settings for Ai with the editor.  But, I want to set the AI skill settings up via the .Arma3Profile with custom difficulty settings.  What success have people had with the "skillAI and precisionAI" values and what values have you used?  What have you found with certain values.  Where's the sweet spot?  I've found 0.5 on both skillAI and precisionAi to be too AI strong.  Headshots from ridiculous distances for example.  Are the presets 0, 1 and 2 good to use as I've found them too Ai accurate, although I've not done much testing to date.

 

 

Cheers,

 

Infil

  • Like 1

Share this post


Link to post
Share on other sites

0.5 on both would be too high for me. I try to make my ai a little more accurate than the novice setting, but then i put their skill up higher again. So I have accuracy at about .2 and skill at .3 I think

  • Like 1

Share this post


Link to post
Share on other sites

Same here. Giving them a decent skill but somewhat lower accuracy makes for a challenging experience that doesn't feel unfair.

(AI still often shoot through bushes where players have a hard time spotting them)

 

We tend to use skill settings around 0.3 or 0.4 and precision at 0.1 or 0.2.

The actual difficulty still differs a lot, depending on the missions you're playing and how the unit-skills are set up.

Share this post


Link to post
Share on other sites
Guest

Let me understand,

 

If i set skill in .Arma3Profile as 0.4 and i spawn a AI unit by script and set it skill to 0.5, with the setSkill command, while playing the mission, the final skill of this unit will be 0.4 * 0.5 = 0.2?

 

Changed from:

skillAI=0.5;
precisionAI=0.5;

To:

skillAI=1;
precisionAI=0.1;

For maximum fun, i expect.

Share this post


Link to post
Share on other sites

I created an addon that can effect the main config values directly, basically I added the cfgAIskill to a userconfig so the values could be tweaked without rewriting the addon and only needing a server restart

 (This has a much greater impact on the AI skills than the tweaks that the editor and the difficulty settings can have) but if you get it wrong it can really screw things up

 

This main config skill setting looks like

    comments:
            1st element Lowest skill setting (eg mission skill editor slider set furthest to left
            2nd element Skill value at lowest skill setting
            3rd element Highest skill slider setting
            4th element Value at highest setting

  class CfgAISkill
  {
    //aimingAccuracy[] = {0,0,1,1};    BIS Default dev version 0.72
    aimingAccuracy[] = {0,0.2,1,0.45};
    aimingShake[] = {0,0,1,1};
    aimingSpeed[] = {0,0.2,1,0.6};
    endurance[] = {0,0,1,1};
    spotDistance[] = {0,0.2,1,0.45};
    spotTime[] = {0,0,1,0.45};
    courage[] = {0,0,1,1};
    reloadSpeed[] = {0,0,1,1};
    commanding[] = {0,0,1,1};
    general[] = {0,0,1,1};
  };

 

I'm not sure how the server Difficulty setting values effect this (But can assume whatever value you select will be somewhere between the minimum and maximum values defined in cfgAIskills

AFAIK the mission editor slider if say set at 0.5 will select a value midway between the minimum and maximum values of the 1st and 3rd elements of the cfgAI skill arrays

 

It would be nice if BIS could clarify how the "tweaks" actually effect the real value.

 

BIS also use a precedence system on a lot of their settings. For example if you look at viewdistance. the higher priority is the higher number

1) Default value (Lowest priority)

2) Client setting

3) Server setting

4) Mission setting (Highest priority)

 

So based on this, it may also be the same for the skill settings, the mission setting may take priority over the server difficulty setting (But this is just conjecture and may work differently)

Share this post


Link to post
Share on other sites

I set server settings to 0.5 (least amount of interpolation.
https://community.bistudio.com/wiki/CfgAISkill  <<< this has good explanation and image of interpolation.


This allows for missions to be different and gives more powerto mission-

makers to make the mission which provides the experience they intend...

TLDR: AI skill is very mission/group dependent...

 

 

I want every mission to have it's own personality and ai settings!

This is of course for servers which don't always fight the same enemy!

 

For ex. sometimes I fight takistan locals, which come in great numbers,

but they can't hit us with their low experience, inability to properly take

cover (AUTOCOMBAT OFF) and inaccurate weapons.

 

 

The next time we might fight against highly trained NATO forces,

in which case they are lower in numbers, highly trained and use way

more advanced tactics and take cover more!(AUTOCOMBAT ON)

 

Share this post


Link to post
Share on other sites
Guest

computer,

 

Takistan forces, with AUTOCOMBAT off, will enter in combat if, for example, NATO forces shot then?

 

About this interpolation: So we can't control AI skill if we dont know the specific unit interpolation settings. Using _unit setSkill 1 can have very different effects to different unit classes.

Share this post


Link to post
Share on other sites
{_x disableAI "AUTOCOMBAT";false} count allunits;
{_x setBehaviour "AWARE";false} count allGroups;

@DonnavanThese two would make the ai not enter combat, if someone shoots at them.
Making units retreat / rush is impossible without these.

 

Difficulty:

If I make a mission, where I want AI to miss every shot, I set aimingAccuracy to 0.01.
But if someone plays that mission and their difficulty settings are max or they are using

a CfgAISkill config, that unit might have a lot higher accuracy...

I wish BI would make a way to bypass interpolation completely an option...

Share this post


Link to post
Share on other sites

@Computer that is not correct

The first thing we need to do is split anything at all to do with skills into 2 seperate categories

  1. Addons
  2. Anything else

ADDONS

If you have a unit addon for example New_units_Mod.pbo, and that addon redefines the CfgAI skills then any unit that inherits from that skill value config will use that new  value instead of the BIS Vanilla CfgAIskill preset

So a 3rd party addon takes precedence over a BIS vanilla addon (And that is specific to the node (client, server or HeadlessClient) where that addon is run). Typically these are run on all nodes so every node has the same value

 

ANYTHING ELSE

Any other settings eg scripts in missions, mission.sqm, server configs, client configs adjust these cfgAI skill values somewhere between the minimum and maximum allowed values defined in cfgAI skills class in whichever addon takes porecedence

However there is a practical and sensible priority 

  1. Highest Priority is the mission, this overrides anything the server or the client configs define
  2. Second highest priority: Server (Overrides anything the client sets)
  3. Lowest priority: Client (Values will only be used if the mission or the server doesn't define anything (And as there are default values on the server if no values have been defined, this simply wont happen)

So if the server and the mission are set up correctly then the client cannot possibly effect the AI

and even if they weren't, the only AI the client would effect are those local to the client which is generally AI in the players squad if he is the leader of the group. (There can be a few oddities where this general rule does not occur, but are beyond the scope of this topic)

 

  • Like 1

Share this post


Link to post
Share on other sites

Hi All,

Thanks terox for that informative post.

 

So if I create and add to mission folder: 

AI.sqf

class CfgAISkill
  {
    aimingAccuracy[] = {0,0.2,1,0.9};
    aimingShake[] = {0,0,1,1};
    aimingSpeed[] = {0,0.2,1,0.6};
    endurance[] = {0,0,1,1};
    spotDistance[] = {0,0.2,1,0.45};
    spotTime[] = {0,0,1,0.55};
    courage[] = {0,0,1,1};
    reloadSpeed[] = {0,0,1,1};
    commanding[] = {0,0,1,1};
    general[] = {0,0,1,1};
  };

Then do:
[] execVM "AI.sqf"; //AI SKILL in Init.sqf

 

 

Will this assign skills based on the unit skill slider (and the above values) in Zeus or the editor, to all AIs?

 

Thanks.

 

 

Share this post


Link to post
Share on other sites
On 22/01/2018 at 6:14 AM, Percipio said:

Hi All,

Thanks terox for that informative post.

 

So if I create and add to mission folder: 

AI.sqf

class CfgAISkill
  {
    aimingAccuracy[] = {0,0.2,1,0.9};
    aimingShake[] = {0,0,1,1};
    aimingSpeed[] = {0,0.2,1,0.6};
    endurance[] = {0,0,1,1};
    spotDistance[] = {0,0.2,1,0.45};
    spotTime[] = {0,0,1,0.55};
    courage[] = {0,0,1,1};
    reloadSpeed[] = {0,0,1,1};
    commanding[] = {0,0,1,1};
    general[] = {0,0,1,1};
  };

Then do:
[] execVM "AI.sqf"; //AI SKILL in Init.sqf

 

 

Will this assign skills based on the unit skill slider (and the above values) in Zeus or the editor, to all AIs?

 

Thanks.

 

 

You can only redefine a config class using configs in an addon, a script runs in a different evironment and will not effect this

What you can do is have an addon that loads a file in the userconfig folder which is part of the addon that then defines these values

Share this post


Link to post
Share on other sites

@terox is it possible to alter the (sub)skill values of both already existing AI and AI that is to be spawned DURING the mission running or does that always need a mission restart?

FYI I'm trying to make a script that turns down enemy spotting distance and accuracy at night and then let it return to normal once the sun has risen

Share this post


Link to post
Share on other sites

only possible with CBA:

["CAManBase", "init", {

//set skill here

}] call CBA_fnc_addClassEventHandler;

Share this post


Link to post
Share on other sites
4 minutes ago, Belbo said:

only possible with CBA:

["CAManBase", "init", {

//set skill here

}] call CBA_fnc_addClassEventHandler;

cheers! So I basically put the part that Percipio posted in the brackets here and it should work?

Share this post


Link to post
Share on other sites
2 minutes ago, Belbo said:

But with my limited scripting knowledge I can not figure out how to change the values of units that are not yet spawned in and will be spawned in the future by scripts

Share this post


Link to post
Share on other sites

i would have thought and also believe to be true that the ai's ability to see at night is already catered for with BI hardcode, just try run a night mission and see how easy it is to crawl up to an ai with no NVG

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

×