Jump to content

Skyrim Furniture [solved]


Recommended Posts

A couple of you have helped me out and I have it working! I'm going to remove the files I attached from this post and re-post a better version of them with everything in the right places (hopefully) and with some of my other furniture. Thank you to Zaz Chris and zax for the help! 

 

Hi everyone!  I've been kind of lurking for a while, but I finally decided to register.  Most of you seem very nice!

I've been experimenting with furniture in the Skyrim CK, and I have managed to make some fun devices that work correctly for player use - mostly kinky torture, and some hard torture.  I've run into one that I can't quite get to work properly, though.

Most of what I've done is a static mesh with a furniture node and collider, so the player can run up and use the furniture.  The player is moved to the right place, and all of the animation works right - even with IFP.  So I decided to try something more fun, and create an animated mesh for the furniture.

Ouch. It has been long and hard, and I'm ALMOST there.  I did the modeling and animation in Maya on a Mac (because the animation is extremely complex, and I can't seem to figure out how to do it in Max), deleted a whole lot of history and froze all of the transforms, exported it to FBX, rebooted to Windows, imported it to Max, cleaned it up with lots of transform freezes and resets again, and exported to Nif.  After that, I opened it in NifSkope and did more cleaning up and looking at vanilla meshes.  The mesh animates perfectly in Max, in NifSkope, and even in the Creation Kit, but when I get it in game, it won't animate no matter what I do.  I'm using PlayAnimation() to start it when the player uses the furniture. It DOES print the "Machine animation failed" message I put in the code.  I just wish I could get Papyrus to give me something more specific!

Here's the code I'm using.


Scriptname wncRapingMachineScript extends ObjectReference  



event onActivate(ObjectReference activator)



    ; keep the player from escaping her fate

    Game.disablePlayerControls(1, 1, 0, 0, 1, 0, 1, 0, 0)



    ; play the animation

    if (!playGamebryoAnimation("rape", true, 0.0))

        Debug.notification("Machine animation failed")

    endif



    ; wait for it to end

    registerForSingleUpdate(99.667)



endEvent



event onUpdate()



    ; let her go

    Game.enablePlayerControls(1, 1, 1, 1, 1, 1, 1, 1, 0)



endEvent

The animation string "rape" shows up in the CK in the furniture preview, and it even plays perfectly. I tried adding some whitespace after the string in my code, just in case it was gaining a space at the end or something. I double-checked everything in NifSkope, and as far as I can tell, it's the same structure as in vanilla animated meshes. I compared it with Chest01 .nif.

Here's those screen shots I promised.

 

Creation kit screenshot:

 

post-503927-0-16781300-1405727643_thumb.jpg

 

In 3ds Max:

 

post-503927-0-46631600-1405727643_thumb.jpg

 

In NifSkope:

 

post-503927-0-73261700-1405727643_thumb.jpg

 

In game:

 

post-503927-0-46582100-1405730143_thumb.jpg

 

 

I can get it to show up in-game, and like all of my other furniture assets, I can run up, use it, get moved to the right place, and all my own animations play, but the machine mesh won't move.  If anyone knows what is going wrong, I would appreciate some help. If anyone is interested, I'll post the mod (BETA ALPHA MESSY EXPERIMENT!) including this mesh. I'd like to get the best part working first, though!

 

EDIT: Added a screenshot of it (not) working in-game.

Edited by WhippinGirl
Link to comment

Thank you for the reply!

 

Unforunately, neither one worked. That gave me another idea, which was checking the havok collider for that sort of thing in the nif file. I changed some flags on advice from the documentation, but it didn't help either.

 

Edit: I just realized that it's no longer giving the notification that the anim failed.  It's still not moving, though.  Maybe that's part of it.

 

I guess I'm going to go back to static meshes, at least for tonight.

Link to comment

Did you check how they do it in vanilla nifs? Grain mill for example (if I remember correctly it was scripted because default activation animation didnt work in this case - not sure why though).

 

Maybe the nif structure is fcked up or perhaps its not supposed to work on furnitures?

Link to comment

I got it!

 

Let me go over my whole process, in case it helps anyone else.

 

First, I went into 3D Studio Max and posed my character with a stand-in table.  I exported this to FBX.

 

