Jump to content

Devious Devices Framework Development/Beta


Recommended Posts

On 10/12/2023 at 12:24 AM, Kimy said:

 

There is no API exposed framework function to get this done. In DCL, I typically implement it like this:

 

Int Function UnlockRestraints(actor a, bool destroyDevices = false)				
	int count = 0
	Keyword kw
	if !a.WornHasKeyword(libs.zad_Lockable)
		; no DD items equipped, can abort here
		return count
	endif	
	int i = dcumenu.dcur_devicekeywords.GetSize()
	While i > 0		
		i -= 1
		kw = dcumenu.dcur_devicekeywords.GetAt(i) As Keyword		
		if a.wornhaskeyword(kw)
			if libs.UnlockDeviceByKeyword(libs.playerref, zad_DeviousDevice = kw)				
				count += 1
			Endif							
		endif
	EndWhile
	return count	
EndFunction

 

(devicekeywords is a formlist containing all DD device keywords or just the ones you want to remove), There is one in DD you can use for the purpose (zadlibs.zadStandardKeywords).

 

To make such a WW patch DD safe, it would be prudent to check for DD quest devices (which would NOT get removed by this function), and cancel the transformation in case there are. The quest items would otherwise break. I think. I have no experience with WW mods.

I attempted to use this code in PROTEUS, but when I equipped my character with armbinder and executed the script, I found that the 'libs' part was not functioning.
I always get Notification("no DD items equipped.")

 

a.WornHasKeyword(libs.zad_Lockable) ;Not Work
a.WornHasKeyword(Game.GetFormFromFile(0x003894, "Devious Devices - Assets.esm") as Keyword) ;Work

 


My slightly modified UnlockRestraints() in PROTEUS script (PhenderixToolEditPlayerScript.psc):

Spoiler
Int Function UnlockRestraints(actor a, bool destroyDevices = false)
	Debug.Notification("UnlockRestraints actor: " + a.GetActorBase().GetName())
	int count = 0
	Keyword kw
	if a.WornHasKeyword(libs.zad_Lockable)
		Debug.Notification(a.GetActorBase().GetName() + " WornHasKeyword libs.zad_Lockable")
	else
		Debug.Notification("no DD items equipped.")
		return count
	endif
	int i = dcumenu.dcur_devicekeywords.GetSize()
	While i > 0		
		i -= 1
		kw = dcumenu.dcur_devicekeywords.GetAt(i) As Keyword		
		if a.wornhaskeyword(kw)
			if !libs.IsGenericDevice(a, kw)
				Debug.Notification("Player worn has quest device! Terminate switch character.")
				count = -1
				return count
			else
				Debug.Notification("Stores the currently equipped device")
				ActorWornDevices += "," + libs.GetDeviceName(libs.GetWornDevice(a, kw))
			Endif
			if libs.UnlockDeviceByKeyword(libs.playerref, zad_DeviousDevice = kw)				
				count += 1
			Endif							
		endif
	EndWhile
	return count
EndFunction

 


I'm at the top section of the PROTEUS script (PhenderixToolEditPlayerScript.psc):

Spoiler

scriptName PhenderixToolEditPlayerScript extends activemagiceffect


;Devious devices v.5.2 Libs
zadlibs property libs auto
zadxlibs property xlibs auto
zadxlibs2 property xlibs2 auto
zadclibs property clibs auto
dcur_library property dclibs auto
dcur_mcmconfig Property dcumenu auto

String ActorWornDevices
 


I'm call UnlockRestraints() function in the PROTEUS script (PhenderixToolEditPlayerScript.psc):

Spoiler

elseIf result == 1 ;switch character
    
        UnlockRestraints(player)
        


Is there something wrong?

I want to check if the character has equipped a quest device when switching characters. If not, I will save the currently equipped device (as a JSON file), then unlock all devices before switching characters. The JSON file will be used to re-equip the devices when switching back from another character.

 

Edit: I found that I had to fill in the 'value' in the plugin's property, not just in the script. It's working fine now.

Edited by EccentricWizard
Link to comment
  • 2 weeks later...
4 hours ago, nopoi said:

Hey, does anybody know if the mod is being updated to be compatible with the newest Skyrim update? Been a while now, and wondering if the project has been dropped.

 

It's covered in the DD SE thread. Kimy is developing for LE. I handle the conversion to SE/AE/VR of the base mod. Devious Devices NG is currently being developed for AE and is handled by a few folks. It requires my conversion as the base, and overwrites it.
 

 

Link to comment
  • 4 weeks later...

Hi, is there a way to make it so the boxbinder behave as an elbowbinder do, mainly letting you equip armors on legs and torso instead of forcing unequip all? It only covers the arms after all... I tried changing it myself but I don't know what I'm doing :) thanks

Link to comment
15 hours ago, Cleave said:

Hi, is there a way to make it so the boxbinder behave as an elbowbinder do, mainly letting you equip armors on legs and torso instead of forcing unequip all?

The model replaces the whole body and occupies the armor slot, so you'll need to edit the mesh and change the equip slots accordingly.

Link to comment
  • 3 weeks later...
8 hours ago, NatanusLikens said:

Um...

 

Is my default walking animation supposed to be the Bunny Hop??

 

No devices, nothing... installed and bunny hoping out the gate.

 

Yes, of course. We've replaced all your animations with bunny hops. Drinking in a tavern? Bunny hop. Sleeping? Bunny hop. Having sex? Bunny hop.

 

But seriously - what on earth did you even install? The starting page of this thread links to ancient DDa 3.0 from 2018, current stable release is DD 5.2 from February 2023

In this beta developer's thread is a plethora of ideas, betas, patches, fixes - you name it. There is (as there is currently no active development going on here) nothing you should even consider downloading if you're not a hardcore modder who knows exactly what to do with all these scraps.

Link to comment
  • 1 month later...
21 hours ago, asterixxxxx said:

Arms and legs are not binded, steps are not small.

Did you run FNIS?

 

21 hours ago, asterixxxxx said:

What have I done wrong?

You posted in the developer's thread - we have no idea which mod you are even talking about. SE is in the progress of transferring animations from FNIS to DAR (resp. the new SE variant of which I never bothered to remember the name) so there is another source for potential errors. If you're on LE, go to DD 5.2 and tell your mod manager to install and activate all four eps's.

Link to comment
41 minutes ago, CaptainJ03 said:

You posted in the developer's thread - we have no idea which mod you are even talking about. SE is in the progress of transferring animations from FNIS to DAR (resp. the new SE variant of which I never bothered to remember the name) so there is another source for potential errors. If you're on LE, go to DD 5.2 and tell your mod manager to install and activate all four eps's.

It took me a while to realize that DAR is not OAR. DD 5.2 work with OAR but not with DAR.
Anyway thanks a lot!

Link to comment
9 minutes ago, asterixxxxx said:

It took me a while to realize that DAR is not OAR. DD 5.2 work with OAR but not with DAR.
Anyway thanks a lot!

 

Just to clarify for others in the future looking at this. It's DD NG that has that compatibility, not DD SE 5.2 itself. DD SE 5.2 is still FNIS only. Overwrite with DD NG to make it compatible with OAR (which replaced DAR).

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