Skip to content

Commit

Permalink
DD will now utilize "Temporary" animations, to avoid polluting the an…
Browse files Browse the repository at this point in the history
…imation pool.

New Sexlab Scene: DDArmbinderSolo (Repurposed zap anim).
Fixed issues #45, #46.
  • Loading branch information
MinLL committed Aug 19, 2014
1 parent 1c5e0cd commit 1e65da4
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 28 deletions.
Binary file modified Devious Devices - Integration.esm
Binary file not shown.
19 changes: 13 additions & 6 deletions scripts/Source/zadBQ00.psc
Expand Up @@ -315,8 +315,8 @@ sslBaseAnimation[] function FindValidAnimations(sslThreadController controller,
; string cache = BuildRegistryStr(numActors, permitOral, permitVaginal, permitAnal, permitBoobjob, numBoundActors, NumExtraTags, ExtraTags)
; Registry.find(cache)

sslBaseAnimation[] allAnims = SexLab.AnimSlots.Animations
int totalAnims = SexLab.AnimSlots.Slotted
sslBaseAnimation[] allAnims = SexLab.GetOwnerAnimations(self)
int totalAnims = allAnims.length
if previousAnim.HasTag("Creature")
allAnims = SexLab.CreatureSlots.GetByRace(numActors, Controller.positions[(Controller.positions.Length - 1)].GetRace())
totalAnims = allAnims.Length
Expand Down Expand Up @@ -344,7 +344,7 @@ sslBaseAnimation[] function FindValidAnimations(sslThreadController controller,
else
chastityAnims = sslUtility.PushAnimation(allAnims[i], chastityAnims)
EndIf
if allAnims[i].HasTag("Bound")
if allAnims[i].HasTag("Bound") || allAnims[i].HasTag("Armbinder")
boundAnims = sslUtility.PushAnimation(allAnims[i], boundAnims)
EndIf
Endif
Expand Down Expand Up @@ -485,7 +485,7 @@ function Logic(int threadID, bool HasPlayer)
int NumExtraTags = 0
string[] ExtraTags = new String[12]

if isBound && (!libs.BoundAnimsAvailable || !libs.config.useBoundAnims)
if isBound && (!libs.BoundAnimsAvailable || !libs.config.useBoundAnims) && originalActors.length != 1
libs.Log("One or more actors were bound, but there are no bound animations available. Removing armbinder(s).")
StoreArmbinders(originalActors)
isBound = False
Expand Down Expand Up @@ -546,7 +546,7 @@ function Logic(int threadID, bool HasPlayer)
; Try removing actors, and shuffling them to solo scenes.
libs.Log("Trying to resize actors...")
EndIf
if workaroundID == 1 && isBound ; No anims, while bound.
if ((workaroundID == 0 && actors.length <= 2 ) || workaroundID == 1) && isBound ; No anims, while bound.
; Still no animations, after resizing actors. Drop armbinders, and try again.
libs.Log("Removing armbinders, Trying to resize actors...")
StoreArmbinders(actors)
Expand Down Expand Up @@ -723,7 +723,14 @@ Event OnAnimationEnd(int threadID, bool HasPlayer)
actor[] actors = controller.Positions
sslBaseAnimation previousAnim = controller.Animation
int numBeltedActors = CountBeltedActors(controller.Positions)
if (numBeltedActors > 0) && previousAnim.name=="DDBeltedSolo" && actors.length==1
if previousAnim.name == "DDArmbinderSolo" && actors.length == 1
if actors[0]!=libs.PlayerRef
libs.NotifyNPC(actors[0].GetLeveledActorbase().GetName() + " ceases her efforts, looking both frustrated and aroused.")
else
libs.NotifyPlayer("With a sigh, you realize that this is futile. You cannot possibly reach yourself, bound as you are. Your struggle has left you feeling even more aroused than when you began.", true)
Endif
EndIf
If (numBeltedActors > 0) && previousAnim.name=="DDBeltedSolo" && actors.length==1
if actors[0]!=libs.PlayerRef
libs.NotifyNPC(actors[0].GetLeveledActorbase().GetName() + " ceases her efforts, looking both frustrated and aroused.")
else
Expand Down
89 changes: 67 additions & 22 deletions scripts/Source/zadBeltedAnims.psc
@@ -1,35 +1,80 @@
scriptname zadBeltedAnims extends sslAnimationFactory
zadLibs Property libs Auto
SexlabFramework Property Sexlab Auto
zadBQ00 Property filterQuest Auto

function LoadAnimations()
libs.log("Devious Devices is now registering animations.")
libs.log("Devious Devices is now creating animations.")
SexLab = SexLabUtil.GetAPI()
If SexLab == None
libs.Error("Animation registration failed: Sexlab is none.")
EndIf
PrepareFactory()
RegisterAnimation("DDBeltedSolo")
if filterQuest == None
libs.Error("Animation registration failed: FilterQuest is none.")
EndIf
SexLab.GetSetAnimationObject("DDBeltedSolo", "CreateDDBeltedSolo", filterQuest)
SexLab.GetSetAnimationObject("DDArmbinderSolo", "CreateDDArmbinderSolo", filterQuest)
; PrepareFactory()
; RegisterAnimation("DDBeltedSolo")
; RegisterAnimation("DDBeltedSolo")
EndFunction

Function CreateDDBeltedSolo(int id)
libs.Log("Creating DDBeltedSolo")
; Creatue your animation under the token "ShortForeplay" which you can use to retrieve
; it later if needed. Passing the form owner "self" tells it your script objects owns it
; if whatever you pass as owner ever becomes a none form (mod uninstalled) than the animation
; is automatically cleaned up and removed at start up.
sslBaseAnimation Anim = SexLab.GetAnimationObject("DDBeltedSolo")
; Make sure we actually retrieved the animation and it's empty before setting it up
if Anim != none && Anim.Name != "DDBeltedSolo"
; At this point it basically becomes no different than creating animations in their callbacks
; as seen in sslAnimationDefaults.psc, config properties can be accessed from SexLab.Factory
Anim.Name = "DDBeltedSolo"
Anim.SetContent(Sexual)
; Duplicating the arrok standing foreplay animation, only including just the first 2 stages
int a1 = Anim.AddPosition(Female)
Anim.AddPositionStage(a1, "DDBeltedSolo", 0, silent=false)

; (optional) Give them set timed lengths to fit your mods purpose
Anim.SetStageTimer(1, 20.0) ; 10 seconds for stage 1

; (optional) Add any tags you think are necessary
Anim.AddTag("Solo")
; Anim.AddTag("Masturbation")
Anim.AddTag("F")
Anim.AddTag("DeviousDevice")

; REQUIRED - after configuring the animation, you must call Save() in order to finalize it.
Anim.Save()
EndIf
EndFunction

function DDBeltedSolo(int id)
libs.Log("Registering DDBeltedSolo")
sslBaseAnimation Base = Create(id)

Base.Name = "DDBeltedSolo"

Base.SetContent(Sexual)
Base.SoundFX = Squishing

int a1 = Base.AddPosition(Female)
Base.AddPositionStage(a1, "DDBeltedSolo", 0, silent=false)

Base.AddTag("Solo")
; Base.AddTag("Masturbation")
Base.AddTag("F")
Base.AddTag("DeviousDevice")

Base.Save(id)
endFunction
Function CreateDDArmbinderSolo(int id)
libs.Log("Creating DDArmbinderSolo")
sslBaseAnimation Anim = SexLab.GetAnimationObject("DDArmbinderSolo")
; Make sure we actually retrieved the animatino and it's empty before setting it up
if Anim != none && Anim.Name != "DDArmbinderSolo"
; At this point it basically becomes no different than creating animations in their callbacks
; as seen in sslAnimationDefaults.psc, config properties can be accessed from SexLab.Factory
Anim.Name = "DDArmbinderSolo"
Anim.SetContent(Sexual)
; Duplicating the arrok standing foreplay animation, only including just the first 2 stages
int a1 = Anim.AddPosition(Female)
Anim.AddPositionStage(a1, "ZapArmbHorny01", 0, silent=false)

; (optional) Give them set timed lengths to fit your mods purpose
Anim.SetStageTimer(1, 20.0) ; 10 seconds for stage 1

; (optional) Add any tags you think are necessary
Anim.AddTag("Solo")
; Anim.AddTag("Masturbation")
Anim.AddTag("F")
Anim.AddTag("Armbinder")
Anim.AddTag("DeviousDevice")

; REQUIRED - after configuring the animation, you must call Save() in order to finalize it.
Anim.Save()
EndIf
EndFunction

Binary file modified scripts/zadBQ00.pex
Binary file not shown.
Binary file modified scripts/zadBeltedAnims.pex
Binary file not shown.

0 comments on commit 1e65da4

Please sign in to comment.