Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Drawde

Pages: 1 ... 8 9 [10] 11
136
Sorry for the delay in releasing the next update. I've been trying to playtest the mod as much as possible to make sure the AI is still working properly, and haven't found a huge amount of spare time to do so in the last week - but I hope to have the next version of the minimod ready by the end of the week, possibly in the next few days.

One minor bit of good news is that I've managed to track down the sound-looping bug with the 2pdr AT gun ("ObjectTemplate.fire.addFireRate" needs to be set to 0 in the .tweak file)

Regarding Goodwood 16, I managed to play an entire game as the Allies, but playing again as Axis got a CTD after about 5 minutes. In the first game, all the CPs changed hands multiple times, so the crash seems to be unrelated to this. My suspicion is that it's a pathfinding issue related to one (or more) of the buildings in Cagny, presumably the building is at the outskirts so on the 16 map bots don't always encounter it, but in the 64 map they always do sooner or later.
Would the editor debug mode be any use in tracking down this issue?


137
I also got a CTD on Goodwood 16, about 5-10 minutes after starting the game, playing as Allied. I'll try it again later to see if I get similar results. I also get CTDs on Goodwood 64 and Anctoville, but not (so far) on any other Normandy maps.
I've no idea what the cause of the problem might be, other posters have suggested it might be due to the AI pathfinding for a particular building model. I assume it isn't vehicle-related, as there aren't any in Anctoville or Goodwood 16.

138
Wow! Can't wait. Btw, any chance of getting bots to be able to bail vehicles? Not static ones, but mobile ones, specifically positions that don't make bots
useful to the battle such as external positions on tanks, all gp vehicle positions and all positions within apcs save for mg position.
...
Also, any luck getting bots to use mgs of all kinds using the mg15 code?

Not sure about the bailing/switching position - this seems to be one of the hardest aspects of the AI to get right. I think it's mainly related to the different Temperature and StrategicStrength values of different crew positions, but it seems very hard to predict exactly what the AI will do. This area of the AI worked really well in vanilla BF2, was completely broken in default FH2.25, and slightly improved with my AI minimod (bots aren't so keen to use passenger/tank rider positions, for example) but not by much - I'd like to get things closer to how they are in vanilla BF2, but am not sure how. (Even after giving tank rider positions - useless deathtraps for bots - a temperature of 1 and StrategicStrength of 0, I still see quite a few bots using them  ??? )

I think I've partly fixed the MG use issue, I originally gave MGs a very low StrategicStrength for offense, so bots didn't waste time sitting on them when they should be attacking - but it looks like this means that they very rarely use them unless their AI commander has specifically ordered them to defend a CP. I gave them a medium offensive StrategicStrength (4-5) and have noticed a few more MG kill message for bots since doing so.

I'm not sure if it's possible to change the AI view position on artillery without also changing it for the player. But the AI seems to be capable of spotting targets quite far away = a number of times when manning a 2pdr on Siege of Tobruk I've been "sniped" by the German PaK 37mm from beyond visual range!

139
Big favor here. Any chance of getting bots to use the divehorn? I know its not important at all. But it certainly would be icing on the cake. Pretty please.

I'll definitely have a look into this (once I've released the next mini-mod version) though I'm not sure if it'll be possible. I'm not sure if there's any way to get the AI to trigger the dive horn at a particular point - since it uses the "afterburner" key, bots might be more likely to use it in situations where they'd have used the afterburner/speed boost in vanilla BF2.
One workaround might be to modify the Stuka sound scripts so that it automatically makes the dive horn sound when diving at speed (all BF1 aircraft had a Stuka-like dive sound, IIRC)

