Forgotten Hope Public Forum

Forgotten Hope 2 => Singleplayer and Coop => Topic started by: Zoologic on 20-11-2010, 13:11:06

Title: Bot Navigation Tweaks
Post by: Zoologic 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:

(http://img.photobucket.com/albums/v242/Johnsy/Battlefield/FH2/th_GoodwoodHanomagdriverpass.jpg) (http://smg.photobucket.com/albums/v242/Johnsy/Battlefield/FH2/?action=view&current=GoodwoodHanomagdriverpass.jpg)(http://img.photobucket.com/albums/v242/Johnsy/Battlefield/FH2/th_GoodwoodPanthersees2Sherman.jpg) (http://smg.photobucket.com/albums/v242/Johnsy/Battlefield/FH2/?action=view&current=GoodwoodPanthersees2Sherman.jpg)(http://img.photobucket.com/albums/v242/Johnsy/Battlefield/FH2/th_GoodwoodPanthercrossedrailroad-1.jpg) (http://smg.photobucket.com/albums/v242/Johnsy/Battlefield/FH2/?action=view&current=GoodwoodPanthercrossedrailroad-1.jpg)(http://img.photobucket.com/albums/v242/Johnsy/Battlefield/FH2/th_Pz4successfullycrossunderpass.jpg) (http://smg.photobucket.com/albums/v242/Johnsy/Battlefield/FH2/?action=view&current=Pz4successfullycrossunderpass.jpg)

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!
Title: Re: Bot Navigation Tweaks
Post by: djinn on 20-11-2010, 14:11:54
Sweet! Great going, zM. Will give this a whirl
Title: Re: Bot Navigation Tweaks
Post by: Void 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?
Title: Re: Bot Navigation Tweaks
Post by: Zoologic 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.
Title: Re: Bot Navigation Tweaks
Post by: cannonfodder 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... ::)
Title: Re: Bot Navigation Tweaks
Post by: djinn 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
Title: Re: Bot Navigation Tweaks
Post by: Devilman 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
Title: Re: Bot Navigation Tweaks
Post by: djinn 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.
Title: Re: Bot Navigation Tweaks
Post by: Zoologic 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.
Title: Re: Bot Navigation Tweaks
Post by: djinn 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?
Title: Re: Bot Navigation Tweaks
Post by: Devilman 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
Title: Re: Bot Navigation Tweaks
Post by: djinn 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.
Title: Re: Bot Navigation Tweaks
Post by: Zoologic 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.
Title: Re: Bot Navigation Tweaks
Post by: djinn 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?
Title: Re: Bot Navigation Tweaks
Post by: Devilman 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
Title: Re: Bot Navigation Tweaks
Post by: djinn on 22-11-2010, 14:11:56
You'd still have the issue where a bot driving to the front comes across someone else and doesn't switch position to the defensive mg, but drives on or runs into a PIAT or zook rocket


I for one would love to see something like this implemented for the Marder and wespe, so that if only 1 bot is on it, it would do like Fh1 bots did, drive it to a point, change position and fire from a static position, changing back to driver position if need be, to cap a flag or something


Oh, and AGAIN, please let me know where I edit those values for vehicle position preference
Title: Re: Bot Navigation Tweaks
Post by: Remick04 on 22-11-2010, 17:11:53
I don't recall doing anything with the basic temps of vehicles. What basic temps levels are there are either Drawde's or Legion's doing. I may have fiddle around with the basic temp of a couple vehicles to make bots favor them over others, but I think I only did that with aircrafts.

I certainly wouldn't make the MG gunner position of higher value over the driver. But thank you Devilman for pointing that out, I'll try and fix it. Part of the problems with doing AI for FH2 is there are so many different vehicles and weapons most of which have their own AI that it's easy of little problems like this to fall through the cracks. I lose track of what vehicle or weapon files have been updated, and with new vehicles and weapons being added I lose track even further.

The only real changes to vehicle behavior I did from Drawde's AI was change the turn radius on most vehicles. I notice vehicles with a turn radius of '2' where having an easier time navigating the maps over vehicles with a turn radius of '5'. So I changed most of them to have a turn radius of '2' and notice some improvement so I kept it. You can try changing their turn radius back to '5' see if that improves anything.

Otherwise it's something in the aibehaviors.ai file that causing the bots to be "shy" in narrow areas. I've been fiddling around with my aibehaviors.ai file to try and figure out how to get infantry to aim down their sights. So my files are different than yours, and although I do see them get hung up on the occasional narrow path or corner, I doesn't seem to me as terrible as you guys are describing. Void seemed to notice some problems with the aibehaviors files so I'm hoping he can help smooth out vehicle movements for all of us. I'm not sure what I did that’s different than drawde's files other than the turn radius and increased ranges of engagement. It's possible the new ranges have bots in tanks trying to engage enemies that they previously where ignoring and that's why they seem to be driving differently.
Title: Re: Bot Navigation Tweaks
Post by: djinn on 22-11-2010, 18:11:16
In most cases, it isn't, but you should see the German tanks in Goodwood, and you'd understand the concern.

About the ironsight aiming, you really should see why the G43 is handled differently. Its not done as much as say a gun in PR, but it happens at least 70% of the time with that gun compared to any other

Title: Re: Bot Navigation Tweaks
Post by: Void on 22-11-2010, 20:11:44
Quote
Void seemed to notice some problems with the aibehaviors files so I'm hoping he can help smooth out vehicle movements for all of us

I guess that's my cue.

 Yeah, I've been working on FH2 vehicle AI. I've rewritten most of the AIBehaviors.ai file, and am also tweaking individual vehicle AI. I haven't yet messed with any PCO temperature settings.