Next, I switched to Maya and imported it. I made my model around the exported character and stand-in, and then animated it. I deleted the stand-in and exported character so that all I had was the model and its animation. I had to bake the animation, because it had a lot of constraints and driven keys and such.

 

Here's where it got weird. Autodesk's FBX exporters don't keep information on pivot points, so I had to un-parent all of the animated pieces and move them to the origin. I froze and reset all of the transforms, and deleted all of the history, and then exported to an ASCII FBX.

 

I went into the ASCII FBX and found the GlobalSettings section of the XML.  In there, it has a setting called UnitScaleFactor.  I changed this to 4.7.  I don't exactly remember the math that went into this, unfortunately, but it had to do with converting from the Maya measurement units to the 3D Studio Max units.

 

Next, I went into Max and opened the scene I had so far, removed the stand-in table, and imported my model. Now I had to undo the damage I did to the heirarchy.  I re-aligned all of the pieces the way they were supposed to be, and linked them. Then I froze all of my transforms that I could. For some reason, you can't freeze scale transforms in Max.

 

My next step was to export the character animation. I've always used xp32's animation tutorial, and that went smoothly.

 

The next step was brand new to me, and zax got me down the trail to find it. (Thanks zax!) Nif animations don't completely work on furniture, so you need to use a havok animation along with it. I'm not really sure if you really need both, but the vanilla ones have both. You create a text file with all of the animated nodes in it, and use it as a bones file the same way you would with a character animation. You also need to create the "start" and "end" notes on a note track in the dope sheet. The note track needs to be on the top-level object in the heriarchy.

 

After that, I exported the model using NifTools. I picked the Skyrim preset. Checked boxes: Hidden nodes; collision; flatten heirarchy; update tangent space; collapse transforms; zero transforms; sort nodes. In the Animation section, I picked Nif with Animation, and checked Transforms. It never seems to matter if I choose BSFadeNode or NiNode, but I do BSFadeNode anyway.

 

Then I opened the model in NifSkope. I had to adjust the alignment of all of the pieces again, but that wasn't too bad. Now I had to add some nodes - after converting the top-level node to a BSFadeNode.

 

First, a BSFurnitureMarkerNode - one position, with a "sit" animation type. The text should be FRN.

 

Second, a BSXFlags. I set the integer data to 523. The highest order bit is marked as "unknown" in Nifskope, but it was set on the vanilla meshes. The others are enable animation, enable collision, and enable havok. The text tag on it is BSX.

 

Third, I had to point it at the hkx file with a BSBehaviorGraphExtraData node. I set the Behavior Graph File to the path where I put my hkx file, and left the rest. The text tag needs to be BGED.

 

I added an NiControllerManager as a child of that last one, with an NiMultiTargetTransformController under it. The target is the top-level BSFadeNode. Then I added the rest of the animated nodes as extra targets.

 

Next was a NiControllerSequence as a child of the NiMultiTargetTransformController. The text tag should be the name of the animation. Set the controlled blocks to the animated parts. I'm not sure how the order is determined, but it does matter. The start and stop times are in seconds.

 

I added in a bhkCollisionObject so the player can activate it. That part's important. Edit: Also important - In bhkRigidBody, find the entry called "Unknown 7 Shorts" and MAKE SURE that they're all zero. In particular, if the 4th or 5th elements are zero, it will CRASH the CK.

 

This next part is something I think everyone knows, but I'll document it anyway. It's the static furniture stuff, and it's the same both ways.

 

First, make the character animation and export it.  xp32 has a great tutorial on it.

 

Second, make a text file with a furniture animation defined.  It will look like this:

fu -a <animation_name>_Enter <path_to_animation>. hkx
+ <animation_name>_Loop <path_to_animation>. hkx
+ -a <animation_name>_Exit <path_to_exit_animation>. hkx

No spaces before hkx.  That's for the benefit of the forum system, because it still thinks I'm trying to post a link. :P

 

Put it in the same folder as your animations and run Fore's modder tool. Pick that file. It will create a behavior file for you. It should be next to the text file.

 

Run Fore's user tool. It will put the animation in the behavior graph.

 

Open the creation kit and your mod. Go to World objects->Furniture. Right-click in the right window and click New. Make sure it has a name, or the player won't be able to activate it.

 

