[HELP]UnitArtInfo ignored

Lord Alderaan

Chieftain
Joined
Oct 8, 2009
Messages
73
For some strange reason a custom unit I made works perfectly except it ignores the UnitArtInfo tag.

Using the code below the unit still uses the art of a caravel instead of a carrier.

Code:
<GameData>
	<Units>
		<Row>
			<Class>UNITCLASS_CARAVEL</Class>
			<Type>UNIT_INDIAMAN</Type>
			<PrereqTech>TECH_ASTRONOMY</PrereqTech>
			<Combat>15</Combat>
			<RangedCombat>10</RangedCombat>
			<Cost>100</Cost>
			<Moves>8</Moves>
			<HurryCostModifier>30</HurryCostModifier>
			<Range>2</Range>
			<CombatClass>UNITCOMBAT_NAVAL</CombatClass>
			<Domain>DOMAIN_SEA</Domain>
			<DefaultUnitAI>UNITAI_EXPLORE_SEA</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_INDIAMAN</Description>
			<Civilopedia>TXT_KEY_CIVILOPEDIA_UNITS_RENAISSANCE_INDIAMAN_TEXT</Civilopedia>
			<Strategy>TXT_KEY_UNIT_INDIAMAN_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_HELP_INDIAMAN</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Pillage>true</Pillage>
			<Mechanized>true</Mechanized>
			<ObsoleteTech>TECH_ELECTRICITY</ObsoleteTech>
			<AdvancedStartCost>50</AdvancedStartCost>
			<MinAreaSize>20</MinAreaSize>
			<XPValueAttack>3</XPValueAttack>
			<XPValueDefense>3</XPValueDefense>
			<UnitArtInfo>ART_DEF_UNIT_CARRIER</UnitArtInfo>
			<UnitFlagIconOffset>42</UnitFlagIconOffset>
			<IconAtlas>UNIT_ATLAS_1</IconAtlas>
			<PortraitIndex>43</PortraitIndex>
			<MoveRate>BOAT</MoveRate>
		</Row>
	</Units>

Can anybody see any reason why?
 
<Class>UNITCLASS_CARAVEL</Class>

Change this in every place on your mod. Because it is named the exact same as another unit, it's loading those definitions.
 
LOL

I solved it. Believe or not it was because I had two versions (v2 as on the Mod Browser and v3 my WIP) of the mod in the mod directory. I had only the v3 mod enabled in-game but I guess it still somehow conflicted with v2.

@Garett20: Yeah, I was trying to get the carrier art to load instead of the caravel art.
@Justicex: The unit in question is a unique unit replacing the caravel for the Dutch, hence the caravel class.
 
Back
Top Bottom