Jump to content

Posted for a week abt sex animation controllers, no answer nor clues.....


Recommended Posts

Hi all , below are my question, which has been posted for a week, so far no tips .

The reason i post these doubts  is trying  to understand how the sub-plugin of sexlab triggers the Sex animation sequence from the main sexlab framework so that we might be able to hack into the code to DIY the animation load order , manually.  



1. When we play sexlab framework and sex plugins by default , the sex animations are loaded follow a pre-designed sequence.      Is it possible to DIY the loading sequence of animation via sexlab setting options ?


2. Debugging text of sexlab animations are shown whenever sex behavior is started or position changed.  

    Is it allowed to create a bat file as manual control triggers .


3. We can find the profile options inside the configuration panel of sex lab,   *.json  notation numbered from 1 - 5,  is that *.json file related with animation loading sequence,  if related  how does it work to decide the load order ?  i can detect the animation group are diff when select particular (1-5).json profile. 


4. Are user allowed to write any sexlab framework Api in external *.txt to run bat command in game console  to trigger position changes / progression of the sex animation  ?


5.  As we find some when we set sexlab animation play option from auto to manually trigger, 

    if we press too many times of progression key, it will quit the animation via triggering the end of sex animation 

    how do we detect whether the current playing animation has 3 progression,or  4 progressions to play with,

   so as to know the progression position , as in most of the foreplay animation , body movement changes a lot compared with in-sex animations ( in which speed changes greater than relative movement(displayment)  

Link to comment

This is my papyrus script that will allow you to do everything you just talked about.


Use it as a reference as you learn.


You can call function hugbetween(data......) from a dialogue papyrus fragment for example.



Scriptname kd_script_hugging extends Quest

;the sex lame framework
sexlabframework property sexlab auto

scene property kd_scene_stg639_justincase auto

;actors used in this script
actor property kd_katreenadarkmoore auto

;reference to an x maker we placed inside the sleeping giant inn room, this is where the sex occurs, right at this marker, you can view it in the riverwood sleeping giant inn cell under interiors
objectreference property kd_xmarker_sgi_bychair auto
objectreference property kd_xmarker_sgi_bydoor auto

;this image space modifier is used to make the screen black
imagespacemodifier property kd_imagespacemodifier_blackscreen auto

form playerhelm

;if set, will complete the given stage after kissing is complete
int setstageto

function hugbetween(actor rcreceiver, actor rctarget, int stagetoset = 0)

;is there a stage to complete, when the kiss is finished?
if stagetoset != 0
;a stage was passed, set it to our global variable defined within the scope of this script
setstageto = stagetoset

;make target stay 180 degrees flushed
rctarget.setangle(rctarget.getanglex(), rctarget.getangley(), rctarget.getanglez() + 180.0)

;register these animations with sex lab

;main sex control object
sslthreadmodel animationobject = sexlab.newthread()

;add actors you want to be a part of this sex scene
animationobject.addactor(rcreceiver, isvictim = false)
animationobject.addactor(rctarget, isvictim = false)

;don't strip for this sequence of kissing
bool[] nostrip = new bool[33]
nostrip[1] = true
animationobject.setstrip(rctarget, nostrip)
animationobject.setstrip(rcreceiver, nostrip)

;delete it if we already made a kissing object

;create a new animation stage sequence from scratch
sslbaseanimation anim = sexlab.newanimationobject("kissingobject", self)

;give new animation stage sequence a name
anim.name = "kdbasichugging"

;what type of content is this? 1 for sexual 2 for foreplay

;fill animation positions
int a1 = anim.addposition(1)

;the following four lines are values that can be passed to function addpositionstage
;int position,
;string animationevent,
;float forward = 0.0, float side = 0.0, float up = 0.0, float rotate = 0.0,
;bool silent = false, bool openmouth = false, bool strapon = true, int sos = 0

;is player female?
if (game.getplayer().getactorbase().getsex() == 1)
;player is female
anim.addpositionstage(a1, "sexybasichugging0", silent = true, openmouth = false)
anim.addpositionstage(a1, "sexybasichugging0", silent = true, openmouth = false)
elseif (game.getplayer().getactorbase().getsex() == 0)
;player is a male
anim.addpositionstage(a1, "sexybasichugging0", 0, 0, 1, silent = true, openmouth = false)
anim.addpositionstage(a1, "sexybasichugging0", 0, 0, 1, silent = true, openmouth = false)

;fill animation positions
int a2 = anim.addposition(0)
;katreena's position
anim.addpositionstage(a2, "sexybasichugging1", silent = true, openmouth = false)
anim.addpositionstage(a2, "sexybasichugging1", silent = true, openmouth = false)

;set stage timers
anim.setstagetimer(2, 1.0)

;this is a sexual animation so i added the tag sexual

;save our new customized stage sequence

;array that holds animations
sslbaseanimation[] anims = new sslbaseanimation[1]

;set the animation we made to the queue to be animated
anims[0] = anim

;attach the animation you specified from the array to the main sex control object

;don't try to auto center on a nearby bed

;these functions get called when they occur
registerformodevent("stagestart_foreplay_hugging", "fh_stagestart")
registerformodevent("stageend_foreplay_hugging", "fh_stageend")
;registerformodevent("animationstart_foreplay_hugging", "fh_animationstart")
registerformodevent("animationend_foreplay_hugging", "fh_animationend")
;registerformodevent("orgasmstart_foreplay_hugging", "fh_orgasmstart")
;registerformodevent("orgasmend_foreplay_hugging", "fh_orgasmend")

;we call this scene sex_cunnilingus which will hook it to the registerformodevent above this line, this is important, make sure names match

;no pre forplay animations since they don't match the scene at all

;sets the animation in motion
sslthreadcontroller thread = animationobject.startthread()


event fh_animationend(string eventname, string argstring, float argnum, form sender)

;re-equip players helm
;move player to our marker inside the inn
;move katreena to the bed marker

;wait four seconds

;player face katreena after the kiss
float zoffset = game.getplayer().getheadingangle(kd_katreenadarkmoore)
game.getplayer().setangle(game.getplayer().getanglex(), game.getplayer().getangley(), game.getplayer().getanglez() + zoffset)

;katreena face player after the kiss
float zoffset1 = kd_katreenadarkmoore.getheadingangle(game.getplayer())
kd_katreenadarkmoore.setangle(kd_katreenadarkmoore.getanglex(), kd_katreenadarkmoore.getangley(), kd_katreenadarkmoore.getanglez() + zoffset1)

;clear the presets again

;if a stage was set to complete, complete it
if (setstageto != 0)
;comlpete stage now that kiss is done
;set back to zero
setstageto = 0

;remove image space modifier that blacks out screen


event fh_stagestart(string eventname, string argstring, float argnum, form sender)

;the controller object gives us the control needed to end an animation
sslthreadcontroller controller = sexlab.hookcontroller(argstring)

;wait a second

;function that handles opening the mouth

;begin a slow fade out
game.fadeoutgame(false, true, 2.0, 2.0)

;get the fade out time to do its thing

;do a realign just in case before removing our black screen image space modifier

;remove the image space modifier, this object is responsible for making the screen go black

;wait two seconds then play scene

;play scene where she talks


event fh_stageend(string eventname, string argstring, float argnum, form sender)

;apply black out at end of stage

;end scene


function apply_facialexpression_eyesclosedemotional()

int[] facialsetting = new int[31]

;table 1 mfg phoneme
facialsetting[0] = 0 ;Aah
facialsetting[1] = 0 ;BigAah
facialsetting[2] = 0 ;BMP
facialsetting[3] = 0 ;ChjSh
facialsetting[4] = 0 ;DST
facialsetting[5] = 0 ;Eee
facialsetting[6] = 0 ;Eh
facialsetting[7] = 0 ;FV
facialsetting[8] = 0 ;i
facialsetting[9] = 0 ;k
facialsetting[10] = 0 ;N
facialsetting[11] = 0 ;Oh
facialsetting[12] = 100 ;OohQ
facialsetting[13] = 0 ;R
facialsetting[14] = 0 ;Th
facialsetting[15] = 0 ;W

;table 2 mfg modifier
facialsetting[16] = 100 ;blink left
facialsetting[17] = 100 ;blink right
facialsetting[18] = 0 ;browdown left
facialsetting[19] = 0 ;browdown right
facialsetting[20] = 0 ;brow in left
facialsetting[21] = 0 ;brow in right
facialsetting[22] = 0 ;brow up left
facialsetting[23] = 0 ;brow up right
facialsetting[24] = 0 ;look down
facialsetting[25] = 0 ;look left
facialsetting[26] = 0 ;look right
facialsetting[27] = 0 ;look up
facialsetting[28] = 0 ;squint left
facialsetting[29] = 0 ;squint right

;table 3 expression
facialsetting[30] = 3 ;facial expression 0=anger, 1=fear, 2=happy, 3=sad, 4=surprise, 5=puzzled, 6=disgust, 7=neutral
facialsetting[31] = 80 ;facial expression strength (of emotion set at facialsetting[30])

;clear players face before applying preset
;clear katreenas face before applying preset

;apply preset to player?
sexlab.applypreset(game.getplayer(), facialsetting)
;apply preset to actor npc?
sexlab.applypreset(kd_katreenadarkmoore, facialsetting)



Link to comment


This topic is now archived and is closed to further replies.

  • 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