I've made Goodwood my test map, and added in an extra PZIV for the Germans to have at map start. The pziv has no trouble crossing the underpass or going over the railroad. Neither does the Axis halftrack (sdkfz251_d).

In the tanks I'm working on, I have the turn radius set to 3.0, and the max speed I increased to 12 (from 10). I've decreased the value for throttle sensitivity a little, and for yaw sensitivity a lot. This, combined with increasing the lookahead values for both params, seems to help a great deal. I also increased the angle of the yaw scale slightly (don't know yet if this last is helping or hurting).

For pictures of the German halftrack and PZIV using the underpass and crossing the railway,  look at this photobucket album. (http://s1031.photobucket.com/albums/y376/void249/FH2%20Vehicle%20AI%20Mod/)

I still don't feel like I'm all the way there, but I will probably soon post a beta of the work done on my "mini mod" so far. Should I use a separate thread for that? I don't want to completely hijack this one.

Title: Re: Bot Navigation Tweaks
Post by: djinn on 22-11-2010, 21:11:23
Well, it IS on the same topic so I don't personally see a problem with it being right here

Aren't you totally changing tank handling then? Rather than how bots use tanks?
Title: Re: Bot Navigation Tweaks
Post by: Void on 22-11-2010, 23:11:36
No, I'm not touching the actual tank controls. I'm not about to change that. I like the way FH2 tanks handle, honestly.

I am rewriting the AI templates for the tanks. I am changing the instructions for the bots regarding how exactly to handle a tank, in other words.

I have so far somewhat reduced the pointless cycle of backing up,going forward,backing up....and on and on.

In the tanks I've been working with, I am seeing more actual turning in both forward and reverse, and the bots are making some actual course corrections in this process.

 It is far from perfect, but I just ran a test on both Goodwood and Mareth Line, with and without my changes. I'm seeing better tank behavior on both maps with the new AI code.

I'm not limiting my changes to tanks, and have already rewritten the basic behaviors for all the vehicle types, but at this point I've only tuned the individual AI for most of the tanks and halftracks. I haven't started working on cars/trucks yet.

Interestingly enough, the only time I'm getting traffic jams on the Mareth Line bridges is when a truck sneaks in and blocks the way (backing up, going forward...) for the Crusaders and the Shermans.
Title: Re: Bot Navigation Tweaks
Post by: djinn on 22-11-2010, 23:11:27
I would advice you use Drawde's approach in your minimod. So that rather than having fans replace every single vehicle code, they simply need to drop in a folder or zip and replace their serverarchives.con file to point to your patch.

Great work. can't wait to try it out
Title: Re: Bot Navigation Tweaks
Post by: Void on 22-11-2010, 23:11:58
Quote
....rather than having fans replace every single vehicle code, they simply need to drop in a folder or zip and replace their serverarchives.con....

That is the approach I am taking. I have a server side archive that consists of nothing but the new vehicle AI templates. The only other extra is the new aibehaviors.ai file I'm working on, which will also need to be added.
Title: Re: Bot Navigation Tweaks
Post by: djinn on 23-11-2010, 00:11:59
you are the man :-D
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 23-11-2010, 02:11:04
That is the approach I am taking. I have a server side archive that consists of nothing but the new vehicle AI templates. The only other extra is the new aibehaviors.ai file I'm working on, which will also need to be added.

If your doing that,you may also want to run FH2 through the debugger,as there as a few vehicles with faulty,mistyped,missing or incorrect AI templates/plugins

sorry i dont recall which ones they are
Title: Re: Bot Navigation Tweaks
Post by: cannonfodder on 23-11-2010, 10:11:41
@Remick: Sorry mate, bit of a brain-fail there, I meant Drawde... ;)


The whole problem with trying to fix FH2's AI is it was a hastily slapped together pile of shit to start with, and I mean no offence to the person(s) responsible, I have little doubt they'd agree.

But regarding tank behaviour, I did notice that with ESAI, they don't seem to persist as long with a gap they are having trouble with. They'll have a few go's, then try a different route/approach, as opposed to endlessly going back 'n forth on the spot.

It's probably just a side effect of them being more focused... :-\



Great sig too Void...
Title: Re: Bot Navigation Tweaks
Post by: Void on 23-11-2010, 15:11:21
Quote
The whole problem with trying to fix FH2's AI is it was a hastily slapped together pile of shit to start with, and I mean no offence to the person(s) responsible, I have little doubt they'd agree.

I sorta get that feeling too, going through it. Many vehicles have AI templates that aren't even used when you look at the tweak file.

I'm slowly slapping together my own dung pile, but I think there is a chance it may be an improvement. We will see what we will see when I have a passable beta to post.

Title: Re: Bot Navigation Tweaks
Post by: djinn on 23-11-2010, 15:11:40
And rest assured, Remick_04 has proven he can reverse engineer any good addition to make it part of the build. I say, the days or reinventing Fh2 AI are behind us. Go for it!
Title: Re: Bot Navigation Tweaks
Post by: Remick04 on 23-11-2010, 17:11:44
I sorta get that feeling too, going through it. Many vehicles have AI templates that aren't even used when you look at the tweak file.

I'm slowly slapping together my own dung pile, but I think there is a chance it may be an improvement. We will see what we will see when I have a passable beta to post.

I've been finding that with the weapons files also. The whole idleling bots on Operation Cobra is due to faulty AI for the colt1911. Same goes for the idle bots on Totalize with the bhipo.

So take your time Void, it seems the more hastily done things are the more likely little mistake occur, especially with so many files to manage.
Title: Re: Bot Navigation Tweaks
Post by: Void on 24-11-2010, 03:11:49
I'm not rushing this project. It will be finished when I finish it.

 I've uploaded two videos that show some of my progress. The vids are of the British motorpool in Mareth Line - a before and after comparison. (I've done work on all the brit vehicles on Mareth.)

