Author Topic: Tank movement fixing thread  (Read 1061 times)

Offline ksl94

  • Jr. Member
  • **
  • Posts: 739
  • British Imperialist
    • View Profile
Tank movement fixing thread
« on: 13-11-2011, 21:11:32 »
All right, fellow SP-fans, I think that I might have found a first step in keeping the bots from riding tanks as if they were DUI  :D . If you will open the file  aipathfinding.ai you will find quite some parameters that look promising. Have a look a that:
rem ----- Host
rem ----------------------------------------------------------------------------

rem radius 45, centre -636/92/-31
aiPathfinding.createMap Infantry
aiPathfinding.map.maxSlope 30
aiPathfinding.map.headClearance 1.9
aiPathfinding.map.radius 0.15
aiPathfinding.map.allowedHeightDiff 5

aiPathfinding.createMap Vehicle
aiPathfinding.map.maxSlope 20
aiPathfinding.map.headClearance 3.5
aiPathfinding.map.radius 1.8
aiPathfinding.map.allowedHeightDiff 5.0

aiPathfinding.maxWaterDepth 0.7

aiPathfinding.traceMap Infantry

rem ----------------------------------------------------------------------------

That seems to have to do with the way the AI acts when driving a vehicle, doesn't it? Please note that I'm quite coding noob, can somebody clarify if this is correct?
If so, goodbye Good Failwood!  ;D

Offline ballard44

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Tank movement fixing thread
« Reply #1 on: 14-11-2011, 00:11:37 »
No, this file has more to do with the parameters of creating a navmesh, not why a bot can't drive his tank (or any other vehicle) better.




Offline ksl94

  • Jr. Member
  • **
  • Posts: 739
  • British Imperialist
    • View Profile
Re: Tank movement fixing thread
« Reply #2 on: 18-11-2011, 20:11:55 »
Well, the this thread may be used to analyze the problems and to post found solutions. I wonder who changed the files for 2.4? This developer could be very helpful in fixing this. As stated before, I don't have much coding experience  ;D .

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Tank movement fixing thread
« Reply #3 on: 26-11-2011, 06:11:40 »
Tank movement can be most directly affected by changing the turn radius and max speed values in each vehicle's 'objects.ai' file.

The thing about FH2 armor is that most vehicles need to accelerate slightly to effectively turn, therefore the relationship between turn radius and max speed may not be immediately obvious. By contrast, vanilla bf2 tanks can turn effectively while at a standstill.

Offline ksl94

  • Jr. Member
  • **
  • Posts: 739
  • British Imperialist
    • View Profile
Re: Tank movement fixing thread
« Reply #4 on: 24-01-2012, 20:01:39 »
Does anyone know which developer initially made all those changes? If yes, we could simply ask which files he had modified to make bots drive the way they do now and therefore give us the ability to fix that.

Offline Tankbuster

  • Jr. Member
  • **
  • Posts: 921
    • View Profile
Re: Tank movement fixing thread
« Reply #5 on: 25-01-2012, 17:01:53 »
Does it improve the bot tank handling?

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Tank movement fixing thread
« Reply #6 on: 31-01-2012, 08:01:32 »
Quote
Does anyone know which developer initially made all those changes? If yes....

No single dev took the tanks one day and just changed everything at once, nor did the AI code change in a single revision and suddenly make the tank behavior worse.

FH2 AI has evolved over time through the efforts of many talented people, so it is a more complex process to fix things than just comparing and contrasting a few major changes.

If it makes anyone feel any better, I do have tank movement improvement high on my priority list of things-to-do.

Of course if anyone does make some real headway on this before I get to it, I would love to know the method used to improve tank navigation. Seriously, I would be thrilled. I think we all would be.

Quote
Does it improve the bot tank handling?

If you are talking about the code lines in the first post: No.

Offline Tankbuster

  • Jr. Member
  • **
  • Posts: 921
    • View Profile
Re: Tank movement fixing thread
« Reply #7 on: 31-01-2012, 09:01:16 »
Ok, thanks