Jump to content
Sign in to follow this  
gregoryp

SF2: Finally got the AI to Dive Bomb properly

Recommended Posts

Still not happy with it, but at least the AI no longer splatter all over the ground. heat.gif They can also glide bomb to (good new for the TBF's). clapping.gif

 

It's really neat TK allows us to tune the AI for each aircraft type.

 

Now lets see what we can do with torpedo's.

 

yikes.gif

 

.

post-23661-12627377440511.jpg

post-23661-1262737778539.jpg

post-23661-12627378282562.jpg

Share this post


Link to post
Share on other sites

Sweet!!

Yah, know, that skin didn't come out half bad, considering some of model's flaws. Never did really like the tri-colors, but eh, it looks pretty good!

 

Notice there's "virtual" dive brakes, too??

 

wrench

kevin stein

Share this post


Link to post
Share on other sites

Now if you could tune the AI to drop one bomb instead of all that'd be nice too :smile:

Share this post


Link to post
Share on other sites

Sweet!!

Yah, know, that skin didn't come out half bad, considering some of model's flaws. Never did really like the tri-colors, but eh, it looks pretty good!

 

Notice there's "virtual" dive brakes, too??

 

wrench

kevin stein

 

 

Wrench I go out of my way to look for your enhancements since they have the "damage" textures added.

 

How does the virtual dive brake work? I think I missed it? The FM does have working dive brakes (S key). It appears the AI uses it.

Share this post


Link to post
Share on other sites

Now if you could tune the AI to drop one bomb instead of all that'd be nice too smile.gif

 

You can set the number of bombs dropped per pass. I think the SBD though would be a release all and get out of Dodge since climbing back up to 14,000ft would take a long time grin.gif

 

Currently the AI SBD's drop their load and then fly a mile out and go into strafe mode. If for some reason they don't release they fly out climbing to 3000ft, turn around and do a glide bomb run. All can be set up.

 

For the bombs you just need to add to the _data.ini

 

[DiveBombAI]

ReleaseCount=1

ReleaseInterval=0.14

Share this post


Link to post
Share on other sites

Oh nice, thank you very much! :smile:

Share this post


Link to post
Share on other sites

Considered "virtual", as there's no moving physical part of the LOD. Just data ini entries.

 

Like on the A-36 Apache* and F-79 Manta mod and I'm know I'm forgetting a few others, they're just entries in SystemName= for the wings/fues (for the center brake) and additions in an //Airbrakes section

 

The 'moving bits' don't acutaly need to be there, just the entries for the GameEngine ™ to see.

 

thank you for the compliment! :salute:

 

wrench

kevin stein

 

*=the A-36 actualy has them painted on the wing, but they dont move. Borrwed the skin bits from MrCraig's skin

Share this post


Link to post
Share on other sites

How to do that?:blink:

 

It's SF2* only?

Share this post


Link to post
Share on other sites

How to do that?blink.gif

 

It's SF2* only?

 

 

Takes some trigonometry. Should work in both. I'm done with SF1, there are some neat things in SF2 for us prop heads.

 

 

Let’s use the SBD and we’ll keep it in feet to make it simple, you have to convert my numbers to meters.

 

[DiveBombAI]

RollInRange= 7,444

RollInAlt= 14,000

PullOutRange= 44

PullOutAlt= 700

ReleaseAlt= 2400

SecondPassRange=3000

SecondPassAlt= 3000

ReleaseCount= 3

ReleaseInterval=0.14

AimPitchOffset= 0.1

 

 

Let’s take the 2 known’s. The start is 14,000ft at a 70deg dive angle.

 

 

We need to calc the RollInRange= value

 

14000/TAN(RADIANS(62))

 

 

Note, I’m using 62deg above because the AI/human can’t instantly dive. They actually will fly past the RollInRange= which is where they push on the stick. With the 62 when they stabilize and are in the dive it will be about 70deg.

 

 

14000/TAN(RADIANS(62)) = 7444ft

 

 

So at 14,000ft of altitude, 7444ft horizontally from the target they will push over into the dive.

 

 

Both

 

 

PullOutRange= 44

PullOutAlt= 700

 

 

Are not needed unless you want them to always begin the pull out at a higher altitude. Baron Otto Matic made a deal with TK to allow the Baron to determine when to pull out if he see's his life flash before his eyes. But the same equation above can be used to determine it.

 

 

ReleaseAlt= 2400

 

 

Is very important. You have to ride along F6 and watch the AI several times to determine at what altitude the AI will pull out. This number has to be above this, and high enough for the AI to ripple all bombs or the AI will not drop all of them. Not to big a problem see below.

 

 

SecondPassRange=3000

SecondPassAlt= 3000

 

 

After the dive the AI will pull out and head towards this point. If not all bombs are dropped, they will 180 and do a glide bomb run from here with any remaining bombs. If they have no bombs, but a forward firing gun they will go into strafe mode. Otherwise, it’s run Forest, run!

 

 

ReleaseCount= 3

ReleaseInterval=0.14

 

 

This sets the number of bombs to drop and the ripple interval.

 

 

AimPitchOffset= 0.1

 

 

Is very important. This allows you to adjust where the bomb lands. Takes a few tries to get the bomb right on targets. A stationary target is a must. Start with zero.

 

 

To force the AI to always Dive/Glide Bomb set/add

 

 

[LevelBombAI]

PullOutRange=0

PullOutAlt= 0

ReleaseAlt= 0

SecondPassRange=0

SecondPassAlt=0

ReleaseCount=0

ReleaseInterval=0

 

 

The reverse is true if you want them to always level bomb.

Share this post


Link to post
Share on other sites

:wacko:

 

Wow........

I'm still learning trigonometry........

 

But Thanks.......

Share this post


Link to post
Share on other sites

wacko.gif

 

Wow........

I'm still learning trigonometry........

 

But Thanks.......

 

 

If you have excell, it makes life for stuff like this real simple.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..