Questions Concerning New Models and Animations

BaneOfRome

Chieftain
Joined
Aug 15, 2008
Messages
20
I know that I keep making new threads and that that may be annoying, but I do not feel that my questions would be appropriately placed in the Quick Modding Questions thread.

Justifications aside, I am having quite a bit of difficulty with the new models and their animations that I am using for my mod (before anyone gives me more credit than I am due, the animations are not my own creations; I merely made some minor adjustments to them). Thus, I am becoming a tad bit frustrated and discouraged with my entire project. So herein lies my question...

For the time being, is there any way to import a model into Civ IV without any animations, so that a static model would appear and move around on the map?

Also, where is the code that deals with the .nif, .kfm and .kf files located (probably in the .dll, but I cannot find it)?

Thank you in advance for any and all assistance.
 
You can just assign no .kfm to a model, then it should be displayed without any animations.
You can even do that with the standard units. They'll be stuck in the default posture (for most human models that's a crucified position).
For some models, which don't have that many really visible moving parts (like tanks) that does even work not that bad.
 
I know that I keep making new threads and that that may be annoying, but I do not feel that my questions would be appropriately placed in the Quick Modding Questions thread.

Justifications aside, I am having quite a bit of difficulty with the new models and their animations that I am using for my mod (before anyone gives me more credit than I am due, the animations are not my own creations; I merely made some minor adjustments to them). Thus, I am becoming a tad bit frustrated and discouraged with my entire project. So herein lies my question...

For the time being, is there any way to import a model into Civ IV without any animations, so that a static model would appear and move around on the map?

Also, where is the code that deals with the .nif, .kfm and .kf files located (probably in the .dll, but I cannot find it)?

Thank you in advance for any and all assistance.

Graphics code is in the EXE, so you can't change it. That said just assigning no animation to a model like The_J suggested is enough in most cases to make it be still.
 
After finally having a chance to try anew without an animation set, I found that my problem still exists: in game, my model does not appear on the map, in the Civilopedia or in the information window in the bottom left corner of the screen. I have checked everything, from file paths to unnecessarily extreme scaling, but nothing seems to work.

In an attempt to give you a better picture, the model is brand new and is not Civ IV related in the least. I am using 3ds Max 2012 (which does not have the Civ IV plugins, although that should not be a problem). The model height when scaled is 54 (the scaled height of the Infantry is 52, so it is unlikely that my unit is too tall or too short).

I am truly at a loss. Any suggestions would be greatly appreciated.
 
I cannot seem to find anything wrong with the textures, but is there a tutorial that you could point me towards so that I could thoroughly check my work?

I still think that the models are simply not appearing. I added a model (for experimental purposes only) that had a large number of polygons and I did not see any performance differences, even when there were many of the units on the map.
 
This is a first and a final bump along with details of what I have done so far.

- Using 3ds Max 2012 (for which no Civ IV plugins are available), the model was converted into a .nif and given a default texture in .dds format. This resulted in a folder in .../Art/Units/ containing the .dds and .nif files. There is no NetImmerse/Gamebryo file. Could this be the issue?
- In the game, only the shadow, which I did not change, appears on the map; there is no unit model. I am convinced that the model is not loaded, rather than there being a problem with the texture, as The_J suggested above, due to the results of some experimentation. Is it possible that the model is too large, complex, etc. and that it is not loaded for that reason? When the .nif's path is fully typed out (starting from C:/), I receive a buffer overrun error whenever the model would appear on-screen, leading me to believe that this is the case.
- File paths, spelling and other areas prone to silly mistakes have been checked. As an aside, when viewed in NifSkope, the model appears with its texture, exactly how it should look.

Any help would be greatly appreciated. If there is anything else that I left out above that could help to solve the problem, let me know. Thank you.
 
Unfortunately, the unit currently has 9,500 faces and the .nif file is 501 kilobytes. I realize that this is a lot, seeing that the ideal number of faces for a vehicle should be around 2,000. Note that the model is not my own creation but rather taken from another game, hence the higher face count.
 
I know the game can display up to 3000 faces...

Does that mean that any model that has over 3,000 faces will not be loaded or will throw an error when loaded? I hope that that is not the case: I was able to get the model down to 5,000 faces, but finding another 2,000 faces to delete will be difficult.
 
This is a first and a final bump along with details of what I have done so far.

- Using 3ds Max 2012 (for which no Civ IV plugins are available), the model was converted into a .nif and given a default texture in .dds format. This resulted in a folder in .../Art/Units/ containing the .dds and .nif files. There is no NetImmerse/Gamebryo file. Could this be the issue?

The question is: which nif format has your exported nif? You need to export a civ IV nif. Nif formats for other games will not work.

What you could try:

Test your nif with scene viewer (also called nif viewer, is part of the official nif scripts for the older max version, but runs without max). If the model is visible there, in most cases the model will work in game. If not (or scene viewer crashes):

Most likely your nif is corrupt or your nif has a wrong format/structure. Try to nifswap your model in a original civIV nif. (eg. via nifskope - nifswap only means to copy the mesh from one nif into another). If there is an error message (different format) you know the reason for your problem. Most likely in this case the nif will not run error free or will crash civIV. If not, test this nif.

You could also export the model as .obj or .3ds, both types can be imported directly into a nif via nifskope. Import the model in an existing civ4 nif and try this nif.
 
Lo and behold, it works! Thank you very much. Although now I do not understand why the .nif file was not compatible with Civ IV directly out of 3ds Max, as in the area where the intended game is declared, Civilization IV is listed as one of the choices.

But no matter: one more step is not going to make a huge difference. My thanks to all of you who helped me with this problem.
 
Back
Top Bottom