View Full Version : Night Fighters vs Night Bombers


Ambreville
Mar 03, 2008, 07:26 PM
I'm interested in a system that would allow me to conduct night bombing raids and implement night fighters.

The idea is to create unit promotions for fighters and bombers allowing night missions. Mechanics are simple. When receiving a night mission promotion, an air unit loses some of its strength (both combat strength and bomb rate) in exchange for which they become "unterceptable" by normal units.

The latter is the problem. How does one make an air unit "uninterceptable" unless the appropriate promotion is available (still interceptable by night fighters)?

Gaius Octavius
Mar 03, 2008, 07:56 PM
Okay, let's venture back into the fun world of XML. :D

<PromotionInfo>
<Type>PROMOTION_ACE</Type>
<Description>TXT_KEY_PROMOTION_ACE</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<LayerAnimationPath>NONE</LayerAnimationPath>
<PromotionPrereq>NONE</PromotionPrereq>
<PromotionPrereqOr1>PROMOTION_COMBAT3</PromotionPrereqOr1>
<PromotionPrereqOr2>NONE</PromotionPrereqOr2>
<TechPrereq>NONE</TechPrereq>
<StateReligionPrereq>NONE</StateReligionPrereq>
<bLeader>0</bLeader>
<bBlitz>0</bBlitz>
<bAmphib>0</bAmphib>
<bRiver>0</bRiver>
<bEnemyRoute>0</bEnemyRoute>
<bAlwaysHeal>0</bAlwaysHeal>
<bHillsDoubleMove>0</bHillsDoubleMove>
<bImmuneToFirstStrikes>0</bImmuneToFirstStrikes>
<iVisibilityChange>0</iVisibilityChange>
<iMovesChange>0</iMovesChange>
<iMoveDiscountChange>0</iMoveDiscountChange>
<iAirRangeChange>0</iAirRangeChange>
<iInterceptChange>0</iInterceptChange>
<iEvasionChange>25</iEvasionChange>
<iWithdrawalChange>0</iWithdrawalChange>
<iCargoChange>0</iCargoChange>
<iCollateralDamageChange>0</iCollateralDamageChange>
<iBombardRateChange>0</iBombardRateChange>
<iFirstStrikesChange>0</iFirstStrikesChange>
<iChanceFirstStrikesChange>0</iChanceFirstStrikesChange>
<iEnemyHealChange>0</iEnemyHealChange>
<iNeutralHealChange>0</iNeutralHealChange>
<iFriendlyHealChange>0</iFriendlyHealChange>
<iSameTileHealChange>0</iSameTileHealChange>
<iAdjacentTileHealChange>0</iAdjacentTileHealChange>
<iCombatPercent>0</iCombatPercent>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<iKamikazePercent>0</iKamikazePercent>
<iRevoltProtection>0</iRevoltProtection>
<iCollateralDamageProtection>0</iCollateralDamageProtection>
<iPillageChange>0</iPillageChange>
<iUpgradeDiscount>0</iUpgradeDiscount>
<iExperiencePercent>0</iExperiencePercent>
<TerrainAttacks/>
<TerrainDefenses/>
<FeatureAttacks/>
<FeatureDefenses/>
<UnitCombatMods/>
<DomainMods/>
<TerrainDoubleMoves/>
<FeatureDoubleMoves/>
<UnitCombats>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_AIR</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
</UnitCombats>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<Button>,Art/Interface/Buttons/TechTree/Corporation.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,5,15</Button>
</PromotionInfo>

The ones in bold are the ones you want. You could set iCombatPercent to something like a -10 for a 10% reduction in combat strength, and similarly for the collateral damage. To make them uninterceptable, I believe all you need to do is set iEvasionChange to 100. :goodjob:

Ambreville
Mar 03, 2008, 08:15 PM
OK, but how to make the "night bomber" interceptable by "night fighters" and not interceptable by other normal air units? :confused:

Ambreville
Mar 05, 2008, 10:55 AM
Anyone?? :scan:

Ambreville
Mar 05, 2008, 11:03 AM
I wonder if creating a brand new domain -- NIGHT -- instead of AIR, that works the same way as AIR but remains a separate domain. Could this actually do the trick?

