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

Units can move over mountains trait?

Discussion in 'Mod Creation Help' started by Falk Bruskeland, Oct 29, 2018.

  1. Falk Bruskeland

    Falk Bruskeland Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    Code:
    Code:
        <Terrains>
            <Update>
                <Where TerrainType="TERRAIN_GRASS_MOUNTAIN" CivilizationType="CIVILIZATION_FEB_CARTHAGE"/>
                <Set MovementCost="5" Impassable="0" DefenseModifier="3" />
            </Update>
            <Update>
                <Where TerrainType="TERRAIN_PLAINS_MOUNTAIN" CivilizationType="CIVILIZATION_FEB_CARTHAGE"/>
                <Set MovementCost="5" Impassable="0" DefenseModifier="3" />
            </Update>
            <Update>
                <Where TerrainType="TERRAIN_DESERT_MOUNTAIN" CivilizationType="CIVILIZATION_FEB_CARTHAGE"/>
                <Set MovementCost="5" Impassable="0" DefenseModifier="3" />
            </Update>
            <Update>
                <Where TerrainType="TERRAIN_TUNDRA_MOUNTAIN" CivilizationType="CIVILIZATION_FEB_CARTHAGE"/>
                <Set MovementCost="5" Impassable="0" DefenseModifier="3" />
            </Update>
            <Update>
                <Where TerrainType="TERRAIN_SNOW_MOUNTAIN" CivilizationType="CIVILIZATION_FEB_CARTHAGE"/>
                <Set MovementCost="5" Impassable="0" DefenseModifier="3" />
            </Update>
        </Terrains>
    Looked at the "Passable Mountains" mod, so credits to the creators!
    Anyways, it does work without the CivilizationType, but even if it would work, everyone could do it! (i think)

    So my question is how to make only one civilization able to move on mountains.

    Thanks in advance!
     
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,766
    Location:
    Illinois, USA
    Table Terrains has no column called CivilizationType, so you cannot just jam it in there and expect it to work. The only way you'd be able to accomplish this is probably via a unit ability that is given to a specific leader's or civilization's units via a Trait that Leader or Civilization has. But I'm not sure there's a modifier-type that allows units to cross impassable terrain.

    and yes, when using Donald's Passable Mountains mod, every player can enter mountain tiles because the mountain tiles themselves are no longer set to be impassable.
     
    epiplexis likes this.
  3. Falk Bruskeland

    Falk Bruskeland Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    Thank you for the response.
     
  4. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,049
    Location:
    London, UK
    Leugi's Jose de San Martin has an LUA allowing Mounted Units to move through Mountains. I'm not sure it works but you could take a look.
     
    raen likes this.
  5. Falk Bruskeland

    Falk Bruskeland Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    Thank you very much!
     
  6. S1AL

    S1AL Chieftain

    Joined:
    Jun 17, 2018
    Messages:
    13
    Gender:
    Male
    From the Cartography effect:

    EFFECT_ADJUST_UNIT_VALID_TERRAIN

    You'll have to test the specifics, but I'd assume that's the only way to do it.
     
  7. Falk Bruskeland

    Falk Bruskeland Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    oOOh. Thank you. Looks like I can use this to other things too!
     

Share This Page