Jump to content

SL Triggers(v12) [2022-06-05]


Recommended Posts

Posted
57 minutes ago, hextun said:

Out of curiosity, would you all prefer using this scripting approach or would you prefer if you actually had the ability to precompile your own .psc functions to perform bundles of activity with a performance improvement? Albeit with the requirement that you now can set up a Papyrus compilation environment?

 

I'm in agreement with Fraying on this one. Jsons could certainly be more readable, but they work, and that's all I need them to do. No sense re-inventing the wheel.
 

1 hour ago, MannySauce said:

 

Sorry, I didn't even try to fix the loop despite pointing it out. My bad, I was that damn tired. 🫥

I made this edit and tested it (and removed the debug messages), from what I could tell this scales correctly when both changing animation and when ending animations.

 

        [":", "start"],
        ["util_wait", "5"],
        ["sl_isin", "$self"],
            ["if", "$$", "=", "0", "rescale"],
        ["sl_hastag", "Bigguy"],
            ["if", "$$", "=", "0", "rescale"],
        ["sl_isinslot", "$self", "1"],
            ["if", "$$", "=", "0", "rescale"],
        ["console", "$self", "setscale 1.15"],
        ["goto", "start"],
        [":", "rescale"],
        ["console", "$self", "setscale 1.0"],
        ["sl_isin", "$self"],
            ["if", "$$", "=", "1", "start"]

Right, now that the dust has settled I went back and cleaned up mine as well.
Yours does the same things mine does, but differently.
Now you've got me wondering if there's any benefit to using ["util_waitforend", "$self"] when your script will burn itself out, so to speak, if none of the conditions apply.
Mine explicitly waits to be told things are done before rescaling, whereas yours just assumes it's done because none of the conditions are true. I know Skyrim enough to know that it could, potentially, miss being told 'scene over, do stuff' if things are running ragged enough.

I do find it a little funny that your script has a condition for jumping to the end if you aren't in a scene and then it checks again for if you are in one.
There's nothing wrong with doing it that way, it just makes me smirk thinking "Oh, but what if sexlab second-guesses itself and goes back into a scene, this'd catch that."

 

 

Posted (edited)
1 hour ago, sirretinee said:

I'm in agreement with Fraying on this one. Jsons could certainly be more readable, but they work, and that's all I need them to do. No sense re-inventing the wheel.
 

Right, now that the dust has settled I went back and cleaned up mine as well.
Yours does the same things mine does, but differently.
Now you've got me wondering if there's any benefit to using ["util_waitforend", "$self"] when your script will burn itself out, so to speak, if none of the conditions apply.
Mine explicitly waits to be told things are done before rescaling, whereas yours just assumes it's done because none of the conditions are true. I know Skyrim enough to know that it could, potentially, miss being told 'scene over, do stuff' if things are running ragged enough.

I do find it a little funny that your script has a condition for jumping to the end if you aren't in a scene and then it checks again for if you are in one.
There's nothing wrong with doing it that way, it just makes me smirk thinking "Oh, but what if sexlab second-guesses itself and goes back into a scene, this'd catch that."

 

 

 

Ah that's because I use the 'rescale' section for two things, 1. if no longer animating, scale the actor back down and exit loop, and 2. if still animating but the checks above fail (changed animation), scale the actor back down and loop back. AFAIK, both scripts "burn" themselves out and loop on the 5 sec wait timer - but I'm curious, does your script succesfully reach the setscale 1.0 part?

 

EDIT: Alright I misunderstood a bit here, the first 'sl_isin' is sort of redundant but still functional, it's just an early loop exit. They both look silly at first glance because of this. It can be removed just fine, just found it exits faster that way.

Edited by MannySauce
Posted
1 hour ago, hextun said:

player - "Is Not Player": runs for everyone *but* the player in the scene; for example in a gang bang, when *anyone* in the SLSO scene orgasms (player or not), the triggers get checked. So if the *player* orgasms but you have it set for "Is Not Player", the trigger commands would then run on all of the attackers

 

thanks! so in this case, if the script references the player ($player, NOT $self), then the player is affected though it is triggered by a non player right?

Posted
17 minutes ago, Fraying9981 said:

 

thanks! so in this case, if the script references the player ($player, NOT $self), then the player is affected though it is triggered by a non player right?

 

Yep, you got it!

Posted
55 minutes ago, hextun said:

 

Yep, you got it!

 

thanks.

so this time im a bit more confident they might be a bug 😆

 

Here is the setup w a female PC:

SLSO

Not player

Male

 

this script is triggered when both orgasms.

It should only trigger when not player male orgasms, if I'm correct.

 

