View Full Version : [TUT] Using NIF Viewer to edit units (long)


Rabbit, White
Mar 17, 2006, 04:53 PM
Editing units with NIF (Scene) Viewer - Link to PDF version (http://forums.civfanatics.com/downloads.php?do=file&id=994)

Introduction

The NIF Viewer that comes with the 3ds max plugins (http://forums.civfanatics.com/showthread.php?t=159481) (SceneViewer.exe) allows you not only to view the files but also to edit them a little – you can remove or add objects, and you can change some of their properties. While limited at first glance, with a little bit of creativity you can create a lot of variations of units, and if you have even the most basic 3ds max skills then there are even more possibilities (just check out the units in my sig).

In this tutorial I will go over how to edit units using the NIF viewer, in particular how to remove and add stuff and how to give one unit a weapon from another unit. All the things I talk about I learned by trial and error working with the viewer, which means that there is probably tons of stuff missing, so if you know something I don’t, or have discovered a better way to do something, don’t hesitate to post about it. Also, while in this tutorial I primarily deal with the civ4 units, all these things can be applied when adding object that you created yourself in 3ds max.

A word about terminology. A unit is the complete civ4 unit. A model is the primary “actor” in that unit – the guy holding a sword, riding a horse, etc. A mesh or an object is any additional part of the unit that is not part of the model (but rather attached to it), e.g. sword, rifle, shield, quiver in some cases, etc.

Finally, this is a fairly detailed tutorial (I want to cover as many potential questions as possible :)), but it’s not necessarily basic. For example, I'm assuming that you’re familiar in general with Civ4 modding.

Preparation

Download the 3ds max plugins (http://forums.civfanatics.com/showthread.php?t=159481), if you have 3ds max 6 or 7+ then download the appropriate version and unzip directly into max’s root directory. If you don’t have 3ds max then download any version and unzip wherever.

Once unzipped find the files BoundShape.nif and BoundShape.tga. For any unit you wish to open in the NIF viewer you will need to have these two files in the same folder as that unit (for convenience you can copy these two files into all the unit folders in the civ4 installation directory).

UPDATE: If you get a missing MFC71.DLL dll error, just google it. The first link points to a site where you can download it with isntructions on where to put it.

Ok, now we can start messing with files…

NIF Viewer’s interface

Make a copy of the swordsman unit. It’s easiest to just make a copy of the entire swordsman folder into your project directory but strictly speaking you only need the two [unitname].nif and [unitname]_fx.nif files (swordsman.nif and swordsman_fx.nif in this case) and all the textures. The KF and KFM files are animations, which we can’t do anything with using the NIF Viewer, so they’re not needed. Open the NIF viewer and open the swordsman.nif file.

Ok, the most important part of the interface is the scene graph tree on the right. This is where you do all your unit modifications. It’s a hierarchical representation of the unit with all of its components. It’s composed of two types of nodes – NiNodes, which I will refer to as nodes, and NiTriShapes (and in some cases NiTriStripes), which I will refer to as shapes. The shapes are the actual physical objects in the units – weapon, piece of equipment, the model itself. The nodes are more versatile – they act as containers for shapes, as dummy objects to mark attachment points on bones, and some contain information that allows the unit to use outside resources, such as sounds. Both nodes and shapes have information about their position and orientation, both relative and absolute. Finally, while nodes can contain shapes and other nodes, shapes cannot contain anything.

http://img507.imageshack.us/img507/355/tut2img10hv.th.jpg (http://img507.imageshack.us/my.php?image=tut2img10hv.jpg)

There is also the scene graph list, which allows you to quickly find the necessary objects (instead of opening every branch in the tree), as well as texture and performance statistics, which are useful but are not needed for this tutorial.

Figuring out what you can do

Since the most basic thing that you’ll use the viewer for (besides viewing :)) is to remove objects, you need to know what exactly you can remove. Go into selection mode (the mouse cursor button at the top) and click one of the swordsman’s swords (try saying that five times fast), you will notice that the tree opened up and has the sword’s shape selected. Now click the shield, same thing. Now, click the shoulder pads – notice that the shape selected is the swordsman himself. In fact, if you search through the entire tree you will not find a shape for the shoulder pads. That means that the shoulder pads are part of the model and cannot be removed. If you really want them gone you’ll have to recreate the unit from scratch.

So, you can only remove or add things that are separate shapes. Anything that’s part of the model itself cannot be removed or replaced. Other than recreating the model, the best you can do is cover that up with something else, but that’s not always appropriate.

Removing the Swordsman’s shield

I don’t know why but people don’t seem to like the shield, I guess they want the swordsman to suffer more :), so we’ll remove it. It’s literally a three click process. Click on the shield to select it. Go to the scene graph tree (tree from now on) and right click on either the Swordsman_Shield node, or the shape that is contained in it. Click on remove. Done. Now all you have to do is save.

In this particular case you could’ve remove either the node or the shape, however make note that it’s not always appropriate to remove the parent node of a shape (i.e. you should only remove the shape). Sometimes, the parent node will contain other shapes or nodes, but even when it doesn’t, it might contain some information necessary for correct functioning of the unit. If you get into the habit of removing the nodes instead of the shapes and notice that something weird is happening with your latest unit then the first thing to do is try to only remove the shape and not its parent node.

Adding objects from other units

Ok, let’s give the swordsman a different sword, say from a knight. While the swordsman is open, click the add file button and load up knight.nif. Side note: When merging objects from two different files I usually prefer to match the files, i.e. to swordsman.nif add sword from knight.nif, and to swordsman_fx.nif add sword from knight_fx.nif. I don’t know how necessary it is but it doesn’t cost you anything. :)

After you added the knight to swordsman you will see both models together. Go into selection mode, and click the knight’s sword and then the swordsman’s sword. This will open up the tree to display both swords. Select the knight’s sword (in the tree), click and drag it to the Swordsman_Sword node, and drop it. Now you have both swords in the swordsman hand and you no longer need the knight. Remove the NiNode “knight.nif” node.

http://img507.imageshack.us/img507/2433/tut2img20lk.th.jpg (http://img507.imageshack.us/my.php?image=tut2img20lk.jpg) http://img507.imageshack.us/img507/7467/tut2img37lp.th.jpg (http://img507.imageshack.us/my.php?image=tut2img37lp.jpg)

You will notice that the knight’s sword isn’t properly oriented in the swordsman’s hand. This will be a common result when moving objects from one unit to another. To fix it we’ll need to adjust the sword’s orientation and perhaps position. Right-click on the sword in the tree and click properties. This opens up the properties dialog, the tab we’re interested in is the second one, entitled Local Transforms. This is where we can adjust object’s orientation, position and scale. The orientation is the most complicated one as it is represented by a rotation matrix. Here’s a good place to learn more about rotation matrices (http://www.euclideanspace.com/maths/algebra/matrix/orthogonal/rotation/).

In our case, in order to properly orient and position the sword, we will need to rotate it 180 degrees around the X-axis (refer to the image to see what are the values in the matrix for that) and position it at coordinates (0, 14, 0). Once you’re satisfied with the new sword’s position and orientation you can remove the old one (I usually use the old weapon to help me figure out the proper position for the new one), and save the file.

http://img507.imageshack.us/img507/9641/tut2img48uj.th.jpg (http://img507.imageshack.us/my.php?image=tut2img48uj.jpg)

You might’ve noticed that the new sword leans back a bit when compared to the old one. In general, little differences like that will not be detectable in game but if you want you can adjust angles like that as well, it just involves sine and cosine functions :). I find that whenever I move something between vanilla units, 90 or 180 degree rotation around one of the axis is enough, and if you’re adding your own object you can adjust those (little) angles in 3ds max.

