Jump to content

Recommended Posts

View File

This is a small SKSE plugin that I needed in order to rotate skeleton bones programatically.

 

I think there was no way to do this using existing Papyrus functions. Maybe because rotating specific bones it's not that useful.

 

There is the limitation that bones must not be affected by animations / Havok / HDT or the rotation you set is overwritten by the other animation systems. I'm using this with the dummy CME bones from XP32 Maximum Skeleton Extended version 2.06.

 

The SKSE plugin adds a new Papyrus script (SkeletonUtils.pex) that provides these funcions:

float Function GetNodeRotationX(ObjectReference ref, string node, bool firstPerson) native globalfloat Function GetNodeRotationY(ObjectReference ref, string node, bool firstPerson) native globalfloat Function GetNodeRotationZ(ObjectReference ref, string node, bool firstPerson) native global; examples:; SkeletonUtils.SetNodeRotationX(Game.GetPlayer(), "CME Genitals03 [Gen03]", -45.0, false); SkeletonUtils.SetNodeRotationZ(Game.GetPlayer(), "CME Genitals03 [Gen03]", 45.0, false)Function SetNodeRotationX(ObjectReference ref, string node, float x, bool firstPerson) native globalFunction SetNodeRotationY(ObjectReference ref, string node, float y, bool firstPerson) native globalFunction SetNodeRotationZ(ObjectReference ref, string node, float z, bool firstPerson) native global; this is like calling the 3 previous functionsFunction SetNodeRotation(ObjectReference ref, string node, float x, float y, float z, bool firstPerson) native global

Requires SKSE 1.07.01 or higher.

The C++ source files are in the archive if you want to take a look.


 

Link to comment

Using proper animations will be always better.

 

Theorically yes, I tested with the CME head and pelvis bones and it works. But I'd expect awful results. This won't prevent other animations from happening so you would see the arms idle animation with your added rotation. Horrible.

Rotating a lot of bones could be also inefficient.

Link to comment

Only ECE was flawed with Havok stuff, I think, newer SKSE implementations handle havok animations on translations and rotations nodes properly.

 

I still lhave to correct the weapon node chaos in XPMSE until I can do my tests with rotation on Havok node. It's also the only way to do corrections on these nodes because they are fixed by the hkx.

 

Edit: I will remove the overwritting SoS RM script on the next XPMSE2 update so you have the SoS + SoS CME bones exclusive for your plugin. Just used it as a small test script for translations with the new SKSE.

Link to comment

Using proper animations will be always better.

 

Theorically yes, I tested with the CME head and pelvis bones and it works. But I'd expect awful results. This won't prevent other animations from happening so you would see the arms idle animation with your added rotation. Horrible.

Rotating a lot of bones could be also inefficient.

 

Well but that is just the thing... with animations I imagine you can't really give one animation priority over another (unlike other games/simulators), but if you have full control over the bones, couldn't you just, say, take all the bones on both arms and adjust them upon wearing the cuffs? It would be kind of like giving the cuffs "animation" (an actual bone rotation) a higher priority than the idle animation itself, wouldn't it?

Link to comment

Edit: I will remove the overwritting SoS RM script on the next XPMSE2 update so you have the SoS + SoS CME bones exclusive for your plugin. Just used it as a small test script for translations with the new SKSE.

About the RM plugins, the sliders could be added in different plugins, there is no need to overwrite. For example, there are the scaling plugin and the rotation plugin, and you could have the translation plugin.

As rotation is not overriden by SOS scripts there is no need to disable SOS scaling feature in order to use that RM plugin. I guess it's the same for translation.

I've been doing some tests scaling the CME nodes. I think they behave as the NPC SOS nodes, except the Genitals01 node that is a bit different, I don't know why.

 

 

 

Using proper animations will be always better.

 

Theorically yes, I tested with the CME head and pelvis bones and it works. But I'd expect awful results. This won't prevent other animations from happening so you would see the arms idle animation with your added rotation. Horrible.

Rotating a lot of bones could be also inefficient.

 

Well but that is just the thing... with animations I imagine you can't really give one animation priority over another (unlike other games/simulators), but if you have full control over the bones, couldn't you just, say, take all the bones on both arms and adjust them upon wearing the cuffs? It would be kind of like giving the cuffs "animation" (an actual bone rotation) a higher priority than the idle animation itself, wouldn't it?

 

Give it a try and you'll see what I mean.

Animations do have some kind of priority actually. For example vanilla hands-on-back animation prevents the walking animation from swaying the arms, not sure how.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use