Spoiler
{
	"cmd" : 
	[
        [":", "start"],
        
        ["msg_console", "[Fuzoku] Main Starting..."],
        ["msg_notify", "[Fuzoku] Main Starting..."],
        

        ["set", "$0", "0"],
        ["set", "$1", "0"],
        ["set", "$2", "0"],
        ["set", "$3", "0"],
        ["set", "$4", "0"],
        ["set", "$5", "0"],
        ["set", "$6", "0"],
        ["set", "$7", "0"],
        
        ["sl_hastag", "blowjob"],
        ["if", "$$", "=", "1", "blowjob_tag"],
        ["goto", "check_vaginal"],
        
        [":", "blowjob_tag"],
        ["set", "$0", "10"],
        
        [":", "check_vaginal"],
        ["sl_hastag", "vaginal"],
        ["if", "$$", "=", "0", "check_handjob"],
        ["set", "$6", "30"],
        ["if", "$6", ">", "$0", "set_highest_vaginal"],
        ["goto", "check_handjob"],
        [":", "set_highest_vaginal"],
        ["set", "$0", "$6"],
        
        [":", "check_handjob"],
        ["sl_hastag", "handjob"],
        ["if", "$$", "=", "0", "check_anal"],
        ["set", "$6", "5"],
        ["if", "$6", ">", "$0", "set_highest_handjob"],
        ["goto", "check_anal"],
        [":", "set_highest_handjob"],
        ["set", "$0", "$6"],
        
        [":", "check_anal"],
        ["sl_hastag", "anal"],
        ["if", "$$", "=", "0", "check_cum_in_mouth"],
        ["set", "$6", "40"],
        ["if", "$6", ">", "$0", "set_highest_anal"],
        ["goto", "check_cum_in_mouth"],
        [":", "set_highest_anal"],
        ["set", "$0", "$6"],
        
        [":", "check_cum_in_mouth"],
        ["sl_hastag", "cum in mouth"],
        ["if", "$$", "=", "0", "check_facial"],
        ["set", "$6", "20"],
        ["if", "$6", ">", "$0", "set_highest_cum_in_mouth"],
        ["goto", "check_facial"],
        [":", "set_highest_cum_in_mouth"],
        ["set", "$0", "$6"],
        
        [":", "check_facial"],
        ["sl_hastag", "facial"],
        ["if", "$$", "=", "0", "check_foreplay"],
        ["set", "$6", "20"],
        ["if", "$6", ">", "$0", "set_highest_facial"],
        ["goto", "check_foreplay"],
        [":", "set_highest_facial"],
        ["set", "$0", "$6"],
        
        [":", "check_foreplay"],
        ["sl_hastag", "foreplay"],
        ["if", "$$", "=", "0", "check_deepthroat"],
        ["set", "$6", "0"],
        ["if", "$6", ">", "$0", "set_highest_foreplay"],
        ["goto", "check_deepthroat"],
        [":", "set_highest_foreplay"],
        ["set", "$0", "$6"],
        
        [":", "check_deepthroat"],
        ["sl_hastag", "deepthroat"],
        ["if", "$$", "=", "0", "get_relationship"],
        ["set", "$6", "30"],
        ["if", "$6", ">", "$0", "set_highest_deepthroat"],
        ["goto", "get_relationship"],
        [":", "set_highest_deepthroat"],
        ["set", "$0", "$6"],
        
        [":", "get_relationship"],
        ["set", "$1", "$0"],
        
        ["actor_getrelation", "$player", "$self"],
        ["set", "$2", "$$"],
        
        ["actor_name", "$self"],
        ["set", "$7", "$$"],
        ["av_get", "$player", "Speechcraft"],
        ["set", "$3", "$$"],
        
        
        ["set", "$6", "$2"],
        ["if", "$6", "<", "0", "zero_relationship"],
        ["set", "$6", "$6", "/", "4"], 
        ["set", "$6", "$6", "*", "$6"], 
        ["set", "$6", "$6", "*", "0.45"],
        ["goto", "calc_speechcraft"],
        
        [":", "zero_relationship"],
        ["set", "$6", "0"],
        
        [":", "calc_speechcraft"],
        
        ["set", "$7", "$3"], 
        ["set", "$7", "$7", "/", "100"],
        ["set", "$7", "$7", "*", "0.25"],
        
        ["set", "$8", "$1"], 
        ["set", "$8", "$8", "/", "40"], 
        ["set", "$8", "$8", "*", "0.3"], 
        
        ["set", "$6", "$6", "+", "$7"], 
        ["set", "$6", "$6", "+", "$8"],
        
        ["set", "$4", "$6"], 
        ["set", "$4", "$4", "*", "$4"], 
        ["set", "$4", "$4", "*", "1000"],
        
        ["if", "$4", "<", "5", "min_value"],
        ["goto", "check_cheapness"],
        
        [":", "min_value"],
        ["set", "$4", "5"],
        
        [":", "check_cheapness"],
        ["rnd_int", "1", "100"],
        ["if", "$$", ">", "30", "apply_reward"],
        
        ["set", "$5", "1"],
        ["if", "$4", ">", "500", "high_cheapness"],
        
        ["set", "$4", "$4", "*", "0"],
        ["goto", "apply_reward"],
        
        [":", "high_cheapness"],
        ["set", "$4", "$4", "*", "0"],
        
        [":", "apply_reward"],
        ["math", "floor", "$4"],
        ["set", "$4", "$$"],
        
        ["item_add", "$player", "skyrim.esm:15", "$4", "0"],

        ["set", "$9", "$6", "-", "30"],
        ["set", "$9", "$9", "/", "10"],
        ["set", "$8", "17.5"],
        ["set", "$8", "$8", "+", "$9"],

        ["msg_notify", "Advancing Sensuality XP by ", "$8"],
        ["actor_advskill", "$player", "Speechcraft", "$8"],
        
        ["actor_name", "$self"],
        ["set", "$6", "$$"],
        ["if", "$5", "=", "1", "cheapness_msg"],
        
        
        [":", "check_comments"],
        ["if", "$4", "<", "10", "cmt_1"],
        ["if", "$4", "<", "20", "cmt_2"],
        ["if", "$4", "<", "50", "cmt_3"],
        ["if", "$4", "<", "100", "cmt_4"],
        ["if", "$4", "<", "200", "cmt_5"],
        ["if", "$4", "<", "500", "cmt_6"],
        ["if", "$4", ">=", "500", "cmt_7"],
        ["goto", "end"],
        
        [":", "cmt_1"],
        ["msg_notify", "You are a cumdumpster. Your client unloaded his balls because he really needed to."],
        ["goto", "end"],
        
        [":", "cmt_2"],
        ["msg_notify", "You barely put in any effort. ",  "$6", " noticed."],
        ["goto", "end"],
        
        [":", "cmt_3"],
        ["msg_notify", "You provided basic service. Nothing special."],
        ["goto", "end"],
        
        [":", "cmt_4"],
        ["msg_notify", "You did the job. You know your place."],
        ["goto", "end"],

        [":", "cmt_5"],
        ["msg_notify", "Well done! Your client is thoroughly satisfied."],
        ["goto", "end"],

        [":", "cmt_6"],
        ["msg_notify", "You delivered an exceptional experience that ",  "$6", " will remember."],
        ["goto", "end"],

        [":", "cmt_7"],
        ["msg_notify", "You performed like a high-class escort. You made your client ascend to heaven."],
        ["goto", "end"],

        [":", "cheapness_msg"],
        ["msg_notify", "Your client ", "$6", " is feeling cheap. Work that cock bitch! You're not done yet."],
        

        ["msg_notify", "[Fuzoku] Main Ended..."],

        [":", "end"]
	]
}

 

 

 

