broken Promotion XML: CanMoveAllTerrain

jeffrockson

Chieftain
Joined
Feb 8, 2010
Messages
40
Location
USA
Hey everyone,

In the UnitPromotions table definition, there is an available column, CanMoveAllTerrain, that isn't used anywhere that my search through the Civ5 assets found.

That's not the bug. The bug is that it has no effect. I made two units, one with only a promotion with CanMoveAllTerrain true and one with no promotions. (So the first unit had no promotions besides that one, and that promotion only set CanMoveAllTerrain to true.) I moved them around on the map; they had no movement differences. The promoted unit couldn't move over mountains, couldn't move over water, and ended its turn when crossing a river. Their movement costs and possible locations were identical.

Spoiler :
Code:
<UnitPromotions>[INDENT]<Row>
[INDENT]<Type>PROMOTION_FLYING_UNIT</Type>
[I]<!-- For now, descriptions match the Helicopter Gunship's "Hovering Unit" promotion -->[/I]
<Description>TXT_KEY_PROMOTION_HOVERING_UNIT</Description>
<Help>TXT_KEY_PROMOTION_HOVERING_UNIT_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
[B]<CanMoveAllTerrain>true</CanMoveAllTerrain>[/B]
<PortraitIndex>58</PortraitIndex>
<IconAtlas>ABILITY_ATLAS</IconAtlas>
<PediaType>PEDIA_ATTRIBUTES</PediaType>
<PediaEntry>TXT_KEY_PEDIA_PROMOTION_HOVERING_UNIT</PediaEntry>[/INDENT]</Row>[/INDENT]</UnitPromotions>

<Unit_FreePromotions>[INDENT]<Row>
[INDENT][I]<!-- This is the test unit; I compared it with a nearly identical other test unit with NO promotions. -->[/I]
[I]<!-- Don't be confused by the name, it moves like a Horseman (as does the other test unit). -->[/I]
<UnitType>UNIT_HEAVY_BOMBER</UnitType>
<PromotionType>PROMOTION_FLYING_UNIT</PromotionType>[/INDENT]</Row>[/INDENT]</Unit_FreePromotions>

<Units>[INDENT][I]<!-- copied from regular UNITCLASS_BOMBER and modified to remove mission-based movement-->[/I]
<Row>
[INDENT]<Class>UNITCLASS_HEAVY_BOMBER</Class>
<Type>UNIT_HEAVY_BOMBER</Type>
<PrereqTech>TECH_RADAR</PrereqTech>
[I]<!-- no direct attack; omit cell "Combat" -->
<!--RangedCombat>30</RangedCombat-->[/I]
<Cost>780</Cost>
<Moves>5</Moves>
<Immobile>false</Immobile>  [I]<!-- moves around like a normal unit -->[/I]
[I]<!--Range>4</Range-->  <!-- no attack capabilities -->[/I]
<Special>SPECIALUNIT_FIGHTER</Special>
<CombatClass>UNITCOMBAT_HELICOPTER</CombatClass>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Description>TXT_KEY_UNIT_HEAVY_BOMBER</Description>
<Civilopedia>TXT_KEY_CIV5_HEAVY_BOMBER_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_HEAVY_BOMBER_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HELP_HEAVY_BOMBER</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
<Mechanized>true</Mechanized>
<AdvancedStartCost>100</AdvancedStartCost>
<AirUnitCap>1</AirUnitCap>
<CombatLimit>0</CombatLimit>
<RangedCombatLimit>100</RangedCombatLimit>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>2</XPValueDefense>
<UnitArtInfo>ART_DEF_UNIT_BOMBER</UnitArtInfo>
<UnitFlagIconOffset>64</UnitFlagIconOffset>
<PortraitIndex>18</PortraitIndex>
<IconAtlas>UNIT_ATLAS_2</IconAtlas>[/INDENT]</Row>[/INDENT]</Units>
So, that's the bug. I don't think it was intentional to have an unusable CanMoveAllTerrain column. I would really like to see this be enabled and have the effect that the unit can move over mountain, land, and water alike. A quick Google search showed it was used a bunch in Civ 4, and it will probably come in majorly handy in Civ5.

Thanks for reading,


JeffRockson
 
Have you tried granting PROMOTION_CAN_MOVE_IMPASSABLE to a unit. PROMOTION_CAN_MOVE_IMPASSABLE is the version the submarine uses to enter ice hexes. It appears PROMOTION_CAN_MOVE_IMPASSABLE is used by subs and PROMOTION_HOVERING_UNIT is used by helicopters. Both have CanMoveImpassable=true set. Maybe if you grant a unit both of these promotions and remove PROMOTION_EMBARKATION (this may cause issues) you could get a unit that does what you're looking for... then maybe not. :mad:
 
Have you tried granting PROMOTION_CAN_MOVE_IMPASSABLE to a unit. PROMOTION_CAN_MOVE_IMPASSABLE is the version the submarine uses to enter ice hexes. It appears PROMOTION_CAN_MOVE_IMPASSABLE is used by subs and PROMOTION_HOVERING_UNIT is used by helicopters. Both have CanMoveImpassable=true set. Maybe if you grant a unit both of these promotions and remove PROMOTION_EMBARKATION (this may cause issues) you could get a unit that does what you're looking for... then maybe not. :mad:

I was able to add CanMoveImpassable, IgnoreTerrainCost, and CanMoveAllTerrain, and it still does not allow movement across water (but it can move over mountains). On a separate attempt (seeing a similar comment in another post), I removed the Helicopter's Embark promotion, and it hovers over the water one square from land. It also has a very cool over-water animation!

There was one time when I had a helicopter that could go over water and move multiple hexes into the ocean. I started from there and have made incremental changes, but have completely failed to maintain the effect—I'm back to a helicopter that can't enter the ocean tile that (according to the blue movement hint) is in its range of movement.

Has anyone else been able to get the kind of air movement I'm trying to get?

Thanks for reading,
~JeffRockson
 
It will work on helicopters, or even land units.
The mod SteamPunk [BNW] uses it and it works well there.
It is used on Helicopter class units there.

He also added code to strip them from embarking when passing over water.
So a helicopter can now fly over the sea of japan if it wants to.
 
Top Bottom