Jump to content

Better NPC Support for Devious Devices


Recommended Posts

Better NPC Support for Devious Devices 0.5 beta 4.7z

 

Version 0.5 beta 4
- First version of escape system, disabled by default, needs to be enabled in MCM
- Some bugfixes, e.g. race conditions when loading game
- Change layout of MCM

 

This ☝️ is actually my main goal for version 0.5.

 

I am implementing an optional system that allows NPCs to free themselves from devices by either unlocking them (if they have a key in their inventory) or by struggling out, similar to how players can free themselves. It is somewhat simplified (i.e. there are no critical failures at the moment, and NPC cannot cut devices or pick locks) but it seems to work rather well in my tests, including respecting limitations and dependencies: NPCs need to get rid of heavy bondage before removing other devices, mittens prevent them from using keys, devices that need multiple keys are supported, belts prevent removal of plugs, etc.

 

Keep in mind that this is a beta, so things may still be rough or even buggy. It is disabled by default (so you can update to this beta even if you are not interested into this feature) and can be enabled in MCM, either only for current followers or for all NPCs. Enabling it for all NPCs in a game with many "slotted" NPCs might be a bad idea... in any case if you are using this and notice any issues, please tell me ?.

 

Edited by Kharos
Link to comment

Oh wow!

 

This is a very unexpected but pleasant surprise! An NPC escape system! You keep inventing those things that I didn't know I needed in my game, but oh boy, how very much I do need them in my game! :)

 

I'd like to help with testing -- anything in particular you'd like us to watch out for?

Also, should I attempt a test with an updated old savegame, or exclusively on a fresh start?

Link to comment
13 minutes ago, El_Duderino said:

Oh wow!

 

This is a very unexpected but pleasant surprise! An NPC escape system! You keep inventing those things that I didn't know I needed in my game, but oh boy, how very much I do need them in my game! :)

 

I'd like to help with testing -- anything in particular you'd like us to watch out for?

Also, should I attempt a test with an updated old savegame, or exclusively on a fresh start?

 

It should theoretically not make a difference whether you use a new game or continue using an existing one. I usually continue testing with existing games as this is easier (more different characters in different quests).

I am assuming that this could especially be useful for players who are using Deviously Cursed Loot or something like that with followers. For testing basically just turn it on and continue doing what you are usually doing, watching out for something unexpected to happen. If you want to focus your testing a bit more, the following questions could be interesting for me:

  1. Do you see behavior that feels unexpected or dumb? Even if it is technically correct I might want to change it.
  2. If you turn on notifications for followers, are the messages helpful in understanding what the follower is doing when they try to escape, or is it too much/not enough? The mod is also playing animations if available, but not all devices have animations, and sometimes animations can be interrupted and "break".
  3. If you are using mods that depend on Devious Devices: Some of these have quests where NPCs are supposed to wear devices, does this cause problems with these quests?

The mod will never allow NPCs to escape devices that are marked as "quest" or "block generic" devices (a feature of the Devious Devices framework), but it is possible that not all other mods are setting up things like that. So it is possible that escapes could break quests in other mods when a NPC unexpectedly frees herself. You can use the MCM to force a specific NPC to try to escape immediately if you want to test a specific situation involving bound NPCs instead of waiting for their next escape attempt.

Link to comment

Brilliant! Thanks much for the instructions. I shall thus back up my save game files (just in case) and do my first tests directly in my current playthrough. Where, as you have guessed, me and my followers are already "suitably suited". I blame whoever put those deviously cursed chests and corpses all over Skyrim!

 

I'll pay special attention to NPCs commonly dressed in DDs by default (a good excuse to visit Laura's and Elvira's shops and the Whip and Chain!) I have also fitted some of the hydra NPCs with DDs in my game (esp outfit edit), which I guess they'll now also want to struggle out of. Of interest might also be that I'm playing with Nether's follower framework, so I can check how it and the latest BNPCS play together (no issues with the current versions).

