Bug #2353

Disabled vehicle AI targetting and spotting when player is effective commander in cargo

Added by zombiemod over 5 years ago. Updated over 2 years ago.

Status:Closed Start date:06/28/2009
Priority:Urgent Due date:03/01/2012
Assignee:Dwarden % Done:

100%

Category:AI Issues
Target version:1.62.95248
Affected ArmA II version:1.61 Beta First affected build:
Reproduced by another DH user:Yes First affected ArmA II version:
I am using some Mods:No Single / Multi Player?:
I am using:CO (OA+A2) BIForumURL:
Reproducible for you:Yes NGUrl:
Related to content of DLC: WIKIurl:

Description

Obs
When the player is inside a jeep, the AI gunner will not engage targets.
When you get out, he will.

The problem is that you remain effectiveCommander as long as you are inside,
no matter the vehicle position.

Exp
The jeep gunner should engage targets automatically.

Info
The weapon type of the jeep does not matter. It is true for MP, GL, TOW, etc.

Repro
  1. Launch the attached mission in the editor.
  2. Switch to driver
  3. Notice the AI gunner does NOT engage the vehicles
  4. Eject the jeep
  5. Notice the gunner now engages

If the player starts as driver and the AI as gunner, it works fine too.


Obs
This bug occurs under the following conditions:
  1. The player is group leader
  2. Player has a vehicle crewed by AI under his command
  3. Player then boards that vehicle in a cargo position

Note
Interestingly it does not occur if the player is already in the vehicle before the AI board (the player does not become vehicle effectiveCommander in this situation)

Repro
1. Create a mission with player as group leader (as a soldier), with a HMMWV with M2 under his command. Add some far away enemies, armed or otherwise.
2. Start mission.
3. Board the HMMWV in cargo position.
4. Approach enemies. HMMWV gunner will not report or engage anything without explicit commands from the player.


Obs
In Bitter Chill mission, after the USMC base is destroyed, I have to escape to the extraction point.

My team get in a HMMWV and we drive South down a hill in the closest woods, heading towards the nearest fuel station.

AK Gunfire is clearly audible, and my HMMWV is taking hits. My gunner does not look at all concerned, he is not turning to face the source of the gunfire.

There is no point having an AI gunner if he's deaf!