Posted (edited)
5 hours ago, Fraying9981 said:

 

thanks.

so this time im a bit more confident they might be a bug 😆

 

Here is the setup w a female PC:

SLSO

Not player

Male

 

this script is triggered when both orgasms.

It should only trigger when not player male orgasms, if I'm correct.

 

  Reveal hidden contents
{
	"cmd" : 
	[
        [":", "start"],
        
        ["msg_console", "[Fuzoku] Main Starting..."],
        ["msg_notify", "[Fuzoku] Main Starting..."],
        

        ["set", "$0", "0"],
        ["set", "$1", "0"],
        ["set", "$2", "0"],
        ["set", "$3", "0"],
        ["set", "$4", "0"],
        ["set", "$5", "0"],
        ["set", "$6", "0"],
        ["set", "$7", "0"],
        
        ["sl_hastag", "blowjob"],
        ["if", "$$", "=", "1", "blowjob_tag"],
        ["goto", "check_vaginal"],
        
        [":", "blowjob_tag"],
        ["set", "$0", "10"],
        
        [":", "check_vaginal"],
        ["sl_hastag", "vaginal"],
        ["if", "$$", "=", "0", "check_handjob"],
        ["set", "$6", "30"],
        ["if", "$6", ">", "$0", "set_highest_vaginal"],
        ["goto", "check_handjob"],
        [":", "set_highest_vaginal"],
        ["set", "$0", "$6"],
        
        [":", "check_handjob"],
        ["sl_hastag", "handjob"],
        ["if", "$$", "=", "0", "check_anal"],
        ["set", "$6", "5"],
        ["if", "$6", ">", "$0", "set_highest_handjob"],
        ["goto", "check_anal"],
        [":", "set_highest_handjob"],
        ["set", "$0", "$6"],
        
        [":", "check_anal"],
        ["sl_hastag", "anal"],
        ["if", "$$", "=", "0", "check_cum_in_mouth"],
        ["set", "$6", "40"],
        ["if", "$6", ">", "$0", "set_highest_anal"],
        ["goto", "check_cum_in_mouth"],
        [":", "set_highest_anal"],
        ["set", "$0", "$6"],
        
        [":", "check_cum_in_mouth"],
        ["sl_hastag", "cum in mouth"],
        ["if", "$$", "=", "0", "check_facial"],
        ["set", "$6", "20"],
        ["if", "$6", ">", "$0", "set_highest_cum_in_mouth"],
        ["goto", "check_facial"],
        [":", "set_highest_cum_in_mouth"],
        ["set", "$0", "$6"],
        
        [":", "check_facial"],
        ["sl_hastag", "facial"],
        ["if", "$$", "=", "0", "check_foreplay"],
        ["set", "$6", "20"],
        ["if", "$6", ">", "$0", "set_highest_facial"],
        ["goto", "check_foreplay"],
        [":", "set_highest_facial"],
        ["set", "$0", "$6"],
        
        [":", "check_foreplay"],
        ["sl_hastag", "foreplay"],
        ["if", "$$", "=", "0", "check_deepthroat"],
        ["set", "$6", "0"],
        ["if", "$6", ">", "$0", "set_highest_foreplay"],
        ["goto", "check_deepthroat"],
        [":", "set_highest_foreplay"],
        ["set", "$0", "$6"],
        
        [":", "check_deepthroat"],
        ["sl_hastag", "deepthroat"],
        ["if", "$$", "=", "0", "get_relationship"],
        ["set", "$6", "30"],
        ["if", "$6", ">", "$0", "set_highest_deepthroat"],
        ["goto", "get_relationship"],
        [":", "set_highest_deepthroat"],
        ["set", "$0", "$6"],
        
        [":", "get_relationship"],
        ["set", "$1", "$0"],
        
        ["actor_getrelation", "$player", "$self"],
        ["set", "$2", "$$"],
        
        ["actor_name", "$self"],
        ["set", "$7", "$$"],
        ["av_get", "$player", "Speechcraft"],
        ["set", "$3", "$$"],
        
        
        ["set", "$6", "$2"],
        ["if", "$6", "<", "0", "zero_relationship"],
        ["set", "$6", "$6", "/", "4"], 
        ["set", "$6", "$6", "*", "$6"], 
        ["set", "$6", "$6", "*", "0.45"],
        ["goto", "calc_speechcraft"],
        
        [":", "zero_relationship"],
        ["set", "$6", "0"],
        
        [":", "calc_speechcraft"],
        
        ["set", "$7", "$3"], 
        ["set", "$7", "$7", "/", "100"],
        ["set", "$7", "$7", "*", "0.25"],
        
        ["set", "$8", "$1"], 
        ["set", "$8", "$8", "/", "40"], 
        ["set", "$8", "$8", "*", "0.3"], 
        
        ["set", "$6", "$6", "+", "$7"], 
        ["set", "$6", "$6", "+", "$8"],
        
        ["set", "$4", "$6"], 
        ["set", "$4", "$4", "*", "$4"], 
        ["set", "$4", "$4", "*", "1000"],
        
        ["if", "$4", "<", "5", "min_value"],
        ["goto", "check_cheapness"],
        
        [":", "min_value"],
        ["set", "$4", "5"],
        
        [":", "check_cheapness"],
        ["rnd_int", "1", "100"],
        ["if", "$$", ">", "30", "apply_reward"],
        
        ["set", "$5", "1"],
        ["if", "$4", ">", "500", "high_cheapness"],
        
        ["set", "$4", "$4", "*", "0"],
        ["goto", "apply_reward"],
        
        [":", "high_cheapness"],
        ["set", "$4", "$4", "*", "0"],
        
        [":", "apply_reward"],
        ["math", "floor", "$4"],
        ["set", "$4", "$$"],
        
        ["item_add", "$player", "skyrim.esm:15", "$4", "0"],

        ["set", "$9", "$6", "-", "30"],
        ["set", "$9", "$9", "/", "10"],
        ["set", "$8", "17.5"],
        ["set", "$8", "$8", "+", "$9"],

        ["msg_notify", "Advancing Sensuality XP by ", "$8"],
        ["actor_advskill", "$player", "Speechcraft", "$8"],
        
        ["actor_name", "$self"],
        ["set", "$6", "$$"],
        ["if", "$5", "=", "1", "cheapness_msg"],
        
        
        [":", "check_comments"],
        ["if", "$4", "<", "10", "cmt_1"],
        ["if", "$4", "<", "20", "cmt_2"],
        ["if", "$4", "<", "50", "cmt_3"],
        ["if", "$4", "<", "100", "cmt_4"],
        ["if", "$4", "<", "200", "cmt_5"],
        ["if", "$4", "<", "500", "cmt_6"],
        ["if", "$4", ">=", "500", "cmt_7"],
        ["goto", "end"],
        
        [":", "cmt_1"],
        ["msg_notify", "You are a cumdumpster. Your client unloaded his balls because he really needed to."],
        ["goto", "end"],
        
        [":", "cmt_2"],
        ["msg_notify", "You barely put in any effort. ",  "$6", " noticed."],
        ["goto", "end"],
        
        [":", "cmt_3"],
        ["msg_notify", "You provided basic service. Nothing special."],
        ["goto", "end"],
        
        [":", "cmt_4"],
        ["msg_notify", "You did the job. You know your place."],
        ["goto", "end"],

        [":", "cmt_5"],
        ["msg_notify", "Well done! Your client is thoroughly satisfied."],
        ["goto", "end"],

        [":", "cmt_6"],
        ["msg_notify", "You delivered an exceptional experience that ",  "$6", " will remember."],
        ["goto", "end"],

        [":", "cmt_7"],
        ["msg_notify", "You performed like a high-class escort. You made your client ascend to heaven."],
        ["goto", "end"],

        [":", "cheapness_msg"],
        ["msg_notify", "Your client ", "$6", " is feeling cheap. Work that cock bitch! You're not done yet."],
        

        ["msg_notify", "[Fuzoku] Main Ended..."],

        [":", "end"]
	]
}

 

 

 

 

