| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 | ||||
|
Revolutionary
Join Date: Nov 2003
Location: California
Posts: 2,596
|
Air combat discussion
Continuing the discussion on use of combat promotions for air units which starts here ...
A few of the posts: Quote:
Quote:
Quote:
Quote:
__________________
Mods: Better BTS AI | Unofficial 3.19 Patch | Revolution Mod Pack Components: BarbarianCiv | AIAutoPlay | DynamicCivNames
|
||||
|
|
|
|
|
#2 | ||||
|
Revolutionary
Join Date: Nov 2003
Location: California
Posts: 2,596
|
Quote:
Quote:
Quote:
Quote:
So, options include leaving things as they are, simply fixing the bug with double counted combat promotions, or figuring out some more advanced fix to allow for better air superiority. Discuss.
__________________
Mods: Better BTS AI | Unofficial 3.19 Patch | Revolution Mod Pack Components: BarbarianCiv | AIAutoPlay | DynamicCivNames
|
||||
|
|
|
|
|
#3 |
|
Deity
Join Date: Apr 2003
Location: the Netherlands
Posts: 4,281
|
I'm clearly in favour of a more advanced fix which slightly changes the algorithm behind air combat (while fixing the promotion). If you increase the number of rounds of air combat and lower the damage per round, then the fighters with more promotions and thus a higher strength will get better odds to win the entire thing while on average the percentage hitpoints left on the victor will remain the same. However, that might change this AI-mod into something more than a pure AI-mod. The creators of this mod should decide if they are even willing to go that way.
Note that if you simply remove the combat promotion double effect, then you'll also change air combat in such a way that promotions have less effect. It will also change the game and not just the AI. It's unclear whether the designers at Firaxis wished a certain effect of combat promotions and were content with play tests unaware of the fact that the combat promotions were counted double or they just wished an air combat model where promotions weren't very effective and they made an error that went unnoticed in play tests.
__________________
If in other sciences we should arrive at certainty without doubt and truth without error, it behooves us to place the foundations of knowledge in mathematics. |
|
|
|
|
|
#4 |
|
Cheftan
Join Date: Mar 2006
Posts: 1,288
|
I'd support a fix to this in the "unofficial patch", but this doesn't look like an AI problem or bug.
|
|
|
|
|
|
#5 |
|
Great Engineer
Join Date: Nov 2005
Location: Denmarkia
Posts: 1,142
|
Code:
void CvUnit::resolveAirCombat(CvUnit* pInterceptor, CvPlot* pPlot, CvAirMissionDefinition& kBattle)
{
CvWString szBuffer;
int iTheirStrength = (DOMAIN_AIR == pInterceptor->getDomainType() ? pInterceptor->airCurrCombatStr(this) : pInterceptor->currCombatStr(NULL, NULL));
int iOurStrength = (DOMAIN_AIR == getDomainType() ? airCurrCombatStr(pInterceptor) : currCombatStr(NULL, NULL));
int iTotalStrength = iOurStrength + iTheirStrength;
if (0 == iTotalStrength)
{
FAssert(false);
return;
}
int iOurOdds = (100 * iOurStrength) / std::max(1, iTotalStrength);
int iOurRoundDamage = (pInterceptor->currInterceptionProbability() * GC.getDefineINT("MAX_INTERCEPTION_DAMAGE")) / 100;
int iTheirRoundDamage = (currInterceptionProbability() * GC.getDefineINT("MAX_INTERCEPTION_DAMAGE")) / 100;
if (getDomainType() == DOMAIN_AIR)
{
iTheirRoundDamage = std::max(GC.getDefineINT("MIN_INTERCEPTION_DAMAGE"), iTheirRoundDamage);
}
int iTheirDamage = 0;
int iOurDamage = 0;
for (int iRound = 0; iRound < GC.getDefineINT("INTERCEPTION_MAX_ROUNDS"); ++iRound)
{
if (GC.getGameINLINE().getSorenRandNum(100, "Air combat") < iOurOdds)
{
if (DOMAIN_AIR == pInterceptor->getDomainType())
{
iTheirDamage += iTheirRoundDamage;
pInterceptor->changeDamage(iTheirRoundDamage, getOwnerINLINE());
.
.
.
It really annoys me that damage is totally unrelated to strength. If you want an interceptor to do more damage, you should give it interception promotions. If you want it to have a higher chance of actually DOING damage, you want more strength. This is counterintuitive at best, and really makes it tricky to mod the aerial aspects of the game in a balanced way. It seems to me that aerial combat was not really developed properly. We have evasion variables in the XML for units, but it is only used to check if the attacking unit can evade interception, regardless of the interceptors interception level. And only nukes, missiles and the stealth bomber have evasion greater than zero.
__________________
Merged Mod: A combination of Wolfshanze's 1850-1920 mod, Dales Combat mod, Influence Driven War and GIR's Partisan mod, all built on top of the Better AI! Download "The memory of spectacular failure eclipses that of enduring success."
|
|
|
|
|
|
#6 |
|
Cheftan
Join Date: Mar 2006
Posts: 1,288
|
*nod*.
I'd be tempted to go with someting like: Str*(100%+Evasion%) vs Str*(Intercept%) intercept chance. If intercepted, each round consists of: Str*(100%+Combat%) vs Str*(100%+Combat%) round of combat, then Str*(50%+Evasion%) vs Str*(100%+Intercept%) disengagement attempt. ...repeated until something is shot down, or the attacker disengages. This would require rebalancing every intercept/evasion percentage... X% intercept before = X%/(100%-X%) intercept after And then evasion% would have to be completely reworked. |
|
|
|
|
|
#7 |
|
Revolutionary
Join Date: Nov 2003
Location: California
Posts: 2,596
|
Yeah, that is a counter intuitive formula ... I took a quick look at the formulas for land combat to see how these compare. In the land case, both the odds of landing a hit and damage dealt depend on strength but the specific formulas are different in the two cases. So, the one formula that is really different from the standard setup here is the damage dealt formula ...
MAX_INTERCEPT_DAMAGE is set to 50 in XML from what I see, where did you get 100 Ninja2? Anyway, as stated up thread that means that a healthy, unpromoted fighter needs to win only two rounds to shoot down anything (with relative strength adjusting the odds of winning a round). The current formula seems to work okay for most of the air unit vs ground/sea interceptor scenarios ... if a ground unit has a higher interception percentage, it makes sense for it to deal more damage to a plane. But when two fighters are going head to head, it certainly is more intuitive to have damage based on strength. Perhaps we could consider just making tweaks for the air vs air scenario to keep things a bit simpler ... the "real" interactions are very different anyway, since a ground interceptor would really only get a few shots in while a fighter can give chase.
__________________
Mods: Better BTS AI | Unofficial 3.19 Patch | Revolution Mod Pack Components: BarbarianCiv | AIAutoPlay | DynamicCivNames
|
|
|
|
|
|
#8 |
|
Great Engineer
Join Date: Nov 2005
Location: Denmarkia
Posts: 1,142
|
Sorry, I got it mixed up with MAX_INTERCEPTION_PROBABILITY, which is 100.
I don't really know what the best solution is. I like Yakk's suggestion, but I can see why that would be beyond the scope of Better_AI. However, I am biased, since I'd really like a better intercept model for my mod! I want to take advantage of those evasion tags, and there are also more classes of air units in my mod, so that's really my motivation for bringing this up.
__________________
Merged Mod: A combination of Wolfshanze's 1850-1920 mod, Dales Combat mod, Influence Driven War and GIR's Partisan mod, all built on top of the Better AI! Download "The memory of spectacular failure eclipses that of enduring success."
|
|
|
|
|
|
#9 |
|
Freakamongus
Join Date: Apr 2008
Location: New Zealand
Posts: 724
|
|
|
|
|
|
|
#10 |
|
Great Engineer
Join Date: Nov 2005
Location: Denmarkia
Posts: 1,142
|
Here's another one that baffles me:
Again, in CvUnit.cpp, there's the function Code:
bool CvUnit::interceptTest(const CvPlot* pPlot) Code:
if(interceptTest(pPlot))
{
return true;
}
Code:
if (interceptTest(pPlot))
{
return false;
}
__________________
Merged Mod: A combination of Wolfshanze's 1850-1920 mod, Dales Combat mod, Influence Driven War and GIR's Partisan mod, all built on top of the Better AI! Download "The memory of spectacular failure eclipses that of enduring success."
|
|
|
|
|
|
#11 |
|
Revolutionary
Join Date: Nov 2003
Location: California
Posts: 2,596
|
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.
__________________
Mods: Better BTS AI | Unofficial 3.19 Patch | Revolution Mod Pack Components: BarbarianCiv | AIAutoPlay | DynamicCivNames
|
|
|
|
|
|
#12 |
|
Revolutionary
Join Date: Nov 2003
Location: California
Posts: 2,596
|
Here's what I'm trying out for the change to aircombat mechanics:
For fighter v fighter fights only, switch from the intercept style code to basically the same mechanics used for land combat. The rationale for this is that fighter v fighter combat is different than other interception scenarios ... fighters can dogfight, it's potentially a meeting of equals. Here's how the difference plays out. Combat calculations have two parts, odds of winning a round and the damage dealt if a round is won. The odds of winning a round of air combat remains based on relative strength, just like land combat. The difference is in damage dealt per round. Previously, a fighter dealt 50*(current interception chance) damage per round where (current interception chance) is (100 + up to 30 from interceptor promotions)*(current health)/100. For a healthy fighter this meant 2 hit kills regardless of the opponent or what promotions the fighter had ... relative strength effected odds of winning a round, but two hits from a healthy fighter would bring down any other fighter. Two hits kills made these fights very much about luck ... a combat 5 fighter could be shot down by a complete rookie fighter ~30% of the time. Now, combat damage for fighter v fighter uses a damage dealt formula just like the standard damage formula, based on relative strength. Damage per round is overall decreased so that an even fight requires 3 wins ... since there are still 5 rounds, someone always burns in an even fight. In the Combat 5 versus rookie case, the rookie has to win 3 out of 5 with 40% odds just to live and 4 out of 5 with 40% odds to shoot down the veteran. (These compare to shooting down by winning 2 out of 3 with 40% odds) Another corner case where things are dramatically different now: A 50% injured jet fighter vs a standard fighter, no promotions. With even effective strength because of the injury, the odds of each winning a round is 50%. With the prior interception-based formula, the jet fighter only did 25 damage per round because of being 50% injured and would have to win 4 out of 5 rounds to win while the standard fighter still only needed 2 victories. With the more strength formula, a unit does damage based on the average of its effective and full strengths, so the jet fighter only needs 3 out of 5 hits to kill while the standard fighter needs 4 of 5. As you can see, the change means that for fighter v fighter combat, strength and technology will now be much more important ... air superiority may soon really mean something! (EDIT: The source code changes have been checked in to the sourceforge SVN in case you want to check them out ... they're in CvUnit::resolveAirCombat)
__________________
Mods: Better BTS AI | Unofficial 3.19 Patch | Revolution Mod Pack Components: BarbarianCiv | AIAutoPlay | DynamicCivNames
|
|
|
|
|
|
#13 |
|
Cheftan
Join Date: Mar 2006
Posts: 1,288
|
Meh -- I think think that evasion and intercept should factor in, to make it 'feel' somewhat like the existing game where you can disengage.
And special casing fighter-vs-fighter seems wrong. |
|
|
|
|
|
#14 |
|
Great Engineer
Join Date: Nov 2005
Location: Denmarkia
Posts: 1,142
|
Here are another two issues for consideration:
First issue: Currently, it is not possible to actively engage the enemy's air defenses, be it fighters or SAM infantry. A jet fighter has the same options to engage the enemy as a bomber - recon, bombing or airstrikes. So it is impossible for the attacker to simulate escorted bomber runs. This is despite the fact that the defender's interceptors (ground or air defenses) have a setMadeInterception flag, which makes any intercepting unit incapable of intercepting more than once during any combat round. So if I attack with a single fighter, and I know that my defender has only one fighter on patrol, and I am intercepted, I can without any danger have my bombers attack, knowing that I will not be intercepted. If my fighter is not intercepted, I have presumably attacked a ground unit, which is really a sub-optimal use of my fighter. Optimally, my fighter should have escorted my bomber, engaged the enemy fighters to protect my bomber, and allowed the bomber to complete it's mission. Dale has in his DCM done two things: He ignores the check on the setMadeInterception when selecting the best interceptor, and he has a mission option for fighters to engage the enemy's fighters. I propose that we introduce the fighter engage mission, but continue to check for the setMadeInterception. This allows the player to simulate escorted bomber runs, although the planes do not travel simultaneously. However - this idea opens up an exploit, where you send a vastly inferior fighter to engage the enemy air. So I suggest that the setMadeInterception flag only be set, if the interceptor took damage from the dogfight. If it escapes unharmed, it should be allowed to intercept again. Second issue: When bestÍnterceptor is chosen, the code evaluates the unit with the highest probability to intercept (i.e. the unit with the highest damage dealing potential), modified by the unit's health. This is currInterceptionProbability. So there's no regard for the unit's strenght, which under the current code determines the actual chance to DO damage... at least the game should also consider the strength of the unit?
__________________
Merged Mod: A combination of Wolfshanze's 1850-1920 mod, Dales Combat mod, Influence Driven War and GIR's Partisan mod, all built on top of the Better AI! Download "The memory of spectacular failure eclipses that of enduring success."
|
|
|
|
|
|
#15 |
|
Chieftain
Join Date: Apr 2006
Location: Virginia, USA, Sol 3, Milky Way...
Posts: 38
|
Re: Evasion - Should be in the code, absolutely. Every pilot around the world (at least in the sane countries) is taught that survival is priority one; when the fight is going against you, bug out! I recommend that a withdrawal check be made by a VF when/if it loses a round of combat, along the lines of:
Code:
(more like logic flow than code, actually...) StrVFA = Strength of fighter losinground StrVFB = Strength of fighter winning round StrVFA / StrVFB = BugOut IF BugOut <= [40%]THEN RunAwayELSE NextRound RunAway = 50 IF StrVFB < 100 = Escape //If he's shot up, he's not likely to pursue// IF VFA = VF IF VFB = Jet VFTHEN RunAwayMod = RunAway -20 //Jets are faster, but maybe the VF pilot is Chuck Yeager and the Jet VF pilot is a nugget//IF VFA = Jet VF IF VFB = VFTHEN RunAwayMod = RunAway +20 //Jets are faster, but maybe the VF pilot is Chuck Yeager and the Jet VF pilot is a nugget//IF RunAwayMod > RandomTHEN EscapeELSE Taps Re: MadeIntercept: From what the Civopedia says, CAP will intercept repeatedly as long as it keeps making it's check. Methinks that the MadeIntercept flag might be used as a marker showing that the CAP flew a mission and the AI should first look to another VF for the next intercept if any are available as opposed to a "sorry, I've moved this turn" toggle. Yes, it could be exploited by using old VF as fodder to draw off the CAP, but the fodder would be killed (most likely) on it's first mission so the exploit would be a pretty limited one. For clarity - when you say "strength", you are referring to "# of hitpoints left" or health, yes? Not "strength" as is used in the game infos to indicate hitting power?
__________________
Disclaimer: The content of this post may be presented for discussion purposes and does not necessarily reflect the personal opinion of MrAnon. WAIT!! Before you hit that enter key, ask yourself "Am I contributing anything to the thread or just being a jackass?" ![]() A+, Net+, MCP, MCDST - Info Tech Spec I SGT, 3/75th FA BDE (M109A3), USAR(AD) Operations Specialist 2d, (SW), USN Lifelong semi-grognard & PC gamer This is actually my fourth account on CFC, so disregard the join date and post stats; they're both waaaaay off. |
|
|
|
|
|
#16 |
|
Chieftain
Join Date: Apr 2006
Location: Virginia, USA, Sol 3, Milky Way...
Posts: 38
|
New mission idea: SEAD
SEAD: Suppression of Enemy Air Defenses aka "Wild Weasel".
This concept requires lifting some lines from the Espionage code.
If I understand the way the system works correctly, the strike damage will lower the intercept chance (ie: suppress) the AAW system; kind of like taking down a SAM site's radar. Thoughts/Comments?
__________________
Disclaimer: The content of this post may be presented for discussion purposes and does not necessarily reflect the personal opinion of MrAnon. WAIT!! Before you hit that enter key, ask yourself "Am I contributing anything to the thread or just being a jackass?" ![]() A+, Net+, MCP, MCDST - Info Tech Spec I SGT, 3/75th FA BDE (M109A3), USAR(AD) Operations Specialist 2d, (SW), USN Lifelong semi-grognard & PC gamer This is actually my fourth account on CFC, so disregard the join date and post stats; they're both waaaaay off. |
|
|
|
|
|
#17 | ||
|
Great Engineer
Join Date: Nov 2005
Location: Denmarkia
Posts: 1,142
|
Quote:
Quote:
So I did mean strength, and not health, since strength is the determining factor for winning a combat round.
__________________
Merged Mod: A combination of Wolfshanze's 1850-1920 mod, Dales Combat mod, Influence Driven War and GIR's Partisan mod, all built on top of the Better AI! Download "The memory of spectacular failure eclipses that of enduring success."
|
||
|
|
|
|
|
#18 | ||
|
Chieftain
Join Date: Apr 2006
Location: Virginia, USA, Sol 3, Milky Way...
Posts: 38
|
Quote:
I have seen consistently these situations and resolutions:
Note that I do not know if there was a 2d CAP that failed it's check, or if there was only the one CAP. I'll have to do some experimenting on this bit. One other question comes to mind here, too - does the AI cycle through *all* the CAP in a city, testing each one for an intercept? Or does it test just the first x with xbeing the size of the incoming raid? Quote:
__________________
Disclaimer: The content of this post may be presented for discussion purposes and does not necessarily reflect the personal opinion of MrAnon. WAIT!! Before you hit that enter key, ask yourself "Am I contributing anything to the thread or just being a jackass?" ![]() A+, Net+, MCP, MCDST - Info Tech Spec I SGT, 3/75th FA BDE (M109A3), USAR(AD) Operations Specialist 2d, (SW), USN Lifelong semi-grognard & PC gamer This is actually my fourth account on CFC, so disregard the join date and post stats; they're both waaaaay off. |
||
|
|
|
|
|
#19 | |
|
Great Engineer
Join Date: Nov 2005
Location: Denmarkia
Posts: 1,142
|
Quote:
Presumably, if you make an air attack using a stack, it still checks each aircraft individually, but I don't know, since I have never tried this.
__________________
Merged Mod: A combination of Wolfshanze's 1850-1920 mod, Dales Combat mod, Influence Driven War and GIR's Partisan mod, all built on top of the Better AI! Download "The memory of spectacular failure eclipses that of enduring success."
|
|
|
|
|
|
|
#20 |
|
Great Engineer
Join Date: Nov 2005
Location: Denmarkia
Posts: 1,142
|
Alright, given that machineguns and anti-tank in 3.17 are simulated to double as flak, I think the whole air defense code needs some serious overhaul.
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... 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).
__________________
Merged Mod: A combination of Wolfshanze's 1850-1920 mod, Dales Combat mod, Influence Driven War and GIR's Partisan mod, all built on top of the Better AI! Download "The memory of spectacular failure eclipses that of enduring success."
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Air-to-Air Combat | skdyer | Civ4 - General Discussions | 19 | Feb 07, 2009 01:31 PM |
| Discussion about Air Combat in BtS | Stormreaver | Civ4 - General Discussions | 1 | Jun 26, 2008 03:01 PM |
| 1.51 Air - air combat | Commander Bello | Civ4 - Bug Reports | 2 | Apr 28, 2006 03:45 AM |
| Air to Air Combat!! | Flat | Civ - Ideas & Suggestions | 21 | Jan 20, 2006 09:54 AM |
| air combat | douche_bag | Civ - Ideas & Suggestions | 8 | Aug 26, 2004 07:51 AM |