kingchris20
Wisdom Seeker
My leader trait is supposed to grant his naval units an ability to heal from kills. This works; however the ability is also applied to any kind of unit from any civilization so long as a naval unit from my leader is present anywhere on the map.
How can I make it so that this ability is only applied to my leader's naval units?
I have a similar leader trait for a different leader that is working properly and only applying to his naval units
How can I make it so that this ability is only applied to my leader's naval units?
Code:
<GameData>
<Types>
<Row Type="LEADER_KC20_BLACK_BART" Kind="KIND_LEADER"/>
<Row Type="HEAL_FROM_NAVAL_KILLS_TRAIT" Kind="KIND_TRAIT"/>
<Row Type="ABILITY_HEAL_FROM_NAVAL_KILLS" Kind="KIND_ABILITY"/>
</Types>
<Leaders>
<Row LeaderType="LEADER_KC20_BLACK_BART" Name="LOC_LEADER_KC20_BLACK_BART_NAME" InheritFrom="LEADER_DEFAULT" SceneLayers="4"/>
</Leaders>
<LeaderTraits>
<Row LeaderType="LEADER_KC20_BLACK_BART" TraitType="HEAL_FROM_NAVAL_KILLS_TRAIT"/>
</LeaderTraits>
<Traits>
<Row TraitType="HEAL_FROM_NAVAL_KILLS_TRAIT" Name="LOC_TRAIT_LEADER_KC20_BLACK_BART_NAME" Description="LOC_TRAIT_LEADER_KC20_BLACK_BART_DESCRIPTION"/>
</Traits>
<TraitModifiers>
<Row TraitType="HEAL_FROM_NAVAL_KILLS_TRAIT" ModifierId="LEADER_KC20_BLACK_BART_HEAL_FROM_NAVAL_KILLS_TRAIT"/>
</TraitModifiers>
<Modifiers>
<!-- Modifiers for Leader Trait-->
<Row>
<ModifierId>LEADER_KC20_BLACK_BART_HEAL_FROM_NAVAL_KILLS_TRAIT</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNITS_GRANT_ABILITY</ModifierType>
<Permanent>true</Permanent>
</Row>
<!-- Modifiers for Leader Trait Unit Abilities-->
<Row>
<ModifierId>HEAL_FROM_NAVAL_KILLS</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNITS_ADJUST_HEAL_FROM_COMBAT</ModifierType>
</Row>
</Modifiers>
<ModifierArguments>
<!-- Modifier Arguments for Leader Trait -->
<Row>
<ModifierId>LEADER_KC20_BLACK_BART_HEAL_FROM_NAVAL_KILLS_TRAIT</ModifierId>
<Name>AbilityType</Name>
<Value>ABILITY_HEAL_FROM_NAVAL_KILLS</Value>
</Row>
<!-- Modifier Arguments for Leader Trait Unit Abilities-->
<Row>
<ModifierId>HEAL_FROM_NAVAL_KILLS</ModifierId>
<Name>Amount</Name>
<Value>100</Value>
</Row>
</ModifierArguments>
<TypeTags>
<Row Type="ABILITY_HEAL_FROM_NAVAL_KILLS" Tag="CLASS_NAVAL_RAIDER"/>
<Row Type="ABILITY_HEAL_FROM_NAVAL_KILLS" Tag="CLASS_NAVAL_MELEE"/>
<Row Type="ABILITY_HEAL_FROM_NAVAL_KILLS" Tag="CLASS_NAVAL_RANGED"/>
<Row Type="ABILITY_HEAL_FROM_NAVAL_KILLS" Tag="CLASS_NAVAL_CARRIER"/>
</TypeTags>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_HEAL_FROM_NAVAL_KILLS" Name="LOC_ABILITY_HEAL_FROM_NAVAL_KILLS_NAME" Description="LOC_ABILITY_HEAL_FROM_NAVAL_KILLS_DESCRIPTION"/>
</UnitAbilities>
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_HEAL_FROM_NAVAL_KILLS</UnitAbilityType>
<ModifierId>HEAL_FROM_NAVAL_KILLS</ModifierId>
</Row>
</UnitAbilityModifiers>
</GameData>
I have a similar leader trait for a different leader that is working properly and only applying to his naval units
Spoiler :
Code:
<GameData>
<Types>
<Row Type="LEADER_KC20_BLACKBEARD" Kind="KIND_LEADER"/>
<Row Type="PURE_INTIMIDATION_TRAIT" Kind="KIND_TRAIT"/>
<Row Type="ABILITY_PURE_INTIMIDATION" Kind="KIND_ABILITY"/>
</Types>
<Leaders>
<Row LeaderType="LEADER_KC20_BLACKBEARD" Name="LOC_LEADER_KC20_BLACKBEARD_NAME" InheritFrom="LEADER_DEFAULT" SceneLayers="4"/>
</Leaders>
<LeaderTraits>
<Row LeaderType="LEADER_KC20_BLACKBEARD" TraitType="PURE_INTIMIDATION_TRAIT"/>
</LeaderTraits>
<Traits>
<Row TraitType="PURE_INTIMIDATION_TRAIT" Name="LOC_TRAIT_LEADER_KC20_BLACKBEARD_NAME" Description="LOC_TRAIT_LEADER_KC20_BLACKBEARD_DESCRIPTION"/>
</Traits>
<TraitModifiers>
<Row TraitType="PURE_INTIMIDATION_TRAIT" ModifierId="LEADER_KC20_BLACKBEARD_PURE_INTIMIDATION_TRAIT"/>
</TraitModifiers>
<Modifiers>
<!-- Modifiers for Leader Trait-->
<Row>
<ModifierId>LEADER_KC20_BLACKBEARD_PURE_INTIMIDATION_TRAIT</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNITS_GRANT_ABILITY</ModifierType>
<Permanent>true</Permanent>
</Row>
<!-- Modifiers for Leader Trait Unit Abilities-->
<Row>
<ModifierId>PURE_INTIMIDATION_NEGATIVE_COMBAT</ModifierId>
<ModifierType>MODIFIER_ALL_UNITS_ATTACH_MODIFIER</ModifierType>
<SubjectRequirementSetId>PURE_INTIMIDATION_AT_WAR_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
<ModifierId>PURE_INTIMIDATION_NEGATIVE_COMBAT_MODIFIER</ModifierId>
<ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType>
</Row>
</Modifiers>
<ModifierArguments>
<!-- Modifier Arguments for Leader Trait -->
<Row>
<ModifierId>LEADER_KC20_BLACKBEARD_PURE_INTIMIDATION_TRAIT</ModifierId>
<Name>AbilityType</Name>
<Value>ABILITY_PURE_INTIMIDATION</Value>
</Row>
<!-- Modifier Arguments for Leader Trait Unit Abilities-->
<Row>
<ModifierId>PURE_INTIMIDATION_NEGATIVE_COMBAT</ModifierId>
<Name>ModifierId</Name>
<Value>PURE_INTIMIDATION_NEGATIVE_COMBAT_MODIFIER</Value>
</Row>
<Row>
<ModifierId>PURE_INTIMIDATION_NEGATIVE_COMBAT_MODIFIER</ModifierId>
<Name>Amount</Name>
<Value>-5</Value>
</Row>
</ModifierArguments>
<ModifierStrings>
<Row ModifierId="PURE_INTIMIDATION_NEGATIVE_COMBAT_MODIFIER" Context="Preview" Text="LOC_ABILITY_PURE_INTIMIDATION_NEGATIVE_COMBAT_MODIFIER_DESCRIPTION"/>
</ModifierStrings>
<RequirementSets>
<Row>
<RequirementSetId>PURE_INTIMIDATION_AT_WAR_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<RequirementSetRequirements>
<Row>
<RequirementSetId>PURE_INTIMIDATION_AT_WAR_REQUIREMENTS</RequirementSetId>
<RequirementId>PURE_INTIMIDATION_UNIT_AT_WAR_REQUIREMENTS</RequirementId>
</Row>
</RequirementSetRequirements>
<Requirements>
<Row>
<RequirementId>PURE_INTIMIDATION_UNIT_AT_WAR_REQUIREMENTS</RequirementId>
<RequirementType>REQUIREMENT_PLOT_ADJACENT_TO_OWNER_AT_WAR</RequirementType>
</Row>
</Requirements>
<RequirementArguments>
<Row>
<RequirementId>PURE_INTIMIDATION_UNIT_AT_WAR_REQUIREMENTS</RequirementId>
<Name>MinDistance</Name>
<Value>1</Value>
</Row>
<Row>
<RequirementId>PURE_INTIMIDATION_UNIT_AT_WAR_REQUIREMENTS</RequirementId>
<Name>MaxDistance</Name>
<Value>3</Value>
</Row>
</RequirementArguments>
<TypeTags>
<Row Type="ABILITY_PURE_INTIMIDATION" Tag="CLASS_NAVAL_RAIDER"/>
<Row Type="ABILITY_PURE_INTIMIDATION" Tag="CLASS_NAVAL_MELEE"/>
<Row Type="ABILITY_PURE_INTIMIDATION" Tag="CLASS_NAVAL_RANGED"/>
<Row Type="ABILITY_PURE_INTIMIDATION" Tag="CLASS_NAVAL_CARRIER"/>
</TypeTags>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_PURE_INTIMIDATION" Name="LOC_ABILITY_PURE_INTIMIDATION_NAME" Inactive="true" Description="LOC_ABILITY_PURE_INTIMIDATION_DESCRIPTION"/>
</UnitAbilities>
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_PURE_INTIMIDATION</UnitAbilityType>
<ModifierId>PURE_INTIMIDATION_NEGATIVE_COMBAT</ModifierId>
</Row>
</UnitAbilityModifiers>
</GameData>
Last edited: