Forgotten Hope Public Forum

Forgotten Hope 2 => Singleplayer and Coop => Topic started by: zxx43 on 03-06-2010, 13:06:24

Title: About P51DRockets
Post by: zxx43 on 03-06-2010, 13:06:24
I have used Drawde's AI mini-mod but it seems that bots don't know how to use the P51Rockets to attack ground targets.
I don't know why.
Title: Re: About P51DRockets
Post by: djinn on 03-06-2010, 15:06:28
wIP - its in the pipelines.

Drawde gone for another week, but should be on top of it once he returns.

If anyone can figure it out, Drawde can
Title: Re: About P51DRockets
Post by: Drawde on 07-06-2010, 21:06:07
I haven't seriously looked into fixing the aircraft rockets yet (mainly because before Remick04's map addons, there weren't any fully playable SP maps with rocket-armed planes) - but I'm sure I'll work out how to fix this problem eventually, though maybe not in the next AI minimod version.
 
Rockets definitely don't appear to have the same "reversed model" problem as bombs did pre-2.26, so what's stopping the bots firing them is a mystery so far!
Title: Re: About P51DRockets
Post by: djinn on 08-06-2010, 12:06:27
It might not just be that vanilla uses rockets for air-to-air, but also because planes in vanilla require a target-lock to fire. That code might mean FH planes will aim but never fire as they will never get a lock... just my thoughts
Title: Re: About P51DRockets
Post by: Drawde on 08-06-2010, 20:06:50
It might not just be that vanilla uses rockets for air-to-air, but also because planes in vanilla require a target-lock to fire. That code might mean FH planes will aim but never fire as they will never get a lock... just my thoughts

Even the rocket pods on the helicopter gunships? I thought those were unguided. I think there's a setting in the weapon .tweak file which specifies it as a guided weapon, so it definitely isn't hard-coded.
Title: Re: About P51DRockets
Post by: djinn on 12-07-2010, 10:07:15
Well, got a reply from Clivewil. He managed to make the P51 rockets work and here's his solution, something to try out, Drawde

Quote
ok using the mustang as an example, i managed to get bots rocket firing by changing the FFAR physics type from Mesh back to Point.

i haven't tested this change on the Tiffie or Thunderbolt projectiles yet but i assume it would work; i will try it later when i get a spare moment.

cheers

c:\

Title: Re: About P51DRockets
Post by: Drawde on 12-07-2010, 21:07:51
Looks like Clivewil has finally cracked it, tried out the suggested change on the Typhoon rockets and bots can now fire them - finally! I'd never have figured out this fix in literally a million years (I'm not sure what the "PhysicsType" setting actually does!)

This will make quite a difference to game balance on maps like Totalize and Cobra, rockets are very effective at taking out static gun positions (you usually don't even need a direct hit) so the Allies should have more of a chance against the German 88s now.

BTW, the PhysicsType needs to be changed for the projectile, not the weapon! I tried changing the weapon PhysicsType first and got a seriously bizarre result; the Typhoons (unmanned) fly vertically into the air and explode, and anyone nearby gets teleported several hundred feet away :o  ???
Title: Re: About P51DRockets
Post by: djinn on 12-07-2010, 22:07:13
Looks like Clivewil has finally cracked it, tried out the suggested change on the Typhoon rockets and bots can now fire them - finally! I'd never have figured out this fix in literally a million years (I'm not sure what the "PhysicsType" setting actually does!)