zGuba: It seems that AI gets completely deaf and blind (causing #2733 as well) when player becomes vehicle's effective commander in cargo space.

ZGB_CIT_PlayerCommander.utes.pbo - AAV AI screwed up (4.3 kB) zGuba, 10/24/2009 16:30

JeepGunnerDoesNotEngage.Desert_E.7z (942 Bytes) Fireball, 11/23/2010 01:54


Related issues

related to ARMA2 Community Issue Tracker - Bug #2733: AI always turned out when player is effective commander i... Closed 07/09/2009 11/01/2011
related to ARMA2 Community Issue Tracker - Bug #15293: The AI tank gunner should automatically switch to and use... Assigned 11/20/2010 10/28/2011
related to ARMA2 Community Issue Tracker - Bug #15308: AI gunner of a TOW jeep under a player SL does not engage... Assigned 11/20/2010 04/01/2012
related to ARMA2 Community Issue Tracker - Bug #15307: AI gunner of a jeep with the player inside will not engag... Assigned 11/20/2010
related to ARMA2 Community Issue Tracker - Bug #1703: AI Total Blackouts/Gaps & AI Reaction Times to slow Expired 06/01/2009 10/14/2009
related to ARMA2 Community Issue Tracker - Bug #5382: AI commander is not assigning targets to player while mac... Rejected 10/24/2009 12/24/2010
related to ARMA2 Community Issue Tracker - Feature #27922: Allow player group leader to switch to "manual fire" as v... Assigned 01/18/2012
related to ARMA2 Community Issue Tracker - Bug #14839: AI commanders keep gunners silent in certain situations Closed 11/02/2010 12/05/2011
related to ARMA2 Community Issue Tracker - Feature #27915: Vehicle control feature options set by server administrator. Feedback 01/17/2012
related to ARMA2 Community Issue Tracker - Bug #20496: action moveToVEHICLEPOSITION only works for effectiveComm... Assigned 06/19/2011
related to ARMA2 Community Issue Tracker - Bug #24066: AI don't enage unit at distance unless player is commander Rejected 09/02/2011 12/02/2011
related to ARMA2 Community Issue Tracker - Bug #27614: Player can't use CTRL+Fire to order gunner to shoot on GR... Closed 01/07/2012
related to ARMA2 Community Issue Tracker - Bug #27677: AI gunner ignores group leader 'hold fire' order, if play... Assigned 01/10/2012 04/01/2012
related to ARMA2 Community Issue Tracker - Bug #17777: View stuck when combat mode changes in vehicle Closed 02/20/2011 01/08/2012
duplicated by ARMA2 Community Issue Tracker - Bug #2597: AI not shooting even when enemy is in sight and CLOSE RANGE Duplicate 07/05/2009 11/15/2009
duplicated by ARMA2 Community Issue Tracker - Bug #2461: Gunners AI on Humvee (and others cars) Duplicate 07/01/2009

History

Updated by kju over 5 years ago

  • Status changed from New to Feedback

Updated by zombiemod over 5 years ago

Positive proof here:
http://www.youtube.com/watch?v=bGCYRRWlKGM

This is a stock mission, not something I've knocked up with the editor (you can see 04: Village Sweep at the top right of the video)
I have not ordered my troops to hold fire, they are in DANGER mode, and the bullets are clearly pinging off the HUMMV.

Updated by Squelch over 5 years ago

  • Subject changed from HUMMV gunners do not react when vehicle is being hit to Vehicle gunners do not react when vehicle is being hit

Updated by zGuba over 5 years ago

This problem could be caused by manual mode failure. It shouldn't have priority 0 nor unreachable ranges for AI, but only a bit less than AI ones (we had the same problem in ACE).
Example of manual mode in CfgWeapons >> M240

 1 class manual: Mode_FullAuto
 2 {
 3     //
 4     minRange = 0;
 5     minRangeProbab = 0.3;
 6     midRange = 5;
 7     midRangeProbab = 0.58;
 8     maxRange = 10;
 9     maxRangeProbab = 0.04;
10 };

If this is the cause, then engagement ranges for manual modes should be increased together with probability tweaks.

Otherwise this could be much more complicated.

Updated by zGuba over 5 years ago

  • Category set to AI Issues
  • Maxmem parameter set to Not set

Updated by Fireball over 5 years ago

  • Due date set to 09/10/2009
  • Difficulty set to Not set

Updated by zGuba over 5 years ago

  • Category changed from AI Issues to Config
  • Status changed from Feedback to Assigned
  • Affected ArmA II version changed from 1.02.58134 to 1.03.58627

Updated by zGuba over 5 years ago

  • Due date changed from 09/10/2009 to 09/28/2009

Updated by zGuba over 5 years ago

This is obviously config failure.

Just created a vaccine for it and it works.

http://forums.bistudio.com/showthread.php?t=85472

Updated by zGuba over 5 years ago

An example:

 1     class M240_veh : MGun
 2     {
 3         ...        
 4         class manual : MGun
 5         {
 6             reloadTime = 0.08;    // burst = 1;
 7             minRange = 0;
 8             minRangeProbab = 0.049;
 9             midRange = 400;
10             midRangeProbab = 0.57;
11             maxRange = 800;
12             maxRangeProbab = 0.009;
13             aiRateOfFire = 0.12;
14             aiRateOfFireDistance = 400;
15         };
16     };

where:

 1 minRange = 0
 2 minRangeProbab = close/minRangeProbab - 0.001
 3 midRange = medium/midRange
 4 midRangeProbab = medium/midRangeProbab - 0.01
 5 maxRange = far/maxRange
 6 maxRangeProbab = far/maxRangeProbab - 0.001
 7 
 8 aiRateOfFire = (reloadTime * burst) * 3/2
 9 aiRateOfFireDistance = medium/midRange

Additionally I have made some differences in probabilities between LowROF and HighROF modes, so AI chooses one to fire at given distance.

Updated by kju over 5 years ago

What is where - the formula for the values?

Updated by Fireball over 5 years ago

  • Assignee set to Dwarden

Thanks zGuba, maybe you may elaborate to Dave, what you did, if he must know... :-)

