Jump to content
Sign in to follow this  
madmedic

aiDispersionCoefX , aiDispersionCoefY

Recommended Posts

I have made a rifle with a custom config, and I want to make it so the AI are very "sloppy" when firing it. (like poorly trained/disciplined militia).

I have tried using "aiDispersionCoefX", and "aiDispersionCoefY"

with both values set to everything between 2.0, and 5000.0

When testing the rifle ingame, I put an AI soldier about 50 meters away from a wall, and order him to shoot at a target just in front of the wall.

No matter what I set the above mentioned values to, he still shoots with the same accuracy.

I am trying to avoid simply setting the rifle's dispersion high, because I want human players to be able to use it effectively.

Any ideas?

Does the "aiDispersionCoefX" value still work in ARMA?

Share this post


Link to post
Share on other sites

What did you set the 'dispersion' value to?

If you have set it to 0, then the ai settings are kinda disabled, as 0*something is always 0

Share this post


Link to post
Share on other sites

What he said.

Also, the skill level of the AI reduces this value. So, if AI has skill of 1, then the AI dispersion coeff. goes down to 1. If AI skill is 0, then it uses the full dispersion coeff.

Share this post


Link to post
Share on other sites
What did you set the 'dispersion' value to?

If you have set it to 0, then the ai settings are kinda disabled, as 0*something is always 0

I have the weapons dispersion set at 0.0025 for semi-auto, and 0.0080 for full auto.

Share this post


Link to post
Share on other sites
What he said.

Also, the skill level of the AI reduces this value. So, if AI has skill of 1, then the AI dispersion coeff. goes down to 1. If AI skill is 0, then it uses the full dispersion coeff.

I was not aware of that...I thought the higher skill levels made them shoot more often (wasn't it that way in OFP?)

Share this post


Link to post
Share on other sites
What he said.

Also, the skill level of the AI reduces this value. So, if AI has skill of 1, then the AI dispersion coeff. goes down to 1. If AI skill is 0, then it uses the full dispersion coeff.

I was not aware of that...I thought the higher skill levels made them shoot more often (wasn't it that way in OFP?)

No, skill always influenced many aspects, as it does in RL.

Share this post


Link to post
Share on other sites
I was not aware of that...I thought the higher skill levels made them shoot more often (wasn't it that way in OFP?)

Skill reducing the AI dispersion coefficient was introduced in one of the Arma patches. I don't remember which one, but if you search through all the change logs, you'll see it.

This was not present in OFP, or the original Arma release.

Share this post


Link to post
Share on other sites

Hi madmedic.

I believe what you need is to setup different fire "modes" for humans and AI, where humans have one type of dispersion and AI has another. Here is example for you:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> modes[] = {"Manual_Single","Manual_Automatic","AI_Single","AI_Automatic"};

class Manual_Single : Base_Manual_Single

{

displayName = "5.56x45 Semi";

reloadTime = 0.09;

sound[] = {"\VTE_Sounds\Weapons\M16_fire.wss", 10, 1.1};

recoil = "VTE_m16";

recoilProne = "VTE_m16Prone";

dispersion = 0.005 * VTE_DispersionCoeff;

};

class Manual_Automatic: Base_Manual_Automatic

{

displayName = "5.56x45 Auto";

reloadTime = 0.075;

sound[] = {"\VTE_Sounds\Weapons\M16_fire.wss", 10, 1.1};

recoil = "VTE_m16";

recoilProne = "VTE_m16Prone";

dispersion = 0.005 * VTE_DispersionCoeff;

};

class AI_Single : Base_AI_Single

{

reloadTime = 0.09;

sound[] = {"\VTE_Sounds\Weapons\M16_fire.wss", 10, 1.1};

recoil = "VTE_m16";

recoilProne = "VTE_m16Prone";

dispersion = 0.005 * VTE_AIDispersionCoeff;

minRange = 0.1;

minRangeProbab = 0.1;

midRange = 200;

midRangeProbab = 0.7;

maxRange = 400;

maxRangeProbab = 0.03;

};

class AI_Automatic : Base_AI_Automatic

{

reloadTime = 0.08;

sound[] = {"\VTE_Sounds\Weapons\M16_fire.wss", 10, 1.1};

recoil = "VTE_m16";

recoilProne = "VTE_m16Prone";

dispersion = 0.005 * VTE_AIDispersionCoeff;

minRange = 0.1;

minRangeProbab = 0.1;

midRange = 100;

midRangeProbab = 0.7;

maxRange = 400;

maxRangeProbab = 0.03;

};

There is no aiDispersionCoefX and Y listed and I dont have example at hand. But you could use the class cfgmovesmalesdr, like this:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMovesMaleSdr: CfgMovesBasic

{

class AmovPercMwlkSrasWrflDf : AmovPercMstpSrasWrflDnon

  {

aimPrecision = VTE_AimPrecisionHigh;

Only related lines added to this example. Sorry this post is not exhaustive tutorial for the matter, but I hope this steers you to the right direction.

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
Sign in to follow this  

×