Author Topic: Bot Navigation Tweaks  (Read 10179 times)

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Bot Navigation Tweaks
« on: 20-11-2010, 13:11:06 »
Bots are known to hesitate when crossing narrow streets or overgrowth or ditches.

I've done two simple things:

Changing values in ai.ai

aiPathfinding.setActiveMap Vehicle
aiPathfinding.map.maxSlope (28)
aiPathfinding.map.addVehicleForClusterCost Tank
aiPathfinding.map.addVehicleForClusterCost ArmedCar

Changing values in aipathfinding.ai

aiPathfinding.createMap Vehicle
aiPathfinding.map.maxSlope (20)
aiPathfinding.map.headClearance (3.5)
aiPathfinding.map.radius 2.5
aiPathfinding.map.allowedHeightDiff (5)

And at least, in my PC they successfully do this in Goodwood:



I dunno if this is the result i should have expected when increasing the encased () values.

The hanomag in first pic, finally crosses the underpass smoothly with little hesitation. The Goodwood Panther drive through the railway now, they don't reverse and forward too many times. Lastly, the Panzer 4 was shown to be able to cross the underpass too, not only the hanomag!
« Last Edit: 20-11-2010, 13:11:48 by ZooMotorpool »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #1 on: 20-11-2010, 14:11:54 »
Sweet! Great going, zM. Will give this a whirl

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #2 on: 21-11-2010, 00:11:42 »
Cool Zoo. Looks like progress.

I'm working on a FH2 vehicle AI mod, which I may or may not ever release, but I will add your changes to Goodwood and see how it affects tank behavior.

My vehicle mod is two main parts. First is a rewritten AIBehaviors.ai file, and the second consists of vehicle specific AI tweaks. I've been getting good results by increasing slightly the turn radius for the tanks in their "Mobile" AI plugins.

I've noticed also that the basic temperatures for all the main vehicle seats are extremely high, while the passenger seats have much lower basic temps. I think this is why I see bots bailing from tank passenger PCOs more often than I would usually expect.

Anyone know why the basic temperatures of the vehicles are set so high?

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: Bot Navigation Tweaks
« Reply #3 on: 21-11-2010, 03:11:40 »
I think it was during the 2.25, when LegionDCX modded the AI for vehicles to improve their bot-vehicle interaction.

At that time, too many times, the bot abandoned their tanks to cap more "important" objects such as capping flags, leaving their tanks behind fences/walls that disallow tanks to go through the flag cap area.

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: Bot Navigation Tweaks
« Reply #4 on: 21-11-2010, 07:11:19 »
Remick was playing with temp's at one point to try and eliminate a problem.

Problem was bot's were manning the passenger seats, but not the driver's.

This resulted in bots camping on tanks, and on Luttich in particular, you'd only see one lone tank arriving at the town every 5 minutes or so. They were much more inclined to walk from the main to the town, rather than drive a tank... ::)

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #5 on: 21-11-2010, 10:11:28 »
In Brest it is a real issue with the bots sitting on the top mg and hull mg but not the driver position

Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #6 on: 21-11-2010, 10:11:54 »
In Brest it is a real issue with the bots sitting on the top mg and hull mg but not the driver position

The M3A1 spawned in that map,has that problem because
the driver has a basic temp of 125,and the gunner has a basic temp of 150

Quote
rem *** AITemplate ***
aiTemplate.create M3A1_AI
aiTemplate.addType ITBiological
aiTemplate.addType ITGround
aiTemplate.addType ITMobile
aiTemplate.addType ITHasWreck
aiTemplate.addType ITTransportation
aiTemplate.degeneration 10
aiTemplate.allowedTimeDiff 2
aiTemplate.basicTemp 125 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
aiTemplate.commonKnowledge 0
aiTemplate.addPlugIn M3A1_AIMobile
aiTemplate.addPlugIn M3A1_AIPhysical
aiTemplate.addPlugIn M3A1_AICover
aiTemplate.addPlugIn M3A1_AIUnit
aiTemplate.addPlugIn M3A1_AICtrl


rem *** AITemplate ***
aiTemplate.create M3A1_Gunner
aiTemplate.addType ITUnit
aiTemplate.addType ITBiological
aiTemplate.addType ITGround
aiTemplate.degeneration 15
aiTemplate.allowedTimeDiff 2
aiTemplate.basicTemp 150 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
aiTemplate.commonKnowledge 0
aiTemplate.secondary 1
aiTemplate.addPlugIn M3A1_GunnerArms
aiTemplate.addPlugIn M3A1_GunnerUnit
aiTemplate.addPlugIn M3A1_GunnerCtrl

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #7 on: 21-11-2010, 13:11:22 »
thanks will take a look at that