Does this also work for infantry?

Updated by zGuba over 5 years ago

kju wrote:

What is where - the formula for the values?

Exactly. Very crude but at least it works somehow.

Fireball wrote:

Thanks zGuba, maybe you may elaborate to Dave, what you did, if he must know... :-)

Does this also work for infantry?

We talked about it over VoN (well, I was mainly listening...)

The bug with gunner AI occurs when player is effective commander. By default AI is allowed to attack in ranges between 2 and 4 meters until ordered to engage certain target. My solution simply increases the engagement ranges and probability for "player" muzzle so AI engages every target in range on its own.

Personally I think that this should get fixed externally (engine-wise) by adding handling of "ghost muzzles", so AI will use them instead of player's one when ordered to use certain weapon.

This does not apply for infantry, since infantry is driver, gunner and commander in single person. It's their spotting ability that seems to be too low.

Updated by Fireball over 5 years ago

  • Due date changed from 09/28/2009 to 10/28/2009
  • Affected ArmA II version changed from 1.03.58627 to 1.04.59026
  • Reproduced by another DH user set to No

Updated by Dwarden over 5 years ago

  • Priority changed from Normal to Immediate

Updated by zGuba over 5 years ago

  • Status changed from Assigned to Resolved
  • Target version set to 1.05 BETA

Updated by zGuba over 5 years ago

  • File ZGB_CIT_PlayerCommander.utes.pbo added
  • Subject changed from Vehicle gunners do not react when vehicle is being hit to Disabled vehicle AI targetting and spotting when player is effective commander in cargo
  • Due date changed from 10/28/2009 to 11/24/2009
  • Status changed from Resolved to Assigned
  • Reproduced by another DH user changed from No to Yes

Updated by zGuba over 5 years ago

  • Category changed from Config to AI Issues

Updated by kju over 5 years ago

  • Target version changed from 1.05 BETA to Upcoming version

Updated by kju over 4 years ago

  • Due date changed from 11/24/2009 to 07/14/2010
  • Status changed from Assigned to Feedback
  • Assignee deleted (Dwarden)
  • Target version deleted (Upcoming version)
  • Affected ArmA II version changed from 1.04.59026 to 1.05.62017
  • Audio card set to Please specify!
  • Size of OS swap file set to Please specify!

Updated by Mack over 4 years ago

The bug with the gunners is still present in OA 1.52 71952, this one is over a year old!

Load up the ZGB_CIT_PlayerCommander.utes.pbo. Nothing happens untill you get out of the vehicle, behaviour changed to Danger and Engage at will ordered but no effect.

The same appears to happen with AI gunners in choppers.

Updated by zGuba over 4 years ago

  • Status changed from Feedback to Assigned
  • Assignee set to Dwarden
  • Affected ArmA II version changed from 1.05.62017 to 1.53 BETA

Updated by zGuba over 4 years ago

  • Due date changed from 07/14/2010 to 10/11/2010

Updated by Mack over 4 years ago

  • I am using some Mods set to No
  • Reproducible for you set to No

Still in OA 72291 and Arma 2 1.07

In addition to the above sometimes the AI doesnt engage at all, even after leaving the vehicle and ordering them to engage.

Updated by Fireball over 4 years ago

  • Reproducible for you changed from No to Yes

Updated by zGuba over 4 years ago

  • Affected ArmA II version changed from 1.53 BETA to 1.55 BETA

Updated by Dwarden over 4 years ago

  • Target version set to Upcoming version
  • % Done changed from 0 to 10

Updated by kju over 4 years ago

  • Due date changed from 10/11/2010 to 12/01/2010

Updated by kju over 4 years ago

  • I am using set to CO (A2+OA)

Updated by Fireball over 4 years ago

Merge from #15307.

Updated by kju over 4 years ago

  • Affected ArmA II version changed from 1.55 BETA to 1.56 BETA

Updated by kju over 4 years ago

  • Operating system deleted (WinXP 64 bit)
  • Graphics card deleted (Radeon 4870 HD)
  • I am using changed from CO (A2+OA) to OA only

