Jump to content

Non Actor Nifscope Animations with BGED Data And Animation Events.


ajs52698

Recommended Posts

I've reached a turning point in my mod where I need to register for animation events, but information on hkx animations seems to be solely focused on actors and not other objects such as activators. Could anyone shed some light on the setup for Gamebryo animations which use hkx data. As a side note, my sole purpose for using the hkx data with nif animations is so I can tell when animation is at a certain point, that's all the functionality I require.

It is my understanding that some nif's have animations that aren’t Havok based but still use hkx data. The example in which I used to better understand these files was the WorkshopBell nif. It’s animations are not Havok based (if I am not mistaken) and it references the events in the hkx file. Because of this, and my exploration of the hkx files, I believe that these hkx files would be easy to modify, create and setup compared to animations which use havok. Is my assumption correct? Now for what i’ve done. In an attempt to create my own setup like the workshop bell nif, I converted the hkx files to xml, edited the proper fields and converted back to hkx. As far as i’m aware, the process hasn’t broken the hkx file. Where the issue lies is when I go to reference the file in NifScope under the bged node. Before I go further I would like to say that I am using the PlayAnimation and RegisterforAnimationevent functions to test, so this is how I tell whether things are working correctly. Changing the hkx path, results in no animations playing or register returning true. Based off this, my assumption is that the hkx file is expected from somewhere. Now for actor animations, these paths are setup in the editor. But for these nifs under “GenericBehaviors”, I have yet to find any reference in the ck or in any file, except for “AnimationFiledData”. I'm certain there not referenced in the HKX files themselves as i’ve combed through already. Is this because bethesda only exposed subgraph and what not for actors and not other objects? Or is there some piece of the puzzle i'm missing?

Lastly, my apologies for the massive paragraphs. I’m also very aware of all the animation tutorials out there and posts, but I felt like there isn’t much information on this specific topic.

Link to comment
Share on other sites

What sort of object are you trying to animate? The workshop bell nif uses a pretty common BGED reference which I've used on a number of different objects. I am by no means an expert at scripting or animating, but I've been able to get my objects to animate the way I want using the StagesNoLoops.hkx along with the RegisterForAnimationEvent function. If your mesh animation has no more than 4 stages and you only need to register for one event per animation cycle, you should be able to just use the same BGED as the workshop bell.

As far as I know, the RegisterForAnimationEvent function only recognizes the reset event in the StagesNoLoops.hkx, so that's why I say you can only reference one event per cycle. I'm sure there are more complex vanilla hkx files that might allow for more than one event, but since I was able to achieve the results I was looking for using StagesNoLoops, I never looked any further into the matter.

It's been a while since I set up a nif for animating in this manner, but if memory serves I was only able to use the reset event in the final NiControllerSequence. It seems to me that I tried using it in earlier stages without any luck, but I could be mistaken. Also, I have been able to create a few custom hkx files that extend the number of stages beyond the 4 set forth in the StagesNoLoops.hkx, but for the most part, that's the only experience I have with custom hkx creation.

 

You're correct that there isn't a lot of information out there regarding this type of animating and since I tend to write in massive paragraphs as well, I have no issues with reading a wall of text. Let me know if there's anything I can help you with.

Link to comment
Share on other sites

When you created these custom hkx files, did you have trouble with the BGED file reference? From what iv'e experienced, if I try to reference a different directory than genericbehaviors/whatever behavior, the two functioned I mentioned fail to run. It could be an error on my part with the editing, your input could help me figure our if it is.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...