Removed massive quantities of erroneous text. Yes, @Fraying9981, you are right, that's how it should work. Bug fix posted. :)

Edited by hextun
Removed bad info I gave and credited Fraying9981 for the bug report.
Posted (edited)

... huge chungus of text deleted for brevity....

 

Is anything I wrote up there remotely helpful? I don't want to be adding to confusion.

 

Narrator: The huge chungus of text was not, in point of fact, helpful. Quite the opposite in fact.

Edited by hextun
Posted
1 hour ago, Fraying9981 said:

Thanks, yes it's helpful.

So there is no way to have a trigger just for one actor's slso?

Absolutely no way?

 

Funny you should ask. I had another look at the code and found another spot that I missed during the conversion to decouple SexLab. SLSO orgasms are supposed to have the actor who had the orgasm passed in to the handler so that, just as you expected @Fraying9981, it would only fire for that actor. When I made the parameter change, I forgot to replace that one call in the command. It left it as 'none' which meant it skipped the check altogether.

 

New drop, v24. Get it while it's hot. Fixes the SLSO "I came so you ALL CAME" bug.

 

sl_triggers24.zip

Posted
36 minutes ago, hextun said:

 

Funny you should ask. I had another look at the code and found another spot that I missed during the conversion to decouple SexLab. SLSO orgasms are supposed to have the actor who had the orgasm passed in to the handler so that, just as you expected @Fraying9981, it would only fire for that actor. When I made the parameter change, I forgot to replace that one call in the command. It left it as 'none' which meant it skipped the check altogether.

 

New drop, v24. Get it while it's hot. Fixes the SLSO "I came so you ALL CAME" bug.

 

sl_triggers24.zip 86.62 kB · 1 download

 

thanks i will try it!

at this point honestly the mod is pretty powerful, but let me try my luck on something a bit crazier:

is it possible using BEGIN trigger to track SLSO orgasm for a particular actor when they occur?

 

this way i suppose it would be possible to count orgasms, and calculate duration until orgasm with wait - what i'm trying to achieve for this script, to upgrade it from just triggering upon orgasm (with no info on duration)

Posted
On 4/18/2025 at 9:46 PM, Fraying9981 said:

 

thanks i will try it!

at this point honestly the mod is pretty powerful, but let me try my luck on something a bit crazier:

is it possible using BEGIN trigger to track SLSO orgasm for a particular actor when they occur?

 

this way i suppose it would be possible to count orgasms, and calculate duration until orgasm with wait - what i'm trying to achieve for this script, to upgrade it from just triggering upon orgasm (with no info on duration)

 

Trying to Understand the Problem

Hi @Fraying9981. If I understand correctly, you would like to be able to have the ability, when selecting conditions for a trigger, in addition to existing conditions like if_player ("Player/NotPlayer/Partner Player/Partner Not Player") and if_gender("Male/Female"), you would like something like if_orgasm_count, effectively an int slider with a relatively low range of values like 0-3 or something because... I mean... sure... over 9000. Why not? But truly, something probably lowish.

 

Or perhaps something similar but instead of a simple orgasm counter, you would like, as a stretch goal of sorts, the ability to have some concept of if_time_since_orgasm, measured possibly as only during sex (e.g. 2 days with only 2 hours of sex without orgasm would only be 2 hours) or as total game time (e.g. 2 days with only 2 hours of sex without orgasm would be an entire 2 days) or what have you, presumably presented like a float slider scale with a similarly low range.

 

