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 ... 7 8 [9] 10 11
121
Definitely some useful suggestions there, hopefully the FH2 developers will be able to make use of some of them at least.

Another AI bug on El Alamein is the Universal Carrier in the British forward base which usually gets stuck in its starting "tent". The Chevy also frequently gets stuck on the same 6pdr gun as the Matilda.

Is the AI code causing the "stuck tank" issue in the map pathfinding, or in the .ai files? If the latter, it might be at least partly fixable via modding.

122
Singleplayer and Coop / Re: AI tweak/fix mini-mod v1.1
« on: 10-03-2010, 14:03:17 »
Fixed the mortar problem: I noticed that bots would rotate the British 3in mortar but not change the elevation, so I took a close look at the .tweak file and noticed that the movement speed for the elevation component (3inchmortar_PipeDummyElevation) was reversed, compared to the German sGWR34 mortar. I changed it to match the sGWR34 data (change "ObjectTemplate.setAcceleration 0/-100/0" to 0/50/0) and bots can now aim and fire the 3in mortar.
The US 81mm mortar doesn't appear to have the same problem, though I haven't tested this.

Whether or not I'll be able to get bots to aim artillery at distant targets (via the raised aiming point) is another matter, but at least now they can fire at things they can see! I'll also try using the "setAlwaysTargetSoldier" flag to encourage mortars to only fire at infantry and vehicles/guns with exposed crew. (Though they do seem to be capable of destroying light armoured vehicles with a direct hit)

I have a simple question: does this minimod work with coop?

I think it should do, providing the server is the one running the mod - all of the modifications are server-side, there are no changes to models, sounds or other client-side data. However, I haven't tested it.

123
Singleplayer and Coop / Re: AI tweak/fix mini-mod v1.1
« on: 10-03-2010, 12:03:05 »
I reverted all the mortar files to the minimod 1.0 version, and the German mortar in El Alamein now fires. Still haven't seen the British one fire yet though. With the StrategicStrengths increased to 25, bots almost always man the ones on Siege of Tobruk, but don't fire despite appearing to have a fairly good view of approaching enemies - though they will rotate the mortar, apparently aiming at things.

124
Singleplayer and Coop / Re: AI tweak/fix mini-mod v1.1
« on: 10-03-2010, 11:03:56 »
A question to anyone running the current version (1.1) of this mini-mod: have you seen bots firing mortars? if so, on which maps?
No matter what I do, I can't get them to fire - I've tried reverting the mortar data files back to the 1.0 minimod, where they definitely worked, and still nothing. Bots will use the mortars, and aim them at targets, but never fire even when they have a visual LOS to the target.

Regarding the "satchel suicide" issue, I've carefully looked through the .tweak and .ai files for the satchels + Compo B and compared them to other throwable weapons that work correctly (grenades, sticky bombs) and can't see anything that appears to identify them to the AI as a different class of weapon. I've no idea what it is that makes the AI decide to treat them like C4 or smoke grenades...

