Author Topic: Tactical Tanks - Stopping AI racing forward with tanks  (Read 690 times)

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 811
  • The Few are many ;)
    • View Profile
    • Homepage
I'be been doing a bit of my own experimentation in order to see if AI tanks can be prevented from rushing forward. When they go too far beyond their own front line the entire thing just turns into a huge frag fest, especialy if there are anti-tank positions around and anti-tank soldiers. The key to tactical use of tanks is staying with the infantry.

I have attached "aibehaviours.ai" from "mods\fh2\ai\". I altered lines 98 and 99.

aiSettings.setBehaviourModifier Avoid      8.0
aiSettings.setBehaviourModifier MoveTo      0.3


As well changing the default behaviour on line 264.

aiSettings.setVehicleDefaultBehaviour    Tank   Avoid

Initial testing shows tanks holding back more often although they still do some travelling ahead of infantry to objectives. There is also more manourvering going on and with some tanks firing from standstill at positions at a distance. I even saw a tank "panicking" and reversing quickly away from an enemy tank while firing (attached image, tank at right of image). Never seen that before. There appears to be avoidance of infantry as well. A good idea as many of them are usually antitank class.

Tests continue.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Tactical Tanks - Stopping AI racing forward with tanks
« Reply #1 on: 03-03-2012, 10:03:26 »
How fucked up was what Legion did earlier. He did manage to achieve this somewhat in 2.2, there about, but as i understand it his code is so convoluted (or has become so due to changed Drawde made) and i'm not sure tanks act the same way they were initially intended.

was there anything in it that was salvageable? Or you needed to start from scratch.


Also, can we see if various classes of tanks can fire at various ranges?

We have the light tanks classed as helicopter, medium tank as tank and heavy tank as 'Ship'
Is it possible to make the latter fire standing from furthest, the others fire at a gallop until the medium gets to its optimum distance i.e. for 50 - 75mm guns and fire standing from there, while the light tank moves in closer?


Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 811
  • The Few are many ;)
    • View Profile
    • Homepage
Re: Tactical Tanks - Stopping AI racing forward with tanks
« Reply #2 on: 03-03-2012, 21:03:52 »
I regard previous SP Devs as having done a very good job. I know this because I have shell shock and get flash backs after escaping by the skin of my teeth from an FH SP battle  ;D

From what I've seen it is possible to give vehicles different aiming characteristics but that would seem to be a longer term project. Just giving tanks a better idea of self-preservation is a huge game changer.

EDIT: However I did find this ...

"mods\fh2\objects_vehicles_server.zip\Vehicles\Land\Common\ai\objects.ai" which appears to provide generic control, view and firing options the the AI. If this is what I think it is then it can be cloned and tuned up for individual vehicle AI characteristics.
« Last Edit: 04-03-2012, 16:03:30 by DJ Barney »