Jump to content

Devious Devices Framework Development/Beta


Recommended Posts

7 hours ago, Kharos said:

Hmm... looking at the old zadEquipScript (DD4 integration), it already contains most of the outfit change code (unless I just made a mistake and got the wrong version). So I am actually asking myself, why have I never seen these issues in the past? Am I the only one who has this code "misbehave" now? I just assumed that the code was new, but this does not seem to be the case...

Hm, before doing anything drastic, can anyone confirm bad stuff to happen with this feature? Because, yes, it has been in DD for ages, so I am a bit confused, too.

Link to comment
1 hour ago, Kimy said:

Hm, before doing anything drastic, can anyone confirm bad stuff to happen with this feature? Because, yes, it has been in DD for ages, so I am a bit confused, too.

Ok, I think I am now understanding what is going on.

 

TL/DR:

  1. While the equipment switch code was already in DD 4.X, it did not work.
  2. Removing the equipment works in DD5, you fixed that.
  3. Restoring the equipment is still not working in DD5.
  4. The issue with duplicated PAH slave equipment was probably a red herring and not related to this. Sorry.

Details:

  1. In DD 4.X, zadEquipScript.psc does the following:
    Event OnEquipped(Actor akActor)
        [...]
        if akActor != libs.PlayerRef && (akActor.WornHasKeyword(libs.zad_DeviousSuit) || akActor.WornHasKeyword(libs.zad_DeviousHeavyBondage))
            akActor.SetOutfit(None, false)
        endIf
        [...]
    EndEvent
        

    This fails (at least on my machine) with the following papyrus error: Error:  (000E1BA9): Cannot set sleep or default outfit to None.
     

  2. For DD5, you have fixed that block in zadEquipScript.psc:

        if akActor != libs.PlayerRef && (akActor.WornHasKeyword(libs.zad_DeviousSuit) || akActor.WornHasKeyword(libs.zad_DeviousHeavyBondage))
            akActor.SetOutfit(libs.zadEmptyOutfit, false)
        endIf

     

  3. Also in zadEquipScript.psc, for both versions:
    Event OnUnequipped(Actor akActor)
        [...]
        if StorageUtil.GetIntValue(akActor, "zad_RemovalToken" + deviceInventory, 0) >= 1 
            if OnUnequippedFilter(akActor) >= 1
                [...]
            else
                ; Note: This code has a side-effect when it resets the outfit to the ActorBase. This could override prior changes to the -Actor- outfit. Not sure if it's a big problem, so let's see how that goes.
                if akActor != libs.PlayerRef && !akActor.WornHasKeyword(libs.zad_DeviousSuit) && !akActor.WornHasKeyword(libs.zad_DeviousHeavyBondage)
                    akActor.SetOutfit(akActor.GetLeveledActorBase().GetOutfit(), false)
                endIf
            EndIf
        else
            [...]
        EndIf	
    EndEvent
    It seems that NPCs fall into the lowest-level else block, i.e. the framework is not using StorageUtil for NPCs, so the code that restores the outfit never runs.

 

In my humble opinion it should be easy to fix the "restore outfit" part, but the whole thing is like a new feature (as it did not work in 4.X), so it may interfer with other mods.

 

Cheers!

 

PS: Is there a github where I can point you to the relevant lines of code instead of copy-pasting code blocks here? The DD githib does not seem to be up-to-date...


[Edit]

Oh, one more detail, I forgot. I initially stated that the outfit was only removed when I equiped a second device on the NPC. That is not true, the outfit gets removed even if the Armbinder is the first device. But after removing the outfit the game does not update the visual appearance of the NPC until something else forces the game to update the appearance (modify NPC inventory, disable/enable NPC, etc). I think I have seen similar engine bugs (visual outfit not updating when modified from Papyrus) both in Skyrim and in Fallout 4.

Link to comment
12 minutes ago, worik said:

@Kimy The old and ancient book quest is still included in the beta 2. Wasn't that supposed to be deleted by now? :classic_huh:

The quest itself isn't there anymore, is it?

I know the book might still be there, but I'm not sure that needs to go... It still has the unlocks for the recipes etc.

Link to comment
7 hours ago, Kharos said:

Ok, I think I am now understanding what is going on.

 

TL/DR:

  1. While the equipment switch code was already in DD 4.X, it did not work.
  2. Removing the equipment works in DD5, you fixed that.
  3. Restoring the equipment is still not working in DD5.
  4. The issue with duplicated PAH slave equipment was probably a red herring and not related to this. Sorry.

Details:

  1. In DD 4.X, zadEquipScript.psc does the following:
    
    Event OnEquipped(Actor akActor)
        [...]
        if akActor != libs.PlayerRef && (akActor.WornHasKeyword(libs.zad_DeviousSuit) || akActor.WornHasKeyword(libs.zad_DeviousHeavyBondage))
            akActor.SetOutfit(None, false)
        endIf
        [...]
    EndEvent
        

    This fails (at least on my machine) with the following papyrus error: Error:  (000E1BA9): Cannot set sleep or default outfit to None.
     

  2. For DD5, you have fixed that block in zadEquipScript.psc:

    
        if akActor != libs.PlayerRef && (akActor.WornHasKeyword(libs.zad_DeviousSuit) || akActor.WornHasKeyword(libs.zad_DeviousHeavyBondage))
            akActor.SetOutfit(libs.zadEmptyOutfit, false)
        endIf

     

  3. Also in zadEquipScript.psc, for both versions:
    
    Event OnUnequipped(Actor akActor)
        [...]
        if StorageUtil.GetIntValue(akActor, "zad_RemovalToken" + deviceInventory, 0) >= 1 
            if OnUnequippedFilter(akActor) >= 1
                [...]
            else
                ; Note: This code has a side-effect when it resets the outfit to the ActorBase. This could override prior changes to the -Actor- outfit. Not sure if it's a big problem, so let's see how that goes.
                if akActor != libs.PlayerRef && !akActor.WornHasKeyword(libs.zad_DeviousSuit) && !akActor.WornHasKeyword(libs.zad_DeviousHeavyBondage)
                    akActor.SetOutfit(akActor.GetLeveledActorBase().GetOutfit(), false)
                endIf
            EndIf
        else
            [...]
        EndIf	
    EndEvent
    It seems that NPCs fall into the lowest-level else block, i.e. the framework is not using StorageUtil for NPCs, so the code that restores the outfit never runs.

 

In my humble opinion it should be easy to fix the "restore outfit" part, but the whole thing is like a new feature (as it did not work in 4.X), so it may interfer with other mods.

 

Cheers!

 

PS: Is there a github where I can point you to the relevant lines of code instead of copy-pasting code blocks here? The DD githib does not seem to be up-to-date...

 

You're right, the restore code as is works only when the device is removed by script (in that case zadlibs.UnlockDevice() will handle it). I will need to move the lines quoted to OnContainerChange() to make it work in situations when a device is removed manually by the player.

 

Good find! :)

 

There used to be a DD Github, but I had to give it up, because DD is now waaaaay larger than GitHub's maximum allowed size for a project. That and honestly, there weren't enough code contributions to warrant keeping an online repository anyway. I am the only one really working on the code these days. If you want to contribute larger segments, you can always send me the whole script. I use a merge tool, so I can handle that.

 

Sorry for the inconvenience....

 

PS: Isn't PAH a ZAP mod? If yes, how can DD even clash with it? oO

Link to comment
16 minutes ago, LazyBoot said:

I know the book might still be there, but I'm not sure that needs to go... It still has the unlocks for the recipes etc.

I just noticed the placed objects in Tes5Edit .. random luck.. 

I'm trying to break things in game now. But I'll be having a look into it later again with the CK and watch out.

The MCM still has an empty "quests".