125
Singleplayer and Coop / Re: AI tweak/fix mini-mod v1.1
« on: 09-03-2010, 21:03:24 »
The problem with Bofors and other AA guns not firing much seems to be caused by changing aibehaviours.ai to allow bots to leave/bail from fixed objects. (This isn't a change included in my mod - yet). Even with the "change" modifier set to a low value like 0.25, bots tend to hop in and out of guns even when there are enemies near, which is particularly bad with AA guns where the target needs to be constantly tracked. Set it back to the default 0, and AA is back to its original deadliness.
I'm going to try to add a seperate "fixed gun" category to aibehaviours.ai so bots can be allowed to leave vehicle passenger positions, but prevented from leaving guns.

I've experimented with raising the artillery view height - it works, and if you raise the "dials" object by the same amount, human players as well as bots can use the guns/mortars to fire indirectly. However, this has an odd side-effect which may prevent this fix from being usable; it appears to make the game engine think that the artillery objects are much bigger than they actually are (presumably it uses their maximum dimension as their radius) so they block some of the map spawn points (they show up as red dots on the map). The guns don't -actually- block the spawn points, but the game engine appears to think that they do.

I also haven't yet confirmed whether raising the viewpoint allows bots to fire further; it seems to be infuriatingly hard to persuade bots to actually use artillery pieces. Even setting their temperature to 1000 doesn't seem to do much  >:(

Oh and btw, I saw the bots use boys rifles to kill a short-barreled panzer IV! - MORE THAN ONCE!!

It's odd that you've seen so many bot kills with AT rifles! When I play the game, I see them firing away constantly but never hitting anything (except for the occasional teamkill) even at point-blank range - I've hardly ever seen a kill message for an AT rifle.  ??? There was a period a few weeks ago when they seemed to be quite good with them - even "sniping" AT guns - but I've no idea what mod changes caused this or why it doesn't work any more... I haven't made any changes to the AT rifle files in a long while, so it must be another thing subtly affecting the bot behaviour. This is the frustrating thing about modding BF/BF2 AI, the whole system seems to be so complex and buggy that changing one thing may inadvertently affect something completely different.

I discovered that the ability for bots to fire AT rifles when standing is enabled in the Python script "aifixups.py". Disabling it, however, just means AT bots stand around doing nothing... is there any way to encourage bots to crouch or go prone? "weaponTemplate.setFiringPose" in weapons.ai doesn't appear to have much effect.

126
Singleplayer and Coop / Re: AI tweak/fix mini-mod v1.1
« on: 08-03-2010, 19:03:52 »
The US "Composition" B charge seems to have the same problem as the satchel, bots drop it even when no enemies (let alone vehicles) are in view and end up TKing their own squad. Anyone know how the AI - or the game engine itself - determines how different weapons are used? It seems like the bots are treating Compo B and satchels like smoke grenades, when they should be using them in the same way as the Geballte Ladung and British sticky bombs.

I'll definitely try raising the artillery/mortar view point to see if this improves the AI's use of these weapons, the only problem with this is that it'll make it near-impossible for human players to use howitzers for direct fire at close range.

127
Singleplayer and Coop / Re: AI tweak/fix mini-mod v1.1
« on: 07-03-2010, 19:03:51 »

The Stuka doesn't consider AT guns as bomb targets, and infact they are the only thing it uses its mgs on.

Thanks for spotting this bug - it turns out that the Stuka still had the original FH2.25 weapon AI priorities. I recently reverted all the aircraft files to the originals and re-did the changes I made (in an attempt to fix whatever caused the CTDs on Mersa Matruh) and forgot to update the Stuka bomb data.

I've now uploaded a new version of the mod - anyone who downloaded it before 6pm GMT on 7 March should re-download it to fix this issue.


I'm really not sure what's with the Flak 88 and Bofors; the data files for these guns are more or less the same as in the first minimod release, other than some very minor corrections to the max/min gun elevation, and the ability for the Bofors to fire at ground targets (which have a very low priority compared to planes). I haven't made any changes to the LOS of any game objects, in fact I'm not even sure how to do so, if it's possible to (I'd like to -increase- the LOS of some things, like stationary guns and MGs, if I could!) I haven't personally had any problems with AI aircraft not being effective due to LOS - bombers are lethal, capable of taking out tanks and guns with precise accuracy (if you hear the whistle, you're probably dead!) and fighters seem to be quite good at strafing infantry + light vehicles; I've been killed by them several times.

It sounds like quite a few of the issues described are just AI "randomness", bots often don't seem to do what the AI data files tell them to do, and in some games will almost ignore a particular vehicle or gun, and on the next will use it very effectively. This can be seriously frustrating (particularly from a playtesting point of view) but I'm not really sure if it can be fixed. Mortars seem to be particularly prone to this randomness. I assume it's partly because most of them are in positions that have little or no LOS to potential enemy targets. Infantry have the highest priority, followed by light armour (which includes guns)

But a a few things which I might be able to fix/improve: Aircraft preferring MGs/cannons vs. infantry and bombs vs. vehicles + guns is something I'm planning to work on soon, I deliberately didn't put this into the current version as it's something that will require a fair amount of playtesting to make sure that it works correctly.

Bazooka/panzerschreck range is another thing I haven't fixed yet (but will attempt to do soon) for the same reason. As I mentioned in the thread for the first release, I've actually reduced the ranges of these weapons from their default FH2.25 values, so no idea why they seem to be firing farther!

All tank guns (other than light automatic guns like the Pz.II, which are a bit less) have a maximum range of 500, which I think is the hardcoded maximum sight distance for the BF2 AI. Sometimes they'll fire at the limit of this range, sometimes they won't, it seems to be another case of AI "randomness".

The other thing was the Chevy's. The bots love the Vickers on the back, and tear-assing around with bots on both guns blasting away is fuckin great fun... 8)
You're definitely right about that  ;D - even an all-bot crewed Chevy can be deadly, I've even seen them shoot down planes! Bots don't seem to be quite so keen to use the MGs on the SAS Jeep, though...

