Jump to content

Better NPC Support for Devious Devices


Recommended Posts

1 hour ago, donttouchmethere said:

Would be nice if DDi would ask every time you trade a device if it should be added to the NPC or not.

But wouldn't that also happen if a mod adds devices to any NPC in the area?

It's really only a problem for a very tiny set of devices that don't have normal key behavior, and aren't quest items, which are probably all special to DCL.

Link to comment
7 hours ago, donttouchmethere said:

But I guess you wanted to make a proposal what to add to the "better NPC support"?

Would be nice if DDi would ask every time you trade a device if it should be added to the NPC or not.

But wouldn't that also happen if a mod adds devices to any NPC in the area?

Like you can see if you have a container open and DCL adds devices to any NPC in the area at the same time.

Probably not, looking at the code in DDi it is only triggered when the container menu is open, and a device is moved from a container to a NPC. As far as I know the DCL devices are newly spawned devices, they are not moved from a container to the NPC. To make it 100% watertight it would need an additional check in that script to only trigger when the "old container" is the player, but even without that check I have trouble imagining how a false positive could happen.

 

In any case since this logic is in a core DDi script, there is no good way for me to override it. I do not want to override core DDi scripts, overriding scripts from other mods is a maintenance nightmare and generally a bad idea in most cases. To implement it cleanly such a feature would need to be in DDi itself.

 

Link to comment
12 hours ago, Lupine00 said:

It's really only a problem for a very tiny set of devices that don't have normal key behavior, and aren't quest items, which are probably all special to DCL.

Must correct myself a little here.

For NPC that get devices added by corsec patches (in this case HSG slaves) I tried and removed devices with DDe.

DDe unlocks the device but keeps it in the NPC inventory.

The NPC just reequipped it.

So I needed to use "Dress up Lover's" [clean inventory] to remove the devices from the NPC inventory.

Also I guess I confuse here different issues ?

 

6 hours ago, Kharos said:

do not want to override core DDi scripts

Yeah, I actually like how your patch works atm.

I really see a lot of NPC in DDs in my game and it's amazing how they never fail to play DDi idles now.

 

6 hours ago, Kharos said:

DCL devices

I guess I need to test myself what happens if I use DL to give DCL devices to NPC... if I can even choose them for a transfer.

Link to comment
Version 0.1 Beta 4
- Recognize upgrades from one version to another one and try to handle the situation gracefully.
- Optimize all papyrus scripts after using the built-in profiler.
- Remember devices of NPCs as long as they are being tracked to prevent repeaded inventory scans.
- Try to be smarter about when to re-apply animations of a NPC (zadBoundCombatScript.EvaluateAA) as doing so is expensive and slow.
- Allow pausing the mod by using "stopquest DDNF_NpcTracker". Use "startquest DDNF_NpcTracker" to start the mod again.

 

I tried to optimize the scripts as good as I could for this version, using the papyrus profiling functionality. The mod should now cause a bit less script load and reapply effects faster, especially when travelling with bound followers (including PAHE slaves). Of course if you enter a cell with a lot of bound NPCs it still has a lot of work to do (find all NPCs wearing devices, analyze their devices, reapply effects); there is no way around that.

 

You should be able to just overwrite your installed version, the mod should recognise that it was already installed when loading a savegame and flush all cached data. As always please tell me if you spot any problems.

Link to comment
6 hours ago, Kharos said:

You should be able to just overwrite your installed version, the mod should recognise that it was already installed when loading a savegame and flush all cached data. As always please tell me if you spot any problems.

lets test!

 

EDIT: updated on a running game and so far it looks good, means the game is still running and the NPC are still DD idling.

Didn't see any multiple device updates on NPCs yet (multiple restarts of DD idles)

Just saw that the ball&chain devices slows NPCs down now too ?, they usually totally ignore that debuff on my games.

Link to comment
20 hours ago, donttouchmethere said:

Just saw that the ball&chain devices slows NPCs down now too ?, they usually totally ignore that debuff on my games.

The slow-down effect of fetters seems to be a bit unreliable in my game, too, even with my mod. I have not yet found out why.

 

[Edit] You are right, it seems to have become more reliable. Not sure why (not that I am complaining ?).

Link to comment
9 hours ago, Kharos said:

Not sure why

Guess it's because they actually wearing those DDs now inclusive effects thanks to your mod.

I mean it repairs the DDi idles on NPC, but at the same time it refreshes the buffs on the NPC.

Sometimes I even feel bad for those bound NPCs now.

That's a confirmation of quality! *cough, cough*

Link to comment

There might be an issue tho.

If I understand it correct Better NPC Support reequips DDs on any NPC at least once.

If there are 10 NPC or more in one cell that get DDs added and short after that get the same DDs reequipped that might be too many active scripts in only a short time.

 

Question is:

does Better NPC Support reequip all available DDs on NPC in one cell at the same time?

does Better NPC Support reequip all available DDs multiple times on all NPC in one cell?

 

if that is all true, would it be possible to have a delay between the reequipping or NPC processing?

 

Atm I get massive active scripts and suspended stacks from the equipping/reequipping if too many (>5) NPC are in one cell.

 

Link to comment

There is another issue maybe related to DDi.

 

While the NPC get processed and the player opens any container (literally any: like trade, chests, additemmenu2, own inventory) it can happen that the DDs get added to the player inventory instead to the NPC.

 

I only saw that glitch with DCL if the bound girls spawn and get equipped with DDs.

The reason why I only saw that with DCL was that there was no other mod that adds DDs to NPC in greater numbers.

Corsec patches for example change all HSG zap devices to DD devices.

This in turn makes it possible to see that glitch way more often.

 

Would be interesting if you see the same issue.

To test:

enter a cell with multiple NPC that get DDs equipped on load and open quickly any kind of container.

Link to comment

More specific:

 

Corsec's DD patch for HSG adds DDs on HSG slaves on cell load

Better NPC support removes them and reequips them

It seems as if during the reequipping time they get detected as not wearing any DDs and a new set of DDs get applied to the NPC

This in turn makes those DDs end up in the PCs inventory, for what ever reason

also causes an endless loop of equipping devices to the HSG slaves.

Link to comment

By now I'm sure your mod can cause excessive amounts of active scripts.

This causes suspended stacks with all their drawbacks, especially if active scripts get constantly added ?

At the end there will be stack dumps that can make a game unplayable.

 

If you like I send you savegames which show the stacks. ?

Link to comment
11 minutes ago, donttouchmethere said:

By now I'm sure your mod can cause excessive amounts of active scripts.

This causes suspended stacks with all their drawbacks ?

 

If you like I send you savegames which show the stacks. ?

 

I can confirm this. I've found some savegames with 3K suspended stacks with this mod installed. However this is with most females wearing a set of DD items so it's an extreme example. However it does illustrate the point that with DDs distributed to multiple NPCs there is a problem of a dramtic increase of active scripts, which will be magnified while this mod is running.

 

EDIT: I can't really recommend using this alongside my DD patches, because it's not clear what the limit is on how many NPCs can have DDs before the number of active scripts becomes excessive and results in script overload and suspended stacks.

Link to comment
8 hours ago, donttouchmethere said:

By now I'm sure your mod can cause excessive amounts of active scripts.

This causes suspended stacks with all their drawbacks, especially if active scripts get constantly added ?

At the end there will be stack dumps that can make a game unplayable.

 

If you like I send you savegames which show the stacks. ?

 

7 hours ago, Corsec said:

 

I can confirm this. I've found some savegames with 3K suspended stacks with this mod installed. However this is with most females wearing a set of DD items so it's an extreme example. However it does illustrate the point that with DDs distributed to multiple NPCs there is a problem of a dramtic increase of active scripts, which will be magnified while this mod is running.

 

EDIT: I can't really recommend using this alongside my DD patches, because it's not clear what the limit is on how many NPCs can have DDs before the number of active scripts becomes excessive and results in script overload and suspended stacks.

 

Ok, good feedback. Dumped stacks are a no-go, so looks like I have some work to do to make the mod slow down. At the moment it tries to reequip devices rather aggressively, especially after loading screens.

Do you have a recommendation for a mod that quickly helps reproducing the issue?

Link to comment
13 hours ago, donttouchmethere said:

There is another issue maybe related to DDi.

 

While the NPC get processed and the player opens any container (literally any: like trade, chests, additemmenu2, own inventory) it can happen that the DDs get added to the player inventory instead to the NPC.

 

I only saw that glitch with DCL if the bound girls spawn and get equipped with DDs.

The reason why I only saw that with DCL was that there was no other mod that adds DDs to NPC in greater numbers.

Corsec patches for example change all HSG zap devices to DD devices.

This in turn makes it possible to see that glitch way more often.

 

Would be interesting if you see the same issue.

To test:

enter a cell with multiple NPC that get DDs equipped on load and open quickly any kind of container.

 

I do not think that this is related to my mod, but I will double-check and try if I can reproduce the issue.

Link to comment
2 hours ago, Kharos said:

I do not think that this is related to my mod, but I will double-check and try if I can reproduce the issue.

I think it's an old DDi issue, that causes you to see what gets equipped to NPC if the PC has a container open at the same time.

The only difference now is that it create a total mess.

I'm relatively sure that it is a side effect of the increasing number of active scripts and suspended stacks and not directly related to DD NPC support.

I first encountered that issue with DCL and it's bound girls, so it's not a new phenomenon.

Main difference now is that I have a lot more NPC in DDs so the chance to encounter that glitch is higher.

 

To reproduce the effect:

Have NPC in a cell that get DDs added after cellchange

Open any container shortly after cell change (and keep it open).

(works also delayed if cellchange => DD scripts are running => cellchange to an NPC less cell => open container)

If too many scripts get dumped you don't even need to open a container anymore to get the "You equip xxx DD on xxx NPC" DD message box.

Link to comment
2 hours ago, Kharos said:

Ok, good feedback. Dumped stacks are a no-go, so looks like I have some work to do to make the mod slow down. At the moment it tries to reequip devices rather aggressively, especially after loading screens.

That sounds like a good approach.

Shortly after cell change the engine is really busy already to add all those DDs on NPC.

There is a huge spike of zad scripts already.

If DD NPC support starts reequipping DDs right after cell change it doubles and triples the amount of zad scripts until active scripts get terminated and won't be processed anymore.

As side effect it seems as an endless cycle of reequipping of DDs starts if active scripts got dumped.

If that happened it doesn't even matter anymore if only one slave gets DDs updated or multiple, because an endless reequipping loop starts that - in my case - drops all DD sets into my PC's inventory for whatever reason.

 

Even if the active script spam on cell change has no lasting negative effect, I can see how the engine struggles with delayed effects of other mods (like Frostfall, NPC approaches, iNeed, heavy lag)

 

I like the idea of an approach that DD NPC Support comes with an delay after cell change.

Atm I think a >4 second delay after cell change would help already to give the DD equipping scripts time to finish before devices get reequipped.

Or - if that is even possible - that NPC that are loaded to wear DDs don't get all processed at the same time.

Link to comment
2 hours ago, Kharos said:

Do you have a recommendation for a mod that quickly helps reproducing the issue?