I'm running ESAI in both clips. The "After" clip is using all my new vehicle code. Oh yeah, I actually named this project the "VAI minimod". "V" stands for vehicle, unless it stands for Void. Take your pick.

Clips:

Mareth Motor Pool before VAI (http://www.youtube.com/watch?v=T6ZUihebW_M)

Mareth Motor Pool after VAI (http://www.youtube.com/watch?v=llDifuXWrJc)

Title: Re: Bot Navigation Tweaks
Post by: im_a_lazy_sod on 24-11-2010, 04:11:32
very nice  ;D

good work - keep it up  8)
Title: Re: Bot Navigation Tweaks
Post by: cannonfodder on 24-11-2010, 09:11:53
...The whole idleling bots on Operation Cobra is due to faulty AI for the colt1911...
It'd also explain the AT bots idling on Brest as well. Nice find boss... :)



@Void: Looks much better, although that gate isn't particularly narrow. They move more smoothly too by the look of it.

How do they handle the bridge crossing?

When the squad screen pops up near the end of the vid, most of the bots appear to be clustered at the bridge. But that could've been due to them all arriving there at the same time... :-\

And there's the real test for ya: How long does it take that traffic jam to clear?

Another good test: How do they handle the "barricade chicane" leading into Toujane?
Title: Re: Bot Navigation Tweaks
Post by: Void on 24-11-2010, 18:11:47
Quote
How do they handle the bridge crossing?

The tanks are doing much better at the bridge, but so is the German Stuka that usually blows them to pieces. I'm still finding that the trucks don't like the bridges so much, though they do seem to be crossing with a little less difficulty.

The biggest problem with those narrow bridges is that tanks like to shoot at targets on the other side before crossing. This delay results in vehicle jams that the Stuka puts an end to all too swiftly.

(I think I may have made the planes more dangerous, but I'm not really sure.)

Quote
When the squad screen pops up near the end of the vid, most of the bots appear to be clustered at the bridge. But that could've been due to them all arriving there at the same time...

Yeah, that is pretty much the situation. I can get all the vehicles to the bridge much more efficiently, so it is a greater challenge for them to all navigate around each other and get across it while under fire.

Quote
Another good test: How do they handle the "barricade chicane" leading into Toujane?

They handle it poorly, but they handle it better than they used to, if that makes sense. I've had multiple test runs where a brit tank made it all the way to the Toujane flag cap radius. I've seen this with both Shermans and Crusaders.

In summary, there is still much work to do, but things are getting a bit better.

Finally, I have a silly question: How to run FH2 under the debugger? Do I need to manually move some shader files around and just launch FH2 as I would any other mod? Is there an argument I can pass to FH2.exe ? I want to measure true vehicle max speeds, among other things.
Title: Re: Bot Navigation Tweaks
Post by: Zoologic on 25-11-2010, 04:11:20
The bots don't have to be human-perfect when driving vehicles. It is the map design which requires elite BF2 players do just that. FH2 is too cumbersome in some aspects, but this is realistic according to the real WW2 events, as German lines of defenses made by Rommel is really hard to penetrate IRL.

I think the bot target spotting range is a bit too far, they engaged targets with almost no priority. E.g. exposing itself, blocking narrow pathways, stopping in the middle of nowhere just because they spot a target and start exchanging fires (not to mention their somewhat poor marksmanship). They might not insta-gib players or other bots, but their gunnery skills are frustrating, and some tanks don't move at all until they destroy their target. It takes them quite a time to do just that.
Title: Re: Bot Navigation Tweaks
Post by: Void on 25-11-2010, 04:11:21
Quote
I think the bot target spotting range is a bit too far, they engaged targets with almost no priority. E.g. exposing itself, blocking narrow pathways, stopping in the middle of nowhere just because they spot a target and start exchanging fires

Hey zM. Don't worry, the bots will never be human-perfect tank drivers. I'm just trying to make them better.

I quite agree about engagement range, and it is frustrating when I watch a tank go into its Fire behavior when there are really no feasible targets in sight. I've been dealing with this in two ways. First is lowering the weight for the tank Fire behavior, the second is reducing the engagement distance from a kilometer to 750 meters. (I still think that is a bit far, but I didn't want to change it too much).

I spent a full day today in FH2 AI hacking, and have results to share. It is another video clip. This time, you get to see a PZIV navigate on Goodwood. It crosses the underpass, makes its way through a narrow fence gap (twice for some reason), crosses the railroad, and then gets blown to bits by a Sherman.

Thus is my progress to date. Anybody wanna see?

http://www.youtube.com/watch?v=VT7-xKQ11QU

It is 4 star entertainment, let me tell you.
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 25-11-2010, 07:11:28

I quite agree about engagement range, and it is frustrating when I watch a tank go into its Fire behavior when there are really no feasible targets in sight.

Bots will not fire at nothing
they precalculate every projectiles trajectory,and wont shoot unless they have a chance of hitting their target
Just because a human cant see any feasible targets,doesnt mean,that there arent any

by reducing their engagement distance,you can bring them more into the battle,instead of being 1km away
also with a longer engagement distance,their deviation should be reduced

A default BF2 & AIX tank,has an engagement distance of 150 meters,for their main weapon
1km is ridiculous

i just quickly looked,most FH2 tanks (that i looked at) have an engagement distance of 500
except for this one  :o

Quote
weaponTemplate.create M2A1_105mmgunHE_AI
weaponTemplate.indirect 0
weaponTemplate.minRange 25.0
weaponTemplate.maxRange 2500.0
Title: Re: Bot Navigation Tweaks
Post by: Void on 25-11-2010, 08:11:14
Quote
Bots will not fire at nothing

I'm running in AI debug mode. It shows what the bot's behavior is at any given moment. Bots are switching to the Fire behavior and trying to track a target and failing. It interferes with navigation sometimes.

Bots will not fire at nothing, but they will try to fire at a target yet fail to fire a shot at all.
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 25-11-2010, 09:11:57
Quote
rem *** Construct Tank weights ***
aiSettings.createBehaviourModifiers TankWeights
aiSettings.setBehaviourModifier Avoid      1.0
aiSettings.setBehaviourModifier MoveTo      1.25
aiSettings.setBehaviourModifier Idle      0.001
aiSettings.setBehaviourModifier Fire      9.0

try reducing the fire to 7.0
and increase move to 2.0
Title: Re: Bot Navigation Tweaks
Post by: cannonfodder on 25-11-2010, 09:11:19
...It is 4 star entertainment, let me tell you.

The lead actor didn't say anything and the plot was full of holes, other than that, very entertaining.


On a slightly more serious note: Underpass and rail crossing in one go without hesitation? Impressive... :)

