Jump to content

Better NPC Support for Devious Devices


Recommended Posts

Bad news, I started to do some quick testing with SSE and it turns out that the safety code to prevent breaking stuff when NPC are allowed to struggle (detect if defining mod depends on Devious Devices) does not work on SE. I will need to come up with another solution...

Link to comment
Version 0.5 RC 3
- Change how the escape system recognizes NPCs that should not struggle, it now checks if their outfit contains devious devices
- Block The Whip And Chain actors from escape system in addition to outfit check mentioned above
- Change build scripts to support Skyrim SE, the scripts are now compiled with SE and a .bsa is built using the SE format
- Optimize "restore original outfit" code

 

Better NPC Support for Devious Devices 0.5 RC 3.7z

 

Better NPC Support for Devious Devices 0.5 RC 3 SE.7z

 

Make sure to select the correct 7z. The SE version is now also coming with a .bsa archive instead of loose files, it seems to work but no in-depth testing as I am not using SE.

 

-----

 

I hope the new escape blocking logic works reasonably well (the old one with mod dependencies did not work on SE). It should now work on both classic and SE. I did some quick testing on classic only. If somebody wants to do additional testing, here are the instructions for testing:

  1. Go to a NPC who is supposed to wear devices and not struggle and aim at them until you get the "talk" prompt
  2. Open the "Better NPC Spt for DD" MCM page
  3. Debug Settings: Check "Analyze NPC under crosshair"
  4. Scroll down and check "Queue escape attempt at menu close"
  5. Close MCM and wait about 10 seconds, the NPC should not struggle

Also if you enabled papyrus logging this test should generate a log entry similar to the following:

[DDNF] Aborting escape attempt for 38004F08 Laura because npc has Devious Devices outfit.

Or:

[DDNF] Aborting escape attempt for 2E119E34 Abigail because npc is blocklisted for struggling.

 

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

 

I hope the new escape blocking logic works reasonably well (the old one with mod dependencies did not work on SE). It should now work on both classic and SE. I did some quick testing on classic only. If somebody wants to do additional testing, here are the instructions for testing:

  1. Go to a NPC who is supposed to wear devices and not struggle and aim at them until you get the "talk" prompt
  2. Open the "Better NPC Spt for DD" MCM page
  3. Debug Settings: Check "Analyze NPC under crosshair"
  4. Scroll down and check "Queue escape attempt at menu close"
  5. Close MCM and wait about 10 seconds, the NPC should not struggle

Also if you enabled papyrus logging this test should generate a log entry similar to the following:

[DDNF] Aborting escape attempt for 38004F08 Laura because npc has Devious Devices outfit.

Or:

[DDNF] Aborting escape attempt for 2E119E34 Abigail because npc is blocklisted for struggling.

 

Tested on Laura from Laura's Bondage Shop in SE. The analyses said she was wearing 0 devices, but I queued an escape attempt anyway. Papyrus log shows as it should. "Aborting escape attempt for 41004f08 Laura because npc had Devious Devices outfit.

Link to comment
35 minutes ago, HeckinBestBork said:

Tested on Laura from Laura's Bondage Shop in SE. The analyses said she was wearing 0 devices, but I queued an escape attempt anyway. Papyrus log shows as it should. "Aborting escape attempt for 41004f08 Laura because npc had Devious Devices outfit.

 

Thanks ?. The analysis says that she is wearing 0 devices because her outfit only contains the rendered devices and not the inventory devices. This is somewhat unexpected for my code but it works correctly in the game as long as nobody tries to modify her devices.

Edited by Kharos
Link to comment
Version 0.5.1
- Hotfix: Tighten code to reduce chance of race condition and implement additional code to mitigate the problem

 

I found an issue where the mod would sometimes not fully clean up after leaving a cell containing tracked NPCs. This would keep a reference to the NPC and prevent the mod from handling the NPC when re-entering the cell. I did not find a clean way to reproduce the issue though.

 

In any case I suggest everybody using 0.5 updates to the fixed version, I tried to tighten the code to reduce the chance of this happening and I added some additional code to automatically detect and fix the issue if it occurs again.

Link to comment

In the meantime I have been working on various small improvements, mainly stability, some visual fixes, and better support for Special Editition.

 

The one "real" new feature is that NPCs in bondage will now be defensive even if bound combat is enabled. Up to now they basically jumped at the opportunity of combat, often with bad outcomes. Now they will try to hold back and let others fight for them, unless they are attacked directly. An exception is provided for followers if the player is bound, too, in that case they should still behave offensively.

 

