Jump to content
Sign in to follow this  
gregoryp

Is there a way to get the AI to fire the FIRE_SECONDARY_GUN?

Recommended Posts

Is there a way to get the AI to fire the FIRE_SECONDARY_GUN?

 

On the WW2 aircraft I’ve been setting the MG’s to FIRE_PRIMARY_GUN and the Cannon to FIRE_SECONDARY_GUN but looks like the AI only fires the FIRE_PRIMARY_GUN. All are set to GunGroup=1. I'd really like to keep them seperate for the Human player.

Share this post


Link to post
Share on other sites

I'd look to see how an IL-28 or B-52 has their Tailguns set up. I know AI uses those.....

 

 

331KillerBee

Share this post


Link to post
Share on other sites

You know, that is a great idea Gunney. I never thought to use a turret as a "secondary gun". You just have to limit the cone of fire to match the primary gun.

Share this post


Link to post
Share on other sites

Look at what TK did with the MiG-17s. He set up both the twin 23s and the single 37 on the primary trigger.

 

[internalGun1]

SystemType=FIXED_GUN

GunTypeName=37MM_N37D

InputName=FIRE_PRIMARY_GUN

 

[internalGun2]

SystemType=FIXED_GUN

GunTypeName=23MM_NR23

InputName=FIRE_PRIMARY_GUN

 

[internalGun3]

SystemType=FIXED_GUN

GunTypeName=23MM_NR23

InputName=FIRE_PRIMARY_GUN

 

Initially, the 37 was set as a secondary gun, but we (the modding community) kept inisisting that he set all 3 on the same trigger, as the AI was not using the 37, by default.

 

Flex guns on multi-crewed AC (such as the aforementioned IL-28 and B-52) are another issue all together, as they're controlled by separate gunners.

Share this post


Link to post
Share on other sites

isn't there a piece of coding in one of the dlls that controls this?? The AI has NEVER used the curesed 2ndary guns since Day 1 that I remember

(which is why I've switched all them over to PRIMARY, even if the ballistics are different, on birds like the P-38, Zekes, 109, 190s, Mig15, etc)

 

just another thing that's never gotten fixed, I guess....sorta like AIR_ASSAULT and the ASW statements...

 

wrench

kevin stein

Share this post


Link to post
Share on other sites

Is there a way to get the AI to fire the FIRE_SECONDARY_GUN?

 

On the WW2 aircraft I’ve been setting the MG’s to FIRE_PRIMARY_GUN and the Cannon to FIRE_SECONDARY_GUN but looks like the AI only fires the FIRE_PRIMARY_GUN. All are set to GunGroup=1. I'd really like to keep them seperate for the Human player.

 

Unfortunately there is no way to make AI firing SECONDARY_GUN (nor making them using thrust vector for instance) until TK will implement it. That's why I've asked to TK years ago the possibility to have separate DATA ini file for AI and player.

Edited by kreelin

Share this post


Link to post
Share on other sites

 

AI should fire the secondary gun if the range is within optimal range (I think thats set somewhere in the Ai data section, there should be max, optimal, and min range).

 

 

Tk posted this to my question. I just tested it. It does work! good.gif

 

[DogfightAce]

MaxCannonRange=914.4 <<<<<<< range for Primary Guns

OptimalCannonRange=914.0952 <<<<<<< range for Secondary Guns

MinCannonRange=18.288

 

 

here's the default from the AIRCRAFTAIDATA.INI

 

MaxCannonRange=3500

OptimalCannonRange=1000

MinCannonRange=500

 

That's why the default MiG 17's don't fire the secondary gun. Now you just need to figue what ranges you want.

 

Now to convert all my FM's back to Primary/Secondary since each aircraft has it's own ranges grin.gif

Edited by gregoryp

Share this post


Link to post
Share on other sites

and this data goes where??? Aircraft's data ini, or a missioncontrol ini??? Or????

 

It would have to work globaly, not just for a specific pilot type (ie: DogfightAce as shown)

 

wrench

kevin stein

Share this post


Link to post
Share on other sites

and this data goes where??? Aircraft's data ini, or a missioncontrol ini??? Or????

 

It would have to work globaly, not just for a specific pilot type (ie: DogfightAce as shown)

 

wrench

kevin stein

 

Can go in each aircraft's data.ini and custom tuned specifically for the aircraft or the main AIRCRAFTAIDATA.INI file for all.

Share this post


Link to post
Share on other sites

Dogfight only?

 

Or also ground attack?

Share this post


Link to post
Share on other sites

A: you mean like this:

 

[DiveBombAI]

AimPitchOffset=2.0

 

[RocketAttackAI]

RollInRange=7000.0

RollInAlt=1200.0

PullOutRange=1000.0

PullOutAlt=200.0

ReleaseRange=2500.0

SecondPassRange=4000.0

SecondPassAlt=700.0

ReleaseCount=16

ReleaseInterval=0.095

AimPitchOffset=0.8

 

[strafeAI]

RollInRange=4500.0

RollInAlt=1100.0

PullOutRange=400.0

PullOutAlt=175.0

ReleaseRange=1200.0

SecondPassRange=3500.0

SecondPassAlt=950.0

ReleaseInterval=1.0

AimPitchOffset=0.0

 

been in aircraft data ini's since the 08 patch for 1st Gens. They can also be custome fine-tuned per aircraft

 

wrench

kevin stein

Share this post


Link to post
Share on other sites

A: you mean like this:

 

 

 

been in aircraft data ini's since the 08 patch for 1st Gens. They can also be custome fine-tuned per aircraft

 

wrench

kevin stein

 

 

The other thing I noticed is the numbers appear to be feet, not meters. When set to 300 for the MG-17 the Bf109 literally climbs up the fanny of the Lancaster before firing.

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..