Jump to content

Devious Devices Framework Development/Beta


Recommended Posts

On 6/17/2021 at 9:05 PM, Vakir said:

These are nice! If you dont mind me asking. But do you have that Boxbinder straitjacket?, I'd like to test that out 

 

I never worked on it beyond the concept. Your asking about the boxbinder jacket made me realize I had forgotten about it.

 

 

On 6/19/2021 at 10:36 AM, naaitsab said:

I think it looks awesome, bit 50/50 on the default gloves and socks with the buckles. It's "realistic" but it does away with the clean esthetics. Perhaps both can be added and these could be added as a 'high security' variant.

 

Understandable but I suppose that's ultimately up to Kimy if she wants two versions of the gloves and socks.

 

 

27 minutes ago, Kimy said:

@UnEvenSteven: These models look great! :)

 

I am going to have a look at the files and merge them!

 

Pay close attention to the changes that were made in the .esp files ,mainly regarding the TextureSet and ArmorAddon changes. They're very important to insure all the catsuit devices appear correctly since I've made some changes to the shader and texture settings. Same goes for the pony boots.

 

Yes there are two files named "DDXSuitsUUNP" in the SliderSet folder for the UUNP version. However one is a .xml file and the other is an .osp file. At some point Outfit Studio changed how projects were saved so the .xml file is an older file while the .osp file is newer file.

 

All the changes I made to catsuit devices are now contained in the .osp file, the .xml file still contains the zipsuit items. Both files are needed.

 

Honestly the BodySlide folders for the CBBE and UUNP versions are a mess, additions and changes overtime have created an absolute cluster-fuck. I'm almost tempted to do a major clean up of the BodySlide folders, it wouldn't be too difficult just tedious and a bit time-consuming. 

 

Link to comment
On 6/20/2021 at 5:41 PM, Kimy said:

@UnEvenSteven: These models look great! :)

 

I am going to have a look at the files and merge them!

Be careful with the HDT catsuit. The UUNP Sliders are not 100% clipping free. This is true for the expansion original one, too, since I use DD. I changed the HDT catsuit long time ago to have the perfect fit, but don't know if it is just my game setting or if everyone has clipping in combination with some devices. The catsuit long Gloves from @UnEvenSteven , the restrictive gloves and the restrictive boots will have a clipping effect. I'm using the old one with the mask.dds and the new BSLightningShaderProperties. Working like a charm. The long gloves fit way better than the old ones.

 

On 6/20/2021 at 6:25 PM, UnEvenSteven said:

Honestly the BodySlide folders for the CBBE and UUNP versions are a mess, additions and changes overtime have created an absolute cluster-fuck. I'm almost tempted to do a major clean up of the BodySlide folders, it wouldn't be too difficult just tedious and a bit time-consuming. 

 

True.

There are still duplicates between DCL 9.0 and DD LE 5.1.

 

Link to comment
2 hours ago, Techpriest said:

@UnEvenSteven While you're at the catsuits. Could you remove the CBBE body mesh from them where applicable? It's present in some variants that don't even show skin at all and this results in some weird skin clipping. The Straitjackets have their upper torso part removed, but the catsuits have everything still present.

 

I'm in the process of cleaning up the CBBE BodySlide folders and I haven't noticed the body mesh still appearing alongside catsuits nor the straitjacket versions. Of course these are the LE versions as I don't convert them SE but others do. If you're using SE it's possible that during the conversion process the ReferenceBody was accidently left in. When I made the catsuit straitjackets I was very careful to remove catsuit or body parts that wouldn't be seen as they were underneath the jacket.

 

 

1 hour ago, Rogwar002 said:

Be careful with the HDT catsuit. The UUNP Sliders are not 100% clipping free. This is true for the expansion original one, too, since I use DD. I changed the HDT catsuit long time ago to have the perfect fit, but don't know if it is just my game setting or if everyone has clipping in combination with some devices. The catsuit long Gloves from @UnEvenSteven , the restrictive gloves and the restrictive boots will have a clipping effect. I'm using the old one with the mask.dds and the new BSLightningShaderProperties. Working like a charm. The long gloves fit way better than the old ones.

 

True.

There are still duplicates between DCL 9.0 and DD LE 5.1.

 

 

Yes the non-HDT variant of the UUNP catsuit is quite different than the HDT variant. The HDT version seems to have an overall better shape and the least amount of clipping. I created the new version of the CBBE catsuit from the UUNP HDT version because it seemed to be the best. 

 

Yeah I don't know why Cursed Loot continues to have it's own version of the catsuit. With the use of TextureSets no DD-based mod should be using a separate catsuit unless it's doing something significantly different with them.

