Author Topic: AI tweak/fix mini-mod v1.0 ready for download  (Read 10247 times)

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #30 on: 24-02-2010, 11:02:40 »
@ Drawde: I just noticed that your minimod is causing a CTD on Goodwood-16... ???

Before installing it, GW-16 was one of the (my) most stable maps.

I've tried it 4 times since installing the minimod, and it's CTD 3/4 times; the three times it crashed I was on the British side, and the one it didn't I was as a German.

So I just "uninstalled" it and played 8 rounds (4 per side) with no CTD... :-\


EDIT: OK, scratch that. I just "reinstalled" the minimod to be 100% sure it was causing problems on GW-16, and I played 6 rounds (3 per side) and no CTD at all... ::)

*sigh*...oh well, maybe XWW2 will ease the SP pain when I DL it tomorrow...
« Last Edit: 25-02-2010, 11:02:07 by cannonfodder »

Offline Drawde

  • Jr. Member
  • **
  • Posts: 160
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #31 on: 25-02-2010, 20:02:00 »
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.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #32 on: 28-02-2010, 19:02:56 »
Any word on this? Is this still going on?

Excuse my paranoia, but it seems every AI project by WinterHilf, Legion or any other good Samaritan who takes up a personal AI project for the good of the community (and especially as fixes or improvements between official releases) tends to go silent after 1 or 2 permutations...


Offline Drawde

  • Jr. Member
  • **
  • Posts: 160
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #33 on: 28-02-2010, 21:02:21 »
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?


Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #34 on: 28-02-2010, 22:02:40 »
thank u, thank u... I must admit I was having a rather depressing weekend, but this really lifts my spirits.. As unsettling as it makes me feel saying so :-\

I'm glad you've solved the 2pdr issue - It must be the same thing with German APCs mounted with the mg34... the issue isn't with the Mg42 version though, but it was first noticeable with the mg34 variant of the APC

About Goodwood - I must say, it baffles me. I'm sure people have tried using debug since it was first recommended when it became clear that alot of 2.2 maps had ctd issue... especially Goodwood - But so far, you've been an ace discovering and fixing bugs that no one else has such as the Stuka, and now the 2pdr.. So I say try it out again... You might find something that we all missed...

Hey, does the Stuka bomb issue that you found a solution for apply to the typhoon's rockets and the FW190's bomb? I've noticed that the typhoon to be precise aims at me once i enter the StuG, but doesn't fire.

Another thing i've noted from your last version is that bots seem to attack armored vehicles with anything they've got. They throw nades at it and fire riflenades too, even at tanks

Here is a list of all the major considerations I could think of, some of which you might have already implemented, others you might consider:
a/ Getting bots to bail mobile vehicles?

b/ Getting armored cars like the 222 and Marmon herrington to focus on infantry and less on tanks?

c/ Getting AT guns without HE to not fire (Not essential, but worth noting)

d/ Getting AT guns, including those on halftrucks to fire HE at infantry if they have it

e/ Tanks and the 88 firing HE at infantry instead of AP

f/ Reducing the range for rocket infantry

g/ Giving AT guns the accuracy of tanks... currently they are insanely accurate

h/ Making German infantry use the gabellte landung and American infantry, comp. B in the same way as the Brits use charges on armor

i/ Planes firing cannons at infantry once again, or at least firing them at light vehicles and concealed infantry

j/ Tanks selecting special AP against superior tanks... the PZII should only use its normal rounds on the
Stuart or anything lighter

k/ All mgs being used as readily as the mortar or mg15, including deployed ones

l/ Raising the view perspective for mortar to allow bots to use them against targets concealed by walls, topography etc - And bots using mortars on infantry before considering them for vehicles

m/ Bots using howitzers, including rocket howitzers

n/ The Stuka's divehorn, used like a 'fired' armament or like the airbrake but before an attack, rather than after

o/ Tanks using AP and HE with equal merit at AT guns

p/ Not all traversable positions are used in traverse... eg. the vikers is never tranversed properly to fire at enemy units - For all variants i.e. the stationary version, the deployed version or the chevy-mounted version, nor is the .50 cal atop the M10,

q/ Ability to switch to driver position if the driver of a vehicle isn't available for a while, to switch to mounted mg if the vehicle is under attack from infantry or bail if the bot gets to as close to its destination as the vehicle would allow, but no further.

r/ PZII and other 20mm tanks using their cannon even at point blank range, instead of going silent and becoming sitting ducks

s/ Putting code for the commo-rose back so that bots would follow orders from it.

I also suggest, making the Stuka fire mgs as first resort on infantry and using its bombs on vehicles so that it doesn't 'see' bombs as better all the time

now again, this is a long list and some of them might be difficult, impossible, or just too close to release to implement. However, this list does capture practically all current issues with the ai, save for those that your previous version already solved, such as traversal of AT guns. You might find it worthwhile for later changes

