Jump to content

Better NPC Support for Devious Devices


Recommended Posts

Version 0.1 Beta 5
- Detect concurrent modifications to a NPC while the mod is fixing up devices of the NPC and abort the fixup (fail fast).
- Reduce number of NPCs that can be found by the scanner quest from 8 to 4 (the mod is still able to handle more, it will just take longer to find them).
- Only allow fixing devices of a particular NPC every 5 seconds real time (slow down). This includes situations where the fixup was aborted.
- Only allow fixing devices of 3 NPCs over a period of 3 seconds (slow down).
- Various other small optimizations.
- Add very minimal logging. It is off by default and can be enabled using "setpqv DDNF_NpcTracker EnablePapyrusLogging true".

 

As you can read, I have tried to reduce the script load in situations with a lot of NPCs, and in particular in situations with NPCs whose inventory is being modified by other scripts. At the same time I have not removed functionality. The mod should just take more time to find and process NPCs, and be less aggressive about it.

 

This does not solve all problems. Testing with a combination of Devious Hydra Slavegirls and Devious Wenches, when the game spawns a lot of NPCs with devices (e.g. when entering Dragonsreach for the first time, or when encountering a new large group in the wilderness) the large amount of newly spawned devious devices causes enough script load that the game has trouble keeping up. On my machine (with some other mods that cause additonal script load) I am seeing some dumped stacks, and there is visible script lag: Reapplying devices and animations gets very slow. When entering Dragonsreach for the first time, it can take up to a minute until all special effects are applied to all NPCs. Especially the bound hands animations can take a long time as switching animations is expensive.

At least in my game, with this new version things will settle down; the game is able to recover from this situation, though it may take a moment. When I leave Dragonsreach after things have settled down and enter it again, things are much smoother. Most probably because the NPCs with their devices are now part of the savegame. Of course I cannot know for sure what will happen in your games @donttouchmethere @donkeywho, you will have to try it out (no need to hurry though, I will not have much time tomorrow in any case).

 

 

Link to comment
On 7/3/2020 at 11:50 PM, Kharos said:

Version 0.1 Beta 5

Looks good so far! (added to a running game, at the end of LO)

I tried it with HSG slaves in the wilderness (didn't even cause lag, but they also didn't wear any armbinders).

I tried Windhelm and I got a short lag after entering the city, but that was over quickly (lots of Corsec DD bound NPC).

A save made after all followers where loaded into the city (takes about 2-4sec on my setup) was free of zad scripts, so I guess the bulk got processed already (also: no suspended stack leftovers).

 

Will do a longer test tonight.

 

(also thx for the little message that confirms that BNSFDD gets loaded)

Link to comment
3 hours ago, donttouchmethere said:

7 hours now with BNSFDD 0.1beta5 and no zad suspended stacks so far.

Armbinder and chain restrain idles work.

The delay works too, visible as re-equipping of devices after waiting a while in a cell with DD NPC.

Ok, thanks. Is the delay too bad? I could always try to reduce the delays but this will of course increase the chance of suspended stacks.

The "perfect solution" would probably be a MCM where the delays can be reduced/increased. I have never done Skyrim MCMs before, and I have been told that it can be hard to set up...

Link to comment
6 hours ago, Kharos said:

Ok, thanks. Is the delay too bad?

No, I think it's good to prevent active script spikes.

Even without delay I saw the re-equipping a lot (probably because the suspended stacks caused a delay ^^).

I was in a dialogue with a bound NPC when the re-equip happened, that was odd =D

 

6 hours ago, Kharos said:

The "perfect solution" would probably be a MCM where the delays can be reduced/increased. I have never done Skyrim MCMs before, and I have been told that it can be hard to set up...

I also heard it is tedious (after you found out how it works of course).

Don't look at me for answers, I'm just the test pilot who is always surprised that planes can fly (mostly).

 

Your idea is perfect for fine tuning, just not sure yet if that is really needed.

So far all NPC I could reach in time where already using idles or where in the state of getting into the right idle.

Really obvious gets the delay only if I enter a very small cell (home or tavern) with only one DD NPC.

 

The test continues today.

I visited 2 major cities and rushed thru lots of villages/taverns/settlements and checked the effect on my save.

So far there is nothing that makes me: "?"

 

Link to comment
35 minutes ago, donttouchmethere said:

Don't look at me for answers, I'm just the test pilot who is always surprised that planes can fly (mostly).

I'm not looking for you for answers about MCM, you are already a good test pilot, that's more than I can expect from a random stranger on the internet actually ?.