Before using this unit in game you should make the exact same changes in the swordsman_fx.nif files. I always modify both files when I’m making my units. The good thing is that the changes are exactly the same for both files, so when you’re working on the first file, record the values you used for orientation, position and anything else, and then repeat them for the other file.

Finally, don’t forget to add whatever textures are used by the new object to the folder where the new unit is in. In this case it’s knight_128.dds, sometimes you might also need to copy the gloss texture as well.

Now you can just copy both nif files and the textures into art/units/swordsman folder and see it in action.

Conclusion

Well, that’s all there is to it - fairly simple. All we did was give the swordsman a different sword but there’s much more that can be done. Obviously if you have some experience with 3ds max you can create alternative weapons or just objects to add to units – helmets, armor, equipment etc. You’re also not limited to only replacing non-animated objects, because in some cases the animations used are just simple combinations of rotations and translations (same as a sword swinging during attack animation).

For example planes use such simple animations for their missions – if you replace the plane model from one of the vanilla units with your plane, it will get the proper animations, effects and sounds associated with planes. You can even replace propellers with your own or just use the propellers from vanilla planes with your plane models (i.e. replace vanilla plane with your own model and re-position the propeller from their plane to match yours) and have a fully animated plane without doing a single animation. :) If you want to know more about that refer to the second part of my Exporting models from 3DS MAX into Civ IV (http://forums.civfanatics.com/showthread.php?t=161099) tutorial, and really, replacing a the entire plane is not much different than replacing a sword, the only trick is to find the proper node to which attach the new mesh.

Note: The above mentioned method of replacing the entire plane only works with planes, and to an extent with ships and tanks. It will not work with other units. For example, you can't put the maceman's model instead of the rifleman's model so that maceman uses rifleman's animations.

Well anyway, I hope this tutorial was helpful. Feel free to post any questions about the tutorial or the topic in general.

Cheers :)

I've posted the second part of this tutorial (http://forums.civfanatics.com/showthread.php?t=165689) with more about rotation matrices and object properties.

Dual
Mar 17, 2006, 06:10 PM
Good tutorial, and good work figuring all that out on your own. :thumbsup:

Now I'm going to have to go through all the vanilla units and see what can be edited in each one. :) There must be a lot of possibilities with a little bit of imagination.

Ploeperpengel
Mar 17, 2006, 08:03 PM
Now where was this mentioned? Can't recall exactly, something like "give a man a fish and you'll feed him for a day teach him how to fish and you'll feed him for a life time"?
Did you ever think of applying this to your sig ? You should do it now you've earned it: :santa2:

Rabbit, White
Mar 17, 2006, 09:36 PM
Thanks guys.

Btw, let me know (and this goes out to everyone :)) if there are some areas of the tutorial where you feel I didn't provide enough detail, or maybe something that wasn't covered but you feel that it should be (within the constraints of the tutorial of course).

Also, what is your opinion on me releasing a bunch of objects (weapons, helmets, pads) as nif files so that the community can just add them to whatever they want?

Cafegio
Mar 18, 2006, 12:30 AM
Why does it say : Cant find shader or cant find tciv4 skinning gloss

Rabbit, White
Mar 18, 2006, 07:35 AM
Why does it say : Cant find shader or cant find tciv4 skinning gloss

Rabbit why do some units only show up pink. I was trying to mix the warrior and swordsman except that the sword and shield are pink ??

Also some units only show up half upper body or half lower body ??

Any help would be much appreciated

(I also included your question from the other thread since it's more appropriate here)

I'm not sure about the shader error but the pink sword and shield mean that you didn't copy the swordsman's textures to the same folder where you're creating the new unit. So, if you're giving warrior swordsman's shield and sword, copy the file swordsman_128.dds to whereever that new warrior is.

I don't know about that "upper half/lower half of the body" problem, can you describe it in more detail - where does only half the body shows up, in nif viewer in game? What were you trying to do with the unit that had that problem, give it new weapon, remove something from it?

seZereth
Mar 18, 2006, 08:22 AM
Thanks guys.

Btw, let me know (and this goes out to everyone :)) if there are some areas of the tutorial where you feel I didn't provide enough detail, or maybe something that wasn't covered but you feel that it should be (within the constraints of the tutorial of course).

Also, what is your opinion on me releasing a bunch of objects (weapons, helmets, pads) as nif files so that the community can just add them to whatever they want?

nice, could have used this tutorial some days before i learnt most by trial and error ;) BUT now some more people can go on creating "models". hope that there will be some creativity out there.

And YES ! ! !! ! do that stuff Nif, give me a Feather i can attach to a helmet or hat, give me a renaissance hat, give me a cool helmet, armorpieces, and what would be real usefull, some sort of Troll/Goblin/Gremlin ears, which stick out from the head to make all those creatures which werent possible by now, or some sort of spikes, which could be attached to the back of a monster or armor, and all that stuff. that can create a variety of different models, to make the civ4 world even richer!
you would be our Chief, our Creator, our supplier, without you we cant do new stuff :) so take the chance and start an avalanche! everyone will know without you that wouldnt have been possible.

Do it, baby. and to woodelf, now you have your chance to attach your moonhelmet and oxygenpack to any unit by yourself !

Give it a go! START THE REVOLUTION ;)

Ploeperpengel
Mar 18, 2006, 09:21 AM
nice, could have used this tutorial some days before i learnt most by trial and error ;) BUT now some more people can go on creating "models". hope that there will be some creativity out there.

And YES ! ! !! ! do that stuff Nif, give me a Feather i can attach to a helmet or hat, give me a renaissance hat, give me a cool helmet, armorpieces, and what would be real usefull, some sort of Troll/Goblin/Gremlin ears, which stick out from the head to make all those creatures which werent possible by now, or some sort of spikes, which could be attached to the back of a monster or armor, and all that stuff. that can create a variety of different models, to make the civ4 world even richer!
you would be our Chief, our Creator, our supplier, without you we cant do new stuff :) so take the chance and start an avalanche! everyone will know without you that wouldnt have been possible.

Do it, baby. and to woodelf, now you have your chance to attach your moonhelmet and oxygenpack to any unit by yourself !

Give it a go! START THE REVOLUTION ;)


Yes please! this is most wanted and I like to add don't forget new fashion details cloaks, dresses etc.:bounce:

J_Period
Mar 18, 2006, 11:47 PM
Also, what is your opinion on me releasing a bunch of objects (weapons, helmets, pads) as nif files so that the community can just add them to whatever they want?

oops, didn't notice this when I made this thread (http://forums.civfanatics.com/showthread.php?t=163736)
well you know what they say about brilliant minds ;)

Some stuff I would personally like for my mod(cuz I'm selfish :D):
An extension to the skirts of primitive warriors to make 'em almost go to the ground
Elven Helms
Elven Greatswords
Battle Standards
Horns (and other instoments)
A Cape
Feathers!
See: http://img150.imageshack.us/img150/9545/swordmasters8yl.th.gif (http://img150.imageshack.us/my.php?image=swordmasters8yl.gif)
Also:
A Mohawk
A Dwarven Beard
http://img150.imageshack.us/img150/6752/slayers4yl.th.gif (http://img150.imageshack.us/my.php?image=slayers4yl.gif) (now you can't tell me they aren't cool-well maybe you can if you're not a nerd like me :P)
Finally:
A less braided, more "natural" dwarven beard
http://img150.imageshack.us/img150/7898/dwarf5to.th.jpg (http://img150.imageshack.us/my.php?image=dwarf5to.jpg)

I swear I really have tried making my own models, but I am seriously 3ds-handicapped!

C'mon warhammer fans, you gotta pressure rabbit :D He's done so much for us, that we have a right to demand more (that was sarcasm BTW) We don't just want human civs do we? (heh I really wanna do some high elves...)

If you fulfill theese demands I shall have more for you! (or anyone else who can get 3d modelling to work :crazyeye:)

Ploeperpengel
Mar 19, 2006, 06:54 PM
Hm maybe I'm too stupid for this program. But could you include some hints on other functions of the viewer in this tutorial if they are included. I for instance would simply like to have more light and can't find the button to switch it on:mischief:

Rabbit, White
Mar 19, 2006, 07:45 PM
To add more light open the "Default Node" that contains a camera and two lights, open the properties of the first light and modify the RGB values of the ambient color. Now, I haven't tested it but you might want to restore them to black before you save the unit, just in cases it messes it up in game.

Rabbit, White
Mar 19, 2006, 08:24 PM
I just discovered a whole new bunch of things that can be done in the viewer. Give me a few days and I'll update the tutorial. :)

Ploeperpengel
Mar 19, 2006, 08:47 PM
To add more light open the "Default Node" that contains a camera and two lights, open the properties of the first light and modify the RGB values of the ambient color. Now, I haven't tested it but you might want to restore them to black before you save the unit, just in cases it messes it up in game.

thx for the tip rabbit.

Edit: also looking forward to see what more you cast out of this hat :salute:

seZereth
Mar 20, 2006, 07:54 AM
I just discovered a whole new bunch of things that can be done in the viewer. Give me a few days and I'll update the tutorial. :)


i found out some things too ;) am doing some beasts and fantasystuff, just by modifiing properties and so ;)
But i hope you discover some more things, my "dragon" does wierd things... and i think he could use some "animated" wings

J_Period
Mar 20, 2006, 08:14 PM
anyone else having problems with the viewer crashing frequently? :( Especially when I try and save...

(not the dll error btw)

Ploeperpengel
Mar 21, 2006, 03:15 AM
i found out some things too ;) am doing some beasts and fantasystuff, just by modifiing properties and so ;)
But i hope you discover some more things, my "dragon" does wierd things... and i think he could use some "animated" wings

You really meant that serious?! Dragon?:eek:

Rabbit, White
Mar 21, 2006, 07:18 AM
anyone else having problems with the viewer crashing frequently? :( Especially when I try and save...

(not the dll error btw)
Not frequently but the viewer is definitely unstable. Sometimes it would crash if I drag a mesh to another node, other times during saves. :(

J_Period
Mar 21, 2006, 07:45 AM
Hmm, that sucks...every time I save, it crashes and gives me a log...I wanna see how my polar bear rider looks in game!

Rabbit, White
Mar 21, 2006, 08:11 AM
Wow wow, hold your horses there! You put a rider on a bear?! That's probably what causing the crash. It doesn't work, you can't move around the actual units, just various objects that are attached to them. I tried once putting a cavalry on a keshik's horse - I figured, both riders, both on horses, the same horses in fact with the same biped node names, it's gotta work right. Well it didn't, it crashed on me. I guess there's only so far we can go with unit mod's in the nif viewer. :)

J_Period
Mar 21, 2006, 09:32 AM
Wow wow, hold your horses there! You put a rider on a bear?! That's probably what causing the crash. It doesn't work, you can't move around the actual units, just various objects that are attached to them. I tried once putting a cavalry on a keshik's horse - I figured, both riders, both on horses, the same horses in fact with the same biped node names, it's gotta work right. Well it didn't, it crashed on me. I guess there's only so far we can go with unit mod's in the nif viewer. :)

oh :P it seemed so simple ;)
I'll experiment more when I get home...
thanks

nautil
Mar 21, 2006, 05:29 PM
Great tutotial ! thank you.
Just say please why is it necessary to modify (unitname)FX files either ? i did all my airplanes only by modifying main nif file, and it seems all worked ok.
And one more question, i just finished modeling Chinook helicopter, the one with two rotors, and as usual was hoping to attach it to gunship animation. But something weird happens, although in NIF viewer after i change position of propellers everything looks ok , in game this proppellers appear where it originally was , as if nothing affected its position... Hace you encountered such thing before ? maybe you know how to solve this problem? Thank you very much in advance

Rabbit, White
Mar 21, 2006, 05:55 PM
Great tutotial ! thank you.
Just say please why is it necessary to modify (unitname)FX files either ? i did all my airplanes only by modifying main nif file, and it seems all worked ok.
It's probably not strictly necessary but the way I see it, there must be a good reason for these FX files so if I'm modifying an existing unit then I should stick with the structure/hierarchy as well (just like I prefer to keep the same names for the files even though they can be renamed when saved).

I think the FX files have something to do with team colors. I haven't checked it but do your units have team color working? (mind you not like I could make it work even with the FX files but then again I haven't looked too deeply into that :)).

nautil
Mar 21, 2006, 10:35 PM
Great tutotial ! thank you.
And one more question, i just finished modeling Chinook helicopter, the one with two rotors, and as usual was hoping to attach it to gunship animation. But something weird happens, although in NIF viewer after i change position of propellers everything looks ok , in game this proppellers appear where it originally were , as if nothing affected its position... Hace you encountered such thing before ? maybe you know how to solve this problem? Thank you very much in advance

i'm sorry, but you appearenlymissed one of my question, so i'll repeat it ( see quote)

Rabbit, White
Mar 22, 2006, 07:55 AM
Oh no no, don't go all sneaky on me - you originally posted the question at 7:29 and I answered at 7:55, and then you added the second question at 7:58 (after I answered the first) so technically I didn't miss it. :)

Anyway, to answer the second question, no I never encountered a case where I moved something in NIF file but it didn't appear in the right position in the game. To be fair though, the only experience I have working with rotors from vanilla units is for the p-51 I did a while back, you've much more experience with that.

The only thing I can think of is that it's possible that the animation that controls the rotor tells it to "go to these coordinates and rotate there", and no matter where you put it originally it will always go there. However, you did make these work with the other helicopter didn't you? And you made it work with the planes, so I don't know why this case should be any different.

Heck, maybe it's something as simple as forgetting to copy the updated file or just calling the wrong one in the xml, that happens sometimes. :)

woodelf
Mar 22, 2006, 09:16 AM
Do it, baby. and to woodelf, now you have your chance to attach your moonhelmet and oxygenpack to any unit by yourself !

Give it a go! START THE REVOLUTION ;)

I finally come across this. :D

This is on my to-do list of learning. There are so many possibilities of adding/subtracting meshes that this has to be learned. Thanks for the Tutorial Rabbit.

seZereth
Mar 22, 2006, 02:57 PM
i found out, that when i did the dwarf and attached the helmet (not on unit) only to the swordsman.nif file, then it wouldnt appear in game (only with the _fx.nif !)

Btw, that Rotation is more complex than these matrices... it doeas wierd things to animation,...

Rabbit, White
Mar 22, 2006, 03:45 PM
Well there you go. I guess it's just a matter of checking what works - if the unit works with only the default nif file then great, but sometimes the _fx one is also needed.

As far as rotating anything that's animated, yeah that's tricky and usually just messes up the model. First of all bones often have restrictions and dependencies, what's more often times when you rotate a bone system, each bone rotates independently on its axis, essentially breaking up the structure.

Sleeping_Dragon
Mar 22, 2006, 07:09 PM
This is great and I understand every thing but....Where are all the .nif files.

J_Period
Mar 22, 2006, 09:02 PM
This is great and I understand every thing but....Where are all the .nif files.
Have you unpacked your art files? They're in there

Sleeping_Dragon
Mar 23, 2006, 01:06 PM
Oh! I forgot to do that! Thanks. I feel stupid.

Sevo
Mar 25, 2006, 08:55 AM
Rabbit...Awesome work. You realize this will work on leaderheads, too, right? This combined with the fact that leaderhead anim files can be swapped...

My next mod release is going to utilize that little fact...oh yes...oh yes...mwahahahahahahaha. :crazyeye:

sorry.

Rabbit, White
Mar 25, 2006, 08:57 AM
Rabbit...Awesome work. You realize this will work on leaderheads, too, right? This combined with the fact that leaderhead anim files can be swapped...

My next mod release is going to utilize that little fact...oh yes...oh yes...mwahahahahahahaha. :crazyeye:

sorry.
Heh, I haven't actually thought of that. I guess that means you'll be able to add hats and beards and what not to them. Can't wait to see what you'll come up with. :D

Ploeperpengel
Mar 27, 2006, 09:22 AM
And you say it's a small thing scaling ninodes:)

think C.Rohlands spearman already looks more orcish

http://img100.imageshack.us/img100/6785/civ4screenshot00029pf.th.jpg (http://img100.imageshack.us/my.php?image=civ4screenshot00029pf.jpg)


any idea how to make him lean more forward without destroying all proportions of his back in the viewer?

Sevo
Mar 27, 2006, 09:47 AM
And you say it's a small thing scaling ninodes:)


Holy smokes! Never occured to me...but such a simple thing to do...

Unfortunately, the swapping of shapes across leaderheads hasn't worked yet...keeps crashing the editor. But I've still managed to create some pretty amazing new leaderhead looks...

Rabbit, White
Mar 27, 2006, 09:53 AM
Nice :thumbsup:

As for leaning forward - you could try turning the upper torso a bit down (it's either spine or spine1 node). The problem here is you'll have to do deal with small angles - first you'll need to figure out around which axis you need to rotate it, and then use the proper matrix for that axis and calculate the proper matrix entries using sine and cosine. It's tricky to say the least, so good luck with that. :)

caramac
Mar 28, 2006, 10:37 AM
Hi, great tutorial. It really was simple to understand.

However, I was wandering if there was any way you could actually 'draw' on the textures with paint or some other program. I really would like to be able to change the skirt on the swordsman to be tartan to go with my Scottish Civ mod currently under construction.

I got the idea of this maybe being possible after thinking about the 'Sims Creator' that came with Sims 1 as the skins are laid out flat and you could draw on them.

I know this probably isn't possible with the units from Civ 4 but any ideas on anything similar would be very helpful.

Ploeperpengel
Mar 28, 2006, 03:18 PM
Do you have an idea why the head is still in quite a normal position in the game after I moved it in front of the breast of the model in the viewer in both nif and fx? I get a lovely hunch for an orc in the viewer but doesnt show:(

Rabbit, White
Mar 28, 2006, 05:25 PM
Hi, great tutorial. It really was simple to understand.

However, I was wandering if there was any way you could actually 'draw' on the textures with paint or some other program. I really would like to be able to change the skirt on the swordsman to be tartan to go with my Scottish Civ mod currently under construction.

I got the idea of this maybe being possible after thinking about the 'Sims Creator' that came with Sims 1 as the skins are laid out flat and you could draw on them.

I know this probably isn't possible with the units from Civ 4 but any ideas on anything similar would be very helpful.
Well the skins of the characters are laid out flat in the the texture files (for swordsman that would be swordsman_128.dds). The trick however is to figure out which part of the image goes on which part of the unit. It's easier with human units, for example it's immediately obvious where the sword is drawn, and the skirt, and the face of course. For any part you're not sure about just add some sort of a clear marker (i prefer an arrow) that clearly stands out from the rest of the image (this is of course working with a copy of the original texture :)), and in game take a look where it appears. Once you know what goes where it's easy to reskin units.

Do you have an idea why the head is still in quite a normal position in the game after I moved it in front of the breast of the model in the viewer in both nif and fx? I get a lovely hunch for an orc in the viewer but doesnt show
I think I encountered something like this before. My best guess is that when you're trying to mess around with positions and orientations of bones, some (or most likely all) of them are getting overridden by the animations. Essentially the animation sets (in the process of playing through) the absolute position/orientation of objects, or in this case vertices of the model which are skinned to the bones. So regardless of where you positioned the bone, it will always appear in the same position in the game.

Attached objects, such as swords and shields, are controlled relatively to the dummy object or bone they are attached to, that's why we can adjust their position/orientation to better fit to the model.

The way to go around this limitation is to create your own head (or use one created by someone else). Rescale the head node to something like 0.0001, attach the new head and scale it up to 1000 to compensate for the 0.0001 scale. Position and orient it according to your needs (the orientation will be hell btw :)) and that should do it. This works because you're attaching the head like a sword as oppose to skinning it to the bones (like the original head).

Ploeperpengel
Mar 28, 2006, 05:57 PM
Will this head have animation? I suppose not right?

Sevo
Mar 28, 2006, 05:58 PM
Rabbit et. al, I just did this one and had to share. This leaderhead is for a collaborative civpack a few of us will be releasing very shortly. Following the hints and tips in this thread, I took a spear from a Spearman and transferred it to Julius Caeasar's nif file. Once there, I placed it under his torso node so it would inherit all of the animation from that node, and I positioned it were you see it, on his back there. Then I reskinned him, and voila'! An Iroquois Chief. The really, really cool thing that you can't tell from this still is that the spear actually moves with his body when he moves, so it absolutely looks like it's attached to his back! I've done some cool stuff resizing inodes now on other leaderheads, too--it gives them a distinct feel.

Thanks to everyone in the thread for ideas on this one! (I hope I've tempted some of you to download the upcoming civpack as well! Keep your eyes peeled...)

http://img148.imageshack.us/img148/3609/degaspear0ep.png

Rabbit, White
Mar 28, 2006, 08:28 PM
This looks awesome Sevo :goodjob: and it also gives me the idea that perhaps if I make any head gear I could make hi-rez version of it so people can add it to the leaders. :D

@Ploeperpengel: The head should have all the animations that a regular head has. They might not look as good because the head is not where it's suppose to be but they should work.

Sevo
Mar 28, 2006, 09:04 PM
This looks awesome Sevo :goodjob: and it also gives me the idea that perhaps if I make any head gear I could make hi-rez version of it so people can add it to the leaders. :D

Definitely. I have not to date sucessfully transfered any objects from one leader to another; the nif viewer crashes every time at some point. Headgear like crowns, and perhaps helmets of varying types would be awesome.

Ploeperpengel
Mar 28, 2006, 11:00 PM
This looks awesome Sevo :goodjob: and it also gives me the idea that perhaps if I make any head gear I could make hi-rez version of it so people can add it to the leaders. :D

@Ploeperpengel: The head should have all the animations that a regular head has. They might not look as good because the head is not where it's suppose to be but they should work.

Would it be possible to attach it anywhere even a foot i.e. and it would still posses animation? Sounds like chaos will reign soon:D

Edit::lol: :lol: that head is flying around the body like an eagle searching for prey everytime I do a little tip on the rotationmatrix. I think I'll have learnt to use blender before I get it right!

Rabbit, White
Mar 29, 2006, 07:14 AM
Anything you attach to one of the bone nodes will do the proper animation (for that bone that is).

The reason the head is doing that (and again it's kind of an educated guess) is because either it wasn't centered around its pivot point from the get go, or maybe you shifted it away from the pivot in the process of rearranging it (less likely), and because of the large scale that distance from the pivot has also increased. Essentially it's like the head is on a large stick (and taken out of context that's a very disturbing start for a sentence :D) and the pivot is on the other end of the stick. So everytime you turn it the thing ends up "flying around" in an unpredictable manner.
This is what I was referring to when couple of posts ago I said "the orientation will be hell btw". :)

Kael
Mar 29, 2006, 07:24 AM
Excellent write Rabbit. This may even get me into playing with some 3d models (outside of a hex editor).

caramac
Mar 29, 2006, 11:15 AM
Great, I never knew skinning could be so simple! :thanx:

If I come across any more problems/suggestions i'll post them. :thumbsup:

Ploeperpengel
Mar 30, 2006, 10:29 PM
I'm currently working on a new unit for WH. A witchelf. I use the female settler with jaguar animation for this giving her two scimitars. However she's holding her weapons not like I want. The right is to close in front of the body and the left she even holds behind her. So what I did is rotate both of her hands close to 90 degrees so that she's pointing the weapons not straight to the front but upwards in the viewer. However that doesn't show in the game. She's holding her weapons as she did before. I did the changes for both the nif and fx. Is this because of the freeze animation again? Do you get a clue what I maybe missing here?

Rabbit, White
Mar 31, 2006, 07:16 AM
Yep that's exactly the same problem. Changing position or orientation of any animated bones (which are all of them actually) has no effect during gameplay because the animation information overrides whatever changes you made.

What you could try and do is model the forearm and the hand in 3ds max, remove the default ones by making them tiny and put the new ones instead, which will allow you to orient them any way you want, but it's a complicated procedure (I tried) and requires a lot of work trying to properly position and orient them. Another problem with doing that is that the animation may look a bit strange since it was made with arm and hand being at certain angles, if you change those angles it might look weird and unnatural.

I think making changes like that using the NIF viewer only is a bit pushing it, at this point I think it's best to basically build a unit in max and animate there, which is not easy of course. :) I'm hoping in a couple of weeks to get to that, as I'm going to model a human and try to export it using one of the sample files with animations. If that goes well then simple changes to those animations will follow to accomodate for various weapons, and then, well I don't want to get ahead of myself, but I've been scouring the net for good dragon illustrations... and btw, if anyone knows where I can get a good side/profile drawing of a dragon, with maybe a front view also, or better yet all 3 views (side, front, top) I'd be forever grateful. :)

Ploeperpengel
Mar 31, 2006, 07:43 AM
Yep that's exactly the same problem. Changing position or orientation of any animated bones (which are all of them actually) has no effect during gameplay because the animation information overrides whatever changes you made.

What you could try and do is model the forearm and the hand in 3ds max, remove the default ones by making them tiny and put the new ones instead, which will allow you to orient them any way you want, but it's a complicated procedure (I tried) and requires a lot of work trying to properly position and orient them. Another problem with doing that is that the animation may look a bit strange since it was made with arm and hand being at certain angles, if you change those angles it might look weird and unnatural.

I think making changes like that using the NIF viewer only is a bit pushing it, at this point I think it's best to basically build a unit in max and animate there, which is not easy of course. :) I'm hoping in a couple of weeks to get to that, as I'm going to model a human and try to export it using one of the sample files with animations. If that goes well then simple changes to those animations will follow to accomodate for various weapons, and then, well I don't want to get ahead of myself, but I've been scouring the net for good dragon illustrations... and btw, if anyone knows where I can get a good side/profile drawing of a dragon, with maybe a front view also, or better yet all 3 views (side, front, top) I'd be forever grateful. :)

I'd love to have 3Dmax but unfortunatly I can only afford blender. Damn, sounds as if I got to learn that:sad:
Hope to see new models then, don't forget fighting females;)
And if I encounter a good dragon pic it's yours.

Azatoth
Apr 04, 2006, 02:20 AM
Excellent tutorial, Rabbit :thumbsup: With this, one day I'll be beter than you at unit editing mouhahahaaa (mad scientist laugh) :satan:

Also, what is your opinion on me releasing a bunch of objects (weapons, helmets, pads) as nif files so that the community can just add them to whatever they want?

Great idea, I'm really interested !


Btw don't know if the question has been raised elsewhere (if it's the case, sorry I didn't find it), but why do most units have two weapons in the NIF file (one in the hand, the other one next to the leg) ??? Has the second weapon a function in the animation or whatsoever ?

Azatoth
Apr 04, 2006, 02:42 AM
and btw, if anyone knows where I can get a good side/profile drawing of a dragon, with maybe a front view also, or better yet all 3 views (side, front, top) I'd be forever grateful. :)

Dragon pictures ? You asked the right person ;)
Hope you'll find one convenient for you in this selection :

http://www.civfanatics.net/uploads11/Dragon.zip

Rabbit, White
Apr 04, 2006, 08:34 AM
Btw don't know if the question has been raised elsewhere (if it's the case, sorry I didn't find it), but why do most units have two weapons in the NIF file (one in the hand, the other one next to the leg) ??? Has the second weapon a function in the animation or whatsoever ?
The second weapon is used as a "drop". When some units die they leave a weapon lying around separately from the rest of the unit, that's that second weapon in the nif viewer.

And thanks for the dragon pics Azatoth :)

Nolan
Apr 04, 2006, 05:04 PM
Hello WR, I'm slowly going through the tutorials. I am having difficulties in finding "remove" from the Scene GraphTree when I highlight (then right clicked) the NiNode "Swordsman_Shield. I can hide the shield... or expand, collapse, see properties.

This is my first exploration with the Scene Viewer. Thanks for making the tutorial.

Rabbit, White
Apr 04, 2006, 05:33 PM
Umm, do you mean you can't find the "remove" command?
Like this

http://img376.imageshack.us/img376/8206/swordman18fl.jpg

or like this

http://img376.imageshack.us/img376/3933/swordman28vv.jpg

:confused:

Nolan
Apr 04, 2006, 05:42 PM
This is my screen when I try the right click. Maybe my viewer is corrupt. Bleh! Any suggestions guys?

about says for use with Gamebryo Version: 2.0.1.0 (05-27-2005) I just downloaded today.

Rabbit, White
Apr 04, 2006, 06:10 PM
You got the wrong version, it should be 2.0.1.6 (09-16-2005). Where did you get it? The version we're using is the one that comes with the 3ds max plugins (http://forums.civfanatics.com/showthread.php?t=159481).

Nolan
Apr 06, 2006, 10:16 AM
Thanks WR,

My computer is getting very busy. Some files are out of date and need deleting/upgrading.

::edit:: when I download either Max version plugins, they are both dated a day before yours. Any suggestions? I'm still looking for the one with your date and version number.
Nolan

Ploeperpengel
Apr 07, 2006, 09:48 AM
Damnit, struggling with the graphics doesn't stop! I bought myself a radeon 9550 and now the _fx.nif files in the viewer don't show just pink like before, now they don't show at all just attachments!!! This isn't supposed to be normal or is it?:(


The graphics in game are nice though much nicer than before I have to admit:)
But right now I have some stuff on my to do list but how can I change fx files if I can't see them:mad:
Have an idea? This is all so weird and no end to it!:wallbash:

Edit: I tried to put all directories I think containing artfiles as texture sources for the viewer but it still can't find the shaderlibrary tci4skinnig , could this be the cause? If so where to find that one?

Edit: ok forget about. works without problem if loaded within the tool, feel kind of stupid:blush:

Guntha Hamma
Apr 29, 2006, 05:45 AM
I can't load any file with sceneviewer. when I try to load a nif file a window appears with this:

Error loading required file.


Sceneviewer was unable to load the bounding volume shape used to highlight selected object. Please ensure that the following file exists in the same directory as the program executable file:
boundshape.nif

I GOT that file in the same directory where sceneviewer is, so what's up? :cry:

Ploeperpengel
Apr 29, 2006, 08:02 AM
I can't load any file with sceneviewer. when I try to load a nif file a window appears with this:

Error loading required file.


Sceneviewer was unable to load the bounding volume shape used to highlight selected object. Please ensure that the following file exists in the same directory as the program executable file:
boundshape.nif

I GOT that file in the same directory where sceneviewer is, so what's up? :cry:

It must be in the folder of the unit you want to open;) along with boundshape.tga

Bahmo
May 07, 2006, 04:06 PM
EDIT: In accordance with Rabbit's request, I took the whole quote out of my post.

I hate to sound like a total idiot, but since I can use Max, I should reap the benefits of this tutorial, hence these two basic questions:

1) "if you have 3ds max 6 or 7+ then download the appropriate version and unzip directly into max’s root directory." Could you please explain what a root directory is? I did what I thought I should have, but I can't seem to get this to work (As in, I don't knoiw where to open the NIF viewer.)

2) Where do I find these "NIF" files (only answer in case it won't be obvious, once I get the plugin properly installed.

Nolan
May 07, 2006, 04:15 PM
There are nif files in the unit animation folders.
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\Art is where some of mine are.

If you need others, I might be able to help you. Message me with your request and email and I will send you some files.

Bahmo
May 07, 2006, 04:35 PM
There are nif files in the unit animation folders.
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\Art is where some of mine are.

If you need others, I might be able to help you. Message me with your request and email and I will send you some files.

Now I've found some NIF files, but I still don't understand exactly how I'm supposed to view them with that plugin I downloaded. Also, the library is incomplete; I can only find a few fragments of the game there. I'll do what you said if it comes to that, but right now I must ask, where are those files if I can see them in the game, but not in my directory? :confused:

Rabbit, White
May 10, 2006, 10:35 AM
Bahmo, the plugin zip should be unzipped into your 3dsmax installation directory, something like C:/Program Files/3dsmax/ and let it overwrite anything it wants. The nif viewer is unzipped together with the plugin, the executable for it is called SceneViewer.exe and should be in the 3dsmax directory after you unzip the plugin.

As for the NIF files, you might have to unpack Civ4 art resources. To do that you need to download an unpacking tool available from firaxis' civ4 website, they also have all the unstructions for it there.

khmerballa
May 13, 2006, 05:32 PM
hey help why is my whole swordsman pink. I open up scene viewer and open the swordsman.nif, and the sworsman is all pink. I put the boundshape.nif and boundshape.tga into the swordsman folder in the civ 4 directory.Some other units like the pikeman has some pink, the musketman had only the legs and arms pink please help. Appreciate it.

Rabbit, White
May 15, 2006, 07:35 AM
hey help why is my whole swordsman pink. I open up scene viewer and open the swordsman.nif, and the sworsman is all pink. I put the boundshape.nif and boundshape.tga into the swordsman folder in the civ 4 directory.Some other units like the pikeman has some pink, the musketman had only the legs and arms pink please help. Appreciate it.
If something is completely pink (as oppose to a pink shader over the texture) then it means that the texture is missing. You probably haven't unpacked all the resources and are missing some textures, make sure you unpacked all four artpack files.

King Flevance
May 21, 2006, 04:36 AM
quick question, just clarify. Is this software 35 bucks or 3500 bucks?

Rabbit, White
May 21, 2006, 06:46 AM
quick question, just clarify. Is this software 35 bucks or 3500 bucks?
NIF viewer is free, 3ds max is probably $3500, definitely not $35. :) Although there is a student version I think that comes at a significant discount.

Padmewan
May 24, 2006, 11:42 AM
Let me ask what seems like an obvious question but isn't clear to me after reading this entire thread: Do you need 3DSMax to use NIF viewer?

(And what kinds of jobs do you ppl have that you can afford $3500 software???)

Rabbit, White
May 24, 2006, 11:56 AM
Let me ask what seems like an obvious question but isn't clear to me after reading this entire thread: Do you need 3DSMax to use NIF viewer?

(And what kinds of jobs do you ppl have that you can afford $3500 software???)



Preparation

Download the 3ds max plugins, if you have 3ds max 6 or 7+ then download the appropriate version and unzip directly into max’s root directory. If you don’t have 3ds max then download any version and unzip wherever.

While it's not stated in so many words, the fact that I say download it (and thus use it) without having 3ds max, implies that you do not need 3ds max to use the NIF viewer. :)

As for the second question, there is a 30-day trial version of 3ds max on its website.

Padmewan
May 28, 2006, 09:45 AM
While it's not stated in so many words, the fact that I say download it (and thus use it) without having 3ds max, implies that you do not need 3ds max to use the NIF viewer. :)
Yup, that's the clarification I wanted. Thanks :)

The tough thing about the game industry is that Firaxis could have made the game cutting-edge or made it accessible to modders, but probably not both, unless technology stands still for quite a while. I wish I had gotten into modding back in its 2D heyday. By the time they invent some kind of Minority Report interface for 3D modeling, we'll be on to Smellogaming or something.

esnaz
Jun 03, 2006, 05:25 PM
i can't find "swordsman.nif"...

when I go to Assets->Art->Units it only has a couple of folders...help!

Rabbit, White
Jun 04, 2006, 04:57 PM
i can't find "swordsman.nif"...

when I go to Assets->Art->Units it only has a couple of folders...help!
You need to unpack the resource files, here's a thread on it (http://forums.civfanatics.com/showthread.php?t=136023).

esnaz
Jun 05, 2006, 06:35 PM
thanks:)

(i've been puzzled by that for a while now)

Bahmo
Jun 07, 2006, 09:56 PM
Bahmo, the plugin zip should be unzipped into your 3dsmax installation directory, something like C:/Program Files/3dsmax/ and let it overwrite anything it wants. The nif viewer is unzipped together with the plugin, the executable for it is called SceneViewer.exe and should be in the 3dsmax directory after you unzip the plugin.

As for the NIF files, you might have to unpack Civ4 art resources. To do that you need to download an unpacking tool available from firaxis' civ4 website, they also have all the unstructions for it there.

OK, I got that Sceneviewer thingy to work, although the only thing I can view is mobile artillery, but when I visited the Civ4 site, I couldn't find anything that resembled the unpacker download. Here's a link to the whole downloads page, last I checked:

http://www.2kgames.com/civ4/downloads.htm

Rabbit, White
Jun 08, 2006, 07:33 AM
Yeah I'm sorry I gave wrong directions :) here's a link to a thread where you can download the unpacking utility (http://forums.civfanatics.com/showthread.php?t=136023).

Bahmo
Jun 08, 2006, 04:46 PM
Yeah I'm sorry I gave wrong directions :) here's a link to a thread where you can download the unpacking utility (http://forums.civfanatics.com/showthread.php?t=136023).

Already got that. ANy help on using it?

Rabbit, White
Jun 08, 2006, 05:50 PM
It's fairly easy, select Unpack from the PAK menu, select the file, select the destination and hit OK. Only thing of note is that you'll want to unpack all four files (if you have four, you might have one, which is just the four grouped into one if I understand correctly) right away, because the files are spread out between them pretty much randomly, i.e. each might contain part of the files belonging to one unit, so if you unpack only one you might have a unit folder with only the nif files and no textures.

I'm sure there's a lot of other info on it, or possible problems and solutions in the thread itself.

esnaz
Jun 24, 2006, 01:03 PM
when i open scene viewer, it says "Renderer Creation Failed, please restart application"...how do i fix it?

Rabbit, White
Jun 24, 2006, 01:23 PM
when i open scene viewer, it says "Renderer Creation Failed, please restart application"...how do i fix it?
I'm sorry I never encountered an error like that so I can't help you. However, it sounds like it might be a graphics card error - check that you're using latest drivers.

esnaz
Jun 25, 2006, 09:48 AM
I'm sorry I never encountered an error like that so I can't help you. However, it sounds like it might be a graphics card error - check that you're using latest drivers.

it's definitely not that cuz the laptop i'm usin is brand new, it shouldn't b the graphix card

esnaz
Jun 25, 2006, 09:50 AM
...and when i bought it i made sure all the graphix and stuff were updated

Rabbit, White
Jun 25, 2006, 12:54 PM
...and when i bought it i made sure all the graphix and stuff were updated
Well, I really don't know what's going on here. Have you tried re-installing civ4? Also, check that you have the mfc70.dll file (it should be in windows/system32). Do you have the latest directx version? (I think it's 9.1c)

That's about all I can think off.

WR

esnaz
Jun 26, 2006, 04:24 PM
Well, I really don't know what's going on here. Have you tried re-installing civ4? Also, check that you have the mfc70.dll file (it should be in windows/system32). Do you have the latest directx version? (I think it's 9.1c)

That's about all I can think off.

WR
that didnt work either:(

Psychic_Llamas
Sep 23, 2006, 01:46 AM
EDIT: nevermind, i sussed it out:)

EDIT 2: im trying to make a new woodelf city art, and what im trying to do is use the 'asian' city art from warlords as a base, then adding the files of the buildings i made, and the replaceing the asian ones with my new ones. this all works fine, i can scale everything to the correct size and everything. the problem come when i try to save the file. as soon as i click 'save file' the whole program crashes and asks me if i want to 'dump' it. this is increadibly frustrating.

Is it posible to add new nodes etc so i can make a new city art file from scratch?

this is really annoying and im going nuts.

SiLL
Sep 27, 2006, 08:09 AM
I wanted to erase a weapon of a car through delating the shape-data - just like it was described ;) - and after that, I saved it of course. But everytime I'm reloading the unit, the weapon is there again :cry:
any idea what I might do wrong?

Rabbit, White
Sep 27, 2006, 10:50 AM
What do you mean by "weapon of a car"? Is it like a gun placement on a jeep or something like that?

In any case, first make sure you did it to both the FX and the non-FX version of the file, or at the very least to the one being displayed by your computer. It's possible that if you only did that for the non-FX version but when you run the game it uses the FX version so of course you won't see the changes.

If it's not that then you have two possibilities - if the weapon is a separate mesh, i.e. a separate node on the tree then once you remove it should work. However, if it's not a separate mesh and instead controlled by a bone (like cannon of a tank for example) then it probably won't work because the bone's scale (if that's what you did to "hide" the weapon) gets reset to 1 during animations. In such a case you'll have to perform a "bone transplant" as described in tutorial part 3, but use the same unit for the two units, i.e. instead of putting an archer on a horse or something like that, you'll be putting one unit onto a copy of itself. If it sounds like Chinese don't worry :) first see if the other things maybe solve the problem, if not then I'll explain this in detail.

Or actually, alternatively, if you don't mind loosing team color you can just make the weapon transparent.

Cheers

SiLL
Sep 29, 2006, 04:34 PM
Something really weard happend :eek:
I simply did repeat the actions, I tried last time and suddenly... It did work.
And I was trying those steps like hundret times last time and everytime I opend the nif-data, there was the weapon (wich is by the way some kind of sam-canon on a armed car :D) again.
Well... I don't understand it, but I actually really don't care, as long as it does work :)
But I appreciate your fast answer, even if I propably never will figure out, what a "bone transplent" is ;)
But could you tell me, how or where the places for the teamcolor of a unit are defined? I did edit the color of a German tiger tank and the result is, that I can't see anywhere any area for team color - I mean in the nif-data or dds-data -, but in the game there are pink spots, where the teamcolor should be.

strategyonly
Dec 19, 2006, 09:53 PM
I keep getting a "Render creation failed" when i try to load the viewer???
I put both Bound things in the file also.

Rabbit, White
Dec 20, 2006, 01:21 PM
I keep getting a "Render creation failed" when i try to load the viewer???
I put both Bound things in the file also.
I'm sorry I never encountered something like that before. It sounds like a graphics or directx related problem. How do you load the viewer, do you actually launch the viewer itself or do you double click a NIF file and let it call up the load for the viewer? 'Cause the second way is problematic and doesn't work well.

strategyonly
Dec 20, 2006, 01:58 PM
Nevermind i have a ATI card 1300 and above, so it doesnt work.

Bahmo
Feb 04, 2007, 09:02 PM
Just started using Sceneviewer again, and now, I'm getting a "Rendering Creation Failed; please restart application error." As expected following that advice did not do a single thing to remedy my problem. Any idea how I could fix this?

If it helps, I just patched the game; maybe it's now incompatible.

chandlerdion
Feb 04, 2007, 11:07 PM
Can anyone please tell me how to increae the movement of my units? I went into the unitinfo file of xml in the assets file of my mod. I can see the changes I made (i.e. increased warrior "moves" from 1 to 3) put when I pull up a game to try it it, my initial warrior is still only moving one square at a time. What am I missing?

Rabbit, White
Feb 06, 2007, 09:52 PM
@strategyonly and Bahmo, how are you loading the NIF Viewer? Are you double clicking the nif files for the units? If so, that's the problem, you need to first load the NIF viewer itself, and then from there to load the files.

@chandlerdion: It should be working, double check everything you did. Maybe you changed it on the wrong warrior, or maybe you're not loading the right mod. It's a really simple change so you must've missed something somewhere.

Bahmo
Feb 11, 2007, 04:11 PM
@strategyonly and Bahmo, how are you loading the NIF Viewer? Are you double clicking the nif files for the units? If so, that's the problem, you need to first load the NIF viewer itself, and then from there to load the files.

@chandlerdion: It should be working, double check everything you did. Maybe you changed it on the wrong warrior, or maybe you're not loading the right mod. It's a really simple change so you must've missed something somewhere.

I'm loading NIF Viewer first (actually, it's called "Sceneviewer). Still get the error.

Rabbit, White
Feb 14, 2007, 08:38 AM
I'm loading NIF Viewer first (actually, it's called "Sceneviewer). Still get the error.
Then the only thing I can think of is that you need to reinstall, which just means download a fresh copy really :) Or maybe you have an old graphics card or outdated drivers, have you looked into that?

Have you worked with the viewer before and it was fine?

Btw, the NIF viewer doesn't have anything to do with the game as such so patching/updating the game shouldn't affect it in any way.

Bahmo
Feb 14, 2007, 12:50 PM
Then the only thing I can think of is that you need to reinstall, which just means download a fresh copy really :) Or maybe you have an old graphics card or outdated drivers, have you looked into that?

