Thanks to all for the comments, criticism and suggestions. I'll hopefully be able to fix/improve some of the issues in future versions.
A few things I ought to mention first:
- The mod doesn't (currently) change any of the basic AI scripts, or the AI scripts and pathfinding for maps. It only affects the AI data for vehicles and weapons.
- There are also absolutely no changes to weapon or vehicle data (damage, fire rate, vehicle handling, etc.)
- Most of the issues mentioned are not caused by deliberate changes made in the mod. Some of them are problems found in the default FH2.25 AI which haven't been fixed, and others (such as the AI not using MGs, and the extreme range of bazooka/panzerschreck bots) seem to occur despite changing the data for the opposite effect.
Other issues - such as the behaviour of infantry bots - may be caused by changes to one area of the AI data causing subtle (unintended) changes to other aspects of the AI. The BF/BF2 AI system seems to be so complex and buggy/glitchy (presumably as DICE didn't put nearly as much effort into developing and troubleshooting it as with other aspects of the game engine) that it can be very hard to predict how the bots will behave, regardless of what the AI data files tell them to do!
I'll attempt to answer some of the individual issues here:
Bots not bailing from vehicles or changing crew positions: this issue was present in the default FH2 2.25 AI (referred to as "default values", "default FH2" etc. below), I've made a partial fix for it by giving passenger seats + tank rider positions a very low priority for the AI, so they rarely bother using them. The "vanilla" BF2 bots seem to know how to use APCs, transport helicopters, etc. properly - so hopefully this issue will be properly fixable in future, either by me or a more experienced AI modder.
Tank shell use: I've tried my best here, not sure if it's possible to improve this aspect of the AI or whether the BF2 AI just isn't capable of intelligently selecting different armament types for the same weapon (which weren't, IIRC, a feature in vanilla BF2).
For the AI "strength" values in weapons.ai, I've set AP shells to have a high priority vs. tanks, medium priority vs. light armour (guns, trucks, APCs) and low vs. infantry. HE very high vs. infantry and light armour, very low vs. tanks, APC/APDS/HEAT very high vs. tanks, very low vs. everything else, Canister very high vs. infantry, very low vs. everything else.
However, the AI's selection of shell types seems to be very haphazard/random at best. I've sometimes been shot at with HE when on foot or manning a gun, but at least as often with AP (to be fair, the bots are pretty good at killing AT guns with only AP shells). For now I'm just happy that (unlike default FH2, most of the time) they do use multiple shell types, and will (sometimes) fire at infantry + guns with both MGs and shells at the same time!
AT guns firing AP rounds at infantry: I'll definitely fix this, setting the "strength" value for non-HE shells to 0 vs. infantry should do the trick. AT guns definitely shouldn't waste time and ammo firing at targets that they have almost no chance of hitting, especially when this might mean they don't notice more important targets!
Tanks with 20mm not firing: Never noticed this myself, I've been killed by these (and the Fiat L6/40) plenty of times, in tanks, on foot and manning AT guns. The behaviour and aggressiveness/awareness of AI tanks does seem to be very variable though, even on the same map.
Regarding the Pz.II not firing at close range, this is probably because of the minimum range value, which I set to 2 or 2.5 (less than the default FH2 which is 10), I'll try reducing it to 0.5 or even 0 for non-HE shells.
Vehicles firing at aircraft: This is intentional - light vehicles with fast-firing weapons have their "anti-aircraft" value in objects.ai set to 2, which, according to what I've read on BF2 AI coding, means that they'll take "opportunity" shots at planes that fly into their field of view, but won't actively chase after and track them (as they would if you set it to 1). I've shot down quite a few planes with PzIIs and Marmon-Herringtons myself, so it seems only fair that the AI gets a chance to do the same!
This isn't a new idea/addition of my own: a number of vehicles in default FH 2.25 have this setting (including those with heavier guns, not very practical for AA), I just made it consistent (all heavier tanks have the anti-aircraft value set to 0)
Marmon-Herrington AC not firing at infantry: I'll look into this, there definitely seem to be some AI issues with this vehicle - even in default FH2 it tended to drive around not firing at anything. I've definitely seen it fire at tanks.
Bots not using stationary MGs: This is one issue that's really annoying me and I still haven't worked out why it's happening - the AI's use of AT guns is very good, but they still don't seem to understand MGs. I've given all stationary MGs high "temperatures" (which affect how likely the bots are to use vehicles and other PCOs) as well as the highest possible defensive "strategic strength", and have also given the actual MG weapons a very high strength vs. infantry in their weapons.ai files.
I have to say that I very rarely saw bots using stationary MGs in default FH2 - but whether or not my mod has made things worse, it certainly hasn't made them better! I'd really appreciate any advice from more experienced AI modders.
Bazooka/panzerschreck ranges: I noticed this too (the fog in Luttich makes it particularly noticeable). I've set the AI maximum range for these weapons to be substantially LOWER than the default values, so I'm not sure why this happens. It may be because the default minimum ranges for these weapons were so high that bots rarely used them, making the issue less noticeable.
Lowering the maximum range even more should help. What was the real-life effective range of the bazooka, panzerschreck and PIAT considered to be?
Semi-auto rifle fire rate: Seems weird, I'll definitely look into this. I haven't intentionally changed any of the rifle values, other than a few tweaks to the min/max range. Currently I haven't changed the AI data for any small arms much - only tweaking the min/max ranges and in some cases adding an "effective range" value so that bots are more likely to close in with weapons like SMGs and pistols.
Bot use of AT mines and grenades/charges: All AT/AP mines now have AI strength for all weapons set to "0" which should prevent bots from using them, certainly I haven't seen the "engineer mine charge" since changing this. I've changed the AI data for AT charges and grenades (e.g Geballte Ladung, sticky bomb) so the bots should be able to use them (previously, the min/max ranges made it very hard for them to do so) and I've certainly seen occasional kill messages for AT grenades and satchels.
Another issue is that there are still far too many AT bots around, even on infantry-only maps! I'm not sure if bot kit selection is alterable, or if it's random/hard-coded.
Aircraft strafing: I agree that planes (other than the Hurricane IID) definitely shouldn't strafe tanks with their cannons, they can't do any damage even if they hit anything. This will be easy enough to fix by setting the AI strength of their guns to 0 vs. heavy armour. IMHO strafing of infantry and light armour/soft targets (AT guns, trucks, jeeps + APCs) should be kept in, especially with 20/30mm guns (even strafing with MGs can kill exposed gun + vehicle crew)
Unfortunatly, lightly armoured vehicles like the Vickers Mk.VI and SdKfz.222, which heavier aircraft guns might have a chance of hurting, are still classed as "heavy armour" so there's no way to allow planes to attack these without also having them strafe heavier vehicles that are immune to their fire.
Aircraft bombing, Ju87 behaviour: I haven't yet worked out how to get AI planes to drop bombs. The odd behaviour of the Stuka (crashing into scenery, kamikaze dives) appeared to be just as bad in default FH2 - again, I yet haven't looked into why this is happening. The issue of the Stuka dogfighting with enemy planes will probably be less noticeable when/if it can use its bombs (so the AI can pay more attention to ground targets). I haven't changed the performance/handling data for the Stuka or any other planes, the only changes are to the gun + bomb AI data.
Bots are lethal with aircraft bombs in vanilla BF2, so this issue should be fixable. It hasn't been broken by a BF2 patch, either - I have BF2 patched to the latest version and regularly get bombed by AI aircraft, though they don't understand the TV-guided missiles (not a problem for FH2!)
Mobile AT gun issues: I've set them to be rotateable but immobile (in objects.ai - doesn't affect player control of the gun, only bots), so far I haven't seen any problems. Bots seem to be able to rotate them in place, the same as with static guns. But the AI's behaviour does seem to be very variable!
Radio/map commands: I haven't made any attempts at fixing this area of the AI yet, and have only just started looking into it. I'm hoping to eventually get the ability to command bots closer to how it was in vanilla BF2; I'm guessing the main cause of the problem is that when the "comm rose" was replaced, the FH2 developers didn't add the AI trigger commands into the scripts for the new radio comm interface.
Mersa Matruh, and general AI map issues: This is definitely one of the more "broken" maps AI-wise (though maybe not as bad as Supercharge where the Allied AI seems to be unable to understand how to get into the walled town that's the main German base). But my experience with Mersa Matruh (playing as the Allies) seems to be the opposite of djinn's. The German tanks all park on top of the hill overlooking the town and "snipe" anything they can see, on foot or in a vehicle, using both HE and AP! Deadly as this is, it still isn't very effective in the long run as most of the tanks don't go in to cap flags (even the railway station) and they eventually get picked off by the few Allied tanks + AT guns that manage to avoid getting sniped.
One persistent issue I've noticed in a lot of maps is the "traffic jam" where multiple stationary tanks and vehicles sit in a group, usually in between their base and an enemy's, and often in a position where they can't fire at anything. This ties up a lot of bots and vehicles that could otherwise be fighting and capturing CPs, and would make a very good target for bombers if the AI actually knew how to drop bombs! I suspect this is purely a map AI scripting/navmesh issue and changing the basic AI will have no effect.
Anyway, I hope this has answered some of your questions -even if it ended up as a (very) long post.
9/ The semovent is ALIVE!
10/ Tiger seems alot more maneuverable, hardlyh showing is back to the enemy
What maps are the Semovente and Tiger on? I assume there's a Tiger on Goodwood, but I've never played long enough (due to crashes) to see one. The only Italian vehicle I've seen is the Fiat L6/40.