Error with unit animations

deanej

Deity
Joined
Apr 8, 2006
Messages
4,859
Location
New York State
Can anyone help here? I just got some units with animation for my star trek mod from Jaydn, but when I give myself one in worldbuilder and close worldbuilder I get an endless amount of the same error. With python exceptions turned off I can see that none of the new units have working action buttons (ex: fortify, goto, etc.). It's just a blank panel. None of the files mentioned in the error have changed since the last release of my mod, yet the units work just fine for Jaydn. Can anyone tell me what's wrong?
 
Obligatory question:

Do you have the action buttons correctly referenced?

If this is a python related problem, where are the units referenced in python? Any chance we could see the code (doubt I'll understand it, haven't messed around with python much, but maybe someone can, and I'd give a look at it just in case).
 
I think we need more information... Perhaps one of your units + its art-define.
I.g. mis-referenced or missing animation (.KFM pointing to a non existanf .KF) might cause this kind of error by preventing the unit panel to be drawn in the main interface.
 
@ phungus420: I don't think it's a python issue... I had no problems before the units and I made no changes to python files when updating to the animated units. It happens when exiting worldbuilder, so I think it is another symptom of the missing actions buttons. Where do the action buttons need to be referenced? In the animation?

@ Refar: I've attached the first zip file for the Federation units. It has 4 units and the art defines for all the Federation units.

EDIT: The buttons appear to work fine when the unit is built normally. The error still happens though. Why is the button problem exclusive to worldbuilder?
 
There are a couple of issues with those units.

First - the one thing, that i believe to be responcible for the trouble:

Some tool (KFM Converter) was used, to re-reference the KF files within the KFM (so they can be called AMBASSADOR_***.KF and so on). It is not 100% confirmed, but there are grounds for concern, that this tool might cause mess ups on occasion, i.e. in combination with modular or packed assets (are you using one of those methods ?).

Here are the threads i am refering too, however IIRC nothing definite was found out in the end.
http://forums.civfanatics.com/showthread.php?t=270008&page=2
http://forums.civfanatics.com/showthread.php?t=271331

I would recommend, using the original KFM + KF animation set, when in doubt.

You need to find out, what unit your ship is based at, copy those animations into the ships folder, and point your Art Define <KFM> to those animations (While Nif/Shadernif point to the new ship.)

To find out you can open the mofied KFM in a plain text editor. It's mostly unreadable, but file references are plain text. Somewhere in the beginning a SOMETHING.NIF file is listed - this is the original unit.

For example the Ambassador.kfm references "Cruiser.Nif" - so its based from FF Cruiser.

Copy the Cruiser KFM, all the KF und judt to be sure the Cruiser.nif (since it's referenced in the file) into the Ambassador folder. Now keep the <Nif> and <ShaderNif> pointing to the Ambassador files, but redirect the <Kfm> definitions to the Cruiser.kfm.


-----


Another Issues:

This one might or might not cause trouble:
The files use .jpg textures (apparently packaged in the nif).
Usually Civ4 uses external .dds textures, that need to have size of a power of 2 (128,256, ...) - that i cant check, since the Textures are packaged.
While the nif viewer can display those units, the Civ4 ingine might not be able to do that - i do not know. At any rate its much more taxing on the hardware, than the default setup.
(The models beeing very high end overall - very high polycounts and huge texture memory)


Another thing - not cause of your problems, still:
There is no point incuding a normal and a _FX file wich are in fact identical (both Non Shader) - ie. with files that are about 2 MB. Just point both <Nif> and <shaderNif> to the same file.
 
A question on the side - are the units displayed properly in the pedia (or any other game screen) ? If so then the jpg textures are not responcible...
 
Copy the Cruiser KFM, all the KF und judt to be sure the Cruiser.nif (since it's referenced in the file) into the Ambassador folder. Now keep the <Nif> and <ShaderNif> pointing to the Ambassador files, but redirect the <Kfm> definitions to the Cruiser.kfm.

i´m not 100% sure but i believe to remember that i got also a python error as i tried to play around with animation and didn´t had the nif the kfm file refered in the folder, so perhpas it´s good as first try to copy the cruiser.nif in the folder of a ship and try it again
 
Well as i said - i wasn't sure if jpg will work or not - apparently it does.

I think the "Original Animation Voodoo" i described above should solve your problem then.

Otherwise - the Starfleet Command series should be a good source for meshes - there are plenty of very good fan made meshes, that are about the same specs as civ4, and importers do exist to get those meshes into max.

so perhpas it´s good as first try to copy the cruiser.nif in the folder of a ship and try it again
It might indeed be enought already.
 
Thanks Refar, I'll chalk it up to inexperience working with .NIFs, and not knowing the ins and outs of KFM and KF files. I'll play around with the files and work with what you said.
 
Out of curiosity (and because it might pop up again somewhere) - what solved it ? Was just copying the nif as Coyote suggested enought ? Or complete original animations ? Or something completely different ...
 
For ships based on the FF Cruiser, the solution was putting the original KFM and KF files associated with the Cruiser model from FF(ones not reformatted by a converter), plus the original Cruiser.nif file in with the modified ship. And I got rid of the entra ***_FX.nif model.

Likewise, models based on the FF Destroyer are done the same way.

So, as an example, the Ambassador ship folder just looks like this:
---
Ambassador.nif
Cruiser.kfm
Cruiser.nif
Cruiser_MD_Damage_Ship_Texture_DamTexture1.kf
Cruiser_MD_Damage_Ship_Texture_DamTexture2.kf
Cruiser_MD_Damage_Ship_Texture_DamTexture3.kf
Cruiser_MD_Damage_Ship_Texture_DamTexture4.kf
Cruiser_MD_DieA.kf
Cruiser_MD_DieA_Fade.kf
Cruiser_MD_FortifyA.kf
Cruiser_MD_FortifyA_Idle.kf
Cruiser_MD_HurtA.kf
Cruiser_MD_Idle.kf
Cruiser_MD_Run.kf
Cruiser_MD_StrikeA.kf
Cruiser_MD_XFadeIn.kf
Cruiser_MD_XFadeOut.kf
-----
 
even out of curiosity, did you tried only to copy the FF cruiser.nif where the model was based on the FF cruiser (with the changed kfm and the renamed (changed) kf files)? [as Refar said: it´s still not clear if using the KFM editor can break something in the kfm or not]
 
I tried a number of different methods before getting to something that worked. I'm not sure if I did drop the model in by itself or not, I will try it on one of the failed models later to see if it does work.
 
Back
Top Bottom