Edited by UnEvenSteven
Link to comment
3 hours ago, naaitsab said:

@UnEvenSteven can you also add the transparant variant on the catsuit? For some reason that is not bundled in DD right now.

 

I'll take a look at it but not until I have finished the clean-up of the BodySlide folders. Looks like I may have to create a new version of the transparent catsuit, the existing one uses the older CBBE mesh that has whacky proportions.

 

The CBBE clean-up is complete, UUNP folders next.

Link to comment
On 6/17/2021 at 10:06 AM, UnEvenSteven said:

A little nervous to release this but I've done some modifications to the various catsuit devices. Despite the devices able to be locked there were no visible locks on any of them, I aimed to change that. I also changed some shader and texture settings in the .nifs so the catsuit items will have a similar look and shine to other ebonite devices. Finally I also altered the red and white textures to closely match the coloring of existing red and white ebonite devices.

 

Added a lock to the zipper tab on the catsuit (may be removed if people don't like it):

  Reveal hidden contents

ScreenShot01.png.a80efb1d5e3243932f80693c7a39d82f.png

 

New gloves with cuffs. These are cut-down versions of long gloves since the existing pair of gloves were terrible. And no there are not longer gaps in the forearm when wearing them without catsuit:

  Reveal hidden contents

ScreenShot02.png.052aa018a098a00474f7102f4839b8bc.png

 

Ballet boots with cuffs, these don't conflict with ankle chains or other leg cuffs:

  Reveal hidden contents

ScreenShot03.png.9d18fdd2739419d3ba8c36ab25c3853a.png

 

Long Gloves with two cuffs, for extra security:

  Reveal hidden contents

ScreenShot04.png.019d24c3c976cb6e568cfd8bcd6bf82c.png

 

"Socks" with cuffs, might seem odd but these are lockable devices:

  Reveal hidden contents

ScreenShot05.png.0d17a98364a43b55fa93be20f3a59dc7.png

 

Updated the collar to have a padlock:

  Reveal hidden contents

ScreenShot06.png.1cdccdaac8bb85dfda4d1825cfadc85e.png

 

 

As I've stated and you may have noticed, the red and white textures are no longer nuclear-bright. They match far better with existing red and white ebonite devices:

  Reveal hidden contents

ScreenShot07.png.62fd09117b0a0cb1633b0fbdd721840c.pngScreenShot08.png.0f003b526b125636947de078bde65211.png

 

The file includes CBBE and UUNP BodySlide options and updates the first-person meshes to use the various new shader and texture settings. The included .esp contains the necessary changes to TextureSets and ArmorAddon entries that are used for the red and white versions so everything appears correctly. Yes all the cuffs just use the collar mesh, I did this for consistency and it wouldn't require re-textures.

 

Earlier versions I worked on were using the cuffs from restrictive gloves. They looked great for the black, red and white versions but would have required multiple re-textures for all the other colors catsuit devices have. I'm no texture artist and even re-coloring is difficult and I didn't want to rely on anyone else to complete this overhaul.

 

There's also something else I did, I have added some cuffs to the pony boots. As with the catsuit devices these are lockable but didn't have any visible locks:

  Reveal hidden contents

ScreenShot09.png.b52fab81328f934f0e97b9254d03dc9c.pngScreenShot10.png.eb4df7e43bb043e69480d2b4e29ec303.pngScreenShot11.png.1d46f4caee30f8b888fd74dc41b4cd09.png

 

These changes cover the leather and ebonite versions, CBBE and UUNP sliders included. The .esp has the required changes to the ArmorAddon entries so the red and white cuffs appear correctly.

 

There is one issue, however. You'll notice some bad clipping during certain poses and by extension, certain sex scenes.

  Hide contents

ScreenShot12.png.35e25aa5bf6daa88f8b971d08c20691a.pngScreenShot13.png.3be32a426f03452b111a668de5457b39.png

 

If everyone can live with that then maybe Kimy would be willing to add these. 

 

Lastly I've created a working wooden yoke, it's the one from Contraptions but wasn't usable as a stand-alone device. I've done the necessary work to make it usable as a new yoke device. Includes a ground/inventory object as well.

 

As I've said I'm kind of nervous about this as there are quite a few changes so I hope everything works well.

 

Here's the files:

Catsuit Overhaul.7z 29.19 MB · 27 downloads   Pony Boots Overhaul.7z 2.12 MB · 15 downloads   Wooden Yoke.7z 96.1 kB · 14 downloads

Like the new changes, though as you said clipping is kinda rough, but i'm not a person who can make anythign better ?

I won't be using any boots atm though, because Yiffy Age's digitigrade feet don't play nice with any DD boots, full stop. I tried to tweak some of the boots to at least use the right meshes, but my noob efforts were thwarted when I found the meshes for feet and boots weren't proportionally the same width apart and my brain kinda fried at that point.

 

Still, great work!

Link to comment

I think I overdid it this time, Kimy is going to hate me.

 

For starters the BodySlide folders have been completely overhauled and cleaned up. Everything in the ShapeData folder now reside in:

  • ShapeData\DeviousDevices - CBBE
  • ShapeData\DeviousDevices - UUNP
  • ShapeData\DeviousDevices - Heretical

Heretical is in the "00 Core" folder since those sliders are for both CBBE and UUNP. There are a couple of sub-folders for UUNP and CBBE, these are simply the rope devices and 1stperson meshes for catsuit devices. The 1stperson meshes in devious\mxw_catsuit\1stperson are no longer needed and should be deleted, these are now built in BodySlide and appears to help a lot with clipping in first-person.

 

Since I re-saved many of the UUNP sliders there is now significant reduction in the amount of files in the UUNP folder. Before there were countless .bsd files for multiple devices but there is now only a single .osd file for each device.

 

No longer are there folders scattered all around and now you can install both CBBE and UUNP without them overwriting each other, except when you build the devices of course. Similarly the SliderSet files have been been combined in to just a few files instead of numerous files:

  • SliderSets\DD - CBBE.osp
  • SliderSets\DD - FTRope - CBBE.osp
  • SliderSets\DD - UUNP.osp
  • SliderSets\DD - FTRope - UUNP.osp
  • SliderSets\DD - Heretical.osp

Yes I left the rope devices separate, just in case.

 

I have renamed everything to make things easier in BodySlide, all the devices are now labeled as:

  • DD - CBBE - <Device Name>
  • DD - UUNP - <Device Name>
  • DD - CBBE UUNP - <Heretical Device Name>

No longer are there DDA or DDX prefixes, if you see those then there are left-over files in your BodySlide folders. 

 

There is only a single SliderGroup file now for either CBBE and UUNP:

  • DD Framework CBBE.xml
  • DD Framework UUNP.xml

You should only have to select either one of those groups to easily Batch Build every device.

 

For anyone wanting to test I highly recommend uninstalling DD, manually delete the meshes\devious folder to remove any built device and then reinstall DD. DO NOT select either CBBE or UUNP from the DD Framework, use the BodySlide files from the archive I've uploaded and build the devices from those. You really only need to check the black version for Ebonite and Leather devices, as long as those appear on your character then the red and white versions should as well. For the rope devices just check the regular, non-colored rope items. I did a fair bit of checking myself but more people checking is always better.

 

That was the BodySlide overhaul/clean-up, now for the additional OCD/bloat stuff.

 

Firstly I've included the crotch-less harness, the pony boots with cuffs and all the improved catsuit devices and have them set-up in an .esp for testing and future merging. Secondly I've included some new-ish devices and fixed a few small things:

  • Altered the Red and White textures for Catsuit devices so they closely match other Red and White Ebonite devices. Created an Enviroment Mask texture as well as one didn't exist.
  • Altered all the TextureSet entries for Catsuit devices to they use the correct textures. The shader and textures changes I made to the catsuit meshes won't work correctly without the changes.
  • The various "slave harnesses" in the framework now use the crotch-less harness mesh. These particular devices allowed sex so it made sense to use the crotch-less versions here.
  • All the World Model entries for the Slave Harnesses are using the new crotch-less ground/inventory mesh.
  • When doing this I noticed there wasn't a "Black Leather Chastity Harness" so I created one. The various chastity harnesses use the original harness mesh and properly block sex.
  • There's a few "Unlocked" versions of the Slave harnesses, these don't have a collar attached. These now use the crotch-less harness and have yet another new ground/inventory mesh.
  • Chastity Corsets have made a return! These, of course, function as a chastity belt and corset in a single device. Covers black/red/white leather and ebonite devices. Closed and Open variants available.
  • Created a new script for the Chastity Corsets, primarily for device conflict checking and a terrible (IMO) message when locking the device on you. Seems to work well enough.
  • Had to create new ground/inventory objects for the ebonite versions of the Chastity Corsets as they didn't exist. Leather versions already existed but were un-used.
  • The two "Large Ball" gag devices have now been expanded to cover red, white plus leather and ebonite versions. Had to create Leather variants of the mesh as they didn't exist.
  • Added a Transparent Catsuit. The texture isn't the best, I had to create a different version with a modified alpha channel so the transparency would look decent enough.
  • The Black Ebonite Pet Suit and it's ground/inventory object weren't using their intended textures, so I fixed that. The red and white versions were already using the correct textures.
  • The "Chain Harness Boots" with HDT chains from Heretical were not working correctly. They were pointing to incorrect folders for the HDT files, fixed that.
  • The "Iron Fetters (Chain)" and "Rusty Iron Fetters (Chain)" devices were not appearing. Their ArmorAddon entries were pointing to a non-existent mesh and folder, pointed them in the right direction.
  • The World Model entries for the aforementioned devices were also pointing to the same non-existent mesh and folder, directed them to the right place.
  • Various "Priority" values for ArmorAddon entries for restrictive boots, pony boots and catsuits have been changed.
  • This "should" allow for the aforementioned boots to appear correctly when wearing a catsuit but still be properly hidden when wearing certain hobble dresses.
  • The The Formal Hobble Dresses have had "38-Calves" removed so the lower parts of Restrictive Boots and Pony Boots appear correctly. Otherwise the dress would hide those parts leaving a visible gap on the legs.

I think that's all.

 

 

A link would be nice, wouldn't it? 

 

MEGA LINK

 

Yes it's a little over 1GB, those BodySlide files take a lot of space.

 

Edited by UnEvenSteven
Tired and bad headache, missed a few things
Link to comment
1 hour ago, UnEvenSteven said:

For starters the BodySlide folders have been completely overhauled and cleaned up.

 

This is amazing! Outstanding work! ❤️ I really look forward to seeing these improvements in a future version of DD.

 

Edited by Herowynne
Link to comment
11 hours ago, naaitsab said:

Awesome work. And she can be persuaded with wine :P 

 

For the transparent catsuit, did you look a the original mod? There is a transparant one included there. Perhaps it can help you.

https://www.nexusmods.com/skyrim/mods/41534/?

 

It was just using the black texture for the transparent version, almost all catsuit-related textures have alpha channels. It was too dark and wasn't very transparent and that's why I created a new texture. It's more transparent and should be a bit closer to other transparent devices. Have you taken a look at the device in-game?

 

 

5 hours ago, Zaflis said:

@UnEvenSteven Could the collar be tighter around neck? There is roughly "1.5 cm" gap all around outwards from catsuit so it's sort of floating in air.

 

Otherwise what little bits i have tried with UNP HDT it seems working.

 

Took a look at this, had to raise the collar up a little to reduce clipping. Still not super-tight on the neck but should look better.

 

Catsuit Collar.7z

Link to comment
51 minutes ago, UnEvenSteven said:

Took a look at this, had to raise the collar up a little to reduce clipping. Still not super-tight on the neck but should look better.

It is a bit better.

 

Spoiler

collar.png.d71082efe95da79de595c37a890f43a0.png   collar2.png.412baf1e3d5c4d09a5d35d1e4d8e7583.png

clipping.png.869f58be888e21a1e1cbc6e1a5ab0046.png

 

- Catsuit clipping at neck.

- Inventory mesh for collar is still old one without lock.

- "White Leather Gag (Pony) (Harness)" shows pointy ears and eyepads in the inventory model but not in world. Maybe it's the inventory model that's wrong and not match the name.

 

(Testing in UUNP)

Edited by Zaflis
Link to comment
53 minutes ago, UnEvenSteven said:

 

It was just using the black texture for the transparent version, almost all catsuit-related textures have alpha channels. It was too dark and wasn't very transparent and that's why I created a new texture. It's more transparent and should be a bit closer to other transparent devices. Have you taken a look at the device in-game?

 

Haven't started Skyrim in a while. But I have tried the transparant one from the original mod without much issue, even with a pink texture set on it. That was CBBE however, UUNP support for the transparent one was done by somebody a while ago.

Link to comment
2 hours ago, Zaflis said:

It is a bit better.

- Catsuit clipping at neck.

- Inventory mesh for collar is still old one without lock.

- "White Leather Gag (Pony) (Harness)" shows pointy ears and eyepads in the inventory model but not in world. Maybe it's the inventory model that's wrong and not match the name.

 

(Testing in UUNP)

 

 

What BodySlide Preset are you using? Are you using a different head mesh? I didn't see that amount of clipping with the catsuit when testing. Granted I didn't check every UUNP preset, just UNP and some other random presets.

 

The collar still floats that way to make room for the catsuit, which isn't skin tight on the neck to help reduce clipping. 

 

I'll look in to the other stuff later, I don't want to confuse and overwhelm Kimy with more files right now.

Link to comment
1 hour ago, UnEvenSteven said:

What BodySlide Preset are you using? Are you using a different head mesh? I didn't see that amount of clipping with the catsuit when testing. Granted I didn't check every UUNP preset, just UNP and some other random presets.

 

The collar still floats that way to make room for the catsuit, which isn't skin tight on the neck to help reduce clipping. 

I mean for me it's more than skin tight :D  Skin deep. The head mesh (nif) i have comes from Bodyslide itself, i checked overrides and i never downloaded high quality head mod or other alterings. I also checked in Bodyslide all different sliders with the catsuit, no slider or preset is able to change the neck size, it's completely defined by bodyweight.

 

About weight, it seems it doesn't clip almost at all if i set weight to 100. That's not setting i normally play though.

 

Also you can see how the neck sways different pace than suit neck when turning head with mouse in racemenu. They might be possible to be weight painted more correctly but i wouldn't know.

Edited by Zaflis
Link to comment
3 hours ago, Zaflis said:

I mean for me it's more than skin tight :D  Skin deep. The head mesh (nif) i have comes from Bodyslide itself, i checked overrides and i never downloaded high quality head mod or other alterings. I also checked in Bodyslide all different sliders with the catsuit, no slider or preset is able to change the neck size, it's completely defined by bodyweight.

 

About weight, it seems it doesn't clip almost at all if i set weight to 100. That's not setting i normally play though.

 

Also you can see how the neck sways different pace than suit neck when turning head with mouse in racemenu. They might be possible to be weight painted more correctly but i wouldn't know.

 

Turns out there wasn't any weight painting around the neck area of catsuits, could've sworn they were there before but who knows what happened.

 

Manually painted the weights for the neck so that area will now stretch properly whenever your character moves their head around. 

 

Also figured out how to remove slider data from masked parts of a mesh. This is important since the neck area of catsuit was being affected by the weight slider, this is why it was clipping with the body. Now the neck won't shrink or grow in size with the weight slider so that should prevent, or at least diminish, clipping.

 

Try the following files, they overwrite the files from the MEGA archive. Includes transparent catsuits that required the same changes.

Modified Catsuit Weights.7z

 

 

Link to comment
12 hours ago, UnEvenSteven said:

Try the following files, they overwrite the files from the MEGA archive. Includes transparent catsuits that required the same changes.

 

Nice progress and it works now. Are you taking in reports about catsuit clipping with long restrictive boots and hoods? ?

Or some gloves with suit when used with different color combinations.

Edited by Zaflis
Link to comment
On 6/24/2021 at 4:44 AM, UnEvenSteven said:

I think I overdid it this time, Kimy is going to hate me.

Nice going, but one thing that immediately jumped to my eyes when looking at the files:

You should zero out all sliders (big and small). There are some that are not set to zero. Use this regex to find all occurrences: 

(["'])([1-9]\d+?)(["'])

and just replace them with "0".

Also some sliders are inverted when they should not be (although this could be me using SSE)

Link to comment
23 hours ago, Zaflis said:

Nice progress and it works now. Are you taking in reports about catsuit clipping with long restrictive boots and hoods? ?

Or some gloves with suit when used with different color combinations.

 

No, not really taking requests but I did look at this. I did what I could to fix the glaring clipping issues, there still might be some but I think that'll largely depend on the preset used. It's one of those things you could spend hours or days on and still not eliminate all the clipping.

 

Try these for now...

Modified Gloves and Boots.7z

 

 

19 hours ago, Techpriest said:

Nice going, but one thing that immediately jumped to my eyes when looking at the files:

You should zero out all sliders (big and small). There are some that are not set to zero. Use this regex to find all occurrences: 




(["'])([1-9]\d+?)(["'])

and just replace them with "0".

Also some sliders are inverted when they should not be (although this could be me using SSE)

 

Yeah I'm not going to mess with this. After testing with a single device I noticed the mesh was not conforming correctly anymore no matter the character's weight and any adjustments made in OS were seemingly removed.

 

Granted I've figured out most stuff about OS on my own but I haven't seen anything about zeroing out sliders nor setting "invert" to true or not in the .osp file. 

 

Edited by UnEvenSteven
Link to comment

After looking into the design of @ihatemykite the lockpicking game instead of RND would be a cool addon to DD. Can be made selectable with MCM of course.

Was working on my own implementation of this but got a bit stuck on checking the result of the picking attempt. The OnMenuClose event solves this.

 

ESP requirement is to create a container without a model. This will be spawned and activated by the function. ID for this in the code is "LockPickContainer"

 

Simplified code that explains the approach:

 

int Property LockpickMinigameResult = 0 auto

ObjectReference lockpickcontainer_objectRef
int lockpickcount

Event OnMenuClose(String MenuName)
	if MenuName == "Lockpicking Menu"
		if PlayerREF.GetItemCount(Lockpick)
			if !lockpickcontainer_objectRef.IsLocked()
				LockpickMinigameResult = 1 ;player succesfully finished minigame
			else
				LockpickMinigameResult = 0 ;player exited minigame
			endif
		else
			LockpickMinigameResult = 2 ;player tried to lockpick the device but failed (lockpick breaks)
		endif
		PlayerREF.AddItem(Lockpick, lockpickcount - 1, True)
		lockpickcontainer_objectRef.delete()
		UnregisterForAllMenus()
	endif
EndEvent



Function startLockpickChallange()
	lockpickcontainer_objectRef = PlayerREF.placeatme(LockPickContainer)
	lockpickcount = PlayerREF.GetItemCount(Lockpick)
	PlayerREF.RemoveItem(Lockpick, lockpickcount - 1, True)
	lockpickcontainer_objectRef.lock(True)
	lockpickcontainer_objectRef.SetLockLevel(*int locklevelhere*)
	RegisterForMenu("Lockpicking Menu")
	lockpickcontainer_objectRef.activate(PlayerREF)
EndFunction

 

Of course credits due to the original coder :) 

Link to comment
6 minutes ago, naaitsab said:

After looking into the design of @ihatemykite the lockpicking game instead of RND would be a cool addon to DD. Can be made selectable with MCM of course.

Was working on my own implementation of this but got a bit stuck on checking the result of the picking attempt. The OnMenuClose event solves this.

 

ESP requirement is to create a container without a model. This will be spawned and activated by the function. ID for this in the code is "LockPickContainer"

 

Simplified code that explains the approach:

 


int Property LockpickMinigameResult = 0 auto

ObjectReference lockpickcontainer_objectRef
int lockpickcount

Event OnMenuClose(String MenuName)
	if MenuName == "Lockpicking Menu"
		if PlayerREF.GetItemCount(Lockpick)
			if !lockpickcontainer_objectRef.IsLocked()
				LockpickMinigameResult = 1 ;player succesfully finished minigame
			else
				LockpickMinigameResult = 0 ;player exited minigame
			endif
		else
			LockpickMinigameResult = 2 ;player tried to lockpick the device but failed (lockpick breaks)
		endif
		PlayerREF.AddItem(Lockpick, lockpickcount - 1, True)
		lockpickcontainer_objectRef.delete()
		UnregisterForAllMenus()
	endif
EndEvent



Function startLockpickChallange()
	lockpickcontainer_objectRef = PlayerREF.placeatme(LockPickContainer)
	lockpickcount = PlayerREF.GetItemCount(Lockpick)
	PlayerREF.RemoveItem(Lockpick, lockpickcount - 1, True)
	lockpickcontainer_objectRef.lock(True)
	lockpickcontainer_objectRef.SetLockLevel(*int locklevelhere*)
	RegisterForMenu("Lockpicking Menu")
	lockpickcontainer_objectRef.activate(PlayerREF)
EndFunction

 

Of course credits due to the original coder :) 

In this regard I'm not author of this idea either. The one who come with this in first place was Shakx88 in his mod Devious Escape Overhaul. I was just inspired by it. You can try to look up that mods script and see how it works there. I taked how it fundamentally works and did it my own way, so maybe Shakx88 did it better in that regards.

Link to comment
  • 2 weeks later...
On 6/11/2021 at 11:31 PM, anyway ayway said:

I've been having a bit of trouble with the DD animation filter, but I think I've found a solution that could be more broadly helpful.

 

The problem I'm having is that some mods' animation requests depend heavily on the "include" and "suppress" tags initially supplied, and if the filter has to overrule the animation, it loses that information. For example, let's say that a mod requests a rape animation on a female PC with two male NPCs. Let's say the mod requests animations using the following tags:

 

Include: Oral, Anal, Vaginal
Suppress: Lesbian, Gay, FFM, MFF, FFF, MMM
IncludeAll: False (at least one include tag required)

 

Now, let's say the female PC has an anal plug. Anecdotally, a lot of MMF threeway animations include the anal tag, but some do not. If the initially selected animation does include the anal tag, then DD wisely discards it, due to the anal plug. But then, the next requested animation by DD is as follows (with aggressive not required):

 

Include: (empty)
Suppress: Anal, Yoke, Armbinder
IncludeAll: True (all include tags required)

 

Frequently, for me, this results in unfortunate animations, such as MFF animations where one of the male rapists is now in a female role, being raped by one of the other attackers. Not a great result, though it doesn't happen every time, of course.

 

The solution I propose is to recover the tag information supplied by the initial animation request, and adjust it according to the restrictions DD correctly imposes. This would be easy if SexLab saved that information as a property to the thread controller, but unfortunately, it only saves the filtered list of animations, and presumably DD doesn't want to modify SexLab scripts. Fortunately, though, the tag information is still recoverable: it is saved in a text cache by sslAnimationSlots.

 

I implemented the code to recover and adjust the tags by modifying only the SelectValidAnimations() function in zadBQ00.psc (starting at line 1001), as follows:

  Hide contents
; filter version of the animation selector
sslBaseAnimation[] function SelectValidAnimations(sslThreadController Controller, int count, sslBaseAnimation previousAnim, bool usingArmbinder, bool usingYoke,  bool HasBoundActors,  bool forceaggressive, bool permitOral, bool permitVaginal, bool permitAnal, bool permitBoobs)
	bool aggr = false				
	string includetag = ""
	sslBaseAnimation[] Sanims
	If previousAnim != none && previousAnim.HasTag("foreplay") 		
		; ok, this is causing trouble, as we don't really have a lot of bound foreplay animations. We...just don't pass on the tag for now, which will result in regular anims.
		; includetag = "foreplay"
		; libs.Log("Using only foreplay animations.")					
	Elseif forceaggressive || (previousAnim != none && previousAnim.HasTag("Aggressive") && libs.config.PreserveAggro)
		libs.Log("Using only aggressive animations.")					
		aggr = true		
	Endif  
	Bool IsCreatureAnim = previousAnim.HasTag("Creature")
	If IsCreatureAnim && HasBoundActors
		; it's a creature anim and some participants are bound, we can abort here, as there are no bound animations for creatures.
		return None
	Endif
	; Bound Animations need to be processed separately, since they are not registered in SexLab.
	if count > 1 && HasBoundActors
		libs.Log("Actor(s) are bound. Trying to set up bound animation.")
		Sanims = New sslBaseAnimation[1]
		; we have bound anims only for two actors, so we pick an animation only if we have two actors, otherwise we let the filter split the scene later on.
		If count == 2
			Sanims[0] = GetBoundAnim(Controller.Positions[0], Controller.Positions[1], permitOral, permitVaginal, permitAnal, permitBoobs)						
		Endif
		If Sanims[0] == None
			libs.log("Error: SelectValidAnimations could find no valid bound animations.")
			return None
		Else
			return Sanims
		Endif
	Endif
	
	;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;; begin modified code
	;;;;;;;;;;;;;;;;;;;;;;;;;;;
	; find the animation cache slot associated with the animation that was previously being played	
	float TimeToBeat = 0.0
	int index = -1
	int i = 0
	While i < 20
		; we must check if this cache slot is the slot that was used by our thread controller.
		; we cannot do this with certainty. we will start by comparing animation array lengths.
		If SexLab.AnimSlots.GetCacheSlot(i).Length == Controller.Animations.Length
			; if there are multiple cache slots with the same correct array length, we will use the most recently updated slot.
			string CacheText = SexLab.AnimSlots.CacheInfo(i)
			int TimeStartIndex = StringUtil.Find(CacheText, " -- Timestamp: ") + 15
			int TimeEndIndex = StringUtil.Find(CacheText, " -- Count: ")
			float CacheTime = StringUtil.Substring(CacheText, TimeStartIndex, TimeEndIndex - TimeStartIndex) as float

			If CacheTime > TimeToBeat
				TimeToBeat = CacheTime
				index = i
			EndIf
		EndIf
		
		; Debug.Trace("[Zad Trace]: AnimCache Length - " + SexLab.AnimSlots.GetCacheSlot(i).Length +", Controller Anim Length - " + Controller.Animations.Length + ", CacheText - " + SexLab.AnimSlots.CacheInfo(i) + ", TimeToBeat - " + TimeToBeat + ", index - " + index)
		i += 1
	EndWhile
	
	string suppresstag = ""
	bool RequireAll = True
	If Index >= 0
		; grab the filter used to search for the played animation, and parse the string
		string CorrectCacheText = SexLab.AnimSlots.CacheInfo(index)
		int FilterStartIndex = StringUtil.Find(CorrectCacheText, " -- Name: ") + 10
		int FilterEndIndex = StringUtil.Find(CorrectCacheText, " -- Timestamp: ")
		string FilterText = StringUtil.Substring(CorrectCacheText, FilterStartIndex, FilterEndIndex - FilterStartIndex)
		string[] FilterArray = PapyrusUtil.StringSplit(FilterText, ":")
		
		string OldInclude = FilterArray[1]
		suppresstag = FilterArray[2]
		RequireAll = (FilterArray[3] == "TRUE")

		; adjust the include string to remove DD conflicting tags
		If OldInclude
			string[] OldIncludeArray = PapyrusUtil.StringSplit(OldInclude)
			
			; don't handle aggression here
			OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Aggressive")
			
			If !permitVaginal
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Vaginal")
			EndIf
			If !permitAnal
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Anal")
			EndIf
			If !permitBoobs
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Boobjob")
			EndIf
			If !permitOral
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Oral")
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Blowjob")
			EndIf
			If usingYoke
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Pillory")
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Yoke")
			EndIf
			If usingArmbinder
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Pillory")
				OldIncludeArray = PapyrusUtil.RemoveString(OldIncludeArray, "Armbinder")
			EndIf
			
			string NewInclude = PapyrusUtil.StringJoin(OldIncludeArray)
			If NewInclude
				If includetag
					includetag = includetag + "," + NewInclude
				Else
					includetag = NewInclude
				EndIf
			EndIf
		EndIf
	EndIf
	;;;;;;;;;;;;;;;;;;
	;;; end modified code; except getSuppressString and SexLab.GetAnimationsByTags last parameters
	;;;;;;;;;;;;;;;;;;
	
	string tagString = getTagString(aggr, includetag)
	string suppressString = getSuppressString(aggr, usingArmbinder, usingYoke, permitOral, permitVaginal, permitAnal, permitBoobs, suppresstag)	
	; ok, we need to process private animations and masturbation as a special case as the tag system would otherwise be unable to call DDI or ZAP armbinder and yoke animations and also not exclude opposite gender masturbation/
	if count == 1 		
		libs.Log("Selecting masturbation animation.")
		If usingArmbinder ; she is wearing an armbinder
			Sanims = New sslBaseAnimation[1]
			Sanims[0] = SexLab.GetAnimationObject("DDArmbinderSolo")
			return Sanims
		Endif
		If usingYoke ; she is wearing a yoke
			Sanims = New sslBaseAnimation[1]
			Sanims[0] = SexLab.GetAnimationObject("DDYokeSolo")
			return Sanims
		Endif
		If !permitVaginal ;she is belted
			Sanims = New sslBaseAnimation[1]
			Sanims[0] = SexLab.GetAnimationObject("DDBeltedSolo")
			return Sanims
		Endif
		; if she is not wearing chastity, we need to filter the wrong gender
		tagString = "Solo," + tagString
		If Controller.Positions[0].GetLeveledActorBase().GetSex() == 1		
			suppressString = "M," + suppressString
		Elseif Controller.Positions[0].GetLeveledActorBase().GetSex() == 0
			suppressString = "F," + suppressString
		EndIf
	EndIf		
	If IsCreatureAnim
		; determine what creature it was and append its tag to the selection if it was a humanoid one, otherwise return an empty array.
		string crString = GetCreatureType(previousAnim)
		if crString != ""
			tagString += "," + crString
		Else
			libs.log("Creature animation with non-humanoid creatures in use. Cannot replace. Filtering aborted.")
			return None
		Endif
	Endif
	Sanims = SexLab.GetAnimationsByTags(count, tagString, suppressString, RequireAll)
	libs.log("Selecting SexLab animations with number of actors: " + count)
	libs.log("Selecting SexLab animations with tag string: " + tagString)
	libs.log("Selecting SexLab animations with suppress string: " + suppressString)			
	return Sanims
endfunction

 

 

Maybe there's an easier way to do this, but I couldn't find it. And the code above works fine and doesn't seem to have any performance problems. Using this, the tags requested by DD in the example above would be:

 

Include: Oral, Vaginal
Suppress: Lesbian, Gay, FFM, MFF, FFF, MMM, Anal, Yoke, Armbinder
IncludeAll: False

 

This results in a much better choice of new animation, at least in my testing (DD 5.1, Skyrim SE). There could of course be a good reason not to recover the tags, such as animation scarcity. I haven't found that to be a problem, and I don't have a huge number of animations installed, but I haven't tested this too extensively so far. But maybe there's another reason? I'm not sure.

 

Thanks for all your work on Devious Devices! Hopefully this is helpful. If not, or if posting code suggestions here is against the rules, let me know and I'll remove it ASAP.

 

Super late response, I know. but I just tried to integrate your code snippet, and it wouldn't compile.

 

SexLab.AnimSlots.GetCacheSlot(i) does not seem to be a valid function call. Just out of curiosity - was this code written based on new SE-exclusive SexLab version? If yes, we can't use that function, as the code needs to work with the most recent SexLab version on LE as well, and as far as I know, Ashal has no intent to make another SexLab release for LE. I can't verify this theory right now, though. I don't have a SE installation.

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