Have you worked with the viewer before and it was fine?

Btw, the NIF viewer doesn't have anything to do with the game as such so patching/updating the game shouldn't affect it in any way.

Now that you mention it, yes I have worked with it before, and come to think of it, since then I have actually gotten my graphics card replaced. But the new one I have is much better, if anything, so I don't see what would be the problem.

Bahmo
Feb 17, 2007, 08:25 PM
I just reinstalled. Still not working. :cry:

Rabbit, White
Feb 18, 2007, 09:16 PM
I just reinstalled. Still not working. :cry:
I'm sorry I don't know how to resolve that problem.

Bahmo
Feb 19, 2007, 07:58 PM
I'm sorry I don't know how to resolve that problem.

Well, no worries; I downloaded NIFscope, and it's similar. I have just one question: You said to do the same thing with the swordsman_fx file, right? So do I still copy from the plain knight file, or the knight_fx one?

Rabbit, White
Feb 19, 2007, 10:12 PM
Well, no worries; I downloaded NIFscope, and it's similar. I have just one question: You said to do the same thing with the swordsman_fx file, right? So do I still copy from the plain knight file, or the knight_fx one?
You can use the sword from the plain knight, you can even make your life easier by loading the plain swordsman you just created (i.e. the one with the knight's sword) into swordsman_fx and moving the sword from one swordsman to the other. This will mean that the sword will be already properly oriented, just make sure to delete the correct swordsman after that.

There is also another way to create the fx version, though it's not reliable if the model you use have gloss on the body, but if you're just doing it with a swordsman it's not a problem. Go to the 3rd tutorial in this series and towards the end find the section titled "Finalizing the unit - creating FX version", in it I provide a way to create an fx model out of a plain one - it just involves one change to the properties of the model and a save.

Viking Krieger
Jun 17, 2007, 04:53 PM
I am having trouble getting a weapon on to a unit

timboobaa
Aug 20, 2007, 05:14 AM
hello, thanks for these tutorials.
I've just started to 're-skin' some units for Civ (had some experience modding Warcraft 3).
I have a question; some of the units ,in particular the 'Unique' Asian Unit, I think it's called Chonoku or similar (i'm not on my main PC so can't check at moment), appear in the Scene viewer without a skin, even though there's a texture file in the folder.
I've checked all folders for the unit in each of the 4 Pak files, and it's the same...the unit appears in the Scene-viewer as pinkish. You can just about see the skin in one of the nif files, think its the Fx one, but the whole unit is tinted that pinkish-violet, perhaps it's team-colour?

Also,I wanted to work on some of the 'Charlemagne' Units from BTS, the model files appear with the skin on in Scene Viewer, but with the same pinkish tint.
Not great for seeing your skin/screenshots obviously!

Can anyone help here? Thanks in advance.
PS I understand you only need the model file and the 'fx' model file (plus skins of course) to get the unit in game, but i was curious as to what the 'freeze' files are? part of the animations it seems, but definitely not needed?(I'm only working in Scene-viewer at moment trying to get a few skins finished, have't attempted to put anything in game yet!)
Thanks!

Rabbit, White
Aug 20, 2007, 09:49 AM
@timboobaa: If you can sort of see the skin through but everything is also very pink that's the gloss map showing, although it should only appear that way when you view the non fx version. Also, it usually is limited to the metallic parts obviously. I don't remember having any trouble with the chonoku and certainly not with charlemagne units, which I actually viewed recently. If you're seeing the gloss pink over the entire unit then that usually means you're missing the gloss texture (so the engine assumes you have 100% gloss all over). If you do have the gloss texture in the folder then it might be just some conflict between your graphics card and the shader. As I mentioned this should not appear on the fx version of the unit, if it does than either I'm wrong and you're having a different issue or again it's a problem with a shader, which probably means there's nothing you can do about it (well you could try updating drivers but I doubt that'll help).

It does seem like this is limited to the viewer only, so if you can ignore it then you can still work on units to some extent :)

The "freeze" files are there for those that use the option "Freeze Animations" - they basically represent a few basic positions for the unit that it uses when the animations are suppose to be frozen. You usually don't need them though - in all my time making units only recently did I encounter posts mentioning a bug that occurs due to not having those files. However, for completeness' sake, if you're making a not-too-drastic change of a unit - for example, texture and a different weapon, then you can copy the original freeze files into the same folder and for those that use freeze animations, the unit will sometimes appear as a bit of a mix between old and new units - i.e. it'll have the new texture but an old weapon. Thing is, freeze positions are only used when the unit is not selected, in fact, even though there's usually an "attack" freeze position, when units attack they're always animated.

Of yeah, one last thing about freeze files, they have to match the KFM file used by the unit, regardless of what the original NIF was. In other words, even if you took a grenadier and redid him and gave him warrior animations (for whatever reason) the freeze files must be "warrior" freeze files. However, although I haven't tested it, it should be possible to grab grenadier freeze files and rename them to warrior freeze files (basically so you don't get a warrior pop up whenever freeze position is used ;)).

timboobaa
Aug 20, 2007, 10:09 AM
Aah great, thanks White Rabbit, I'll take this away and test it... find those gloss files ..
I've got some finished skins which I haven't tested in game, so I can't put em up for Download, is there anywhere 'round these parts I could post the screenshots.. like a gallery or sumthing?
thanks for the reply WR.

Psychic_Llamas
Nov 02, 2007, 06:29 AM
im having trouble with the Nif Viewer. its not even opening (see error)

i hope someone sees this soon...

EDIT: just noticed lots of people have this problem but no one knows how to fix it :(

Amra
Nov 10, 2007, 03:16 PM
im having trouble with the Nif Viewer. its not even opening (see error)

i hope someone sees this soon...

EDIT: just noticed lots of people have this problem but no one knows how to fix it :(

Me too. I think it may have something to do with newer graphics cards, perhaps from ATI. I used to use this program all the time to work on the leaderheads in my modpack but have since built a new computer with an ATI 1950 Pro. Now it gives me the "renderer creation failed" error. I need to figure it out or there will not be an Amra's Modpack version 3, so I will post a solution if I find one.

I've spent the better part of today updating video drivers, DirectX, chipset, etc without any luck though, so... :dunno:

ViterboKnight
Jun 10, 2008, 02:44 AM
I'm trying to put a great merchant on an horse. I've taken the horse from a conquistador.
I've followed Rabbit White's indications. Loaded the Great Merchant and removed the camel (allright), added the Conquistador (allright), moved the Horse to the Great Merchant correspondant node, and removed the Conquistador nif. It seems allright.
Now, if I save the GreatMerchant nif, an error occurs, the program exits, and the file is not saved (the file has even been corrupted).
Any suggestions? Thanks.