37 minutes ago, donttouchmethere said:

The test continues today.

I visited 2 major cities and rushed thru lots of villages/taverns/settlements and checked the effect on my save.

So far there is nothing that makes me: "?"

 

Ok, good to hear that.

 

Btw I am having some strange effects with NPCs in elbow binders. Sometimes their hands are visibly clipping out of the elbow binder (it looks like the hands are using the armbinder pose, which is too wide). At other times they are looking fine. I have not yet found out why it is looking fine in some situations and bad in others. Does anybody have more insight?

Link to comment
2 minutes ago, Kharos said:

Btw I am having some strange effects with NPCs in elbow binders. Sometimes their hands are visibly clipping out of the elbow binder (it looks like the hands are using the armbinder pose, which is too wide). At other times they are looking fine. I have not yet found out why it is looking fine in some situations and bad in others. Does anybody have more insight?

 

Is this with using the ones in the HSG DD patches? I noticed that the elbowbinders tend to clip a little, but I assumed that was because of my bodyslide preset, which is quite big and clips a lot (also clips with armbinders). Maybe I was wrong and there's a problem with elbowbinders in general.

Link to comment
19 minutes ago, Kharos said:

Btw I am having some strange effects with NPCs in elbow binders. Sometimes their hands are visibly clipping out of the elbow binder (it looks like the hands are using the armbinder pose, which is too wide).

I see the same on my game a lot too. I thought I messed up somewhere.

Now I guess - for what ever reason - the elbow binder fails to hide NPC hands.

What makes it so hard too troubleshot is that it seems to happen randomly.

 

If dirt/cum are on those hands they would be still invisible, but overlays will be shown.

If they wear the transparent zip suit those hands will be shown too (guess it's because the transzipsuit is a all in one outfit, the hands in the zip suit are invisible tho)

 

I have no clue why that is yet, it's only thanks to Corsec that I even see so many NPC in elbow binders ^^

 

I actually hoped that the re-equipping with BNSfDD would slove that issue for me.

 

Now that Corsec reports the same issue, I would say it happens because DDx fails to make the hands invisible sometimes.

Have to do a sneak peek into the NPC's inventory next time, maybe it's a certain DD combo?

Link to comment

This very experimental change fixes the issue for me (though I have only tested a very simple case with just an elbowbinder, no zipsuits or gloves or rings). Does it work for you too @donttouchmethere @Corsec?
 

The solution looks a bit crazy but I did not arrive at it by blindly trying stuff. I actually looked at elbowbinders in FO4Edit and the solution does make kind of sense in my (admittedly sometimes a bit crazy) mind ?.

 

Better NPC Support for Devious Devices 0.1 beta 6 EXPERIMENTAL.7z

Link to comment

First impression with beta6:

> didn't crash my game!

> BNSFDD functions still work

> Might have been coincidence, but after loading the save (and changing a cell or two) the first time the elbow binder hands where still visible on a slave.

After opening and closing the slaves inventory BNSFDD kicked in and solve the issue at "hand".

 

Spoiler

a short while after load and waiting near the slave:

228670430_enb2020_07_0520_36_08_52.jpg.a04b304bb8387bf228cddc080584358b.jpg

 

pickpocketing slaves inventory:

1196195888_enb2020_07_0520_37_58_84.jpg.a6f462b79c1c5b0a4a9e5a12673874af.jpg

 

slave got updated:

75492562_enb2020_07_0520_37_50_60.jpg.9f62ee610cbc3792274d5ad87c406686.jpg

 

648377992_enb2020_07_0520_37_53_53.jpg.fe44008781541351b28a643211741096.jpg

 

another slave had her hands where they belong right after load:

150096920_enb2020_07_0520_39_11_05.jpg.0446c0d2eb452a5ab259492117e5cb51.jpg

 

1520036316_enb2020_07_0520_39_22_52.jpg.5c5995e9c20f60f1fee7ec8c09ed7b5f.jpg

 

 

test continues!

save is safe so far =D

Link to comment
1 hour ago, donttouchmethere said:

After opening and closing the slaves inventory BNSFDD kicked in and solve the issue at "hand".

Great, thanks for testing!

1 hour ago, donttouchmethere said:

test continues!

There is no need to (re)test things that are working in beta 5, as the "experiment" is only a single line, hopefully forcing the game to update body parts.

I will include this change in the next version, which will contain a few more optimizations. Also I feel that we are getting close to a state where the "experimental" warning on the OP can be removed ?.

Link to comment
25 minutes ago, Kharos said:

There is no need to (re)test things

The good thing about your mod: I can test it while doing my usual Skyrim/LL stuff (yeah, yeah, risky)

So it will be a continuous test, because it looks like I can keep your mod just where it is and continue playing.

If all keeps working like that I can add another new and risky mod to the LO without blaming your mod for anything that might go wrong then ?

Link to comment
10 minutes ago, donttouchmethere said:

The good thing about your mod: I can test it while doing my usual Skyrim/LL stuff (yeah, yeah, risky)

I'm doing the same: Playing, seeing things that are not working, making changes to the mod, testing the changes for a bit, then continue playing.

Link to comment

Beta6 still works ^^

I get some lag from BNSFDD, nothing game breaking, but also very recognizable.

Lag stops after all NPC are processed (inclusive the delayed ones).

 

the results are totally worth it:

saves all free of suspended stacks

Spoiler

1535950011_enb2020_07_0604_08_08_49.jpg.df9e63996bc13f3b6b138bdb7ec01b21.jpg

 

1681028841_enb2020_07_0604_08_07_18.jpg.3ce1866f8de0d28977cb0973a83180b3.jpg

 

The delay makes it possible to see live how the mod processes NPC:

Spoiler

940936980_enb2020_07_0603_41_07_13.jpg.d73898c0ec649fd0670c68ac0a90fa06.jpg

 

1660535763_enb2020_07_0603_41_27_72.jpg.66b5d5dedaaf8603af5e5d63d25c81a4.jpg

 

 

Spoiler

1308803105_enb2020_07_0603_42_54_12.jpg.d2b10cc51104395169c74e9fa5049c3c.jpg

 

1171987869_enb2020_07_0603_42_58_58.jpg.f49e2fc9f04d86128a31e7b0ba1d868d.jpg

 

Link to comment
Version 0.1 RC 1
- Use a workaround to force the game to correctly hide body parts according to armor addon item slots (this fixes hands clipping out of elbowbinders).
- When scanning devices, check for each device if it has an enchantment; if not, assume it has no special functionality (e.g. heavy bondage, different animations).
- When unequipping and reequipping devices, skip devices that have no enchantment (they have no effect that needs to be restarted).
- Improve handling of weapons for bound followers: They should no longer try to draw weapons, and they should no longer run with one or both arms sticking out.

Again significant changes compared to the last version, trying to fix some issues and optimise a little bit.

This is now far enough that I am naming it a Release Candidate; if no issues show up in the next week or so, I will declare it as a first stable (non-beta) version.

Link to comment
35 minutes ago, donttouchmethere said:

What time is it?

It's UPDATE o'CLOCK!

It's time to go to bed, but it occurred to me that I could make two additional small optimizations so I am hacking and testing instead ?.

Link to comment
1 hour ago, Kharos said:

It's time to go to bed, but it occurred to me that I could make two additional small optimizations so I am hacking and testing instead ?.

Sleep is totally overrated! :classic_sleep:

If your body really wants some sleep: You can easily recognize it by the imprints of keyboard keys left on your forehead ?

 

Link to comment
Version 0.1 RC 2
- Optimization: Detect if an added/removed device does not change the existing animations (e.g. when gagging bound NPCs) and skip refreshing animations in that case.
- Optimization: Refactor detection of keywords on devices, will hopefully reduce the amount of keyword checks for NPCs wearing many devices.
- Fix: Prevent NPCs with bondage mittens from using shields.

 

Link to comment
Version 0.1 RC 3
- Changes to improve compatibility with DDe (and possibly other mods that use non-standard ways of equipping and unequipping devices).

The main issue was that NPCs wearing DDe outfits that included animations (e.g. bondage devices) would keep their animation after the DDe outfit was removed.


Note that it can take a while for my mod to recognize that a NPC has been put into a DDe outfit. DDe is not sending any events and suppressing the events usually sent by DDi, so the NPC will only be be found by the scanner quest that is running every 10 seconds.

Link to comment
14 minutes ago, donttouchmethere said:

That was fast ?

I have a collection of fully automated build scripts. The main script (build.sh) will compile all papyrus scripts, merge the resulting .pex files with the package file tree that contains the other files, copy-paste the version number into the FOMOD info.xml file, and build a ready-to-install .7z archive containing everything. This takes about 10 seconds. Installing the resulting build with MO2 takes about another 10 seconds.

 

In other words, for changes that don't require me to touch the .esp I never even open creation kit (saving a lot of sanity), and I can very rapidly make changes and test them.

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