Glow/flame effects turn magenta when importing Balor/Meshabber/Mage FFH2 units HELP!

euskingc

Chieftain
Joined
Oct 22, 2008
Messages
72
As the title says, when I import certain units from FFH2 into a new modfolder, certain effects of the units (flames, glowing, etc.) jut kind of create a magenta flashing haze instead. So my question is, what has been done in the FFH2 modfolder that allows these effects to display correctly, and what are the steps one would take to implement them?

It goes without saying I'll be looking around for answers, but links to any relevant threads are also welcome.
 
This is just a shot in the dark, because I don't have FFH or even BtS on hand right now, but there's an additional graphics category called effects that contains stuff like the city fires during unrest or the bird animation when entering forests. It could be that the flame effects are defined there as well - it has its own XML file if I'm not mistaken.
 
From what else I've found in there that I can identify, it looks possible that you are indeed correct, and I appreciate you helping me out, by the way!

Apparently dragon breath is in there, in which case, from my uneducated perspective, it could make sense that the balor flames would be there as well.
One thing is not clear to me though. Could you hazard a guess as to where or how a unit is connected to the type tags in Civ4EffectInfos?
At any rate I'll start playing with it again tomorrow. Regardless of whether or not the answer is here, I do want a better understanding of the xml file anyways.
 
From what else I've found in there that I can identify, it looks possible that you are indeed correct, and I appreciate you helping me out, by the way!

Apparently dragon breath is in there, in which case, from my uneducated perspective, it could make sense that the balor flames would be there as well.
One thing is not clear to me though. Could you hazard a guess as to where or how a unit is connected to the type tags in Civ4EffectInfos?
At any rate I'll start playing with it again tomorrow. Regardless of whether or not the answer is here, I do want a better understanding of the xml file anyways.
The effect that is triggered during an unit's animation is defined in the corresponding kf file (which are the animation files). Where the effect will be triggered is defined in the unit's nif file (which is the units mesh & bones file).

For example, the archer_md_rangedstrike.kf file has in its NiTextKeyExtraData the fourth Text Keys entry: 0.3000 / Effect:Effect_ArrowFire:EFFECT_ARCHERARROW. This means that 0.3 seconds after the animation started the EFFECT_ARCHERARROW will be triggered from the position defined by the NiNode Effect_ArrowFire in the archer.nif file.

To open kf and nif files you can use NifSkope, which can be freely downloaded from here.

Hope this helps. :)
 
It definitely is helping, and it certainly gives me a new appreciation for what you graphics folks do.

I can see everything you're telling me, but I do have one question with regards to your example:
Is Effect_ArrowFire itself used in any xml file, or just effect_archerarrow?


In the case of Meshabber... given that artdefines_unit has him using just the plain old vanilla Swordsman.kfm, I presume then that the fire aura/flames that surrounds him at all times (including in the civilopedia) even if he isn't actually doing anything, must be referenced somewhere in the .nif file itself? Does that stand to reason?

When I open his file, I am surprised to see nif files referenced in the 4 and 5 NiNodes that aren't even in the same folder as his .nif... there is more depth here than I had imagined.
And looking at it, several .dds files as well that are scattered over different folders (that I haven't transferred over to my mod folder either). And the magenta en lieu of what's supposed to be there generally indicates a mismatch between what's supposed to be there and where you're telling it to find it.

Since I did not transfer over all these .dds files referenced in the .nif, nor the other .nifs that are being referenced within Meshabber's .nif, could that in fact be the culprit?
And if I do transfer them over, do I have to meticulously recreate the directory structures of the source mod, or can I simply throw all the missing files into one folder and within the meshabber .nif itself, simply redefine the filepaths where it is looking for these referenced files?


*EDIT*

SUCCESS! At least for Meshabber.
I seemed to have answered both of my last questions. The referenced files that were missing seem to have indeed been the problem, and... if I right-click on a referenced texture within the nif it seems to let me choose whatever file path I want for whatever textures are being referenced.

But my question about effect_arrowfire still remains.

Thank you both a ton. I wasn't intending to play with this aspect of the game for some time... I may not have figured it out anytime soon, perhaps not at all.
I feel like a bigger, more overwhelming world than I had ever imagined has just opened up to me. But it's slowly starting to make sense how it works.
 
Spoke a little too soon. I've figured out, I think, how to change the file path for textures referenced, but it is referencing two other .nif files in the 4th and 5th NiNodes. One is for another unit (manegloss(swordsman).nif) and the other is for a file I can't find anywhere that doesn't seem to exist: hammer.nif.
What's going on here, how can I change the file path, and since it isn't using one of them anyways, that I can tell, does it even need it at all?
 
Effect_ArrowFire is the name of the node in the nif file, EFFECT_ARCHERARROW the name of the effect defined in the Civ4EffectInfos.xml file. I have written an tutorial about this some time ago, maybe it will help you further:

http://forums.civfanatics.com/showthread.php?t=435755

And while we are at it, this is a very good collection of helpful tutorials for NifSkope as a whole:

http://forums.civfanatics.com/showthread.php?t=305606

I do not know if the permanent auras are mentioned somewhere in there, but in fact they are rather easy to add. For example, for the scientist all that is necessary to create the aura effect are marked red here:
Spoiler :

attachment.php


The ATTACHABLE_HIGHLIGHT_SCIENTIST is defined in the CIV4AttachableInfos.xml.

There are also other ways to attach things like fire, like in this example for a torch fire:
Spoiler :

attachment.php


There is however a lot of stuff going on in there and I am not too sure myself how it works, but at least it does work.

In the second image you can see that the parent NiNode in question is named "fx_fire_torch.nif". This however does not imply that there is an actual fx_fire_torch.nif file needed in the folder (or anywhere else), it is just the name of the node. As far as I know no nif files needs any other nif file to work, but the animation might (for example the arrow fired by the archer is a separated nif).

For the dds files, if it is defined without any file structure (only "Archer_128.dds" for example) than it will automatically search in the same folder as the nif file for the dds file. If a folder structure is defined, than it will follow this structure. However, there is often also a "shared" folder in the art folder. The dds files in this folder will also be used if no folder structure is defined.
 

Attachments

  • scientist_effect.jpg
    scientist_effect.jpg
    158.4 KB · Views: 105
  • torch_fire_effect.jpg
    torch_fire_effect.jpg
    181.7 KB · Views: 97
That is excellent.
You have clearly answered all of my questions about it so far. Everything is now working as it should. I owe you my thanks!

I am grateful also for the tutorials. I'm approaching my project as a learning project, and this information is definitely on the list. And, thanks to this unexpected obstacle and your help with it, I feel like I already have a good head start with this aspect.
=)
 
That is excellent.
You have clearly answered all of my questions about it so far. Everything is now working as it should. I owe you my thanks!

I am grateful also for the tutorials. I'm approaching my project as a learning project, and this information is definitely on the list. And, thanks to this unexpected obstacle and your help with it, I feel like I already have a good head start with this aspect.
=)
No problem, I am always happy when I can be helpful. :)
 
Back
Top Bottom