Air combat discussion

A ground unit that intercepts an aircraft also uses the combat logic in the resolveaircombat code posted above. Which means that if intercepted, the attacking aircraft actually combats the intercepting unit. Imagine a fighter doing an airstrike. If the defending ground unit manages to intercept, the fighter aborts it's airstrike to attack the interceptor (flak) in stead. I don't think this type of mission has ever happened in aviation history...

Oh, it's happened many, many times. Often the lead elements of a strike have both SEAD and normal attack ordnance onboard. If there is air defense, the a/c will try to suppress it and then continue the attack or go home.

What actually happens in gameplay is that an interception ends a mission; regardless of the outcome. If it's a CAP intercept, the a/c fight but if it's a G2A (ground to air) intercept then the a/c is damaged, aborts the mission and goes home. I've never seen a G2A intercept where the a/c attacked the shooter, they always abort.

From playing, it appears that if the ground unit makes it's intercept check it does the full amount of it's iCombat variable and if it fails the check, then the interception doesn't happen.

In a CAP intercept, however, it seems that making the intercept check initiates combat. Interestingly, iAirCombatLimit is set to 50% in the stock CIV4UnitInfos.xml. This means that unless an aircraft was fairly badly hurt before entering combat, it doesn't get shot down - it goes home damaged. Right now, I'm playing with the value to 100 because in modern air-to-air combat, you rarely survive a hit. It doesn't seem to have unbalanced anything; I still have a/c come home damaged, just not so many as before.


A much better approach would be to have an intercpetion check from air units, and a separate check from ground (non-air in this case) units. The interceptions made from ground units should result in low damage to the aircraft, and no damage to the interceptor. Evasion should be particular effective at preventing interception from ground (and sea).

That's pretty much what appears to be the case already. If there is an aircraft on CAP, even if already damaged, it gets the call. Ground units only get a shot if there isn't any a/c set to 'intercept'. I can't think of a way, off the top, to increase evasion effectiveness vs G2A without also increasing it vs A2A. Although...I wonder if increasing an a/c's defense vs domain_land might lower the ground unit's intercept probability...?:hmm:

Something I found this weekend that might have some use in this discussion is the Ranged Combat Mode and UnitClass/CombatTargets. It would appear that setting a non-Domain_Air unit's iAirCombat enables Ranged Combat Mode. This is a named mode with it's own bombard icon that allows indirect fires on a tile in range. The game engine handles this as the unit "air striking" the target hex - damages a specific unit but not terrain/improvements. Range is set using iAirRange and the damage done is the value of iAirCombat. Max damage can be capped with iAirCombatLimit (100 = can kill) and setting the iCollateralDamage options adds that capability to the indirect fires.:ack:

As long as you do NOT set an interception probability, the unit will not engage aircraft. For units like ships that can both intercept and perform ranged fires, the game engine handles them as separate activities but references the same values for each. So if you bump up your iAirCombat to make bigger booms when you do shore bombardment, you are also bumping up the damage done to an aircraft if your ship makes it's interception probability check. Likewise for iAirRange; your interception range and bombardment range will be the same.:huh:

iUnitClassTargets and iUnitCombatTargets cause a unit to attack the declared UNITCLASS or UNITCOMBAT first if it's present in a defending stack outside of a city. For example, my mobile SAMs will single out gunships, if any are in a stack, when attacking regardless of whether the SAM is solo or part of a stack itself.