Version 0.6 beta 1
- Make bound NPCs behave defensively even if bound combat is enabled
- Do not make bound NPCs behave defensively if they are followers and player is bound, too
- Allow non-followers to use bound combat, too, if it is enabled in Devious Devices settings
- Unequip arrows too when unequipping weapons from bound NPCs
- Ignore disabled NPCs
- Various optimizations
- Build system: Support different files for classic skyrim and special edition
- Make MCM mod name display work for esl's in special edition (this requires se-only script changes)

 

Classic Skyrim:

Better NPC Support for Devious Devices 0.6 beta 1.7z

 

Skyrim Special Edtition:

Better NPC Support for Devious Devices 0.6 beta 1 SE.7z

 

A minor change: The special edition MCM should now say "(SE)" in the title of the page, this is a first small test that different files for classic and for SE are actually working.

proper_se_support.png.5e511371e24e411f7fe779e442f9587e.png

Edited by Kharos
Link to comment
53 minutes ago, Gräfin Zeppelin said:

Is it safe to update the mod midgame ?  I run 0,1 RC3 (lol)

 

0.1 RC 3? ?

 

Only partially joking :classic_laugh: git says I merged that on 2020-07-08, so almost 1.5 years ago. In theory you should still be able to upgrade, in practice I have never tried such a huge jump. Probably better move to a location where there are no NPCs who are wearing devices, wait for about half a minute, and make a dedicated savegame. And keep the old version somewhere such that you can go back if it breaks.

 

Oh, something else. I think that version was still made for DD 4.X. Are you still using that? If so then do not update to the newest, 0.2 is the lates version that is supporting DD 4.X, all newer versions require DD 5.X.

 

[Edit]
One more, make sure to cleanly uninstall the old version, it was using loose scripts and 0.5/later are using a .bsa archive. If you fail to uninstall the loose scripts then they will override the files from the .bsa and cause trouble.

 

 

 

Edited by Kharos
Link to comment

Al

12 minutes ago, Kharos said:

 

0.1 RC 3? ?

 

Only partially joking :classic_laugh: git says I merged that on 2020-07-08 22:23:10, so almost 1.5 years ago. In theory you should still be able to upgrade, in practice I have never tried such a huge jump. Probably better move to a location where there are no NPCs who are wearing devices, wait for about half a minute, and make a dedicated savegame. And keep the old version somewhere such that you can go back if it breaks.

 

Oh, something else. I think that version was still made for DD 4.X. Are you still using that? If so then do not update to the newest, 0.2 is the lates version that is supporting DD 4.X, all newer versions require DD 5.X.

 

[Edit]
One more, make sure to cleanly uninstall the old version, it was using loose scripts and 0.5/later are using a .bsa archive. If you fail to uninstall the loose scripts then they will override the files from the .bsa and cause trouble.

 

 

 

Thanks alot for the dedicated anwer :)

Link to comment
Version 0.6 beta 2
- NPCs will abide by device cooldowns when trying to escape; they will only use the action with the largest chance of success, though
- Add new struggle frequency option "(by device)", this will choose struggle frequency automatically according to worn devices
- Make "(by device)" default struggle frequency for followers (only new games, existing games will continue to use the currently configured value)
- NPCs can now try to escape by picking the lock of their devices, as long as they have lockpicks in their inventory (they will break on failure)
- Add MCM setting to enable/disable escape by picking locks, default option is "Current Followers Only"
- Some small fixes

 

Classic Skyrim:

Better NPC Support for Devious Devices 0.6 beta 2.7z

 

Skyrim Special Edition:

Better NPC Support for Devious Devices 0.6 beta 2 SE.7z

 

Abiding by device cooldowns when trying to escape and being able to escape by picking locks are advanced features for the escape system that I originally wanted to do in 0.5, but decided to skip because the number of changes for 0.5 was already huge. Now that they are implemented it should be possible to just set the struggle frequency to "(by device)" and let the system figure it out automatically. I am keeping the option to set a fixed frequency in case "(by device)" ends up being too frequent (some devices have cooldowns as short as 0.5 game hours).

  • All times are approximate with some random component, e.g. if you set it to 1 game hour the actual time will be somewhere between 0.9 and 1.3 game hours.
  • NPCs should never struggle more often than approximately every 0.5 hours, even if you set "(by device)" and a device has for some reason no cooldown.
  • NPCs can only pick locks of their devices if this is enabled in MCM, if their hands are free (e.g. no mittens), and if they have lockpicks in their inventory. Failures will destroy lockpicks!

 

