thelijah
Chieftain
So I've been trying to make a unit that can hover over all terrain (land, sea, mountain, and ice).
I didn't want to create a new thread, but I've only been able to gather limited information from threads loosely related to this, and it hasn't helped much. I hope this is the right forum.
Based on what I've been finding, people have only been able to succeed at creating a new land unit that can hover over land, mountain, ice, and coast but no ocean. So I changed my desired "hovering" unit's domain to sea (to fix the ocean problem) and added the following promotions as suggested (to allow it to traverse on land).
I added the following promotions;
The PROMOTION_MOVEALL contains
My UNIT_HOVERING shows up in the game fine, along with other units I've created.
The PROMOTION_MOVEALL appears in the game fine, along with other promotions I created in the same document, it just doesn't provide the expected function.
I initially was using <CanMoveAllTerrain>, but I learned that promotion is broken.
I don't know if I'm going at it wrong, or if what I'm trying to do is blocked by hardcode, but if anyone knows how to fix this or has another [non-extreme] method to get what I'm trying to do done, I'm all ears.
Thanks in advance.
I didn't want to create a new thread, but I've only been able to gather limited information from threads loosely related to this, and it hasn't helped much. I hope this is the right forum.
Based on what I've been finding, people have only been able to succeed at creating a new land unit that can hover over land, mountain, ice, and coast but no ocean. So I changed my desired "hovering" unit's domain to sea (to fix the ocean problem) and added the following promotions as suggested (to allow it to traverse on land).
Spoiler :
<Units>
<Row>
<Type>UNIT_HOVERING</Type>
<!-- I created this class in a separate document -->
<Class>UNITCLASS_CAPITAL</Class>
<PrereqTech>TECH_AGRICULTURE</PrereqTech>
<Combat>90</Combat>
<RangedCombat>50</RangedCombat>
<Cost>1000</Cost>
<Moves>5</Moves>
<Range>2</Range>
<CombatClass>UNITCOMBAT_NAVAL</CombatClass>
<Domain>DOMAIN_SEA</Domain>
<DefaultUnitAI>UNITAI_CARRIER_SEA</DefaultUnitAI>
<Description>TXT_KEY_UNIT_STARDESTROYER</Description>
<Civilopedia>TXT_KEY_UNIT_STARDESTROYER_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_STARDESTROYER_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_STARDESTROYER_HELP</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>false</Pillage>
<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
<Mechanized>true</Mechanized>
<AdvancedStartCost>100</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<SpecialCargo>SPECIALUNIT_FIGHTER</SpecialCargo>
<DomainCargo>DOMAIN_AIR</DomainCargo>
<UnitArtInfo>ART_DEF_UNIT_SMOKEY_STEAM_AIRSHIP</UnitArtInfo>
<MoveRate>BOAT</MoveRate>
<UnitFlagIconOffset>8</UnitFlagIconOffset>
<UnitFlagAtlas>EXPANSION_SCEN_UNIT_FLAG_ATLAS</UnitFlagAtlas>
<PortraitIndex>8</PortraitIndex>
<IconAtlas>EXPANSION_SCEN_UNIT_ATLAS</IconAtlas>
</Row>
</Units>
<Row>
<Type>UNIT_HOVERING</Type>
<!-- I created this class in a separate document -->
<Class>UNITCLASS_CAPITAL</Class>
<PrereqTech>TECH_AGRICULTURE</PrereqTech>
<Combat>90</Combat>
<RangedCombat>50</RangedCombat>
<Cost>1000</Cost>
<Moves>5</Moves>
<Range>2</Range>
<CombatClass>UNITCOMBAT_NAVAL</CombatClass>
<Domain>DOMAIN_SEA</Domain>
<DefaultUnitAI>UNITAI_CARRIER_SEA</DefaultUnitAI>
<Description>TXT_KEY_UNIT_STARDESTROYER</Description>
<Civilopedia>TXT_KEY_UNIT_STARDESTROYER_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_STARDESTROYER_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_STARDESTROYER_HELP</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>false</Pillage>
<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
<Mechanized>true</Mechanized>
<AdvancedStartCost>100</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<SpecialCargo>SPECIALUNIT_FIGHTER</SpecialCargo>
<DomainCargo>DOMAIN_AIR</DomainCargo>
<UnitArtInfo>ART_DEF_UNIT_SMOKEY_STEAM_AIRSHIP</UnitArtInfo>
<MoveRate>BOAT</MoveRate>
<UnitFlagIconOffset>8</UnitFlagIconOffset>
<UnitFlagAtlas>EXPANSION_SCEN_UNIT_FLAG_ATLAS</UnitFlagAtlas>
<PortraitIndex>8</PortraitIndex>
<IconAtlas>EXPANSION_SCEN_UNIT_ATLAS</IconAtlas>
</Row>
</Units>
I added the following promotions;
Spoiler :
<Unit_FreePromotions>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_CARGO_III</PromotionType>
</Row
<!-- Custom promotion I made to allow travel over land, mountain, and ice -->
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_MOVEALL</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_NO_DEFENSIVE_BONUSES</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_ONLY_DEFENSIVE</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_NO_CAPTURE</PromotionType>
</Row>
<!-- I doubt both of the following are necessary together, but I'm not worried about them right now. -->
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_FLAT_MOVEMENT_COST</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_IGNORE_TERRAIN_COST</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_CARGO_III</PromotionType>
</Row
<!-- Custom promotion I made to allow travel over land, mountain, and ice -->
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_MOVEALL</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_NO_DEFENSIVE_BONUSES</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_ONLY_DEFENSIVE</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_NO_CAPTURE</PromotionType>
</Row>
<!-- I doubt both of the following are necessary together, but I'm not worried about them right now. -->
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_FLAT_MOVEMENT_COST</PromotionType>
</Row>
<Row>
<UnitType>UNIT_HOVERING</UnitType>
<PromotionType>PROMOTION_IGNORE_TERRAIN_COST</PromotionType>
</Row>
The PROMOTION_MOVEALL contains
Spoiler :
<Row>
<Type>PROMOTION_MOVEALL</Type>
<Description>TXT_KEY_PROMOTION_MOVEALL</Description>
<Help>TXT_KEY_PROMOTION_MOVEALL_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<OrderPriority>2</OrderPriority>
<HoveringUnit>1</HoveringUnit>
<CanMoveImpassable>1</CanMoveImpassable>
<PortraitIndex>58</PortraitIndex>
<IconAtlas>ABILITY_ATLAS</IconAtlas>
<PediaType>PEDIA_ATTRIBUTES</PediaType>
<PediaEntry>TXT_KEY_PEDIA_PROMOTION_MOVEALL</PediaEntry>
</Row>
<Type>PROMOTION_MOVEALL</Type>
<Description>TXT_KEY_PROMOTION_MOVEALL</Description>
<Help>TXT_KEY_PROMOTION_MOVEALL_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<OrderPriority>2</OrderPriority>
<HoveringUnit>1</HoveringUnit>
<CanMoveImpassable>1</CanMoveImpassable>
<PortraitIndex>58</PortraitIndex>
<IconAtlas>ABILITY_ATLAS</IconAtlas>
<PediaType>PEDIA_ATTRIBUTES</PediaType>
<PediaEntry>TXT_KEY_PEDIA_PROMOTION_MOVEALL</PediaEntry>
</Row>
My UNIT_HOVERING shows up in the game fine, along with other units I've created.
The PROMOTION_MOVEALL appears in the game fine, along with other promotions I created in the same document, it just doesn't provide the expected function.
I initially was using <CanMoveAllTerrain>, but I learned that promotion is broken.
I don't know if I'm going at it wrong, or if what I'm trying to do is blocked by hardcode, but if anyone knows how to fix this or has another [non-extreme] method to get what I'm trying to do done, I'm all ears.
Thanks in advance.