no5qiang Posted October 4, 2014 Posted October 4, 2014 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) .
trepleen Posted October 4, 2014 Posted October 4, 2014 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 frameworksexlabframework property sexlab auto;scenesscene property kd_scene_stg639_justincase auto;actors used in this scriptactor 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 interiorsobjectreference property kd_xmarker_sgi_bychair autoobjectreference property kd_xmarker_sgi_bydoor auto;this image space modifier is used to make the screen blackimagespacemodifier property kd_imagespacemodifier_blackscreen auto;formsform playerhelm;if set, will complete the given stage after kissing is completeint setstagetofunction 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 scriptsetstageto = stagetosetendif;make target stay 180 degrees flushedrctarget.setangle(rctarget.getanglex(), rctarget.getangley(), rctarget.getanglez() + 180.0);register these animations with sex labsexlab.registeranimation("sexybasichugging0")sexlab.registeranimation("sexybasichugging1");main sex control objectsslthreadmodel animationobject = sexlab.newthread();add actors you want to be a part of this sex sceneanimationobject.addactor(rcreceiver, isvictim = false)animationobject.addactor(rctarget, isvictim = false);don't strip for this sequence of kissingbool[] nostrip = new bool[33]nostrip[1] = trueanimationobject.setstrip(rctarget, nostrip)animationobject.setstrip(rcreceiver, nostrip);delete it if we already made a kissing objectsexlab.releaseanimationobject("kissingobject");create a new animation stage sequence from scratchsslbaseanimation anim = sexlab.newanimationobject("kissingobject", self);give new animation stage sequence a nameanim.name = "kdbasichugging";what type of content is this? 1 for sexual 2 for foreplayanim.setcontent(2);fill animation positionsint 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 femaleanim.addpositionstage(a1, "sexybasichugging0", silent = true, openmouth = false)anim.addpositionstage(a1, "sexybasichugging0", silent = true, openmouth = false)elseif (game.getplayer().getactorbase().getsex() == 0);player is a maleanim.addpositionstage(a1, "sexybasichugging0", 0, 0, 1, silent = true, openmouth = false)anim.addpositionstage(a1, "sexybasichugging0", 0, 0, 1, silent = true, openmouth = false)endif;fill animation positionsint a2 = anim.addposition(0);katreena's positionanim.addpositionstage(a2, "sexybasichugging1", silent = true, openmouth = false)anim.addpositionstage(a2, "sexybasichugging1", silent = true, openmouth = false);set stage timersanim.setstagetimer(2, 1.0);this is a sexual animation so i added the tag sexualanim.addtag("hugging");save our new customized stage sequenceanim.save();array that holds animationssslbaseanimation[] anims = new sslbaseanimation[1];set the animation we made to the queue to be animatedanims[0] = anim;attach the animation you specified from the array to the main sex control objectanimationobject.setanimations(anims);don't try to auto center on a nearby bedanimationobject.setbedding(-1);these functions get called when they occurregisterformodevent("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 matchanimationobject.sethook("foreplay_hugging");no pre forplay animations since they don't match the scene at allanimationobject.disableleadin(true);sets the animation in motionsslthreadcontroller thread = animationobject.startthread()endfunctionevent fh_animationend(string eventname, string argstring, float argnum, form sender);re-equip players helmgame.getplayer().equipitem(playerhelm);move player to our marker inside the inngame.getplayer().moveto(kd_xmarker_sgi_bydoor);move katreena to the bed markerkd_katreenadarkmoore.moveto(kd_xmarker_sgi_bychair);wait four secondsutility.wait(4);player face katreena after the kissfloat zoffset = game.getplayer().getheadingangle(kd_katreenadarkmoore)game.getplayer().setangle(game.getplayer().getanglex(), game.getplayer().getangley(), game.getplayer().getanglez() + zoffset);katreena face player after the kissfloat zoffset1 = kd_katreenadarkmoore.getheadingangle(game.getplayer())kd_katreenadarkmoore.setangle(kd_katreenadarkmoore.getanglex(), kd_katreenadarkmoore.getangley(), kd_katreenadarkmoore.getanglez() + zoffset1);clear the presets againsexlab.clearmfg(game.getplayer())sexlab.clearmfg(kd_katreenadarkmoore);if a stage was set to complete, complete itif (setstageto != 0);comlpete stage now that kiss is doneself.setstage(setstageto);set back to zerosetstageto = 0endif;remove image space modifier that blacks out screenkd_imagespacemodifier_blackscreen.remove()endeventevent fh_stagestart(string eventname, string argstring, float argnum, form sender);the controller object gives us the control needed to end an animationsslthreadcontroller controller = sexlab.hookcontroller(argstring);wait a secondutility.wait(1);function that handles opening the mouth;eyesclosedemotional();begin a slow fade outgame.fadeoutgame(false, true, 2.0, 2.0);get the fade out time to do its thingutility.wait(1);do a realign just in case before removing our black screen image space modifiercontroller.realignactors();remove the image space modifier, this object is responsible for making the screen go blackkd_imagespacemodifier_blackscreen.remove();wait two seconds then play sceneutility.wait(2);play scene where she talkskd_scene_stg639_justincase.start()endeventevent fh_stageend(string eventname, string argstring, float argnum, form sender);apply black out at end of stagekd_imagespacemodifier_blackscreen.apply();end scenekd_scene_stg639_justincase.stop()endeventfunction apply_facialexpression_eyesclosedemotional()int[] facialsetting = new int[31];table 1 mfg phonemefacialsetting[0] = 0 ;Aahfacialsetting[1] = 0 ;BigAahfacialsetting[2] = 0 ;BMPfacialsetting[3] = 0 ;ChjShfacialsetting[4] = 0 ;DSTfacialsetting[5] = 0 ;Eeefacialsetting[6] = 0 ;Ehfacialsetting[7] = 0 ;FVfacialsetting[8] = 0 ;ifacialsetting[9] = 0 ;kfacialsetting[10] = 0 ;Nfacialsetting[11] = 0 ;Ohfacialsetting[12] = 100 ;OohQfacialsetting[13] = 0 ;Rfacialsetting[14] = 0 ;Thfacialsetting[15] = 0 ;W;table 2 mfg modifierfacialsetting[16] = 100 ;blink leftfacialsetting[17] = 100 ;blink rightfacialsetting[18] = 0 ;browdown leftfacialsetting[19] = 0 ;browdown rightfacialsetting[20] = 0 ;brow in leftfacialsetting[21] = 0 ;brow in rightfacialsetting[22] = 0 ;brow up leftfacialsetting[23] = 0 ;brow up rightfacialsetting[24] = 0 ;look downfacialsetting[25] = 0 ;look leftfacialsetting[26] = 0 ;look rightfacialsetting[27] = 0 ;look upfacialsetting[28] = 0 ;squint leftfacialsetting[29] = 0 ;squint right;table 3 expressionfacialsetting[30] = 3 ;facial expression 0=anger, 1=fear, 2=happy, 3=sad, 4=surprise, 5=puzzled, 6=disgust, 7=neutralfacialsetting[31] = 80 ;facial expression strength (of emotion set at facialsetting[30]);clear players face before applying presetsexlab.clearmfg(game.getplayer());clear katreenas face before applying presetsexlab.clearmfg(kd_katreenadarkmoore);apply preset to player?sexlab.applypreset(game.getplayer(), facialsetting);apply preset to actor npc?sexlab.applypreset(kd_katreenadarkmoore, facialsetting)endfunction
no5qiang Posted October 4, 2014 Author Posted October 4, 2014 very insightful, many thanks for sharing these bro, : ) I've printed out your well-commented code. That's very nice of you. trepleen
Recommended Posts
Archived
This topic is now archived and is closed to further replies.