This will make quite a difference to game balance on maps like Totalize and Cobra, rockets are very effective at taking out static gun positions (you usually don't even need a direct hit) so the Allies should have more of a chance against the German 88s now.

BTW, the PhysicsType needs to be changed for the projectile, not the weapon! I tried changing the weapon PhysicsType first and got a seriously bizarre result; the Typhoons (unmanned) fly vertically into the air and explode, and anyone nearby gets teleported several hundred feet away :o  ???

Wohoo! Onwards! haha! Vertical take-off?! That I should have seen! lol! Can't wait to see this in :-)
Title: Re: About P51DRockets
Post by: Raziel on 13-07-2010, 08:07:48
Woohhoooo!! Djinn why don't you invite Clivewill to join our Fh2 Single player team.
I am playing AIX2 lately. Single player support is really good for this mod!
Title: Re: About P51DRockets
Post by: djinn on 13-07-2010, 08:07:58
Maybe, its my insecurity since I feel he's a legend, or because I've read a number of his scathing readmes, or just because it feels risky to ask a person associated with one mod to become a part of a pert project of another... I just feel he'd more likely go for a consultant than a full member... I already mentioned to him the fact that more issues exist...

If he decides to stay, we would keep trying to work on improving air combat.. Frankly, planes do a damn fine job already... Its almost like something Drawde or someone did got them wise to how bad an idea mid-air crashes are... they actually swerve when they are going to crash into a plane their are chasing and they certainly fly with skill.. unlike those speed divers on the pubbie.. you should see what they do with the Stuak.. upside down flight, vertical dive and a vertical climb... terrrible, terrible..
Title: Re: About P51DRockets
Post by: cannonfodder on 13-07-2010, 12:07:01
...I am playing AIX2 lately. Single player support is really good for this mod!
It's not really "support" because SP is what AIX was made for... ;)
Title: Re: About P51DRockets
Post by: Raziel on 13-07-2010, 17:07:16
...I am playing AIX2 lately. Single player support is really good for this mod!
It's not really "support" because SP is what AIX was made for... ;)

 ;D
Title: Re: About P51DRockets
Post by: djinn on 19-07-2010, 15:07:37
Hey, it seems like everyone is patching their own planes. Can you give me the editted file. I really want to get planes firing rockets.... see what it does on the balance :-)
Title: Re: About P51DRockets
Post by: Raziel on 19-07-2010, 17:07:07
Sent you a PM Djinn   :)
Title: Re: About P51DRockets
Post by: Remick04 on 19-07-2010, 21:07:04
I would also like it if someone could post the fix files... I could probably figure it out for myself easily enough, but it would save me a lot of time, and I want to include this when I pass along the updated AI files to the devs.
Title: Re: About P51DRockets
Post by: Drawde on 19-07-2010, 21:07:42
Here are the fixed Typhoon, P-51 and P-47 files. Don't have time to post any more, but I'll try and get another version of the AI minimod (including the plane rocket fixes) up soon.
Title: Re: About P51DRockets
Post by: djinn on 19-07-2010, 21:07:13
Here are the fixed Typhoon, P-51 and P-47 files. Don't have time to post any more, but I'll try and get another version of the AI minimod (including the plane rocket fixes) up soon.


EDIT: Where do I plug these? I put them in both the your tweak zip and the Vehicle server zip once the former plan had failed and didn't get them firing...

Have you seen my post from Clivewil on how to get the Stukas to fly higher and hence dive steeper, with less 'speed-sensitive' divehorns? Also have answers to how to make plane mgs more deadly... specifically useful for American planes.

Title: Re: About P51DRockets
Post by: Drawde on 20-07-2010, 10:07:31
Not sure what I was thinking  ::) the previously posted file didn't include the weapon projectile files, which are the most important part of the fix.
Here's an updated zip which should work (BTW, the "vehicles" folder in the zip should be added to aitweakvehicles.zip and the "weapons" folder to aitweakweapons.zip)

I'll take a look at Clivewil's post later.
Title: Re: About P51DRockets
Post by: Raziel on 20-07-2010, 11:07:39
Thanks Drawde  :)
Title: Re: About P51DRockets
Post by: djinn on 21-07-2010, 00:07:46
Rockets work great... Remick, you might want to look at air navmesh for this map though, 2/3 chance, the planes fly and turn sharply right and keep going till they are killed for going off-map. So its actually rare to have them fly into the frey...

But when they do spring into action, their rockets are a sight for sore eyes... and deadly accurate. I think we finally found the balance for this map... And with howitzers (Using my NA ones), bomb-dropping FW190s and nebelwerfer reaching as far as the frontline spawn point, this map has grown to be quite epic :-)
Title: Re: About P51DRockets
Post by: cannonfodder on 21-07-2010, 11:07:29
...Remick, you might want to look at air navmesh for this map though, 2/3 chance, the planes fly and turn sharply right and keep going till they are killed for going off-map. So its actually rare to have them fly into the frey... ...
AFAIK there is no "air navmesh". The bot pilots work off the AerialHeightMap.