Might be worth to remove that before the official release, too. While we are at it. It's just provoking confusion, I think.

Link to comment
7 hours ago, LazyBoot said:

The quest itself isn't there anymore, is it?

I know the book might still be there, but I'm not sure that needs to go... It still has the unlocks for the recipes etc.

There are some fragments still in DD that were originally included for that quest, yes. I did not yet remove these, among things for the reason you quoted. Personally I don't see the need for device crafting anymore, as countless mods have brought countless vendors for devices and even keys and certain *cough* other mods even make them drop in random containers.

 

But I dunno if some people still want the crafting feature.

Link to comment
6 minutes ago, Kimy said:

There used to be a DD Github, but I had to give it up, because DD is now waaaaay larger than GitHub's maximum allowed size for a project.

You would have to use Git LFS for the binaries. Disclaimer, I have no idea what's the max quota for LFS on free github, it may still be too small.

 

8 minutes ago, Kimy said:

PS: Isn't PAH a ZAP mod? If yes, how can DD even clash with it? oO

The primary function of PAH is that you can enslave defeated enemies. There is some functionality that is using ZAP (e.g. when you tie them up), but technically the slaves are follower using a non-standard follower framework, so there is nothing preventing you from putting them into some DD devices or even contraptions. If they are not fully trained putting DD fetters on them is actually very helpful, they sometimes try to run away, with fetters it is much easier to catch up to them.

Link to comment
1 hour ago, Kimy said:

There are some fragments still in DD that were originally included for that quest, yes. I did not yet remove these, among things for the reason you quoted. Personally I don't see the need for device crafting anymore, as countless mods have brought countless vendors for devices and even keys and certain *cough* other mods even make them drop in random containers.

 

But I dunno if some people still want the crafting feature.

I don't use the crafting too often, but I do like to have the option. If nothing else, it's nice in case RNG ends up being deciding to be evil and the correct type of key refuses to drop.

Link to comment

@Kimy

 

'But I dunno if some people still want the crafting feature. '

 

Yes, please!  A thousand times!  Starting with a few keys on the PC and Followers - I set a starting limit of 5 each - can be the only way to get through some of the tougher dungeons, especially if you have both a reasonable risk, and number of items, set for DDs dropped from containers. and are also running any defeat mod that also equips DDs when you lose out in a skirmish

 

Even with that, with some of the harder enemies mods and the really long extra dungeons, you can still find you have to back out all the way and find a blacksmith etc, to clean up, and then go back to the point at which you just couldn't realistically go any further

 

And as LazyBoot implied, the RNG can be beastly

Link to comment
3 hours ago, Kimy said:

But I dunno if some people still want the crafting feature.

:classic_shy: .. since we have shops for those ... no. At least not my usual characters. I've only played one in the last years that could plausibly have this ability.

 

36 minutes ago, donttouchmethere said:

Crafting keys? => CHEATERS!

Spoiler

:classic_blush:

 

Link to comment

Just my final quick comment on the crafting thing

 

I could understand people who play specific mods, for the mods' sake, not necessarily wanting crafting, but when mods are adjuncts, adding spice and difficulty to trying to play right through the main game to any of its outcomes, it has its place

 

And what's more, some of us don't 'cheat' when playing, regardless of where the game goes. You have to fight all the way for anything and everything that you get. 

 

And speaking for myself, I only ever go back to a prior save in any game's timeline if it's clear that the game 'broke' at some point ... That's called maintaining one's integrity  ?

 

Surely there's room for both ..... ?

Link to comment
5 hours ago, Kimy said:

There are some fragments still in DD that were originally included for that quest, yes. I did not yet remove these, among things for the reason you quoted. Personally I don't see the need for device crafting anymore, as countless mods have brought countless vendors for devices and even keys and certain *cough* other mods even make them drop in random containers.

 

But I dunno if some people still want the crafting feature.

