foreveraloneguy Posted August 26, 2025 Posted August 26, 2025 5 hours ago, hextun said: The answer is "no, but you've given me something to work on, check back in". The long answer isn't really much longer. (oh my god I lied terribly I am so sorry) No, I don't have some key functions: the NiOverride chiefmost (but I'll come back to that), but also not familiar with SLIF integration. But, You can definitely set up a trigger for sex scene start, and depending on the who you want to apply SLTScripts to for morphing, you can configure the filters to help narrow down who might get your SLTScript run on them. Hide contents There are definitely going to be some conditions that you can't use the filters to configure for, and I'm open to suggestions on how to approach making the filtering more flexible but still performant on the back-end, but for now basically imagine the filters as "first pass, high speed, selection criteria" that at least tries to get things narrowed down. So for SexLab Start events, the event comes in for literally anything SexLab tracks, including creatures. So if it's for just the Player, that's easy enough, "Player Relationship:= Player". You could pre-filter by "Gender:= (Any|Male|Female)" (and I should add the remaining options for each version of SexLab now that the two are supported separately) You would presumably want "Race:= Humanoid" (, and man, I really need to add in the actual default Skyrim races. But for now you're picking more of a Race type := (Any|Humanoid|Undead|Creature)). As you can see, if you *want* creatures, right now it's all or nothing. So if you only want *some* creatures, you'll need to add to your SLTScript to account for it. There's a "SL Tags= (Any|Anal|Oral|Vaginal)", but if you want combinations, or to use other tags, you'll need to leave this "Any" and use the "sl_hastag" command in your SLTScript. Look over the filter options and remember it's a bunch of "must meet this criteria AND everything else" to select what to run the script on, when the filters say to run the script. I said I'd come back to the NiOverride functions. I recently added some NiOverride bindings that were graciously donated by @Nevropath but I hadn't expanded on that. I'll have a look as doing so should be relatively straightforward on my end in terms of, say, complexity. My main concern is scale. If I can hit a few key functions that accomplish a lot, that's a big win for (and everyone). The recent 'sl_startsex' additions, for example, are wrappers around the quick start functions for the SexLab API. I added Alias support because at first I was going to try to support the queries necessary to fetch sslAnimations. Purgatory is having implemented functional Alias support structures and literally nothing to use them with. Because I wanted to get "hey, start sex" out into SLTScript form and worry about customized approaches later. Easier committed to now that I have the foundational support necessary for integrations. But each binding is it's own thing. For now anyway. If you have some API suggestions (i.e. actual API targets in the NiOverride interface), I'm open for consideration. If nothing else it would help me with an area of focus to start with. Anyhow, check back soon; I'll still be looking into some options for integration. Integrating with SLIF itself is as simple as sending an event to slif. So if SLT can send events, then it's done. Here's an example from milk mod economy: If (sKey != "") int SLIF_inflate = ModEvent.Create("SLIF_inflate") If (SLIF_inflate) ModEvent.PushForm(SLIF_inflate, akActor) ModEvent.PushString(SLIF_inflate, SLIF_modName) ModEvent.PushString(SLIF_inflate, sKey) ModEvent.PushFloat(SLIF_inflate, value) ModEvent.PushString(SLIF_inflate, modName) ModEvent.Send(SLIF_inflate) EndIf EndIf So from what I've seen, it'd take a little adaptation to fit into the SLT framework, but not much. As far as specific APIs, here's a list that seem relevant for SLT: AddNodeOverrideString RemoveNodeOverrideString SetBodyMorph ClearBodyMorph Anyway, I thought I remembered seeing somewhere that SLT supported facial morphs, but I could be wrong.
just let me download Posted August 26, 2025 Posted August 26, 2025 (edited) I am using the latest version of this mod after Ostim SA support was announced, and I have spent 2-3 days trying to have scenes restore hunger (CC Survival Mode) for the player but have been successful. I've dumbed down the settings so much that just starting a scene should restore hunger, but the magic effects from items used don't take effect at all. At first I tried using the built-in alcohol script which triggered on scene start - I heard the alcohol use sound but no effects of the alcohol actually happened (ie: stamina regen decrease). Can I please have some assistance? Ideally my player character should regain hunger if the male human partner orgasms during oral sex, but at this point I will take hunger restoration under any conditions, I am that desperate. This is my script, titled "Eat Food.sltscript". It is set as Command 1 for the trigger. There are no other Commands set. rnd_list "ccqdrsse001-survivalmode.esl:467532" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" set $1 $$ item_adduse $player $1 1 0 The other settings for this trigger are as follows: Event: Begin Race: Any Player Relationship: Partner Player (I honestly have no idea what these settings do, I just followed an example on the second page) Partner Race: Any Partner Gender: Any All other settings are "Any" or "100" No matter what I do, I can only hear the food munching sound but the actual effects of the food (hunger restoration) never take effect. Same thing if I set it to use the Alcohol script, I hear the drinking sound but no effects of the alcohol actually happen. I would really really appreciate any guidance to making this happen. Thank you. Edited August 26, 2025 by just let me download
Nevropath Posted August 26, 2025 Posted August 26, 2025 12 hours ago, hextun said: The answer is "no, but you've given me something to work on, check back in". The long answer isn't really much longer. (oh my god I lied terribly I am so sorry) No, I don't have some key functions: the NiOverride chiefmost (but I'll come back to that), but also not familiar with SLIF integration. But, You can definitely set up a trigger for sex scene start, and depending on the who you want to apply SLTScripts to for morphing, you can configure the filters to help narrow down who might get your SLTScript run on them. Reveal hidden contents There are definitely going to be some conditions that you can't use the filters to configure for, and I'm open to suggestions on how to approach making the filtering more flexible but still performant on the back-end, but for now basically imagine the filters as "first pass, high speed, selection criteria" that at least tries to get things narrowed down. So for SexLab Start events, the event comes in for literally anything SexLab tracks, including creatures. So if it's for just the Player, that's easy enough, "Player Relationship:= Player". You could pre-filter by "Gender:= (Any|Male|Female)" (and I should add the remaining options for each version of SexLab now that the two are supported separately) You would presumably want "Race:= Humanoid" (, and man, I really need to add in the actual default Skyrim races. But for now you're picking more of a Race type := (Any|Humanoid|Undead|Creature)). As you can see, if you *want* creatures, right now it's all or nothing. So if you only want *some* creatures, you'll need to add to your SLTScript to account for it. There's a "SL Tags= (Any|Anal|Oral|Vaginal)", but if you want combinations, or to use other tags, you'll need to leave this "Any" and use the "sl_hastag" command in your SLTScript. Look over the filter options and remember it's a bunch of "must meet this criteria AND everything else" to select what to run the script on, when the filters say to run the script. I said I'd come back to the NiOverride functions. I recently added some NiOverride bindings that were graciously donated by @Nevropath but I hadn't expanded on that. I'll have a look as doing so should be relatively straightforward on my end in terms of, say, complexity. My main concern is scale. If I can hit a few key functions that accomplish a lot, that's a big win for (and everyone). The recent 'sl_startsex' additions, for example, are wrappers around the quick start functions for the SexLab API. I added Alias support because at first I was going to try to support the queries necessary to fetch sslAnimations. Purgatory is having implemented functional Alias support structures and literally nothing to use them with. Because I wanted to get "hey, start sex" out into SLTScript form and worry about customized approaches later. Easier committed to now that I have the foundational support necessary for integrations. But each binding is it's own thing. For now anyway. If you have some API suggestions (i.e. actual API targets in the NiOverride interface), I'm open for consideration. If nothing else it would help me with an area of focus to start with. Anyhow, check back soon; I'll still be looking into some options for integration. If I remember, I did integrate some morphs NiOverride a long time ago with the old SL Triggers. I lost my file when I crashed PC but, maybe PSC file are still in the old SL Trigger forum. I'll take a look.
hextun Posted August 26, 2025 Author Posted August 26, 2025 (edited) 7 hours ago, just let me download said: I am using the latest version of this mod after Ostim SA support was announced, and I have spent 2-3 days trying to have scenes restore hunger (CC Survival Mode) for the player but have been successful. I've dumbed down the settings so much that just starting a scene should restore hunger, but the magic effects from items used don't take effect at all. At first I tried using the built-in alcohol script which triggered on scene start - I heard the alcohol use sound but no effects of the alcohol actually happened (ie: stamina regen decrease). Can I please have some assistance? Ideally my player character should regain hunger if the male human partner orgasms during oral sex, but at this point I will take hunger restoration under any conditions, I am that desperate. This is my script, titled "Eat Food.sltscript". It is set as Command 1 for the trigger. There are no other Commands set. rnd_list "ccqdrsse001-survivalmode.esl:467532" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" set $1 $$ item_adduse $player $1 1 0 The other settings for this trigger are as follows: Event: Begin Race: Any Player Relationship: Partner Player (I honestly have no idea what these settings do, I just followed an example on the second page) Partner Race: Any Partner Gender: Any All other settings are "Any" or "100" No matter what I do, I can only hear the food munching sound but the actual effects of the food (hunger restoration) never take effect. Same thing if I set it to use the Alcohol script, I hear the drinking sound but no effects of the alcohol actually happen. I would really really appreciate any guidance to making this happen. Thank you. First off, welcome and thanks for trying SLTR out! For your filter: Event: OStim - Orgasm (if I understand correctly, this should run for each actor for each orgasm) Chance: 100% Player Relationship: Partner Player (this restricts it to "any actor who is a partner of the player but is NOT the player") Gender: Male (this restricts it to targeting Males only) Race: Humanoid (this targets non-Creature, non-Undead, so if by "human" you meant to exclude mer, I added a block of code for that) Tag: Oral (this uses the OMetadata.FindAction(sceneId, "blowjob") call) In your script, almost everything is right except $player. That is a holdover from the original sl_triggers. Since I added scopes and variable names, you now have to use $system.player for the Player's Form/Actor. Here is an adjusted version of your script: ;;;; ;; human-only check - remove this block if this wasn't your intent set $selfRace resultfrom actor_race $system.self if $selfRace == "Breton" [ingestComestible] if $selfRace == "Imperial" [ingestComestible] if $selfRace == "Nord" [ingestComestible] if $selfRace == "Redguard" [ingestComestible] ; all else leave return [ingestComestible] ;; human-only check ;;;; ; variable names are easier to read and this syntax skips the additional $$ step set $survivalComestible resultfrom rnd_list "ccqdrsse001-survivalmode.esl:467532" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" ; note use of $system.player in lieu of the no longer supported $player item_adduse $system.player $survivalComestible 1 0 Also, see if you can find sl-triggers.log, possibly somewhere under "Documents\My Games\Skyrim Special Edition\SKSE\". Look for output like: unable to resolve actor variable ($player) That would indicate where it was having a problem trying to resolve the variable. I've been trying to continue to add what I hope are useful/informative messages there for info/warning/error purposes during script execution. Edited August 26, 2025 by hextun
hextun Posted August 26, 2025 Author Posted August 26, 2025 9 hours ago, foreveraloneguy said: Integrating with SLIF itself is as simple as sending an event to slif. So if SLT can send events, then it's done. Here's an example from milk mod economy: If (sKey != "") int SLIF_inflate = ModEvent.Create("SLIF_inflate") If (SLIF_inflate) ModEvent.PushForm(SLIF_inflate, akActor) ModEvent.PushString(SLIF_inflate, SLIF_modName) ModEvent.PushString(SLIF_inflate, sKey) ModEvent.PushFloat(SLIF_inflate, value) ModEvent.PushString(SLIF_inflate, modName) ModEvent.Send(SLIF_inflate) EndIf EndIf So from what I've seen, it'd take a little adaptation to fit into the SLT framework, but not much. As far as specific APIs, here's a list that seem relevant for SLT: AddNodeOverrideString RemoveNodeOverrideString SetBodyMorph ClearBodyMorph Anyway, I thought I remembered seeing somewhere that SLT supported facial morphs, but I could be wrong. Oh, then for much of the SLIF integration (the parts for which you can send an event), integration is easy; you have util_sendevent: ; or set $slifActor and the other variables however. :) set $slifActor $system.player set $slifModname "YourNiftySLTScript" set $slifNode "Belly" set $slifValue 0.1 util_sendevent "SLIF_inflate" form $slifActor string $slifModname string $slifNode float $slifValue 1
just let me download Posted August 26, 2025 Posted August 26, 2025 (edited) 1 hour ago, hextun said: First off, welcome and thanks for trying SLTR out! For your filter: Event: OStim - Orgasm (if I understand correctly, this should run for each actor for each orgasm) Chance: 100% Player Relationship: Partner Player (this restricts it to "any actor who is a partner of the player but is NOT the player") Gender: Male (this restricts it to targeting Males only) Race: Humanoid (this targets non-Creature, non-Undead, so if by "human" you meant to exclude mer, I added a block of code for that) Tag: Oral (this uses the OMetadata.FindAction(sceneId, "blowjob") call) In your script, almost everything is right except $player. That is a holdover from the original sl_triggers. Since I added scopes and variable names, you now have to use $system.player for the Player's Form/Actor. Here is an adjusted version of your script: ;;;; ;; human-only check - remove this block if this wasn't your intent set $selfRace resultfrom actor_race $system.self if $selfRace == "Breton" [ingestComestible] if $selfRace == "Imperial" [ingestComestible] if $selfRace == "Nord" [ingestComestible] if $selfRace == "Redguard" [ingestComestible] ; all else leave return [ingestComestible] ;; human-only check ;;;; ; variable names are easier to read and this syntax skips the additional $$ step set $survivalComestible resultfrom rnd_list "ccqdrsse001-survivalmode.esl:467532" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" ; note use of $system.player in lieu of the no longer supported $player item_adduse $system.player $survivalComestible 1 0 Also, see if you can find sl-triggers.log, possibly somewhere under "Documents\My Games\Skyrim Special Edition\SKSE\". Look for output like: unable to resolve actor variable ($player) That would indicate where it was having a problem trying to resolve the variable. I've been trying to continue to add what I hope are useful/informative messages there for info/warning/error purposes during script execution. Thank you very much for the help! I misspoke when I said human, I meant any non-creature, non-undead, but I will tweak the script further to my needs. I will try this out later today. Hopefully the hunger restoration works this way. Edited August 26, 2025 by just let me download
hextun Posted August 26, 2025 Author Posted August 26, 2025 (edited) v0.900 released and the version number being closer to 1.0 is indicative of proximity to a "final" version. What's new? This had been just some cleanup until recent discussion. I present to you, more NIO functions, and a bunch of SLIF functions. Note that, as was pointed out to me, SLIF exposes a LOT of options through sending of mod events, at least for things you are changing, and since util_sendevent exists, you already could integrate with SLIF. The SLIF functions provided call the SLIF_Main API and so should be slightly more responsive (i.e. no event handling overhead). (These get installed by default, available if you have Racemenu installed) NIO functions added: nio_hasnodeoverride nio_getnodeoverride_float nio_getnodeoverride_int nio_getnodeoverride_bool nio_getnodeoverride_string nio_getnodeoverride_textureset nio_addnodeoverride_float nio_addnodeoverride_int nio_addnodeoverride_bool nio_addnodeoverride_string nio_addnodeoverride_textureset nio_hasbodymorph nio_setbodymorph nio_getbodymorph nio_clearbodymorph nio_updatemodelweight nio_get_morphnames nio_get_morphkeys (These get installed if you select to install SexLab or OStim support) SLIF functions added: slif_get_version slif_get_versionstring slif_is_installed slif_is_updating slif_is_working slif_is_inmaintenance slif_inflate slif_register_actor slif_unregister_actor slif_update_actor slif_reset_actor slif_hide_node slif_show_node slif_is_node_hidden slif_get_gender slif_set_default_values slif_get_value slif_get_minvalue slif_get_maxvalue slif_get_multvalue slif_get_incrvalue Edited August 26, 2025 by hextun added wiki links
Nevropath Posted August 26, 2025 Posted August 26, 2025 1 hour ago, hextun said: v0.900 released and the version number being closer to 1.0 is indicative of proximity to a "final" version. What's new? This had been just some cleanup until recent discussion. I present to you, more NIO functions, and a bunch of SLIF functions. Note that, as was pointed out to me, SLIF exposes a LOT of options through sending of mod events, at least for things you are changing, and since util_sendevent exists, you already could integrate with SLIF. The SLIF functions provided call the SLIF_Main API and so should be slightly more responsive (i.e. no event handling overhead). (These get installed by default, available if you have Racemenu installed) NIO functions added: nio_hasnodeoverride nio_getnodeoverride_float nio_getnodeoverride_int nio_getnodeoverride_bool nio_getnodeoverride_string nio_getnodeoverride_textureset nio_addnodeoverride_float nio_addnodeoverride_int nio_addnodeoverride_bool nio_addnodeoverride_string nio_addnodeoverride_textureset nio_hasbodymorph nio_setbodymorph nio_getbodymorph nio_clearbodymorph nio_updatemodelweight nio_get_morphnames nio_get_morphkeys (These get installed if you select to install SexLab or OStim support) SLIF functions added: slif_get_version slif_get_versionstring slif_is_installed slif_is_updating slif_is_working slif_is_inmaintenance slif_inflate slif_register_actor slif_unregister_actor slif_update_actor slif_reset_actor slif_hide_node slif_show_node slif_is_node_hidden slif_get_gender slif_set_default_values slif_get_value slif_get_minvalue slif_get_maxvalue slif_get_multvalue slif_get_incrvalue No need for me to dig for some old and lost code... well done !
jperrins66 Posted August 26, 2025 Posted August 26, 2025 Can anyone help me make a script to be able to take the various licences from : after a sexlab event as I'm way too stupid to do it myself lol
hextun Posted August 26, 2025 Author Posted August 26, 2025 (edited) 2 hours ago, jperrins66 said: Can anyone help me make a script to be able to take the various licences from : after a sexlab event as I'm way too stupid to do it myself lol The following script gets the number of items contained by the player (Actors are ObjectReferences and can be treated like containers), then iterates, calling GetNthForm for each indexed item in inventory, looking for the "BM_LicenseBook" keyword. If found, it squawks to msg_console, though I guess that would be where you would check to delete it. set $numItems resultfrom objectreference_dogetter $system.player GetNumItems set $playerName resultfrom actor_name $system.player set $foundLicenses 0 msg_console $"{$playerName} has {$numItems} in inventory; scanning for oppressive licenses." while $numItems > 0 inc $numItems -1 set $nthItem resultfrom objectreference_dofunction $system.player GetNthForm $numItems ; According to SSEdit, all licenses have this keyword set $hasKW_BMLicenseBook resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook" if $hasKW_BMLicenseBook ; this is enough to know it's a license, so if that's all you care about msg_console $"Found a license; is this where you would want to remove it? Based on a percentage chance or other conditions?" inc $foundLicenses 1 endif endwhile msg_console $"Done scanning for oppressive licenses; found {$foundLicenses} licenses." I found the keyword via SSEdit, but I don't typically run with that mod; would you mind testing the script out and letting me know how it goes? Editing to add: These are the additional SLTScript keyword checks for if you wanted to know which type of license it was. Still no idea off hand to determine which hold it is for. ; each of these will be bool false or true, depending on which license it is ; presumably only 1 is true at a time for any given license ; note: this doesn't indicate which hold the license is valid for ; THESE ARE ONLY INCLUDED FOR DOCUMENTATION PURPOSES. set $hasKW_BMLicenseBook_Insurance resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Insurance" set $hasKW_BMLicenseBook_Bikini_License resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Bikini1" set $hasKW_BMLicenseBook_Bikini_Exemption resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Bikini2" set $hasKW_BMLicenseBook_Weapon resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Weapon" set $hasKW_BMLicenseBook_Armor resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Armor" set $hasKW_BMLicenseBook_Magic resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Magic" set $hasKW_BMLicenseBook_Clothing resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Clothing" set $hasKW_BMLicenseBook_Whore resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Whore" set $hasKW_BMLicenseBook_Travel resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Travel" set $hasKW_BMLicenseBook_Collar resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Collar" set $hasKW_BMLicenseBook_Crafting resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Crafting" set $hasKW_BMLicenseBook_Trading resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Trading" set $hasKW_BMLicenseBook_Curfew resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Curfew" Edited August 26, 2025 by hextun 1
jperrins66 Posted August 26, 2025 Posted August 26, 2025 3 minutes ago, hextun said: The following script gets the number of items contained by the player (Actors are ObjectReferences and can be treated like containers), then iterates, calling GetNthForm for each indexed item in inventory, looking for the "BM_LicenseBook" keyword. If found, it squawks to msg_console, though I guess that would be where you would check to delete it. set $numItems resultfrom objectreference_dogetter $system.player GetNumItems set $playerName resultfrom actor_name $system.player set $foundLicenses 0 msg_console $"{$playerName} has {$numItems} in inventory; scanning for oppressive licenses." while $numItems > 0 inc $numItems -1 set $nthItem resultfrom objectreference_dofunction $system.player GetNthForm $numItems ; According to SSEdit, all licenses have this keyword set $hasKW_BMLicenseBook resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook" if $hasKW_BMLicenseBook ; this is enough to know it's a license, so if that's all you care about msg_console $"Found a license; is this where you would want to remove it? Based on a percentage chance or other conditions?" inc $foundLicenses 1 endif endwhile msg_console $"Done scanning for oppressive licenses; found {$foundLicenses} licenses." I found the keyword via SSEdit, but I don't typically run with that mod; would you mind testing the script out and letting me know how it goes? Editing to add: These are the additional SLTScript keyword checks for if you wanted to know which type of license it was. Still no idea off hand to determine which hold it is for. ; each of these will be bool false or true, depending on which license it is ; presumably only 1 is true at a time for any given license ; note: this doesn't indicate which hold the license is valid for ; THESE ARE ONLY INCLUDED FOR DOCUMENTATION PURPOSES. set $hasKW_BMLicenseBook_Insurance resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Insurance" set $hasKW_BMLicenseBook_Bikini_License resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Bikini1" set $hasKW_BMLicenseBook_Bikini_Exemption resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Bikini2" set $hasKW_BMLicenseBook_Weapon resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Weapon" set $hasKW_BMLicenseBook_Armor resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Armor" set $hasKW_BMLicenseBook_Magic resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Magic" set $hasKW_BMLicenseBook_Clothing resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Clothing" set $hasKW_BMLicenseBook_Whore resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Whore" set $hasKW_BMLicenseBook_Travel resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Travel" set $hasKW_BMLicenseBook_Collar resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Collar" set $hasKW_BMLicenseBook_Crafting resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Crafting" set $hasKW_BMLicenseBook_Trading resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Trading" set $hasKW_BMLicenseBook_Curfew resultfrom form_dofunction $nthItem HasKeyword "BM_LicenseBook_Curfew" Thanks very much, I'll get on that, also licences are universal, not hold dependant.
jperrins66 Posted August 26, 2025 Posted August 26, 2025 Well from my testing it does find how many licences there are, it is very slow to do so if that is important, i have a high end pc, and ideally i would want to remove them individually and by a percentage chance, I ran it with 1 licence active, and it found there was just 1 and 2 when 2 licences
just let me download Posted August 26, 2025 Posted August 26, 2025 (edited) 13 hours ago, hextun said: First off, welcome and thanks for trying SLTR out! For your filter: Event: OStim - Orgasm (if I understand correctly, this should run for each actor for each orgasm) Chance: 100% Player Relationship: Partner Player (this restricts it to "any actor who is a partner of the player but is NOT the player") Gender: Male (this restricts it to targeting Males only) Race: Humanoid (this targets non-Creature, non-Undead, so if by "human" you meant to exclude mer, I added a block of code for that) Tag: Oral (this uses the OMetadata.FindAction(sceneId, "blowjob") call) In your script, almost everything is right except $player. That is a holdover from the original sl_triggers. Since I added scopes and variable names, you now have to use $system.player for the Player's Form/Actor. Here is an adjusted version of your script: ;;;; ;; human-only check - remove this block if this wasn't your intent set $selfRace resultfrom actor_race $system.self if $selfRace == "Breton" [ingestComestible] if $selfRace == "Imperial" [ingestComestible] if $selfRace == "Nord" [ingestComestible] if $selfRace == "Redguard" [ingestComestible] ; all else leave return [ingestComestible] ;; human-only check ;;;; ; variable names are easier to read and this syntax skips the additional $$ step set $survivalComestible resultfrom rnd_list "ccqdrsse001-survivalmode.esl:467532" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" ; note use of $system.player in lieu of the no longer supported $player item_adduse $system.player $survivalComestible 1 0 Also, see if you can find sl-triggers.log, possibly somewhere under "Documents\My Games\Skyrim Special Edition\SKSE\". Look for output like: unable to resolve actor variable ($player) That would indicate where it was having a problem trying to resolve the variable. I've been trying to continue to add what I hope are useful/informative messages there for info/warning/error purposes during script execution. Hi again, I tried out your suggestion and simplified it since am only starting scenes involving actors supported by Ostim SA (no creatures or undead) but I haven't seen any restoration of survival hunger at all. This is my current script: set $survivalFood resultfrom rnd_list "ccqdrsse001-survivalmode.esl:467532" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" item_adduse $system.player $survivalFood 1 0 Trigger settings are: Event: Orgasm Player Relationship: Partner Player Partner Gender: Male Script 1: (The script above) Everything else is default, I temporarily did not select SL tag just to allow more situations for it to trigger for testing. Do items used by "item_adduse" trigger on-use effects like hunger restoration? I am not sure if that is a supported feature. Edit: I further modified the script to use 2 custom-made dummy food items so that my eating animation mod doesn't try to animate the food being consumed: set $survivalFood resultfrom rnd_list "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" item_adduse $system.player $survivalFood 1 0 Using slt run "Eat Food" successfully runs the script and I have a notification where the food item is added and running it a few times was able to get my hunger reduced. However, using the script as the payload for the above trigger does not work. Do you have any idea why the trigger is not successfully calling this script? Thank you. Edited August 27, 2025 by just let me download
hextun Posted August 27, 2025 Author Posted August 27, 2025 (edited) 4 hours ago, jperrins66 said: Well from my testing it does find how many licences there are, it is very slow to do so if that is important, i have a high end pc, and ideally i would want to remove them individually and by a percentage chance, I ran it with 1 licence active, and it found there was just 1 and 2 when 2 licences There are most definitely optimizations to be had in how the scripts get executed; I'm sorry you're running into a potential performance bottleneck. If you altered the script, can you paste what you ran? I'd like to check it out on my system. Also, do you know how many items you had in your inventory? Oh... hang on... To be clear then, you want the script to have a fixed percentage chance to remove each license, checked individually per license? So if they had 6 licenses, in theory all 6 could be removed? Any other constraints or conditions? This should be faster. First, its performance no longer worsens as your inventory size increases, so there's that. Sorry for that. Ick. I assumed the licenses were hold specific. If it's just one single license for a given type, well, there's exactly those as BOOK records. So the script just has a subroutine to do a license check, then sets the appropriate variable and checks each license. It's got a 25% chance for any given license to call item_remove on the count of that license it finds. This would handle the unlikely case of having multiple copies of one type of license. beginsub licensecheck set $itemCount resultfrom objectreference_dofunction $system.player GetItemCount $licenseFormID if $itemCount > 0 inc $foundLicenses 1 rnd_int 0 100 ; 25% chance if $$ > 75 inc $removedLicenses 1 item_remove $system.player $licenseFormID $itemCount 1 endif endif endsub set $playerName resultfrom actor_name $system.player msg_console $"Scanning {$playerName} inventory for oppressive licenses." set $foundLicenses 0 set $removedLicenses 0 set $licenseFormID "0x059|Licenses.esp" gosub licensecheck set $licenseFormID "0x800|Licenses.esp" gosub licensecheck set $licenseFormID "0x801|Licenses.esp" gosub licensecheck set $licenseFormID "0x814|Licenses.esp" gosub licensecheck set $licenseFormID "0x815|Licenses.esp" gosub licensecheck set $licenseFormID "0x819|Licenses.esp" gosub licensecheck set $licenseFormID "0x857|Licenses.esp" gosub licensecheck set $licenseFormID "0x869|Licenses.esp" gosub licensecheck set $licenseFormID "0x882|Licenses.esp" gosub licensecheck set $licenseFormID "0x883|Licenses.esp" gosub licensecheck set $licenseFormID "0x8B1|Licenses.esp" gosub licensecheck set $licenseFormID "0x8D6|Licenses.esp" gosub licensecheck set $licenseFormID "0x8EA|Licenses.esp" gosub licensecheck msg_console $"Done scanning for oppressive licenses; found {$foundLicenses} licenses; removed {$removedLicenses}." As I said, this should be constant time rather than O(n), so, yeah. Sorry for that. Like I said, I thought it was dynamically creating additional items, copies for each hold, so I was working off the assumption the BOOK records were more like base records with convenient keywords. They're just BOOK records. There's 13 of them, so no more iterating your entire inventory. Edited August 27, 2025 by hextun
hextun Posted August 27, 2025 Author Posted August 27, 2025 3 hours ago, just let me download said: Hi again, I tried out your suggestion and simplified it since am only starting scenes involving actors supported by Ostim SA (no creatures or undead) but I haven't seen any restoration of survival hunger at all. This is my current script: set $survivalFood resultfrom rnd_list "ccqdrsse001-survivalmode.esl:467532" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" "ccqdrsse001-survivalmode.esl:416919" "ccqdrsse001-survivalmode.esl:416920" item_adduse $system.player $survivalFood 1 0 Trigger settings are: Event: Orgasm Player Relationship: Partner Player Partner Gender: Male Script 1: (The script above) Everything else is default, I temporarily did not select SL tag just to allow more situations for it to trigger for testing. Do items used by "item_adduse" trigger on-use effects like hunger restoration? I am not sure if that is a supported feature. Edit: I further modified the script to use 2 custom-made dummy food items so that my eating animation mod doesn't try to animate the food being consumed: set $survivalFood resultfrom rnd_list "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" item_adduse $system.player $survivalFood 1 0 Using slt run "Eat Food" successfully runs the script and I have a notification where the food item is added and running it a few times was able to get my hunger reduced. However, using the script as the payload for the above trigger does not work. Do you have any idea why the trigger is not successfully calling this script? Thank you. I was going to come back and ask for some troubleshooting steps, but this is good info. There is a sequence where the script functions as expected, i.e. when run directly via console, targeting the player. It fails when triggered on "Partner Player"/"Orgasm". Logging goes through the plugin and should go into a file named sl-triggers.log, located in the same folder that all the other SKSE plugins output to, typically something like "Documents\My Games\Skyrim Special Edition\SKSE\sl-triggers.log". Try to find that log as it should report problems with launching scripts or possibly warnings or errors during script execution. If you don't see anything that stands out, in the MCM there are also a number of debug flags you can enable. Try the same event with more of the flags enabled and additional logging output should show up. In particular looking for indications of a script failing to run, or failures during script execution. Inside the script itself, you could also try this, to see if, when run during the event, it's one step or the other that fails: set $playerName resultfrom actor_name $system.player set $selfName resultfrom actor_name $system.self set $survivalFood resultfrom rnd_list "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" msg_console $"{$selfName} forcing {$playerName} to consume ${survivalFood}" set $itemCount resultfrom objectreference_dofunction $system.player GetItemCount $survivalFood msg_console $"player has {$itemCount} of ${survivalFood}; adding 1" item_add $system.player $survivalFood 1 0 set $itemCount resultfrom objectreference_dofunction $system.player GetItemCount $survivalFood msg_console $"now player has {$itemCount} of ${survivalFood}; attempting to 'equip' i.e. 'use' in the case of potions and food" item_equip $system.player $survivalFood false set $itemCount resultfrom objectreference_dofunction $system.player GetItemCount $survivalFood msg_console $"and finally player has {$itemCount} of ${survivalFood}" item_adduse is just a wrapper around the same functionality item_add and item_equip bind to. This is more for troubleshooting, obviously; you will be able to see the output in the console and have some idea of what the script at least thinks is going on.
just let me download Posted August 27, 2025 Posted August 27, 2025 1 hour ago, hextun said: I was going to come back and ask for some troubleshooting steps, but this is good info. There is a sequence where the script functions as expected, i.e. when run directly via console, targeting the player. It fails when triggered on "Partner Player"/"Orgasm". Logging goes through the plugin and should go into a file named sl-triggers.log, located in the same folder that all the other SKSE plugins output to, typically something like "Documents\My Games\Skyrim Special Edition\SKSE\sl-triggers.log". Try to find that log as it should report problems with launching scripts or possibly warnings or errors during script execution. If you don't see anything that stands out, in the MCM there are also a number of debug flags you can enable. Try the same event with more of the flags enabled and additional logging output should show up. In particular looking for indications of a script failing to run, or failures during script execution. Inside the script itself, you could also try this, to see if, when run during the event, it's one step or the other that fails: set $playerName resultfrom actor_name $system.player set $selfName resultfrom actor_name $system.self set $survivalFood resultfrom rnd_list "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" msg_console $"{$selfName} forcing {$playerName} to consume ${survivalFood}" set $itemCount resultfrom objectreference_dofunction $system.player GetItemCount $survivalFood msg_console $"player has {$itemCount} of ${survivalFood}; adding 1" item_add $system.player $survivalFood 1 0 set $itemCount resultfrom objectreference_dofunction $system.player GetItemCount $survivalFood msg_console $"now player has {$itemCount} of ${survivalFood}; attempting to 'equip' i.e. 'use' in the case of potions and food" item_equip $system.player $survivalFood false set $itemCount resultfrom objectreference_dofunction $system.player GetItemCount $survivalFood msg_console $"and finally player has {$itemCount} of ${survivalFood}" item_adduse is just a wrapper around the same functionality item_add and item_equip bind to. This is more for troubleshooting, obviously; you will be able to see the output in the console and have some idea of what the script at least thinks is going on. Thank you for your reply, I tried using the modified script you gave but I did not notice any output in the console at all. I'm attaching the sl triggers log file in case there is any useful information inside. I turned on debug messages and enabled all the Granular Debug Flag Controls except for the SexLab one (I don't use SL). I'm also attaching a screenshot of the trigger conditions so it is crystal clear. I had tested by starting and finishing a scene with a male Khajit. Spoiler sl-triggers.log
jperrins66 Posted August 27, 2025 Posted August 27, 2025 3 hours ago, hextun said: Thanks, it works as is, good enough for my purpose, much appreciated mate.
hextun Posted August 27, 2025 Author Posted August 27, 2025 7 hours ago, just let me download said: Thank you for your reply, I tried using the modified script you gave but I did not notice any output in the console at all. I'm attaching the sl triggers log file in case there is any useful information inside. I turned on debug messages and enabled all the Granular Debug Flag Controls except for the SexLab one (I don't use SL). I'm also attaching a screenshot of the trigger conditions so it is crystal clear. I had tested by starting and finishing a scene with a male Khajit. Reveal hidden contents sl-triggers.log 87.49 kB · 0 downloads Try disabling (setting to "Any") the "Partner Gender" and instead set "Gender" to "Male". This is not clear in the naming I guess, but, all of the filters are in relation to "from the point of view of the potential target of the script". So, "Player Relationship" being "Partner Player" already means "the script's target's partner *is* the player". So when you then add on to that "Partner Gender" must be "Male", you're saying "the script's target's partner, i.e. the player, must be Male". By changing it to "Gender" must be "Male", you're saying "the script's target's gender must be Male". 1
hothot995 Posted August 27, 2025 Posted August 27, 2025 Sorry, I want to make a simple script that, after a trigger event (female, non-player orgasm), increases the NPC’s relationship with the player. To keep it simple, I thought about just using a console command to set the relationship to 4, but for some reason it doesn’t work. Using OStim: Event: orgasm Race: partner humanoid Player relationship: not player Chance: 100 Partner race: humanoid Role: not part of rape Script: console $system.self "setrelationshiprank player 4" May I ask what’s wrong with it? I’d really appreciate your help....
hextun Posted August 27, 2025 Author Posted August 27, 2025 1 hour ago, hothot995 said: Sorry, I want to make a simple script that, after a trigger event (female, non-player orgasm), increases the NPC’s relationship with the player. To keep it simple, I thought about just using a console command to set the relationship to 4, but for some reason it doesn’t work. Using OStim: Event: orgasm Race: partner humanoid Player relationship: not player Chance: 100 Partner race: humanoid Role: not part of rape Script: console $system.self "setrelationshiprank player 4" May I ask what’s wrong with it? I’d really appreciate your help.... So, technically, I think that trigger should fire, but it's not configured the way I suspect you intended and would lead to false positives. I think what you want would be: Event: OStim Orgasm Race: Humanoid Player Relationship: Partner Player Role: Not part of rape Which says: - For each OStim Orgasm, inspect the orgasming actor - Is that actor a humanoid? - Is that actor a partner to the player in an OStim scene? - Is that actor not part of a rape scene? - If so, run this script: Your original filters: Event: OStim Orgasm Race: Partner Humanoid Player Relationship: Not Player Partner Race: Humanoid Role: Not part of rape Were saying: - For each OStim Orgasm, inspect the orgasming actor - Is the partner of that actor humanoid? - Is the actor not the player? - Is the partner of that actor humanoid? (redundant, will be fixed next release) - Is that actor not part of a rape scene? - If so, run this script Which if any OStim scenes play that do not involve the player, even the orgasms originating there would run the trigger. So I'm not sure why it's not doing what you expect. How about modifying the script to add some debug output, just to make sure it's running: set $selfName resultfrom actor_name $system.self msg_console $"For Actor({$selfName}): calling 'setrelationshiprank player 4'" console $system.self "setrelationshiprank player 4" Anytime it runs, you should get output to the console; make sure it's even being run. If it's not being run, it's a problem with the trigger not triggering. If it's being run, but the relationship rank isn't being updated, verify it in the console by prid or click selecting the target NPC and running the command. If that works, then the SLTScript "console" command is failing (i.e. perhaps with setting the reference context, though I just verified it should be). 1
just let me download Posted August 27, 2025 Posted August 27, 2025 8 hours ago, hextun said: Try disabling (setting to "Any") the "Partner Gender" and instead set "Gender" to "Male". This is not clear in the naming I guess, but, all of the filters are in relation to "from the point of view of the potential target of the script". So, "Player Relationship" being "Partner Player" already means "the script's target's partner *is* the player". So when you then add on to that "Partner Gender" must be "Male", you're saying "the script's target's partner, i.e. the player, must be Male". By changing it to "Gender" must be "Male", you're saying "the script's target's gender must be Male". Thank you very much, that worked! You are right, the naming is not clear and to be honest I was struggling a lot with understanding it. Now that I understand the basics, I am looking forward to create more interesting things with this mod.
hothot995 Posted August 27, 2025 Posted August 27, 2025 7 hours ago, hextun said: So, technically, I think that trigger should fire, but it's not configured the way I suspect you intended and would lead to false positives. I think what you want would be: Event: OStim Orgasm Race: Humanoid Player Relationship: Partner Player Role: Not part of rape Which says: - For each OStim Orgasm, inspect the orgasming actor - Is that actor a humanoid? - Is that actor a partner to the player in an OStim scene? - Is that actor not part of a rape scene? - If so, run this script: Your original filters: Event: OStim Orgasm Race: Partner Humanoid Player Relationship: Not Player Partner Race: Humanoid Role: Not part of rape Were saying: - For each OStim Orgasm, inspect the orgasming actor - Is the partner of that actor humanoid? - Is the actor not the player? - Is the partner of that actor humanoid? (redundant, will be fixed next release) - Is that actor not part of a rape scene? - If so, run this script Which if any OStim scenes play that do not involve the player, even the orgasms originating there would run the trigger. So I'm not sure why it's not doing what you expect. How about modifying the script to add some debug output, just to make sure it's running: set $selfName resultfrom actor_name $system.self msg_console $"For Actor({$selfName}): calling 'setrelationshiprank player 4'" console $system.self "setrelationshiprank player 4" Anytime it runs, you should get output to the console; make sure it's even being run. If it's not being run, it's a problem with the trigger not triggering. If it's being run, but the relationship rank isn't being updated, verify it in the console by prid or click selecting the target NPC and running the command. If that works, then the SLTScript "console" command is failing (i.e. perhaps with setting the reference context, though I just verified it should be). Thank you!!! It works perfectly! I think I chose the wrong race or Player Relationship or something like that.
MannySauce Posted August 29, 2025 Posted August 29, 2025 Is there a way to stitch together a variable name from data in other variables? I'm hoping to condense a 200+ line script into the single digits with something like: set $Prefix resultfrom function set $Suffix resultfrom function inc $"$global.{Prefix}{Suffix}" $global.CindyTheTVsLeaking
hextun Posted August 29, 2025 Author Posted August 29, 2025 10 hours ago, MannySauce said: Is there a way to stitch together a variable name from data in other variables? I'm hoping to condense a 200+ line script into the single digits with something like: set $Prefix resultfrom function set $Suffix resultfrom function inc $"$global.{Prefix}{Suffix}" $global.CindyTheTVsLeaking Not that I'm aware of. Variable resolution is currently single-pass. But you're making me consider creating a ref() function that would let you do it. Like 'inc ref($"global.{$prefix}{$suffix}") $global.CindyTheTVsLeaking', so that anything in ref() gets resolved and that gets used as a variable name. What are you doing currently, in general?
hextun Posted August 29, 2025 Author Posted August 29, 2025 About container activation; currently it works on a whitelist basis, which is what I borrowed from DEC. After mulling it over, I'm modifying how it works, to be more expansive. In the next release, the FormID List is now a blacklist, as is the "dt_blacklist" in containers.json. It will activate for anything that is a CONT (Container) and is not on the blacklist. I'm also adding a new mini-game, "Consumption Lifestyle", that includes a timer driven trigger that upon being run, looks for and consumes any Transformative Elixirs in your inventory. It also includes a Container activation trigger that, upon closing the container, if it sees any Transformative Elixirs inside it, moves them into the Player's inventory. The code itself is easy to modify to include or specify different items. With this particular mini-game, you will not be able to help yourself but to loot, and eventually consume, any non-stealth Transformative Elixirs.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now