kingchris20
Wisdom Seeker
I'm having trouble applying the eagle warrior ability to my leader's unique trait.
Here is the code I have:
and here is all the relevant code for an eagle warrior
I don't see what I'm missing, it all looks to be coded exactly the same way with the exception that I am trying to apply it to all of my leader's land melee units.
Here is the code I have:
Spoiler :
Code:
<GameData>
<Types>
<Row Type="LEADER_KC20_TES_UMARIL" Kind="KIND_LEADER"/>
<Row Type="LEADER_KC20_TES_UMARIL_TRAIT" Kind="KIND_TRAIT"/>
<Row Type="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Kind="KIND_ABILITY"/>
</Types>
<TypeTags>
<Row Type="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Tag="CLASS_LIGHT_CAVALRY"/>
<Row Type="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Tag="CLASS_RANGED_CAVALRY"/>
<Row Type="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Tag="CLASS_RECON"/>
<Row Type="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Tag="CLASS_MELEE"/>
<Row Type="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Tag="CLASS_ANTI_CAVALRY"/>
<Row Type="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Tag="CLASS_HEAVY_CAVALRY"/>
<Row Type="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Tag="CLASS_HEAVY_CHARIOT"/>
</TypeTags>
<Leaders>
<Row LeaderType="LEADER_KC20_TES_UMARIL" Name="LOC_LEADER_KC20_TES_UMARIL_NAME" InheritFrom="LEADER_DEFAULT" SceneLayers="4"/>
</Leaders>
<LeaderTraits>
<Row LeaderType="LEADER_KC20_TES_UMARIL" TraitType="LEADER_KC20_TES_UMARIL_TRAIT"/>
</LeaderTraits>
<Traits>
<Row TraitType="LEADER_KC20_TES_UMARIL_TRAIT" Name="LOC_TRAIT_LEADER_KC20_TES_UMARIL_TRAIT_NAME" Description="LOC_TRAIT_LEADER_KC20_TES_UMARIL_TRAIT_DESCRIPTION"/>
</Traits>
<TraitModifiers>
<Row>
<TraitType>LEADER_KC20_TES_UMARIL_TRAIT</TraitType>
<ModifierId>TRAIT_UMARIL_CAPTURE_COMBAT_UNITS_AS_BUILDERS</ModifierId>
</Row>
</TraitModifiers>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS" Name="LOC_ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS_NAME" Description="LOC_ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS_DESCRIPTION" Inactive="true"/>
</UnitAbilities>
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS</UnitAbilityType>
<ModifierId>UMARIL_CAPTURE_COMBAT_UNITS_AS_SLAVES</ModifierId>
</Row>
</UnitAbilityModifiers>
<Modifiers>
<Row>
<ModifierId>TRAIT_UMARIL_CAPTURE_COMBAT_UNITS_AS_BUILDERS</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER</ModifierType>
</Row>
<Row>
<ModifierId>TRAIT_UMARIL_CAPTURE_COMBAT_UNITS_AS_BUILDERS_MODIFIER</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNITS_GRANT_ABILITY</ModifierType>
</Row>
<Row>
<ModifierId>UMARIL_CAPTURE_COMBAT_UNITS_AS_SLAVES</ModifierId>
<ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_CAPTURE</ModifierType>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>TRAIT_UMARIL_CAPTURE_COMBAT_UNITS_AS_BUILDERS</ModifierId>
<Name>ModifierId</Name>
<Value>TRAIT_UMARIL_CAPTURE_COMBAT_UNITS_AS_BUILDERS_MODIFIER</Value>
</Row>
<Row>
<ModifierId>TRAIT_UMARIL_CAPTURE_COMBAT_UNITS_AS_BUILDERS_MODIFIER</ModifierId>
<Name>AbilityType</Name>
<Value>ABILITY_KC20_TES_UMARIL_CAPTURE_COMBAT_UNITS</Value>
</Row>
<Row>
<ModifierId>UMARIL_CAPTURE_COMBAT_UNITS_AS_SLAVES</ModifierId>
<Name>CanCapture</Name>
<Value>true</Value>
</Row>
<Row>
<ModifierId>UMARIL_CAPTURE_COMBAT_UNITS_AS_SLAVES</ModifierId>
<Name>UnitType</Name>
<Value>UNIT_BUILDER</Value>
</Row>
</ModifierArguments>
<ModifierStrings>
<Row ModifierId="UMARIL_CAPTURE_COMBAT_UNITS_AS_SLAVES" Context="Preview" Text="LOC_ABILITY_CAPTIVE_WORKERS_MODIFIER_DESCRIPTION"/>
</ModifierStrings>
</GameData>
and here is all the relevant code for an eagle warrior
Spoiler :
Code:
<GameData>
<Types>
<Row Type="CIVILIZATION_AZTEC" Kind="KIND_CIVILIZATION"/>
<Row Type="TRAIT_CIVILIZATION_UNIT_AZTEC_EAGLE_WARRIOR" Kind="KIND_TRAIT" />
<Row Type="UNIT_AZTEC_EAGLE_WARRIOR" Kind="KIND_UNIT"/>
<Row Type="ABILITY_CAPTIVE_WORKERS" Kind="KIND_ABILITY"/>
</Types>
<TypeTags>
<Row Type="UNIT_AZTEC_EAGLE_WARRIOR" Tag="CLASS_MELEE"/>
<Row Type="UNIT_AZTEC_EAGLE_WARRIOR" Tag="CLASS_CAPTURE_WORKER"/>
<Row Type="ABILITY_CAPTIVE_WORKERS" Tag="CLASS_CAPTURE_WORKER"/>
</TypeTags>
<Civilizations>
<Row CivilizationType="CIVILIZATION_AZTEC" Name="LOC_CIVILIZATION_AZTEC_NAME" Description="LOC_CIVILIZATION_AZTEC_DESCRIPTION" Adjective="LOC_CIVILIZATION_AZTEC_ADJECTIVE" StartingCivilizationLevelType="CIVILIZATION_LEVEL_FULL_CIV" RandomCityNameDepth="10"/>
</Civilizations>
<CivilizationTraits>
<Row CivilizationType="CIVILIZATION_AZTEC" TraitType="TRAIT_CIVILIZATION_UNIT_AZTEC_EAGLE_WARRIOR"/>
</CivilizationTraits>
<Traits>
<Row TraitType="TRAIT_CIVILIZATION_UNIT_AZTEC_EAGLE_WARRIOR" Name="LOC_TRAIT_CIVILIZATION_UNIT_AZTEC_EAGLE_WARRIOR_NAME"/>
</Traits>
<Units>
<Row UnitType="UNIT_AZTEC_EAGLE_WARRIOR" BaseMoves="2" Cost="65" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_LAND" FormationClass="FORMATION_CLASS_LAND_COMBAT" Name="LOC_UNIT_AZTEC_EAGLE_WARRIOR_NAME" Description="LOC_UNIT_AZTEC_EAGLE_WARRIOR_DESCRIPTION" PurchaseYield="YIELD_GOLD" PromotionClass="PROMOTION_CLASS_MELEE" Combat="28" TraitType="TRAIT_CIVILIZATION_UNIT_AZTEC_EAGLE_WARRIOR" MandatoryObsoleteTech="TECH_GUNPOWDER"/>
</Units>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_CAPTIVE_WORKERS" Name="LOC_ABILITY_CAPTIVE_WORKERS_NAME" Description="LOC_ABILITY_CAPTIVE_WORKERS_DESCRIPTION"/>
</UnitAbilities>
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_CAPTIVE_WORKERS</UnitAbilityType>
<ModifierId>CAPTURE_COMBAT_UNITS_AS_WORKERS</ModifierId>
</Row>
</UnitAbilityModifiers>
<Modifiers>
<Row>
<ModifierId>CAPTURE_COMBAT_UNITS_AS_WORKERS</ModifierId>
<ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_CAPTURE</ModifierType>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>CAPTURE_COMBAT_UNITS_AS_WORKERS</ModifierId>
<Name>CanCapture</Name>
<Value>true</Value>
</Row>
<Row>
<ModifierId>CAPTURE_COMBAT_UNITS_AS_WORKERS</ModifierId>
<Name>UnitType</Name>
<Value>UNIT_BUILDER</Value>
</Row>
</ModifierArguments>
<ModifierStrings>
<Row ModifierId="CAPTURE_COMBAT_UNITS_AS_WORKERS" Context="Preview" Text="LOC_ABILITY_CAPTIVE_WORKERS_MODIFIER_DESCRIPTION"/>
</ModifierStrings>
</GameData>
I don't see what I'm missing, it all looks to be coded exactly the same way with the exception that I am trying to apply it to all of my leader's land melee units.