And this annoying crap plagued me while I was mucking around trying different ROF values, etc, for the Typhoon.

I figured it was just the screwball stock-AI because I wasn't using the minimod at the time.

Guess not... :-\
Title: Re: About P51DRockets
Post by: Drawde on 23-07-2010, 22:07:15
I just played a full game on Totalise for the first time since fixing the plane rockets, and now properly appreciate how much the rocket-firing Typhoons change the balance of the map  :o  Before, the Canadians had trouble even capturing the windmill CP and rarely got far past the bridge; the 88s massacre Allied armour and even when they're eventually taken out, the German tank counter-attack manages to prevent the Allies getting far.

Now, the Typhoons simply pulverise anything that moves with their rockets (which can take out an 88 or other AT gun with a near-miss) - the Allies overran all the capturable German CPs within the first 10 minutes, and most of the counter-attacking German tanks got taken out with rockets before they could do much. It was only after all the Allied planes got shot down (it usually takes a while for bots to bother with using them again on Totalize, though they almost always jump into all 3 at the start of the map) that the Germans managed to make any progress.

I'm wondering if there is any way to add a "reload delay" (maybe a minute or two) after bot aircraft have fired all 8 rockets - currently they effectively have infinite rockets, which, combined with the AI's precision accuracy, seems to make rocket-armed planes very overpowered.

BTW - So far I've never see the Allied 25pdrs in action on Totalize, anyone else seen bots use these?


Title: Re: About P51DRockets
Post by: djinn on 24-07-2010, 00:07:31
Yer, firing @ the stug.

Very innacurate.
Title: Re: About P51DRockets
Post by: cannonfodder on 24-07-2010, 07:07:54
...I'm wondering if there is any way to add a "reload delay" (maybe a minute or two) after bot aircraft have fired all 8 rockets...

...So far I've never see the Allied 25pdrs in action on Totalize, anyone else seen bots use these?
I think this would be the line you want (in the .tweak file)...ObjectTemplate.ammo.reloadTime 8


Not that I've noticed.
Title: Re: About P51DRockets
Post by: zxx43 on 07-08-2010, 15:08:59
Rockets work great... Remick, you might want to look at air navmesh for this map though, 2/3 chance, the planes fly and turn sharply right and keep going till they are killed for going off-map. So its actually rare to have them fly into the frey...

But when they do spring into action, their rockets are a sight for sore eyes... and deadly accurate. I think we finally found the balance for this map... And with howitzers (Using my NA ones), bomb-dropping FW190s and nebelwerfer reaching as far as the frontline spawn point, this map has grown to be quite epic :-)
But where are the files? In AI minimod 1.3 beta 3?
Title: Re: About P51DRockets
Post by: djinn on 07-08-2010, 15:08:49
Yep. Its all in the latest patch ie 1.3beta 2
Title: Re: About P51DRockets
Post by: Remick04 on 07-08-2010, 20:08:22
I'll try editing the ArielHeightmap (never done it before but it seems simple enough) to see if I can stop the allied bots from flying outside the combat area and dieing after takeoff, which I do find really annoying.

I have seem bots manning the 25pdrs but have not seen them fire at anything. But it could have just been a fluke.
Title: Re: About P51DRockets
Post by: djinn on 07-08-2010, 22:08:44
They fire at the stug but with beacoup deviation
Title: Re: About P51DRockets
Post by: Remick04 on 07-08-2010, 23:08:15
Well editing the ArielHeightmap didn't seem to work. Could have done it wrong, but the problem occurs when the planes leave the map entirely, and I can't really edit the heightmap beyond the dimensions of the map itself. Adding to the dimensions of the heightmap file may result in the map shrinking the dimensions back to the size it needs, or worse. So, I'm just going to move the start position of the allied planes so they aren't taking off face the edge of the map. Was trying to avoid doing this, but the planes are too important to the allied assault to let them repeatedly spawn and die.

edit:
Djinn are you useing the 25pdr_AI or the 25pdr_mkiv_AI?
Title: Re: About P51DRockets
Post by: Devilman on 08-08-2010, 05:08:04
Well editing the ArielHeightmap didn't seem to work. Could have done it wrong, but the problem occurs when the planes leave the map entirely, and I can't really edit the heightmap beyond the dimensions of the map itself. Adding to the dimensions of the heightmap file may result in the map shrinking the dimensions back to the size it needs, or worse.

