All my modded units show up as spearman?

AW Arcaeca

Deus Vult
Joined
Mar 10, 2013
Messages
2,984
Location
Operation Padlock ground zero
Like, the flags and icons show up alright, but even though I have unit art defines they still show up as spearmen in game? Why?
The only clue I have are these lines from my Database.log file:
Code:
[83342.925] columns StrategicViewType, TileType are not unique
[83342.925] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
But doesn't every unit have the same tile type - "unit"? so why does it matter if it isn't unique?
I guess it's just the whole strategic view thing... I actually don't know what strategic view icons look like so I can't exactly make them, and I've seen a few other mods that use the same SV for their units as an already existing unit's, and their units show up fine...

Art defines can be coded with XML, right? So what am I doing wrong here?

(.txt file version of the xml)
 

Attachments

  • TakobaArtDefines.txt
    2.2 KB · Views: 242
Don't worry about that error message; it's from vanilla CiV without any mods. (For future reference, when a log complains about "not unique," it's saying that the columns--in this case StrategicViewType and TileType--can't have duplicate entries, e.g., you can't have two rows for ART_DEF_UNIT_TAKOBA with TileType Unit in the ArtDefine_StrategicView table; but you could technically have an ART_DEF_UNIT_TAKOBA with a different TileType).

You XML looks OK at first glance. Are your model's art files (.dds, .fxsxml, .gr2) added to the mod and set to VFS=true? Does the UnitArtInfo entry for your add to the Units table reference ART_DEF_UNIT_TAKOBA?
 
*sigh* No, I guess that's the one thing I always forget to do. I'm glad somebody remembers.
 
I'm having the same kind of issue here. Just getting Spearmen instead of a slightly smaller Helicopter which is what I was intending. All I did was change the name to fit my replacer UU, and altered the fScale from 0.1 to 0.08. Aside from that it's a carbon copy of the basic Helicopter Gunship info. I have this setup in 1 file, have VFS set to true and reload unit graphics is checked. I'm very new to this so I don't know what I'm missing. Here are the relivent sections from the files I'm using, any help would be much appreciated.

Spoiler :
Code:
	<ArtDefine_UnitInfos>
		<Row>
			<Type>ART_DEF_UNIT_HUNTER_KILLER</Type>
			<DamageStates>1</DamageStates>
		</Row>
	</ArtDefine_UnitInfos>
	<ArtDefine_UnitInfoMemberInfos>
		<Row>
			<UnitInfoType>ART_DEF_UNIT_HUNTER_KILLER</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_HUNTERKILLER</UnitMemberInfoType>
			<NumMembers>1</NumMembers>
		</Row>
	</ArtDefine_UnitInfoMemberInfos>
	<ArtDefine_UnitMemberInfos>
		<Row>
			<Type>ART_DEF_UNIT_MEMBER_HUNTERKILLER</Type>
			<Scale>0.08</Scale>
			<Domain>Hover</Domain>
			<Model>Assets/Units/HelicopterGunship/HelicopterGunship.fxsxml</Model>
			<MaterialTypeTag>METAL</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>METALLRG</MaterialTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberInfos>
	<ArtDefine_UnitMemberCombats>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_HUNTERKILLER</UnitMemberType>
			<EnableActions>Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady</EnableActions>
			<HasShortRangedAttack>1</HasShortRangedAttack>
			<HasRefaceAfterCombat>1</HasRefaceAfterCombat>
		</Row>
	</ArtDefine_UnitMemberCombats>
	<ArtDefine_UnitMemberCombatWeapons>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_HUNTERKILLER</UnitMemberType>
			<Index>0</Index>
			<SubIndex>0</SubIndex>
			<VisKillStrengthMin>1.0</VisKillStrengthMin>
			<VisKillStrengthMax>1.0</VisKillStrengthMax>
			<HitEffect>ART_DEF_VEFFECT_GUNSHIP_MACHINE_GUN_HIT_$(TERRAIN)</HitEffect>
			<WeaponTypeTag>BULLETHC</WeaponTypeTag>
			<WeaponTypeSoundOverrideTag>BULLETHC</WeaponTypeSoundOverrideTag>
		</Row>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_HUNTERKILLER</UnitMemberType>
			<Index>0</Index>
			<SubIndex>1</SubIndex>
			<ID>PROJECTILE</ID>
			<VisKillStrengthMin>10.0</VisKillStrengthMin>
			<VisKillStrengthMax>15.0</VisKillStrengthMax>
			<ProjectileSpeed>4.0</ProjectileSpeed>
			<WeaponTypeTag>EXPLOSIVE</WeaponTypeTag>
			<WeaponTypeSoundOverrideTag>EXPLOSION20POUND</WeaponTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberCombatWeapons>
	<ArtDefine_StrategicView>
		<Row>
			<StrategicViewType>ART_DEF_UNIT_HUNTER_KILLER</StrategicViewType>
			<TileType>Unit</TileType>
			<Asset>SV_HelicopterGunship.dds</Asset>
		</Row>
	</ArtDefine_StrategicView>

Ignore this. Whatever was wrong seems to be fixed now.
 
What was your solution to the problem, Chainsgohr?

Kinda struggling with the same problem here. Everything should be OK and checked, still spearmen... :(
 
Kinda struggling with the same problem here. Everything should be OK and checked, still spearmen... :(
Coincidentally, this is something I proposed to make a list of possible causes for in the "New modder help" thread:

My mod's units are just showing up like spearmen!
  • Have you checked the Reload Unit Box in Modbuddy?
  • Are all the unit animation files imported into VFS?
  • Does the unit correctly reference the unit art defines?
  • Are any typos made or invalid columns used in the unit art defines?
  • Are the unit art defines given an UpdateDatabase entry?
 
I wonder why the game defaults back to Spearman graphics of all units. Somehow Warrior would have made more sense to me. :p
 
@Hypereon

I honestly don't know. The code I posted for correction is in fact no different from the code I am currently using. If I had to guess I'd say I must have not saved my work properly before loading or something else mundane to that effect that I just somehow overlooked. It's working just fine now. If you could post the code you're having issues with I could take a look. Not that I'm an authority (far from it), but I might see something or hopefully someone wiser than myself will take a look as well.
 
Top Bottom