Forgotten Hope Public Forum

Forgotten Hope 2 => Singleplayer and Coop => Topic started by: Drawde on 06-03-2010, 22:03:40

Title: AI tweak/fix mini-mod v1.1
Post by: Drawde on 06-03-2010, 22:03:40
DOWNLOAD LINK (http://www.users.globalnet.co.uk/~pinniger/games/fh2aitweaks1.1.zip)
(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.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 06-03-2010, 22:03:41
Wohoo! I was actually expecting this in 'a couple of days'! Something to freshen my FH2 experience

Don't worry Drawde, ol' chap. You gotz 'ere the finest set of BTs you can find - And you can count on us. We'll iron out them creases fur ya! *Informal salute*
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Stylo on 07-03-2010, 04:03:20
Downloaded it, played a round of Crete 64 and loved it. The improvement on the planes are awesome and the bots are finally, accurately dropping bombs, and it makes a massive difference to gameplay experience. The fix on the 2pnder AT is great, because it use to always get on my nerve hearing it over and over again. You've done some damn fine work overall, Drawde, so I thought I might as well register and say something ;)

Keep up the good work dude, looking forward to future releases.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 07-03-2010, 08:03:54
Ok so here's what I noted:

Did you reduce the line of sight for the bofers or 88? Its weird, but in PHL, the 88 can now fire at the nebelwerfer base - which is tres cool, but in El Alamein, unless I fired at it with a rifle while within clear LOS, it didn't fire at me at all - and there was no one else there. For tanks, it fires at the same range, but for infantry, you needed to be quite close before it fired. But this is just a descrepancy cuz like I said, in PHL, it fired 'fine'!
Also it took the 88 a while before it saw a plane attacking it and by the time its ready to fire, the plane is well gone i.e LOS reduced? The bofers too - Infact, in Alam Halfa and Alamein which are supposed to be where it thorougly dusts the sky, it was completely silent, while the Stuka bombed the shit out of everything

For AA use, their original values were fine. A plane reqquired real luck or a decoy in order to destroy the AA gunner as should be the case.
Other AAs are fine though

Also, bazookamen still fire as far as they did in the first patch

I haven't yet seen mortar-users drop bombs on infantry either. I only saw it manned a couple of time by the Americans in PHL, but they never fired. In El Alamein, I haven't yet seen it manned to know what it considers as top priority

Planes defintely have reduced LOS. a plane will fly in a straight line until its almost ontop of its target before it glides to aim and fire... usually, rarely getting a hit. Did you reduce their LOS too?

The Stuka doesn't consider AT guns as bomb targets, and infact they are the only thing it uses its mgs on. Perhaps it might be better for it to use mgs on infantry in the open and bombs on concealed infantry (The same situation rifle-grenades are used), but this time, in every event they are concealed, and not just sometimes. For AT guns, however, especially the 6pdr, it really should drop bombs. A 6pdr in Alam Halfa held an entire attack force back while the Stuka tried to strafe it to no avail. It only destroyed it once it dropped a bomb on a Crusader which was right next to it.

For 2pdrs, mgs would be nice, since it doesn't conceal the user that much, same for mg positions and mortar positions.

Still never got to see the nebelwerfer manned so I cannot tell if bots CAN fire the rockets as Witerhilf said (did you include his patch to your build). Perhaps if it was given similar priority to an AT gun, it will be manned more often.

That said,
Now tanks fire HE like in 2.2, which is Sooo welcome
People man all mgs (so far I've only tested with the mg42 bi and tripod and mg15) and use them quite well
The 88 in PHL is heaven
Planes use cannons again
The Stuka doesn't fly off map after dropping 2 bombs, but becomes a real threat unless killed
No more over-repetitive 2pdr sound... couldn't tell about the hanomag mg34 though - has that also been fixed for its repeating sound?
6pdr without HE is silent in the face of infantry till the tanks show up :-)
Tanks seem to move in differently, more cautious, which is nice since they don't run into each other before firing

I saw a boys-rifle man take out a frigging PZIII!
I saw the bots use the never-ever-been used xpack in Luttich.. They do cause stupipd TKs with it by dropping it for no reason, but I'm sure its more of the situation than the tool... kinda like their use of the british charge i.e when they see something, they may forget it isn't smoke


EDIT: Yes, there definitely IS an issue with AA range. it fires at vehicles aggressively, but seldom at aircrafts and tanks with HE or mg could fire alot further. Sure their accuracy wont account for much, but they will be able to keep infantry suppressed. Say, in Seige of Tobruk, a tank should be able to fire HE from the exit way coming from the German base... or in the open area between that and the first line defenses

Also, British mgs and perhaps the American browning .30cal aren't as liked by bots as the German mgs. I deployed a British vikers and no one bothered with it



Title: Re: AI tweak/fix mini-mod v1.1
Post by: cannonfodder on 07-03-2010, 11:03:00
So far I've only tried El Al, Goodwood-16, and Aberdeen, but no CTD's yet.

The main things I noticed were the bots are using the Geballte Ladung now. I first noticed a few kill messages on El Al, then I was taken out by one on Aberdeen while trying to cap Strongpoint A. The bots definitely need to move further away when they drop one, the bot that killed me was crouched about a tank length from me and was taken out in the blast.

Also, when I tried GW-16, there was no mass TK'ing by the Brits at the start of the round. :)

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)

@djinn: Yeah, I thought the AA seemed a bit quiet on El Al...usually the Bofors at the flag on the Brit side of the ridge kicks ass, but I spawned there quite a few times and rarely saw it fire.


Quote
...Still never got to see the nebelwerfer manned so I cannot tell if bots CAN fire the rockets as Witerhilf said (did you include his patch to your build). Perhaps if it was given similar priority to an AT gun, it will be manned more often...
Before I installed this minimod (1.1), I turned the Nebel's basicTemp up to match the 88's and got a bot to man the one on Totalize, but he only fired one rocket (no kill) because there was never any targets close enough. Similar thing on Goodwood, I've seen it fire once and they'll man it eventually (I play SL and sit next to it to speed the process up) but it'll CTD before the Brits get within range.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 07-03-2010, 11:03:11
Please, please tell me how you increase the temperature...

With what the bots do with the 88 in PHL, I can imagine a battle of artillery at pointblank range...
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde 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.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 07-03-2010, 20:03:38
Thank you, thank you, thank you for the reply and fix....

SP is ba-ack boys!

EDIT: Played El Alamein to see why AA was so 'innactive' and I noticed that what it does is that it seems to be 'day-dreaming' such that the first pass from an enemy plane are almost unnoticed until the plane is over-head. If it wasn't destroyed or targeted, it springs to life and becomes just as active as before - Sometimes however, the difference sometimes too is what feels like a player using the AA with poor reflexes...

I do think the change you made to bofers may have had a negative effect. I still can't explain why planes seem to target ground targets alot later than they used to.... Is it possible to compare values with the stock FH2 and see if there is something different because the Stuka doesn't have this issue; it targets ground targets when using bullets at the same range it always did... Perhaps fighters are using them like they would mgs... at closer range to make sure they get a hit...

Frankly, aircrafts and AA were fine in the stock FH2 save for AA not being anti-personnel.

About the temperature, I opened the file and didn't know where to start. What value would make the nebelwerfer as occupied as say, a PAK40 or 88? If I simply used the same exact values in the PAK40s files, will that do it?

Also I increased the bail-rate from 1, as it was to 3 but I didn't see any significant change in bots NOT bailing from vehicles... What do you suggest as an apprioporate value to make the bail if, say, the vehicle is stuck or the driver is not in and they are idle?

Oh and btw, I saw the bots use boys rifles to kill a short-barreled panzer IV! - MORE THAN ONCE!!
Title: Re: AI tweak/fix mini-mod v1.1
Post by: cannonfodder on 08-03-2010, 10:03:51
Bardia and Crete-64 are all good...but riding your bike around Crete is not a good idea, the Stuka pilots like strafing cyclists. One strafed me while I was in a Chev as well.

...About the temperature, I opened the file and didn't know where to start. What value would make the nebelwerfer as occupied as say, a PAK40 or 88? If I simply used the same exact values in the PAK40s files, will that do it?...
Maybe. I changed it from 100 to 500 (same as 88) and on Totalize they still seemed to prefer the 88...maybe they can shoot further with it? :-\

Title: Re: AI tweak/fix mini-mod v1.1
Post by: Stylo on 08-03-2010, 10:03:19
For some really odd reason, 5 seconds into Goodwood 64, one of the bots dropped 2 satchels at his own feet, ran away and TK'd his entire squad. Sure it was hilarious, but I have no idea why it happened. Even still, on both sides atleast 2 squads just stand around and don't move from the get-go. I get the same in most other maps, there'll be a couple of squads who are just sitting in the middle of nowhere, not moving, even after giving them command orders.

I unfortunately never got the opportunity to download the newer beta versions from winterhilf's thread, so perhaps I'm missing out, I dunno.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 08-03-2010, 12:03:29
The NEWER version is right here in this thread - It was updated. The only thing the one in Winterhilf's thread added was the usable nebelwerfer... less than a megabyte file

Yer for some reason bots use the charges like smacktards - FINALLY, the bots are as stupid as pubbies :-P
Those squads that remain do so more in NA maps because for alot of them (Supercharge, Mersa Matru, Seige, Tobruk, El Alamein), the commander AI is messed up and gives conflicting commands.

For later maps like those in Normandy, specifically, Luttich and Goodwood, I really don't know WHY they seem to camp the main bases - Perhaps the next issue we should try to solve as SP fans... Shelf the Goodwood CTD issue for a bit, or do them in tandem

Thanks cF
Will try that out - But again, and I cannot emphasize this enough, someone should REALLY consider raising the view-perspective for howitzers and mortar to something higher (about twice as high) than PDH's cliffs (Basically plane height) so that bots can targets as far as their guns can or SHOULD be able to aim to

I'm sure it would completely transform the battlefield if all you need to do is coupled with dodging enemy artillery or moving in tune with yours... Like FH1...

It may not come to many since bots seem so frustrating, but we've already surpassed FH1 bots in all aspects of intelligence - But lack or artillery fire, unfortunately shows their fallshorts all the more - Put it back in and you put them both on an equal playing field so that you see JUST how far we've gotten with AI

I really hope Legion or Winterhilf would give us feedback on this idea for artillery

Title: Re: AI tweak/fix mini-mod v1.1
Post by: Eat Uranium on 08-03-2010, 14:03:23
one of the bots dropped 2 satchels at his own feet, ran away and TK'd his entire squad.

Sounds like it uses the C4 code.  The bots in vBF2 would put that on flagpoles, and detonate it when the flag went grey.  Of course, the satchel goes boom on a timer rather than a command switch.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 08-03-2010, 15:03:33
Tada... You win yourself a cookie


Back to playtesting Goodwood boys

Any chance of repairing this then?
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde 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.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 08-03-2010, 21:03:08
We still have top view cameras, no?

no idea of the Comp B issue - If, like Eat Uranium said, its that they use it like c4 then it means, bots feel they need to create a perimeter with it. C4 was used like booby traps by bots, which was the height of their intelligence - They dropped some around a newly capped flag and went off to fish - If you got to that flag and they were within sight, they blew it up to prevent you capping - If you survived that, then there was commander arty

Sachels.. dont... time-explode... So yer, this is an issue. Once their code can somehow be changed to that of stickybombs, especially, they should be fine cuz with stickys they try to put it ON the vehicle

It seems there ARE infact more CTDs btw. I got CTDed twice on Luttich - One for no reason, and the other might have been a vikers mg issue - Not AI, but deployment.

What I did notice though, was that once the vikers was deplyed, one bot run at it like he would use it - Not dashing, but jogging. He gets to it and tries to run past it, getting stuck behind it. Once I used it, he turned away to continue where he had previously been going - I re-deployed it and he did the trot back again

Wierd.

Finally, it sems mortar STILL see tanks as priority and NOT infantry - you sure about the priority? cuz it really seems bots clearly wont fire at infantry with it...


Title: Re: AI tweak/fix mini-mod v1.1
Post by: Stylo on 09-03-2010, 00:03:43
Hmmm, strange. Played 3 rounds of Luttich 64 as the allies and managed to get in 3 full rounds without CTD. Yet, I took 3 attempts playing as Axis, first round I CTD'd within 45 seconds, second round 5 minutes and third round was back to within a minute.

But yes, came across the Composition B charge problem again, and it's definitely the vBF2 C4 code. The bot capped a flag and dropped it straight away, as bots did with C4 in vBF2, but of course the Compo B exploded in his face. Surely there's a way to change the AI recognition of the Compo B and Satchel, because as Drawde said, they should be using them as sticky bombs and such.

Still no luck on Goodwood either. I managed to play around 5 minutes, where I capped Cagny West and East, virtually unopposed, until I found half a dozen bots inside an SdKfz, stuck under the bridge to the east of Le Poirier. As soon as I approached it, I CTD'd.

Title: Re: AI tweak/fix mini-mod v1.1
Post by: cannonfodder on 09-03-2010, 11:03:08
...FINALLY, the bots are as stupid as pubbies :-P...
;D

one of the bots dropped 2 satchels at his own feet, ran away and TK'd his entire squad.

Sounds like it uses the C4 code.  The bots in vBF2 would put that on flagpoles, and detonate it when the flag went grey.  Of course, the satchel goes boom on a timer rather than a command switch.
Bingo. That also explains them running a short distance and crouching after putting a satchel on a tank...the distance is enough to be outside the blast radius of the C4, but not any of the explosives in FH, and in vanilla they crouch when they detonate the C4.


...Anyone know how the AI - or the game engine itself - determines how different weapons are used?...
Nope, but someone over at BFSP will know: http://www.battlefieldsingleplayer.com/forum/index.php?s=1ae1a257a9be907de2eaa37987131b95&showforum=25

Quote
...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...
See above...the one thing I don't get, is why don't the Germans TK each other with the GL (by dropping them near flags)? I mean, they use it against tanks the same way they use the satchels (like C4 in vanilla), maybe it's just because they use the GL so rarely... :-\

Quote
...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.
*crosses fingers*...Don't bother me none if I can't use them, I never do.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde 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.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 09-03-2010, 22:03:03
Well, I personally think the standing option may be the only way to go - Considering how rare mg gunners go prone, which is fine against flesh, but for AT riflemen, this will kill their game.

Currently AT riflemen are quite effective against all soft targets. I'm amazed you haven't seen an AT rifle kill. They ALWAYS take out bren carriers, sdk222s, hanomags etc... And certainly a tank that hangs around long enough gets it too - Seem quite a number of those.

AA issue is less with thier bailing it - I'm yet to see anyone bail any vehicle. Its more to do with their slow response to imbound aircrafts.



Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde 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...
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 10-03-2010, 11:03:01
Oh no. And it is true, I haven't seen them fire once. I have seen them man it a number of times

The best test would be in El Alamein where they have the god-view of the battlefield - If they don't fire there, then its broken :-(

Unless someone has a wiser word to add

I somehow feel responsible :-(
Title: Re: AI tweak/fix mini-mod v1.1
Post by: cannonfodder on 10-03-2010, 12:03:19
Not on any of the maps I've played so far...not that I've noticed anyway.

Are the sticky bombs in the same weapon slot as the satchels?... :-\


...I somehow feel responsible :-(
Good one djinn, it's all your fault... ;)  ;D
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde 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.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: boka98 on 10-03-2010, 13:03:29
Hi

Thankyou for your work on improving the singleplayer experience in FH2. You've done a great work so far.
I have a simple question: does this minimod work with coop?

Keep up the excellent work.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde 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.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 10-03-2010, 15:03:02
On El Alamein, they'd destroyed a Matilda with a direct mortar hit... I do hope getting them to fire at infantry doesn't make them too accurate

Nice to know mortars are fixed.

Glad to hear the progress on howitzers. Might also need a high miss rate cuz splash damage is quite large in FH2

Will this be part of the fixed 1.1 or for the next patch?

Btw, Luttich definitely crashes now - Don't know what it is though - I get it in every game since 1.1's release

EDIT: I also think mg34s and 42 should be have longer-range accuracy - Currently they are only accurate for the first and perhaps second bullet, then they are fired overhead. These should be used from the current long-range you set with accuracy enough to punish the allies for not taking cover





Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde on 12-03-2010, 22:03:15
The Luttich crash bug is really annoying. I've no idea what causes it - as usual - since BF2 doesn't give any sort of error message; this is one of the most infuriating aspects of BF2 modding and must have wasted many other modders countless hours tracking down bugs that would be easily fixable if you just got an error message indicating what caused the crash.

I played this map (64-player version, with 48 bots) twice today, once as Allied - crashed after about 15-20 minutes - the second as Axis, which lasted much longer, crashing at 40-45 minutes into the game. In both games, each CP changed hands at least once, so the crash isn't caused directly by an object spawning; it's probably a vehicle crew position which isn't working correctly.

Anyone else have any comments on how long they've played this map before crashing, and what events might have caused it? And has anyone experienced CTDs on Luttich 64 with unmodded FH2.25 or with earlier versions of my AI minimod?

Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 13-03-2010, 20:03:37
Here's another little thing. As I did after the relase of 1.0, I will list a couple of prevailing issues in 1.1:

1/ the 88 doesn't see infantry until close up - As a dual-purpose gun, it is slow firing and vulnerable to infantry at close range, it should however be able to wreck havok further off... perhaps give it half the range it has for tanks, for infantry i.e HE targets, but definitely longer range than bot riflemen (Recommend original LOS value, 2.2)

2/ Planes DO have a reduced line of sight for ground targets with regard to their use of mgs.. they used to fire at you from range, now they dip-dive on you at really close up - Sure they are more accurate at this distance, but they also have shorter time to fire and are even more vulnerable to AA guns which they wont fire at until too close... (Recommend original LOS values, 2.25)

3/ the bofers AA gun - Also might be an issue with LOS  - (Recommend original LOS values, 2.2)

4/ For vehicle-bail values, you might want to take a look at the unpatched FH 2.2 instead of experiment to find a solution for the issue created by 2.25 - and take a look at some of those figures instead, because personally, I think the values never got better after that - Bots from to 2.0 to 2.2, if I recall correctly would bail if you did and used vehicles to get where they were going and only remained in it if it remained useful eg. tanks - If a vehicle was heavily damaged, they might bail from it.

The only real issue it did have with their preference for vehicles was the heat of each vehicle - the chevy was a real issue because bots liked it so and this was for positions not neccesarily part of the firing points, which made them camp at the gate of Supercharge's town instead of getting off and going on foot

Try using your values for each vehicle with the general bail-value from 2.2 and see how that works - Also look at vanilla values as bots really know when to bail vehicles and flee when it was terribly damaged.

Also, bots really don't like most mgs still, besides the mg15 and perhaps the vikers... mg positions should really be of more of a priority (or as much of a priority) as AT gun positions, which are usually in the same area

ps. the 88 also has multi-firing sound like the 2pdr and hanomag mg34

Title: Re: AI tweak/fix mini-mod v1.1
Post by: CBCRonin on 14-03-2010, 03:03:51
Anyone else have any comments on how long they've played this map before crashing, and what events might have caused it? And has anyone experienced CTDs on Luttich 64 with unmodded FH2.25 or with earlier versions of my AI minimod?
Played it for a good twenty minutes as allies; with flags at the farm, church, and both in the town changing hands with no problems.

It didn't start crashing until I went to the church area:

-Picked up a flamethrower and exited the small side door, crash.

-Entered the churchyard after walking from the northern town flag, crash.

No combat was occurring nearby.
--------------------
I would have initially said it might have something to do with a sound file 2.25 (maybe an ambient church sound), but if that was the case the mp players would be having the same issue.

I did notice that the axis bots did not bring the panthers into the battle, but I haven't tried to enter them yet to see if the issue is there.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 14-03-2010, 08:03:07
Weird as Hell but true... I started up Luttich, trying to cause a CTD and see what caused it. Took the suspected walking Stuka - changed to all positions.. nada... saw bots drive it off, one in position 5, one as driver, nada... saw Panthers and PzIVs on the battlefield... Saw on the minimap, allied tanks coming in force, nada... Spawned as American, tried all their tanks and armored car... nada

Then out of frustration, and seeing  STuG at the church, I decided to kill it with comp. B and afterwards grabbedthe flaethrower, pushed fire and it CTDed!

I doubt this is related to the original issue, or its just a very weird coincidence that it occured right when the culprit caused the crash, but its certainly another thing from SP minimod 1.1
Title: Re: AI tweak/fix mini-mod v1.1
Post by: CBCRonin on 15-03-2010, 01:03:37
Tried the Axis and played for about 15 minutes before I had to quit and eat, I didn't have a crash. Panther's were fine and the bots used them this time.

I went straight to the church and picked up the flamethrower, exited the side door (as I had done as allies), and began spraying all over...... no crash.

So I have no idea what is causing it.


 

Title: Re: AI tweak/fix mini-mod v1.1
Post by: Michael Z Freeman on 15-03-2010, 21:03:05
I started playing every map from the top in order with 1.1. Had a full game in Bardia. Another full game in Crete, both good. I'll continue down the list.

I noticed the mention of MG's rarely going prone. I've seen them do this twice. Once in Invasion of Tobruk and once in Crete. The MG even had another soldier standing by covering him on the Tobruk map.

Are the mortars set to just fire with no spotter support ? Or should I be spotting for them ?
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 15-03-2010, 22:03:07
For 1.1, mortars fire only as far as the eye can see so dunes and such block and prevent line of sight. The best example of mortar firing is in El Al, where the mortar position atop Kidney ridge has a god-perspective of the battlefield. However, I hear that unlike 1.0, in 1.1, the mortar for some armies is broken and will aim but wont fire

Possible good news is, but don't quote me, we have discussed drastically raising the viewpoint of bots for artillery so that they see the battlefield from very high up when on arty guns and mortar tubes, enabling them to fire as far as their new LOS. But again, this is WIP - And may not work at all... Let's see what Drawde can do with it - Also note that bots in FH2 don't have FH1's perspective i.e. remote vision when on artillery and so can only fire as though they were on an AT gun with lobed shells i.e. line of direct sight

Mgs are wonderful in Drawde's patches.. especially the mg34 which can be tres deadly at long range. Mg42 might take down up to three people on a very good day, but will more likely aim above your head after its first shot. They really are smarter now.. And about time too since some of us have been suggesting these very things since 2.0! Glad to see its actually possible. *Steps aside and points proudly to Drawde*

Bardia is probably one of the best bot playing maps save for Giarabub and Fall, Tobruk - 88s really divide the battlefield into specific battles. Glad you are enjoying it, Barnes. Our wait is paying dividends now :-)
Title: Re: AI tweak/fix mini-mod v1.1
Post by: CBCRonin on 16-03-2010, 00:03:50
I hear that unlike 1.0, in 1.1, the mortar for some armies is broken and will aim but wont fire
I haven't seen an AI manned mortar fire in 1.1 either, they do traverse and track targets as if trying to fire.
------
The only problem I can see with extending the LOS, would be the preference of bots for targeting the player. When the AI commander worked, before patch 1.5, the most frustrating thing in SP was constantly being targeted by commander artillery if you stayed still for more than a minute.
------------------------------------------------------------------------------------------------------
I noticed the LOS range of AI 2pndr and bofors is quite long on Siege of Tobruk. It works very well until the AI Axis control a forward flag, but it then becomes very difficult for the player to man a rear flag 2pndr/bofor..... as the AI manned positions easily target you, but you can't even see them (as they are so far away).

Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 16-03-2010, 09:03:44
The commander arty targeted you if you were in an unreachable location. If you were firing at bots from way off and they couldn't get to you, or if you were somewhere out of reach like a tower, they would call arty on you - same for unpath-mapped locations.

Yer, my concern has always been them being too accurate and relentless, but they do spread out fire to the immediate target, not just the player.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Michael Z Freeman on 16-03-2010, 11:03:16
Glad you are enjoying it, Barnes. Our wait is paying dividends now :-)

Good things come to those who wait ? ... or a mighty barrage anyway  :P
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Remick04 on 16-03-2010, 20:03:36
Hey, has anyone tried running the game in windowed mode... accordding to the FH2 tutorials if you having trouble with a map crashing on you and you can't figure out why you should you should try running the game in windowed mode. You should get an error message explaining the problem that way. I don't know if it works with AI issues, but was curious if anyones tried it yet, it may help in speeding up the process of finding bugs for this minimod... And by the way thanks for all the hard work being done here, I know how fustrating it can be and you're doing great... Offline is quite the epic experience now!
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 20-03-2010, 07:03:30
Any update on this?
Title: Re: AI tweak/fix mini-mod v1.1
Post by: cannonfodder on 20-03-2010, 08:03:14
Hey, has anyone tried running the game in windowed mode...
If only it were that simple... :)