Offering a Solution If I Got Your Problem Description Right

Depending on your script environment, you have access to the $g# variables e.g. what I call globals. I added it... back ... before The Versions... the dark times. You're used to accessing variables as "$1", "$2" and so on. Those values persist only during the execution of that command script. There are now two changes. One, you can use any positive integer, so you have a lot more variables should you like. Two, if you use variable names as follows: "$g1", "$g2", and so on, those variables persist across command scripts. All command scripts. Across all sessions. 

 

So in your case you could have one command run at Begin for just the player and store something in $g1, maybe just set it to 0 and let it be a simple register counter to keep track of just player orgasms as a starter.

Then another command run on each SLSO orgasm but again only for the player and with logic to make sure it's a player orgasm, incrementing $g1, so "set $g1 = $g1 + 1". You could consider changing that "+1" based on other conditions you might script for, for example.

And finally a command on end, also just for the player, to do.. whatever with the $g1 value. It has the count of orgasms the player experienced during that specific session. 

 

You could also set something like the current game time at those points I suppose, though I haven't thought of a scheme of how to make use of that.

 

Closing

I hope that is helpful, but if not or I got something wrong let me know.

Posted
On 4/18/2025 at 9:14 PM, MannySauce said:

On the topic of SLSO, is there a way to trigger or manipulate the SLSO progress/orgasms rather than being the trigger itself?

 

So... I find this whole thing rather humorous. I woke up this morning knowing I wanted to address the two forum posts this morning and figured I had time to burn through the remaining tasks and possibly have the makings of a beta.

 

And I pretty quickly worked out my response, which you see above, to Fraying9981. And I started looking at the SLSO problem.

 

That was... awhile ago. It's late. I regret nothing.

 

You see, I thought at first, oh, this will be easy. Just nab a reference to the ActiveMagicEffect, cast to the appropriate SLSO_SpellGameScript script, and... do whatever. And failing that there are probably ModEvents to queue up. But grabbing that ActiveMagicEffect... the idea stuck with me. Because that very same, very specific technical issue, was at the heart of a problem that literally had cropped up just last night with my redesign.

 

So I figured... you know... I should see if I can create a SKSE .dll, just for sl_triggers, to try to see if a given script is on an actor and fetch the ActiveMagicEffect. I figured once you pay the price of coding in C++, you earn some power. I figured I could solve the problem by using a little developer muscle. I have a headache, it is past midnight, I last ate a chocolate chip cookie and a couple of tortilla chips and right now STILL realize I need to hydrate. But...

 

I created an sl_triggers_internal.dll that, if shipped along with the code I have available, itself exposes a single new function, giving the ability in Papyrus script to get the list of ActiveMagicEffects on an Actor. I really really thought that would be the easiest part. I went shopping and begrudged the achingly slow people keeping me from just getting the meager sustenance my pathetic body needed to support this effort.

 

I also added a new .psc script, sl_triggers_internal, as one would, to expose a safe wrapper. With that I am able to iterate them and find one that is, for example, the SLSO_SpellGameEffect widget and one could, if one were so inclined, then call functions directly which may or may not have very specific effects on the "enjoyment" level of either actor. There were also some comments in the SLSO code that I copied that were commented out but that seemed suspiciously like "hey, here's an orgasm. now... ... just do it right now" code that could be linked up.

And then, the idea occurred to me that I should expose StorageUtil and other bindings directly as commands in your scripts so you would be able to access more data, more persistently, etc.

 

Anyway... more feedback to request. What is your opinion about the .dll?

 

It will all be open source. It would be pushed right now but again, headache. I promised myself that I had tomorrow if I gave myself today. That was yesterday and I'm about to kick my ass, which has me a little nervous. So I'm in a rush.

 

I guess I want to make sure folks will be okay with this addition and if not I can either leave it out or just make it an optional download where the dependent features fail gracefully, which, I mean, I already did that, so, you know.

 

Anyway... feedback please about the .dll because it may allow an even bigger expansion of features.

Posted
4 hours ago, hextun said:

 

Trying to Understand the Problem

Hi @Fraying9981. If I understand correctly, you would like to be able to have the ability, when selecting conditions for a trigger, in addition to existing conditions like if_player ("Player/NotPlayer/Partner Player/Partner Not Player") and if_gender("Male/Female"), you would like something like if_orgasm_count, effectively an int slider with a relatively low range of values like 0-3 or something because... I mean... sure... over 9000. Why not? But truly, something probably lowish.

 

Or perhaps something similar but instead of a simple orgasm counter, you would like, as a stretch goal of sorts, the ability to have some concept of if_time_since_orgasm, measured possibly as only during sex (e.g. 2 days with only 2 hours of sex without orgasm would only be 2 hours) or as total game time (e.g. 2 days with only 2 hours of sex without orgasm would be an entire 2 days) or what have you, presumably presented like a float slider scale with a similarly low range.

 

Offering a Solution If I Got Your Problem Description Right

Depending on your script environment, you have access to the $g# variables e.g. what I call globals. I added it... back ... before The Versions... the dark times. You're used to accessing variables as "$1", "$2" and so on. Those values persist only during the execution of that command script. There are now two changes. One, you can use any positive integer, so you have a lot more variables should you like. Two, if you use variable names as follows: "$g1", "$g2", and so on, those variables persist across command scripts. All command scripts. Across all sessions. 

 

So in your case you could have one command run at Begin for just the player and store something in $g1, maybe just set it to 0 and let it be a simple register counter to keep track of just player orgasms as a starter.

Then another command run on each SLSO orgasm but again only for the player and with logic to make sure it's a player orgasm, incrementing $g1, so "set $g1 = $g1 + 1". You could consider changing that "+1" based on other conditions you might script for, for example.

And finally a command on end, also just for the player, to do.. whatever with the $g1 value. It has the count of orgasms the player experienced during that specific session. 

 