[Edit]

Comparing my code again with the DD code I think that there is a mistake in the lockpick chance calculation, it does not take into account the lock access difficulty. I will post an updated version later, in the meantime be aware that NPCs are "too good" at escaping that way.

 

 

Edited by Kharos
Link to comment
Version 0.6 beta 3
- Fix lockpick escape: NPCs first need to access lock before they can pick it, just like players
- Apply Devious Devices cooldown difficulty modifier (configured in DD MCM) to NPCs
- Optimize escape attempt triggering code, especially for "(by device)" case

 

Classic Skyrim:

Better NPC Support for Devious Devices 0.6 beta 3.7z

 

Skyrim Special Edition:

Better NPC Support for Devious Devices 0.6 beta 3 SE.7z

 

I took a good look at the Devious Devices code for players and made sure that the logic for NPCs is the same. NPCs will now need to succeed on two "dice rolls" to pick the lock of worn devices: A first one to access the lock (skipped for devices with lock access difficulty of 0), a second to actually pick the lock. Only a failure of the second roll will cause broken lockpicks, a failure of the first roll will not.

Link to comment
3 hours ago, Kharos said:
Version 0.6 beta 3
- Fix lockpick escape: NPCs first need to access lock before they can pick it, just like players
- Apply Devious Devices cooldown difficulty modifier (configured in DD MCM) to NPCs
- Optimize escape attempt triggering code, especially for "(by device)" case

 

Classic Skyrim:

Better NPC Support for Devious Devices 0.6 beta 3.7z 114.13 kB · 0 downloads

 

Skyrim Special Edition:

Better NPC Support for Devious Devices 0.6 beta 3 SE.7z 108.15 kB · 4 downloads

 

I took a good look at the Devious Devices code for players and made sure that the logic for NPCs is the same. NPCs will now need to succeed on two "dice rolls" to pick the lock of worn devices: A first one to access the lock (skipped for devices with lock access difficulty of 0), a second to actually pick the lock. Only a failure of the second roll will cause broken lockpicks, a failure of the first roll will not.

 

This gets better and better, thanks!

Link to comment
On 1/2/2022 at 9:22 PM, Kharos said:
Version 0.6 beta 3
- Fix lockpick escape: NPCs first need to access lock before they can pick it, just like players
- Apply Devious Devices cooldown difficulty modifier (configured in DD MCM) to NPCs
- Optimize escape attempt triggering code, especially for "(by device)" case

 

Classic Skyrim:

Better NPC Support for Devious Devices 0.6 beta 3.7z 114.13 kB · 7 downloads

 

Skyrim Special Edition:

Better NPC Support for Devious Devices 0.6 beta 3 SE.7z 108.15 kB · 10 downloads

 

I took a good look at the Devious Devices code for players and made sure that the logic for NPCs is the same. NPCs will now need to succeed on two "dice rolls" to pick the lock of worn devices: A first one to access the lock (skipped for devices with lock access difficulty of 0), a second to actually pick the lock. Only a failure of the second roll will cause broken lockpicks, a failure of the first roll will not.

 

0.6 beta 3 sse version can makes esl?

Link to comment
3 hours ago, hwkm0818 said:

 

0.6 beta 3 sse version can makes esl?

 

Not trivial, I am using "GetFormFromFile" in a few global scripts and the form ids are all over the place. I will think about it but it might have to be a separate version to prevent breaking existing saves (or maybe the SE installer would ask).

  1. Are others interested into a .esl version, too?
  2. Who would be ready to give a future beta with .esl a proper test run?
Link to comment

I'm not 100% certain this mod is doing this, but I have never had this problem until installing this mod, and it happens when either Devious Strikers equips a gag, or when a Deviously Enslaved sex scene ends so it's not specific to either of those. A gag gets equipped to player character, along with all the effects, but does not appear in inventory. Because it's not in the inventory, it can not be struggled out of, or unlocked. Universal keys do not work and neither does the debug "Free me" in cursed loot's MCM. One way out I found was to equip a Zap 8 gag and then remove it, that gets rid of the "ghost gag" too. I'm posting this here just in case it's helpful, but if it's not your mod, then I'll take it to tech support. The problem was repeatable in both Beta 0.5 and 0.6 Beta 3 for SSE.

 

Quote