Link to comment
1 hour ago, El_Duderino said:

Brilliant! Thanks much for the instructions. I shall thus back up my save game files (just in case) and do my first tests directly in my current playthrough. Where, as you have guessed, me and my followers are already "suitably suited". I blame whoever put those deviously cursed chests and corpses all over Skyrim!

 

I'll pay special attention to NPCs commonly dressed in DDs by default (a good excuse to visit Laura's and Elvira's shops and the Whip and Chain!) I have also fitted some of the hydra NPCs with DDs in my game (esp outfit edit), which I guess they'll now also want to struggle out of. Of interest might also be that I'm playing with Nether's follower framework, so I can check how it and the latest BNPCS play together (no issues with the current versions).

 

Nether's is part of my load order, too, it should work without any issues.

 

Do not forget to enable the new feature for all NPCs in the MCM if you really want to test that things like the shops. The whip and chain should not cause any issues, I have already blocked it to prevent the various NPCs there from struggling out of their devices. They seem to enjoy them...

Link to comment

I couldn't resist the temptation, so here is a first and fairly quick test report some of "the good, the bad, and the ugly" (as I see it) in version 0.5b5. I'm including some ideas that popped into my mind, please don't read any "demands" into that. I'm not a modder myself and don't even know if any of that is even doable.

  • First of all, I love it! It's very cool to watch (and quite immersive, too) when the followers suddenly start to struggle.
  • Screen messages are short and concise and nicely explanatory, though the final one seems a bit odd to me. Maybe a part of it is missing? I mean the "[Follower] remains" line that pops up after they fail to struggle out of the devices.
    • Would it be possible to add a setting to make the messages optional, or maybe only show the result (fail/success)? I can imagine it would be even more fun if the followers start struggling without "warning"
  • MCM options offer nice tuning options -- especially welcome is that we can differentiate between followers and other NPCs
    • If it's possible to do, I think a random struggle timer setting would be very cool (in addition to the 1 hour, 2 hours, ... options)
    • Along similar lines, I think it would be great if the number/choice of restraints that the followers try struggling out of every time could also get randomized (or limited). One of my followers had a recent run-in with a Devious Striker and is currently a bit "wrapped up", which means that she went though a lot of struggle cycles. Which was great fun to watch, but I guess this could get old fairly quickly if it happens every few hours.
  • Followers that are already doing a sandbox anim (in this case, cooking food) seems to win over the struggle anim. The struggle technically still works (the status messages all show up, including the results), but without any struggle visuals. However, followers that are walking when the struggle scene kicks in stop in their tracks and start the appropriate struggle anims (and yes, I've verified that the devices in question all had their struggle anim properties set up)
    • otherwise it seems to work well with NFF-managed vanilla and also imported custom followers (in this case, 3DNPC followers)
  • The non-follower NPC feature is currently posing a bit of a conundrum for me. I've looked at my relevant mods in xEdit and I've found quite a few NPCs which are wearing regular restraints but for whom it wouldn't make much sense to struggle out of them. This applies to the like who wear them voluntarily (shop keepers, etc.) but also some of the tied up NPCs (DCL's Bound Girls, etc.) where it might break immersion (or worse) if they manage to get out of their restraints on their own.
    • Might it be possible to extend this feature with some sort of black- or white-listing of NPCs to (dis-)allow them to be processed? Maybe a spell that could be cast onto them by the player, adding them to a list telling the mod that it's (not) okay to process them for struggling? Judging by my own mod list, I suspect that a whitelist would probably be more useful than a blacklist, because I think there are more NPCs who should *not* be able to struggle than the opposite.

That's it and sadly all I've had time for right now. I'll keep playing around with this (next up: combat, Death Alternative, etc.) and see where that'll take me.

 

Really enjoying this new feature which makes an already brilliant mod even better!

Link to comment
27 minutes ago, El_Duderino said:

I couldn't resist the temptation, so here is a first and fairly quick test report some of "the good, the bad, and the ugly" (as I see it) in version 0.5b5. I'm including some ideas that popped into my mind, please don't read any "demands" into that. I'm not a modder myself and don't even know if any of that is even doable.

  • First of all, I love it! It's very cool to watch (and quite immersive, too) when the followers suddenly start to struggle.
  • Screen messages are short and concise and nicely explanatory, though the final one seems a bit odd to me. Maybe a part of it is missing? I mean the "[Follower] remains" line that pops up after they fail to struggle out of the devices.
    • Would it be possible to add a setting to make the messages optional, or maybe only show the result (fail/success)? I can imagine it would be even more fun if the followers start struggling without "warning"
  • MCM options offer nice tuning options -- especially welcome is that we can differentiate between followers and other NPCs
    • If it's possible to do, I think a random struggle timer setting would be very cool (in addition to the 1 hour, 2 hours, ... options)
    • Along similar lines, I think it would be great if the number/choice of restraints that the followers try struggling out of every time could also get randomized (or limited). One of my followers had a recent run-in with a Devious Striker and is currently a bit "wrapped up", which means that she went though a lot of struggle cycles. Which was great fun to watch, but I guess this could get old fairly quickly if it happens every few hours.
  • Followers that are already doing a sandbox anim (in this case, cooking food) seems to win over the struggle anim. The struggle technically still works (the status messages all show up, including the results), but without any struggle visuals. However, followers that are walking when the struggle scene kicks in stop in their tracks and start the appropriate struggle anims (and yes, I've verified that the devices in question all had their struggle anim properties set up)
    • otherwise it seems to work well with NFF-managed vanilla and also imported custom followers (in this case, 3DNPC followers)
  • The non-follower NPC feature is currently posing a bit of a conundrum for me. I've looked at my relevant mods in xEdit and I've found quite a few NPCs which are wearing regular restraints but for whom it wouldn't make much sense to struggle out of them. This applies to the like who wear them voluntarily (shop keepers, etc.) but also some of the tied up NPCs (DCL's Bound Girls, etc.) where it might break immersion (or worse) if they manage to get out of their restraints on their own.
    • Might it be possible to extend this feature with some sort of black- or white-listing of NPCs to (dis-)allow them to be processed? Maybe a spell that could be cast onto them by the player, adding them to a list telling the mod that it's (not) okay to process them for struggling? Judging by my own mod list, I suspect that a whitelist would probably be more useful than a blacklist, because I think there are more NPCs who should *not* be able to struggle than the opposite.

That's it and sadly all I've had time for right now. I'll keep playing around with this (next up: combat, Death Alternative, etc.) and see where that'll take me.

 

Really enjoying this new feature which makes an already brilliant mod even better!

 

Thanks for the test run, I am taking notes. Some quick points:

  • You can already disable the messages if you prefer playing without them (and even if enabled they only show up for followers).
  • The non-follower feature is a dangerous one (there are good reasons that it is disabled by default). I will think about ways to make it safer, I think you are right that there are just too many ways how it can break other mods at the moment.
Link to comment

Hi Kharos, thanks much!

 

Imagine how stupid I felt when I went back into the game last night and there was that "disable messages" toggle staring me in the face. :O

 

But leaving the messages on during the tests, I then went and did some fighting. And things didn't go all smoothly. I went up to Bleak Falls Barrow using what's likely the common approach -- sneak behind that pillar, shoot arrows, wait for bandits to come down the stairs, more arrows, melee, victory (or defeat).

 

In a lucky coincidence (for the test), the followers' struggle timer elapsed just while the bandits were already alert and searching for us, but hadn't discovered us yet. I guess that means that the game hadn't put the followers in combat state just yet. However, while they were merrily struggling against their restraints, the bandits did discover us and started raining arrows, bolts, and fireballs down on us. And I think the followers didn't even stop their struggles (I was too focused on the bandits to tell for sure), but at any rate they got picked off in rapid succession.

 

That was probably an edge case of Skyrim combat, but similar situations can probably happen in different situations. Maybe a saber cat coming out of nowhere, or the party trying to navigate past some swinging blade traps, or combat triggering suddenly because of failed bribes, etc. (Valtheim towers or similar).

 

One possible way that I can think of that might make this safer is to restrict the locations where struggles may fire. Maybe only permit it in safe/inhabited zones such as towns, inns, shops, player homes? Or disallow it while the party is sneaking and/or weapons are drawn?

Link to comment
8 hours ago, El_Duderino said:

Hi Kharos, thanks much!

 

Imagine how stupid I felt when I went back into the game last night and there was that "disable messages" toggle staring me in the face. :O

 

But leaving the messages on during the tests, I then went and did some fighting. And things didn't go all smoothly. I went up to Bleak Falls Barrow using what's likely the common approach -- sneak behind that pillar, shoot arrows, wait for bandits to come down the stairs, more arrows, melee, victory (or defeat).

 

In a lucky coincidence (for the test), the followers' struggle timer elapsed just while the bandits were already alert and searching for us, but hadn't discovered us yet. I guess that means that the game hadn't put the followers in combat state just yet. However, while they were merrily struggling against their restraints, the bandits did discover us and started raining arrows, bolts, and fireballs down on us. And I think the followers didn't even stop their struggles (I was too focused on the bandits to tell for sure), but at any rate they got picked off in rapid succession.

 

That was probably an edge case of Skyrim combat, but similar situations can probably happen in different situations. Maybe a saber cat coming out of nowhere, or the party trying to navigate past some swinging blade traps, or combat triggering suddenly because of failed bribes, etc. (Valtheim towers or similar).

 

One possible way that I can think of that might make this safer is to restrict the locations where struggles may fire. Maybe only permit it in safe/inhabited zones such as towns, inns, shops, player homes? Or disallow it while the party is sneaking and/or weapons are drawn?

 

Only in safe/inhabited zones is probably too limiting. Disabling while sneaking might be a good idea. Also I agree that I need to do something about combat, I just have not yet come around to it, I felt like I needed to first get the basics right before I start fixing the exceptional cases. Also there are situations where struggling in combat might even make sense, for example if a NPC is tied up to the effect of being helpless...

Link to comment

Here is the newest beta version with minor improvements. Please revisit MCM settings if you used the previous beta.

 

Version 0.5 beta 6
- Change MCM settings for player notifications to three states: None, summary only, detailed
- Be much more restrictive about which NPCs are allowed to escape devices if they are not current follower
- Various fixes, tweaks and internal changes to escape system and handling of devices

 

Better NPC Support for Devious Devices 0.5 beta 6.7z

 

I think I found a way to prevent breaking most DD mods. Whenever a NPC who is not currently a follower is supposed to struggle, I check if the NPC was defined in a mod that depends on devious devices. If yes then the NPC will not struggle. This should solve the problem for bondage gear shopkeepers, bound girls from cursed loot, etc. It will still fail in some cases, e.g. hydra devious devices patch, because these NPCs are defined in a mod without DD dependency and then patched in one with dependency (I cannot detect patching from papyrus). Current followers are exempt from this check and always allowed to struggle (the player can usually access their inventory and free them), such that for example Chloe from cursed loot can struggle when she is following the player.

 

There is still a beta release, below is my current list of known issues. I will try to handle some of them in further beta updates:

  • followers struggling in inappropriate situations (sneaking, combat)
  • struggle animations not working because of other animations (e.g. cooking)
  • maybe add more tuning options
  • the (by default disabled) option to have non-follower NPCs struggle will break some things, e.g. patched hydra slavegirls

 

 

Edited by Kharos
Link to comment

Hi Kharos,

 

Thanks much for the new beta! More testing coming up soon. :)

 

You've found a very clever and elegant solution to handle DD equipped NPCs. Hydra Slaves is the only mod that I know of which has received such a DD patch for the NPCs and it's probably not nearly as widely used as the original mod. Besides, those NPCs are purely "eye candy" anyway, so I strongly doubt that it can break anything even if they manage to struggle out of their devices.

Link to comment

Better NPC Support for Devious Devices 0.5 beta 7.7z

 

Version 0.5 beta 7
- Change package to contain .bsa archive instead of loose files
- Add option to fix inconsistent devices of current followers automatically, enabled by default
- Player teammates will not start to struggle when the player is in combat or sneaking
- Change layout of MCM menu
- Add more MCM settings for tweaking struggling behavior
- Fix enable/disable NPC processing in MCM
- Various minor fixes and improvements

 

Again a rather large beta update, so please visit the MCM page. There are new options and the layout of the page has changed.

  • The mod now comes with a .ba2 archive, please make sure that all loose files from the old version are really gone when updating (e.g. MO2 users should always use replace when updating, and not merge!).
  • As a major new feature the mod should now be able to recognize inconsistent and/or broken devices when running the fixup routine on followers (e.g. after inventory changes). This includes rendered devices that are missing inventory devices, and multiple equipped devices of the same type. Currently the fix is just removing the affected rendered devices. This will not touch quest devices.
  • This update includes multiple smaller improvements to the escape system, but there are still open issues.

Notably, while followers will not start to struggle during combat, if combat starts while they are struggling they may be sitting ducks depending on the situation.

Also I have not yet investigated the issue with other animations preventing the struggle animations from working.

Edited by Kharos
Link to comment

Hi Kharos,

 

Another brilliant and exciting new update -- thank you!

"Fix inconsistent devices" sounds truly fantastic! This should save us a lot of fiddling with the console on follower inventories.

 

12 hours ago, Kharos said:

Also I have not yet investigated the issue with other animations preventing the struggle animations from working.

I saw some more of that during my quick walk around Skyrim last night and it seems that any furniture could be involved in this. So far, I've seen it happen when the followers were cooking, smithing, were in bed or even just sitting on a chair. So probably this will happen when they're using any furniture during sandboxing.

 

Is there a command/package/whatever in the game to instruct them to simply stop using whatever it is they're using before running the struggle sequence?

Link to comment

Better NPC Support for Devious Devices 0.5 beta 8.7z

 

Varion 0.5 beta 8
- Interrupt escape attempts when NPCs are hit
- Prevent struggling NPCs from moving or using furniture

 

I am not aware of any more issues at the moment, so this is getting much closer to a non-beta release.

 

Some devices do not have struggling animations, so the NPCs will just stand idle for about 10 seconds while "struggling" to get out (collars, fetters, suits). But there is not much that I can do about that.

Link to comment
5 hours ago, El_Duderino said:

Is there a command/package/whatever in the game to instruct them to simply stop using whatever it is they're using before running the struggle sequence?

 

I ended up making a dedicated "stay put and do nothing" package that is activated just before starting animations, and kept active until the end of the escape attempt. The same package will also cause the NPCs to exit any furniture. I try to detect if they are in a furniture and give them a few seconds to exit the furniture before I start playing the animation.

Link to comment
8 hours ago, RandomPufferFish said:

Thank you for the update! just an FYI, this seems to work for SSE as well but you need to extract the .bsa (I did not know BSAs were different from Legendary to SSE - also, I am still on SSE, have not updated to AE yet)

 

Oh, I was not aware of that either. I will try to find out more.

In the meantime, here is the same beta (no changes) but with loose files instead of a .bsa, in case others want to use it on SSE:

 

Better NPC Support for Devious Devices 0.5 beta 8 loose files.7z

 

[Edit]

Some googling suggest that classic and special edition use different bsa formats (technical difference seems to be zlib in classic vs lzma in sse). Bottom line, I need to install sse and the sse creation kit if I want to create a bsa that works for sse.

Edited by Kharos
Link to comment

Hi Kharos,

 

I've been playing with the latest beta some more and I'm happy to report that I've got nothing to report. All of the "issues" I saw in the previous betas seem to be fixed and everything seems to working as advertised, as far as I can tell. The struggle count limiter is working great, thanks much for adding this!

Link to comment
1 hour ago, El_Duderino said:

Hi Kharos,

 

I've been playing with the latest beta some more and I'm happy to report that I've got nothing to report. All of the "issues" I saw in the previous betas seem to be fixed and everything seems to working as advertised, as far as I can tell. The struggle count limiter is working great, thanks much for adding this!

 

Hi

 

Not enough Kudos is given to Kharos for this one! 

 

FWIW, are you testing the latest version on LE or SSE?  I've been 'out' for a while, but I hadn't yet upgraded my SSE game to any of the latest Betas as I wasn't sure of their status wrt SE

Link to comment
Varion 0.5 RC 1
- Change logic for unlock difficulty, use similar logic like DD does for player
- Prevent struggling when NPC is being animated by sexlab
- Internal changes allowing to recalculate helpless/not helples without full fixup

 

Version with .bsa archive:

Better NPC Support for Devious Devices 0.5 RC 1.7z

 

Version with loose files (for SE):

Better NPC Support for Devious Devices 0.5 RC 1 (loose files).7z

 

I consider this a Release Candidate. Meaning that if no bugs are found then this will become the official 0.5 release.

Edited by Kharos
Link to comment
2 hours ago, Kharos said:
Varion 0.5 RC 1
- Change logic for unlock difficulty, use similar logic like DD does for player
- Prevent struggling when NPC is being animated by sexlab
- Internal changes allowing to recalculate helpless/not helples without full fixup

 

Version with .bsa archive:

Better NPC Support for Devious Devices 0.5 RC 1.7z 100.06 kB · 1 download

 

Version with loose files (for SE):

Better NPC Support for Devious Devices 0.5 RC 1 (loose files).7z 70.69 kB · 1 download

 

I consider this a Release Candidate. Meaning that if no bugs are found then this will become the official 0.5 release.

 

Thanks for really persevering with this one. 

 

It really should be better known as it adds quite a lot to the game

Link to comment
13 hours ago, Kharos said:
Change logic for unlock difficulty, use similar logic like DD does for player

Ooh, brilliant! I was wondering why my followers seemed to be able to struggle out of their devices more frequently than I could. ;)  I already feared that RNGesus was upset with me (maybe for my abusive use of the console?) I'll give RC1 a run over the weekend.

Link to comment
23 hours ago, El_Duderino said:

Ooh, brilliant! I was wondering why my followers seemed to be able to struggle out of their devices more frequently than I could. ;)  I already feared that RNGesus was upset with me (maybe for my abusive use of the console?) I'll give RC1 a run over the weekend.

 

Most probably that was not the reason, my fix is only if they are unlocking with a key for devices that have a lock access difficulty, and even then only if you changed the DD difficulty settings. So it might have been RNG after all. Another issue that could lead to that feeling is that they are not respecting the cooldowns. E.g. if a device has a struggle cooldown of 3 hours but you set up MCM to struggle every 2 hours they will try to escape roughly every 2 hours, which is obviously more often than you are able to try.

 

If you are curious you can enable papyrus logging, the latest version should now give more logging for escapes (it should log both escape difficulty and the random number roll).

Edited by Kharos
Link to comment

Tiny update:
 

Version 0.5 RC 2
- Small performance optimization (override DD bound NPC sandbox packages with custom script to prevent unnecessary EvaluateAA call)
- Clean masters of esp

 

Version with .bsa archive:

Better NPC Support for Devious Devices 0.5 RC 2.7z

 

Version with loose files for SE:

Better NPC Support for Devious Devices 0.5 RC 2 (loose files).7z

Edited by Kharos
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