Usually even if they make it through in one go, they creep through.
Title: Re: Bot Navigation Tweaks
Post by: djinn on 25-11-2010, 09:11:24
Nooo. Please dont reduce the firing range. Its one of the things I love in 2.3 :-(
Title: Re: Bot Navigation Tweaks
Post by: Zoologic on 25-11-2010, 12:11:53

i just quickly looked,most FH2 tanks (that i looked at) have an engagement distance of 500
except for this one  :o

Quote
weaponTemplate.create M2A1_105mmgunHE_AI
weaponTemplate.indirect 0
weaponTemplate.minRange 25.0
weaponTemplate.maxRange 2500.0

That's Howitzer gun artillery. They have to ridiculously increase the value so that bots will use arty effectively. Otherwise they are just manning the guns without doing anything real, since most arties are located far-off the battlefields.
Title: Re: Bot Navigation Tweaks
Post by: Void on 25-11-2010, 22:11:36
Quote
try reducing the fire to 7.0 and increase move to 2.0

Way ahead of you man, though I'm using slightly different values. I'm also using a custom urgency curve generator for the tank Fire behavior, and it seems to help reduce the time tanks spend tracking extremely distant targets.

Quote
Nooo. Please dont reduce the firing range. Its one of the things I love in 2.3 :-(

I'm not changing the tank weapon AI templates, most of which do indeed have a max range of 500 meters. I'm only changing the culldistance for all the vehicles. This value is the max range that a bot can "see" an object, though bot "visibility" can be further reduced with level specific AI settings.

There are two of these, though I am not sure which one takes priority over the other:

In init.con, we have GameLogic.MaximumLevelViewDistance X
And in \AI\ai.ai, we have aiSettings.setViewDistance X

Quote
On a slightly more serious note: Underpass and rail crossing in one go without hesitation? Impressive...

Heh. cF, that clip was for you. What about the fence gate navigation, huh? The bot was so proud of itself that it went through that gap twice.

There is still a spot on Goodwood where tanks/halftracks/anything still always get stuck if they wander into it. It is a cluster of trees past the rail crossing surrounded by a partial stone wall.

I haven't looked in the editor yet, but I suspect that the trees didn't create a big enough hole in the vehicle navmesh to get bots to go around them. In AI debug mode I can see the bot pathfinding lines, and in this particular area the bots are trying to navigate through the trees instead of going around.

Title: Re: Bot Navigation Tweaks
Post by: Devilman on 25-11-2010, 22:11:30
In init.con, we have GameLogic.MaximumLevelViewDistance X

is how far objects are visible,or cull distance/draw distance
normally used in conjuction with the fog distance



in \AI\ai.ai, we have aiSettings.setViewDistance X

is how far the bots can see enemies ingame
the one you want to change,(and it makes a noticable difference)
Title: Re: Bot Navigation Tweaks
Post by: Void on 25-11-2010, 23:11:40
Thanks for the info Devilman. Was never sure on those two settings.

Can you by chance tell me how to load FH2 in the debugger, as I was asking in one of my posts above? I'm using AI Debug Mode in the retail game right now, but I really want to see the true vehicle max speeds...
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 26-11-2010, 00:11:18
Can you by chance tell me how to load FH2 in the debugger,

Most maps crash the debugger before it finishes loading a map unfortunately
so you cant play in debug mode
Title: Re: Bot Navigation Tweaks
Post by: cannonfodder on 26-11-2010, 11:11:06
...The bot was so proud of itself that it went through that gap twice...
Maybe he was showing-off for the camera... :)

It's just as good as the other two, but I haven't seen many traffic jams at the gate. It usually happens at the underpass...one tank will get halfway through then inexplicably try to chuck a U-turn and end up getting jammed in there.

Or at the crossing...one will to 'n fro at the rail and the rest just pile up behind him.
Title: Re: Bot Navigation Tweaks
Post by: Remick04 on 27-11-2010, 00:11:51
I set the culldistance of all vehicles to 1000 for the sake of getting to the arty to be more than just a direct fire short range support, and actually have some range to them.... I fiddled around with different ranges of culldistances but settled with 1000. Though the GameLogic.MaximumLevelViewDistance X  and aiSettings.setViewDistance X on some maps tends to render the 1000 cull distance excessive, I found that that this distance was ideal for Arty on most maps that and the battlefield was more alive with it.

I can understand that tracking distant targets is interfering with the bots driving ability, but I can't imagine it so unbearable that we have to limit other aspects of gameplay. But maybe that’s just my own pride speaking over all the work I put into finding the ideal range.

Honestly it feels like you guys are making a mountain out of a mole hill. I know the bots maneuvering was far from perfect and I am looking forward to any improvements Void or anyone. But outside of scripting them to move the same way every time (which would be boring) you will always find perplexing behaviors in the bots. It's no different then the freewill of human players. I've played plenty of online games where people's behavior can be just as erratic and idiotic as FH2's bots currently are. Parking tanks in the middle of the only path to the enemy because they saw targets to engage but ultimately cause a traffic jam that got the whole group killed, happens online and in the real world too. Again, It's not that I think things can't or shouldn't be improved, merely saying that just because things aren't set up in game the way you think it should be set up, doesn't mean it's broken.

Title: Re: Bot Navigation Tweaks
Post by: Devilman on 27-11-2010, 01:11:52
Just a note,most all FH2 maps are designed without SP in mind
They say,"that the narrowest part of a vehicle navmesh,should be wide enough for the largest vehicle to turn around on"

Ideally for SP,certain maps should be slightly modified, to increase the width of these narrow vehicle paths,by replacing certain small/narrow underpasses with larger/wider bridges
Title: Re: Bot Navigation Tweaks
Post by: Void on 27-11-2010, 03:11:41
Quote
I can understand that tracking distant targets is interfering with the bots driving ability, but I can't imagine it so unbearable that we have to limit other aspects of gameplay. But maybe that’s just my own pride speaking over all the work I put into finding the ideal range.

No, the arty has that kind of range, and so I will set the culldistance back to one kilometer. I don't think it's your pride speaking Remick, I think it the fact that you have much more experience with FH2 than I do. You have spoken your opinion, and I respect that. I'm now using some other tricks to control the unwanted shifts into the Fire behavior anyway.

I don't think problems with bot navigation in FH2 is either Mountain or Molehill, but rather is somewhere in between. I'm just taking a stab at making improvements, even if they are only slight improvements.

I know what you mean when you say:

Quote
I know the bots maneuvering was far from perfect and I am looking forward to any improvements Void or anyone. But outside of scripting them to move the same way every time (which would be boring) you will always find perplexing behaviors in the bots

They always perplex me. I tweak some values, run a test map about 6 times, think I've "got it", and then on test run number 7 I catch a bot moving a tank backwards and forwards for no apparent purpose. I'm only trying to do the best I can, which will certainly not be perfect, regardless of what I end up producing.

Remick, if I have posted anything you found to be an affront to the time and effort you have put into FH2 singleplayer then you have my most sincere apologies.
Title: Re: Bot Navigation Tweaks
Post by: Remick04 on 27-11-2010, 05:11:27
No worries Void :), I am nothing but appreciative that you have decided to give of your time to help improve the AI of FH2. I don't have as much free time as I use to, and could use all the help I can get. And although I have spent a lot of time going through the AI files of FH2, I am no AI programer, so I assume there are mistakes and holes in the AI as I am learning as I go here. I can certainly use any expertise you have to offer.