I recommend HSG (Hydragorgon's Slave Girls) + Corsec's DD patch for HSG

HSG adds bound slaves to every city.

A good place to test in that combo is Dragonreach in Whiterun.

After cell change there are about 6-8 slaves that will get equipped with DDs.

 

If you want it make it even harder for the engine add Immersive Wenches + Corsec's Immersive Wenches DD patch to your game =D

 

DCL's bound girls can help too to add to the script load.

 

On my setup HSG + Corsec's HSG DD patch + DCL bound girls is enough already to make the game struggle with script load if Better NPC support is installed.

Link to comment
15 hours ago, donttouchmethere said:

While the NPC get processed and the player opens any container (literally any: like trade, chests, additemmenu2, own inventory) it can happen that the DDs get added to the player inventory instead to the NPC.

1 hour ago, donttouchmethere said:

If too many scripts get dumped you don't even need to open a container anymore to get the "You equip xxx DD on xxx NPC" DD message box.

 

I have to ask for clarification here. What is the effect that you are seeing?

  1. devices get added to your inventory instead of getting equipped on NPCs
  2. you are geting the message that is supposed to display only when you interactively add a device to a NPC
  3. both of these issues (maybe in different situations?)
Link to comment
1 minute ago, Kharos said:

I have to ask for clarification here. What is the effect that you are seeing?

1. Glitch case (lucky hit), old, happened before Better NPC or Corsec's patches existed:

PC opens a container while NPC gets DDs equipped => DDi Message boxes pop up to ask if PC wants to equip a DD on the NPC.

Only ever saw that with DCL bound girls, because they where the only NPCs that got DDs added on my setup.

Could happen while still in LAL while mods are still loading/updating.

The DDi message boxes stop appearing after all DDs got equipped to the NPC.

It's rather luck to catch the right moment to open a container while NPC gets DDs added.

 

2. Glitch case (active script spam), new, happens if I combine Corsec's patches and Better NPC Support:

PC opens a container while NPC gets DDs equipped => DDi Message boxes pop up to ask if PC wants to equip a DD on the NPC

Because now many more zad scripts are running and the engine can't process them fast enough the chance to catch the moment to see the DDi message boxes to confirm DD equip on NPC is much higher.

After all NPC are processed the DDi message box confirmation stops.

The message boxes also stop if PC closes the container.

Checking Save reveals massive zad active scripts and zad reequip scripts and suspended stacks.

 

3. Glitch case (active script spam, endless loop), new, happens if I combine Corsec's patches and Better NPC Support:

PC opens a container while NPC gets DDs equipped => DDi Message boxes pop up to ask if PC wants to equip a DD on the NPC

The engine never stops equipping DDs to NPC and instead of adding DDs to NPC the DD sets get added to the PC inventory (endlessly, way to get rich and encumbered).

Even after closing a container the DDi message boxes appear.

I can only stop the reequipping process on NPC by exiting the game.

In that case there are already multiple suspended stacks, terminated active scripts and stack dumps.

Checking Save reveals massive zad active scripts and zad reequip scripts and suspended stacks, first active scripts show as terminated.

 

Link to comment

As picture story:

3. Glitch case:

In this case even the DDi message box breaks ^^

Spoiler

Visited Rifton (multiple HSG slaves in DDs),

after changing back to wilderness cell and opening a container I get the first DDi meassage box.

In this particular case DDi starts to break apart already:

1995483644_enb2020_07_0123_40_12_56.jpg.220a3f232a6ceff9e4dd705df189682b.jpg

 

keep an eye on the carry weight, it's rising while the DD sets meant for NPC get added to the player inventory:

1444019437_enb2020_07_0123_40_28_56.jpg.aeb4fe8c0c633e307b102602783a020e.jpg

 

At some point it isn't even necessary anymore to confirm the message boxes, the device sets meant for HSG slaves get constantly added to the PC's inventory:

748574693_enb2020_07_0123_40_30_90.jpg.55e72aa4c46b3d2b5e04f029f172b6f4.jpg

 

132853563_enb2020_07_0123_40_32_85.jpg.211542fff7f4995ceb3e676415be6dc0.jpg

 

Counting slave is one of the HSG slaves that gets DD sets re-equipped constantly.

1114167917_enb2020_07_0123_42_44_04.jpg.d429e8f5378bcd85ea4b13bb4d67117b.jpg

 

managed to quickly change inventory tab between the DDi messages

all those sets where meant to be added to various HSG slaves.

1534555582_enb2020_07_0123_43_48_26.jpg.f51ce822398243f2bff5de046fc83f66.jpg

 

 

 

Link to comment

Another example from solitude.

Just changed cell to Solitude city and rushed close to the HSG slaves in a state of DD re-equipping

In this case there is no container bug (because I didn't open any^^) and the game normalizes after all scripts are processed.

It's just better to do nothing in the time while NPCs get processed:

 

Spoiler

1722450686_savesolitude01.jpg.8a1e73222a6b2917ae6aa5762e0391eb.jpg

 

1128210964_savesolitude02.jpg.f7985343852c54f539303295309d4f5d.jpg

 

1353649353_savesolitude03.jpg.f5a509fe82317940c6db4c0454899122.jpg

 

Link to comment

I see that others are here already, but I had come here to say that I was beginning to suspect the same thing. with this mod installed, - albeit not expressed as well as previous posts

 

At one point I got a 15mb 180000 line log, with similar things to what's been described above.  The game would also CTD far more readily. 

 

Saves also landed up with a number of  'undefined elements' that ReSaver refused to delete

 

Taking this out of my LO and restarting from an earlier cleaned up save seemed to get rid of the problems.  Adding it back again would restart them again

 

I have Corsec's DD patches installed, and his AIO Populated Skyrim - no Bikinis, and I was getting thousands of log line entries pertaining to NPCs from the AIO and HSG mods 

 

Just added this to provide some additional confirmation to those issues raised above

 

Hope you manage to sort it out, as I quite like the basic idea of the mod. 

 

I particularly liked the idea that DDs would 'hamper' Followers properly, and stop their weapons use.  That was really why I added it to my game and I'd have been happy if the mod just did that!  ?

 

Hope you can get it all sorted out OK

 

 

Link to comment
50 minutes ago, donkeywho said:

I particularly liked the idea that DDs would 'hamper' Followers properly, and stop their weapons use.  That was really why I added it to my game and I'd have been happy if the mod just did that!  ?

I'll keep that in mind. It is my goal to make this work with all NPCs equally well, but if that proves to be too hard I will try to give followers/PAHE slaves priority.

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