Embarkation Issue

Sythian Bard

Chieftain
Joined
Dec 3, 2015
Messages
4
I have a unit I'm working on that is capable of traversing land and sea without Embarking. The unit works fine until I learn the tech that enables land unit embarkation. At that point the unit now embarks when passing onto a water tile.

What is the proper code to stop this?

I've looked at other mods and civ v units that do not 'embark' when passing onto water tiles, but I can't see a common line of code that would mimic this.

Code for Unit

Spoiler :

Code:
<GameData>
	<Units>
		<Row>
			<Class>UNITCLASS_HORSEMAN</Class>
			<Type>UNIT_ANGEL_GUARDIAN</Type>
			<Combat>25</Combat>
			<Cost>2000</Cost>
			<FaithCost>1500</FaithCost>
			<RequiresFaithPurchaseEnabled>true</RequiresFaithPurchaseEnabled>
			<Moves>5</Moves>
			<CombatClass>UNITCOMBAT_MOUNTED</CombatClass>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_FAST_ATTACK</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_ANGEL_GUARDIAN</Description>
			<Civilopedia>TXT_KEY_CIV5_ANGEL_GUARDIAN_TEXT</Civilopedia>
			<Strategy>TXT_KEY_UNIT_ANGEL_GUARDIAN_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_HELP_ANGEL_GUARDIAN</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Pillage>true</Pillage>
			<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
			<AdvancedStartCost>1</AdvancedStartCost>
			<WorkRate>200</WorkRate>
			<XPValueAttack>10</XPValueAttack>
			<XPValueDefense>10</XPValueDefense>
			<UnitArtInfo>ART_DEF_UNIT_U_POLISH_WINGED_HUSSAR</UnitArtInfo>
			<UnitFlagAtlas>EXPANSION2_UNIT_FLAG_ATLAS</UnitFlagAtlas>
			<UnitFlagIconOffset>20</UnitFlagIconOffset>
			<IconAtlas>CIV_COLOR_ATLAS_LEONIUS</IconAtlas>
			<PortraitIndex>2</PortraitIndex>
			<MoveRate>QUADRUPED</MoveRate>
		</Row>
	</Units>

	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_SYTHIANS</CivilizationType>
			<UnitClassType>UNITCLASS_HORSEMAN</UnitClassType>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
		</Row>
	</Civilization_UnitClassOverrides>

	<Unit_AITypes>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<UnitAIType>UNITAI_ATTACK</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<UnitAIType>UNITAI_FAST_ATTACK</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<UnitAIType>UNITAI_DEFENSE</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<UnitAIType>UNITAI_EXPLORE</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<UnitAIType>UNITAI_WORKER</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<UnitAIType>UNITAI_COUNTER</UnitAIType>
		</Row>
	</Unit_AITypes>

	<Unit_Builds>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_ROAD</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_RAILROAD</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_FARM</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_MINE</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_TRADING_POST</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_LUMBERMILL</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_PASTURE</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_CAMP</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_PLANTATION</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_QUARRY</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_WELL</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_FORT</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_REMOVE_JUNGLE</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_REMOVE_MARSH</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_REMOVE_FOREST</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_SCRUB_FALLOUT</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_REPAIR</BuildType>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<BuildType>BUILD_REMOVE_ROUTE</BuildType>
		</Row>
	</Unit_Builds>

	<Unit_Flavors>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<FlavorType>FLAVOR_OFFENSE</FlavorType>
			<Flavor>16</Flavor>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<FlavorType>FLAVOR_DEFENSE</FlavorType>
			<Flavor>12</Flavor>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<FlavorType>FLAVOR_AIR</FlavorType>
			<Flavor>8</Flavor>
		</Row>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<FlavorType>FLAVOR_RECON</FlavorType>
			<Flavor>4</Flavor>
		</Row>
	</Unit_Flavors>

	<Unit_FreePromotions>
		<Row>
			<UnitType>UNIT_ANGEL_GUARDIAN</UnitType>
			<PromotionType>PROMOTION_GUARDIAN_VALOR</PromotionType>
		</Row>
	</Unit_FreePromotions>
	
</GameData>

Unit Free Promotion Code
[SPOILER]
<GameData>
	<!-- The Angel Guardian's Unique Free Promotion -->

	<UnitPromotions>
		<Row>
			<Type>PROMOTION_GUARDIAN_VALOR</Type>
			<Description>TXT_KEY_PROMOTION_GUARDIAN_VALOR</Description>
			<Help>TXT_KEY_PROMOTION_GUARDIAN_VALOR_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<CannotBeChosen>true</CannotBeChosen>
			<OrderPriority>1</OrderPriority>
			<VisibilityChange>5</VisibilityChange>
			<CanMoveImpassable>true</CanMoveImpassable>
			<CanMoveAllTerrain>true</CanMoveAllTerrain>
			<IgnoreTerrainCost>true</IgnoreTerrainCost>
			<FreePillageMoves>true</FreePillageMoves>
			<ExtraAttacks>1</ExtraAttacks>
			<PortraitIndex>23</PortraitIndex>
			<IconAtlas>PROMOTION_ATLAS</IconAtlas>
			<PediaType>PEDIA_GUARDIAN_VALOR</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_GUARDIAN_VALOR</PediaEntry>
		</Row>
	</UnitPromotions>

</GameData>
[/SPOILER]


Thanks for taking the time to help out!
 
That was it! Thank you, Nutty.

Actually, it's still doing it. I don't understand. I changed it and did a test run. It worked just fine. But just now playing through, it's embarking again. Is this just a bug? I've noticed that sometimes when I 'name' a unit during an promotion I lose some of the modified statistics given to the unit, such as moves and strength. Is this a common problem with mods?

Okay, it's because the promotion doesn't attach to a unit until you pass into owned territory. So, even with DOMAIN_HOVER the promotion still goes into effect.

BUT!!! I tried using DOMAIN_SEA and it worked. The unit still receives the promotion tag when entering friendly territory, but upon entering a water tile from a land tile, the unit does NOT change to a boat. So, this work around is doing the job for me. Hope this helps someone else!
 
Back
Top Bottom