I would like the crafting feature to remain as I use it to level up blacksmithing. Leather and iron are easy to get and the items created sell for a good price. 

 

I just wish we could enchant devices.  In DCL I use the option to reuse devices from inventory when triggering a trap. As a result, my character keeps a specific set of restraints on her at all times.  Since my character knows there is always a chance to get tied up with her own devices, she could prepare a favorably enchanted set in advance. 

Link to comment

I favor keeping in the crafting of keys. I have several characters who all play around with different settings. One of my setting combos includes only very rare drops for common keys and the only reliable way to obtain them would be to craft them herself (which is dangerous enough because of the high trap rate for mining iron!)

 

 

I would humbly request leaving it in. It a useful extra mechanic for those who want to use it and those who don't like it could just not use it.

 

Link to comment
5 hours ago, serranna said:

I favor keeping in the crafting of keys. I have several characters who all play around with different settings. One of my setting combos includes only very rare drops for common keys and the only reliable way to obtain them would be to craft them herself (which is dangerous enough because of the high trap rate for mining iron!)

 

 

I would humbly request leaving it in. It a useful extra mechanic for those who want to use it and those who don't like it could just not use it.

 

In my opinion the framework should just be a framework. Any specify feature like crafting could go to another mod. 

The reason is the the code for the mod is so fcking huge. By tidying some unnessesery feature could help to minimize it a bit

Link to comment

Finally tested the various straitjackets with the latest patch, they didn't appear to have any skin issues this time. Poor Jenassa became a test subject for straitjackets, restrictive gloves and mittens. Hands and gloves seem to be properly hidden now when a NPC is locked in a jacket.

 

Was it some kind of engine quirk that was ultimately causing the skin issues with straitjackets?

 

I've seen someone else mention this but corsets seem to be hiding any chastity belt when both are worn together. The Black Leather Corset from Integration seems to work okay but all the versions (Black, Red, White Ebonite and Red and White Leather) from Expansion will hide chastity belts, The only thing I noticed is all the corsets from Expansion still have the zad_DeviousCorset keyword, the black leather corset from Integration does not.

Link to comment
8 hours ago, UnEvenSteven said:

Finally tested the various straitjackets with the latest patch, they didn't appear to have any skin issues this time. Poor Jenassa became a test subject for straitjackets, restrictive gloves and mittens. Hands and gloves seem to be properly hidden now when a NPC is locked in a jacket.

 

Was it some kind of engine quirk that was ultimately causing the skin issues with straitjackets?

 

I've seen someone else mention this but corsets seem to be hiding any chastity belt when both are worn together. The Black Leather Corset from Integration seems to work okay but all the versions (Black, Red, White Ebonite and Red and White Leather) from Expansion will hide chastity belts, The only thing I noticed is all the corsets from Expansion still have the zad_DeviousCorset keyword, the black leather corset from Integration does not.

Great to hear that the SJs are confirmed working! :)

 

I will check into the corset issue.

Link to comment

Devious Devices 5 Beta 3


- Added: Mod Events for inflatable plugs. See zadlibs.SendInflationEvent() for details.
- Added: The DD Contraptions NPC furniture interaction hotkey can now be configured in the DD MCM. It still defaults to PgUp.
- Fixed: When the player removes a device from an NPC, their outfit is now getting reset correctly.
- Fixed: Removed a dirty world edit from DDI.

 

DD5 LE Beta 1 to Beta 3.7z

 

This is also a delta patch, but you do NOT have to install the beta 2 version from a few days ago. I will release all delta patches against the Beta 1 release for convenience. If you have any in-between versions installed, just let the installer overwrite everything.

 

Here is the download link for the Beta 1:

 

https://mega.nz/file/eMEWRbJQ#YALWLvOcPo6PlgIgcLYnQdv2M86RsZTsc1WR31u49zc

Link to comment

Question/Suggestion (Sorry if this already is implemented, might have overlooked):

 