Choose your furniture model. I don't think it needs a marker model.  Add FurnitureSpecial to the keywords. You also need to create a keyword for all of your furniture, and another for this specific furniture.  Add them both. If you're not using an animated mesh, you might want to check "Random Anim start" so you can put several of them next to each other, and they aren't playing the animation in unison.

 

Make sure you have a sit marker checked and save the object.

 

Go to Gameplay->Animations. Expand Actors\Character\Behaviors\0_Master. hkx, then ActionActivate, then ActivateRootChar. Add a child node to ActivateRootChar. Name it for your furniture mod. LEAVE ANIM EVENT BLANK FOR ALL OF THESE. Add these conditions:

 

Run on: subject; Function: isChild; Comparator: !=; Value: 1. 0   AND

Run on: target; Function: hasKeyword; function info: yourKeywordForYourMod; comparator: ==; Value: 1. 0   AND

Run on: subject; Function: isFurnitureAnimType; Function info: sit; Comparator: ==; Value: 1. 0

 

Now make a child of that node and name it for your specific furniture. No anim event, still. Add the condition:

 

Run on: target; Function: hasKeyword; function info: yourKeywordForThisFurniture; comparator: ==; value: 1. 0

 

Add THREE children to that one. Name them as follows:

 

<yourAnimationName>EnterInstant

<yourAnimationName>Enter

<yourAnimationName>Exit

 

To the first one, set the anim event to your loop animation. It should be on the drop list with the name you gave it in that text file. Add the condition:

 

Run on: subject; Function: isEnteringInteractionQuick; Comparator: ==; Value: 1. 0

 

Second one, set the same anim event. Conditions:

 

Run on: subject; Function: isEnteringInteractionQuick; Comparator: ==; Value: 0. 0    AND

Run on: subject; Function: getSitting; Comparator: ==; Value: 2. 00

 

Last one, set your exit anim event. Conditions:

 

Run on: subject; Function getSitting; Comparator: >=; Value: 3. 00 AND

Run on: subject; Function getSitting; Comparator: <=; Value: 4. 00

 

Finally, an animated furniture mesh needs something to tell it to start playing its animation.  The one in my first post works nicely, if you add zax's recommended function.

 

Whew! Unless I missed something in there, that should make furniture work.

 

I'm also going to attach the assets I created so everyone can look at it. Edit: I've removed these files in favor of better ones. You can get them here.

 

WARNING! These are totally experimental, and I only barely know how they work.  If they don't work for you, I probably don't know how to help you! They're only for study so we can all figure out how to do this.

 

NOT READY FOR THE MASSES YET!!!

 

PLEASE let me know if I left something out of the zip! And PLEASE let me know if I skipped a step!

 

Edit: Added a skipped step.

Edit2: Added ANOTHER skipped step. :P

Edit99999999999: Now with textures in the right place.

Link to comment

I was actually going to wait until I got everything working and make a nice clean esp. My working one is a mess. Then again I guess no one can see what I did in the toolset if I don't provide an esp.

 

Oops, I also left out the script! I just put that in there, too. I updated the file in my last post. Best results with Immersive First Person enabled. At least, I think so. :)

 

Please keep in mind that I barely know how it works myself, so if you can't get it to work, I don't think I would be able to help much. It's really just a proof of concept.

 

Chris, it's your animation packs that got me inspired to do this! I'm sort of spoiled on 3D apps, though. I can't stand anything other than Maya. LOL Maybe it's just that I don't know Max or Blender well enough.

 

Edit: The machine is just outside Whiterun in the alcove to the immediate right as you leave, right by the stairs up to the battlement. It's just a little room with the machine in it and water coming out of the wall seemingly from nowhere. :P

Link to comment

FNIS complains about missing behavior files too.

Textures were just not in the correct folder (according to the meshes)

 

I get this from FNIS:

>>Warning: AnimationList found in  "Animations\WhipsNChains", but no corresponding Behavior file. Incomplete mod IGNORED.<<
Link to comment

More things that were messed up: folder structure (textures/ ?), missing/renamed animation(s),  missing behavior file.

 

It had no collision object and possibly furniture marker is too low on the ground level (but it could be due to missing animations).

 