Thanks zM. Will check this out when I can.

Oh, btw, can both of you give the the complete path to where I plug these changes? only Ai.ai I could find was in the ESAI folder and I doubt that's it.
« Last Edit: 21-11-2010, 14:11:28 by djinn »

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: Bot Navigation Tweaks
« Reply #8 on: 21-11-2010, 17:11:02 »
The ai.ai is in every map's server.zip 'AI' folder. While the AIpathfinding.ai is in FH2\AI folder.

Remick was playing with temp's at one point to try and eliminate a problem.

Problem was bot's were manning the passenger seats, but not the driver's.

This resulted in bots camping on tanks, and on Luttich in particular, you'd only see one lone tank arriving at the town every 5 minutes or so. They were much more inclined to walk from the main to the town, rather than drive a tank... ::)

I remember this. When there is an abandoned tank or vehicles near the frontlines, bot used to wierdly man silly positions of the vehicle, such as passenger or hull gunner instead of the driver, making them useless and AT bait.

In Brest it is a real issue with the bots sitting on the top mg and hull mg but not the driver position

The M3A1 spawned in that map,has that problem because
the driver has a basic temp of 125,and the gunner has a basic temp of 150

This is one of the reason why Remick make the tempt of the gunner position higher than the driver.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #9 on: 22-11-2010, 08:11:19 »
Only the aipathfinding.ai required a change from aiPathfinding.map.radius 1.8 to 2.5

ai.ai was exactly the same in my Goodwood map. Are you using Remick's patch for Goodwood? The one he included with Lebisey navmesh files etc?

Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #10 on: 22-11-2010, 08:11:30 »
This is one of the reason why Remick make the tempt of the gunner position higher than the driver.

That doesnt make sense
because it is the cause of the bot manning the gun and not the driver position

I dont recall ever seeing,and can not think of any logical explanation,why the driver position would not have the highest basic temp of all available positions

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #11 on: 22-11-2010, 08:11:51 »
Totally agree with Devilman on this one.
Where is that file? I want to fix vehicle position preference, but don't know where to do it


Also, @ zM

Tried the value changes. I really think the fault is from the vehicles themselves. I stood at the dikes and watched a PzIV try to cross it. It reversed and moved foward, reversed some 30feet, then moved foward again. This never was the case in Drawde's mod, and that didn't touch the map AI.ai. Also, it seems the Brit tanks now play it more cautiously, perhaps due to their assumption of the slope of the terrain?

If you recall, tanks were more likely to push through the narrowest of corridors than reverse and try over. Once the navmesh said they could, they did.

Can someone look into Drawde's files and see the values he used? I think that would solve it once and for all. I totally miss seeing tanks on both sides charging through the brush at one another. The main battle area was south of the rails, whoever won that bout, either capped the Marder base or moved across the rail to cap the base next to the German main. And any change in the vehicles should work for all maps too.

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: Bot Navigation Tweaks
« Reply #12 on: 22-11-2010, 13:11:14 »
This is one of the reason why Remick make the tempt of the gunner position higher than the driver.

That doesnt make sense
because it is the cause of the bot manning the gun and not the driver position

I dont recall ever seeing,and can not think of any logical explanation,why the driver position would not have the highest basic temp of all available positions

On Halftracks, when they are abandoned near frontlines, the most logical choice is to grab them and man the gunner position. Use the MG to gun down any oppositions before driving through. But this is not a permanent solution.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #13 on: 22-11-2010, 14:11:28 »
Actually you've got a point. I recall in Fh1, where an enemy in a hanomag would get to a flag or in fact, when they approach me (a hostile), they change position to mg, switching back only after I no longer appear to be a threat - Rarely, but I do note this with Fh2 bots once they get to their destination. Still, A tank has its own defenses, so it doesn't need a switch position, and it causes more damage than good with tanks parked at the main bases and manned at all mg positions, but NOT the driver's position

oh, and about where to change these values? Is it in the independent vehicle files?

Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #14 on: 22-11-2010, 14:11:17 »
On Halftracks, when they are abandoned near frontlines, the most logical choice is to grab them and man the gunner position. Use the MG to gun down any oppositions before driving through. But this is not a permanent solution.

There is a code that makes abandoned vehicles self destruct,in turn, making a new one respawn at the original position

Also most maps only spawn 1 vehicle at a time,and between 30 & 240 seconds
For SP (on a decent PC) much more enjoyment can be had by increasing the number of each vehicle spawned,and decreasing spawn time