You could also set something like the current game time at those points I suppose, though I haven't thought of a scheme of how to make use of that.

 

Closing

I hope that is helpful, but if not or I got something wrong let me know.

 

Omg you have global variables too? Thats awesome!

 

Yeah so its pretty clear what im going to do next:

1. Use global variable to store slso of particular actor (with an slso trigger)

2. Use another global variable to store total duration beford slso orgasm (with a begin trigger)

3. Change my current script from slso to end trigger. Improve xp and gold calculation by adding global variables for total sex duration before orgasm + orgasm count

4. Reset global variables to 0 for the next scene

 

These are just on top of a my mind now.

Posted
2 hours ago, Fraying9981 said:

 

Omg you have global variables too? Thats awesome!

 

Yeah so its pretty clear what im going to do next:

1. Use global variable to store slso of particular actor (with an slso trigger)

2. Use another global variable to store total duration beford slso orgasm (with a begin trigger)

3. Change my current script from slso to end trigger. Improve xp and gold calculation by adding global variables for total sex duration before orgasm + orgasm count

4. Reset global variables to 0 for the next scene

 

These are just on top of a my mind now.

 

I'm glad that helped get you past a roadblock. :)

 

So that I'm sure I understand you, it seems like you want to to maintain some sort of score during a scene of how many orgasms occurred for that actor... (becomes sometimes when I write, parenthesis and an i.e. or e.g. just won't cut it mid-sentence)

 

(not sure if you mean literally something like "the Player" or "Xsaroth from Troubles of Heroine" or if you mean "first aggressor" or "male companions generally", and uniquely identifying and then indexing data against that unique identifier becomes your challenge, but yes, it seems you have the right of it)

 

(FFS I mean look, even my interstitial bits are verbose AF)... and also how long between those orgasms, and at the end of the scene act on your scoring rubric that makes use of the two. Is that about right? I think you are on the right approach and I'll be interested to see your solution.

 

Footnote: <=- this one has taught JC intro Java and done onboarding for teams for years, so when I say I'll be interested to see your solution, I really will. :)

Posted

Okay, so, 7 hours, 1 cup of coffee, and 1 breakfast sandwich later and I am 110% fully rechange--

 

*cough*

 

So, 107 hours--

 

*sigh*

 

So I did get some sleep, I promise. 

 

Right, so to expand a bit on what I had posted a teeny bit earlier. Too early...

 

@MannySauce: The short answer to your question is basically yes, there are ways to interact with the actors in a SexLab scene to affect the "enjoyment" level (roughly, the meter bar during the SLSO game) as well as even directly trigger orgasms (at least if I read the code correctly; it was late). That said, that would be an outbound interaction from sl_triggers, so in essence, an operation and not a trigger condition. Which isn't a problem as such, just wanting to establish what to expect.

 

How does that tie into my writing a SKSE plugin?

 

<LONG BORING DEVELOPER TALK INCOMING>
I was trying to answer the question "if the Actor has a SLSO object attached to them, give me a reference to it so I can call its functions". Preferably I would send mod events but looking at the code for SLSO_SpellGameScript.psc (which is responsible for the game and handling your key presses and magicka/stamina costs) none of the events it listened for seemed like something I wanted to try to work with or, as was mostly the case, just had no way of using them to affect the game. So get a direct handle to an ActiveMagicEffect. Great, let's go check the Creation Kit wiki.

 

The Papyrus interface did not have a way to go from "I have an Actor" to "does the Actor have this specific script attached to them right now?". You can find out if they have particular magic effect (MGEF) but I was looking for something a little more dynamic if possible. More Papyrus oriented and less concerned with knowing FormID values for MGEF when I'm coding Papyrus and know that what I want is a magicNightEyeScript. And worse, even if I know via the Papyrus interface that the MGEF is on the Actor, there is no way to actually get that specific ActiveMagicEffect. Which, again, fair... it's an event driven architecture and I'm trawling through it like an earthworm.

 

So then I remembered that I was facing a similar issue, wanting to discover if a specific script was attached to an Actor in real time, for the rearchitecture. I had avoided going down the .dll route for that because the redesign didn't feel like enough. Then I saw this question pop up and the pieces fell into place for me to be motivated enough to dig in.
<LONG BORING DEVELOPER TALK FINISHED>

 

To summarize, constraining myself to Papyrus script and the functions available from Bethesda, SKSE, and PapyrusUtil, I did not have a means, in real-time, to directly obtain a handle to the SLSO widget in order to influence it. It's code did not seem to have any events that it would be worthwhile attempting to send to it either. So the .dll offered me a way to work around that issue.

 

I assume, however, that trusting a .dll author is a bit more of a challenge to accept because the constraints start to fall off. So to start with, here is the link to the github repo where the very current, very latest code has been pushed as of this morning. This is specifically a release link which includes a "MO2 installer friendly format" .zip file that contains the .dll and a .pdb file which I include this time in case someone wants to do some debugging, there are the symbols. 

 

   https://github.com/lynnpye/sl_triggers_internal/releases/tag/1.0.0

 

I do not have an updated version of sl_triggers pushed that makes use of this yet, but I can branch and push.

 

Anyhow, I think I would enjoy doing the SKSE plugin development too but didn't want to add a new dependency without soliciting opinions about it becoming something I would quite likely start building more functionality around having in place.

Posted
3 hours ago, hextun said:

 

I'm glad that helped get you past a roadblock. :)

 

So that I'm sure I understand you, it seems like you want to to maintain some sort of score during a scene of how many orgasms occurred for that actor... (becomes sometimes when I write, parenthesis and an i.e. or e.g. just won't cut it mid-sentence)

 

(not sure if you mean literally something like "the Player" or "Xsaroth from Troubles of Heroine" or if you mean "first aggressor" or "male companions generally", and uniquely identifying and then indexing data against that unique identifier becomes your challenge, but yes, it seems you have the right of it)

 

