1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Night Fighters vs Night Bombers

Discussion in 'Civ4 - Creation & Customization' started by Ambreville, Mar 3, 2008.

  1. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
    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)?
     
  2. Gaius Octavius

    Gaius Octavius Deity

    Joined:
    Jul 28, 2006
    Messages:
    4,016
    Okay, let's venture back into the fun world of XML. :D

    Code:
      <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>
    [B]  <iEvasionChange>25</iEvasionChange>[/B]
       <iWithdrawalChange>0</iWithdrawalChange>
       <iCargoChange>0</iCargoChange>
     [B]  <iCollateralDamageChange>0</iCollateralDamageChange>[/B]
       <iBombardRateChange>0</iBombardRateChange>
       <iFirstStrikesChange>0</iFirstStrikesChange>
       <iChanceFirstStrikesChange>0</iChanceFirstStrikesChange>
       <iEnemyHealChange>0</iEnemyHealChange>
       <iNeutralHealChange>0</iNeutralHealChange>
       <iFriendlyHealChange>0</iFriendlyHealChange>
       <iSameTileHealChange>0</iSameTileHealChange>
       <iAdjacentTileHealChange>0</iAdjacentTileHealChange>
    [B]  <iCombatPercent>0</iCombatPercent>[/B]
       <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:
     
  3. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
    OK, but how to make the "night bomber" interceptable by "night fighters" and not interceptable by other normal air units? :confused:
     
  4. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
  5. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
    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?
     
  6. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    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.
     
  7. EviltheMonkey

    EviltheMonkey One Primate Think Tank

    Joined:
    Dec 7, 2006
    Messages:
    85
    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.
     
  8. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
    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.
     
  9. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
    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
     
  10. Xenomorph

    Xenomorph King

    Joined:
    Oct 7, 2007
    Messages:
    972
    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.
     
  11. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
    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.
     
  12. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
  13. Portus

    Portus Warlord

    Joined:
    May 17, 2005
    Messages:
    121
    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:
     
  14. Ambreville

    Ambreville Deity

    Joined:
    Sep 28, 2006
    Messages:
    2,255
    Location:
    Windy City USA
    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???
     

Share This Page