genesis92x / VcomAI-3.0

Vcom AI 3.0
76 stars 41 forks source link

AI has unexpected behaviors using demolition blocks/charges after 3.2.2 realease #93

Closed GoldJohnKing closed 5 years ago

GoldJohnKing commented 5 years ago

I'm not sure if it should be regarded as bug report or featrue request, and I'm not sure if it's shall be presented separately, so... if something is not right, I'm sorry for the inconvience.

Expected behavior

  1. When AI has reinforced and gather around a building occupied by players, AI would enter the building one by one. Former AI have chances to place mines around the house, then the later one walk through the mine and trigger the explosion, causing the house destroyed and tons of allies dead. One of my player has reached a result through tests that only one player's sacrifice could cause 4/5 of enemy AI dies like that. This does not only happen with buildings. Former AI will place mines at corners, stones and bushes, and the following AI have a large probability to trigger the explosions.
  2. After patrol AI response to reinforcement, they gather together(really close to each other) and forget their patrol waypoints, that they will stay their unless another reinforcement are called or "garrison building" behavior are triggered, which means if AI has responsed to one reinforcement, the defence of the area would be totally invalid. I wonder if a function of saving current AIs' waypoints before reinforce and recover them after reinforce ended would be added.
  3. AI in vehicles do not check their weapon types, they will fire at infantry with AT cannons.

A clear and concise description of what the bug is.

To Reproduce No need to fill this part, right? As related infos are presented above.

Screenshots

  1. Screenshot related to the first issue. (I only got this one shot by one of the players, but I've reproduced the issue.) 屏幕截图(28)

  2. Screenshot related to the second issue. 107410_20190327151829_1

VCOM Version:

Additional mods used:

Freddo3000 commented 5 years ago
  1. I'm not sure how this is happening. The mines placed aren't actual "mine" objects, they are scripted objects that detonate when specifically an enemy is nearby. I'll need more info, is it mines or demo blocks?
  2. This is something currently planned.
  3. This is a mod issue, not a VCOM issue. It would have to do with a faulty config
GoldJohnKing commented 5 years ago
  1. Sorry I can't really understand what "demo blocks" are. According to my experience in 3.1 release, when Zeus are controlling an AI unit with mines in inventory, the unit sometimes place mines regardless of Zeus' control, and those mines can be triggered by the unit itself. I'll see if they place real mines or something.
  2. That's great, thanks for your effort.
  3. I'm using vanilla FIA OPFPR as enemy faction, so it might not be mod issue? I'm not sure, I only found it happens on AT Pickup Truck of FIA and some AT jeeps of Syndicate.
Freddo3000 commented 5 years ago

By demo blocks, I mean demolition blocks/charges.

I don't think there's a single doFire or forceWeaponFire in VCOM, so I would be very suprised if VCOM was causing it.

GoldJohnKing commented 5 years ago

Okay, I get it. I've taken a close look. It's true demo blocks, and they detonate with a delay if players a nearby. The problem is they detonate without checking allies' distance, and they just detonate the blocks with tons of allies nearby. They even detonate the bomb with who place the bomb nearby.(I'm not sure if I reach the point.) Please see the picture below. 107410_20190327150739_1 - 副本

As for the third issue, I've just wondering if it's caused by ACE3. I would lately run a test without VCOM and see how they behave.

Freddo3000 commented 5 years ago

Acknowledged, will fix.

GoldJohnKing commented 5 years ago

Another related issue found.

All AIs nearby with demo blocks in their inventory would place a demo block, which means several demo blocks are placed and detonated at the same place. Could you also limit the maximum number of existing demo blocks around each house (or place) in the fix?

GoldJohnKing commented 5 years ago

Another related issue that may duplicate https://github.com/genesis92x/VcomAI-3.0/issues/81 . The parameter “AI place mine chance” seems to have no use. No matter what value is, from zero to 100, all AI with demo blocks would have it placed and detonated.

Freddo3000 commented 5 years ago

The logic for placing mines and demo blocks is separate

GoldJohnKing commented 5 years ago

I've read the new commit about the demo explosion, but I doubt if all those AI would automatically leave the demo after placed it. I think adding a pathfinding strategy that AI will try to escape from known explosions automatically would be better.

genesis92x commented 5 years ago

I went ahead and addressed this issue. The charges will wait for no friendlies to be around before they detonate.

If there is a cost efficient way to have potentially multiple AI path-find away from an explosive then I would love to implement that. The problem with giving AI movement orders during combat is that path-finding is costly on our precious CPU cycles. This is something I will continue to look into, but for now the explosives will not detonate if friendlies are near-by

GoldJohnKing commented 5 years ago

Yeah, I get it. We await your new release.