(FFS I mean look, even my interstitial bits are verbose AF)... and also how long between those orgasms, and at the end of the scene act on your scoring rubric that makes use of the two. Is that about right? I think you are on the right approach and I'll be interested to see your solution.

 

Footnote: <=- this one has taught JC intro Java and done onboarding for teams for years, so when I say I'll be interested to see your solution, I really will. :)

 

 

Yeah that's the idea. OK I will share it here when I manage to make a workable version.
Damn this is crazy, I went from downloading 500 mods in January to make my first mini-mod :D Thanks to SL Triggers. This community is really amazing.

Posted
14 hours ago, hextun said:

Okay, so, 7 hours, 1 cup of coffee, and 1 breakfast sandwich later and I am 110% fully rechange--

 

*cough*

 

So, 107 hours--

 

*sigh*

 

So I did get some sleep, I promise. 

 

Right, so to expand a bit on what I had posted a teeny bit earlier. Too early...

 

@MannySauce: The short answer to your question is basically yes, there are ways to interact with the actors in a SexLab scene to affect the "enjoyment" level (roughly, the meter bar during the SLSO game) as well as even directly trigger orgasms (at least if I read the code correctly; it was late). That said, that would be an outbound interaction from sl_triggers, so in essence, an operation and not a trigger condition. Which isn't a problem as such, just wanting to establish what to expect.

 

How does that tie into my writing a SKSE plugin?

 

<LONG BORING DEVELOPER TALK INCOMING>
I was trying to answer the question "if the Actor has a SLSO object attached to them, give me a reference to it so I can call its functions". Preferably I would send mod events but looking at the code for SLSO_SpellGameScript.psc (which is responsible for the game and handling your key presses and magicka/stamina costs) none of the events it listened for seemed like something I wanted to try to work with or, as was mostly the case, just had no way of using them to affect the game. So get a direct handle to an ActiveMagicEffect. Great, let's go check the Creation Kit wiki.

 

The Papyrus interface did not have a way to go from "I have an Actor" to "does the Actor have this specific script attached to them right now?". You can find out if they have particular magic effect (MGEF) but I was looking for something a little more dynamic if possible. More Papyrus oriented and less concerned with knowing FormID values for MGEF when I'm coding Papyrus and know that what I want is a magicNightEyeScript. And worse, even if I know via the Papyrus interface that the MGEF is on the Actor, there is no way to actually get that specific ActiveMagicEffect. Which, again, fair... it's an event driven architecture and I'm trawling through it like an earthworm.

 

So then I remembered that I was facing a similar issue, wanting to discover if a specific script was attached to an Actor in real time, for the rearchitecture. I had avoided going down the .dll route for that because the redesign didn't feel like enough. Then I saw this question pop up and the pieces fell into place for me to be motivated enough to dig in.
<LONG BORING DEVELOPER TALK FINISHED>

 

To summarize, constraining myself to Papyrus script and the functions available from Bethesda, SKSE, and PapyrusUtil, I did not have a means, in real-time, to directly obtain a handle to the SLSO widget in order to influence it. It's code did not seem to have any events that it would be worthwhile attempting to send to it either. So the .dll offered me a way to work around that issue.

 

I assume, however, that trusting a .dll author is a bit more of a challenge to accept because the constraints start to fall off. So to start with, here is the link to the github repo where the very current, very latest code has been pushed as of this morning. This is specifically a release link which includes a "MO2 installer friendly format" .zip file that contains the .dll and a .pdb file which I include this time in case someone wants to do some debugging, there are the symbols. 

 

   https://github.com/lynnpye/sl_triggers_internal/releases/tag/1.0.0

 

I do not have an updated version of sl_triggers pushed that makes use of this yet, but I can branch and push.

 

Anyhow, I think I would enjoy doing the SKSE plugin development too but didn't want to add a new dependency without soliciting opinions about it becoming something I would quite likely start building more functionality around having in place.

 

Dude I'm so sorry I couldn't get back to this earlier, think I've wasted a good chunk of your time. I didn't mean to ask about manipulating SLSO, but the separate orgasm feature in SexLab itself that the mod expanded upon. I'm a dumbass, need to proofread before submitting.

Posted
On 4/18/2025 at 9:13 AM, hextun said:

Also, I'm strongly considering moving away from the .json format and to a homegrown parsed version of .ini files. 
 

That is a scheme used by my favorite desktop app "Rainmeter".  I find it much easier to customize than json files. One useful feature of the setup in Rainmeter is the use of resource ini files called by an include command, which allows "global" variables and settings to be used in several dependent command ini's. For instance, an ini file could set the appearance of on-screen messages or custom variable names that all other command ini's would share.

Posted
7 hours ago, MannySauce said:

 

Dude I'm so sorry I couldn't get back to this earlier, think I've wasted a good chunk of your time. I didn't mean to ask about manipulating SLSO, but the separate orgasm feature in SexLab itself that the mod expanded upon. I'm a dumbass, need to proofread before submitting.

 

Hah, it's totally alright. Go ahead and write up a more distinct version of what you are asking about and I'll have a think.

 

As for being concerned about possibly wasting my time, don't be. Here's the deal..

 

I already was thinking about what I could accomplish with a SKSE .dll for sl_triggers, and even about this specific problem.

 

So here's the situation. There appear to be maybe less than 10 people actively following development based on the download numbers. I'm a latecomer with ideas and there's nothing keeping me from moving forward with complete disregard for the other less than 9 of you, but that feels wrong. Plus, honestly, the positive feedback helps keep me coming back. For some things, like arbitrarily adding new operations or features that don't impact existing mod use, I don't mind just moving forward without involving anyone else and posting the results (with fewer bugs since I have a better handle on my testing and packaging). But for something like starting to add a SKSE plugin dependency, that's where I would like community input.

Posted

My question for the sl_triggers community: will it be a turnoff if sl_triggers starts shipping with a SKSE plugin in the form of sl_triggers_internal.dll?

 

It will greatly expand on at least the potential for new features and improvements in performance, but for now will be granting only small benefit. It's a growth opportunity with a dependency.

 

