Page 1 of 1

Undesired behavior with Tanks

Posted: Mon Nov 14, 2011 7:04 am
by Zero Angel
I've noticed a problem with ships using "TankFriend/TankEnemy" AI. The problem is that when a group of tanks is told to attack a target, the first one will begin to fire, but the other ones will constantly drive around the target trying to get a better position (and often not even facing/shooting the target).

Does anyone know a good workaround to this problem without switching away from the TankFriend/TankEnemy AI? I have tried SentryProcess and AttachWingman, and they both have undesired side effects (like not strafing enough when told to defend a building, making them snipable)

Re: Undesired behavior with Tanks

Posted: Mon Nov 14, 2011 7:07 am
by bigbadbogie
The mortar bike sub-attack task was given to the stock 1.3 sabre to prevent this. Not sure if it worked.

MorphTankFriend/Enemy is another option, but I have been getting random freeze-crashes using it recently.

Re: Undesired behavior with Tanks

Posted: Mon Nov 14, 2011 7:50 am
by Cyber
I am having the same problems with ai-attilas in ST's. AI walkers are circling/running around the target searching for a better position to shoot, but they already could shoot from the position where they are.

Re: Undesired behavior with Tanks

Posted: Mon Nov 14, 2011 10:26 pm
by Nielk1
I know the best repo cases for bugs are ones that can show the bug within seconds. Perhaps make some repo cases for these issues and we can try to get GSH to poke the AI. Its probably something he doesn't want to mess with but having a repo case that allows for instant testing always helps.

Re: Undesired behavior with Tanks

Posted: Mon Nov 14, 2011 10:58 pm
by Zero Angel
An easy repo case because it can be tested in the editor. Open the editor on a map like quarry.bzn or dunesi.bzn. Place several ivtanks on one side of the hill, place ibscup on another side and order the tanks to attack the extractor, observe their behavior.

Re: Undesired behavior with Tanks

Posted: Tue Nov 15, 2011 6:02 am
by Nielk1
When I have time (it might be a bit) I will get a save made and onto the bug tracker. Someone else can do it first if they want it done in a timely manner.

Re: Undesired behavior with Tanks

Posted: Tue Nov 15, 2011 8:10 pm
by Red Devil
may be due to attack task using the traditional groups and leaders:

[CraftClass]
AttackTaskUsesGroups = true

[CraftClass]
GotoTaskHasLeader = true // if true, gotos will be done in a leader/follower model

i set those to false in all craft in G66 and don't see them doing that. also, in Fleshstorm awhile back when testing it/playing with it and set them in FE/Uler/ZTV/wherevers.

Re: Undesired behavior with Tanks

Posted: Tue Nov 15, 2011 10:11 pm
by Zero Angel
Red Devil wrote:may be due to attack task using the traditional groups and leaders:

[CraftClass]
AttackTaskUsesGroups = true

[CraftClass]
GotoTaskHasLeader = true // if true, gotos will be done in a leader/follower model

i set those to false in all craft in G66 and don't see them doing that. also, in Fleshstorm awhile back when testing it/playing with it and set them in FE/Uler/ZTV/wherevers.
I will test those out in a variety of situations and report my findings.

Re: Undesired behavior with Tanks

Posted: Wed Nov 16, 2011 12:21 am
by Nielk1
Think tasks other than goto are getting leaders?

Re: Undesired behavior with Tanks

Posted: Wed Nov 16, 2011 2:39 am
by S.cavA.rmyG.en
try this.

Code: Select all

[CraftClass]
CanAIPForceIdle = false
attackRange = 365.0
AttackTaskUsesGroups = false
AttackTaskBlastDist = 360.0
ClosestEnemyGoodEyes = true 

Re: Undesired behavior with Tanks

Posted: Wed Nov 16, 2011 2:19 pm
by Zero Angel
I'm investigating scavengers getting stuck on power generators. I did create some ODF tunnel definitions on PGens to try and give the AI more accurate pathing, but AI, or more specifically scavenger AI seems to 'cut corners' just a little bit and this combined with the design of the powergen's collision box causes the scavs to get stuck.

I think this could possibly be fixed by beveling the collision box of the PGens just a bit near the corners. The problem is that due to the pipes that stick out at the corners, combined with a more beveled collision box (ie: so it looks slightly like an octagon rather than a square from birds-eye view), would make a good hiding spot for snipers in human vs human games. That would be fixable by pushing in the pipes just a tiny bit when editing the collision box. I don't have access to the proper editing tools though.

I think the other method might be to create some kind of 'push' physics that sort of push units towards the corner of the collision box. An ugly hack for this might be to tap a magnet type device (ie: m-curtain) to the PGens.

Re: Undesired behavior with Tanks

Posted: Wed Nov 16, 2011 2:52 pm
by S.cavA.rmyG.en
I think the other method might be to create some kind of 'push' physics that sort of push units towards the corner of the collision box. An ugly hack for this might be to tap a magnet type device (ie: m-curtain) to the PGens.
it would need a team filter and only effect objects not ordence.

Re: Undesired behavior with Tanks

Posted: Wed Nov 16, 2011 5:52 pm
by Ded10c
Why a team filter?

Re: Undesired behavior with Tanks

Posted: Thu Nov 17, 2011 10:24 pm
by Zax
When I get back into testing I will check it out.

Careful with poking the AI, for as GSH has said multiple times when you poke the AI the AI will maul your face off.

I was also planning on tinkering with the PSUP the same way I tinkered with the armory but aiming for different results. Scavs can no longer get caught in the armory in the testing version. Wonder if I am onto something.