Jump to content
Militant1006

AI Skill Settings

Recommended Posts

From testing it seems to me that the AI precision is unchangeable, the reaction time seems to slow down when I lower the AI skill but the accuracy of their shooting is ridiculous, especially considering the weapon recoil of the Mk200 seems to not affect the AI's ability with it at all.

Does anyone have solid information on the AI and how much of their skill settings can be configured at this point in development?

Share this post


Link to post
Share on other sites

put the following in the init.sqf of your mission:

{

_x setSkill ["aimingspeed", 0.1];

_x setSkill ["spotdistance", 0.1];

_x setSkill ["aimingaccuracy", 0.1];

_x setSkill ["aimingshake", 0.1];

_x setSkill ["spottime", 0.1];

_x setSkill ["spotdistance", 0.5];

_x setSkill ["commanding", 1];

_x setSkill ["general", 1];

} forEach allUnits;

those are just the values i last tested with. this is just about sharing the method not the values. this works only for custom missions so for downloaded ones you will have to live with it. thinking about making a simple addon that lets you change it on the fly though so we have something until BI fixes this.

Share this post


Link to post
Share on other sites

Does anyone know if Skill can be configured with numbers above 1?

As _x setSkill ["spottime",2]......

Share this post


Link to post
Share on other sites
Does anyone know if Skill can be configured with numbers above 1?

As _x setSkill ["spottime",2]......

Yes, I found the upper limit is in fact 999999. I use it all the time to make super AI for base defence etc.

Though, be careful, aimspeed > 2 will cause any AI turret to spin like a top, as it overshoots the target, and turns into a re-enactment of the film 'Wanted'

  • Like 1

Share this post


Link to post
Share on other sites

here's a little script to call for individual groups - may need a little extra calibration but seems to work ok

//skill settings:
/*
//call with 
[_mygroupname, skill] spawn EGG_EVO_skill;
e.g. [_guard,3] spawn EGG_EVO_skill;
0 = random
1 = conscript
2 = irregular/rebel
3 = regular army
4 = elite infantry
5 = spec ops

*/

EGG_EVO_skill =
{
_grp =  _this select 0;
_skill = _this select 1;

if (_skill==0) then {_skill=(round random 4)+1};
//	_baseskill = skillfactor; //set in init -can develop an initial base skill modifier for parameters use later

switch (_skill) do
{
	case 1: //conscript very low skill
	{
		{
			_x setSkill ["aimingspeed", 0.05];
			_x setSkill ["spotdistance", 0.05];
			_x setSkill ["aimingaccuracy", 0.02];
			_x setSkill ["aimingshake", 0.02];
			_x setSkill ["spottime", 0.1];
			_x setSkill ["spotdistance", 0.3];
			_x setSkill ["commanding", 0.3];
			_x setSkill ["general", 0.2];
		} forEach (units _grp); 
	};
	case 2: //rebels low skill
	{
		{
			_x setSkill ["aimingspeed", 0.1];
			_x setSkill ["spotdistance", 0.1];
			_x setSkill ["aimingaccuracy", 0.05];
			_x setSkill ["aimingshake", 0.05];
			_x setSkill ["spottime", 0.2];
			_x setSkill ["spotdistance", 0.4];
			_x setSkill ["commanding", 0.4];
			_x setSkill ["general", 0.3];
		} forEach (units _grp); 
	};
	case 3: //regular fair skill
	{
		{
			_x setSkill ["aimingspeed", 0.15];
			_x setSkill ["spotdistance", 0.15];
			_x setSkill ["aimingaccuracy", 0.1];
			_x setSkill ["aimingshake", 0.1];
			_x setSkill ["spottime", 0.3];
			_x setSkill ["spotdistance", 0.5];
			_x setSkill ["commanding", 0.5];
			_x setSkill ["general", 0.6];
		} forEach (units _grp); 
	};
	case 4: //elite soldiers medium skill
	{
		{
			_x setSkill ["aimingspeed", 0.2];
			_x setSkill ["spotdistance", 0.2];
			_x setSkill ["aimingaccuracy", 0.2];
			_x setSkill ["aimingshake", 0.2];
			_x setSkill ["spottime", 0.4];
			_x setSkill ["spotdistance", 0.6];
			_x setSkill ["commanding", 0.6];
			_x setSkill ["general", 0.7];
		} forEach (units _grp); 
	};
	case 5: // specops good skill
	{
		{
			_x setSkill ["aimingspeed", 0.3];
			_x setSkill ["spotdistance", 0.3];
			_x setSkill ["aimingaccuracy", 0.3];
			_x setSkill ["aimingshake", 0.3];
			_x setSkill ["spottime", 0.5];
			_x setSkill ["spotdistance", 0.8];
			_x setSkill ["commanding", 0.8];
			_x setSkill ["general", 0.9];
		} forEach (units _grp); 
	};
};
};