[01/05/2022 - 05:14:40PM] SEXLAB - Thread[0] Event Hook - AnimationEnd
[01/05/2022 - 05:14:40PM] [Zad]: OnAnimationEnd()
[01/05/2022 - 05:14:40PM] [CRDE] sexlabhook: belt returned is set true, attempting armor returning
[01/05/2022 - 05:14:40PM] [CRDE] Item to re-add:
[01/05/2022 - 05:14:40PM] [Zad] ((WARNING)): GetRenderedDevice received non DD argument.
[01/05/2022 - 05:14:40PM] [Zad]: Set slot mask to [338165760]: 338165760
[01/05/2022 - 05:14:40PM] [Zad] ((WARNING)): GetDeviceKeyword received non DD argument.
[01/05/2022 - 05:14:40PM] [Zad]: LockDevice called for Mio: )
[01/05/2022 - 05:14:41PM] [Zad]: OnEffectStart(gag-noFood)
[01/05/2022 - 05:14:41PM] [Zad]: OnEffectStart(gag)
[01/05/2022 - 05:14:41PM] [Zad]: StoreInFridge(gag-noFood)
[01/05/2022 - 05:14:42PM] DF - ReduceResist: startingWill 10.000000, starting resist 12.000000, removing 7.000000
[01/05/2022 - 05:14:42PM] DF ReduceResist by 7.000000 to 5.000000
[01/05/2022 - 05:14:42PM] DF - ReduceResist - final resistance 5.000000
[01/05/2022 - 05:14:42PM] _STA_: DialogQueue: SENDING: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[01/05/2022 - 05:14:42PM] SlaveTats: Beginning synchronization for Mio
[01/05/2022 - 05:14:42PM] SlaveTats: Nothing has changed. Cancelling synchronization.
[01/05/2022 - 05:14:43PM] [Devious Strike]: SexLab Event with player ended
[01/05/2022 - 05:14:43PM] _STA_: DialogQueue: Q Size: 0. Speaking: . Index: -1
[01/05/2022 - 05:14:48PM] [DCUR] Periodical update starts
[01/05/2022 - 05:14:48PM] [DCUR] Hourly events processing
[01/05/2022 - 05:14:48PM] [CRDE] time before NPC search: 2.161011
[01/05/2022 - 05:14:48PM] [DCUR] Scanning for followers
[01/05/2022 - 05:14:48PM] [CRDE] closest npc(s): 1:Adrianne Avenicci, 2:Lillith Maiden-Loom, 3:Commander Caius, 4:Whiterun Guard, 5:Jon Battle-Born, 6:Jon Battle-Born, 7:Claudius
[01/05/2022 - 05:14:50PM] [DCUR] - Follower found: Lydia
[01/05/2022 - 05:14:51PM] [DCUR] Skipping processing bound girls - menus are open.
[01/05/2022 - 05:14:51PM] SEXLAB - Thread[0]  - Returning to thread pool...

 

Edited by rainbowgasm
Link to comment
5 hours ago, rainbowgasm said:

I'm not 100% certain this mod is doing this, but I have never had this problem until installing this mod, and it happens when either Devious Strikers equips a gag, or when a Deviously Enslaved sex scene ends so it's not specific to either of those. A gag gets equipped to player character, along with all the effects, but does not appear in inventory. Because it's not in the inventory, it can not be struggled out of, or unlocked. Universal keys do not work and neither does the debug "Free me" in cursed loot's MCM. One way out I found was to equip a Zap 8 gag and then remove it, that gets rid of the "ghost gag" too. I'm posting this here just in case it's helpful, but if it's not your mod, then I'll take it to tech support. The problem was repeatable in both Beta 0.5 and 0.6 Beta 3 for SSE.

 

 

 

This mod should 100% ignore the player character.

If you want to be sure that it is not somehow misbehaving, enable papyrus logging in the MCM debug settings and search the papyrus log for entries starting with [DDNF].

Link to comment
11 hours ago, Kharos said:

 

This mod should 100% ignore the player character.

If you want to be sure that it is not somehow misbehaving, enable papyrus logging in the MCM debug settings and search the papyrus log for entries starting with [DDNF].

Couldn't find anything like that. I'll still try to recreate the problem with your mod disabled and if I can't, I'll let you know.

 

Edit: Found the problem. It's not your mod.

Edited by rainbowgasm
Link to comment
2 hours ago, rainbowgasm said:

Couldn't find anything like that. I'll still try to recreate the problem with your mod disabled and if I can't, I'll let you know.

 

Edit: Found the problem. It's not your mod.

 

Out of curiosity, what was the problem?

Link to comment
  • 3 weeks later...

Can some one teach me DD basic...

 

so I just make NPC wear DDassets Yoke or Armbinder, >> then I expect,,  they show bound pose like ZAZ do...

 

but how I try it,, it seems not work....  This mod will slove this issue?  if you do same thing, (Add item menu >> pick  yoke and Arm binder from DDa,  then equip them for NPC,, (just use EFF dialogue for follower),,  they equip item, but not pose at all... (so their hand are free move)

 

At current I only install DD frame works.. (base 3 esm) not activate other DD patch etc... then install and activate this mod..

 

====
And after I activate this mod,, then I make NPC equip armbinder,,

they do not show bound pose (as same as before) ,, but the item seems gone away ^^;.

 

I check her equipment, but there is no armbinder anymore, as if it is removed from skyrim world..

 

is it intended?  

 

Edited by greenmango12
Link to comment
4 minutes ago, greenmango12 said:

This mod will slove this issue?  if you do same thing, (Add item menu >> pick  yoke and Arm binder from DDa

This mod's purpose is to keep the NPC acting properly if bound, and restore any broken effects if they happen. Afaik DDa items are just regular items, they don't do nothing outside of appearing on your character, so you need to get the items from DDi or DDx, they should work properly in terms of animation/pose overrides and effects.

Link to comment
28 minutes ago, Taki17 said:

This mod's purpose is to keep the NPC acting properly if bound, and restore any broken effects if they happen. Afaik DDa items are just regular items, they don't do nothing outside of appearing on your character, so you need to get the items from DDi or DDx, they should work properly in terms of animation/pose overrides and effects.

Ah thanks, now I gradually understand DD ^^;  (so I had installed DD long time, but never used it as real meaning,,)

and yes,, so I happend to find high-security arm binder, (use Add item menu as cheat player), then with dialogue, NPC equip it >>> time lag>>

she finally show bound pose....  

 

Then new problem ?

OK I was wrong, I understand I do not use mod correctly, so I have no key.... I can not remove it from my follower....

Is there any way.. even though I do not have key, but can NPC free?   I tried to use NPC dresser to force to use preset wear.. but the high security seems remain, and she keep posing... if I set equipment for NPC, which may use same slot of arm binder,, she can remove it???

fortunatelly I only test DD mods, so it not break my other save data for real play,,, but hope to know,, how remove DDe item, from NPC without key etc...

Link to comment
17 minutes ago, greenmango12 said:

OK I was wrong, I understand I do not use mod correctly, so I have no key.... I can not remove it from my follower....

Afaik high security items are from DCL, and they are only supposed to equip on the player, and they are unique in the sense that they only come off if the player pays a blacksmith to unlock them.

 

If you want to test stuff, and - if you are unaware what each item does exactly - instead of using additem menu to possibly get yourself or your companions into stuff you shouldn't access normally, nor can't remove, why don't you use a mod that adds vendors who sell DD items? Like this one:

You can cheat yourself as much money as you desire, buy the items and their matching keys that work properly, are unlockable and not related to quests that equip and unequip them, and you can play around, having dress up with your followers to your heart's content without accidentally screwing something up.

Edited by Taki17
Link to comment
23 minutes ago, Taki17 said:

Afaik high security items are from DCL, and they are only supposed to equip on the player, and they are unique in the sense that they only come off if the player pays a blacksmith to unlock them.

 

If you want to test stuff, and - if you are unaware what each item does exactly - instead of using additem menu to possibly get yourself or your companions into stuff you shouldn't access normally, nor can't remove, why don't you use a mod that adds vendors who sell DD items? Like this one:

You can cheat yourself as much money as you desire, buy the items and their matching keys that work properly, are unlockable and not related to quests that equip and unequip them, and you can play around, having dress up with your followers to your heart's content without accidentally screwing something up.

, yes I know there are mods which sell dd item, but I seldom use  new location mod...if I can.. without I really keep to use it..

 

I might need to think more,, when  test DD items,, I could remove it from console command, but do not know if it effect the item..

so If I next test those DD items, I may try your suggestion thanks... my intention is,, to make simple mod which offer dialgoue,, and auto generate and attach DD or zaz items,  and start sexlab animation which fit the item, (eg Yoke and  only start Yoke animation with tags)

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