The main use of the aerial heightmap is to allow bots to fly above any buildings
Also bots dont get punished for flying outside the combat area,which works in the sky as it does on land for humans,if bots continually fly ouside the combat area,you can remove the combat area,so humans can chase them
Title: Re: About P51DRockets
Post by: cannonfodder on 08-08-2010, 08:08:28
Also bots dont get punished for flying outside the combat area...
Do you know how the bot pilots navigate?

Maybe 5-10 seconds after the Typhoon disappears from view (when watching it from the airfield), you'll get the message 'Bot X is no more', so they must be committing suicide. But they usually only do that if they're stuck or "off-the-mesh"... :-\
Title: Re: About P51DRockets
Post by: Devilman on 08-08-2010, 08:08:03
There is no "mesh" for air vehicles
I know i can chase a bot into the combat area,which the bot enters first,i will die after the usual 10 seconds,but the bot continues flying
If in a 2 seater as gunner,and going into the combat area,the bot will turn back into the map,when recieving the out of map message,but only with a human gunner

As for how bots navigate,not sure but they generally fly random paths,until an enemy comes into one of its weapons range,the straighten up to fly over (if enemy is on land) or fly behind if an air vehicle

Clivewill would know more about this though
Title: Re: About P51DRockets
Post by: cannonfodder on 08-08-2010, 10:08:27
Yeah what I meant was, maybe they're killing themselves because they've flown too far away from their reference point(s), much like earthbound bots do when they aren't on the navmesh.

There'd have to be a limit to how far away from the map they're allowed to fly, otherwise they'd be chasing each other away from the map area all the time... :-\
Title: Re: About P51DRockets
Post by: Devilman on 08-08-2010, 11:08:03
earthbound bots die,if their spawnpoint is not on the navmesh
bots in vehicles wont drive off the navmesh
bots on foot wont walk off the navmesh

i have seen bots fly miles away from the edge of the combat area

are the bots suiciding,as they do when not on the navmesh,or are they just crashing
Title: Re: About P51DRockets
Post by: djinn on 08-08-2010, 11:08:45
I'm sure bots get penalized. Ive seen planes drop from the sky in practically all maps that have them. Esp. Stukas

And tanks in Luttich from allied side.

@remick
Not sure about if it was when i used the NA 25pdr or after I changed to the updated bot normandy one. I do note that @ least for Drawde's version, bots are less likely to man normandy versions than NA ones. How they fire though, I think is identical

Title: Re: About P51DRockets
Post by: Remick04 on 08-08-2010, 22:08:02
The issue on Totalize isn't that they leave the 'combat area' they leave the map entirely. The AerialHieghtMap is essentially a 2d image that maps the topography of the terrain and any buildings on the map, so that AI pilots are not crashing into the ground or tall buildings. It still happens occasionally but no more often than Human pilots I'd say. It covers the entire map, not just the combat area, but does not cover the surrounding terrain beyond the borders of the map. So bots flying off the map I'd assume get lost, some by chance turning correctly and getting back on the map, and others flying straight until the 'out of bounds' timer killers them. I tried expanding the dimensions of the AerialHeightMap but it just seemed to screw up the file. It's possible I did it wrong, but with my limited knowledge of how BF2 works, I'd imagine there isn't a way to expand the dimensions of the heightmap, without also having to expand the dimensions of the map itself. So I'm just going to move the start positions of the allied planes, it’s significantly less work.

I placed some 'AIonly' spawnpoints next to the 25pdr guns on totalize with 'enter on spawn' checked, so any bots spawning their will instantly enter the guns for the sake of testing. If I use the NA 25pdr the guns work fine firing on targets at the factory. (All other flags seem to be out of range, I could fix this but it may cause gameplay balancing issues.) If I use the Normandy 25pdr_ mkiv they don't seem to fire. I see them looking at targets, but the barrel seems to be aimed to low, and they never shoot. The nebelwerfer also seems to be firing shallow of its target, but it is constantly firing.
Title: Re: About P51DRockets
Post by: djinn on 08-08-2010, 23:08:26
Drawde got that fixed in the last mod. You might want to check that out. In Beta 1.3B, the nebelwerfer fired short. But in Beta 1.3C, i.e the current one, it fires accurately....