We SPers really cannot thank you enough, Drawde... you do us a really, really, big favor here :-)


« Last Edit: 01-03-2010, 10:03:50 by djinn »

Offline Drawde

  • Jr. Member
  • **
  • Posts: 160
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #35 on: 01-03-2010, 20:03:15 »

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)

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #36 on: 02-03-2010, 08:03:27 »
Thanx for the detailed reply.

I do think Legion could pick up the latter projects such as artillery perspective and vehicle bailing. As was with Fh1, having these active on the battlefield will really make all other shortcomings forgivable.

It's unsettling how there's been absolutely no word from him or WinterHilf on any of this. I would say you guys should work together on this sp minimod. But seeing how he went silent after doing his thing officially, I'm not sure that'll be such a
good idea, a sad fact.

Offline winterhilf

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #37 on: 02-03-2010, 13:03:46 »
Still around, real life's been hammering me recently though.

Cheers Drawde, Gunnie's reexported those wrong way bombs, they're in the build & working fine with ai now.

I've got bots firing the Nebelwerfer, again this is already in the build but if you'd like a look here'tis
http://rapidshare.com/files/357843717/Nebelwerfer_ai_tweak.zip

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #38 on: 02-03-2010, 18:03:38 »
Sorry to hear, but nice to know you are still around

I tried the patch, but truth is, bots don't seem to like the Nebelwerfer. The last time I actually saw it manned was in 2.2, so for now I cannot tell how bots use it

That said, I'm most curious about the feasibility of rasing the elevation for view points on artillery pieces to aid bots fire at targets which, at ground level they cannot see. You might be aware of Drawde's success in making bots fire mortar tubes (A feat which I personally consider astounding since it has been deemed the most impossible of bot feats since 2.0 as a result of the high elevation).

Thanks again for the little gift, Winterhilf. For some of us SP in FH2 is really all we have now since the PC I have at the moment is really the lowest that BF2 will allow so it makes online play, and in fact, playing any other game I have impossible, making the beta of FH2 bots, the only respite I have recently (Probably until the summer).


Offline Drawde

  • Jr. Member
  • **
  • Posts: 160
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #39 on: 02-03-2010, 19:03:10 »
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)

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #40 on: 03-03-2010, 01:03:55 »
Actually I downloaded it under 5seconds and I am not a subscriber of RapidShare


Offline TheLotusEater

  • Newbie
  • *
  • Posts: 7
    • View Profile
Best of luck!
« Reply #41 on: 03-03-2010, 07:03:24 »
Well... best of luck to you guys. Really looking forward for your minimod update Drawde and glad to see you back Winterhilf. Now let's win this fight with the ai! 8)
Load the sixpounder!

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #42 on: 03-03-2010, 09:03:35 »
...Regarding Goodwood 16...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...
When I first got my dirty mitts on GW-16, I played about 14 rounds straight (mostly as a Brit) so I'd say the chances of it being a pathfinding issue is pretty low. Although it may very well be the problem on GW-64...

Drawde, I've played another few rounds (all as a Brit) after reinstalling your minimod with no CTD... ::)

I dunno why it was causing a CTD before and not now I've "reinstalled" it; I just swapped the serverarchives.con around. I'm gonna try it again just to be sure.

Just a thought...maybe there's a spawnpoint somewhere (in GW-64) that's allowing bots to spawn "off the mesh", as soon as they do it causes a CTD?... :-\

I'm not a subscriber either and I don't have any problems with Rapidshare, but I find if I try and DL something off it after 10pm (Sydney time) it can take up to a dozen attempts before there's an empty slot.


EDIT: Just played another 3 rounds on GW-16 with no CTD...

Tried the Nebel fix on Totalize, bots weren't interested. I'll try raising the temp of the gun to get them to use it.
« Last Edit: 03-03-2010, 12:03:52 by cannonfodder »

Offline Drawde

  • Jr. Member
  • **
  • Posts: 160
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #43 on: 04-03-2010, 20:03:14 »
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...
« Last Edit: 04-03-2010, 21:03:32 by Drawde »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: AI tweak/fix mini-mod v1.0 ready for download
« Reply #44 on: 04-03-2010, 22:03:33 »
sorry to hear that. We are all really grateful for the effort you've put into all this

Good luck finding the bug

BTW, a small issue I noted with the mg42 stationary bipod:
In PDH, I saw a German man it for the first time since 2.25 was released (Bots were fine with it till then). Well, this bot manned it and was being shot at by everything and eveything, rockets, bullets, riflenades.. but he wont open fire, he didn't even change the guns' position in order to aim at anyone in particular...

The tripod version fires fine, although barely used - I saw it used in PHL, as is the mg34 tripod (Not sure about the mg34 bipod though), the mg15 has no issues either..

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 - You might not want it to reflect the quality of the minimod though, so you could upload it and give the link to only a select few *How you doing*

« Last Edit: 05-03-2010, 07:03:06 by djinn »