You probably got it all fixed in original version, so the only thing that matters is collision.

Link to comment

is there a version for noobs so they just slap it into data folder with a esp ?

 

maybe a spell to place it ?

 

To be honest, it's not really ready for public consumption just yet. I'm still learning the process to make it and maybe smooth it out a little, and Zaz Chris is working on the textures and collision (thanks Chris! :D). Give us some time so we can make it more friendly. I'm glad you like it enough to be interested!

Link to comment

More things that were messed up: folder structure (textures/ ?), missing/renamed animation(s),  missing behavior file.

 

It had no collision object and possibly furniture marker is too low on the ground level (but it could be due to missing animations).

 

You probably got it all fixed in original version, so the only thing that matters is collision.

 

Thank you! I got the textures moved into the right place now. Zip file updated. (Again!)

 

It's kind of strange. For all of my furniture, it seems that it's just slightly off, but if I scale the reference down to 0.97 in the CK, it works perfectly. Not sure why this is. I tried shrinking the parent node in Nifskope, but that didn't work. I thought it was because of my race scale, but the RaceToScale keyword didn't do anything.

 

It looks interesting, would be great to put it in my house, to punish bad followers or me lol

 

Usually me! LOL

Link to comment

 

is there a version for noobs so they just slap it into data folder with a esp ?

 

maybe a spell to place it ?

 

To be honest, it's not really ready for public consumption just yet. I'm still learning the process to make it and maybe smooth it out a little, and Zaz Chris is working on the textures and collision (thanks Chris! :D). Give us some time so we can make it more friendly. I'm glad you like it enough to be interested!

 

 

If you have finished the furniture, may i integrate it in my mod or allow tZaZ Chris integrate it in his Package?

I wood then make it a placeable furniture like i did with some of the ZaZ furnitures.

 

Moin

Oli

Link to comment

Right so , :)

Looked through the ESP and files Made some changes and corrections .

 

*Was there any Actor Animations ? Because the animation in the \Data\meshes\actors\character\animations\WhipsNChains  sorta made the actor lie flat on the floor 

*So I cooked up an looping animation and also an weak Enter Animation

*Changes Made to the FNIS_WhipsNChains_List.txt ( Have a look cause there were errors in List before and also the folder itself) 

*Added Collision to the Mesh  ( Need check on higher end PC's cause I frame a little when bumping into it )

*Had to Edit and Move parts within the Mesh a bit .  Arm Restraints are a bit larger now and the part of the table is moved a little up to  accommodate the animation.

*Edited the esp to move the mesh a little lower

 

Testing 

 

post-8713-0-13869800-1406027521_thumb.jpgpost-8713-0-08740800-1406027527_thumb.jpg

 

 #For the love of God RUN FNIS 

1. You Probably Need to Re-height your Character Currently I'm using a Nord had to set height to .98 in racemenu ( height editing is necessary for these type of furniture) 

2.Once seated you cant get up for 99 seconds , thats the way the script is set 

 

 

 

Fucking Machine ZaZ Modifed.rar

 

Bugs & Things which can be worked upon

1.When entering First person Mode and you move your view around the character moves too ( Which is strange , but I think it has something to do with the disable player controls in the furniture script itself  ) I don't use immersive FPV

2.The current  exit animation launches you right in the middle of the Mesh and gives you a real bumpy ride, Will fix it later.

3.The Dildo could be raised a bit higher ,right now it looks like its penetrating the butt Which is okay I mean but its up to you 

 

 

Thank you for Making this , I was waiting for someone to make a simple furniture like this so I could see the scripts ( I suck at Scripting ) and the way BGED works. I'm sure Xaz &  I will use your Mod's example and make more stuff 

Hope to expect more things 

 

Cheers

 

 

PS: If and when you are ready and satisfied   with your mod  and want it to be added to ZAP  , We will do the needful and definitely credit you  Cheers

 

 

Link to comment

 

 

is there a version for noobs so they just slap it into data folder with a esp ?

 

maybe a spell to place it ?

 

To be honest, it's not really ready for public consumption just yet. I'm still learning the process to make it and maybe smooth it out a little, and Zaz Chris is working on the textures and collision (thanks Chris! :D). Give us some time so we can make it more friendly. I'm glad you like it enough to be interested!

 

 

If you have finished the furniture, may i integrate it in my mod or allow tZaZ Chris integrate it in his Package?

I wood then make it a placeable furniture like i did with some of the ZaZ furnitures.

 

Moin

Oli

 

 

I had two reasons for doing this. One, I like it. Two, to give back to the community for all of the fun I've had with Sexlab. So yes, everyone has permission to use this.  GPL, anyone? LOL I'm just thrilled that so many people like it!

 

I also have a few other furnitures that i did - another version of crucifixion, another version of the wooden horse (variety for those), and a strappado. I have some animations that I did too, like a hogtie, but I don't think it's as good as the one that's already available.

 

Right so , :)

