Jump to content

Devious Devices Framework Development/Beta


Recommended Posts

OAR is released, judging from the description it should be what is says on the tin and what most where waiting for. A fully open-source and 100% DAR-compatible successor. https://www.nexusmods.com/skyrimspecialedition/mods/92109

 

It won't come to LE so this might be a small hickup. I guess it would result in a mod/addon for DD as it won't be possible to make it code compatible with both?

Edited by naaitsab
Link to comment

Heyho, small question: 

 

what's needed to be able to lock an actor in a contraption? No devices are worn at that moment and no scene is running. The only thing is that SetPlayerAIDriven() is true, is that a mistake?

 

That's the code I have right now to try and get a sex scene. The function that holds this snippet is called AFTER the end of a scene with the player, so they shouldn't be part of any scene anymore, right?

    Contrap = DDC.BobTheBuilder(DDC.zadc_Pillory2)
    TeleportIn.Play(Contrap)
    Utility.Wait(2.0)
    If DDC.LockActor(DD.PlayerRef, Contrap)
        If DDC.PlaySexScene(DD.PlayerRef, Urag)
            Self.RegisterForModEvent("PlayerTrack_End", "OnSLSceneEnd")
            return
        Else
            Debug.Trace("[Forbidden Tome] Couldn't start contraption sex!")
        EndIf
    Else
        Debug.Trace("[Forbidden Tome] Couldn't lock player in contraption!")
    EndIf

 

This snippet always just gives me the message "couldn't lock player in contraption".

 

And yes, I currently try to rebuild the ancient "Forbidden Tome" quest ^^

Link to comment
11 minutes ago, kurotatsu said:

If I'm understanding this correctly - DD can be made DAR-compatible, DAR exists for LE too. OAR is fully DAR-compatible, so if it works with DAR - it should work with OAR too, right?

It should, I'm not familiar if it works the to the same degree on LE so that is something to check. If it also fixes the laggy AA sets on LE it could be quite a no-brainer to get it adopted.

 

11 minutes ago, Mister X said:

Heyho, small question: 

 

what's needed to be able to lock an actor in a contraption? No devices are worn at that moment and no scene is running. The only thing is that SetPlayerAIDriven() is true, is that a mistake?

 

That's the code I have right now to try and get a sex scene. The function that holds this snippet is called AFTER the end of a scene with the player, so they shouldn't be part of any scene anymore, right?

    Contrap = DDC.BobTheBuilder(DDC.zadc_Pillory2)
    TeleportIn.Play(Contrap)
    Utility.Wait(2.0)
    If DDC.LockActor(DD.PlayerRef, Contrap)
        If DDC.PlaySexScene(DD.PlayerRef, Urag)
            Self.RegisterForModEvent("PlayerTrack_End", "OnSLSceneEnd")
            return
        Else
            Debug.Trace("[Forbidden Tome] Couldn't start contraption sex!")
        EndIf
    Else
        Debug.Trace("[Forbidden Tome] Couldn't lock player in contraption!")
    EndIf

 

This snippet always just gives me the message "couldn't lock player in contraption".

 

And yes, I currently try to rebuild the ancient "Forbidden Tome" quest ^^

 

I would remove the scene trigger from the lockactor portion. The latent processing of the engine is quite atrocious and with the number of things lockactor does it could glitch out. When the PC is locked into the furniture you could start the scene.

 

I also have made some progress in updating the original tome quest to DD5. DM about it?

Link to comment
58 minutes ago, kurotatsu said:

If I'm understanding this correctly - DD can be made DAR-compatible, DAR exists for LE too. OAR is fully DAR-compatible, so if it works with DAR - it should work with OAR too, right?

I've been playing with OAR using krzp's DAR conversion, and it works perfectly fine. My only gripe is that OAR seems to not re-evaluate conditions if you're standing still, but your character will snap into the proper animation as soon as you start moving.

Link to comment

@Kimy Feature request for Contraptions:

 

Could you please add a flag to the Contraptions.LockActor() function, to allow binding actors into Contraptions during scenes?

 

Why do I come up with this? I had this scenario:

- Active scene with player involved

- Scene end script fragment sets new quest stage

- New quest stage calls function that includes player contraption binding

- DDc refused to bind the player, because they're active in a scene

 

