Please

Portus

Warlord
Joined
May 17, 2005
Messages
121
Masters of knowledge take a little of your time, and help understand how it goes with units in a simple and direct way. Things like that

What are all that files mean ? (type, action)
What the relation betwen the main folder name and that filesnames?
what files can i rename?
Why most of new units have only 2, max 5 files only?

This is essencial to understand the next step, unit and art XMLs, and my experiments are unconclusivf:confused:

I realy appreciate. Tank you
 
Not so easy to make a short explanation for this.
But i will try:
-the folder assets\art\units\warrior includes the files that determin the look and the moves of the warrior

-the assets\art\interface\buttons\units includes the buttons of the units

-the file assets\xml\units\civ4unitclass.xml includes the unitclasses and how many units of a unitclass each civ is allowed to build.

-the file assets\xml\units\civ4unitinfos.xml determins the abilities of all units. There can be several units in one unitclass. For example: the unitclass cavalry includes the units cavalry and the russian cossak
 
-the file assets\xml\units\civ4formations.xml is not so important, but it produces errors if it includes an unit or unitclass that is not included in unitclass.xml and unitinfos.xml.

-the file assets\xml\art\artdefinesunit.xml link the unit to its nif , nif_FX (determins the form and include the links to the dds) and kfm (moves).

-in the folder assets\xml\text is the xml.file with pedia information of each unit and an xml.file that includes the translations of the unitnames.

The folder assets\xml\civilizations includes a big file with infos about the civilizations. The Unique units are mentioned here. At the end of this file is some text about the barbarian which include units. If you rename a unittype or unitclass you must change it also here.

Enough stuff for the moment:crazyeye:

but it's easier than it sounds;)
 
Portus said:
This is essencial to understand the next step, unit and art XMLs, and my experiments are unconclusivf:confused:
Well you see that's the thing, I think you should first understand the XML and just epxeriment adding new units using the existing graphics, and then move on to adding new unit graphics.

Still, let me address the specific questions you posted:

What are all that files mean?
NIF - this is the file that contains the model itself and references the textures. Both the regular and the xx_FX version are needed in most cases for the unit to properly work.
DDS - these are the texture files used by the model, i.e. the NIF file.
KFM - this file contains information about the animations that the unit/model has.
KF - these are the actual animations.

If you simply want some unit to have a different skin you can just modify the appropriate texture file (for example swordsman_128.dds for the swordsman unit) and put it in the appropriate folder in customassets (or if it's a mod it'll be assets folder), in this case it'll be art/units/swordsman. If you want, for example, to have two swordsmen using different skins, then you'll need to copy the swordsman NIF files together with the new texture into a different folder and reference that in the artdefines_unit file. Something like:
Code:
<NIF>Art/Units/Swordsman_2/Swordsman.nif</NIF>
<KFM>Art/Units/Swordsman/Swordsman.kfm</KFM>
<SHADERNIF>Art/Units/Swordsman_2/Swordsman_FX.nif</SHADERNIF>
Unless you're deep into unit modding you'll never need to copy the animation (KF, KFM) files, you can always refer to the original ones, or even different ones. Some units can use animations from other units, check out this thread for more detail. You also don't ever need to rename the NIF files themselves except to simply change their name, but you can freely do that, i.e. it won't ruin the file in any way except you'll of course need to change the entries in the XML files. Also, changing the name of the NIF files will not change what texture they use. I.e. swordsman.nif renamed to anything will still use the swordsman_128.dds as texture.

What the relation betwen the main folder name and that filesnames?
Absolutely none, as long as all the relevant XML entries have been changed you can change the names of the NIF files or the folders to anything. You cannot however change the texture names or the animation names.

what files can i rename?
Already answered that one. In general however, if you simply use the existing models or models you download for new units you shouldn't have any reason to rename any files.