I tried it once, but didn't get an error message...
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Michael Z Freeman on 20-03-2010, 10:03:04
Don't know either about that.

The levels I have loaded so far are stable, the only major annoyance being a repeating commander message that carries on even when I confirm the order. I have to leave the squad to shut him up.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 20-03-2010, 11:03:19
This was a prevailing problem with 2.0 ai-supported maps which never got an update on commander AI since then... Let me guess, it was either Supercharge, Seige, Tobruk, Mersa Matru (Worst culprit) or El Alamein?
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Michael Z Freeman on 20-03-2010, 12:03:35
Is there a way to fix ... ? Where should I be looking (archive / setting file). Maybe I can help in some way.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Remick04 on 20-03-2010, 20:03:47
If only it were that simple... :)

I tried it once, but didn't get an error message...

Ya I tried it too, didn't get an error message either... =(
Title: Re: AI tweak/fix mini-mod v1.1
Post by: cannonfodder on 21-03-2010, 04:03:58
Is there a way to fix ... ?
AFAIK the fix is a simple one, but it has to be done in the editor:

Quote
How to stop Commander Spam? - Answer, One of the uncapable flags in the map was 2-way neighbored. The rule for neighboring uncapable flags is you 1 way neighbor the other flag to the uncap. It's useful to remember, "My neighbor comes to me" when neighboring SA.
- http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=13677
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde on 21-03-2010, 20:03:14
I tried running BF2 in windowed mode, and got this error message (or similar - couldn't copy + paste the text directly, so I wrote down what looked the most important parts) when Luttich 64 crashed:

Debug assertion failed in input.h line 191
1 SetInput out of range: PINone max 64

The game ran for over 30 minutes before the crash occurred (I was beginning to wonder if I hadn't fixed the problem somehow - no such luck...). It looks like the CTD has something to do with the control input parameters for the AI, but I'm not sure where this problem is.

Goodwood 64 doesn't give any sort of error message in windowed mode, it just crashes straight to the desktop. This suggests the CTD issue on this map is nothing to do with the Luttich one.

Another question to anyone who's used this version of the minimod: Have you ever seen bots using the MG42 or MG34 "Lafette" mounts? I don't think I have so far (even during heavy fighting in Mortain), and I was wondering if this might be an alternative cause for the crash on Luttich. If an object's AI files are incorrectly defined, it can cause the game to crash when bots (not human players) use it - I found this when I tried setting all mobile AT guns to be "Fixed" to prevent bots attempting to move them about.

I haven't seen an AI manned mortar fire in 1.1 either, they do traverse and track targets as if trying to fire.

All mortars are fixed in the current version (not yet released) and can fire as well as aim. I've also raised the viewing point slightly so bots can (I think) see over walls, sandbags, buildings and other small objects blocking their LOS, but I've found that raising it too much (enough to get a really good view of the battlefield) causes the mortar object to "block" spawn points. I suspect there's a workaround for this, though (possibly disabling collision physics on the camera?)
Still not much success with howitzers, the only time I've ever seen one fire is the 25pdr on Supercharge firing at German tanks that get too near the British main base.

Unfortunately, bots can't fire artillery at spotted positions and probably never will be able to - the artillery spotting system in FH2 is almost entirely added via external Python scripting, so the BF2 AI can't recognise or make use of it.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: CBCRonin on 22-03-2010, 02:03:10
I remember the bots manning the laffy in the original Normandy release, but I think they stopped after the patch (not due to your mod).

The Bots  have always loved using the 42 in the middle of the town, mounted on the short wall near the sheds/house. I can't say I have seen them using it while using your tweak, but I did hear one firing from that location (so it was either being used or the German APC had pulled up near there).

 
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 22-03-2010, 09:03:17
Mg positions since 2.25 have been nerfed. Bots suddenly LOVE the mg15 and wont get off for showers, but they seldom used the mg34 and never used the mg42, which like you said was the most favored in 2.2 - The bots still love the mg15 in Drawde's patch, but about 85% of their original use, mg34s are next, about 20 - 40% chance of these being manned. Mg42 are used about 15 - 30% of the time. I specifically played maps like Point du Hoc and Purple Heart lane to see...

In 2.2, bots will man it and replace downed gunners to keep them firing no matter what - For some reason, this was changed in 2.25 at par with the 'new issues fixed=new problems created' policy.

I suggested earlier in this thread, I believe that Drawde (and the Singleplayer dev team) go back to 2.0 to use the variables used for vehicle use as bots could man mobile vehicles and abondon them when neccesary. 2.2 should be the point of reference for mg42 and this could be replicated for all other mgs from british to Italian to German....

The real new work should be on balancing which vehicles are prefered over others and HOW they are used, and that's already half done thanks to inroads started by Legion. What really should be going on is fine-tuning, but it seems that people don't have a point of reference as to what works and what doesn't so we are creating as many new issues in modding this thing as we improve other aspects. I have to give it to Bizness, bots were simplistic, but they used everything and averegely well - Battles could move from start to finish. Now, many maps are unplayable

If this is indeed an independent project (sp) from the rest of the mod, then i think change-logging needs to play a larger role than it seems to play now

Sorry if I sound harsh with this, but it just gets frustrating when you see an issue and hope its fixed in the next version only to find out after 6months to a year of waiting that Yes, it IS fixed, but suddenly a new issue has arisen from something that worked fine in the past - And with the older maps from 2.0 getting no attention whatsoever, its like marking-time rather than moving foward
Title: Re: AI tweak/fix mini-mod v1.1
Post by: CBCRonin on 22-03-2010, 20:03:08
I think their capability is definitely a map related issue, as the bots did stop using the one on PDH (won't touch it at all now).... but they manned the 42 consistently and repeatedly on Alam Halfa last night.

Haven't seen them touch the static mounted British MG or the Bren AA, but they do use the one on the jeep and in UCs.
---------------------------------
As Alam Halfa has so few vehicles and options to mount for the Axis bots, their preference for the ones that do exist (when all flags are held and within range) might be increasing their effectiveness for that map.

 
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 23-03-2010, 11:03:54
Mg42 in Alam halfa? I must see that!

And no, although conditions change based on the layout of the map, the logic governing the vehicle, here weapon use is within the weapon files itself. A robuste logic system and preference system will make any particular weapon assume a similar role irrespective of map type

In a map where the bots see enemy units from way off, they are certain to use stationary weapons differently from in maps where the enemy 'turns the corner' to be noticed. A good example of this is in the case of the mortar which enjoys(enjoyed) perfect use in Alamein, no use in some other maps and some degree of use in others.

For instance, the mg34 defending the bridge on PHL is used more often now than the mg42 since it is closer to their spawn area and their logic for that base is to be defensive versus the more-offensive bots that spawn at the mg42 position.


Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde on 23-03-2010, 16:03:13
Didn't know about the non-Lafette MG42 in Luttich, I've occasionally seen MG42 kills when playing as Allied and wondered what was going on (couldn't be a kit picked up from a dead German MG gunner, as bots don't pick up kits)! Still no progress with getting bots to use the Lafette, I've tried disabling the "use no pathfinding" setting but it doesn't seem to make much difference.

Regarding Djinn's earlier post, I really should mention that I'm not in any way involved with or in communication with the "official" FH2 dev team, and I have no idea how many developers (if any) are working on SP issues, and how much progress they've made on fixing any of the issues I've tried to fix. I'm just trying to do as much as I can to fix the AI using my limited knowledge + experience.

I might try and look into using the FH2.2 AI files, but since I'd never played FH2 before 2.25, I'd have to do a complete reinstall of FH2. In theory, it should be possible to get the AI to behave like 2.2 just by using the same data values for AI parameters, not necessarily the original files.

Quote
How to stop Commander Spam? - Answer, One of the uncapable flags in the map was 2-way neighbored. The rule for neighboring uncapable flags is you 1 way neighbor the other flag to the uncap. It's useful to remember, "My neighbor comes to me" when neighboring SA.
- http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=13677

Thanks for spotting this! I haven't really looked into modding map scripts before now, but it looks like the commander spam issue should be easily fixed. I've spotted a few other map issues which might be fixable, and have made a new thread for this.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 23-03-2010, 16:03:48
I was mentioning the general works of all those I know who have anything to do with AI improvement.

Thanks for the feeback. Any solution to the Luttich crash? Any update to 1.1?

Regarding earlier variables in 2.0, I think the best variable balance is in 2.2. According to what you said, the same variable that makes bots bail stationary weapons affects bots' use of mobile vehicles. I''d hate to think that the same fix to make bots bail cars and jeeps more will cause bots to bail mgs and such at the same rate. That said, yes, FH2 ver. 2.2 definitely had the best balance in that variable since bots DID use mgs effectively, but did not camp on vehicles... Other values for mg42 will just have to be replicated for all mgs is all as these were still effectively used while being able to bail them... It might involve reverting all stationary mgs to not being seen as a defensive weapon like the AT gunsreplicated for all mgs is all
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde on 23-03-2010, 17:03:13
I''d hate to think that the same fix to make bots bail cars and jeeps more will cause bots to bail mgs and such at the same rate.

This is something I've been working on and which will hopefully be in the next release of the AI minimod. I've added a new AI behaviour category "FixedGun" which is basically the same as "Fixed" but has an 0% chance of bailing/leaving the object, and have assigned this to all static guns and MGs other than deployable ones and the Bren AA. So far, it seems to work quite well.

I'm also going to look at the AI data for vanilla BF2's APCs + trucks to see if I can get the FH2 transport vehicles to work the same way. Getting these to work would give infantry a chance on large open maps like El Alamein.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 23-03-2010, 18:03:45
woohoo! Excellent thinking Drawde. If bots never bailed from AT guns and mgs, but did for mobile vehicles the gameplay will really be different. And to think you still don't want to take credit for your modding skills... Modesty, sir - is for people like myself who suck




Title: Re: AI tweak/fix mini-mod v1.1
Post by: matthewfarenheit on 24-03-2010, 05:03:23
I have tested this mini-mod on Goodwood and the moment I try to get on a Cromwell, the game crashes.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 24-03-2010, 08:03:39
That is weird - It cannot be the same issue because the bots always use the Cromwell even getting KT kills from time to time with it as well as quite a few TKs... excuse my use of a punn. This is certainly a new one that needs to investigated.

I'm certain the known issue is from the map since all vehicles have been completely re-examined and recoded more than once - This is not to say, it isn't somehow vehicle-triggered, but if that were so, then we might be looking at something as insane as Op. Cobra's crash issue which Toddel described as being 'As random as a Panther firing with a Sherman reloading at the same time while a scout occupies its third seat'


I think its time to launch operation Medic. Basically, this would be a coop game setup on a server and played at a particular time by COOP/SP fans to find the problem by all being on the battlefield. The catch it, half of either team should be these human players with instructions to more of spur the game on without necessarily playing an overly-active role, So that the remainder of the armies (the bots) can continue to do what they always do, try to kill each other as well as the players

The key focus area, I think is south of Cagney West. And it should include Drawde's fixes otherwise it will be more labor for the human players than neccesary, facing both challenge of not always firing and now also, boredom from the existing issues in the stock map.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: matthewfarenheit on 24-03-2010, 08:03:16
KT kills? I have never seen a KT spawn at Goodwood in Singleplayer. Am I doing something different or wrong?
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 24-03-2010, 09:03:31
No you aren't. I had to manaully change the Tiger I to a Tiger II.

I went to operation Goodwood folder> Server> Gamemodes> gmp_coop>\64
and opened GameplayObjects.con in a text editor. Within that file are all vehicles in the map. I simply found the Tiger file and replaced it with kingtiger_1944fall

And voila, the KT came to life. I also changed the Panther from the ones currently in to panthera_alt which is yellowish rather than brownish and works better in comoflage for that map.



Title: Re: AI tweak/fix mini-mod v1.1
Post by: Michael Z Freeman on 25-03-2010, 14:03:00
I've been going through the maps with v1.1 installed. I got to Op Goodwood and Op Hiacinth and they crash after a few minutes. I don't think I was playing Luttich long enough to get a CTD. Other things noticed ...

   > Luttich ... Germans cannot take bottom right CP. Flag shows as German on pole but is American in interface.
   > Commander tries to take uncappable CP, on Supercharge, German side for example.

   > Spotting doesn't work ?

Like the commander spam some of these are map based and probably outside the scope of this tweak/fix ... should I be reporting these somewhere else ?

I sent in the crash reports using the bug reporter. Should I be doing this ? I don't want to confuse the FH devs. I don't know if their report includes installed fixes.

I notice the Push mode is working on Tunis, maybe I just did not notice before. CP are taken in sequence and some  are circled in blue and cannot be taken back by the other side.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 25-03-2010, 15:03:20
I've been going through the maps with v1.1 installed. I got to Op Goodwood and Op Hiacinth and they crash after a few minutes. I don't think I was playing Luttich long enough to get a CTD. Other things noticed ...

   > Luttich ... Germans cannot take bottom right CP. Flag shows as German on pole but is American in interface.
   > Commander tries to take uncappable CP, on Supercharge, German side for example.

   > Spotting doesn't work ?

Like the commander spam some of these are map based and probably outside the scope of this tweak/fix ... should I be reporting these somewhere else ?

I sent in the crash reports using the bug reporter. Should I be doing this ? I don't want to confuse the FH devs. I don't know if their report includes installed fixes.

I notice the Push mode is working on Tunis, maybe I just did not notice before. CP are taken in sequence and some  are circled in blue and cannot be taken back by the other side.


I experienced the spotting issue once on Siege of Tobruk, but only when I picked up a dead enemy kit which has the binocs... I couldn't place an artillery spot either.

Yes, the barn flag in Luttich does have the double cap issue. I think Winterrhilf would need to know this cuz he managed to fix those in Fall of Tobruk and El Alamein. It happens only once in a while on Luttich though, specifically when the axis face resistance before capping the base - A thing that occurs rarely, so I can imagine why it might have been missed. A similar situation occurs in Sidi Rezegh with the 2-storey base.

Yer, Supercharge was probably the first map in Fh2 to get AI (I think) as it was the first map to be released and so it suffers from the initial issues that the devs faced in bot-support. I think it actually worked better in 2.0, showing the commander issue only once the Allies had capped all but the last 2 flags in the town. Some work might have been done to fix it to produce worse results.

I think it might be more effective outlining the issues here since SP is now an independent venture.

Push mode works on alot of maps actually - But only if you are connected to the net. For most maps, the commander AI actually follows this order although it sometimes (rarely) fouls up - More in some maps than others, where you get the commander sending the entire force to cap an uncappable flag and keeping them there while the cap flags need to be taken by the player single-handed.

A map like Fall of Tobruk, has this at the end when the church and last flag are all that remains - Also happens when the commander tells his attack force to cap flags inland without having capped all the first line flags.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 27-04-2010, 18:04:33
Hi,

Drawde? Any word on the next patch release?
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde on 27-04-2010, 21:04:39
Very soon hopefully, just trying to track down the PIAT bug which is causing the CTD in Goodwood. I think I've found it (the line "ObjectTemplate.ammo.toggleWhenNoAmmo 1" appears to be the culprit), but still need to do some more testing (which basically involves starting up FH2 windowed and leaving it running in the background, and noting the number of times it crashes - this doesn't involve much work, or even being on the computer other than checking it every so often, but still takes time).
If I can't sort out the PIAT issue by the end of the week, I'll just release the next version with AI for this weapon temporarily disabled.

The next update has taken a lot longer to finish because of my attempting to find/fix the Goodwood and Luttich CTD causes - but for the same reason, there are a lot more additions + tweaks since the last update, including the new AI armour system, bots bailing from vehicles, aircraft strafing infantry, raised artillery viewpoints, etc.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 28-04-2010, 01:04:51
Very soon hopefully, just trying to track down the PIAT bug which is causing the CTD in Goodwood. I think I've found it (the line "ObjectTemplate.ammo.toggleWhenNoAmmo 1" appears to be the culprit), but still need to do some more testing (which basically involves starting up FH2 windowed and leaving it running in the background, and noting the number of times it crashes - this doesn't involve much work, or even being on the computer other than checking it every so often, but still takes time).
If I can't sort out the PIAT issue by the end of the week, I'll just release the next version with AI for this weapon temporarily disabled.

The next update has taken a lot longer to finish because of my attempting to find/fix the Goodwood and Luttich CTD causes - but for the same reason, there are a lot more additions + tweaks since the last update, including the new AI armour system, bots bailing from vehicles, aircraft strafing infantry, raised artillery viewpoints, etc.

woot! woot! Can't wait! Thanks, man. You're really doing some of us a real favor
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Raziel on 28-04-2010, 09:04:45
I admire your persistence Drawde! Keep it up and Thanks!
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 28-04-2010, 09:04:15
Don't forget the backlog of problems he's managed to single-handedly solve, from ones as major as Goodwood and the Stuka flying which had been there since their first day of existence... And a crap load more - Is this guy great or what?!

Yer, I know its cheap flattery from someone who wants something from you, but its all true too
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde on 29-04-2010, 21:04:05
A quick update: the PIAT fix definitely works. I ran Goodwood 64 7 times, and got 3 CTDs, the other 4 games ran through to the end successfully. Without the PIAT fix, the map CTDs 100% of the time, usually within the first 10 minutes. The ony drawback to the fix is that you can still select the PIAT when it's out of ammo, and the weapon's model shows a round loaded. (Why the toggleWhenNoAmmo line causes an AI-related CTD in the first place, I've no idea)
Luttich is also more stable with the Compo B fix, though it still CTDs about 50% of the time. (Maybe I'll find the reason for these CTDs eventually...)

I just need to do a bit more testing to make sure everything's still working as it should, then I'll release the next version, most likely this Sunday.


BTW, though I have to admit I've learnt a lot about BF2 modding since I started work on the minimod (I wish I knew the things I do now when I was working on my BF1942 AI mod years ago) the progress I've made has more to do with how neglected FH2's AI is than anything else! Though to be honest I'm grateful to the FH2 developers that at least some effort has been made to add AI support to maps. IIRC, most of the earlier versions of FH1 had no bot support on most of the new maps.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 29-04-2010, 23:04:54
Gr8 news about the Luttich and Goodwood patch... Ok, Luttich was your fault, man <kidding>, but really, these are serious issues you are single-handedly solving. I don't know how you do it, but you really inspire me with what you've achieved... FH2 ai was just about dead when you came on the scene, and now we are getting some really solid ai work going.... I can't thank you enough!


btw, Drawde. You don't happen to be the guy who added server-side bot support to most of FH1 maps and are running it.. or were, on a coop server, are you? I recall inviting this guy from a server to 'check out FH2' to try out his skill on FH2... just checking...
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Raziel on 30-04-2010, 09:04:57
A round of applause to you Drawde! (http://forum.thescubasite.com/happy/happy0064.gif) (http://www.thescubasite.com) I admire people like you! I have tried mapping, modeling and coding in the past but never had the determination to finalise any project that I started! Good for you bud and a big thanks!
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde on 30-04-2010, 18:04:28
btw, Drawde. You don't happen to be the guy who added server-side bot support to most of FH1 maps and are running it.. or were, on a coop server, are you? I recall inviting this guy from a server to 'check out FH2' to try out his skill on FH2... just checking...

Definitely not - I have absolutely no knowledge or skills with mapping + navmeshing whatsoever. I wish I did, as a lot of FH2's maps could do with AI support (or improving the navmeshes for ones that do have AI support) but as far as I know, it's a highly technical process involving 3D Studio (which I've also never used)...

The only BF1942 mod I ever released was a rather amateurish realism/AI tweak mod years ago; I later made a much more polished one which basically integrated the expansion pack content into the original maps, as well as realism + AI tweaks and new sounds. But I never released it, as it was basically obsolete with things like FH1 and XWW2 available.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 30-04-2010, 19:04:12
btw, Drawde. You don't happen to be the guy who added server-side bot support to most of FH1 maps and are running it.. or were, on a coop server, are you? I recall inviting this guy from a server to 'check out FH2' to try out his skill on FH2... just checking...

Definitely not - I have absolutely no knowledge or skills with mapping + navmeshing whatsoever. I wish I did, as a lot of FH2's maps could do with AI support (or improving the navmeshes for ones that do have AI support) but as far as I know, it's a highly technical process involving 3D Studio (which I've also never used)...

The only BF1942 mod I ever released was a rather amateurish realism/AI tweak mod years ago; I later made a much more polished one which basically integrated the expansion pack content into the original maps, as well as realism + AI tweaks and new sounds. But I never released it, as it was basically obsolete with things like FH1 and XWW2 available.

Well, you're in luck... cuz I want *stretches arms out*..seriously...
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Remick04 on 30-04-2010, 20:04:41
Hey, so about that navmeshing.... I was really tired of playing on the same African maps and few normady ones, so I read up on all I could about navmeshing and its really not as hard as it seems, I've already navmeshed Operation Cobra and done a re-navmeshing for Operation Totalize to include vehicles and better use of infantry. I'm working on a couple others but was waiting on Drawde to release the next Ai updated before I posted anything. Operation Cobra has a CTD that I'm assuming is related to the crash on Luttich, and I want to make sure no new problems get introduced....  I wasn't sure I wanted to tell you guys about it until I had a couple stable maps to share, but one of the current maps I'm working on has already taken a day and a half to navmesh and it's just now reaching the half way point, so it's unlikely I'll have it done by the end of this weekend like I was hoping. But figured I'd let you know that someone is tackling navmeshing... (Outside of Winterhilf ofcourse) :)
Title: Re: AI tweak/fix mini-mod v1.1
Post by: djinn on 01-05-2010, 03:05:36
wOOHOO! our ragtag little bunch of unofficial BTs and devs are taking form! Gr8 going Remick04. Really would love to see those particular maps, Totalize and Cobra. I think I should read on navmeshing myself when I get the time. We can be a real DIY team, get as much AI out as the devs can make maps!

I am really happy this weekend. Hey, if you want us to try-test anything, feel free to upload em and send us a link. We'd love to see how it plays out and be very much ready to give constructive feedback to help you get it finished.

Title: Re: AI tweak/fix mini-mod v1.1
Post by: cannonfodder on 01-05-2010, 05:05:31
Hey, so about that navmeshing....its really not as hard as it seems, I've already navmeshed Operation Cobra and done a re-navmeshing for Operation Totalize...
No, creating a navmesh isn't hard, but editing it...well, I won't say it's hard, but one needs a lot of patience and a full version of Maya, neither of which I possess... :(

Looking forward to that full version of Totalize... :)


Here ya go djinn: http://bf2.e-plaza.de/page4.htm
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Remick04 on 01-05-2010, 17:05:53
No, creating a navmesh isn't hard, but editing it...well, I won't say it's hard, but one needs a lot of patience and a full version of Maya, neither of which I possess... :(

Looking forward to that full version of Totalize... :)


Here ya go djinn: http://bf2.e-plaza.de/page4.htm

You're right creating a navmesh is the simple part, albeit time consuming, (the shortest one so far was 12 hours) Editing it is the daunting part which always kept me from trying, but I figured I'd give it a go anyways. And like I said I haven't found it to be that hard. I got a cheap old version of 3D max, never used it before this, but through lots of trial and error I feel like I've gotten petty proficient with it.

Operation Totalize was a pain, the statics on the map seem perfectly placed to prevent bots from using vehicles. I can see why Winterhilf only created an infantry mesh. But, with a lot of hand editing and AI strategies I think I’ve gotten it to a place where the bot tanks can move through the map well. They still get stuck or bunch up, but it plays a lot better.

I’ll certainly release a map or 2 to coincide with Drawde’s AI update. Which ones will depend on what I have done, and what effects the AI tweaks have on the gameplay.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Raziel on 01-05-2010, 18:05:38
Goodjob Remick! FH2 mod needs people like you, Drawde and Winterhilf! Thank you!
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Drawde on 02-05-2010, 15:05:25
Hey, so about that navmeshing.... I was really tired of playing on the same African maps and few normady ones, so I read up on all I could about navmeshing and its really not as hard as it seems, I've already navmeshed Operation Cobra and done a re-navmeshing for Operation Totalize to include vehicles and better use of infantry.

Great work!  8) More progress on AI map support is very welcome now the FH2 dev team seem to have stopped work on this area.

Does Operation Cobra have US forces on the Allied side? The Luttich CTDs were mainly caused by the Compo B explosive charge, which I've now fixed. There are still random occasional CTDs on Luttich, Goodwood and some of the North Africa maps, though; plus a regular CTD on Alam Halfa which I haven't really looked into yet as this map doesn't have a fully working navmesh (German tanks usually get stuck at the British defensive line)

One question, is it possible to edit existing map navmeshes, or do new ones have to be created from scratch? There are quite a few existing maps which have pathfinding issues and/or "gaps" where bots don't go (e.g. the PZ3 at the German forward base on El Alamein, and the Lewis MGs on the Siege of Tobruk defensive lines). Most of the pathfinding bugs are mentioned in Djinn's map issues thread.
Title: Re: AI tweak/fix mini-mod v1.1
Post by: Remick04 on 02-05-2010, 23:05:06
From my current undertanding of navmeshing I wouldn't be able to edit a navmesh without the original navmesh work files, which are created when generating the navmesh and are not in the map files themselves... so I wouldn't be able to edit the existing maps without having to generate new navmeshes for them. (or if who ever created the original navmesh were to give me the work files.) I'm not against going back and redoing existing maps, but for now I want to focus on getting navmeshs for maps that have none.