This leads to some interesting options for combined arms warfare. For example (I haven't tried this yet), logically you could set SAMs as targets for jet VF, bump up their combat vs SAMs and viola! Wild Weasels! Better yet, Wild Weasels that will conduct normal airstrikes if there isn't a SAM in the tile/stack. :eek:

Whew! I'm going to go treat my carpal tunnel now....:) :health:
 
you missunderstood "iAirCombatLimit".

iAirCombatLimit is the value, how much the air attack can damage another unit. if set to 100, a fighter can destroy any unit (with several attacks).
 
I mentioned iAirCombatLimit in two contexts - where, specifically, did I misunderstand?

I'm not seeing where I said anything that differs from your definition....
 
Interestingly, iAirCombatLimit is set to 50% in the stock CIV4UnitInfos.xml. This means that unless an aircraft was fairly badly hurt before entering combat, it doesn't get shot down

iAirCombatLimit is a limiting value for the attacker, not for the interceptor. I don't think this has anything to do with getting shot down. In case I'm wrong, an intercepting land unit would destroy more attacking air units than an intercepting air unit (mobile SAM has no limit).
 
In my own modding experiments, I found iAirCombatLimit to actually be the bombing limit. The amount of damage an aircraft can do to ground targets. I don't think it is applied anywhere else, at least it didn't seem to be.
 
It is confusing, but yes they are working correctly ... the return values for paradrop and airbomb seem to mean different things than the one for airstrike.

Would you mind explaining to me why it's working correctly. I really, really don't understand why... :confused:
 
For airbomb and paradrop, returning true means that the unit has performed an action of any kind (including having been intercepted attempting their other mission) which effects what happens next in CvSelectionGroup::startMission

For airstrike, returning true means that the unit has performed an airstrike specifically (not been intercepted) and that causes CvUnit::updateAirStrike to queue the airstrike animation.

That's what I'm seeing, does that make sense?
 
Thanks, yes, it does. I didn't think to search for which functions called airbomb, airstrike and paradrop functions. I'm still learning to read this code. And damn, that CvSelectionGroup.cpp file is complicated! :D
 
Allow me to quote my own mod-thread:

Moving on to the issue of promotions: Interceptors (i.e. fighters and jet fighters) can, in 3.17, get the Combat line promotions and also the Interception I and II promos, amongst other things. Given the way the model works, choosing promotions can seem counterintuitive. While the Interception I and II do improve the chance the interceptor has to intercept in the first place, a fully fit interceptor does not gain any advantage, because it is already at 100%. Only when the interceptor is damaged does it gain an improvement to its chance to intercept. The interception value is also used for calculating the damage. But again, a fully fit interceptor can not deal out more damage than the 50% maximum damage limit (and 110% interception chance /2 = 55%), so the Interception promotion is again only useful to a damaged interceptor. The Combat line of promotions are actually more beneficial, if for no other reason because both a damaged and un-damaged interceptor can take advantage of it. The effect of it is to improve the odds during the combat rounds.

I'm not sure of the current status of the resolveaircombat function in 0.40... but this should definitely be changed. Interception promotions should not only give a benefit to damaged units.
 
Wow, I can't believe it ... the interceptor promotion doesn't actually change interception odds for an undamaged fighter ... they're 100% - attackers evasion in this case no matter what. That's unbelievable. It should help against units with evasion ratings it seems to me.

I disagree with your reading of the damage though ... with 110% interception chance an undamaged fighter will deal 55% damage:

Code:
int iOurRoundDamage = (pInterceptor->currInterceptionProbability() * GC.getDefineINT("MAX_INTERCEPTION_DAMAGE")) / 100;

MAX_INTERCEPTION_DAMAGE isn't really a max in this case ... it doesn't cap things at 50, it's more of a multiplier. The name is a bit of a misnomer.

That said, the difference between 50 and 55 is basically negligible ... the AI won't send damaged bombers into battle, so it's two hits to kill even with Interceptor II. If the fighter only gets one hit in the 5 rounds, maybe it takes the bomber an extra turn to recover. That's pretty useless.

Something definitely needs to be done ... but what?

Fixing the first point is easy enough. If the attacker's evasion is < 100, subtract maybe 1/2 * (curr interception over 100).

Other ideas?
 
Wow, I can't believe it ... the interceptor promotion doesn't actually change interception odds for an undamaged fighter ... they're 100% - attackers evasion in this case no matter what. That's unbelievable. It should help against units with evasion ratings it seems to me.

I disagree with your reading of the damage though ... with 110% interception chance an undamaged fighter will deal 55% damage. MAX_INTERCEPTION_DAMAGE isn't really a max in this case ... it doesn't cap things at 50, it's more of a multiplier. The name is a bit of a misnomer.

Well, I am glad you agree that it's not working well. And you're right about maxdamage - it's not capped, I remembered it wrong.

In my mod I've made the interception test look like so:

Code:
if (GC.getGameINLINE().getSorenRandNum(100, "Intercept Rand (Air)") < (pInterceptor->currInterceptionProbability() - currEvasionProbability()) + GC.getDefineINT("INTERCEPTION_BONUS"))

INTERCEPTION_BONUS is set at 30, and can be tweaked in XML. currEvasionProbability is a new int, that basically modifies evasion with health, similar to currInterception. Mind you, this is balanced in Merged Mod, I haven't actually done the calculations for 3.17 vanilla. For damage, I also use a different calculation. For now, I use:

Code:
int iOurRoundDamage = std::max(GC.getDefineINT("MIN_INTERCEPTION_DAMAGE"), std::min(GC.getDefineINT("MAX_INTERCEPTION_DAMAGE"), (pInterceptor->airMaxCombatStr(this) / std::max(1, evasionProbability()) * pInterceptor->maxInterceptionProbability () / 100)));

Evasion works as a reducer of damage (so units with higher evasion levels aren't easily damaged by low-strength units). Damage ranges between 10% minimum and 100% maximum (XML defined). Yes, this means, in some cases, that one round is enough to kill, but this is because I have expanded the air unit roster, and I think it's fine that an Advanced Jet Fighter can kill an Airship in the first round. :) I might tweak the formula in the future, but for now I like the results I get. I have quite a big spreadsheet calculating all combat combinations for me (interception chance, chance to win first round and damage done), so it's manageable to balance it.
 
Soon after BtS came out, I found that the interception promotions were not available to fighters. I brought this up in a forum, and Solver explained that they were not available to units that already had 100% intercept capability, that it was not intended to increase the intercept chance of a damaged unit or counter an evasion-promoted unit.

What the intercept promo was for was the contingency that fighters' intercept capability were reduced to below 100% in the xml.
 
What the intercept promo was for was the contingency that fighters' intercept capability were reduced to below 100% in the xml.

That seems like an odd thing to design, given that both the Fighter and Jet Fighter have 100% Interception levels in vanilla BTS. Basically, you give out promotions in two cases (you know this, of course! :D): when the unit has been built and gains free XP, or after battles when the unit most likely has some damage. In the second case you will be able to promote fighters with Interception - but it doesn't really do you much good, once your unit is back to full strength.
 
There is a mission missing: air superiority, where you want to engage and take out enemy air power.

Adding a new mission seems like a bad idea.

We could presume that aircraft with an interception value is attempting air superiority when it makes a strike? (ie, interception value makes you want to stay engaged and 'finish' the battle when attacking)
 
That seems like an odd thing to design, given that both the Fighter and Jet Fighter have 100% Interception levels in vanilla BTS. Basically, you give out promotions in two cases (you know this, of course! :D): when the unit has been built and gains free XP, or after battles when the unit most likely has some damage. In the second case you will be able to promote fighters with Interception - but it doesn't really do you much good, once your unit is back to full strength.

No, Jaybe's right ... Interceptor can never be acquired by fighters (without changes to the XML). It doesn't check current interception but max interception.

That adds an interesting wrinkle ... there's only one line of promotions available for rookie fighters. Don't know why I hadn't noticed that before ... I think memories of Road to War were throwing me off. This is also definitely not clear in the Civilopedia.
 
There is a mission missing: air superiority, where you want to engage and take out enemy air power.

Adding a new mission seems like a bad idea.

We could presume that aircraft with an interception value is attempting air superiority when it makes a strike? (ie, interception value makes you want to stay engaged and 'finish' the battle when attacking)

With the way combat works right now, when two healthy fighters go head to head one will always die ... there are 5 possible combat rounds but each fighters deals 50% damage per hit so one will die by the third round for sure.

The main remaining issue from my perspective is that a veteran fighter is almost meaningless for air superiority ... a combat 5 fighter (effective strength 18) wins only 65% of the time versus a rookie, in comparison a combat 5 land unit wins 90.5% of the time against an identical rookie with no other bonuses.

There was a bug before which counted combat promotions twice for air units, which made the odds 74% for a combat 5 fighter.
 
The main remaining issue from my perspective is that a veteran fighter is almost meaningless for air superiority ... a combat 5 fighter (effective strength 18) wins only 65% of the time versus a rookie, in comparison a combat 5 land unit wins 90.5% of the time against an identical rookie with no other bonuses.

There was a bug before which counted combat promotions twice for air units, which made the odds 74% for a combat 5 fighter.

Why not increase the number of combat rounds and decrease the amount of damage done per combat rounds. That will increase the odds for a combat 5 fighter against an unpromoted fighter (similar to the combat calculations for ground combat).

Present values:

Number of rounds: 5
Damage of fighters per round: 50
Damage of bombers per round: 10

Suggested new values:
Number of rounds: 11
Damage of fighters per round: 20
Damage of bombers per round: 4

Damage of other interceptors like sam units and destroyers scales proportionately: interception chance / 5.

In a healthy fighter versus healthy fighter battle, one will win before or at the ninth round.

Note that I didn't fully scale the Number of rounds (to 2.5*5=12.5) for a reason. The Law of Large Numbers states that the chance of a fighter beating a bomber converges to 1 as we keep increasing the number of rounds inversely proportionate with the damage per round. That would get pretty boring. Now there still is a decent chance that the bomber survives and retreats.

Note that if you would apply these values, that also the combat results between a fighter and a jet fighter would shift in favour of the stronger jet fighter.
 
No, Jaybe's right ... Interceptor can never be acquired by fighters (without changes to the XML). It doesn't check current interception but max interception.

That adds an interesting wrinkle ... there's only one line of promotions available for rookie fighters. Don't know why I hadn't noticed that before ... I think memories of Road to War were throwing me off. This is also definitely not clear in the Civilopedia.

I guess me modding and looking at other people's mods for too long has made me confused... :D

I think Roland's idea is quite nice. Prolonging the combat to 11 rounds seems an easy way to at least get more realistic results.
 
Top Bottom