gelodgreat
Prince
Can someone help or make a mod about ignore borders to some units?
There is an effect - EFFECT_ADJUST_UNIT_ENTER_FOREIGN_LANDS and the modifiers
<ModifierId>MOD_ENTER_FOREIGN_LANDS</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_ENTER_FOREIGN_LANDS</ModifierType>
<Types>
<Row Type="ABILITY_CROSSBORDER" Kind="KIND_ABILITY"/>
</Types>
<TypeTags>
<Row Type="ABILITY_CROSSBORDER" Tag="CLASS_RECON"/>
</TypeTags>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_CROSSBORDER" Name="LOC_ABILITY_SAMURAI_NAME" Description="LOC_ABILITY_SAMURAI_DESCRIPTION"/>
</UnitAbilities>
<!-- -->
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_CROSSBORDER</UnitAbilityType>
<ModifierId>MOD_ENTER_FOREIGN_LANDS</ModifierId>
</Row>
</UnitAbilityModifiers>
confirmed it works. added these lines to UnitAbilities.xml to test
Code:<Types> <Row Type="ABILITY_CROSSBORDER" Kind="KIND_ABILITY"/> </Types> <TypeTags> <Row Type="ABILITY_CROSSBORDER" Tag="CLASS_RECON"/> </TypeTags> <UnitAbilities> <Row UnitAbilityType="ABILITY_CROSSBORDER" Name="LOC_ABILITY_SAMURAI_NAME" Description="LOC_ABILITY_SAMURAI_DESCRIPTION"/> </UnitAbilities> <!-- --> <UnitAbilityModifiers> <Row> <UnitAbilityType>ABILITY_CROSSBORDER</UnitAbilityType> <ModifierId>MOD_ENTER_FOREIGN_LANDS</ModifierId> </Row> </UnitAbilityModifiers>
Didn't bother changing text entries for test that's why they say samurai
are you wanting to make a mod, or just add the lines to the existing file?
Spoiler :<Row Type="ABILITY_CROSSBORDER" Kind="KIND_ABILITY"/> is what kind it is
<Row Type="ABILITY_CROSSBORDER" Tag="CLASS_RECON"/> is the unit class it will modify
<Row UnitAbilityType="ABILITY_CROSSBORDER" Name="LOC_ABILITY_SAMURAI_NAME" Description="LOC_ABILITY_SAMURAI_DESCRIPTION"/> is the actual ability
<UnitAbilityType>ABILITY_CROSSBORDER</UnitAbilityType>
<ModifierId>MOD_ENTER_FOREIGN_LANDS</ModifierId> is the modifier added to the ability
I am not always best at explaining things, so let me know if your asking something more specific.
The samurai was already in game, I just copied those line to make easier.
I only tried with scout should work with any class, would just have to add another tag under
<TypeTags> however, some units like subs have more than one class defined, and any unit with the same class would get same modification. maybe if you tried to use the CLASS_STEALTH tag would be best, don't think you would need both.
Also I believe ranger is same class as scout so should work for it too.