Looked through the ESP and files Made some changes and corrections .

 

*Was there any Actor Animations ? Because the animation in the \Data\meshes\actors\character\animations\WhipsNChains  sorta made the actor lie flat on the floor 

*So I cooked up an looping animation and also an weak Enter Animation

*Changes Made to the FNIS_WhipsNChains_List.txt ( Have a look cause there were errors in List before and also the folder itself) 

*Added Collision to the Mesh  ( Need check on higher end PC's cause I frame a little when bumping into it )

*Had to Edit and Move parts within the Mesh a bit .  Arm Restraints are a bit larger now and the part of the table is moved a little up to  accommodate the animation.

*Edited the esp to move the mesh a little lower

 

Testing 

 

attachicon.gifTESV 2014-07-22 16-23-17-69.jpgattachicon.gifTESV 2014-07-22 16-24-19-37.jpg

 

 #For the love of God RUN FNIS 

1. You Probably Need to Re-height your Character Currently I'm using a Nord had to set height to .98 in racemenu ( height editing is necessary for these type of furniture) 

2.Once seated you cant get up for 99 seconds , thats the way the script is set 

 

 

 

attachicon.gifFucking Machine ZaZ Modifed.rar

 

Bugs & Things which can be worked upon

1.When entering First person Mode and you move your view around the character moves too ( Which is strange , but I think it has something to do with the disable player controls in the furniture script itself  ) I don't use immersive FPV

2.The current  exit animation launches you right in the middle of the Mesh and gives you a real bumpy ride, Will fix it later.

3.The Dildo could be raised a bit higher ,right now it looks like its penetrating the butt Which is okay I mean but its up to you 

 

 

Thank you for Making this , I was waiting for someone to make a simple furniture like this so I could see the scripts ( I suck at Scripting ) and the way BGED works. I'm sure Xaz &  I will use your Mod's example and make more stuff 

Hope to expect more things 

 

Cheers

 

 

PS: If and when you are ready and satisfied   with your mod  and want it to be added to ZAP  , We will do the needful and definitely credit you  Cheers

I sort of designed it with IFP in mind, so I guess I shouldn't be surprised that there are problems with other ways of using it. If the player isn't using IFP, then we can use setRestrained() to keep her from turning while in first person. Or force third person? That would be an easy fix. We should be able to fix the exit with scripting - just have a marker to move the player to when released.

 

I'm using a custom race of my own to play. I can't remember if I made the race a little smaller than usual. Now that I think about it, I think I did, so maybe that's what's causing the scale issues. I scaled the furniture down by 0.97 in world to compensate, which is almost exactly what you had to scale UP by.

 

Scripting is probably my strongest point, so if you need a script, let me know and I'll see what I can do. I'm also working and going to school, though, so I might be a little slow to get something done if school gets heavy.

 

By the look of it, its supposed to be standalone mod. Lets wait for final version before we start "grabbing" its resources. :)

 

The mod was really just to demonstrate the furniture. I don't mind if people use it. Like I said, I want to give back to the community. But thank you for thinking about me!

Link to comment

*Was there any Actor Animations ? Because the animation in the \Data\meshes\actors\character\animations\WhipsNChains  sorta made the actor lie flat on the floor 

 

I just saw this. What skeleton are you using? I'm using the CHSBHC skeleton I got along with xp32's tutorial. Is there a better one to use?

 

I was going to post my other animations, but there's no point if they don't work right.

 

I'm not sure if it's helpful or not, but I attached the bone structure file of the skeleton I use.

CHSBHC bone Rig Breasts and Butt V2.3.txt

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