[Please help] UnitArtInfo not working

TheLunarArmy

Chieftain
Joined
Jul 9, 2014
Messages
59
Location
South-Africa
Hi,

I've run into a problem with loading a custom unit for a unique scout I'm making.
For some reason the <UnitArtInfo> doesn't load the art def I want and it keeps defaulting to the spearman. Just as a test I created a new XML with the exact stats for the scout (model and all), except I edited the Type to match my unqiue unit: The Skraeling.

Spoiler :
Code:
<GameData>
	<ArtDefine_UnitInfos>
		<Row>
[COLOR="Red"]			<Type>ART_DEF_UNIT_SKRAELING</Type>[/COLOR]
			<DamageStates>1</DamageStates>
			<Formation>Scout</Formation>
		</Row>
	</ArtDefine_UnitInfos>
	<ArtDefine_UnitInfoMemberInfos>
		<Row>
[COLOR="Red"]			<UnitInfoType>ART_DEF_UNIT_SKRAELING</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_SKRAELING</UnitMemberInfoType>[/COLOR]
			<NumMembers>6</NumMembers>
		</Row>
	</ArtDefine_UnitInfoMemberInfos>
	<ArtDefine_UnitMemberInfos>
		<Row>
[COLOR="Red"]			<Type>ART_DEF_UNIT_MEMBER_SKRAELING</Type>[/COLOR]
			<Scale>0.140000000596046</Scale>
			<Model>Assets/Units/Scout/Scout.fxsxml</Model>
			<MaterialTypeTag>CLOTH</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>FLESH</MaterialTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberInfos>
	<ArtDefine_UnitMemberCombats>
		<Row>
			[COLOR="Red"]<UnitMemberType>ART_DEF_UNIT_MEMBER_SKRAELING</UnitMemberType>[/COLOR]
			<EnableActions>Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady Walk AttackCharge</EnableActions>
			<ShortMoveRadius>12.0</ShortMoveRadius>
			<ShortMoveRate>0.349999994039536</ShortMoveRate>
			<TargetHeight>8.0</TargetHeight>
			<HasRefaceAfterCombat>1</HasRefaceAfterCombat>
		</Row>
	</ArtDefine_UnitMemberCombats>
	<ArtDefine_UnitMemberCombatWeapons>
		<Row>
			[COLOR="Red"]<UnitMemberType>ART_DEF_UNIT_MEMBER_SKRAELING</UnitMemberType>[/COLOR]
			<Index>0</Index>
			<SubIndex>0</SubIndex>
			<WeaponTypeTag>BLUNT</WeaponTypeTag>
			<WeaponTypeSoundOverrideTag>SPEAR</WeaponTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberCombatWeapons>
	<ArtDefine_StrategicView>
		<Row>
			[COLOR="Red"]<StrategicViewType>ART_DEF_UNIT_SKRAELING</StrategicViewType>[/COLOR]
			<TileType>Unit</TileType>
			<Asset>SV_Scout.dds</Asset>
		</Row>
	</ArtDefine_StrategicView>
  
</GameData>

Additionally I changed the <UnitArtInfo> in the unit definition.

Spoiler :
Code:
<Row>
			<Class>UNITCLASS_SCOUT</Class>
			<Type>UNIT_CANADIAN_SKRAELING</Type>
			<Combat>6</Combat>
			<Cost>1</Cost>
			<FaithCost>0</FaithCost>
			<RequiresFaithPurchaseEnabled>false</RequiresFaithPurchaseEnabled>
			<Moves>2</Moves>
			<CombatClass>UNITCOMBAT_RECON</CombatClass>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_EXPLORE</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_CANADIAN_SKRAELING</Description>
			<Civilopedia>TXT_KEY_UNIT_CANADIAN_SKRAELING_TEXT</Civilopedia>
			<Strategy>TXT_KEY_UNIT_CANADIAN_SKRAELING_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_HELP_CANADIAN_SKRAELING</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Pillage>true</Pillage>
			<NoBadGoodies>true</NoBadGoodies>
			<ObsoleteTech>TECH_SCIENTIFIC_THEORY</ObsoleteTech>
			<GoodyHutUpgradeUnitClass>UNITCLASS_ARCHER</GoodyHutUpgradeUnitClass>
			<HurryCostModifier>-1</HurryCostModifier>
			<AdvancedStartCost>-1</AdvancedStartCost>
			<XPValueAttack>3</XPValueAttack>
			<XPValueDefense>3</XPValueDefense>
			[COLOR="Red"]<UnitArtInfo>ART_DEF_UNIT_SKRAELING</UnitArtInfo>[/COLOR]
			<UnitFlagAtlas>EXPANSION2_UNIT_FLAG_ATLAS</UnitFlagAtlas>
			<UnitFlagIconOffset>14</UnitFlagIconOffset>
			<IconAtlas>EXPANSION2_UNIT_ATLAS</IconAtlas>
			<PortraitIndex>14</PortraitIndex>
		</Row>

So when I update/enable my mod, I check the database and I can clearly see it's loaded, no problem.

Spoiler :


But when I run and make a Skraeling I get a darn spearman!

Spoiler :


I'm sure I'm missing one small thing, please help. Thank you!
 
Top Bottom