Why that you ask? Well, as the scene end fragment included a Quest.SetCurrentStageID() function, it didn't end properly, because Quest.SetCurrentStageID() is latent and seems to wait for the whole stage to finish before returning. So as the scene script still was running and waiting for the return, the scene was considered active and DDc refused to bind  the player.

 

I know, Beth being Beth, but it would be so much easier if we could have such flag to allow DDc binding while a scene is running. If you want to make sure and get overcomplicated, you could also allow to send a scene with the Contraptions.LockActor() function, and if the actor is part of that scene, binding still is allowed.

Like that, it would be so much easier to build more cinematic ("immersive") scenarios involving the player to get bound in contraptions. 

 

My code proposal:

Spoiler
;/ zadclibs.psc, ll 94-ff
 / Added Scene parameter and changed currentScene comparison
 /;
 Bool Function IsValidActor(Actor akActor, Scene allowedScene=None)
	If !akActor || akActor.IsChild() || akActor.IsDisabled() || akActor.IsDead() || akActor.IsGhost()
		return False
	EndIf
	If !libs.SexLab.ActorLib.CanAnimate(akActor) || IsAnimating(akActor) || GetDevice(akActor)
		return False
	EndIf
	Scene curScene = akActor.GetCurrentScene()
	If curScene != None && curScene != allowedScene
		return False
	EndIf
	return True
EndFunction

;/ zadclibs.psc, ll 202-ff
 / Added Scene parameter and forwards it to IsValidActor() check
 /;
Bool Function LockActor(Actor akActor, ObjectReference FurnitureDevice, Package OverridePose = None, Scene allowedScene=None)
	If !IsValidActor(akActor, allowedScene) || !GetIsFurnitureDevice(FurnitureDevice)
		return False
	EndIf
	zadcFurnitureScript fs = FurnitureDevice as zadcFurnitureScript
	if !fs || fs.User		
		return False
	EndIf
	If OverridePose
		SetOverridePose(FurnitureDevice, OverridePose)
	EndIf
	fs.LockActor(akActor)
	If OverridePose
		ClearOverridePose(FurnitureDevice)
	EndIf
	Return True
EndFunction

 

 

Edited by Mister X
changed scene check in code proposal
Link to comment

Instead of filtering it on a specific scene, I would suggest making it a bit broader. So "just" an boolean override you can pass to the function when used in situations like this. Which by default is of course false so you need to pass it along yourself to actually bypass anything.

 

If you want to filter it on a specific scene you could always add that pre-check yourself. But if you keep it to a specific scene it can still cause issues if a different scene than you expect is causing the issue.

 

Speaking of Contraptions, are there any plans to merge some of the new stuff from ZaZ9 into it? As permissions where given, it would be nice to have some new stuff to play with.

Edited by naaitsab
Link to comment
On 6/3/2023 at 12:35 AM, chaimhewast said:

I've been playing with OAR using krzp's DAR conversion, and it works perfectly fine. My only gripe is that OAR seems to not re-evaluate conditions if you're standing still, but your character will snap into the proper animation as soon as you start moving.

 

I have been noticing the same behavior of not re-evalutating conditions with EVG conditional idles, but I play on LE with DAR, not OAR, so I don't think this issue is OAR-exclusive.

Link to comment
On 6/2/2023 at 5:35 PM, chaimhewast said:

I've been playing with OAR using krzp's DAR conversion, and it works perfectly fine. My only gripe is that OAR seems to not re-evaluate conditions if you're standing still, but your character will snap into the proper animation as soon as you start moving.

?

 

If I remember correctly from my testing, regular DD does send a Debug.SendAnimationEvent(akActor, "IdleForceDefaultState") whenever you equip something, but it's either on a timer or the scripts are slow, so it updates the idle after some delay. Main script Zadlibs call upon the zadboundcombat script's EvaluateAA function which then calls upon the ClearAA function, and that one sends an update-to-idle command.

 

Try equipping something, exit the menu and wait for 10-20 seconds.

 

I'll try to add the call for a IdleForceDefaultState earlier into the main EvaulateAA and see if that speeds it up, though, if yes - you can expect an update to the conversion, that delay gets on my nerves as well. ?

 

