Unit models not working...

DuskDancer

Chieftain
Joined
Jul 8, 2012
Messages
29
Okay, so I just jumped on the forums recently, but I wouldn't call myself new to modding (I've been modding Warlords for years, and Beyond the Sword for the last few months). However, I've been well and truly stumped by a problem I've been having trying to get custom models in-game.

I've had NifSkope for awhile because I've used it for modding Axis & Allies (the 2004 RTS game). So I was overjoyed when I saw that Civ IV uses NIFs. I've edited some of the default models, added them to the CIV4ArtDefines_Unit.xml, and gotten them to work with my units. Of course, I only got on the forums and saw the myriad of custom models...last night. And I had to try them. I'm particularly fond of those models by Snafusmith (they're bloody brilliant, mate), but when I try to add them in-game, I get...nothing. The models are all the default (Modern Armor for Leopard and Challenger; Bomber model for C-130; Stealth Bomber model for B52). I'm trying to add the Stratofort, C-130, Leopard 2A6, and Challenger (I'm trying to add the Leopard as a unique unit; the Challenger as an alternate-model replacement for Modern Armor; and the Stratofort and C-130 as new units).

Spoiler :
<UnitArtInfo>
<Type>ART_DEF_UNIT_MAIN_BATTLE_TANK_CHALLENGER</Type>
<Button>,Art/Interface/Buttons/Units/ModernArmor.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,1,11</Button>
<fScale>0.57</fScale>
<fInterfaceScale>0.9</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/ChallengerMBT/ChallengerII.nif</NIF>
<KFM>Art/Units/ChallengerMBT/ChallengerII.kfm</KFM>
<SHADERNIF>Art/Units/ModernArmor/ModernArmor_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/ModernArmorShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<TrailDefinition>
<Texture>Art/Shared/tanktread.dds</Texture>
<fWidth>0.8</fWidth>
<fLength>180.0</fLength>
<fTaper>0.0</fTaper>
<fFadeStartTime>0.2</fFadeStartTime>
<fFadeFalloff>0.35</fFadeFalloff>
</TrailDefinition>
<fBattleDistance>0.5</fBattleDistance>
<fRangedDeathTime>0.12</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop>LOOPSTEP_MOD_ARMOUR</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_MOD_ARMOUR</AudioRunTypeEnd>
</AudioRunSounds>
<SelectionSound>AS3D_UN_MOD_ARMOUR_HEAL</SelectionSound>
<ActionSound>AS3D_UN_MOD_ARMOUR_HEAL</ActionSound>
</UnitArtInfo>


Spoiler :
<UnitArtInfo>
<Type>ART_DEF_UNIT_MAIN_BATTLE_TANK_LEOPARD</Type>
<Button>,Art/Interface/Buttons/Units/ModernArmor.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,1,11</Button>
<fScale>0.58</fScale>
<fInterfaceScale>0.9</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/LeopardMBT/Leopard2A6.nif</NIF>
<KFM>Art/Units/LeopardMBT/Leopard2A6.kfm</KFM>
<SHADERNIF>Art/Units/ModernArmor/ModernArmor_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/ModernArmorShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<TrailDefinition>
<Texture>Art/Shared/tanktread.dds</Texture>
<fWidth>0.8</fWidth>
<fLength>180.0</fLength>
<fTaper>0.0</fTaper>
<fFadeStartTime>0.2</fFadeStartTime>
<fFadeFalloff>0.35</fFadeFalloff>
</TrailDefinition>
<fBattleDistance>0.5</fBattleDistance>
<fRangedDeathTime>0.12</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop>LOOPSTEP_MOD_ARMOUR</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_MOD_ARMOUR</AudioRunTypeEnd>
</AudioRunSounds>
<SelectionSound>AS3D_UN_MOD_ARMOUR_HEAL</SelectionSound>
<ActionSound>AS3D_UN_MOD_ARMOUR_HEAL</ActionSound>
</UnitArtInfo>


Spoiler :
<UnitArtInfo>
<Type>ART_DEF_UNIT_LONG_RANGE_BOMBER</Type>
<Button>,Art/Units/LongRangeBomber/B52Button.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,8,10</Button>
<fScale>0.52</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/LongRangeBomber/B52.nif</NIF>
<KFM>Art/Units/StealthBomber/StealthBomber.kfm</KFM>
<SHADERNIF>Art/Units/StealthBomber/StealthBomber_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/StealthBomberShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.7</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bSmoothMove>1</bSmoothMove>
<fBankRate>0.35</fBankRate>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
<PatrolSound>AS3D_UN_JET_PATROL</PatrolSound>
<SelectionSound>AS3D_UN_JET_COMMAND_PATROL</SelectionSound>
<ActionSound>AS3D_UN_JET_COMMAND_PATROL</ActionSound>
</UnitArtInfo>


Spoiler :
<UnitArtInfo>
<Type>ART_DEF_UNIT_AIR_TRANSPORT</Type>
<Button>,Art/Interface/Buttons/Actions/Airlift.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,4,10</Button>
<fScale>0.52</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/AirTransport/C130.nif</NIF>
<KFM>Art/Units/Bomber/Bomber.kfm</KFM>
<SHADERNIF>Art/Units/Bomber/Bomber_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/BomberShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.75</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bSmoothMove>1</bSmoothMove>
<fBankRate>0.35</fBankRate>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
<PatrolSound>AS3D_UN_FIGHTER_PATROL</PatrolSound>
<SelectionSound>AS3D_UN_FIGHTER_COMMAND_PATROL</SelectionSound>
<ActionSound>AS3D_UN_FIGHTER_COMMAND_PATROL</ActionSound>
</UnitArtInfo>


I've no idea what I'm doing wrong. Anyone know what it is?
 
You also have to replace the SHADERNIF entries.
If the custom unit doesn't have a _fx.nif, then just put the normal .nif file into this definition.


As background: Civ uses high and low quality models, depending on graphics settings. The normal .nif are the low quality models, the shadernif are the high quality models. You probably can't see the new units, because your settings are higher than "low", and so you see the shadernif entries.
 
Well, that makes...all kinds of sense. I did not know that about the ShaderNIF entries. Thank you very much! (I tested it and it most-assuredly works).
 
Back
Top Bottom