About the bots killing themselves with AT charges, I temporarily disabled "setExplosionRadius" for these weapons in an attempt to get bots to use them at all - now that they do, I'll try re-enabling it and seeing if they still work. I thought part of the problem with the AI for these weapons might be that their maximum throw range is actually smaller than the explosion radius, so bots never consider it "safe" to use them.

Please, please tell me how you increase the temperature...

The basicTemp value is in the "objects.ai" file for each vehicle. Every crew position has its own temperature. Another thing that affects bot usage of PCOs is setStrategicStrength, the first line (0) is for offence, the second (1) for defence. The bots seem to use the two in combination to decide what PCOs and crew positions to use.

128
I thought the problem might be aircraft-related as removing the modded Stuka files solved the crash problem completely. This is odd, as I haven't made any significant changes to aircraft in the last week or so, so it could possibly be caused by AA guns, maybe the Bren AA which there are plenty of in Mersa Matruh and which the bots rarely if ever seem to use.

But I managed to play for about 30min on Mersa Matruh today, using the modded aircraft files, without any crash (I exited the game after 30min rather than it crashing) so I think the minimod is stable enough for a "beta" release (see the new thread with download link)

Also, I think I've got somewhere in solving the bot disembarking/bailing/switching position issue - if you open aibehaviours.ai and find this line under the FixedWeights table (which is used by both stationary guns and all non-driver positions on vehicles):
Quote
aiSettings.setBehaviourModifier Change 0.0

Change "0.0" to any positive value, and bots will be able to exit or switch vehicle crew + passenger positions. I set it to 1.0 - this may not be the optimum value (too low, and it won't have much effect - too high, and bots will keep jumping in and out of vehicles) but I did notice, for example, bots leaving AT guns when there were no enemy vehicles around, and tank hull gunners switching to the driver position when you (the driver) exit the vehicle.
A fair bit more work will probably be needed for bots to use APCs and trucks effectively, so I haven't included this fix in the 1.1 release of my mini-mod.

129
Singleplayer and Coop / AI tweak/fix mini-mod v1.1
« on: 06-03-2010, 22:03:40 »
DOWNLOAD LINK
(updated 7/3: fixed incorrect Stuka weapon priorities)

(I thought I'd better create a new thread for this version, as the old one has got to 4 pages now)

This is more or less a "beta" version, as I haven't tested every map extensively and have encountered a few CTDs on some maps (not the usual suspects like Goodwood 64), I'll probably release another, more polished version in the near future. But there are so many fixes in this version compared to the last that I thought I ought to get it out sooner rather than later, particularly for any FH2 SP players who don't have the modding abilities to fix the AT gun + bomber bugs (the two most important changes) themselves.

Here's what's new in this version:

Quote
- Bots can now use bomber aircraft effectively (and drop bombs!).
- Fighter aircraft will (theoretically at least) fire MGs at long range and cannons at short range.
- Tanks with HE shells will not fire AP shells at infantry, and AT guns without HE shells won't fire at infantry at all.
- Further tweaks to tank shell type and co-axial MG use.
- Greatly reduced the minimum range for tank guns.
- Fixed the Chevrolet Vickers MG not firing, and corrected the min/max aiming angles for some other vehicles.
- Limited the AI fire rate for semi-automatic rifles and pistols (so they can't fire faster than a human player)
- Many more minor tweaks to vehicle and infantry weapon AI data.
- Altered the maximum audibility distance for some weapon sounds for greater consistency. Not an AI fix, but something I thought was worth fixing - with the default data, some weapons are audible from halfway across the map whilst others (of the same type)
- Fixed the sound looping bug with the 2-pounder AT gun (ditto)

I'd definitely appreciate any feedback on errors, crashes (particularly any map-related CTDs that don't occur with un-modded FH2.25) and other issues. There are some areas, like AT charges + grenades, that I'm currently working on, and may still not be working properly.

130
Quote from: djinn
Also, the devs made bots own a unique AT rifle, that unlike its Conquest counterpart, can be fired standing but at terrible accuracy - Nonetheless, bots have no issue taking out PZIIs and anythin lighter - Even Crusaders, ever so often, so I think its fine in that sense..

Interesting, I didn't realise this - do you have any idea where the data for these bot-only AT rifles is stored? This might explain why none of the changes I've made to the AT rifle data seem to have much effect on the bot's usage of these weapons.

One major thing that still really needs fixing (I'll try and have a look at this once I've released the current version) is bots disembarking from vehicles and changing crew positions. Once this is in, bot usage of passenger + tank rider positions can be re-enabled, and infantry bots might actually stand a chance on some of the large North Africa maps!

It looks like the Supercharge CTD was not directly related to the changes in my mini-mod, I was just unlucky in having it crash early on twice in a row. However, I'm now getting CTDs on Mersa Matruh 64, usually about 10-15 minutes after starting. This seems to be related to either aircraft or possibly AA guns - when I remove my modded Stuka files, the map (unlike the AI Stukas) never seems to crash
Anyone else have CTDs when playing this map offline, with or without my mini-mod installed?

131
EDIT: If you wont mind releasing it twice, you can upload the current build and get others to try it out - it might be faster finding the issue that way -

I think that's what I'll do if I haven't fixed the problem within a couple of days. I think, though, that I might have just been unlucky with the CTDs on Supercharge; the last two games I played on this map didn't crash.

A few things I noticed -
- I saw a bot use a Geballte Ladung charge for the first time - took out an Allied tank but blew himself up in the process, maybe this is why bots are disabled from using these in the default FH2 AI! But I'll continue trying to get the AI to use these weapons properly (after I've released the current version).
- I also saw a bot fire the 25pdr howitzer, using it like an AT gun to fire AP rounds at a German tank. Still no progress with getting them to fire HE indirectly, but at least it shows the AI is capable of firing these weapons.
- Supercharge gets really hard for the Germans once the British get as far as Gazal Station! They don't have anything that can reliably kill the heavier Allied tanks (Sherman, Grant, Valentine) other than the Pz.IIIJ's special AP rounds, and I think the German aircraft also stop spawning once the Allies get this far.
- Bots really don't seem to understand how to use AT rifles correctly - they never lie down to fire them, so rarely hit anything even at point-blank range. Not sure why this is, since they seem to understand how to use MGs. Since at least one in four bots seem to be using the AT kit, this makes AI infantry rather less effective than it should be.

132
Not good news from the point of view of a release in the next few days, I've just found a CTD in "Supercharge" 64 (occurred two times, both about 8-10 minutes after starting the game, so not just a coincidence).  >:( >:(
 This didn't occur with earlier versions of my mod (certainly not the first released version) but I've made many, many changes to the mod since the last time I tested Supercharge, so tracking down exactly what causes the problem is going to be a tricky job given that when BF2 CTDs you never get any sort of helpful error message or log giving you a clue as to what exactly caused the crash ::)