I think I'm just exhausted. Like you said 6 out of 7 test the AI will seem to behave fine, but they are never perfect. So, I stopped trying to make things perfect and just tried to make things "fun". I just hope despite the few problems here and there, people are having fun in Singleplayer ;)
Title: Re: Bot Navigation Tweaks
Post by: djinn on 27-11-2010, 08:11:48
That we are. Thanks, guys
Title: Re: Bot Navigation Tweaks
Post by: cannonfodder on 27-11-2010, 09:11:59
The AI will never be perfect, it was only ever an afterthought anyway and I'm not talking about FH...

I bought BF2 about 6 months or so after it came out, installed it , tried all the SP maps looking for the vehicles and found none.

I had no 'net connection at the time, and was more than a little bit pissed off with the fact that nowhere on the box does it say "Online only" because that's basically what it was.

So the game sat untouched for the next year or so...then I stumbled across AIX... 8)


The bots are reactive, as such they'll do weird shit from time to time, so I try to look at the AI's behaviour as a whole, not individually.

And I don't know for sure, but I often get the impression that certain bots get more "CPU time". Maybe the game gives higher priority to bots that are near the enemy/frontlines... :-\


I've previously suggested slightly modifying maps for SP to remove particularly troublesome statics, e.g. the "barricade chicane" at Toujane on Mareth, and if memory serves, I was told it wasn't an option.


Overall though, FH's AI is now so much better than what it once was, it's not funny... :)
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 27-11-2010, 09:11:20

I've previously suggested slightly modifying maps for SP to remove particularly troublesome statics, e.g. the "barricade chicane" at Toujane on Mareth, and if memory serves, I was told it wasn't an option.

You can always rename the map,with SP at the end of name,make desired changes for the SP players
removing obstacles,chicanes,and as i did for 1 map (PHL),lowering some hedges
Title: Re: Bot Navigation Tweaks
Post by: cannonfodder on 27-11-2010, 09:11:04
True, but I was suggesting it for the next release, so it'd improve things for people who don't mod their files.

But I wasn't surprised when it was knocked back, the mod is big enough as it is without adding more files to cater to the SP minority.
Title: Re: Bot Navigation Tweaks
Post by: djinn on 27-11-2010, 09:11:20
I think its best kept simple: Work with what you have.

There's a reason I made the Singleplayer Philosophy thread, although I think the reason was lost on most. But here's it put simply. I needed to define what the goal of the singleplayer project was, so its not just about 'improving AI' (Thats a scalar quantity and non-directional, what is 'improve'?), but rather set a goal for SP and follow that. Here's mine:

AI in Fh2 cannot represent tactical game-play since bots cannot be tactical. It represents logistics in tactics instead. A bot with a rifle should fire at the range of rifle with the speed his rifle allows, an smg should get in closer and spray, an mg gunner should fire from at least rifle range, if not further, move in a bit, fire again - Same goes for ordinance, armor and other vehicles. The desired effect is therefore a simulation of how the battle would proceed with the various guns and vehicles thrown in according to the battle they represent, with the constraints that are the very nature of the map/ battle.

This is why I for one, am not in favor of changing level design or vehicles etc. The determining factor of any singleplayer battle is therefore the 'single player' as the bots are designed to simulate, and hence things would most likely proceed like they did in history: PeB, etc being a hard fight for the attackers, Totalize, Sfakia etc, being as much a possible loss as it is a minor victory for the attackers etc. The tipping factor, therefore, being the human player

Each battle however needs to be somewhat balanced to allow players fill a spot on either side and be challenged by the gameplay, unless the battle truly was a total cakewalk for the side the player fights on
Title: Re: Bot Navigation Tweaks
Post by: Void on 03-12-2010, 00:12:03
I'm releasing today my WIP recode of aibehaviors.ai. The original contained many good ideas, but with apologies to the author(s) it also contained some severe mistakes.

I will qualify that last statement with one example. It is simple: There is no reason for a bot's Fire urgency to ever reach 81. This is coded into the current file.

EDIT: - I concede that the bots shall camp the fixed guns -


