AI, pathmaps, aircraft, strategic areas....
Re: AI, pathmaps, aircraft, strategic areas....
I know this error all to well of late.. posted a thread on it the other day.. big stuff.. causing probs... gotta love it.
these ai are told how steep to climb I noticed... (glancing through the DICE vehicle AI overview..) although i appreciate that sending them on a steeper incline will result in the inevitable stall at some point.
apache has been playing with a new collision group.. where objects can pass through other objects.. perhaps the ai/planes will still try to avoid such objects even though they wont actually collide with it.. no idea but could be a route to place low poly additional 'helper' mesh to encourage altitude gain around mountains without being a visible mesh. probably a last resort though... is a bit of a hack solution.
these ai are told how steep to climb I noticed... (glancing through the DICE vehicle AI overview..) although i appreciate that sending them on a steeper incline will result in the inevitable stall at some point.
apache has been playing with a new collision group.. where objects can pass through other objects.. perhaps the ai/planes will still try to avoid such objects even though they wont actually collide with it.. no idea but could be a route to place low poly additional 'helper' mesh to encourage altitude gain around mountains without being a visible mesh. probably a last resort though... is a bit of a hack solution.
Re: AI, pathmaps, aircraft, strategic areas....
Prehaps you can always try to add an object, invisible, that they will try to avoid. Don't they try to avoid trees and stuff anyway?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Re: AI, pathmaps, aircraft, strategic areas....
Yeah, but it won't help as their avoidance is working just fine. It's just that there are peaks that are higher than the planes apparent max altitude and they don't have the horsepower to get them up and over it. It is the very reason DICE came up with 'aiTemplatePlugin.minAlt nn', but unfortunately, not until BFV. I'm having some success increasing pitch sensitivity, maxclimbangle, torque, diff, reducing speedmod, etc, but a few are still hitting mountaintops. Sorry to quote the good book (LOL), but the strategy document does say something like "If the Mountain won’t come to Mohamed…
Sometimes a map does not work with the AI for any of several reasons. Often, only small changes in terrain and/or object placement to clear up ..." blah blah blah. Unless something better comes along, i'd consider lowering the one or two peaks they're having trouble getting over.
Sometimes a map does not work with the AI for any of several reasons. Often, only small changes in terrain and/or object placement to clear up ..." blah blah blah. Unless something better comes along, i'd consider lowering the one or two peaks they're having trouble getting over.
Re: AI, pathmaps, aircraft, strategic areas....
Then create a plane/wall thing and have it cover the lower part of the mountains so that the planes are always up there and able to climb over.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
- Apache Thunder
- Posts: 1210
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: AI, pathmaps, aircraft, strategic areas....
This is a stretch, but perhaps tweaking the plane control AI might solve this:
Example AI code from my BFH mod:
The code of interest in this situation:
Try increasing the climb angle and/or the "pitchLookAhead" setting. Perhaps the pitch look ahead tells them how far they should "look" ahead to avoid collisions when it pertains to when to use pitch.
You can also increase the maxClimbAngle so that they will pitch the plane higher up to avoid the mountains. You might not need to tweak it very far. I've noticed the bots just barely pitch up enough. So perhaps allowing them to pitch higher by a little might save them from hitting most of the mountains.
Example AI code from my BFH mod:
Code: Select all
aiTemplatePlugIn.create ControlInfo3d PlaneCtrl
aiTemplatePlugIn.driveTurnControl PIYaw
aiTemplatePlugIn.driveThrottleControl PIThrottle
aiTemplatePlugIn.aimHorizontalControl PIYaw
aiTemplatePlugIn.aimVerticalControl PIPitch
aiTemplatePlugIn.driveRollControl PIRoll
aiTemplatePlugIn.drivePitchControl PIPitch
aiTemplatePlugIn.aimRollControl PIRoll
aiTemplatePlugIn.aimThrottleControl PIThrottle
aiTemplatePlugIn.throttleSensitivity -3.0
aiTemplatePlugIn.pitchSensitivity -3.0
aiTemplatePlugIn.rollSensitivity -3.0
aiTemplatePlugIn.yawSensitivity 1.0
aiTemplatePlugIn.throttleLookAhead 1.0
aiTemplatePlugIn.pitchLookAhead 1.2
aiTemplatePlugIn.rollLookAhead 1.5
aiTemplatePlugIn.yawLookAhead 0.3
aiTemplatePlugIn.throttleScale 1.0
aiTemplatePlugIn.pitchScale 1.0
aiTemplatePlugIn.rollScale 1.0
aiTemplatePlugIn.yawScale 0.5
aiTemplatePlugIn.maxRollAngle 1.0
aiTemplatePlugIn.maxClimbAngle 1.2
Code: Select all
aiTemplatePlugIn.pitchLookAhead 1.2
aiTemplatePlugIn.maxRollAngle 1.0
aiTemplatePlugIn.maxClimbAngle 1.2
Try increasing the climb angle and/or the "pitchLookAhead" setting. Perhaps the pitch look ahead tells them how far they should "look" ahead to avoid collisions when it pertains to when to use pitch.
You can also increase the maxClimbAngle so that they will pitch the plane higher up to avoid the mountains. You might not need to tweak it very far. I've noticed the bots just barely pitch up enough. So perhaps allowing them to pitch higher by a little might save them from hitting most of the mountains.
I have cameras in your head!
Re: AI, pathmaps, aircraft, strategic areas....
swaffy.. thank you.. but you seem to be missing the fact that there are humans also playing.. ? ai might 'see' an invisible object but humans sure won't. thats why I suggested the special collisions group which the ai might 'see' but nothing would 'hit'
as for these puppies..! well I have been screwing around with them and the results are less than clear most of the time.
Angles are in radians, which is simple enough (but why the flip do we have to work in radians and degrees in the same game..ugh..)
1.2 radians = 68.7549354 degrees
1.6 radians = 91.6732472 degrees..
so 1.59.. ish... would be an absolute maximum logical climb angle before it made more sense to just turn around. (I tried a setting of 2.0 before I understood this was in radians and a few of the planes did a weird backflip..
but the lookahead stuff.. I just dont get it. clearly 1.2 is not 1.2 meters so what is it? anyone? heheh I have tried setting it to 2, 50, 200, 5 zillion... and none seem to change the point where Mr Ai actually makes a call on the terrain ahead!
maybe (probably) its also linked to radians.. but I don't get it yet.
It may be related to something else in the PCO or indeed general game setup. like view distance..
this is twice the height of the peaks too so should not be be limiting any aircraft,
aside from all of this.. the most amusing / dissapointing thing is that when you do see 32 Germans flying straight at 32 Brits.. when they get close.. they all do a dance and avoid each other.. without a single shot fired.. in fact for the first time today I saw 'German killed Brit'.. and I got excited, but sadly it was just a collision
Matt, fyi I am not working on anything different to what I sent you.. just literally tweaking these settings that Apache posted for the planes.
Code: Select all
aiTemplatePlugIn.pitchLookAhead 1.2
aiTemplatePlugIn.maxRollAngle 1.0
aiTemplatePlugIn.maxClimbAngle 1.2
Angles are in radians, which is simple enough (but why the flip do we have to work in radians and degrees in the same game..ugh..)
1.2 radians = 68.7549354 degrees
1.6 radians = 91.6732472 degrees..
so 1.59.. ish... would be an absolute maximum logical climb angle before it made more sense to just turn around. (I tried a setting of 2.0 before I understood this was in radians and a few of the planes did a weird backflip..
but the lookahead stuff.. I just dont get it. clearly 1.2 is not 1.2 meters so what is it? anyone? heheh I have tried setting it to 2, 50, 200, 5 zillion... and none seem to change the point where Mr Ai actually makes a call on the terrain ahead!
maybe (probably) its also linked to radians.. but I don't get it yet.
It may be related to something else in the PCO or indeed general game setup. like view distance..
this is not true I dont think. their issue is trying to climb too late.. if they spawn higher than the peaks.. and the SA is higher than the peaks.. then they will all happily fly above the peaks to the SA and not drop to a 'max altitude' I meanPOTAmatt wrote: peaks that are higher than the planes apparent max altitude..
Code: Select all
Physics.airDensityZeroAtHeight 6000
aside from all of this.. the most amusing / dissapointing thing is that when you do see 32 Germans flying straight at 32 Brits.. when they get close.. they all do a dance and avoid each other.. without a single shot fired.. in fact for the first time today I saw 'German killed Brit'.. and I got excited, but sadly it was just a collision
Matt, fyi I am not working on anything different to what I sent you.. just literally tweaking these settings that Apache posted for the planes.
Re: AI, pathmaps, aircraft, strategic areas....
Thanks guys. As i mentioned, i did have success with maxclimb angle and and pitchsensitivity (+1 instead of -1) (hadn't tryed lookahead-thanks!) and it gets them out of trouble most of the time, but there is still a couple of peaks they just can't make it over. Running with the aistats on, i can see them getting into their fire behavior but they won't pull the trigger. While doing so, i noticed the red lines which indicate where they've been assigned all converge at that very same altitude in which they cruise . Since SA's are assigned only an x/z value i was wondering where it came up with that height. It appeared to be the height of the flag, which was 4000, so i doubled it to 8000, but it didn't make a difference. They continued cruising at the same height.
Re: AI, pathmaps, aircraft, strategic areas....
so, I didn't think the flag had any relevance here? I thought it was the SA they went to.. which, if defined within the capture area for the flag.. would mean they end up capping the flag. but they only cap the flag because the SA is defined to that flag area..
SA's are placed with x/y but then will always 'sit' on the terrain.. is what I'm seeing? did you mean this or how is this x/z placement working?
so, if SA is in clear path from the AI.. it will reach it.. regardless of height.. but if the SA is behind a mountain it will fly straight until the last moment.. when its too late to climb the obstacle in-between.
just throwing in my observations..
SA's are placed with x/y but then will always 'sit' on the terrain.. is what I'm seeing? did you mean this or how is this x/z placement working?
so, if SA is in clear path from the AI.. it will reach it.. regardless of height.. but if the SA is behind a mountain it will fly straight until the last moment.. when its too late to climb the obstacle in-between.
just throwing in my observations..
Re: AI, pathmaps, aircraft, strategic areas....
Exactly. But the height of the SA is not declared. It's just interesting how they all chose the same X,Y, AND Z regardless of their current position. If we knew how they came to that conclusion, the problem would be solved.so, I didn't think the flag had any relevance here? I thought it was the SA they went to.. which, if defined within the capture area for the flag.. would mean they end up capping the flag. but they only cap the flag because the SA is defined to that flag area..
Re: AI, pathmaps, aircraft, strategic areas....
Forgive any stating the obvious herePOTAmatt wrote:Exactly. But the height of the SA is not declared. It's just interesting how they all chose the same X,Y, AND Z regardless of their current position. If we knew how they came to that conclusion, the problem would be solved.so, I didn't think the flag had any relevance here? I thought it was the SA they went to.. which, if defined within the capture area for the flag.. would mean they end up capping the flag. but they only cap the flag because the SA is defined to that flag area..
I appreciate it's the Z that was the query but the Z just appears to be 'above ground at the xy spot'
No actual control but always a constant regardless of the xy.
(after some pain.. Apache and I figured this out..)
Code: Select all
aiStrategicArea.create AlliedBase 26547/25916 26747/26116 50
the first set of coord defines an offset position to create a square / rectangle
is this what you mean? I hope so.. as it was bending my brain for a while to figure out what was going on.
not certain what the final digit (50) is but perhaps the offset from the ground in the Z axis that the actual fly-to point is?