Dom Pedro II
Mar 05, 2008, 04:58 PM
Unfortunately, it's not as simple as that. Doing that will cause problems because the program specifically searches for the DOMAIN_AIR domain for virtually anything involved in moving the planes and carrying out the missions. The only way I can see of to do what you want it to do is to have two new tags for promotions... something like: <bNoInterception> and <bCanInterceptSpecial>. Then when the program checks to see if a unit can be intercepted, it will check to see if it's got the special interception tag and then look for any interceptors that have the tag to intercept them. If no, no interception will take place. This will require a bit of SDK work and an intermediate level understanding of the SDK code at least.

EviltheMonkey
Mar 05, 2008, 06:11 PM
Surely it would be better to keep night bombing as you have it (a negative interception modifier), and instead of worrying about 'Night Fighters' just add Air Interception Radar as you're fighter promotion. It would cancel out (maybe not completely) the bombers night bombing bonus but would also help in daylight interception.

Perhaps you could have it as a free promotion for modern jet fighters to represent their onboard radars.

Ambreville
Mar 05, 2008, 06:18 PM
Yeah, unfortunately I won't be able to wrangle the SDK part. I need to find someone with these skills who'd be interested in a WWII airwar mod. I've got the mod pretty much done, but I'm looking for unusual bits like this to make the mod more unique.

Ambreville
Mar 05, 2008, 06:24 PM
Surely it would be better to keep night bombing as you have it (a negative interception modifier), and instead of worrying about 'Night Fighters' just add Air Interception Radar as you're fighter promotion. It would cancel out (maybe not completely) the bombers night bombing bonus but would also help in daylight interception.

Perhaps you could have it as a free promotion for modern jet fighters to represent their onboard radars.

My project is not intended as a basic change to the standard game as it comes with a specific scenario. The trick with night units is that they pretty much operate separately from day units -- ergo, a night unit basically cannot be intercepted by a day unit. Although a night unit could technically intercept a day unit, I would disallow it on the grounds that its crew will be most likely sleeping during the day! :p

Xenomorph
Mar 06, 2008, 12:02 PM
My project is not intended as a basic change to the standard game as it comes with a specific scenario. The trick with night units is that they pretty much operate separately from day units -- ergo, a night unit basically cannot be intercepted by a day unit. Although a night unit could technically intercept a day unit, I would disallow it on the grounds that its crew will be most likely sleeping during the day! :p
That and night fighters are nowhere near as maneuverable as a day fighter, and as a result would just get torn to pieces by them.

Ambreville
Mar 06, 2008, 01:18 PM
That and night fighters are nowhere near as maneuverable as a day fighter, and as a result would just get torn to pieces by them.

Correct. These often (but not always*) consisted of obsolete aircraft that just wouldn't cut it in daylight warfare. I could make obsolete aircraft "upgradable" to the night version only (such as Blenheims and Me-110's). Another issue with this is I end up having to create two aircraft classes for a number of aircraft types (one day, one night).

(*) Example -- Beaufighter, Mosquito, Ju88, etc.

Ambreville
Mar 10, 2008, 06:54 PM
Anyone willing to undertake the coding on this option?

Portus
Mar 12, 2008, 05:58 PM
Maybe its stupid once i dont know modding, but well if you use in CIV4InvisibleInfos, INVISIBLE_STEALTH, or create a new one TYPE, you should make possible only night fighters see night bombers so you dont need nothing more them make it work like the submarines:blush:

Ambreville
Mar 12, 2008, 07:03 PM
Maybe its stupid once i dont know modding, but well if you use in CIV4InvisibleInfos, INVISIBLE_STEALTH, or create a new one TYPE, you should make possible only night fighters see night bombers so you dont need nothing more them make it work like the submarines:blush:

It's not stupid at all (at least I didn't think so when I tried that one).

Unfortunately, standard CIV4 interception mechanics completely ignore "invisible" aircraft. Otherwise yes, if it worked it would have been a great solution. In this case, all I would have needed was one Night Fighter unit class that is "invisible" to most other units, and one Night Bomber unit class that also is invisible to most units except to the Night Fighter. AA Guns & FLak88 would also be able to see Night Bombers (but not Night Fighters unfortunately due to the single XML tag line available for that -- small price to pay...)

Actually -- Hey Dom Pedro, if you're reading this... how tough would it be to make the game system ignore invisible air units???