I'm going to try downloading + installing the BF2 editor (haven't bothered with it until now, as I've never got into mapping for BF/BF2) and seeing if the "debug" mode in the editor will let me track down the cause of the issue.
If this works, it might also help me track down the CTD bugs in other maps like Goodwood. If not, though I'll have to go back to the old method of progressively removing modded files until the game stops crashing - this doesn't take too long when fixing a CTD that occurs during map loading, but an in-game one several minutes after the start of the game would be very tedious to fix this way, especially if the crash doesn't always occur at the same time and even (as with Goodwood 16) doesn't happen every game. Either that, or I'll just revert to an older backup of the mod (last was about a week ago) and re-do the changes I made since then.

Sorry for the long post, but this has really annoyed me seeing as I was hoping to release the next version in the next couple of days  :(

EDIT: Tried bf1942_r.exe and couldn't even get as far as the main menu, after clicking past a dozen or so non-critical error messages I get an "unhandled exception" error. And the most recent backup copy of the mod still crashes on Supercharge; the one before that is too old to revert to, I've made too many changes since then for it to be worth using. So it looks like I'll have to fix this problem the hard way...

133
BF2 (and FH2) currently has 6 object classes/types used by "aiTemplatePlugIn.setStrType" in objects.ai files: Infantry, LightArmour, HeavyArmour, NavalArmour, Helicopter and Airplane. Anyone know if it's possible to add more via modding, or if the classes are hard-coded?

Adding "Unarmoured Vehicle", "Medium Armour" and "Static Gun" classes would be very handy for improving the AI's target selection and weapon use - e.g. aircraft could be set to strafe unarmoured and light vehicles but not medium/heavy armour, tanks could be set to only use special AP rounds on heavy armour, etc. Currently, having all tanks/armoured cars as "heavy armour" and all guns, APCs and softskins as "light armour" makes it difficult to get the AI to use the right weapon type; HE rounds, for example, are the best choice against AT guns, but not too effective against halftracks.

134
I think I've fixed the problem with the Chevy Vickers .303 MG not firing - it appears to be caused by the AI min/max rotation values in objects.ai. These are the same as the actual min/max values in the .tweak file, but nevertheless, increasing the maximum elevation + depression values seems to do the trick in getting the bots to aim and fire this gun correctly.
There are quite a few other vehicles with inconsistencies between the AI and actual min/max rotations for weapons (the worst is the Valentine which can't rotate its turret 360' !) - this may be part of the reason for tanks not firing at close range, as many have AI settings that don't let them depress their gun as low as they're actually capable of doing (hope this makes sense) so I'll try fixing these and see how it changes the AI behaviour.

This is the last change/fix I'll attempt to make before I release the next version of my mod (promise!)

(I'd try out Winterhilf's Nebelwerfer fix, but Rapidshare now seems to be virtually unusable for non-paying users)

135

I haven't tried fixing the Typhoon rockets yet - I think this'll have to wait for either the next official FH2 version or at least improved AI versions of the Normandy maps. Currently the only SP map with the Typhoon is Winterhilf's infantry-only Totalise, since the German bots don't use vehicles, AI Typhoons don't have much to fire their rockets at. The bombs on the Fw190 and other aircraft should be fixable in the same way as the Stuka's (rem out the line that rotates the bomb 180 degrees), in fact I think I've already done this.
I've also now stopped infantry from using rifle grenades other than HEAT against tanks, they'll still use thrown grenades as a last-resort weapon (they unnerve human tank drivers, if nothing else - and can damage some light vehicles) but I might disable this also in future. Not sure why bots don't use the Geballte Ladung, it has the same AI data as the British AT weapons.

So far I've stayed away from attempting to fix map bugs, partly because other developers like Winterhilf are already working in this area, but mainly because I have virtually no BF/BF2 mapping experience! Please don't mistake me for any kind of genius modding expert - the only reason I've managed to make so much progress with improving/fixing the FH2 AI is because it appears to have been so neglected by most of the mod developers (understandable given that the mod is focused on MP)

These are the issues in your list which I've fixed at least partially in the current version of the AI minimod (to be released soon):

- AT guns without HE not firing (at infantry, I assume you mean) - fixed
- Tanks + AT guns firing HE at infantry rather than AP: I've done as much as I can to fix this, all tanks + guns with HE will (theoretically) never fire
  AP at infantry. Similarly, they should prefer HE shells for attacking AT guns and MG positions. However, the AI doesn't seem to always "do as it's told"
  in this case. I suspect the BF2 AI just isn't fully programmed to cope with multiple ammo types for the same weapon (vanilla BF2 doesn't have any AFAIK)