Alternatively, OAR has an "interruptible" feature, so if your main idles are set thru it (mine are, i've got like 20 different ones on random) - it might be worth checking out if setting an interruptible flag speeds this up as well, so it's continuously checking if it should apply a different idle.

Link to comment
On 6/2/2023 at 4:51 PM, naaitsab said:

If it also fixes the laggy AA sets on LE it could be quite a no-brainer to get it adopted.

It should, it's done through SKSE and it's lightning fast on my SE, and I don't see why it shouldn't be as fast on LE as well.

Gone are the days when your character's arms were slowly merging into the armbinder ?

 

Link to comment
17 hours ago, krzp said:

Try equipping something, exit the menu and wait for 10-20 seconds.

That works.

 

17 hours ago, krzp said:

Alternatively, OAR has an "interruptible" feature, so if your main idles are set thru it (mine are, i've got like 20 different ones on random) - it might be worth checking out if setting an interruptible flag speeds this up as well, so it's continuously checking if it should apply a different idle.

Unfortunately I'm just using the vanilla idles, but I'll look into that when I get the time (probably the weekend). I'm thinking duplicating them at priority 1 with that setting might do what I'm after. I found a bit of time to test and can confirm that this workaround does exactly what I thought it would. The animations now instantly swap to the bound ones.

Edited by chaimhewast
Link to comment

Hello~! 

I've been very interested in implementing a spreaderbar in DD.
However, I don't know how to make hkx animations for skyrim.
Instead, I decided to use Straitjacket's animations and use the 
I've created a few variations of Straitjacket with legspreaders that work pretty naturally(Maybe), 
I was wondering if you could post them in this thread for testing?

Edited by 912s4dd
Link to comment

I'll post a test file here. 
This package includes esp and mesh modifications.

To test compatibility with various other mods, I've replaced 6 outfits from the existing leather-straitjacket series.
(For future merges, new Armor and ArmorAddon will need to be created).


Only 3BA-CBBE bodies are supported for now. 
I didn't work on alternative textures, so there will be texture errors except for the black color. 

 

To install it, you can use MO2 or any other tool and turn the bodyslider.
I have included the "TL_version" name so you should be able to find it. 
 

https://mega.nz/file/lAhSjajI#IXP61rNxfbwym7HnBRZp6y9_8V9JA7qUWgEGEJPOlWY

바슬2.PNG

Link to comment

I'm trying to get DD to work with skyrim 1.6.64 and failing. I've been testing with armbind, mesh appears, hands disppear, but the arms are not moved into place. SMP is working on the 3BA body. I have edited Skyrim.ini and Skyrim_Default.ini to:


[Papyrus]
fPostLoadUpdateTimeMS=500.0
bEnableLogging=1
bEnableTrace=1
bLoadDebugInformation=1

 

but no log file is being generated in Logs/Script. What else is required to generate the log files? 

Link to comment
1 hour ago, Good Provider said:

I have edited Skyrim.ini and Skyrim_Default.ini

...

but no log file is being generated in Logs/Script. What else is required to generate the log files? 

If you are using MO2 then the ini files are in the profile folder for MO2. Since each profile can have its own ini's it wouldn't make sense to use the Bethesda's folders.

 

Animations generally rely on FNIS, or if you have also DAR or Nemesis. Check that there are no warnings or errors when you generate animations with them.

Link to comment
7 hours ago, Good Provider said:

I'm trying to get DD to work with skyrim 1.6.64 and failing. I've been testing with armbind, mesh appears, hands disppear, but the arms are not moved into place. SMP is working on the 3BA body. I have edited Skyrim.ini and Skyrim_Default.ini to:


[Papyrus]
fPostLoadUpdateTimeMS=500.0
bEnableLogging=1
bEnableTrace=1
bLoadDebugInformation=1

 

but no log file is being generated in Logs/Script. What else is required to generate the log files? 

 

Make sure you aren't grabbing the armbinders from assets. Use the ones in expansion to test with.

Link to comment
7 hours ago, Zaflis said:

If you are using MO2 then the ini files are in the profile folder for MO2. Since each profile can have its own ini's it wouldn't make sense to use the Bethesda's folders.

Thank You.  I have updated both the skyrim.ini and the SkyrimCustom.ini using (Open INIs folder)

 https://www.nexusmods.com/skyrim/articles/368 .

Still no log file :( . What value should I have for fPostLoadUpdateTimeMS and bEnableProfiling

 

I stripped MO2 down to just "Alternate Start - Live Another Life-272-4-1-4-1608766947" and "Unofficial Skyrim Special Edition Patch-266-4-2-6a-1636838663".

Still nothing in Logs/Script

 

 

7 hours ago, Zaflis said:

Animations generally rely on FNIS, or if you have also DAR or Nemesis. Check that there are no warnings or errors when you generate animations with them.

Spoiler


Skeleton(hkx) female: XPMS2HDT (126 bones)   male: XPMS2HDT (126 bones)
Patch: "SKELETON Arm Fix"  

Reading DD V4.0.0 ...     ChAnims:746(588)     CTD:13.1%     pOpt:1.1%
Reading DD2 V4.0.0 ...     ChAnims:374(374)     CTD:10.7%     pOpt:0.0%
Reading DD3 V4.1.0 ...     ChAnims:119(119)     CTD:2.9%     pOpt:0.0%
Reading DDC V1.2 ...     ChAnims:58     CTD:0.4%     pOpt:0.2%
Reading DDSL V4.0.0 ...     ChAnims:410     CTD:2.8%     pOpt:0.9%
Reading FNISBase V7.6 ...     ChAnims:0     CTD:0.0%     pOpt:0.0%
Reading FNISCreatureVersion V7.0 ...     ChAnims:0     CTD:0.0%     pOpt:0.0%
Reading SexLab V1.64 ...     ChAnims:882     CTD:5.6%     pOpt:1.5%
Reading SexLabAP V1.64 ...     ChAnims:142     CTD:0.9%     pOpt:0.2%
Reading SexLabAroused V2.9 ...     ChAnims:5     CTD:0.1%     pOpt:0.0%
Reading SexLabCreature V1.64 ...     ChAnims:177     CTD:1.2%     pOpt:0.3%
Reading XPMSE V7.2 ...     ChAnims:164(164)     CTD:2.2%     pOpt:0.0%
Reading ZaZAnimationPack V8.00 ...     ChAnims:1669     CTD:7.9%     pOpt:0.1%
Reading ZaZAnimationPack+ V8.00 ...     ChAnims:42     CTD:0.2%     pOpt:0.0%

All Anim Lists scanned. Generating Behavior Files...
Alternate Animation mods: 4 sets: 41 total groups: 194 added file slots: 1499 alternate files: 1245

Create Creature Behaviors ...
Reading SexLabCreature V1.63 ...

 4788 animations for 14 mods successfully included (character)
ChAnims: 4788  CTD:45.9%  pOpt:4.3%  max: 10442  LC: 11996 (max. 26162)

 322 animations for 1 mods and 18 creatures successfully included.

Am I missing an error message?

 

2 hours ago, zarantha said:

 

Make sure you aren't grabbing the armbinders from assets. Use the ones in expansion to test with.

I couldn't find the armbinder in the Expansion, but I did find several elbow binders.  Sadly they also did not work.

Most of the scripting appears to be working.  I can't remove it.  It will not allow me to cast spells or carry a weapon.

 

While it does allow my hands to move freely while standing still, it forces them back into the binder when walking.....

Link to comment

Ok.  I found the logs.  They are are in Documents/.../Skyrim Special Edition/Logs/Script.  Not in the directory with the .exe files. 

 

[06/14/2023 - 07:59:18PM] error: Unbound native function "FormHasKeywordString" called
[06/14/2023 - 07:59:18PM] warning: Assigning None to a non-object variable named "::temp48"
stack:
	[zadDevicesUnderneathQuest (18041472)].zaddevicesunderneathscript.RebuildSlotmask() - "------------------------------" Line 197
	[zadDevicesUnderneathQuest (18041472)].zaddevicesunderneathscript.UpdateDeviceHiderSlot() - "------------------------------" Line 230
	[alias playerRef on quest zadDevicesUnderneathQuest (18041472)].zadDevicesUnderneathPlayerScript.OnUpdate() - "------------------------------------" Line 15
[06/14/2023 - 07:59:18PM] error: Unbound native function "FormHasKeywordString" called
[06/14/2023 - 07:59:18PM] warning: Assigning None to a non-object variable named "::temp48"
stack:
	[zadDevicesUnderneathQuest (18041472)].zaddevicesunderneathscript.RebuildSlotmask() - "------------------------------" Line 197
	[zadDevicesUnderneathQuest (18041472)].zaddevicesunderneathscript.UpdateDeviceHiderSlot() - "------------------------------" Line 230
	[alias playerRef on quest zadDevicesUnderneathQuest (18041472)].zadDevicesUnderneathPlayerScript.OnUpdate() - "------------------------------------" Line 15

 

Link to comment
7 hours ago, Good Provider said:
Unbound native function

This error comes when there's a function marked as native in Papyrus that's not tied to anything. In that same Skyrim Special Edition folder where you found the Papyrus log, check SKSE/skse64.log for mentions of DeviousDevices.dll. It should just have two - one that says it is checking the plugin and one that says it loaded correctly.

Link to comment
10 hours ago, chaimhewast said:

This error comes when there's a function marked as native in Papyrus that's not tied to anything. In that same Skyrim Special Edition folder where you found the Papyrus log, check SKSE/skse64.log for mentions of DeviousDevices.dll. It should just have two - one that says it is checking the plugin and one that says it loaded correctly.

 

They appear to load correctly:

checking plugin DeviousDevices.dll
plugin DeviousDevices.dll (00000001 DDiUtil 00000001) loaded correctly (handle 6)
Loading plugin list:
    (20 -> 20)	Devious Devices - Assets.esm
	(24 -> 24)	Devious Devices - Integration.esm
	(25 -> 25)	Devious Devices - Expansion.esm
	(26 -> 26)	Devious Devices - Contraptions.esm
	(1040457 -> 1040457)	Devious Devices SE patch.esp
Saving plugin list:
	[20]	Devious Devices - Assets.esm
	[24]	Devious Devices - Integration.esm
	[25]	Devious Devices - Expansion.esm
	[26]	Devious Devices - Contraptions.esm
	[FE:73]	Devious Devices SE patch.esp

 

Link to comment
On 6/14/2023 at 11:02 PM, Good Provider said:

Ok.  I found the logs.  They are are in Documents/.../Skyrim Special Edition/Logs/Script.  Not in the directory with the .exe files. 

 

[06/14/2023 - 07:59:18PM] error: Unbound native function "FormHasKeywordString" called
[06/14/2023 - 07:59:18PM] warning: Assigning None to a non-object variable named "::temp48"
stack:
	[zadDevicesUnderneathQuest (18041472)].zaddevicesunderneathscript.RebuildSlotmask() - "------------------------------" Line 197
	[zadDevicesUnderneathQuest (18041472)].zaddevicesunderneathscript.UpdateDeviceHiderSlot() - "------------------------------" Line 230
	[alias playerRef on quest zadDevicesUnderneathQuest (18041472)].zadDevicesUnderneathPlayerScript.OnUpdate() - "------------------------------------" Line 15
[06/14/2023 - 07:59:18PM] error: Unbound native function "FormHasKeywordString" called
[06/14/2023 - 07:59:18PM] warning: Assigning None to a non-object variable named "::temp48"
stack:
	[zadDevicesUnderneathQuest (18041472)].zaddevicesunderneathscript.RebuildSlotmask() - "------------------------------" Line 197
	[zadDevicesUnderneathQuest (18041472)].zaddevicesunderneathscript.UpdateDeviceHiderSlot() - "------------------------------" Line 230
	[alias playerRef on quest zadDevicesUnderneathQuest (18041472)].zadDevicesUnderneathPlayerScript.OnUpdate() - "------------------------------------" Line 15

 

 

install this patch:

 

Link to comment

Well, here's my variant of the native function removal, I did myself quite a while ago.

 

Main difference: Not merely a check against the zad_NoHide keyword, but instead it uses the native function SexlabUtil.HasKeywordSub provided by the SL framework, that seems to achieve the same thing as FormHasKeywordString should.

 

Other difference: didn't include the SoS check.

DD-NativeFunctionRemoval.zip

Edited by Mister X
Link to comment
17 hours ago, naaitsab said:

 

Would be a nice addition to merge this into the next version. Removing the DLL would prevent issues/updating when a exe update is released.

 

I planned on merging into the next version. I'd like to just remove the DLL, but i don't know what all it does, so I'm a bit hesitant about that. I am looking into learning (or conning someone into doing it for me ;) ) how to make it an NG DLL. 

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