Share this post


Link to post
Share on other sites

yeah familiar with these commands, though cheers guys.

I've figured out that the server skill doesn't seem to be entirely stable, though AI skill can be changed through the editor. Sometimes they are full retard, sometimes they become terminators.

Share this post


Link to post
Share on other sites
here's a little script to call for individual groups - may need a little extra calibration but seems to work ok

//skill settings:
/*
//call with 
[_mygroupname, skill] spawn EGG_EVO_skill;
e.g. [_guard,3] spawn EGG_EVO_skill;
0 = random
1 = conscript
2 = irregular/rebel
3 = regular army
4 = elite infantry
5 = spec ops

*/

EGG_EVO_skill =
{
_grp =  _this select 0;
_skill = _this select 1;

if (_skill==0) then {_skill=(round random 4)+1};
//	_baseskill = skillfactor; //set in init -can develop an initial base skill modifier for parameters use later

switch (_skill) do
{
	case 1: //conscript very low skill
	{
		{
			_x setSkill ["aimingspeed", 0.05];
			_x setSkill ["spotdistance", 0.05];
			_x setSkill ["aimingaccuracy", 0.02];
			_x setSkill ["aimingshake", 0.02];
			_x setSkill ["spottime", 0.1];
			_x setSkill ["spotdistance", 0.3];
			_x setSkill ["commanding", 0.3];
			_x setSkill ["general", 0.2];
		} forEach (units _grp); 
	};
	case 2: //rebels low skill
	{
		{
			_x setSkill ["aimingspeed", 0.1];
			_x setSkill ["spotdistance", 0.1];
			_x setSkill ["aimingaccuracy", 0.05];
			_x setSkill ["aimingshake", 0.05];
			_x setSkill ["spottime", 0.2];
			_x setSkill ["spotdistance", 0.4];
			_x setSkill ["commanding", 0.4];
			_x setSkill ["general", 0.3];
		} forEach (units _grp); 
	};
	case 3: //regular fair skill
	{
		{
			_x setSkill ["aimingspeed", 0.15];
			_x setSkill ["spotdistance", 0.15];
			_x setSkill ["aimingaccuracy", 0.1];
			_x setSkill ["aimingshake", 0.1];
			_x setSkill ["spottime", 0.3];
			_x setSkill ["spotdistance", 0.5];
			_x setSkill ["commanding", 0.5];
			_x setSkill ["general", 0.6];
		} forEach (units _grp); 
	};
	case 4: //elite soldiers medium skill
	{
		{
			_x setSkill ["aimingspeed", 0.2];
			_x setSkill ["spotdistance", 0.2];
			_x setSkill ["aimingaccuracy", 0.2];
			_x setSkill ["aimingshake", 0.2];
			_x setSkill ["spottime", 0.4];
			_x setSkill ["spotdistance", 0.6];
			_x setSkill ["commanding", 0.6];
			_x setSkill ["general", 0.7];
		} forEach (units _grp); 
	};
	case 5: // specops good skill
	{
		{
			_x setSkill ["aimingspeed", 0.3];
			_x setSkill ["spotdistance", 0.3];
			_x setSkill ["aimingaccuracy", 0.3];
			_x setSkill ["aimingshake", 0.3];
			_x setSkill ["spottime", 0.5];
			_x setSkill ["spotdistance", 0.8];
			_x setSkill ["commanding", 0.8];
			_x setSkill ["general", 0.9];
		} forEach (units _grp); 
	};
};
};

Thanks for the advice!!

Perhaps (is a question of personl taste) the values except for "aimingaccuracy" ​​are too low....

Ai is already DUMB.

Cheers

Share this post


Link to post
Share on other sites

I've only found aimingspeed and aimingaccuracy to have any effect.

0.1/0.3 is perfect for those two, with 0.15/0.45 being for a "good" AI.

Share this post


Link to post
Share on other sites
Ai is already DUMB.

we don't find them dumb at all. strange huh?

someone else using our mission reported this - dumb AI. but most hosts have not reported it at all.

Share this post


Link to post
Share on other sites

It seem that server profile cfg accuracy is overwritten by in script mission.

Ex : if I play a simple mission where unit where placed in the editor. They will use my profile cfg. But if I apply a setskill while the mission run, they will take the script value instead of my profile on.

Can someone confirm it ?

Share this post