- PzII and other tanks not firing at point-blank range - fixed, the minimum ranges for tank guns are greatly reduced.
- Bots using static MGs more: improved, though not fully fixed.
- Planes using MGs/cannons: fighters will strafe infantry and light vehicles/AT guns (often quite effectively) but bombers rarely do, I've only once seen the Stuka fire its MGs at anything.

Things I'll try and fix (as far as possible) in a future version:

- bots bailing and switching crew position (they do it in vanilla BF2, so surely should be able to do it in a mod)
- radio/comm rose commands working correctly (already made some progress on this, but not fully tested, so won't be in the next minimod release)
- fix bots not aiming/firing some MG positions (Vickers on Chevy, rear MG34 on 251, .50 cal on M10, etc.)
- bots using German and US AT charges
- reducing range of infantry AT rockets
- Stuka (and other bombers) using guns on infantry rather than bombs (possibly)
- reducing accuracy of AT guns: not sure why this is happening, they have the same "deviation" settings as equivalent tank guns.
- armoured cars focusing on infantry: again, they ought to do this already, their weapons have a much higher AI strength vs. infantry than armour.

Things I'd like to try and fix but don't guarantee anything:
- Stuka dive horn working
- bots using artillery howitzers and Nebelwerfer (even if only against targets that they can see directly)
- raising the AI view perspective for artillery - probably not possible unfortunately, I don't think you can have separate view positions for AI and human players.
- tanks only using special AP vs. tanks with heavy armour: almost certainly not possible, currently there is no way for the BF2 AI to tell the difference between different tank types, they're all in the "HeavyArmour" category (and "LightArmour" is already used by AT guns and unarmoured trucks)

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