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 2 [3] 4 5 ... 11
Thanks! I've fixed the problem now (turned out to be a typo in "" which contains the artillery data)

I've managed to get the custom SP artillery working correctly now (with spotting camera) so these will be in the next minimod version.

Is the speed-activated divehorn in the AIX Stuka files? If so, it should definitely be possible to add it to the FH2 Stuka.
Bots don't usually seem to "dive-bomb" properly with the Stuka or any other plane, though (just shallow dives)

Still no progress with rockets (I'll check the AIX files out later) but I've managed to increase the duration of vehicle wrecks (increased from 60 to 500 for tanks, slightly less for trucks etc.). I'll be interested to see how this affects pathfinding on maps like Goodwood and Mersa Matruh with tanks in urban areas!

I tried disabling the aifixups script to stop static gun respawning, but got a CTD immediately I entered a destroyed gun that I'd repaired (2pdr on Siege of Tobruk). So it looks like this is still no good for SP. I suspect it wouldn't really have worked properly anyway as it's impossible to make bots "understand" that repairing the guns is vital. You'd probably get the occasional bot engineer repair a gun, but not as often as needed, so it would switch the imbalance over to the attacking side (tanks respawn, guns don't, so sooner or later the defenders will run out)

I'll definitely try increasing the spawn times for static weapons, which should be a partial fix for the issue.

Singleplayer and Coop / Re: Normandy Storch
« on: 02-07-2010, 20:07:31 »
Haven't seen this issue myself, but will check it out... probably due to a wrongly assigned AI template or similar, like the Jeep.

I also got a CTD on Purple Heart Lane the other day, but it occurred about 15 minutes into the game - I played as German for the first 10 minutes or so, then switched sides. The 88 was in use from the start of the game, so that didn't appear to be the cause - the Nebelwerfer and mortars were also firing. I was trying to deploy a mortar kit at the time the CTD occurred, so this may have had something to do with it.

Do you always get a CTD at the same approximate time/location on this map?

I somehow seem to have "broken" the artillery spotting camera in my FH2 install... instead of the overhead view of the target (or the gun, if no target available), it just displays a third-person view of the gun, even if there are spotted targets available.

Originally I thought this was due to my using custom SP-only artillery objects in the map, but I still get the same problem when replacing them with the standard artillery objects, and it even occurs when running FH2 without the AI minimod .zip files - so it's presumably caused by one of the modified Python scripts from the minimod, rather than by any modifications to the artillery object data. For some reason I neglected to backup the 2.26 Python directory (despite backing up everything else) so can't restore the original files.

I really need to get this issue sorted out before I release the next AI minimod beta version (it's not a critical, game-stopping bug, but still annoying for anyone who actually wants to use the spotting system) - so any chance someone could post the Python directory from an unmodified FH2.26 install here? It's about 110kb zipped so probably small enough to attach to a post.

A complete reinstall of FH2 is the only other option, which I don't really want to do as it'll also involve re-installing all of my modded map data.

The rockets definitely don't have the same rotation problem bombs did pre-2.26; the rocket "launcher" dummy projectiles are rotated slightly to get the projectiles to converge rather than flying in parallel, but aircraft gun barrels are set up in the same way and the AI doesn't have any problem with firing them.

Also, the bomb bug messed up the plane AI so badly that bombers nosedived into the ground as soon as they saw a target - whilst rocket planes can still fly normally and make strafing attacks on targets; they do everything except actually fire the rockets  ???

No luck so far with the aircraft rockets... 2 hasn't had any effect.
If I remove the guns on the Typhoon and leave the rockets, it will make "strafing runs" on ground targets but not fire anything. The rockets fire OK when I fly the Typhoon myself.
I've tried looking at every single line in the aircraft rocket data and comparing it to other weapons (including vBF2 helicopter rockets) and have altered/disabled various settings but still can't get them to fire.  ???  I've also looked in the projectile data but there doesn't seem to be much there that would affect the AI.
The P-51 rockets look to have identical weapon data and AI to the Typhoon and P-47.

Where are the AIX files available from, if they're still around?

The german binocs issue is not about bots spotting, but the fact that players using german binocs in singleplayer can fire them, but they dont leave spot areas. The brit one does and i'm sure the US one does also.

Another weird thing... the AI minimod (any version) doesn't include any binocular-related files. I'll try them myself and see if I get the same issue. Currently there's a bug with my custom artillery objects where the "spotted target" view just shows a third-person (not overhead) view of the gun, but I should be able to fix this soon.

The fixed guns i.e AT, AA, howitzer, mortar, not sure about mg, do not respawn in multiplayer. They get destroyed and remain there like unusable statics until fixed. This was translated for singleplayer by bizness in 2.0 and it caused a ctd, as did bots with wrenches (later fixed). Bot guns thus simply blow up and respawn. My hope, after this patch is for us to get the multiplayer versions of these guns and see if they can be used, which would make bots have to repair damaged guns for reuse rather than simply wait for them to spawn.

Interesting... the code for this appears to also be in
        # armor.canBeRepairedWhenWreck = 1 and armor.canBeDestroyed = 0 causes crash
        for pco in bf2.objectManager.getObjectsOfType(''):
            if u.templateProperty('armor.canBeDestroyed') == '0':
                r('ObjectTemplate.armor.canBeDestroyed 1')
            if u.templateProperty('armor.canBeRepairedWhenWreck') == '1':
                r('ObjectTemplate.armor.canBeRepairedWhenWreck 0')

It might be possible to get the MP fixed gun system simply by disabling these lines. Not sure if bot engineers will realise how important it is to keep the guns repaired, though - I don't often see them repairing damaged vehicles.

(edit: last part of post was missing)

Here's some replies to some of the issues/suggestions mentioned - LONG post, you have been warned:

Repeating MG34 sound - Still haven't fixed this yet... tried a while ago but the fix I used on the 88/2pdr also disabled the MG's automatic fire.

Bots not using deployed 30cal: - Never seen this, will look at it (probably a missing AITemplate). What maps does this weapon occur in?

PHL CTD - Again haven't had time to play this map so haven't noticed this CTD myself,

German bot binocs not spotting - I didn't think bots could spot with binoculars anyway? I know I tried to get them to a while ago, with no success.

Nebelwerfer firing short - Fixed, this was caused by the same indirect fire setting that stopped the howitzers firing.

Planes focusing on infantry: Fixed, more or less, planes will not strafe medium/heavy armour targets (other than the Hurricane IID)

MGs not firing standing: Fixed (including the Beretta, I think), this issue is caused by a Python script ( which disables the prone-only setting for some guns in SP mode.

Armoured cars + artillery focusing on infantry: This seems almost unfixable, regardless of what you set the target priorities to. I'm wondering if vehicles are hard-coded to be more "visible" to bots than infantry? Howitzers do seem to focus on static guns as targets, though.

Bots firing rifles slower: I added a "cap" to the AI firing rate for pistols and semi-auto rifles in the last, 2.25-compatible minimod version - the same fix should be in the current version.

Destroyed vehicles lasting longer: Like the radio/comm rose commands, this is something I've been planning to look at for ages, but have kept putting it off due to more serious bugs/issues needing attention. It shouldn't be too hard to do, though.

Longer respawn times for static guns are definitely something worth trying (don't think removing respawning completely is a good idea, purely IMO), it will make up for the AI's laser accuracy for these weapons which currently tends to give the defender the advantage. I noticed that the guns on Totalise seem to take a very long time to respawn compared to other maps, which gives the Allies more of a fighting chance.

Commander AI fixes: Partly fixed at least - the next version of my minimod will include updates for all SP-playable maps (necessary due to the new SP-only artillery objects) and I've included commander fixes, AI improvements, and vehicle spawn tweaks in many of them. I hope to eventually have all SP maps with fully fixed + tweaked map-specific AI files but this will take a while to do. I think I've got rid of most of the commander bugs (caused by uncappable CPs being incorrectly linked), though.

Now, for the two issues which are really getting on my nerves:

1 - Bots not firing at exposed crew positions on halftracks/tanks: This is the major issue which is bothering me at the minute (plane rockets can wait for the next version, as they've never worked - whilst this is a new issue). Basically it's caused by the new armour system, there's a separate category for unarmoured vehicles which bots will fire small arms and MGs at, halftracks are "light armour" and ignored by small arms. I've tried giving the gunner positions the "unarmoured" class but this just causes a CTD; BF2 doesn't seem to like multiple AI armour classes on one vehicle.
Making light armour a valid target for small arms would result in light tanks, armoured cars etc. getting spammed with rifle/MG fire, whilst classing halftracks as "unarmoured" would make bots less likely to use AT weapons against them.

Also, I'm fairly certain that bots, even in earlier versions, never fired at exposed crew on tanks (Panther top MG etc.) as these have the HeavyArmour class... they might have fired at the Sherman top MG as this is actually a separate object (with its own armour class) attached to the tank.

The odd thing is that FH2 bots don't seem to be able to recognise the "HasExposedSoldier=1" setting which should - in theory - let bots fire at exposed crew regardless of their vehicle's armour class. Do bots do this in vBF2? (it's a while since I've played it) - I know they did in BF1942. If we can get HasExposedSoldier to actually work, it will solve the whole problem.

2 - Bots and AT rifles: I've mentioned this one before and can't work out what the %£!$ is going on. Firstly, I've disabled non-prone firing for ATRs - same as with MGs - but this just means bots don't use them at all; unlike MGs, bots don't seem to understand that they need to go prone to fire the gun (despite the "weaponTemplate.setFiringPose Lying" setting) and since making this change, I've never once seen a bot fire an ATR.
Secondly - and this is the really weird thing - on my copy of FH2, bots have never been able to hit anything when firing ATRs standing. They fire them, but the shot doesn't appear to go anywhere - though I've noticed the occasional teamkill message. I've experimented with firing an AT rifle standing inside a small building (the script also allows humans to fire standing) and found that the bullet hole usually appeared somewhere -behind- where I was standing. I even managed to blow up a civilian truck by standing in front of it and firing an AT rifle...

But Djinn and other players have reported that bots can hit targets when standing without any problem. Since everyone's using the same weapon data files and AI behaviour files, I have no idea what is going on here. Could it be anything to do with difficulty settings? I usually play with the AI difficulty on maximum, which as far as I know ignores the weapon deviation (inaccuracy) settings in the AI files.

How about Clivewils baby,the AIX_P51D
That must use its rockets ?

Unfortunately, no... this one is on Op. Cobra and I've never seen it fire rockets, though it will strafe targets, dogfight with Fw190s and drop bombs OK.
The rocket bug may have something to do with the fire rate or automatic fire settings as I'm sure I heard a plane rocket firing sound on Totalize once (definitely wasn't a bazooka/faust or Nebelwerfer) - but only one.
Also, I have the minimum range for rockets set to 50, not 500 as in the default AI files. Not sure increasing velocity is a good idea as it will also affect rockets fired by human players.

Anyway, I'll have another look at the plane rockets later today or tomorrow and will also try playing with different difficulty settings to see if bot AT rifles behave any different.

Don't have time to post more now (will do tomorrow hopefully) but will definitely have a look at the suggested fixes for plane rockets. Removing the MGs/cannons is a good idea, probably not necessary to remove the weapon itself, just its AI template so the bots ignore it.
All the rocket-armed planes seem to fire their guns OK, just not rockets. Also, my current AI target priority settings have a  very clear distinction between rockets and guns (the latter only used vs. infantry/unarmoured vehicles, rockets have a high priority vs. heavy armour) same as with bombs, which the AI has no problems using.

Regarding the 88 range on Totalise, the problem is really more the bots being able to see through vegetation/scenery rather than the range of the gun.  Reducing this would only be a partial fix and would prevent bots from firing at long range at targets that aren't obscured... I think this is one aspect of the AI that we'll just have to put up with.

note: that 88 in totalize is pretty much lame for a human player that can't see through the vegetations. Could bots not be doing "wall hacks?", as a human you could hardly see through vegetations so I think that won't nerf the bots much.
Thanks for the kind comments!
I agree regarding the 88s on Totalise (you wait till you see the Nebelwerfer firing too...) but there doesn't seem to be much that can be done about this - lowering the AI view range for this map would also stop bots firing when they have a clear view of the target. The only positive side is that bot-driven Allied tanks can see through the vegetation just as well as the Germans can!
PHL is similar, only with infantry... bots can see you through hedges so you're always getting sniped by enemies you can't see.

A couple of small improvements I've made recently (not specifically AI-related in this case) - the Ford GPA can now drive in water (it does have amphibious code in the .tweak file, but it doesn't work - I just replaced it with the Schwimmwagen code), and howitzers have HE shells as the default selection. This is intended to help the AI as they should be using HE most of the time anyway, but is also helpful for human players.
If I don't manage to crack the plane rocket bug after another week, I'll release the current version of the mod as it is, and leave fixing the plane rockets for the next version. Still don't know what the cause is, it's definitely not the missile lock code, nor is it the "deviation" settings in the

On a somewhat related note... Do you know if the US 81mm Mortar suffers from the same aiming bug as the British 3inch once did? On one of the maps I'm currently working on I've got the US bots entering their mortars but they never fire at anything... vehicles or infantry. When I watch them I see them rotating left and right, but not up and down. This is using your current 2.26 beta files...

I've tested out the US 81mm mortar (replaced the British mortars with it on Siege of Tobruk) and it appears to work correctly, bots can aim vertically as well as rotate, and will fire at targets OK.

The artillery fix "patch" will included updated mortar files, so if there's an error with the 81mm in the 2.26 beta version, it should be fixed by the patch.

Remote chance of getting just the howitzer code for now? :-D

I think bots being able to at least shell the frontlines should work for attackers, and for strong defender counterattacks.

Noted the purple heart lane ctd also? Approaching the 88.

Working on a temporary "patch" with the howitzers and Nebelwerfer (and slightly updated mortars) which should be ready in a few days.

I haven't played PHL much, not one of my favourite maps as I get sick of being repeatedly picked off by bots hidden in the hedges (bots can see through foliage much better than humans, also very noticeable with the 88s on Totalize ;D ). I haven't had much time lately to actually play FH2, as opposed to just testing out mod tweaks, and when I do I usually play on maps that have vehicles/weapons I want to test!

I'll release a separate file package containing the howitzer fix soon, as it may be a few more weeks before I finish the final version of the 2.26 minimod. This will need to be manually added into your mod .zip files.

Howitzers (and mortars) already have high priority for both defence and offence, as well as very high temperatures. The map strategy files also affect whether or not bots use static weapons.

I've decided to add AP shells back in (I only really disabled them in a futile attempt to get the bots to fire HE) but with a very short range (200 or so) and only against light/medium/heavy armour targets - so bots can use howitzers against tanks at close range, but they'll always fire HE when bombarding distant targets.

The range issue is interesting, I think I'll just give all howitzers a max.range of 2500, which should be far enough to hit more or less anything on the map. (Currently it's only 1000)

On a somewhat related note... Do you know if the US 81mm Mortar suffers from the same aiming bug as the British 3inch once did? On one of the maps I'm currently working on I've got the US bots entering their mortars but they never fire at anything... vehicles or infantry. When I watch them I see them rotating left and right, but not up and down. This is using your current 2.26 beta files...

Haven't spotted this bug yet, I did see a bot manning the US mortar on Luttich and not firing, but I assumed this was because nothing was within range. The 81mm mortar .tweak files seem to have been "cloned" from the sGWr34, and have the same elevation/rotation movement values.

Howitzers/Nebel are now finally working, sort of at least! (See my new thread on the subject). Not much progress with plane rockets, though I've been working on this over the last few days. It ought to be fixable somehow, rockets are just direct-fire weapons so bots should be able to use them with no problem.

This is my main gripe...even though Drawde got them to jump in and outta vehicles of their own free will, they still don't listen... :(

I'm definitely going to look at this issue in future... in fact I've been intending to for ages, but haven't got round to it due to other bugs needing fixing (map CTDs in particular). In theory it shouldn't be too hard, all of the code needed should be in the vBF2 commo rose files, and just needs integrating into the FH2 code.

Whilst I've hit some annoying problems with getting the current AI minimod version finished (notably planes not firing rockets, and bots not firing small arms at exposed vehicle crew positions), I've finally found out how to get the AI to use artillery howitzers (and the Nebelwerfer): Just set the indirect fire value for HE shells (weaponTemplate.indirect) to "0" in the file.
Bots will now be able to fire artillery at anything they can see (and with the raised viewpoint, this is quite a lot - for example, the German LeFH18 on Siege of Tobruk can fire at the British forward line, and the British 25pdr at the two bases nearest the main). 

By default, all FH2 artillery weapons have HE shells set for indirect fire. However, BF2's AI only seems to recognise mortars as "indirect" weapons. The AI treats howitzers as direct-fire weapons, same as an AT gun (bots can automatically work out the amount of vertical elevation to get the round to hit, same as with low-velocity tank guns) so they won't work if you set them as indirect-fire weapons. (The Nebelwerfer will occasionally fire if set as indirect - but not as much as it does now...)

This is still only a partial fix, bots are still limited to targets in their visual range and they can't fire at spotted targets. They're also oblivious to scenery blocking their line of fire (the Nebelwerfer on Totalize usually ends up hitting the windmill when firing at Allies advancing along the road/railway). Bots also seem very reluctant to use howitzers on some maps, especially if they're on the attack (the US 105mm on Cobra should be able to see plenty of targets from its hilltop position, but I never saw a bot use it).
I suspect there's not a lot more that can be done to improve things, though if I can find a way to raise the viewpoint higher without blocking spawnpoints, it should allow the bot gunners to see more distant targets.

One other thing: I've disabled the AI for howitzer AP rounds, I initially did this just to try and get bots to fire HE, before I discovered the direct fire fix - but I'm thinking it would be a good idea to keep this change, since bots are notoriously bad at picking the right shell type. Direct HE hits appear to be able to kill most FH2 tanks in one shot, so the lack of AP shells isn't a great disadvantage. Anyone have any thoughts on this?

Pages: 1 2 [3] 4 5 ... 11