Updated by kju almost 4 years ago

  • Due date changed from 12/01/2010 to 06/01/2011
  • Affected ArmA II version changed from 1.56 BETA to 1.58.78473
  • CPU deleted (Please specify!)
  • Audio card deleted (Please specify!)
  • Size of OS swap file deleted (Please specify!)

Updated by zGuba almost 4 years ago

  • Due date changed from 06/01/2011 to 07/05/2011
  • Affected ArmA II version changed from 1.58.78473 to 1.59.79384
  • Language set to Please set for missions

No improvement

Updated by Dwarden over 3 years ago

  • Priority changed from Immediate to Urgent

Updated by Mack about 3 years ago

Its in 1.60 RC3

Updated by kju about 3 years ago

  • Due date changed from 07/05/2011 to 03/01/2012
  • Affected ArmA II version changed from 1.59.79384 to 1.60 RC

Updated by Mack about 3 years ago

  • I am using changed from OA only to CO (OA+A2)

Reproduceable in 1.60 final and 87662 beta patch.

Updated by Suma about 3 years ago

  • Assignee changed from Dwarden to Suma

Updated by Suma about 3 years ago

  • Status changed from Assigned to Resolved

Fixed in 87740:

Roles of commander and observer are now separated. Observer commands targeting and firing, commanders commands movement.

Updated by Hanzu about 3 years ago

  • Description updated (diff)

Updated by Suma about 3 years ago

  • Assignee changed from Suma to Dwarden

Updated by Mack about 3 years ago

Its present in 1.60 87756 beta.

Tested using ZGB_CIT_PlayerCommander.utes.pbo

Updated by ceeeb about 3 years ago

I confirm bug is still present in beta 87756.

Updated by kju about 3 years ago

  • Status changed from Resolved to Feedback
  • Affected ArmA II version changed from 1.60 RC to 1.61 Beta

Updated by Suma about 3 years ago

  • Status changed from Feedback to Assigned

I did not test this repro before, only the one with jeep. I confirm I can see the issue of the AAVP7A1 not engaging enemies.

Updated by Suma about 3 years ago

  • Status changed from Assigned to Resolved

When player commander was in a cargo, the visibility testing against enemies was not working properly for the vehicle. Fixed in 87816

Updated by Dwarden about 3 years ago

  • Target version changed from Upcoming version to 1.61 BETA

Updated by Mack about 3 years ago

looks fixed for me,

Thanks for solving this bug! im looking forward to playing through the BAF vehicle missions.

Updated by kju about 3 years ago

  • Status changed from Resolved to Closed

yep works nicely now. great job

note: to make the tow engage automatically you need to tell him "engage at will" (3-5)

Updated by zGuba about 3 years ago

  • % Done changed from 10 to 100

Updated by RubberGrunt about 3 years ago

is this causing the following when the player is driver?

- player can change ammo as driver(same as 1.60, unless 'commander=ai' now orders it for u and not 'driver=player')
- player cannot target(bad!)
- player cannot order fire(bad!)
- commander & gunner engage all targets totally autonomous thus wasting ammo really fast (really bad!)

I view this as a regression because player is now subordinate to ai in the tank...
the player should have maximum control over the tank.

@ https://dev-heaven.net/issues/27614

Updated by kju about 3 years ago

commander & gunner engage all targets totally autonomous thus wasting ammo really fast (really bad!)

Order them to hold fire.

Updated by seany about 3 years ago

Agreed with RubberGrunt

This fix has broken the ability to control the AI from the drivers position of a vehicle (in tactical view with the command cursor),
Can't command fire
Can't cease fire
Can't assign or un-assign targets.

AI in commanders seat now go for an unwanted shooting spree ignoring all squad leaders commands.

Ordering hold fire does not work. And besides even it did, what about all the other functionality this Fix has broken? Like targeting and command fire?

The bug that this fix is supposed to address is pretty minor. It's negative side affects on other (existing) game play features far, far out weigh the importance of addressing this bug.

I say put it back as it was until an alternate solution can be made.

Updated by seany about 3 years ago

Please reopen this ticket, its' changes have caused negative side affects and does not fix what it was supposed to.