Why most of new units have only 2, max 5 files only?
I assume you're referring to new units that people make. Most of these units don't have any new animations they simply use animations from existing units. So all they need to provide are the nif files and the textures. In these cases the author either specifies what animations the unit uses, or it's clear from the name of the file. For example some of my units that are just modifications of existing ones use the old unit's name, i.e. a warrior with a different weapon would still have the filenames warrior.nif and warrior_fx.nif, so it's obvious it should use warrior animation. Of course it does need to go into a different folder than the vanilla warrior. On the other hand snafusmith's or nautil's units (the tanks and the planes) usually have their own names but use animations from vanilla tank or fighter or jet fighter. In such cases the artdefines entry (part of it) should look something like this:
Code:
<NIF>Art/Units/nautilsplane/nautilsplane.nif</NIF>
<KFM>Art/Units/fighter/fighter.kfm</KFM>
<SHADERNIF>Art/Units/nautilsplane/nautilsplane.nif</SHADERNIF>
As you can see it doesn't have an _FX version, that means it doesn't support team colors. Some new units will come like that, others however will support team colors and in that case they'll have _FX version.

Finally there are some units that are complete and have all the files (including animations), in this case you just set them up like any other unit.

Hope this helps

P.S. You should've posted this in the main Creation forum and gave it a better title. :)
 
Chamaedrys said:
-the folder assets\art\units\warrior includes the files that determin the look and the moves of the warrior

concentrate in that files it goes directly to the point i want to start... Replace a default unit i.e change the look, and for what i presume only a DDS an NIF is needed and my questions start here. What is inside the DDS and NIF. If i mantain all the stuf ( XMLs, animations, sounds...)of say jet fighter and replace only the look (P-38 for example), should i mantain the main unit folder (art/unit/jet fighter)and rename only the new files, i made this and it not work, maybe its more complicated like it seems...i had read the add new unit tutorial but i belive to realy understant what im doing i may know what inside the art/unit/xxx folder.
Thought im trying make a relationship betwen civ4 and civ3 that i dominate but actualy im not cathing it:(
Tanks for replay


opps you replay while i write Rabbit, White, tank you very much and for "You should've posted this in the main Creation forum and gave it a better title" too, sorry to post here i have try it but no replays, a convincent title is the trick:)
 
This is very helpful. Maybe a moderator could change the thread title and make it a sticky? :D
 
Any chance to change the title of thread for something more appropriate
say "Quick unit files explanation"....
 
Rabbit,White,

Thanks for the very helpful info you shared in this thread and others. Also, the units you are creating are fantastic. All this is a great help to those of us who can't mod like you can, and I think the dozen or so of you folks who are sharing info and creating art, who are modding and encouraging modding, really are doing a fantastic job. So thanks.
 
Rabbit,
Very usefull for those that don't know. Might be a good idea to reword that post as a general tut and post it in the other forum.
 
Jeckel said:
Rabbit,
Very usefull for those that don't know. Might be a good idea to reword that post as a general tut and post it in the other forum.
I'm working on FAQ-like post but it's gonna take a while longer, with a new job I just don't have as much time as usual.
 
Rabbit said:
I'm working on FAQ-like post but it's gonna take a while longer, with a new job I just don't have as much time as usual.

Congrats on new job!!!! Since this is a kinda a question answering thread, I will ask a few questions:

1)I understand the keyframe flowchart to how to animate units to assign an action to a certain amount of keyframes. Can you customize those key frames that instead of haveing one frame for fortifying, and want to give it like 30 frames lets say, Can you do that?

2) I understand that you can create a KFM, which to my understanding organizes the order of every animation section on the timeline, I tried to follow the doc but got unfortunately lost, and since im a bit foreign to 3DS max, I was planning to do my modelling, skinning(envelopeing for 3ds max), and texturing in photoshop, and animation on the keyframe. After that i will export it Via .FBX and import it into max with animation and stuff. I wanted to create a KFM for the NIF and import it, How do i set up the master Dummy thingy(MD)?

3)For gun flares, i understand effects are used, can i create a sprite simulateing gunfire?

4)Just ut of curiousity, How do assign areas, i want to put team color on? A certain color on a texture?
 
Back
Top Bottom