140
Hopefully the next version of the mod should be ready within a few days. I just need to test it a bit more to check that all the aircraft are still working correctly. It also has some improvements to tank gun/MG use (doesn't fix it entirely, there still seems to be a random element involved) and entirely prevents AT guns (and tanks with HE) from firing AP shells at infantry.

I'm not sure whether it's possible to control the flying height of AI aircraft, or if this is map-specific (they definitely seem to fly higher on some maps than others)

141
I think I've fixed the "backwards bomb" visual bug caused by this fix, by adding invisible "launcher" objects in the same location as the bomb models, which act as the "barrels" for the bomb weapon. I think this means that bombs don't disappear from aircraft wings when dropped, but this isn't too noticeable when they're in the air (it's better than the bomb models being back-to-front, anyway  ;D )

I'll release a new version of my AI tweak mod soon, including the bomber fix as well as some other changes + tweaks to the AI, particularly tank shell + MG use.

142
After a lot of tedious checking through and comparing of the BF2 and FH2.25 aircraft + bomb files, and making various changes (none of which worked, until this one), I think I've finally solved the problem.  The erratic kamikaze flight of AI bombers and their inability to drop bombs both have the same cause - and it's a really stupid bug, but one which is thankfully very easy to fix.

This is what the cause of the problem appears to be:
- FH2's bomb 3D models (the German ones, at least) are modelled back-to-front (no idea why)
- As a simple fix for this, the "dummy" bomb models (which also act as launch points for the actual dropped bomb projectiles) attached to aircraft are rotated 180 degrees.
- This doesn't affect the bomb aiming or dropping physics, but DOES affect AI bots attempting to use the bombs. It completely messes up their aiming + targeting AI, so they not only can't drop bombs, but inevitably end up crashing their plane in a futile attempt to aim the bombs at ground targets  ::)

To fix the issue, open the .tweak file for a bomber, and where you find the code which adds the "dummy" bomb models, for example:
Quote
ObjectTemplate.addTemplate sc500_dummy
ObjectTemplate.setPosition 5.18669/-0.553727/2.59724
ObjectTemplate.setRotation 180/0/0

- add "rem " to the beginning of the ObjectTemplate.setRotation line. Do this for all the dummy bombs attached to the aircraft. 

The German SC50, 250 and 500 (which are also used by the British Hurricane and Beaufighter) definitely have this problem.  I haven't yet tested whether the US bombs (on the P-51 and P-47) have the same issue.
The one problem with this fix is that the visible bombs on aircraft models are now back-to-front! One way to fix this could be to add invisible (and non-rotated) bomb-launching "hardpoints" at the same location as the bomb models, and keep the 180-degree rotation for the bomb models. I'll try this idea out soon.

When I made this change (not really expecting it to do anything) and started up FH2, I knew it had worked before I even saw an AI plane, as I got multiple Ju87 and Beaufighter kill messages within a minute of loading El Alamein  ;D Working AI bombers seems to make a big difference to how SP games play out, AI ground vehicles tend to have a hard time attacking defended positions and AT guns. I suspect it'll make a particular difference on maps like Siege of Tobruk and Invasion of Crete where the Germans rely on aircraft as their "artillery" and the Allies don't have any fighters to defend with.

Some notes on the bomber AI:

- They're quite aggressive attacking with bombs and will drop them quite accurately, though possibly not as accurately as in vanilla BF2 (this may be because of the additional "deviation" inaccuracy I added to the bomb AI files)
- Bots never run out of bombs, just like in BF1. I'm guessing the AI is hard-coded to never run out of ammo for weapons.
- For the above reason, they never seem to strafe with their guns - bombs have a higher AI strength, and they never run out, so no reason to ever use guns. Not a huge problem with the Stuka, but more so for the Allied fighter-bombers which have a lot more firepower. I'm not sure if this is fixable, giving the guns a higher AI strength than bombs would probably mean they don't use bombs at all - but I'll try it out anyway.
- The Stuka doesn't dive-bomb its targets (the previous "diving" behavious was just a bug caused by the reversed bombs), and I'm not sure if it's possible to get the AI to use the dive siren, but, again, I'll try all the same.

143
Woohoo! Thanks Drawde! You are making real progress!! ;D

Unfortunately NOT much progress with plane AI  >:( although I think I've managed to get tanks working reasonably well.

Bots definitely seem to use handheld LMGs more effectively than they used to, though getting them to use deployable weapons sensibly may be beyond BF2's AI limitations.

Also, infantry weapons have the highest priority for AI mortars, with heavy armour the lowest... seems to be another example of the AI doing exactly the opposite of what the game files tell it to do.

144
The AI seems to be capable of flying most of the aircraft in FH2 reasonably well - they don't crash too often and can strafe ground targets and engage enemy aircraft. However, the Ju87 Stuka (and possibly the Beaufighter bomber version as well, though I haven't tested this myself - the Stuka is a lot more common in maps) seems to be an exception to this. It never drops its bombs, and rarely manages to stay in the air long enough to get the chance to do so!

I've been trying to fix this problem, or at least find out why it happens, without much success! I've looked through the Stuka data files, comparing them to those for other FH2 aircraft, and have tried changing some of them and flying in the gunner's seat of AI-piloted Stukas to see what the AI does. So far I've got no further to fixing the problem, although I think I've found its main cause.
There are a number of issues in the Stuka AI data files (see below), but what seems to be the main cause of the problem is the AI control input parameters (pitch, roll + yaw scale and limits) in objects.ai. These values, along with the input sensitivity (identical for every FH2 aircraft including the Stuka) seem to control how the AI flies the aircraft.

These are the default values for the Stuka:
Quote
aiTemplatePlugIn.pitchScale           0.0110
aiTemplatePlugIn.rollScale            0.0220
aiTemplatePlugIn.yawScale             0.0175
aiTemplatePlugIn.maxRollAngle         0.5000
aiTemplatePlugIn.maxClimbAngle        0.1700

and these are the values for every other aircraft in FH2 (except the Ju52, which has the same max roll and climb angle as the Stuka):

Quote
aiTemplatePlugIn.pitchScale           0.0420
aiTemplatePlugIn.rollScale            0.0680
aiTemplatePlugIn.yawScale             0.0275
aiTemplatePlugIn.maxRollAngle         0.9900
aiTemplatePlugIn.maxClimbAngle        0.3333

With the default values, an AI-piloted Stuka flies and manouevers so sluggishly that it eventually ends up flying out of the playable map area and getting killed. Occasionally it'll attempt to strafe ground targets or even dogfight with enemy planes, but won't drop bombs (the bomb issue seems to be completely unrelated, though).
However, if you replace the default values with the standard ones from another aircraft, the Stuka flies wildly and erratically, almost as if the bot piloting it is attempting to do aerobatics, and will eventually (usually sooner rather than later) end up spiralling or nose-diving into the ground. They rarely (if ever) seem to make any attempt to attack targets on the ground.

Does anyone have any clues as to why this is happening with the Stuka but not, as far as I can see, with any other aircraft type in FH2? I'd really appreciate some help from anyone with more experience coding aircraft AI in BF2.

Finally, the other issues I spotted in the FH2 Stuka data:

- Bombs have a lower AI strength than MGs vs. many target types
- Bombs don't have the AI fire input key set (PIAltFire) in weapons.ai
- The AI input key to select the rear gunner position is PIMenuSelect2 rather than PIPositionSelect2 (conflicting with the bomb select key)
- The 250kg bomb has an extremely high minimum range (500)

These may be the reason for the AI not dropping bombs, but until the flight issues have been sorted out it's hard to say for certain!

The aiTemplatePlugIn.equipmentTypeName in objects.ai is also set as "Bomber"; not sure if this is necessary, as the "vanilla" BF2 aircraft, all set as "Fighter", never had any problems dropping bombs when piloted by the AI. Changing it to "Fighter" doesn't seem to affect the Stuka's behaviour much, if at all.

145
I -think- I may have solved the problem with the Stuka's kamikaze diving, it appears to be caused by the AI input to select the rear gunner position (in objects.ai) being set to PIMenuSelect2 (which should be the key to switch between 50kg/250kg bombs), rather than PIPositionSelect2. I added the bomb select key (missing from the default files). This didn't cause any problem in default FH2.25 as there was no bomb select key in weapons.ai, but I added one (without spotting the error in objects.ai) so presumably when the bot pilot got within range of the enemy and attempted to select a bomb type, he instead started switching between the pilot and gunner seat, causing the plane to crash.

Fixing this error makes the Stuka much less prone to crash into the landscape, but it still flies very sluggishly, doesn't attack anything, and usually ends up getting killed by flying out of the playable area.  The AI control input parameters for the Stuka are also set to be much less sensitive than other aircraft (including the Ju52); I suspect this is the cause of the latter behaviour, so will change it and see what happens. Still no guarantees I'll be able to get bombs working, though...

I haven't really looked into the fire rate issue with semi-auto rifles yet, but I suspect it's because these guns don't actually have a fire rate defined in their .tweak files, they fire as fast as the player can click the mouse button. Since bots don't need to use a mouse, they can fire them a lot faster than a human player 
 ;D
I've also done some more tweaking to the tank gun + MG files, and have made a couple of changes that seem to make tank vs. infantry combat work better; firstly, I gave AP shells a strength of 0 vs. infantry for all tanks that have HE shells, secondly I gave coax MGs a much higher strength (15) and reduced their range to 150. Within this range tanks will prefer to use MGs rather than shells against infantry, beyond it they'll fire HE shells - at least in theory. I think part of the reason for the erratic behaviour of tanks was that HE shells and MGs had a similar strength vs. infantry, the bots couldn't decide which to use!
I've also reduced the minimum range of AP shells to 1 and HE shells to 5.

146
Thanks for the link to the SP mod! I didn't realise this was available. So the maps will still work with FH2.25 if you take them out of the mod? (I'm not going to attempt running the mod itself, even if it runs with 2.25 there'll probably be compatibility issues). 

The Stuka is really odd... I haven't changed anything in the Stuka files other than the weapon data and the AI temperature/strategic strengths. And I distinctly remember seeing it do its kamikaze nosedive on Tobruk and Mersa Matruh before I made any attempt at modding FH2.

But I haven't really made any serious attempt to mod/fix the planes yet, now tanks are working reasonably well (other than the shell usage issue) I'm going to pay more attention to the planes. I'm not sure what it is in the Stuka files that trigger its diving behaviour (other planes don't do this) nor what it is that prevents AI planes from dropping bombs, when in vanilla BF2 they can do so very accurately!
What I'll do first is compare the Stuka .tweak and .ai files with those from another plane (e.g Hurricane) and see exactly what the differences are. If I can get the Stuka to fly properly, I'll then do the same thing comparing the weapon data for bombs in FH2 to that in the vanilla BF2 files. I'll also definitely see if I can get the divehorns working, though I definitely don't guarantee it!

