Author Topic: AI teamkilling in tanks  (Read 41 times)

Offline mft004

  • Newbie
  • *
  • Posts: 43
    • View Profile
AI teamkilling in tanks
« on: 14-01-2022, 11:01:56 »
sorry it's me again with another question stemming from my singleplayer sub-mod attempt. Basically it seems that the ai when driving a tank ignores checking whether there are any friendly vehicles in the way of a shot to hit an enemy vehicle; the common scenario is that two tanks are firing away at each other and a third tank from one side then joins in, but approaches behind the other friendly tank and fires a shot that teamkills the buddy, which would otherwise have hit the enemy.
I don't see this issue in terms of small arms fire; its rare to see a bot accidentally kill me or another bot with a rifle or machine gun etc, they tend to dodge or just hold fire. Would anyone know what rule is different when they're in vehicles, causing them to be clumsy? I'm guessing it's something to do with their awareness of the hit boxes for the friendly vehicles, but would welcome any input wizards out there might have. If I could find a fix it would make tank battles a bit better.
At first I thought that the fault could lie with the weaponTemplate.deviation and weaponTemplate.allowedDeviation lines pertaining to vehicle weapon ai instructions, with the idea that the bots aren't intending to hit their friend's tank but the deviation causes it instead. However this seems less likely as based on what I've seen ingame, one tank may be driving right behind the friendly tank and point-blank shoots it assuming there's nothing in the way between it and my tank opposing it.
I did ask the ai whether they'd like to comment on their actions but they said nothing.

Kind regards,
« Last Edit: 14-01-2022, 14:01:41 by mft004 »

Offline SadCamelion

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: AI teamkilling in tanks
« Reply #1 on: 14-01-2022, 16:01:04 »
This is a good question I also always wondered about. That they included kind of a failsafe for infantry, but not for tanks... I think not even the devs know either, but you might want to ask in the discord about it as it is more popular.
There aren't enough Italian tanks.