Complete total failure to add a unit.... help?

gentimjs

Chieftain
Joined
Aug 2, 2003
Messages
43
Location
NH - USA
Ok, Ive been trying for many hours to import a unit. I've followed about ten different tutorials (many on these forums) and so far none have worked.

At this point, all I care about is making the artwork "work" .. basically, I'm trying to add an exact copy of the normal Jet Fighter (stats wise) with the artwork of this unit:
http://forums.civfanatics.com/showthread.php?t=164872

Ive had many many failures, and the closest I got was an oversized version of the correct model replacing the jet fighter, but with the "icon" being a pink square,and the texture of the model being solid pink. After seemingly -any- edits to the XML, I get a slew of startup errors. I'm doing all of this inside a mod, which only adds a single new unit.

Can someone who has made this process work please post the relevant sections of thier XML files for referance? Again, I'm not real worried about editing stats and such (Ive been able to do that, and will explore it more in depth later) but just trying to get custom unit artwork to show up in-game...

Can anyone please post some working configs to use as a template?!
Assistance would be highly appreciated.
 
ok I have two suggestions, so use the one that would best fit what you're doing.

1. You can just create a new JetFighter folder in the Art Folder and drop the new art files in there. (this will replace the original Jet fighter assuming the filenames aren't different. If they are the same it will replace the Jet Fighter and if they aren't you'll have to point to them to make it change the original.)

OR

2. You can create a new Folder in the Art Folder and give it the name of Mig21 or whatever, and then add the art files to that folder.

Now, if you decide to do option 1 that's you'll need to change only the art ref, however, if you had to do option 2 follow this procedure next:

Open up the Civ4UnitInfos.xml file and add the new unitinfo in there as you wish it to be. Find this line:

<EarlyArtDefineTag>SOME DATA</EarlyArtDefineTag>
(The SOME DATA part isn't actually there... it could be anything that already exist so I put that as a random thing to just point out the parameter that needs to be changed.) ;)

Then change the SOME DATA part to: ART_DEF_UNIT_MIG21

Then open up the Civ4UnitClassInfos.xml and add the new unit class. (This part is easy.)

Then open up the Civ4ArtDefines_Unit.xml File and find this:

<UnitArtInfo>
<Type>ART_DEF_UNIT_JET_FIGHTER</Type>
<fScale>0.48</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/JetFighter/JetFighter.nif</NIF>
<KFM>Art/Units/JetFighter/JetFighter.kfm</KFM>
<SHADERNIF>Art/Units/JetFighter/JetFighter_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/JetFighterShadow.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>
<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>

Copy that and paste it after that entry or at the bottom of the file. (Doesn't really matter where.) And then change it to this:

<UnitArtInfo>
<Type>ART_DEF_UNIT_MIG21</Type>
<fScale>0.48</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/Mig21/mig21.nif</NIF>
<KFM></KFM>
<SHADERNIF>Art/Units/mig21/mig21.nif</SHADERNIF>

<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/JetFighterShadow.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>
<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>

The above lines in bold are the ones that have changed. It should work with this. I hope it helps. ;)

For Option 1, if you are just replacing the jetfighter, instead of copying the art ref just change the file it is pointing to. The above will work as well, but you'll also have to change the artref in the unitinfo file to make it work that way. I hope this is clear. If you have anymore problems I'll try to elaborate for you. ;)
 
IT WORKED!!! I cant express enough thanks!

Following your 2nd proceedure -exactly- gives me a nice green camo mig-21 flying in circles around my settler..

Now I just have to get past some game crashes trying to set it to be a UU ... ;-)
 
Back
Top Bottom