If you want to test my code, here it is: FH2 AIBehaviors Recode (http://www.battlefieldsingleplayer.com/void/fh2/FH2-aibehaviours-Recode.rar)

Title: Re: Bot Navigation Tweaks
Post by: djinn on 03-12-2010, 04:12:50
Thanks. But we let bots remain on fixed guns and AT guns to create static defenses. We noted that the number of bots on the move so outweighed the number on static guns that they were no real loss.

Besides, in rl, not all soldiers would be on the go. This helps with back-capping and maintains a solid defensive line.

I even asked remick to make bots camp deployable guns to so people can create bases of fire and arty cover while they move in.

Recommendation: please keep static guns camped. You'd get a situation where bots may or may not man positions and alot of them may be left abondoned in some games. Imagine the mareth line like this...
Title: Re: Bot Navigation Tweaks
Post by: Zoologic on 03-12-2010, 04:12:48
Mortars in mainbases has limited range, and only provide initial support for initial breakthrough attack. So it shouldn't be camped for too long.

But as Djinn says, Mareth Line, and especially Fall of Tobruk, need bots to camp static guns. They are an element of the game itself, just notice the positioning of the static guns by the developers in Fall of Tobruk: inside a building, behind walls, etc... makes the attacking players experiencing some kind of ambush set-ups.

So yeah, for some reason camping the static guns is necessary.
Title: Re: Bot Navigation Tweaks
Post by: Void on 03-12-2010, 04:12:16
Okay everyone. It is an easy enough fix. In a few minutes I will post a new version up with bots camping the fixed guns.

EDIT:

File updated; bots will again camp the fixed guns. Same download link:

http://www.battlefieldsingleplayer.com/void/fh2/FH2-aibehaviours-Recode.rar
Title: Re: Bot Navigation Tweaks
Post by: djinn on 03-12-2010, 04:12:03
Besides that, im thoroughly excited to feel the improvement, especially tank navigation

Future note. I may be of one of 3 people who knows everything about the hows and whys of fh2 ai, who did what, when and why. If you'd like, you can use me when changing stuff so we maintain a consistent work flow i.e not needing to change stuff that had a reason to be there (thats been an issue with ai since 2.0: new ai person overhaul of ai, as many minuses as pluses, no lesson learned) PM me if you want this. I'd be happy to help
Title: Re: Bot Navigation Tweaks
Post by: Void on 03-12-2010, 06:12:57
What about creating a new vehicle type for things like mortars, that should have bots allowed to pick the Change behavior?

I already have a framework setup for making the needed changes. Just need a list of weapons that would be assigned the new AI.
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 03-12-2010, 06:12:33
Guys,the absolute best way to keep bots on stationary weapons
is to have them automatically spawn in them when the game starts,and have the "no exit" code for the weapon
There is no better way

FH2 already has some stationary weapons setup for not allowing exiting
1 downside...the no exit, affects humans as well
Title: Re: Bot Navigation Tweaks
Post by: djinn on 03-12-2010, 07:12:32
Then how is that better exactly? Agree with spawning on part, but the current way keeps them on and allows humans to exit and replace them. I dont see a need to change that
Title: Re: Bot Navigation Tweaks
Post by: Zoologic on 03-12-2010, 07:12:21
Without the "no exit" enabled, i already saw bots camping on howitzers at main bases (e.x. Goodwood QF 25 Pounder). Can you explain this?
Title: Re: Bot Navigation Tweaks
Post by: Void on 03-12-2010, 07:12:12
The only point to the whole business about stationary weapons is that I can have the bots do whatever you guys prefer. It isn't really important to the overall changes I made to AIBehaviors.

I will show you some code. This is to illustrate the real mistakes I've been going on about.

Incorrect:
Code: [Select]
aiSettings.setVehicleBehaviour Tank Fire BBFireInfantery BBPFireInfantery 4 UCFire  TankWeights
Correct:
Code: [Select]
aiSettings.setVehicleBehaviour Tank Fire BBFireInfantery BBPFireInfantery 4 UCFire  UnitWeights
The above example is why the Fire urgency can reach 81 or greater,when it only needs to be raised to around 6 or 7 to become the active behavior.

Mistakes like this are repeated for all behaviors for all vehicles.
Title: Re: Bot Navigation Tweaks
Post by: Remick04 on 03-12-2010, 20:12:39
Thank you Void for cleaning up the aibehaviors for us! ;D I look forward to trying this out later.

I had been comparing the AIbehaviors of Fh2 to that of other mods, and there seemed to be a lot of differences, but didn't know what they did. Drawde had done a lot of work based of what Legion had started. I did some reading up on how AIbehaviors worked, but not knowing much I decided not to tamper with it. Drawde had done a great job getting the bots to act the way people wanted them too.

As for the 'fixedguns', as everyone pointed out, that was intentional for the sake of keeping bots on defensive positions. I do see the cons to this. It works great for the defending team, as they stay at their guns instead of abandoning them because there are no immediate threats. But I do think it can be a problem for the attacking team as they capture those positions. Occasionally they aren't in the right place to defend against counter attack, and a bot is wasted to a gun that won't necessarily help the team. But I think the general consensus was that the pros outweighed the cons, so things were made this way. It is a lot of fun assaulting a well defended position, which happened less when the bots were free to abandon those fixedguns.

Again thank you for your work, if I have time tonight I'll try playing a few round with your new AIbehaviors and see the difference it makes :)


Title: Re: Bot Navigation Tweaks
Post by: Void on 03-12-2010, 21:12:05
Hello Remick,

The file I wrote may or may not bring noticeable improvements to bot behavior. I think it might, but you guys will be the judge of that. It is only a WIP release after all.

The main advantage of my code is that it contains the corrections to the urgency inhibitors. This makes it a better starting point to work from than the original AIBehaviors was.

In other words, my file should be able to be tweaked with more predictable results than the one I replaced.
Title: Re: Bot Navigation Tweaks
Post by: Remick04 on 03-12-2010, 21:12:29
Sounds good, It does look a lot neater than the old one. Keep up the good work!
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 04-12-2010, 02:12:48
Then how is that better exactly?

http://www.youtube.com/watch?v=JbmeRv81YVs
Title: Re: Bot Navigation Tweaks
Post by: Void on 04-12-2010, 02:12:28
Edit-

Nevermind.

Title: Re: Bot Navigation Tweaks
Post by: Devilman on 04-12-2010, 03:12:59
I have just found this to not be true after all. I've been trying to code more effective sniper AI in my personal mod by creating a new vehicle type for the soldier. What I created was very complex, and very experimental. My initial result was a bot that would spawn in and more or less immediately empty its weapon into the ground or a ridge etc.

If you shoot a tree ingame,does it fall over ?
Title: Re: Bot Navigation Tweaks
Post by: djinn on 06-12-2010, 16:12:23
@void
Not seeing dramatically different AI, but perhaps there wasnt meant to be. Sometimes, i do get the impression that the bots are more responsive, but they've always have off and 'on' days so it might just be that.

For this patch though, perhaps the absence of change is a good thing, since its internal cleanup
Title: Re: Bot Navigation Tweaks
Post by: Void on 06-12-2010, 17:12:20
Quote
Not seeing dramatically different AI, but perhaps there wasnt meant to be

Then I accomplished primary mission #1, which was not to make anything worse. Bots should be a little more focused now, but that is a subjective observation.

Though I recoded everything, I tried to capture what I perceived to be the intent of the original file. I'm not surprised that the effects on the bots are minor. There are still many things I would change at the individual vehicle AI level. No, I will never touch the fixed guns. Word of honor.

The new file may need work, but it is workable. The old one was chaotic.
Title: Re: Bot Navigation Tweaks
Post by: Void on 08-12-2010, 02:12:42
I'm trying to determine the true speeds of FH2 vehicles. There is a nice debugger command for this (vars.set debug-engine 1). I really think the bots would drive better with accurate information about vehicle max velocity.

You get a nice warning screen if you try to run FH2 without using FH2.exe. So, I patched FH2.exe to load the debugger for me instead of the retail game. That was easy.

And I now recall what Devilman said about FH2 maps crashing the debugger. Turns out he is quite correct about that.

Can someone point me to a single FH2 map - any map - that can be loaded under bf2_r.exe ? Just one map would do. Anyone ?
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 08-12-2010, 04:12:37
When you run any map through the debugger
you will get error messages for objects that arent loaded/used in that map
So there may not be any maps that dont crash the debugger

the debugger sems to "sometimes" show the more important errors as a priority,based on i have noted the first lot of errors at a certain %,removed those errors,then next time i run DB,I receive errors which never originally popped up before

there are 2 ways to overcome this crashing,while map loading
run debugger,when it crashes,check the log file,and remove that object
repeat process,until you give up,like i did

or make a new mod,include only the bare minimum amount of necessary files,and add your vehicles to a BF2 Vanilla map (short explanation)
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 08-12-2010, 04:12:46
Oh,and just in case any "wankers",want to question or doubt my information,regarding debugging

(http://i135.photobucket.com/albums/q137/DEVILMAN_09/nawdebug-1.jpg)

(http://i135.photobucket.com/albums/q137/DEVILMAN_09/nawdebug1.jpg)
Title: Re: Bot Navigation Tweaks
Post by: Void on 08-12-2010, 04:12:24
Thanks for the reply. I managed to get Mareth Line to load by removing some static objects (one by one, each time checking the log files and so on, like you were saying.)

Now it loads, but after I spawn in the screen begins to shake rapidly until the game crashes.

Has anyone experienced this? Does anyone know a fix?

hmm, just saw your last post Devilman. I do not doubt your information in the slightest.
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 10-12-2010, 09:12:11
Now it loads, but after I spawn in the screen begins to shake rapidly until the game crashes.
 

can you post a video of this shaking,you mention
Title: Re: Bot Navigation Tweaks
Post by: Void on 10-12-2010, 18:12:56
Well, it is more accurately called rapid rotation, but anyway here is a short clip of what I'm talking about. Note that the shaking is actually faster without fraps running.

http://www.youtube.com/watch?v=IYHejCifdV8

I don't know where to even start looking on how to fix it.
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 11-12-2010, 00:12:05
Well, it is more accurately called rapid rotation, but anyway here is a short clip of what I'm talking about. 

this may be caused by the items that you removed
does it happen on different spawn points,and does it happen when you spawn on the other team ?
Title: Re: Bot Navigation Tweaks
Post by: Void on 11-12-2010, 01:12:32
I only removed a few static objects. But yeah, it happens wherever I spawn regardless of which team I pick.

I've gone ahead and built a barebones FH2 vehicle testing mod as you suggested. That is working under the debugger at least.

Now my problem is that vars.set debug-engine 1 doesn't show vehicle velocity. I can calculate it using the change in position coordinates over time, but I'd like a simpler method.

Do you know a debugging command I'm missing that will show vehicle speeds?
Title: Re: Bot Navigation Tweaks
Post by: Devilman on 11-12-2010, 02:12:03
Now my problem is that vars.set debug-engine 1 doesn't show vehicle velocity. I can calculate it using the change in position coordinates over time, but I'd like a simpler method.
 

you need to make a minimod of bf2
Make sure the vars.set debug-engine 1 works
then add your FH2 objects bit by bit
Title: Re: Bot Navigation Tweaks
Post by: djinn on 11-12-2010, 06:12:34
@void
Arent we going a bit overboard. I mean, isnt there an easier way than all this?
Title: Re: Bot Navigation Tweaks
Post by: Void on 11-12-2010, 19:12:21
I'm looking for an easier way, but not finding it.

I've built a bf2 mini-mod with all FH2 vehicles in, and have it running under the debugger. Problem is that the command I mentioned earlier does not show vehicle velocity.

So, I need to find a command that will, or else I am stuck recording videos while running under the debugger and calculating velocity by looking at the change in position coordinates over time. I'm up for the math, but don't really want to go there.

All the tank AI templates are set to the same max speed, which is incorrect. Crusaders and Cromwells go faster than Shermans - etc.

I agree that I may be going a bit overboard. However, I admit to being a perfectionist, and really want to code in the correct speeds for the tanks.

The easiest way would be if someone already had the info on max speeds and decided to share it with me here.
Title: Re: Bot Navigation Tweaks
Post by: Drawde on 31-01-2011, 20:01:43
The easiest way would be if someone already had the info on max speeds and decided to share it with me here.

I'm fairly certain I have a database of WW2 vehicle data somewhere on my PC, if not I have quite a few books on the subject and should be able to make a list of the FH2 vehicle max speeds.

Anyone know whether the BF2 engine uses miles or kilometres per hour for the vehicle speed settings?

Fixing the AI vehicle speeds is definitely a good idea, it should definitely make a noticeable difference in the larger NA maps at least. I'm fairly certain that bots can't drive vehicles faster than their actual in-game maximum speed (e.g. the Matilda is a lot slower even when driven by bots) but I assume that they don't go faster than their AI speed setting even if the vehicle they're driving can do so.
Title: Re: Bot Navigation Tweaks
Post by: Drawde on 31-01-2011, 20:01:47
I've been finding that with the weapons files also. The whole idleling bots on Operation Cobra is due to faulty AI for the colt1911. Same goes for the idle bots on Totalize with the bhipo.

Is this a problem with FH2.3 or is it an old issue which you've fixed? Both the colt1911 and bhipo weapons seem to have their AI templates properly assigned in the 2.3 files, though I know the bhipo at least had no AI assigned pre-2.3.
Title: Re: Bot Navigation Tweaks
Post by: Void on 31-01-2011, 22:01:45
Quote
Anyone know whether the BF2 engine uses miles or kilometres per hour for the vehicle speed settings?

BF2 measures this in Meters/Sec. I recently had the max vehicle speeds worked out for all the tanks, but I've lost all my FH2 Vehicle AI work in a hard drive crash (yes, I should have made a backup, I know.)

My method was to run in AI debug mode under a pseudo FH2 mini-mod (Vanilla BF2 + all the FH2 vehicles). I would use Fraps to record myself driving a vehicle over a straight stretch of road, and then calculate the change in the position coordinates over time.

It took a good while to get what data I had; shame it is all lost now.
Title: Re: Bot Navigation Tweaks
Post by: cannonfodder on 01-02-2011, 09:02:11
Is this a problem with FH2.3 or is it an old issue which you've fixed?...
It must be a 2.3 problem because I've still got idling AT bots...
Title: Re: Bot Navigation Tweaks
Post by: Remick04 on 02-02-2011, 18:02:02
[Is this a problem with FH2.3 or is it an old issue which you've fixed? Both the colt1911 and bhipo weapons seem to have their AI templates properly assigned in the 2.3 files, though I know the bhipo at least had no AI assigned pre-2.3.


Someone had mentioned something about replacing the colt1911 with a different weapon and it fixed the issue of idle bots on Cobra. That was before the 2.3 release, but I never got around to checking if this was true until after 2.3. So the files in 2.3 are still the faulty ones. I don't know what is wrong with the colt or the bhipo. I just noticed that bots with AT kits that only have these weapon and an AT device (Pait/ Bazooka) tended to be the ones idle. And when in combat they never seemed to shoot at anyone with their side arm. The temporary fix I'm using now is I reassigned these pistols to use AI templates of a different sidearm in there .tweak file, and it seems to work, I have no more Idle bots on Cobra, or Totalize. But I'm not sure what the problem is with the AI templates for those weapons (like you said everything seems to be in order), unless there is a limit to how many weapons can use the same AI template, which I doubt.