AI do not fire the M24 bolt action rifle unless enemy is within 30 meters.
Open, Unbreak Now!Public

Description

I found the issue. The subclass named "Single" lists the engagement ranges as this:

maxRange = 30;
maxRangeProbab = 0.05;
midRange = 15;
midRangeProbab = 0.7;
minRange = 0;
minRangeProbab = 0.9;

But, as an example, it should look like this:

maxRange = 500;
maxRangeProbab = 0.05;
midRange = 350;
midRangeProbab = 0.7;
minRange = 0;
minRangeProbab = 0.3;

~~~~~~~~~~~~~~~~~~~~

Hope this helps!

Details

Affected classnames
Every classname that starts with CUP_srifle_M24
Branch
Release/Stable
Vallis created this task.Tue, May 18, 10:24 PM
Vallis updated the task description. (Show Details)Wed, May 19, 1:20 AM
Freddo3000 changed the task status from Needs Review to Open.Sun, May 30, 7:10 PM
Freddo3000 triaged this task as Unbreak Now! priority.

Single is a player firemode and not meant for AI which is why the values are so low.

The firemodes players can't use, single_close_optics1, single_medium_optics1, single_far_optics1, all have appropriate values for AI out to 1000m.

For info/testing needed.

Single is a player firemode and not meant for AI which is why the values are so low.

Strange that changing those values fixed the issue though? I tested it myself before posting this bug report.

In T4460#69397, @Vallis wrote:

Single is a player firemode and not meant for AI which is why the values are so low.

Strange that changing those values fixed the issue though? I tested it myself before posting this bug report.

Did you give the units a scope before applying the changes? Doubt that units firing without iron sights out to 500m ranges is realistic.

Strange that changing those values fixed the issue though? I tested it myself before posting this bug report.

Not strange at all. With changing these values, you made the mode "attractive" to AI. That is the point of having low values, AI should use the AI fire modes. Also, the AI fire modes have

requiredOpticType = 1;

meaning they will only engage if they have an appropriate scope. Without a scope they will end up with the first fire mode and hence only engage close targets.

So, as Freddo suggested, try giving them a scope. If they engage, everything is as it should be.

Did you give the units a scope before applying the changes? Doubt that units firing without iron sights out to 500m ranges is realistic.

So, as Freddo suggested, try giving them a scope. If they engage, everything is as it should be.

I realize now I should've posted about this in the bug report itself, that's my mistake-- but that's the issue. They don't do anything at all with/without a scope, so this fix was the simplest thing I could figure out without spending too much time on it. My solution is a merely a band-aid fix, I'm sure you guys can probably figure out the real issue here.

I ran some tests.

Matter of fact is, almost all of the long-range rifles in Vanilla Arma 3 seem to have a "Single" setup that the AI will almost exclusively use regardless of optics. For example, the CSAT marksman with the default CSAT DMR will use Single in spite of having configured "long range" modes for AI only. This is probably because there is no way to hide something from the AI, only from the player.

In the case of the M24, since its "Single" is not configured for AI, the AI switches instead to the single_far_optics1 mode if the player is further than 300 meters away. HOWEVER, it stays in this mode since the next one below that (single_medium_optics1) has a requiredOpticType of 1, and the default Leupold scope is type 2. Apparently, requiresOpticType does NOT include the "better" optic type, but rather must match exactly.

I'll run some more tests to see if the precision of the AI suffers from not having an optic. If not, then this is a serious issue, not with CUP but with Arma itself, and would explain the AK-Ironsight-Sniping... I'll post my findings.