Cannot find art

IbnSina

Former Lurker
Joined
Jul 1, 2003
Messages
525
Location
fsa
Sorry to trouble you. I have added some units to a personal mod, and they work great... except that the game cannot find the art for anything. Every unit looks like a spearman, though it has all the stats and such that I assigned for game play. I used Kael's tutorial as my guide, but I note now that the moderators have indicated that it has much out of date. My current attempt used Gedemon's XML as a template, but... still no joy. At this point I am at a loss to understand what is modern, what is not, and generally how I have gone wrong. I would appreciate any help anyone can give.

Part of the current XML follows. Incidentally, I know many people prefer modding the SQL directly, and I know SQL, but I like the organized look of the XML. Personal preferences...

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 7/20/2016 6:40:46 PM -->
<GameData>
	<ArtDefine_UnitInfos>
		<Row>
			<Type>ART_DEF_UNIT_MOD_MERCENARY</Type>
			<DamageStates>1</DamageStates>
			<Formation>Barbarian</Formation>
		</Row>
	</ArtDefine_UnitInfos>

	<ArtDefine_UnitInfoMemberInfos>
		<Row>
			<UnitInfoType>ART_DEF_UNIT_MOD_MERCENARY</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_MERCENARY</UnitMemberInfoType>
			<NumMembers>9</NumMembers>
		</Row>
	</ArtDefine_UnitInfoMemberInfos>

	<ArtDefine_UnitMemberInfos>
		<Row>
			<Type>ART_DEF_UNIT_MEMBER_MERCENARY</Type>
			<Scale>0.14</Scale>
			<Model>Assets/Units/Art/halberdier/halberdier.fxsxml</Model>
			<MaterialTypeTag>METAL</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>METALSM</MaterialTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberInfos>

	<ArtDefine_UnitMemberCombats>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_MERCENARY</UnitMemberType>
			<EnableActions>Idle Attack RunCharge AttackCity Death BombardDefend Run Fortify CombatReady</EnableActions>
			<DisableActions></DisableActions>
			<HasShortRangedAttack>1</HasShortRangedAttack>
			<HasRefaceAfterCombat>0</HasRefaceAfterCombat>
			<HasIndependentWeaponFacing>1</HasIndependentWeaponFacing>
		</Row>
	</ArtDefine_UnitMemberCombats>

	<ArtDefine_UnitMemberCombatWeapons>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_MERCENARY</UnitMemberType>
			<Index>0</Index>
			<SubIndex>0</SubIndex>
			<VisKillStrengthMin>10</VisKillStrengthMin>
			<VisKillStrengthMax>20</VisKillStrengthMax>
			<WeaponTypeTag>METAL</WeaponTypeTag>
			<WeaponTypeSoundOverrideTag>SWORD</WeaponTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberCombatWeapons>
</GameData>
 
No such file as "Assets/Units/Art/halberdier/halberdier.fxsxml" in the base game that I can see, so if this is a custom model, make sure you have all the correct attributes on your files (typically VFS=true) - see the third link in my sig
 
Thanks for the reply. Yeah, that's right. This was a new unit I was trying to add (thanks Zwei833!), and I put it in that directory. My biggest problem was confusion over differences between Kael's discussion of unit art and Gedemon's.

It turns out that I got this to work last night. I used an SQL tool to view the actual databases, got the column names and so on, and compared my data with what the game saw for other comparable units. I have modified my code to show what was needed to make it work.

For future reference, I can say that Gedemon's tutorial is correct. Kael's tutorial is fine for the unit behavior definitions and promotions and such, but his discussion of the art defines is now obsolete.
 
Top Bottom