Jump to content

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


no5qiang

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

;scenes
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

;forms
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
endif

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

;register these animations with sex lab
sexlab.registeranimation("sexybasichugging0")
sexlab.registeranimation("sexybasichugging1")

;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
sexlab.releaseanimationobject("kissingobject")

;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
anim.setcontent(2)

;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)
endif

;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
anim.addtag("hugging")

;save our new customized stage sequence
anim.save()

;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
animationobject.setanimations(anims)

;don't try to auto center on a nearby bed
animationobject.setbedding(-1)

;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
animationobject.sethook("foreplay_hugging")

;no pre forplay animations since they don't match the scene at all
animationobject.disableleadin(true)

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

endfunction

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

;re-equip players helm
game.getplayer().equipitem(playerhelm)
;move player to our marker inside the inn
game.getplayer().moveto(kd_xmarker_sgi_bydoor)
;move katreena to the bed marker
kd_katreenadarkmoore.moveto(kd_xmarker_sgi_bychair)

;wait four seconds
utility.wait(4)

;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
sexlab.clearmfg(game.getplayer())
sexlab.clearmfg(kd_katreenadarkmoore)

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

;remove image space modifier that blacks out screen
kd_imagespacemodifier_blackscreen.remove()

endevent

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
utility.wait(1)

;function that handles opening the mouth
;eyesclosedemotional()

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

;get the fade out time to do its thing
utility.wait(1)

;do a realign just in case before removing our black screen image space modifier
controller.realignactors()

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

;wait two seconds then play scene
utility.wait(2)

;play scene where she talks
kd_scene_stg639_justincase.start()

endevent

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

;apply black out at end of stage
kd_imagespacemodifier_blackscreen.apply()

;end scene
kd_scene_stg639_justincase.stop()

endevent

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
sexlab.clearmfg(game.getplayer())
;clear katreenas face before applying preset
sexlab.clearmfg(kd_katreenadarkmoore)

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

endfunction

 

Link to comment

Archived

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