A couple of points to consider if it matters:

- (https://github.com/lynnpye?tab=repositories) I have been coding and offering up my work for free as open source for a long time

- (https://next.nexusmods.com/profile/lppjr/mods) (https://www.curseforge.com/members/hextun01/projects) I have been providing mods for various games for awhile too, even if I'm not well known

- I generally enjoy coding and enjoy the puzzles it offers. It's been my vocation and my avocation for... awhile now ;) .

 

I get the impression adding .dll dependencies can be a sticking point for some. I don't mind posting the extension itself to e.g. nexusmods for proper download and scanning either.

Posted
6 minutes ago, hextun said:

My question for the sl_triggers community: will it be a turnoff if sl_triggers starts shipping with a SKSE plugin in the form of sl_triggers_internal.dll?

 

It will greatly expand on at least the potential for new features and improvements in performance, but for now will be granting only small benefit. It's a growth opportunity with a dependency.

 

A couple of points to consider if it matters:

- (https://github.com/lynnpye?tab=repositories) I have been coding and offering up my work for free as open source for a long time

- (https://next.nexusmods.com/profile/lppjr/mods) (https://www.curseforge.com/members/hextun01/projects) I have been providing mods for various games for awhile too, even if I'm not well known

- I generally enjoy coding and enjoy the puzzles it offers. It's been my vocation and my avocation for... awhile now ;) .

 

I get the impression adding .dll dependencies can be a sticking point for some. I don't mind posting the extension itself to e.g. nexusmods for proper download and scanning either.

As long as it works with 1.5.97, I'm good :)

Posted

Hey thanks a lot for your dedication!

 

I had a question regarding notifications in general: do you know mods or solutions to increase font size? I know sl trigger doesnt control this, but sometimes my sl triggers messages are a bit long and compressed

Posted (edited)
17 hours ago, hextun said:

 

Hah, it's totally alright. Go ahead and write up a more distinct version of what you are asking about and I'll have a think.

 

As for being concerned about possibly wasting my time, don't be. Here's the deal..

 

I already was thinking about what I could accomplish with a SKSE .dll for sl_triggers, and even about this specific problem.

 

So here's the situation. There appear to be maybe less than 10 people actively following development based on the download numbers. I'm a latecomer with ideas and there's nothing keeping me from moving forward with complete disregard for the other less than 9 of you, but that feels wrong. Plus, honestly, the positive feedback helps keep me coming back. For some things, like arbitrarily adding new operations or features that don't impact existing mod use, I don't mind just moving forward without involving anyone else and posting the results (with fewer bugs since I have a better handle on my testing and packaging). But for something like starting to add a SKSE plugin dependency, that's where I would like community input.

 

16 hours ago, hextun said:

My question for the sl_triggers community: will it be a turnoff if sl_triggers starts shipping with a SKSE plugin in the form of sl_triggers_internal.dll?

 

It will greatly expand on at least the potential for new features and improvements in performance, but for now will be granting only small benefit. It's a growth opportunity with a dependency.

 

A couple of points to consider if it matters:

- (https://github.com/lynnpye?tab=repositories) I have been coding and offering up my work for free as open source for a long time

- (https://next.nexusmods.com/profile/lppjr/mods) (https://www.curseforge.com/members/hextun01/projects) I have been providing mods for various games for awhile too, even if I'm not well known

- I generally enjoy coding and enjoy the puzzles it offers. It's been my vocation and my avocation for... awhile now ;) .

 

I get the impression adding .dll dependencies can be a sticking point for some. I don't mind posting the extension itself to e.g. nexusmods for proper download and scanning either.

 

I'm just looking for a way to trigger/reach separate orgasm, don't think I want to mess with the behind the scenes enjoyment progress.
Something like ["sl_so", "$self"].

And I'm not objecting to the .dll, my only worry would be game version support. I'm still on 1.6.640 because my 1.6.1170 setup is still incomplete.

Edited by MannySauce
Posted

This is a beta drop.

 

This is a beta drop.

 

It is probably buggy. It is probably going to call your mother names. It might date your sister. It will not call you in the morning.

 

What to expect:

- I've played it on Nefaram and I've played it on Skyrim Modding Essentials. Please give it a try. I only have so many options for testing on my system.

- I have not tested any of the SexLab events (the Core events are easier to test); I suspect they might work

- INI CODE FILES ARE ENABLED; I also included an Aaaaa.ini and an Aaaaa.json with identical functionality so you can compare; ini and json are coequal meaning that both will now show up in the trigger lists

- triggers are now file based; as you start creating them, they will be dumped into overwrite. sorry :( I don't know of a way to force it into a different folder... hypothetically if you pre-created a bunch of dummy files it would work, but then that defeats part of the purpose

- the MCM menu is.. different.. I hope you like it

- I would like your opinion on performance; part of this redesign was intended to improve some aspects of performance while at the same time I know I ended up making some compromises

 

Generally though you shouldn't see much difference. If it's working correctly you really shouldn't see any difference once you have your triggers setup. A lot of what I wanted to accomplish was to improve expandability. And every time you run one of the sexlab or core commands, you are proving the point. :) Which is, in some hypothetical universe where sl_triggers takes off, with this version, people can create plugins that work with sl_triggers to interoperate with other mods, to add operations you can use in your command files, without having to modify sl_triggers itself. Moreover, I tried to make sure that longrunning scripts won't interfere with one another or with the workings of extensions or sl_triggers itself.

 

I want to do a few more things, but one thing I'm looking to do is improve the mod events to the extent that sl_triggers can be interacted with just that way. For example, right now I have a modevent exposed that would theoretically allow some other mod author to just request that a command be run on a given actor. As opposed to needing to stand up a trigger. Essentially, I turned sl_triggers into a command dispatch service with a microservice architecture to allow for custom expansion. It's been fun. :)

 

Everything is also up on github as well.

 

I'm excited. :)

sl_triggers_v100beta.zip

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...