Link to post
Share on other sites
From testing it seems to me that the AI precision is unchangeable, the reaction time seems to slow down when I lower the AI skill but the accuracy of their shooting is ridiculous, especially considering the weapon recoil of the Mk200 seems to not affect the AI's ability with it at all.

Does anyone have solid information on the AI and how much of their skill settings can be configured at this point in development?

Yeah have been testing this on my server an AI dont appear to be effected by any changes/tweakes at least not in Evo Ai machineguners can be in crouched stance an nail u from quite a ways away9least in my experience). Did however just try the Insurgency mission an ai in that mission was way differnt than what i've experienced elsewhere. Not sure what the mission maker did to ai settings but firefights were more enjoyable.

Share this post


Link to post
Share on other sites

Since the AI skill is dependent of the mission scripts, I think a mission maker doing just a setskill on a unit can break the game experience. Because it seem the unit will inherit the full value in aim accuracy. For exemple if you do a setskill 0.5 on a unit, my guess is that the unit will then have an aim accuracy of 0.5, what ever your profile have (maybe 0.2?).

It seem that accuracy between 0.3 and 1.0 are nearly the same : aimbot. While playing betwen 0.05 and 0.2 are more kind to make human like miss shot. I modified the way I set the skill on the VTS, this way it seem more enjoyable and you can clearly feel the difference in aiming between unit skills, without losing the other skills abilities.

vts_setskill=
{
_unit=_this;
_unit setskill console_unit_moral;
_unit setskill ["general",console_unit_moral];
_unit setskill ["aimingAccuracy",(console_unit_moral/3)];
   _unit setskill ["aimingShake",(console_unit_moral/3)];
   _unit setskill ["aimingSpeed",(console_unit_moral/3)];
   _unit setskill ["endurance",console_unit_moral];
   _unit setskill ["spotDistance",console_unit_moral];
   _unit setskill ["spotTime",console_unit_moral];
   _unit setskill ["courage",console_unit_moral];
   _unit setskill ["reloadSpeed",console_unit_moral];
   _unit setskill ["commanding",console_unit_moral];


};

That way an unit with a skill of 0.3 while have an aiminskill of 0.1 which is like a human rookie. This only apply if you need to set the skill of a unit after its spawn if an unit is spawned from the editor, it inherit the accuracy from your profile setting.

Edited by L etranger

Share this post


Link to post
Share on other sites

I've been running testings the past 2 days, and strangely, I found that up to 0.4 in aimingSkill, the AI aiming is below the human precision in game. I find all the value posted above too low, imho.

What I did :

put AI with the default 0.5 skill slider set

in their init, modify these values :

setSkill aimingAccuracy 0.4

setSkill aimingSpeed 0.4

setSkill commanding 0.8

setSkill spotDistance 0.8

setSkill spotSpeed 0.6

This way, I'm still able to solo teams of ennemies mostly.

Something else : units spawned by Sites modules seems to be particularly bad

Share this post


Link to post
Share on other sites

Its nice that AI skill can be adjusted, but exactly where are you putting these values in for the editor or these being set in the init.sqf? -

If possible for making a SQF to adjust these values, any tips on how to do so? Still new to the scripting, please be patient.

Edited by Crow_X

Share this post


Link to post
Share on other sites
Since the AI skill is dependent of the mission scripts, I think a mission maker doing just a setskill on a unit can break the game experience. Because it seem the unit will inherit the full value in aim accuracy. For exemple if you do a setskill 0.5 on a unit, my guess is that the unit will then have an aim accuracy of 0.5, what ever your profile have (maybe 0.2?).

It seem that accuracy between 0.3 and 1.0 are nearly the same : aimbot. While playing betwen 0.05 and 0.2 are more kind to make human like miss shot. I modified the way I set the skill on the VTS, this way it seem more enjoyable and you can clearly feel the difference in aiming between unit skills, without losing the other skills abilities.

vts_setskill=
{
_unit=_this;
_unit setskill console_unit_moral;
_unit setskill ["general",console_unit_moral];
_unit setskill ["aimingAccuracy",(console_unit_moral/3)];
   _unit setskill ["aimingShake",(console_unit_moral/3)];
   _unit setskill ["aimingSpeed",(console_unit_moral/3)];
   _unit setskill ["endurance",console_unit_moral];
   _unit setskill ["spotDistance",console_unit_moral];
   _unit setskill ["spotTime",console_unit_moral];
   _unit setskill ["courage",console_unit_moral];
   _unit setskill ["reloadSpeed",console_unit_moral];
   _unit setskill ["commanding",console_unit_moral];


};