The inconsistency with tanks using their coax MGs is also really annoying me. Sometimes they use them readily, other times they only fire shells. I wonder if AI behaviour is influenced partly by things like the map layout, pathfinding, whether the bots are attacking or defending, etc.? How BF2's bots behave seems to be often completely unrelated to what the .ai files are actually telling them to do.

BTW, I followed (in another Stuka) an AI Stuka on Mersa Matruh to see exactly what it did; it took off, climbed to a fairly high altitude, flew level until it reached the railway station CP, then nosedived straight into the enclosed compound where the Crusader + truck spawn.  On other maps (like Tobruk) the Stukas seem to die more often from flying so low that they run into hills, rather than by diving straight into the ground. (This is another thing that made me wonder how much the AI behaviour was influenced by the map)

147
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.

148
Some very good points there - hope the FH2 developers are reading this thread!

My mini-mod (see post with download link) addresses some of issues you mention, at least partially. In particular, AI tanks are very rarely reluctant to fire at either enemy tanks or troops (if anything, they're a bit too deadly, at least with AI difficulty on 100%) and will use both shells, MGs and HE.
I've set AT guns to have a higher defensive priority than tanks, but a lower offensive priority, so bots will man them when their CP is under attack, but ignore them when they're on the offensive.

Bots still seem really reluctant to use mounted MGs, though!

149
DOWNLOAD LINK (v1.0)

I think I've playtested it enough now to make sure that the AI is still working correctly, so here's the first version of my SP AI tweak mini-mod for FH2 2.25.

From the readme.txt:

Quote
FIXES:
- Bots now aim and fire AT guns and mortars.
- Fixed the error with the the Sherman roof-mounted MG which caused the "Luttich" map to crash in SP mode.
- Tank HE shell min/max ranges are now consistent with those for AP shells.
- US 57mm and 76mm AT guns now have the correct AI files for mobile and static versions.
- Disabled AI use of AT mines (bots don't know how to use them correctly, so just get themselves killed charging enemy tanks)
- All open crew positions on vehicles and guns now have the "exposed soldier" setting so the AI will fire MGs and small arms at them.

CHANGES, TWEAKS + ADDITIONS:
- Completely revised the weapon AI data for all vehicle and AT gun/artillery weapons. Vehicles will (most of the time) use both MGs and shells against infantry targets and guns, and will prioritise AP, HE and special AP shells for different target types. Bots manning hull and cupola MG mounts will fire at their targets more reliably,
- Adjusted the AI data for infantry weapons. Changes to "small arms" (rifles, SMGs, MGs etc.) are minimal, but AT weapons (including grenades and explosive charges) have been tweaked significantly.
- Aircraft will strafe ground targets more, and (except for the Hurricane IID) will prioritise infantry and light vehicles. Still can't get them to drop bombs, though.
- Adjusted the "strategic strength" and "temperature" values in vehicle AI files, so bots are more likely to select vehicles and crew positions based on their effectiveness.
- Bots will avoid using (unarmed) passenger + tank rider positions on vehicles - they rarely know how to use these effectively, or when to get out, making them deathtraps.
- Bots will not attempt to move mobile AT guns (other than turning them in place) - as they don't really understand how to use mobile guns properly (treating them like extremely slow tanks).
- Bots will now fly spotter planes (they don't know how to use the artillery spotting ability, but the "radar" effect is useful for the player)
- Added unique AI files for vehicle + gun types that were either missing them completely (e.g. Cromwell, Churchill) or which used AI files from another vehicle of the same basic type but different function (e.g Opel Blitz Flak, SdKfz.251/10)
- Vehicles (and other PCOs) of the same basic type (e.g. all Sherman variants other than the Firefly and M4A1/76mm) now share object and weapon AI files. Static and mobile versions of AT guns now also share weapon AI files, though they have seperate object AI files.

KNOWN PROBLEMS (other than the usual BF2 AI issues, and pathfinding issues - such as tanks getting stuck and aircraft crashing into the ground - which are dependent on map scripting)
- Aircraft don't use bombs/rockets, despite all my attempts at getting them to do so. Maybe in the next version...
- Bots don't use static artillery (25pdr, LeFH18, US 105mm, Nebelwerfer) - although they will use emplaced mortars.
- Bots rarely seem to use static defensive MG positions.
- Bots don't fire certain vehicle gun positions (such as the Vickers .303 on the LRDG Chevy, and the rear MG34 on the SdKfz.251) although they will man them.
- The "Goodwood" map still crashes after around 15-20 minutes.

Now I've got a basic playable version out, I'll work on more AI fixes for the next version - including artillery, aircraft bombs and radio commands (no guarantees I'll be able to get any of these to work, but I can try!)

150
The worst part of dealing with bots is that there are so many schools of thoughts as to what bots should and shoudln't do, so when one person changes AI to do one thing right, they tend to  make bots do something else completely wrong

On this subject, what do you think about (temporarily) disabling the AI for anti-tank mines? Bots don't seem to understand how to use them properly (unlike vanilla BF2) and it's rather stupid watching engineer bots making futile charges at enemy tanks with mines they don't know how to place correctly  ;D

With my AI tweak minimod, I've tried as much as possible to just fix things that are non-working (AT guns), not working properly (tank HE shells and MGs) or inconsistent (range/target strength values for similar/identical vehicles and weapons) rather than making any radical changes, especially to the infantry AI. The only major changes I've made to the infantry weapon AI are with the AT weapons.
However, BF/BF2's AI coding is so unpredictable and complicated that I may well have ended up making some things worse! (currently, bots seem reluctant to stay in vehicle gunner positions, maybe as a result of changing the StrategicStrength values for different vehicles and crew positions). My minimod probably won't please everybody, but anyone who wants (including the FH2 developers) will be free to incorporate any parts of it into their own work if they want to.

Currently I'm playtesting the AI to make sure everything works reasonably well, I won't attempt any other major additions (such as getting planes to drop bombs) until I've released a basic playable version with the fixes/tweaks I've already made.

Pages: 1 ... 8 9 [10] 11