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

how to disable embarkation for a certain unit?

Discussion in 'Civ5 - Creation & Customization' started by tac_NCVD, Feb 29, 2020.

  1. tac_NCVD

    tac_NCVD Chieftain

    Joined:
    Feb 29, 2020
    Messages:
    14
    Gender:
    Male
    For example, how to make China's ChuKoNu not getting the embarkation promotion even when it's owner have researched optics? Thx.
     
  2. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    Can't remember if promotions are tied to unit type, unit class or combat class, but if this can't be done in XML (and LeeS will be along later no doubt with the info), it can be done with Lua - see here and the CanHavePromotion GameEvent (pretty sure the bulk granting of embarkation promotions to existing units follows the standard code)
     
  3. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,756
    Location:
    Illinois, USA
    Code:
    	<UnitPromotions_UnitCombats>
    		<Row>
    			<PromotionType>PROMOTION_EMBARKATION</PromotionType>
    			<UnitCombatType>UNITCOMBAT_RECON</UnitCombatType>
    		</Row>
    		<Row>
    			<PromotionType>PROMOTION_EMBARKATION</PromotionType>
    			<UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
    		</Row>
    ……….
    Promotions that are attached to only some combat units but not others are generally done so by UnitCombatType rather than UnitType, so since all the "embarkation" promotions are specified in the <UnitPromotions_UnitCombats> table, they are all applied based on the Combat Type.

    The other method used is the Unit_FreePromotions table but that table is only really used for giving inherent "always on" promotions to specific UnitTypes. Unique Units are often given extra promotions that the remainder of their CombatType don't generally get, or in some cases certain generic units within a CombatType are given a promotion that the remainder of the units within that group don't get.

    <UnitPromotions_UnitCombats> does not directly give any promotion, it merely states which promotions are valid for which UnitCombatTypes. If a promotion is listed within this table as a general rule the promotion cannot be applied or else doesn't get implemented properly by the game for any other UnitCombatType. This table for example is used to limit which units qualify for the promotion given by the Great Lighthouse.

    Leader Traits that give free promotions to all their combat units essentially ignore the restrictions of the <UnitPromotions_UnitCombats> table, but the promotions given in table Trait_FreePromotionUnitCombats are still handed out based on the UnitCombatType.
     
    Last edited: Feb 29, 2020
  4. tac_NCVD

    tac_NCVD Chieftain

    Joined:
    Feb 29, 2020
    Messages:
    14
    Gender:
    Male
  5. tac_NCVD

    tac_NCVD Chieftain

    Joined:
    Feb 29, 2020
    Messages:
    14
    Gender:
    Male
    so... what can i actually do to disable embarkation for a certain unit? I am new to modding civ 5, and I can't find any example in the forum :(
     

Share This Page