Will there be a debug function in DD? Like an MCM option or even hotkey to remove a device? 
In the old versions it was always tiring to debug equiped outfits because u had to use additemmenu or console to get keys and even then it was not very reliable because a key not always removed a device automatically (not to mention all the pop ups you needed to process). 

Slaverun Reloaded had an inbuilt Cheat Function for DDs which worked wonders back then (it now does not work anymore with many new Devices as of DD 4.1)

It allowed to unequip selected Devices, unequip All Devices or CHANGE equiped Devices into something different (this was especially cool since you could change the looks of the outfit you got). 
It could also generally lockout certain device types so that they are never equiped by the mod. 

For example I dont want Chastity items in my games like ever (no belts no bras) but the only way to achive this is to manipulate any mod that equips those individually. 
A general "lockout" from DD would be just great. 
I even started to replace the nifs of those items but their chastity function still broke alot of other stuff still :( (just my personal taste here) 

I really like DDs in my games, but it cost me literaly dozens of hours already to adjust the mods that add DDs. 
If DD framework itself would get a "general method" to do this (like Sexlab does for Sex Scene types) it would just be a big blast and make DD integration into individual playstyles like 2000% easier :D
 

Link to comment
7 hours ago, Nymra said:

Question/Suggestion (Sorry if this already is implemented, might have overlooked):

 

Will there be a debug function in DD? Like an MCM option or even hotkey to remove a device? 
In the old versions it was always tiring to debug equiped outfits because u had to use additemmenu or console to get keys and even then it was not very reliable because a key not always removed a device automatically (not to mention all the pop ups you needed to process). 

Slaverun Reloaded had an inbuilt Cheat Function for DDs which worked wonders back then (it now does not work anymore with many new Devices as of DD 4.1)

It allowed to unequip selected Devices, unequip All Devices or CHANGE equiped Devices into something different (this was especially cool since you could change the looks of the outfit you got). 
It could also generally lockout certain device types so that they are never equiped by the mod. 

For example I dont want Chastity items in my games like ever (no belts no bras) but the only way to achive this is to manipulate any mod that equips those individually. 
A general "lockout" from DD would be just great. 
I even started to replace the nifs of those items but their chastity function still broke alot of other stuff still :( (just my personal taste here) 

I really like DDs in my games, but it cost me literaly dozens of hours already to adjust the mods that add DDs. 
If DD framework itself would get a "general method" to do this (like Sexlab does for Sex Scene types) it would just be a big blast and make DD integration into individual playstyles like 2000% easier :D
 

There is an emergency debug function in DD removing all equipped devices, including quest ones. However, using this function will probably break any running DD quest, as it tries to terminate really everything DD related. It's meant for these "oh crap!" moments when the state of things is beyond recovery, to allow people to bring back their savegame to a (hopefully) stable state.

 

DD has otherwise no intention to become a fitting room for devices. There are mods out there that do that, so there is no need for this to be in the framework.

 

Generally, one of the design paradigms I develop DD with is that the framework itself makes no assumption about the character of the content mods using the framework. If a content mod implements "realistic" bondage (e.g. you have to wear whatever is being put on you by your master/captor without having a say in it), such mods need to be able to do their thing and stick to their intended atmosphere without getting overridden or trivialized by the framework upon user request. If that mod wants to give the user a choice or easy way out, it's up to the content mod to provide it, not the framework. E.g. DCL offers the player options not to use certain device types in traps, and the content mod level is where such options belong.

If people dislike hardcore bondage content and prefer using DD devices in controlled selfbondage contexts, that's totally fine. Such mods can be easily developed with DD. But in this case the obvious choice for them to make is to refrain from installing the hardcore DD mods.

 

PS: Allowing people to ban certain device types at the framework level would be a super-bad idea. Because content mods equipping devices rely to them getting equipped properly and have any right to assume that inititated device operations complete as intended. Stuff would break left and right if I'd implement such a thing, so I am really not going to.

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