SaibotLieh
Emperor
- Joined
- Sep 25, 2009
- Messages
- 1,576
The graphics of a unit are defined in the CIV4ArtDefines_Unit.xml file that can be found in ..\Sid Meier's Civilization 4\Beyond the Sword\Assets\XML\Art\ . I would not recommend modifying the original file though, but copy it into a mod folder, something like ...Sid Meier's Civilization 4\Beyond the Sword\Mods\MyMod\Assets\XML\Art\ for example. In the least I would make a back-up of the file.What would I have to do to replace the graphics (and sound) an existing unit in the base?
For example, let us say I wish to chance the graphics for "Mechanized Infantry" that appears in the game from an APC into an actual group of infantry, like, for example, kine100's Modern Infantry. What would be the simplest method to achieve this, the unit graphics, icon, and sound? Further what would I have to do to change all in game name instances of "Mechanized Infantry" to "Modern Infantry"?
Anyhow, in this file, you should be able to find the following entry:
Code:
<UnitArtInfo>
<Type>ART_DEF_UNIT_MECHANIZED_INFANTRY</Type>
<Button>,Art/Interface/Buttons/Units/MechanizedInfantry.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,8,8</Button>
<fScale>0.43</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/MechanizedInfantry/MechanizedInfantry.nif</NIF>
<KFM>Art/Units/MechanizedInfantry/MechanizedInfantry.kfm</KFM>
<SHADERNIF>Art/Units/MechanizedInfantry/MechanizedInfantry_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/MechInfantryShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<TrailDefinition>
<Texture>Art/Shared/tanktread.dds</Texture>
<fWidth>0.9</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_TANK</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_TANK</AudioRunTypeEnd>
</AudioRunSounds>
</UnitArtInfo>
Code:
<UnitArtInfo>
<Type>ART_DEF_UNIT_MECHANIZED_INFANTRY</Type>
<Button>,Art/Interface/Buttons/Units/Navy_Seal.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,4,7</Button>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/Unique/America/NavySEAL/NavySeal.nif</NIF>
<KFM>Art/Units/Unique/America/NavySEAL/NavySeal.kfm</KFM>
<SHADERNIF>Art/Units/Unique/America/NavySEAL/NavySeal_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.05</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIQUE_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>
Code:
<SHADERNIF>Art/Units/ModernInfantry/marine.nif</SHADERNIF>
The icon is defined by the <Button> line, so this could be changed to this:
Code:
<Button>Art/Interface/Buttons/Units/ModernInfantry.dds</Button>
To change the name, you will have to change the entry in the CIV4GameTextInfos_Objects.xml file you can find in ...\Sid Meier's Civilization 4\Assets\XML\Text\ . Change the entry
Code:
<TEXT>
<Tag>TXT_KEY_UNIT_MECHANIZED_INFANTRY</Tag>
<English>Mechanized Infantry</English>
<French>
<Text>Infanterie mécanisée</Text>
<Gender>Female</Gender>
<Plural>0</Plural>
</French>
<German><Text>Schützenpanzer:Schützenpanzers:Schützenpanzer:Schützenpanzer:Schützenpanzer:Schützenpanzer:Schützenpanzern:Schützenpanzer</Text><Gender>male:male:male:male:male:male:male:male</Gender><Plural>0:0:0:0:1:1:1:1</Plural></German>
<Italian>
<Text>Fanteria meccanizzata:Fanterie meccanizzate</Text>
<Gender>Female</Gender>
<Plural>0:1</Plural>
</Italian>
<Spanish>
<Text>Infantería mecanizada:Infanterías mecanizadas</Text>
<Gender>Female</Gender>
<Plural>0:1</Plural>
</Spanish>
</TEXT>
Good luck.