That way an unit with a skill of 0.3 while have an aiminskill of 0.1 which is like a human rookie. This only apply if you need to set the skill of a unit after its spawn if an unit is spawned from the editor, it inherit the accuracy from your profile setting.

L etranger, I like your way of thinking. How do you get the console_unit_moral value of the individual units to your scripts? You can point me in the right direction and I will find it. :)

---------- Post added at 02:15 PM ---------- Previous post was at 01:09 PM ----------

PS: I got it :), so never mind

Edited by KadinX

Share this post


Link to post
Share on other sites

Does anyone know why theres 2x SpotDistance?

{

_x setSkill ["aimingspeed", 0.1];

_x setSkill ["spotdistance", 0.1];

_x setSkill ["aimingaccuracy", 0.1];

_x setSkill ["aimingshake", 0.1];

_x setSkill ["spottime", 0.1];

_x setSkill ["spotdistance", 0.5];

_x setSkill ["commanding", 1];

_x setSkill ["general", 1];

} forEach allUnits;

What does it do and whats it purpose? To me it seems like the same parameter is being called twice, are we suppose to do that?

Share this post


Link to post
Share on other sites

It's more than likley a mistake. basically sets the same variable twice so only the last value is used.

Share this post


Link to post
Share on other sites
It's more than likley a mistake. basically sets the same variable twice so only the last value is used.

Roger, thats what i was assuming aswell.

Thx for clarifying mate.

Share this post


Link to post
Share on other sites

Should this be in BETA TROUBLESHOOTING? Perhaps Map & Mission Editing?

Being new I'm finding these Forums a bit awkward and disheveled at times. :o

Anyway,

If you use this in your init.sqf file, can you still customize certain Units/Groups?

Also, is there an explanation in detail on these somewhere? Wiki? Can't find...

For example: spotDistance if set to 1 (100% max) would be what? 1km, 2km?

Does anyone have the most current list?

- aimingAccuracy

- aimingShake

- aimingSpeed

- spotDistance

- spotTime

- courage

- commanding

- general

- endurance

- reloadSpeed

What I've found so far (unofficial).

Share this post


Link to post
Share on other sites

Got another question about this.

By simply putting:

{
_x setSkill ["aimingaccuracy", 0.2];
_x setSkill ["aimingshake", 0.2];
_x setSkill ["aimingspeed", 0.2];
_x setSkill ["endurance", 0.5];
_x setSkill ["spotdistance", 0.2];
_x setSkill ["spottime", 0.2];
_x setSkill ["courage", 0.4];
_x setSkill ["reloadspeed", 0.3];
_x setSkill ["commanding", 0.5];
_x setSkill ["general", 0.7];
} 
forEach allUnits; 

In the init.sqf, does that execute for all AI, even the ones spawned half way through the mission?

Have anyone tryed this with HC missions and spawning AI on the HC?

I am doing some testing on this but im not sure it actually works hehe.

Share this post


Link to post
Share on other sites
Got another question about this.

In the init.sqf, does that execute for all AI, even the ones spawned half way through the mission?

Have anyone tryed this with HC missions and spawning AI on the HC?

I am doing some testing on this but im not sure it actually works hehe.

No, it wouldn't. You would have to execute that on spawned units. Depending on how they are spawned it could potentially be very simple.

Share this post


Link to post
Share on other sites

is this still correct?

 

So the closer the value to 1 the better the ai is?

Share this post


Link to post
Share on other sites
On 2013-7-20 at 6:55 PM, byrgesen said:

Got another question about this.

By simply putting:

 


{
_x setSkill ["aimingaccuracy", 0.2];
_x setSkill ["aimingshake", 0.2];
_x setSkill ["aimingspeed", 0.2];
_x setSkill ["endurance", 0.5];
_x setSkill ["spotdistance", 0.2];
_x setSkill ["spottime", 0.2];
_x setSkill ["courage", 0.4];
_x setSkill ["reloadspeed", 0.3];
_x setSkill ["commanding", 0.5];
_x setSkill ["general", 0.7];
} 
forEach allUnits; 
 

 

In the init.sqf, does that execute for all AI, even the ones spawned half way through the mission?

Have anyone tryed this with HC missions and spawning AI on the HC?

I am doing some testing on this but im not sure it actually works hehe.

Has anyone figured byrgesens post out, I saw delta99's response but how would this be implemented on say a spawn ai module synced to a spawn ai spawnpoint module.  AI from these modules spawn with 0 skill when I checked in zeus, I have tried a few things from other topics but none of them work or work but break the ai sector tactic waypoints.  P.S. Fairly new to scripting. 

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

×