I tried the original repro (JeepGunner) mission to witness the bug, I can't a reason why we need this fix at all. In fact, this very mission shows how this fix has broken the game:

Version 1.60
Switch to driver (AI doesn't engage- this fine..I am the commander so he doesn't engage until I tell him to. This is fine.
You can make him engage by using the number/radio commands to assign targets ( or if tactical view is avail you can assign targets using the command cursor). You can order him to fire by using the Command Fire key. I see no bug here.

Version 1.61 beta
Switch to driver (AI DOESN'T engage- not only that, but now I have no way of attacking anything because Command Cursor orders no longer work in this beta, neither does the Command Fire key. The vehicle is basically useless, unless I get rid of the AI and do the gunning myself.
.
This is a really, really badly implemented fix, even the repro here is not fixed by the changes in the beta, in fact it has made it worse.

Updated by kju about 3 years ago

Can you stop you whine finally. Thank you.

You can command fire as commander.
You can cease fire as commander, as well as hold fire and manual fire.
Cease fire also sticks even if you switch to driver.
A commander can assign and un-assign targets just like before via tab,
RMB, radio and quick command menu.

Stating your wrong story again and again, does not make it any more true.

Updated by seany about 3 years ago

Your not acting very professional KJU, why are you saying I am whining when I am pointing out things that this fix has broken?

I tested the mission and followed the repro steps, The AI will engage in 1.61 beta, But they ignore alot of your commands, and target assginments
Also Command fire key does not work at all

cant you engage in proper discussion? That is how we are supposed to behave here is it not?

My issues are legitimate.

Updated by kju about 3 years ago

You really want to tell us a driver should command the gunner - even for a jeep.

Did you ever consider that some people play in first person only?

Of course the gunner should fire at his own discretion.
The driver is to drive the vehicle. Not to tell the gunner what to target and when to fire.

Manual fire for driver is the only meaningful compromise I can see (#27922).


Ref:

Version 1.61 beta
Switch to driver (AI DOESN'T engage- not only that, but now I have no way of attacking anything because Command Cursor orders no longer work in this beta, neither does the Command Fire key. The vehicle is basically useless, unless I get rid of the AI and do the gunning myself.

Did you even test it. Of course the AI gunner engages the vehicles.
He may not do immediately and at any distance, but this is completely unrelated to the change.

As for the armored vehicles - see bug #27675.
Or set their ammo sliders back to max.

Updated by kju about 3 years ago

Your behavior is poor.

You started a huge whine campaign in BIF.
You were unable to provide correct facts.
You did not acknowledge the arguments of the others.
You did not provide CIT tickets with meaningful content.
You complain other force their view onto yours,
while it is exactly the other way round.

You may want to take a few days off and
re-think your whole attitude here.

Updated by seany about 3 years ago

Please stop insulting me. I will not get drawn into your arguments. I will continue to explain the problem

I tested again with 1.61 beta and got the AI to engage. But they only partially follow my orders. They ignore many assigned targets and some times wont shoot on their own.

Also Command fire does not work. So the end result with this fix is I am driving around, staring at a tank waiting for the Ai to do some thing. Before I could order them to fire in 1.60 with the command fire key.

kju wrote:

You really want to tell us a driver should command the gunner - even for a jeep.

What has that got to do with anything? That has nothing to do with the original problem that this bug report is for. Yes a human driver should command the AI gunner, that is how the game was designed from the beginning. It's not about realism it's about making it easier to work with the AI. If a human is in a vehicle with AI the Human (as SquadLeader) should have full control of the vehicles weapon system and targeting regardless of seating position. The Ai simply are not good enough to allow them to do this.. As the above repro and fix clearly shows.

The original request of the op was to have the ability for the Ai to engage independently of the human. They mention nothing about stopping humans having any control over the AI when the are not in the commanders seat. This seems to be something you feel strongly about.

Why cant we have this mode attached to the "Engage At will" radio command? And deactivate it with Disengage command. Or some thing similar to this? Why do we have to cripple helpful AI command controls that have always served their purpose perfectly well?

Updated by kju over 2 years ago

  • Target version changed from 1.61 BETA to 1.62.95248

Also available in: Atom PDF