b3lisario Posted September 9, 2014 Share Posted September 9, 2014 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. Submitter b3lisario Submitted 09/09/2014 Category Modders Resources Requires SKSE 1.07.01 Special Edition Compatible Link to comment
MonaBabii Posted September 9, 2014 Share Posted September 9, 2014 So people could use this for, say, making you wear a pair of cuffs and making it so your arms get bound behind your back -without- the need for a special bound animation? Is that the kind of "bone rotation" you're achieving or am I getting that wrong? Link to comment
b3lisario Posted September 9, 2014 Author Share Posted September 9, 2014 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
Groovtama Posted September 9, 2014 Share Posted September 9, 2014 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
MonaBabii Posted September 9, 2014 Share Posted September 9, 2014 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
b3lisario Posted September 10, 2014 Author Share Posted September 10, 2014 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
MonaBabii Posted September 10, 2014 Share Posted September 10, 2014 Ah okay. Oh well! Still nice! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now