Dakhma Posted June 24, 2025 Posted June 24, 2025 9 hours ago, hextun said: Sure. Which version are you running at this point? I just released v121 and it becomes reeeeaaally important now. This script should work for v121 for example: set $ebumod "Enchanged Bestial Urination.esp:" set $wateryBearUrine $"{ebumod}2063" set $freshGoopyBoarUrine $"{ebumod}2064" set $freshAndHotHorseUrine $"{ebumod}2065" set $stickyRieklingUrine $"{ebumod}2066" set $infectedSkeeverUrine $"{ebumod}2067" set $freshSeasonedCanineUrine $"{ebumod}3436" set $magesBestialUrine $"{ebumod}3438" set $fattyAndThickTrollUrine $"{ebumod}3440" set $ebuOfChoice resultfrom rnd_list $wateryBearUrine $freshGoopyBoarUrine $freshAndHotHorseUrine $stickyRieklingUrine $infectedSkeeverUrine $freshSeasonedCanineUrine $magesBestialUrine $fattyAndThickTrollUrine item_adduse $system.player $ebuOfChoice 1 0 If, for example, you wanted there to be a higher chance for infectedSkeeverUrine, etc. First of all, for your sanity, you would probably shorten the variable names. But the idea is that you repeat a given entry to represent it's weight. Say you wanted, out of 10 random picks, 5 should be infectedSkeeverUrine, 3 should be from dogs, and 1 from horse. This would do it: set $ebumod "Enchanged Bestial Urination.esp:" set $wateryBearUrine $"{ebumod}2063" set $freshGoopyBoarUrine $"{ebumod}2064" set $freshAndHotHorseUrine $"{ebumod}2065" set $stickyRieklingUrine $"{ebumod}2066" set $infectedSkeeverUrine $"{ebumod}2067" set $freshSeasonedCanineUrine $"{ebumod}3436" set $magesBestialUrine $"{ebumod}3438" set $fattyAndThickTrollUrine $"{ebumod}3440" ; even distribution set $ebuOfChoice resultfrom rnd_list $wateryBearUrine $freshGoopyBoarUrine $freshAndHotHorseUrine $stickyRieklingUrine $infectedSkeeverUrine $freshSeasonedCanineUrine $magesBestialUrine $fattyAndThickTrollUrine item_adduse $system.player $ebuOfChoice 1 0 ; weighted between skeever:5, canine:3, horse:1 ; use shortened names for better readability set $skeever $"{ebumod}2067" set $canine $"{ebumod}3436" set $horse $"{ebumod}2065" ; the rnd_list will pick from the list, including from among duplicates, allowing weighting set $weightedEbuOfChoice resultfrom rnd_list $skeever $skeever $skeever $skeever $skeever $canine $canine $canine $horse item_adduse $system.player $weightedEbuOfChoice 1 0 For older versions, the string interpolations: $"{var}..." become string concatenations: $var & "...". So: $"{ebumod}2063" ; would have been (in pre-v121) $ebumod & "2063" and specifying the player as a target has changed from $player to $system.player: $item_adduse $system.player $ebuOfChoice 1 0 ; would have been, pre v121: $item_adduse $player $ebuOfChoice 1 0 also, prior to v120, "set..resultfrom.." was not a thing, so: set $ebuOfChoice result from rnd_list .... ; would be (pre v120) rnd_list $.... set $ebuOfChoice $$ And please update to having variable names. Ideally all the way up to v121. If you save without the mod installed once to clear it out, then install and reload, it seems to pick up just fine. You'd need to modify any of your custom scripts but they wouldn't have been overwritten (unless you were modifying original scripts in place). Hey omg thank you, I am running the version before 121, would that still work?
Dakhma Posted June 25, 2025 Posted June 25, 2025 9 hours ago, hextun said: Sure. Which version are you running at this point? I just released v121 and it becomes reeeeaaally important now. This script should work for v121 for example: set $ebumod "Enchanged Bestial Urination.esp:" set $wateryBearUrine $"{ebumod}2063" set $freshGoopyBoarUrine $"{ebumod}2064" set $freshAndHotHorseUrine $"{ebumod}2065" set $stickyRieklingUrine $"{ebumod}2066" set $infectedSkeeverUrine $"{ebumod}2067" set $freshSeasonedCanineUrine $"{ebumod}3436" set $magesBestialUrine $"{ebumod}3438" set $fattyAndThickTrollUrine $"{ebumod}3440" set $ebuOfChoice resultfrom rnd_list $wateryBearUrine $freshGoopyBoarUrine $freshAndHotHorseUrine $stickyRieklingUrine $infectedSkeeverUrine $freshSeasonedCanineUrine $magesBestialUrine $fattyAndThickTrollUrine item_adduse $system.player $ebuOfChoice 1 0 If, for example, you wanted there to be a higher chance for infectedSkeeverUrine, etc. First of all, for your sanity, you would probably shorten the variable names. But the idea is that you repeat a given entry to represent it's weight. Say you wanted, out of 10 random picks, 5 should be infectedSkeeverUrine, 3 should be from dogs, and 1 from horse. This would do it: set $ebumod "Enchanged Bestial Urination.esp:" set $wateryBearUrine $"{ebumod}2063" set $freshGoopyBoarUrine $"{ebumod}2064" set $freshAndHotHorseUrine $"{ebumod}2065" set $stickyRieklingUrine $"{ebumod}2066" set $infectedSkeeverUrine $"{ebumod}2067" set $freshSeasonedCanineUrine $"{ebumod}3436" set $magesBestialUrine $"{ebumod}3438" set $fattyAndThickTrollUrine $"{ebumod}3440" ; even distribution set $ebuOfChoice resultfrom rnd_list $wateryBearUrine $freshGoopyBoarUrine $freshAndHotHorseUrine $stickyRieklingUrine $infectedSkeeverUrine $freshSeasonedCanineUrine $magesBestialUrine $fattyAndThickTrollUrine item_adduse $system.player $ebuOfChoice 1 0 ; weighted between skeever:5, canine:3, horse:1 ; use shortened names for better readability set $skeever $"{ebumod}2067" set $canine $"{ebumod}3436" set $horse $"{ebumod}2065" ; the rnd_list will pick from the list, including from among duplicates, allowing weighting set $weightedEbuOfChoice resultfrom rnd_list $skeever $skeever $skeever $skeever $skeever $canine $canine $canine $horse item_adduse $system.player $weightedEbuOfChoice 1 0 For older versions, the string interpolations: $"{var}..." become string concatenations: $var & "...". So: $"{ebumod}2063" ; would have been (in pre-v121) $ebumod & "2063" and specifying the player as a target has changed from $player to $system.player: $item_adduse $system.player $ebuOfChoice 1 0 ; would have been, pre v121: $item_adduse $player $ebuOfChoice 1 0 also, prior to v120, "set..resultfrom.." was not a thing, so: set $ebuOfChoice result from rnd_list .... ; would be (pre v120) rnd_list $.... set $ebuOfChoice $$ And please update to having variable names. Ideally all the way up to v121. If you save without the mod installed once to clear it out, then install and reload, it seems to pick up just fine. You'd need to modify any of your custom scripts but they wouldn't have been overwritten (unless you were modifying original scripts in place). Also, is there no way to specifically make the trigger based on the npc? like Skeever Urine would only trigger if oral with Skeever for example?
hextun Posted June 25, 2025 Author Posted June 25, 2025 1 hour ago, Dakhma said: Hey omg thank you, I am running the version before 121, would that still work? Here you go: ; This would be suitable for v117-v120 set $ebumod "Enchanged Bestial Urination.esp:" set $wateryBearUrine $ebumod & "2063" set $freshGoopyBoarUrine $ebumod & "2064" set $freshAndHotHorseUrine $ebumod & "2065" set $stickyRieklingUrine $ebumod & "2066" set $infectedSkeeverUrine $ebumod & "2067" set $freshSeasonedCanineUrine $ebumod & "3436" set $magesBestialUrine $ebumod & "3438" set $fattyAndThickTrollUrine $ebumod & "3440" ; even distribution rnd_list $wateryBearUrine $freshGoopyBoarUrine $freshAndHotHorseUrine $stickyRieklingUrine $infectedSkeeverUrine $freshSeasonedCanineUrine $magesBestialUrine $fattyAndThickTrollUrine set $ebuOfChoice $$ item_adduse $player $ebuOfChoice 1 0 ; weighted between skeever:5, canine:3, horse:1 ; use shortened names for better readability set $skeever $ebumod & "2067" set $canine $ebumod & "3436" set $horse $ebumod & "2065" ; the rnd_list will pick from the list, including from among duplicates, allowing weighting rnd_list $skeever $skeever $skeever $skeever $skeever $canine $canine $canine $horse set $weightedEbuOfChoice $$ item_adduse $player $weightedEbuOfChoice 1 0
hextun Posted June 25, 2025 Author Posted June 25, 2025 1 hour ago, Dakhma said: Also, is there no way to specifically make the trigger based on the npc? like Skeever Urine would only trigger if oral with Skeever for example? Well, there's "trigger filters" (i.e. the MCM choosable options to determine if a trigger should run) and then there's "what I can deduce in the script". Take the Skeever Urine. *refuses to make the obvious joke, but kind of looks askance in it's general direction and smirks* You want it to trigger only for a skeever. There isn't (currently anyway) a filter for that level of granularity, but, as something of a pre-filter, if you specify creature (vs humanoid) then you could at least pre-filter the trigger to only run on, I'm guessing, SLSO Orgasm with the Oral tag? So: Event: SLSO Orgasm Tag: Oral Player: Partner Player (Partner is the Player) Race: Creature Position: 1 ; I think? you want it to fire targeted on the animal in question, and I think, if I'm not mistaken, that would put them in position 1, to "give" with an Oral tag, if I recall the SexLab API docs correctly That much would at least restrict the trigger to firing on an animal, in the indicated situation, etc. You want specifically your specific animal. Your trigger is running, Mr. Bond, what are you going to do? And the answer is they were all good. Go with it. Anyway, is this what you have in mind? ; This would be suitable for v117-v120 set $ebumod "Enchanged Bestial Urination.esp:" set $wateryBearUrine $ebumod & "2063" set $freshGoopyBoarUrine $ebumod & "2064" set $freshAndHotHorseUrine $ebumod & "2065" set $stickyRieklingUrine $ebumod & "2066" set $infectedSkeeverUrine $ebumod & "2067" set $freshSeasonedCanineUrine $ebumod & "3436" set $magesBestialUrine $ebumod & "3438" set $fattyAndThickTrollUrine $ebumod & "3440" ; what Skyrim race does it tell us the script target is? actor_race $self set $selfrace $$ ; e.g. Skeever race is "Skeever" ; pretty sure we could compress the following 8 or so lines down to a couple :) ; SLTScript challenge, how few lines can you turn this into? if $selfrace &= "Bear" do_ebu_bear if $selfrace &= "Boar" do_ebu_boar if $selfrace &= "Horse" do_ebu_horse if $selfrace &= "Riekling" do_ebu_riekling if $selfrace &= "Skeever" do_ebu_skeever if $selfrace &= "Dog" do_ebu_dog ; honestly I don't know what you're going for here and, to be frank, if you ; are targeting humanoid mages or something, then the pre-filter above is ; going to have removed these contenders from consideration if $selfrace &= "Ummm...??" do_ebu_mage_i_guess_you_gotta_gimme_more_to_work_with_here if $selfrace &= "Troll" do_ebu_troll msg_notify "Unforeseen creature partner" return ; as this is in top scope in this script, this will trigger immediate completion of the script, as will the subsequent "return" calls [do_ebu_bear] ; do you want smarter than average bears? no. no you do not item_adduse $player $wateryBearUrine return [do_ebu_boar] ; no worries item_adduse $player $freshGoopyBoarUrine return [do_ebu_horse] ; of course item_adduse $player $freshAndHotHorseUrine return [do_ebu_riekling] ; I have nothing item_adduse $player $stickyRieklingUrine return [do_ebu_skeever] ; can't fight the skeever (now you hear it, too) item_adduse $player $infectedSkeeverUrine return [do_ebu_dog] ; did you ever watch Beethoven as an adult homeowner? item_adduse $player $freshSeasonedCanineUrine return [do_ebu_mage_i_guess_you_gotta_gimme_more_to_work_with_here] ; so, obviously this goes here, but it's how you got here that matters item_adduse $player $magesBestialUrine return [do_ebu_troll] ; ) item_adduse $player $fattyAndThickTrollUrine return ; this impertinent fellow is unnecessary
hextun Posted June 25, 2025 Author Posted June 25, 2025 Honestly, at this point, for "future proofing" purposes, your variables should probably not include things like (),.<>{}[]+=*^%#\|~@"'?/:;'& and you are already used to $ and the scope use for . so it's probably best to avoid those in your variable names too. just saying. I really need to get the docs updated. - Sent from my iPhone -- typed manually
hextun Posted June 25, 2025 Author Posted June 25, 2025 On 6/18/2025 at 8:18 PM, LinksSword said: how would you make a script where a item is forced onto the player when they try to loot a dungeon chest for example? I'm going to assume that what you are interested in is functionality for container activation detection similar to that used in Deviously Enchanted Chests. From a very simplistic perspective, I could pretty quickly whip up something that would respond to the raw events directly. With a bit of effort, I could work out some filtering. But the immediately obvious implementation would be quite non-performant. Which is why I suggest you give @Bane Master a big thank you. For the low, low cost of continuing to keep all of SLTRedux open source and free (as it always has been; as it always shall be), they have graciously agreed to let me bring in their implementation, which uses hidden perk activation logic, along with a form id list (that would be annoying/error prone to create from scratch) of containers, plus associated logic for filtering, for a battle tested and performant implementation. Which means a big jump start on the space program! Another nice to have with the filtering is I may be able to use the same filtering logic to improve existing "location" style filters currently in use (i.e. instead of just "Indoor"/"Outdoor", also consider "Dungeon", "Town", "Home", "Save", etc.). Next release: new Core event: OnContainerOpen Also, given that I bothered to implement straight up text style filters, is there interest in either exchanging or adding text filters to some existing triggers? For example, with recent questions about filtering by race, perhaps the current "Race" filter for the SL triggers should be more like "SLT Race Category" and a new "Race" filter could be added that is just a text field you can enter an optional string to search on. Just bear in mind, suggestions have to be able to be implemented in such a way that filter checks can remain performant. No filtering on "has a second cousin, twice removed, who shops only on Thursdays, except for Tuesdays when they can shop for clothes, and only if wearing something green, exclusive of every fifth such Tuesday, meaning exclusive of non-clothes-shopping Tuesdays".
MannySauce Posted June 25, 2025 Posted June 25, 2025 Are there any functions to detect if you're in the first or last stage of a SL scene? For example in a SL Begin event trigger I want to postpone a loop for stage 2+, but pause it when I reach last stage and resume it if I leave last stage without ending the scene. I've also got some unrelated event and function suggestions to bother you with, sorry: Core event that trigger when you enter combat. Core event that trigger when you leave combat. SL event that trigger when you switch animation or actor positions while already in a SL scene. Script function to simulate a keypress or a combination of keypresses. Script function to switch SL animation, selecting a new animation either at random, with tags or animation name. 1 hour ago, hextun said: Also, given that I bothered to implement straight up text style filters, is there interest in either exchanging or adding text filters to some existing triggers? For example, with recent questions about filtering by race, perhaps the current "Race" filter for the SL triggers should be more like "SLT Race Category" and a new "Race" filter could be added that is just a text field you can enter an optional string to search on. I'd like that, I've never actually used the race detection part of the trigger, I've always just handled it in script. Would it be possible for a Race/Faction/Keyword lookup that can be edited like our .ini/.json, for personalized matching? Or would that be too slow? 1 hour ago, hextun said: Just bear in mind, suggestions have to be able to be implemented in such a way that filter checks can remain performant. No filtering on "has a second cousin, twice removed, who shops only on Thursdays, except for Tuesdays when they can shop for clothes, and only if wearing something green, exclusive of every fifth such Tuesday, meaning exclusive of non-clothes-shopping Tuesdays". What if you'd want to filter for your father's brother's nephew's cousin's former roommate?
hextun Posted June 25, 2025 Author Posted June 25, 2025 1 hour ago, MannySauce said: Are there any functions to detect if you're in the first or last stage of a SL scene? For example in a SL Begin event trigger I want to postpone a loop for stage 2+, but pause it when I reach last stage and resume it if I leave last stage without ending the scene. There is sl_getprop with the "Stage" parameter to get the current stage, and I don't recall if it is 0 or 1 based but that could be easily obtained with a little experimentation. What I'm quite sure you cannot determine in advance is whether the current stage is the last or not. For example, there are mods that will push the stage back one step randomly, plus the SexLab flags for auto-advancing on stamina loss/orgasm. There's not a good way to tell. 1 hour ago, MannySauce said: I've also got some unrelated event and function suggestions to bother you with, sorry: Apology rejected; suggestions offered politely and in the spirit of improving things are always welcome and thus apologies unnecessary. 1 hour ago, MannySauce said: Core event that trigger when you enter combat. ^== I like this Core event that trigger when you leave combat. ^== I like this SL event that trigger when you switch animation or actor positions while already in a SL scene. ^== I will investigate Script function to simulate a keypress or a combination of keypresses. ^== Do you mean like a wrapper around Input.TapKey()? Script function to switch SL animation, selecting a new animation either at random, with tags or animation name. ^== What about sl_advance and sl_animname? 1 hour ago, MannySauce said: I'd like that, I've never actually used the race detection part of the trigger, I've always just handled it in script. Would it be possible for a Race/Faction/Keyword lookup that can be edited like our .ini/.json, for personalized matching? Or would that be too slow? Like a "Custom Race"/ "Custom Faction" / "Custom Keyword" attribute that, if used for a trigger, loads your custom data as a selectable list and also references it as a filter? That sounds delicious; I shall be pondering. 1 hour ago, MannySauce said: What if you'd want to filter for your father's brother's nephew's cousin's former roommate? But what would that make you?
MannySauce Posted June 25, 2025 Posted June 25, 2025 1 hour ago, hextun said: There is sl_getprop with the "Stage" parameter to get the current stage, and I don't recall if it is 0 or 1 based but that could be easily obtained with a little experimentation. What I'm quite sure you cannot determine in advance is whether the current stage is the last or not. For example, there are mods that will push the stage back one step randomly, plus the SexLab flags for auto-advancing on stamina loss/orgasm. There's not a good way to tell. Ah, bummer. Maybe I'll just use util_wait on Begin and set a global var Orgasm on a util_wait reset that my loop can check for, I dunno. 🥴 1 hour ago, hextun said: Script function to simulate a keypress or a combination of keypresses. ^== Do you mean like a wrapper around Input.TapKey()? I think so? If wrapped around that, would a hypothetical function with parameter "0x39"/"57" make the player with default keybinds jump outside of SL and advance a stage inside of SL? 1 hour ago, hextun said: Script function to switch SL animation, selecting a new animation either at random, with tags or animation name. ^== What about sl_advance and sl_animname? I mean for a way to change the animation itself, like with the "SexLab Tools" mod pop-up menu, SL keybind or when your SLSO partner isn't completely satisfied and switches animations on last stage. The parameters would be for selecting the next animation, not interacting with or gathering info on the current one. Thinking something like: sl_animchange $system.self Standing <--- switch to an animation with the "Standing" tag sl_animchange $system.self Standing Anal <--- switch to an animation with the "Standing" AND "Anal" tag sl_animchange $system.self "Animation Name Here" <--- switch to a specific animation sl_animchange $system.self <--- switch to a random animation 1 hour ago, hextun said: But what would that make you?
Fraying9981 Posted June 25, 2025 Posted June 25, 2025 Whats the easiest way to find out a specific location id, to use with a sex lab trigger? My thought process - Have a list of ~5 locations in a json, that are player homes from mods (not vanila) - restrict to a list of animations by sexlab trigger This way for example, i can get a massage room!
hextun Posted June 25, 2025 Author Posted June 25, 2025 3 hours ago, MannySauce said: Ah, bummer. Maybe I'll just use util_wait on Begin and set a global var Orgasm on a util_wait reset that my loop can check for, I dunno. 🥴 I think so? If wrapped around that, would a hypothetical function with parameter "0x39"/"57" make the player with default keybinds jump outside of SL and advance a stage inside of SL? I mean for a way to change the animation itself, like with the "SexLab Tools" mod pop-up menu, SL keybind or when your SLSO partner isn't completely satisfied and switches animations on last stage. The parameters would be for selecting the next animation, not interacting with or gathering info on the current one. Thinking something like: sl_animchange $system.self Standing <--- switch to an animation with the "Standing" tag sl_animchange $system.self Standing Anal <--- switch to an animation with the "Standing" AND "Anal" tag sl_animchange $system.self "Animation Name Here" <--- switch to a specific animation sl_animchange $system.self <--- switch to a random animation If you imagine that all of the OnKeyHandlers get told "hey this key was pressed", I think Input.TapKey() just hooks into that. So basically, yeah, I believe the intent is what you describe. As the description says "fakes a keypress". So 0x39 being "spacebar" sounds right. FWIW, SexLab Survival I believe uses TapKey for the "magicka < 10%; auto fuck-back" setting and there are warnings about how it can "play not nice" with some mods depending on how they listen for certain key events. I know my game gets more unstable when I turn it on. But then, that is generating a new key press per second, not just one-offs. There is actor_playanim which lets you start an animation for the given actor. Nothing that lets you pick one, but... You could, for example, create a "Start_TAG_Animation.ini" (or several, one for each tag) that uses "rnd_list" from a curated set of animations with the given tag. In fact, you could just set it up for whatever set you want. Then just `call $"start_{TAG}_animation"` and it will run one from random. Or if it's all in one script just make them gosubs (tons faster). 1
hextun Posted June 25, 2025 Author Posted June 25, 2025 1 hour ago, Fraying9981 said: Whats the easiest way to find out a specific location id, to use with a sex lab trigger? My thought process - Have a list of ~5 locations in a json, that are player homes from mods (not vanila) - restrict to a list of animations by sexlab trigger This way for example, i can get a massage room! I would guess the console in game? Like, if you already have access to those locations, coc to one (or visit normally), open the console, run 'prid player' and view your location information (assuming you have one of the expanded info mods). Otherwise, there are no good ways to get formids that I'm aware of. Like for anything. Good as in "easy". Anyone have a better answer? I should create some "diagnostic dump" scripts that you could wire up to a hotkey to dump formid info.
Dakhma Posted June 25, 2025 Posted June 25, 2025 19 hours ago, hextun said: Well, there's "trigger filters" (i.e. the MCM choosable options to determine if a trigger should run) and then there's "what I can deduce in the script". Take the Skeever Urine. *refuses to make the obvious joke, but kind of looks askance in it's general direction and smirks* You want it to trigger only for a skeever. There isn't (currently anyway) a filter for that level of granularity, but, as something of a pre-filter, if you specify creature (vs humanoid) then you could at least pre-filter the trigger to only run on, I'm guessing, SLSO Orgasm with the Oral tag? So: Event: SLSO Orgasm Tag: Oral Player: Partner Player (Partner is the Player) Race: Creature Position: 1 ; I think? you want it to fire targeted on the animal in question, and I think, if I'm not mistaken, that would put them in position 1, to "give" with an Oral tag, if I recall the SexLab API docs correctly That much would at least restrict the trigger to firing on an animal, in the indicated situation, etc. You want specifically your specific animal. Your trigger is running, Mr. Bond, what are you going to do? And the answer is they were all good. Go with it. Anyway, is this what you have in mind? ; This would be suitable for v117-v120 set $ebumod "Enchanged Bestial Urination.esp:" set $wateryBearUrine $ebumod & "2063" set $freshGoopyBoarUrine $ebumod & "2064" set $freshAndHotHorseUrine $ebumod & "2065" set $stickyRieklingUrine $ebumod & "2066" set $infectedSkeeverUrine $ebumod & "2067" set $freshSeasonedCanineUrine $ebumod & "3436" set $magesBestialUrine $ebumod & "3438" set $fattyAndThickTrollUrine $ebumod & "3440" ; what Skyrim race does it tell us the script target is? actor_race $self set $selfrace $$ ; e.g. Skeever race is "Skeever" ; pretty sure we could compress the following 8 or so lines down to a couple :) ; SLTScript challenge, how few lines can you turn this into? if $selfrace &= "Bear" do_ebu_bear if $selfrace &= "Boar" do_ebu_boar if $selfrace &= "Horse" do_ebu_horse if $selfrace &= "Riekling" do_ebu_riekling if $selfrace &= "Skeever" do_ebu_skeever if $selfrace &= "Dog" do_ebu_dog ; honestly I don't know what you're going for here and, to be frank, if you ; are targeting humanoid mages or something, then the pre-filter above is ; going to have removed these contenders from consideration if $selfrace &= "Ummm...??" do_ebu_mage_i_guess_you_gotta_gimme_more_to_work_with_here if $selfrace &= "Troll" do_ebu_troll msg_notify "Unforeseen creature partner" return ; as this is in top scope in this script, this will trigger immediate completion of the script, as will the subsequent "return" calls [do_ebu_bear] ; do you want smarter than average bears? no. no you do not item_adduse $player $wateryBearUrine return [do_ebu_boar] ; no worries item_adduse $player $freshGoopyBoarUrine return [do_ebu_horse] ; of course item_adduse $player $freshAndHotHorseUrine return [do_ebu_riekling] ; I have nothing item_adduse $player $stickyRieklingUrine return [do_ebu_skeever] ; can't fight the skeever (now you hear it, too) item_adduse $player $infectedSkeeverUrine return [do_ebu_dog] ; did you ever watch Beethoven as an adult homeowner? item_adduse $player $freshSeasonedCanineUrine return [do_ebu_mage_i_guess_you_gotta_gimme_more_to_work_with_here] ; so, obviously this goes here, but it's how you got here that matters item_adduse $player $magesBestialUrine return [do_ebu_troll] ; ) item_adduse $player $fattyAndThickTrollUrine return ; this impertinent fellow is unnecessary Oh wow thank you for the in depth explanation, for mage urine, I don't really need a trigger, its just for the other types. I will test what you gave me and report back, I truly appreciate your patience and time to help me!
MannySauce Posted June 25, 2025 Posted June 25, 2025 14 minutes ago, hextun said: If you imagine that all of the OnKeyHandlers get told "hey this key was pressed", I think Input.TapKey() just hooks into that. So basically, yeah, I believe the intent is what you describe. As the description says "fakes a keypress". So 0x39 being "spacebar" sounds right. FWIW, SexLab Survival I believe uses TapKey for the "magicka < 10%; auto fuck-back" setting and there are warnings about how it can "play not nice" with some mods depending on how they listen for certain key events. I know my game gets more unstable when I turn it on. But then, that is generating a new key press per second, not just one-offs. Crossing that one off my list. 👍 33 minutes ago, hextun said: There is actor_playanim which lets you start an animation for the given actor. Nothing that lets you pick one, but... You could, for example, create a "Start_TAG_Animation.ini" (or several, one for each tag) that uses "rnd_list" from a curated set of animations with the given tag. In fact, you could just set it up for whatever set you want. Then just `call $"start_{TAG}_animation"` and it will run one from random. Or if it's all in one script just make them gosubs (tons faster). Does that support paired SL animations? Or is it the same as using "sae" on a targeted reference in console?
MannySauce Posted June 25, 2025 Posted June 25, 2025 "snd_play" isn't working for me in v121, is this correct? snd_play "MannyResources.esm:00080A" $system.partner Works fine in v120 when I do: snd_play "MannyResources.esm:00080A" $partner
Fraying9981 Posted June 25, 2025 Posted June 25, 2025 2 hours ago, hextun said: run 'prid player' and view your location information (assuming you have one of the expanded info mods). that's the simple I was looking for. Thanks for holding my hand.
hextun Posted June 26, 2025 Author Posted June 26, 2025 14 hours ago, MannySauce said: "snd_play" isn't working for me in v121, is this correct? snd_play "MannyResources.esm:00080A" $system.partner Works fine in v120 when I do: snd_play "MannyResources.esm:00080A" $partner I will check into that. Can you post your whole script? I know you said it works in v120 with the prior use of '$partner' but I would like to have it as a reference if you could.
hextun Posted June 26, 2025 Author Posted June 26, 2025 14 hours ago, MannySauce said: Crossing that one off my list. 👍 Does that support paired SL animations? Or is it the same as using "sae" on a targeted reference in console? I'm not familiar with the "sae" command. Is that added by a mod? And welcome to more of my ignorance re: SL animation features. "Paired animations"? If nothing else I'm sure there are additional SL API calls I can expose/bind; I'll have a look, but by all means any additional info you can provide would be of use.
hextun Posted June 26, 2025 Author Posted June 26, 2025 Also... I think I found some uses for other scopes. You may recall that when I first added the Core extension, I included a new function, toh_elapsed_time, a lovely little function that I daresay has probably not been run once in production. Which is fine of course. But I realized that a number of things that I set up as a function call (because that was the idiom I had been familiar with) could just as easily have been a nicely accessible variable. So... first off, I'm going to be occasionally adding things to the system scope, like "$system.stats.running_scripts", which should give an active report of the number of running scripts. I think I should also put up a stats page on the MCM. I'm also going to be adding "$system.is_available.core" and "$system.is_available.sexlab" which will return 0 or 1 depending on whether the associated extension is currently available. And "$core.toh_elapsed_time" just because. I'm going to go through the SexLab info to find anything else that might be an easy grab. Second, there is no second. Other extensions (should one ever appear outside of my two) can define their own scope, introduce their own variables, and also expand on the variables available in the $system scope.
hextun Posted June 26, 2025 Author Posted June 26, 2025 (edited) 17 hours ago, MannySauce said: "snd_play" isn't working for me in v121, is this correct? snd_play "MannyResources.esm:00080A" $system.partner Works fine in v120 when I do: snd_play "MannyResources.esm:00080A" $partner Nevermind about posting the script; I found the problem. I had moved form resolution into the plugin and accidentally set it so that instead of only requiring a leading "0" to resolve a hex value, it required "0x". The upshot is, if you change "MannyResources.esm:00080A" to "MannyResources.esm:0x00080A", it should work. *sigh* So, yeah, I need to update the CHANGELOG to reflect this. As of v121, numeric values will be parsed as base 10, regardless of leading zeroes. If you want a value to be parsed as base 16/hex, you must prefix it with "0x". So: 23 == 023 == 00000023 == 0x17 == 0x00000017 This would be in all FormID notations and raw numbers. It should make it a little more readable and should make it easier to copy values in since most of the time when you obtain a FormID it's from something like CK or xEdit and you get the hex version. ETA: My Reasons To begin with, sorry for not reporting this change. It happened pretty early in the update cycle for v121, which as you know was longer than normal, and I lost track of the update. mea culpa As for why I want it, two reasons: - clarity - Hex is Hex Clarity: Now, if you see a number, you can immediately know, definitely and obviously, whether it is base 10 or base 16. Moreover, even if you use string concatenation to build a number, you can't accidentally add a preceding zero and start interpreting it as base 16. Hex is Hex: I.. cannot... stand... seeing a number and having to double check if it has an extra zero in front. Give me a non-numeric character to break it up and I'm fine. Or maybe I'm just stuck in my ways. Or maybe I'm right. Regardless, I feel like if you want a hex value, you should explicitly indicate it is a hex value. Also, SPID uses a 0x prefix. *cough* Edited June 26, 2025 by hextun Expanded response 1
MannySauce Posted June 26, 2025 Posted June 26, 2025 Can't have a new version without me stubbing my toe on undocumented changes. 👌 3 hours ago, hextun said: I'm not familiar with the "sae" command. Is that added by a mod? Oopsie, "SendAnimationEvent" is the full name, I'm used to the shorthand version for console usage. I think it's base game? 3 hours ago, hextun said: And welcome to more of my ignorance re: SL animation features. "Paired animations"? Stuff like 2+ actor SL scenes and kill moves. As I was writing this I went for a drink and STUBBED MY TOE FOR REAL. I have been hexed.
hextun Posted June 26, 2025 Author Posted June 26, 2025 1 hour ago, MannySauce said: Can't have a new version without me stubbing my toe on undocumented changes. 👌 Oopsie, "SendAnimationEvent" is the full name, I'm used to the shorthand version for console usage. I think it's base game? Stuff like 2+ actor SL scenes and kill moves. As I was writing this I went for a drink and STUBBED MY TOE FOR REAL. I have been hexed. Not going to comment on the proximity to my username... again.
hextun Posted June 26, 2025 Author Posted June 26, 2025 5 hours ago, MannySauce said: Can't have a new version without me stubbing my toe on undocumented changes. 👌 Oopsie, "SendAnimationEvent" is the full name, I'm used to the shorthand version for console usage. I think it's base game? Stuff like 2+ actor SL scenes and kill moves. As I was writing this I went for a drink and STUBBED MY TOE FOR REAL. I have been hexed. I see. Yes, good point. sae would clearly just be a standard "start this animation on this actor" thing where as starting a SexLab animation is an adventure. Well, I can say with certainty I do not have that bound. I can also say I will be checking into implementation. I can also say I really think lists would be a good and useful thing now. WILL SOMEONE THINK OF THE LISTS?!
MannySauce Posted June 28, 2025 Posted June 28, 2025 (edited) A question regarding variables - is it possible to add a prefix when a function uses it? Let's say I do: actor_race $system.partner "" set $local.Partner1Race $$ msg_console $"DEBUG: Partner race is {local.Partner1Race}" call $local.Partner1Race Can I somehow make the "call" section get "prefixRace" instead of "Race"? call prefix$local.Partner1Race ? call $"prefix{local.Partner1Race}" ? Edited June 28, 2025 by MannySauce
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