If you are going to reposition planes create spawn AI-only points near vehicles, you might want to consider making planes in maps like Alam Halfa and especially Crete parallel too, since planes sometimes crash into each other on take off.

For spawn points, it might be worth noting mgs at the 88 ridge on Supercharge never getting used i.e the main bunker, the PAK38 at the Sidi Abd el Rahman and that at El Daba (i.e the one in the town facing Gazal Stn).

Frankly, there are actually alot of tactically important vehicles that never get used due to bots never 'seeing' them, like the PAK38s on Sidi Rezegh or the mg positions at Magazin 19.Regimentgefeschistand i.e the underground two story building. (I highly recommend also putting the flag cap area solely underground to make it only infantry cap-pable.)


The Howitzer is pretty innacurate in Totalize and I don't think it will damage gameplay too much if it could fire further than the station. Actually I think it would add alot to cinematics :-)

Small other note, Drawde made vehicle positions for Mobile vehicles like tanks etc such that bots could/would enter and exit, while those for static guns were made fixed so the bots formed static defensive lines with them.... Usually external positions had less preference, making bots more likely to bail from them than driver and mg positions on vehicles. Drawde also changed their destruction time to make it the same as in Conquest i.e Vehicles blow up and remain for a bit longer than they used to in SP, but as long as in CQ, and I think partly damaged vehicles lasted longer before losing their health and blowing up.

Drawde also tried to put many vehicles back from Conquest esp. in El Alamein since it was last coded as SP in 2.0 and so had not been updated. The same fact may exists for other maps. For the AT riflemen though, if it is not possible to get them firing at range in the same fashion as MG gunners, I'd reluctantly say, restore them to stand-firing... But it would once again make PZIIs and light vehicles AT-rifle fodder.


Might also be worth seeing if you can get the 64 version of Bardia and put it in (Done by WinterHilf) it was left out like Alam Halfa. It only had SP and not COOP, another thing you could repair... I will try and post it up on my DL site (Link under SP downloads thread for Alam Halfa)


Sorry for being a nag about all these, I just don't want all the work or some of to be lost if possible. It seems until now, every version of SP takes a few steps foward in some regard, and a few steps back in others, more often more of the latter. Wil try and write a comprehensive post of the issues in the singleplayer Project thread so its all there once and for all...
Title: Re: About P51DRockets
Post by: cannonfodder on 09-08-2010, 11:08:48
...are the bots suiciding,as they do when not on the navmesh,or are they just crashing
Not sure, as they're out of view when the '...no more." message pops up.

Next time I play it I'll watch them with the binocs, but I'd assume it's suicide 'cos they're fairly high up when they fly off toward no man's land.
Title: Re: About P51DRockets
Post by: Drawde on 15-08-2010, 19:08:03
There seems to be a similar flying-off-map issue with the Stukas on Mersa Matruh. Very often I've see them drop their bombs then fly out to sea, then get a "Bot X is no more" message shortly after.

(edit) Also, regarding the 25pdr, theoretically the AI should treat both the NA and Normandy versions the same way, as they share the same object and weapon .ai files (in the NA 25pdr folder). There was a bug with the gunner viewpoint for the Normandy gun in a previous minimod version, but this is now fixed.
Title: Re: About P51DRockets
Post by: djinn on 15-08-2010, 19:08:53
Yer, I think the isue is placement. Bots on Goodwood, for instance seldom spawn near the 25pounder. In Alam Halfa, on the otherhand, bots spawn right infront of it, so eventually... At least once, in every 3 plays or so, you get the 25pounder acting... It seems to also be a matter of navmesh somehow... Bots on Siege of Trobruk, for instance, ALWAYS man both 25prd and LeFH, and yet seldom man the LeFH on Olympus, even though it has one of the best LOS any arty piece could get on any map!

For the fly-overs. It seems the Stuka does that in practically ALL maps. depending on the fight area, it may circle around for another pass, but it eventually flies out of range. It might have something to do with the speed at which the Stuka flies, or a bug that goes across for all the maps..... In Alamein for instance, ALL planes eventually 'wander off' towards the British main and are killed for deserting