(Help)How to allow scout , ranger, submarine to ignore borders?

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>

where can i find it?

Edit: I find thin in UnitAbilities.xml
ABILITY_RELIGIOUS_ENTER_FOREIGN_LANDS
 
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
 
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

can u explain this to me? i dont get where ABILITY_CROSSBORDER comes from because i cant see it on the xml. plus is the "LOC_ABILITY_SAMURAI_NAME " the modifier of the unit?

EDIT: can u explain me the structure? thanks :) i get that the ABILITY_CROSSBORDER is your new modified ability and you can add? + how can i reference the scouts,subs?
 
Last edited:
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.
 
Last edited:
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.

i want to make a mod. for submarines,scout,ranger and etc

EDIT: So your code earlier works for the scout or samurai only?
 
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.
 
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.

Thanks im going to make a mod with this :D
 
Back
Top Bottom