hextun Posted April 30, 2025 Posted April 30, 2025 SL Triggers Redux View File SLTR lets you run simple scripts without the need to compile and without worrying about Papyrus script dependencies or whether your script will build. SLTR comes with some scripts for you, thinks like giving yourself a little gold, healing yourself, giving yourself a drink. You can also write your own custom SLTScripts. And finally, you can set up triggers, ways to make SLTScripts run in response to game events, like on game load, on changing location, or even tied to custom keymappings of your choice. All of this is configurable via MCM or text files if you prefer. It is ESL flagged to minimize impact on your load order and most dependencies are loaded dynamically, so aside from the requirements of SKSE and PapyrusUtils, everything else is optional depending on what functionality you want. Requirements: SKSE Address Library for SKSE Plugins PapyrusUtil powerofthree's Tweaks Optional: SexLab Framework (if you want SexLab events and commands) SexLab P+ Framework (this version works as well) OStim Standalone Console Util Extended (if you want to execute Skyrim console commands in your scripts) (or another ConsoleUtil variant) MfgFix (if you want facial expression related commands in your scripts) Devious Followers Continued OSLAroused Devious Devices NG/Devious Devices SE Pet Collar Nether's Follower Framework Autonomous Sex Framework More Details Please!: The source code is available at https://github.com/sltriggersredux/sltriggersredux which also has a Wiki. There is also a LoversLab SLTriggers Redux Club available for better organized sharing of SLTR related content (i.e. SLTScripts, mini-games, add-ons). SL Triggers Redux (SLTR, though you may still see references to SLT) is two things: first, it is a scripting engine for the SLTScript scripting language and second, it is an extensible set of triggers that let you set up SLTScripts to be run in response to in-game events. The original focus of SLTR was purely on the four basic SexLab events (Sex Start, Orgasm, Sex End, Separate Orgasm via SLSO), but the framework has been expanded to not be tied solely to SexLab events. In addition, out of the box, you can also set up hotkeys to run scripts on demand, set scripts up to run on the (in-game) hour, and even run scripts directly via console command. These scripts are simple text files with the .sltscript extension, with an easy to understand syntax and a number of examples available to work from. Scripts are comprised of commands. Commands can be functions like "av_set" (to set an Actor Value) or syntactic commands like "goto" (to script execution to a different line). SLTR comes with a base library of functions available for scripting that is growing. That said, it features an extension architecture through which mod authors can implement additional functions that would be available to other users of SLT that also install the extension. This allows the ability to expand the function library without needing it to be added to the core library. You don't have to program the scripts to use them. A selection is available for you to work with from the get-go, plus any you want to copy and modify, and of course you can also share scripts with other SLTR users. (I hold no copyright over any SLTScripts anyone creates, just so you know.) Visit the SLTR wiki for complete details, including script examples and SLT API documentation for your SLTScripts, as well as integration features. Supported Events Events that occur in game (SexLab orgasm, Key press, Fast Travel) can be configured to fire triggers, which in turn can result in running scripts if the filters match. Currently, you can run SLTScripts in response to the following events: Core Keymapping (triggers in response to your choice of hotkey mapping, with optional modifier and DAK support) Top of the Hour (triggers on the in-game hour (or on the next such hour after sleep or travel)) New Session (triggers on each new game load) Player Cell Change (triggers on each Cell change; this happens more frequently than you might think, so be careful about heavy scripts with this, and protect against spamming i.e. player running back and forth across cell boundaries could generate spammed script executions) Player Opened Container (triggers after a Player opens a container; depending on timing of the backing ActiveMagicEffect landing, might not run until after the container is closed) Player Location Change (triggers on each Location change; typically much less frequent than Cell change) Player Equipment Change (triggers when the player swaps equipment) Player Combat State Changed (triggers when the Player's combat status changes) Player Hit Or Is Hit (triggers when the Player is hit; this can result in a lot of executions so be careful with filter selection and heavy scripts) Timer (triggers on a per-minute timer, delayed anywhere from 1 to 60 minutes) Harvesting (triggers when harvesting typical harvestables; e.g. plants, mushrooms, butterflies) Fast Travel Arrival (triggers when you arrive after fast travel) Vampirism Transitions (triggers when: you become a Vampire, you are cured, you transform to a Vampire Lord, and you end the Vampire Lord transformation) Werewolf Transitions (triggers when: you are cursed, you are cured, you transform into a Werewolf, and you end the Werewolf transofmration) Vampire Feeding (triggers when you begin vampiric feeding) Player Swim Start/Stop Player Water Enter/Exit Soul Trapped SexLab (optional) Start Stop Orgasm Orgasm, Separate Stage Start Stage End OStim (optional) Start Stop Orgasm SceneChange Scripts Provided These are some of the SLTScripts provided out of the box with just the Core install. That means you can run any of them from the console, or in response to any trigger, with no additional configuration. Making more SLTScripts available is simple; add them to your 'Data/SKSE/Plugins/sl_triggers/commands/' folder and on your next game launch you will see them. The 'target' of a script might be someone other than the player i.e. if you target them when using the console commands or if an event fires that targets them, like SexLab Separate Orgasm. Core SLTScripts Add perk point.sltscript Alcohol.sltscript Cast Calm.sltscript Cast Fear.sltscript Cast Light.sltscript Change stats (bad).sltscript Change stats (good).sltscript Change stats (mix).sltscript Cry.sltscript CureDisease.sltscript Doomstone Lover.sltscript Eat (sweets).sltscript Give Gold(10).sltscript Harm (-100).sltscript Heal (+100).sltscript Learn skill (Mage).sltscript Learn skill (random).sltscript Learn skill (Thief).sltscript Learn skill (Warrior).sltscript Lovers comfort.sltscript MFG Reset.sltscript Necks bitten(+1).sltscript Show Limited RaceMenu.sltscript Sound - Levelup.sltscript Toggle Collision.sltscript Toggle God Mode.sltscript SexLab SLTScripts (included when selecting either of SexLab/SexLab P+) CumControl.sltscript DD Unlock All.sltscript DF Reset All.sltscript DF Set Debt to 0.sltscript Disease.sltscript Heart beat(A).sltscript Sex is crime.sltscript SL Aggressive Sex With Player - Anal.sltscript SL Aggressive Sex With Player - Oral.sltscript SL Aggressive Sex With Player - Vaginal.sltscript SL Masturbate Self.sltscript SL Sex With Player - Anal.sltscript SL Sex With Player - Oral.sltscript SL Sex With Player - Vaginal.sltscript SLS Destroy Random License.sltscript SLS Evict from Markarth.sltscript SLS Evict from Riften.sltscript SLS Evict from Solitude.sltscript SLS Evict from Whiterun.sltscript SLS Evict from Windhelm.sltscript SLS Magic Curse Add.sltscript SLS Magic Curse Remove.sltscript SLS Revoke All Licenses.sltscript SLS Revoke Random License.sltscript SLS Send to Kennel - Markarth.sltscript SLS Send to Kennel - Riften.sltscript SLS Send to Kennel - Solitude.sltscript SLS Send to Kennel - Whiterun.sltscript SLS Send to Kennel - Windhelm.sltscript SLS UnEvict from Markarth.sltscript SLS UnEvict from Riften.sltscript SLS UnEvict from Solitude.sltscript SLS UnEvict from Whiterun.sltscript SLS UnEvict from Windhelm.sltscript Time Control.sltscript Time Slow.sltscript Vision blurred.sltscript OStim SLTScripts (included when selecting OStim) OStim Disease.sltscript OStim Heart beat(A).sltscript OStim Masturbate Self.sltscript OStim Sex is crime.sltscript OStim Sex With Player.sltscript OStim Time Control.sltscript OStim Time Slow.sltscript OStim Vision blurred.sltscript General Adult-oriented SLTScripts (included when selecting any of OStim/SexLab/SexLab P+) Contamination - MME_Lactacid.sltscript Contamination - Transformative Elixir.sltscript PetCollar - Add Keyless.sltscript PetCollar - Add.sltscript PetCollar - Remove Keyless.sltscript PetCollar - Remove.sltscript Add-Ons/Mini-Games Available These are add-on packs or mini-games implemented through SLTR. These may alter gameplay or introduce new mechanics. Typically these involve combinations of SLTScripts, pre-built triggers, and sometimes configuration files. PetCollar Game - (Requires: SexLab, PetCollar; Contents: SLTScript, trigger, JSON) At the start of SexLab scenes, your followers will (somewhat) randomly choose to equip and unequip the "Keyless Pet Collar" from the PetCollar mod. This is the one which cannot be picked or removed by the wearer. Consumption Lifestyle - (Requires: Transformative Elixirs; contents: SLTScript, trigger) When the non-stealth varieties of Transformative Elixirs appear in containers the player interacts with, they will automatically pull them into their inventory and consume them. Additionally, a periodic timer will run which will look for these items and consume them. Speaking of Copyright and Licensing / Attribution: All work associated with "SL Triggers Redux" aka "SLTR" aka "SLT" (in relation to it's origin) is derived from the original, SL Triggers, by Fotogen. I received approval to continue development. More info available on the SLTR Wiki. All other work that exists as part of this project as well as the associated SKSE C++ plugin project (when it's not hosted here) is and always will be MIT Licensed. All SLTScripts created by anyone else are subject to their copyright and I hold none over them. Code and data related to container activation was graciously provided by @Bane Master from Deviously Enchanted Chests; they deserve any credit for the efficacy of the container activation logic and I'll take the heat for the issues with my implementation. As agreed, this code and data, as part of this project, will remain MIT Licensed. Installation: If You Are Updating From An Older Version If you are moving from Fotogen's original SL Triggers, you will need a new save. If you are updating from one version of SLTR (this mod) to a newer version, check the CHANGELOG, but I'll likely still recommend a new save. Regardless, especially for small version jumps, it doesn't hurt to try first without a new save. That said, I have often found that both Fotogen's and mine seem to be able to survive the following: Save your game and quit Skyrim Remove the old version Run Skyrim, load your save, click through the warning, save, and quit again Perform any necessary cleanup (e.g. some versions no longer understand old script formats like JSON) Install the new version Run Skyrim and enjoy your new version However, in case of support, if a problem persists beyond that, the next logical step would be to test on a new save if possible. If You Are Installing For The First Time Using MO2 Is Recommended I personally use ModOrganizer2/MO2 and even then, often just through whichever modlist I'm using via wabbajack. If using MO2, dragging an SLTR install .zip into the downloads tab should be sufficient to make it available to install into your list. Similarly dragging it into your active load order should be sufficient to have it installed and running when you next play. It doesn't (at this time) have any particular load order requirements so feel free to move it about as you need. If, However, You Are Doing A Manual Install SLTR itself is a typical mod install with a SKSE plugin. It installs into Data\ as you would expect Mod And Plugin Logging Output Mod logging output will appear in whichever folder SKSE is configured to output to. On a typical Windows 10 Steam install, for example, I think this ends up in your 'Documents\My Games\Skyrim Special Edition\SKSE\sl-triggers.log' folder. Generally I also send log output from Papyrus script through the plugin, so all log output should be located in that one file. Once It Is Installed Once installed, you should now find in your 'mods' folder a new sub-folder, 'sl_triggers' (or whatever you named it during install). The mod folder structure at install should look something like: interfaces\ - containing e.g. translation files scripts\ - containing compiled .pex files SKSE\ CustomConsole\ - config file for ConsoleUtil-Extended to provide improved console commands Plugins\ sl_triggers\ commands\ - pre-made SLTScripts you can link to triggers without having to do any coding commandstore\ - folder available for SLTScript usage as well as shared persisted files (other locations are not excluded) extensions\ sl_triggersExtensionCore\ - trigger definitions (JSON) for events handled by the 'Core' extension new triggers for the 'Core' extension will be created here (but may end up in your overwrite or other folder specified for output files) you can place your own JSON files (as long as the filename can be a valid string in the Skyrim Papyrus VM) here without needing to use the MCM this also allows you to share triggers created by others sl_triggersExtensionSexLab\ - trigger definitions (JSON) for events handled by the 'SexLab' extension new triggers for the 'SexLab' extension will be created here (but may end up in your overwrite or other folder specified for output files) similarly, this works for any extension; for now there are only 'Core' and 'SexLab' offered by the mod sl_triggersExtensionCore-attributes.json - DO NOT EDIT; JSON-based definitions for the SLTR MCM to handle Core triggers sl_triggersExtensionCore-libraries.json - DO NOT EDIT; JSON configuration for Core function libraries sl_triggersExtensionSexLab-attributes.json - DO NOT EDIT; JSON-based definitions for the SLTR MCM to handle SexLab triggers sl_triggersExtensionSexLab-libraries.json - DO NOT EDIT; JSON configuration for SexLab function libraries containers.json - JSON configuration for Containers (provides support for the Core trigger: On Player Activate Container) you can modify this file to add containers from other mods that will be detected; it includes some examples you can also define which containers will be considered "Common" for filtering purposes; some defaults are included settings.json - created at first launch to avoid being overwritten during updates sl-triggers.dll - SKSE plugin; CommonLibNG-SSE based; uses Address Library; should support most used versions source\ scripts\ - containing source .psc files for the .pex files sl_triggers.esp sl_triggers_CHANGELOG.txt sl_triggers_function_library.md - Markdown documentation for available SLTScript functions provided by SLTR (other functions may be provided by third party extensions and function libraries) sl_triggers_function_library.txt - Text documentation for available SLTScript functions provided by SLTR (other functions may be provided by third party extensions and function libraries) sl_triggers_sltscripts.txt - Basic information about SLTScript; for the best documentation visit the [wiki](https://github.com/lynnpye/sl_triggers/wiki). In-Game Configuration If you have SkyUI installed, you should have an MCM available as 'SL Triggers Redux'. Any extensions registering themselves with SLTR will be listed on the left. The main SLTR MCM screen has an 'Enabled' option (on by default), a 'Debug' option, and a number of Granular Debug options, all of which are off by default. This will cause very little logging output. Even with all 'Debug' options off, during SLTScript parsing, if errors or important warnings or info need to be reported, they will be sent to that log. If your SLTScript isn't behaving as expected, check the log first. All of the 'Debug' options will output to the log file and will absolutely impact performance, both of your SLTScript and likely the game itself. This can be useful when troubleshooting your scripts, but don't leave it on for general play. Selecting an extension displays it's triggers if it has any defined, and gives you the option to create more. Each trigger has filter options on it's card for you to customize when the scripts should be applied. In game, if you are using the MCM to create new triggers, or as any new files are generated by SLTR (like new .json files if you create SLTScript that does so), they will be generated in the 'overwrite\' folder as for any mod; if you want to manage those files, you will need to manually copy them into whatever new location you want them in. You can also "soft delete" a trigger, marking it inactive until either you restore it or go in and physically remove the trigger file. Until restored it will remain inactive. About Performance: Effort has been made to avoid scripts from stressing the system more than necessary, but there are still limitations. Each script will be run on an Actor in game (the Player or an NPC) as an ActiveMagicEffect i.e. as from a Spell. Any one Actor can have no more than 30 scripts running on them at one time. Scripts can be long-running if you make them so, so be careful not to let things run away. Okay, But How Do I Run A Script! Running Scripts Manually: You can use the console to list available scripts and run them. From the console, use: slt list To list the available scripts. To run a given script, use: slt run "scriptname" The quotes are only necessary if the script name has spaces. So, to give yourself a free 10 septims, try: slt run "Give Gold(10)" Setting Up a Keymapping: If you have a script you want to be able to run at the press of a button, set up a Keymapping trigger. This is most easily done through the MCM. Go to the "SL Triggers Redux" MCM and choose the "SLTR Core" extension. Then click "Add New Item" on the right. Choose "Keymapping" as the event type, then select the key you wish to map it to. Finally, click the "Do 1" drop down and select a script to run. Exit the MCM and you should be able to run that script on demand just by pressing your mapped key! What Is Different From the Original? Fotogen's original sl_triggers effort is great and still works well. Plus I had already added some of these features (like the Keymapping and Top of the Hour event handling) to it. - Extensible - It is very easy to expand functionality to add more operations to be available in your scripts with the new command libraries; Papyrus script developers can create their own .psc file with global functions to add new operations that will be available to any script run on the system - New script format - The original format used JSON which is conveniently supported in the Skyrim environment but not convenient for development; the new .ini format is easier to read and works conveniently with syntax highlighting for some of the features - More than SexLab - I know, SexLab is the SL in SLT; but the framework supports any event to fire a script - ModEvent support for Script Execution - Mod authors can send mod events with a script name and SLT will run the script on the targeted Actor (or the Player if no target is available) - API support - You can also access the same features through an API if you prefer - Console command support - Some features available from the console - Additional SLTScript language features: subroutines, script-to-script execution with call arguments, named variables This is a renewal of development on the original SL Triggers by Fotogen. I received approval to continue development. Spoiler Submitter hextun Submitted 04/30/25 Category Framework & Resources Requirements Required: SKSE https://skse.silverlock.org/ Address Library for SKSE Plugins https://www.nexusmods.com/skyrimspecialedition/mods/32444 PapyrusUtil https://www.nexusmods.com/skyrimspecialedition/mods/13048 Optional: SexLab Framework https://www.loverslab.com/files/file/20058-sexlab-se-sex-animation-framework-v166b-01182024/ if you want SexLab events and commands SexLab P+ Framework https://www.loverslab.com/files/file/25318-sexlab-p/ this version works as well Console Util Extended https://www.nexusmods.com/skyrimspecialedition/mods/133569 if you want to execute Skyrim console commands in your scripts (or another ConsoleUtil variant) MfgFix https://www.nexusmods.com/skyrimspecialedition/mods/11669 if you want facial expression related commands in your scripts Devious Followers Continued https://www.loverslab.com/files/file/11732-devious-followers-continued-se/ for Devious Followers related functions OSLAroused https://www.loverslab.com/files/file/20867-osl-aroused-arousal-reborn-sse-ae/ for OSLAroused specific functions (not SexLabAroused) Devious Devices NG https://www.loverslab.com/files/file/29779-devious-devices-ng/ for Devious Devices NG functions Devious Devices SE https://www.loverslab.com/files/file/5878-devious-devices-se/ for Devious Devices functions Regular Edition Compatible No Install Instructions If You Are Updating From An Older Version If you are moving from Fotogen's original SL Triggers, you will need a new save. If you are updating from one version of SLTR (this mod) to a newer version, check the CHANGELOG, but I'll likely still recommend a new save. Regardless, especially for small version jumps, it doesn't hurt to try first without a new save. That said, I have often found that both Fotogen's and mine seem to be able to survive the following: - Save your game and quit Skyrim - Remove the old version - Run Skyrim, load your save, click through the warning, save, and quit again - Perform any necessary cleanup (e.g. some versions no longer understand old script formats like JSON) - Install the new version - Run Skyrim and enjoy your new version However, in case of support, if a problem persists beyond that, the next logical step would be to test on a new save if possible. If You Are Installing For The First Time Using MO2 Is Recommended I personally use (ModOrganizer2/MO2)[https://www.modorganizer.org/] and even then, often just through whichever modlist I'm using via (wabbajack)[https://www.wabbajack.org/]. If using MO2, dragging an SLTR install .zip into the downloads tab should be sufficient to make it available to install into your list. Similarly dragging it into your active load order should be sufficient to have it installed and running when you next play. It doesn't (at this time) have any particular load order requirements so feel free to move it about as you need. If, However, You Are Doing A Manual Install SLTR itself is a typical mod install with a SKSE plugin. It installs into Data\ as you would expect Once It Is Installed Once installed, you should now find in your 'mods' folder a new sub-folder, 'sl_triggers' (or whatever you named it during install). Mod logging output will appear in whichever folder SKSE is configured to output to. On a typical Windows 10 Steam install, for example, I think this ends up in your 'Documents\My Games\Skyrim Special Edition\SKSE\sl-triggers.log' folder. Generally I also send log output from Papyrus script through the plugin, so all log output should be located in that one file. The mod will be Enabled by default and all Debug features off. This will cause very little logging output. Even with all 'Debug' options off, during SLTScript parsing, if errors or important warnings or info need to be reported, they will be sent to that log. If your SLTScript isn't behaving as expected, check the log first. In game, if you are using the MCM to create new triggers, or as any new files are generated by SLTR (like new .json files if you create SLTScript that does so), they will be generated in the 'overwrite\' folder as for any mod; if you want to manage those files, you will need to manually copy them into whatever new location you want them in. The mod folder structure at install should look something like: interfaces\ - containing e.g. translation files scripts\ - containing compiled .pex files SKSE\ CustomConsole\ - config file for ConsoleUtil-Extended to provide improved console commands Plugins\ sl_triggers\ commands\ - pre-made SLTScripts you can link to triggers without having to do any coding commandstore\ - folder available for SLTScript usage as well as shared persisted files (other locations are not excluded) extensions\ sl_triggersExtensionCore\ - trigger definitions (JSON) for events handled by the 'Core' extension new triggers for the 'Core' extension will be created here (but may end up in your overwrite or other folder specified for output files) you can place your own JSON files (as long as the filename can be a valid string in the Skyrim Papyrus VM) here without needing to use the MCM this also allows you to share triggers created by others sl_triggersExtensionSexLab\ - trigger definitions (JSON) for events handled by the 'SexLab' extension new triggers for the 'SexLab' extension will be created here (but may end up in your overwrite or other folder specified for output files) similarly, this works for any extension; for now there are only 'Core' and 'SexLab' offered by the mod sl_triggersExtensionCore-attributes.json - DO NOT EDIT; JSON-based definitions for the SLTR MCM to handle Core triggers sl_triggersExtensionCore-libraries.json - DO NOT EDIT; JSON configuration for Core function libraries sl_triggersExtensionSexLab-attributes.json - DO NOT EDIT; JSON-based definitions for the SLTR MCM to handle SexLab triggers sl_triggersExtensionSexLab-libraries.json - DO NOT EDIT; JSON configuration for SexLab function libraries containers.json - JSON configuration for Containers (provides support for the Core trigger: On Player Activate Container) you can modify this file to add containers from other mods that will be detected; it includes some examples you can also define which containers will be considered "Common" for filtering purposes; some defaults are included sl-triggers.dll - SKSE plugin; CommonLibNG-SSE based; uses Address Library; should support most used versions source\ scripts\ - containing source .psc files for the .pex files sl_triggers.esp sl_triggers_CHANGELOG.txt sl_triggers_function_library.md - Markdown documentation for available SLTScript functions provided by SLTR (other functions may be provided by third party extensions and function libraries) sl_triggers_function_library.txt - Text documentation for available SLTScript functions provided by SLTR (other functions may be provided by third party extensions and function libraries) sl_triggers_sltscripts.txt - Basic information about SLTScript; for the best documentation visit the wiki. In-Game Configuration If you have SkyUI installed, you should have an MCM available as 'SL Triggers Redux'. Any extensions registering themselves with SLTR will be listed on the left. The main SLTR MCM screen has an 'Enabled' option (on by default), a 'Debug' option, and a number of Granular Debug options, all of which are off by default. All of the 'Debug' options will output to the log file and will absolutely impact performance, both of your SLTScript and likely the game itself. This can be useful when troubleshooting your scripts, but don't leave it on for general play. 5
hextun Posted April 30, 2025 Author Posted April 30, 2025 58 minutes ago, MannySauce said: Thanks from a smoothbrain. 👍 Are you kidding? You've been an awesome tester! And your scripts aren't exactly simple.
kamithemoon Posted April 30, 2025 Posted April 30, 2025 (edited) Neato! I've been using the original triggers (poorly, as I don't understand scripts) but it's a very useful mod nonetheless. Updates are always welcome. Just out of curiosity, would it be possible using these triggers to set up voiced responses? With all the audio packs out there, I'd love it if you and NPCs can detect when sex happens and the type of sex and play commentary before, during and after the act. Right now, the only mod that I'm aware of that has a similar feature is Sexist Guards, but it is a very large dialogue mod and by it's nature, only detects non-consensual acts performed on the player. But I got it working with a voice pack and it was awesomely immersive having my character promising bloody vengeance on the thing raping her. Update: Well, darn me. If I had just scrolled down a bit, I would have noticed someone had just released a mod that did exactly what I wanted lol! Edited April 30, 2025 by kamithemoon 2
hextun Posted April 30, 2025 Author Posted April 30, 2025 Soooo... for those of you who joined in the download frenzy when this first went up, v109 had a pretty big bug which will prevent any of the non baseline SLT script functions (i.e. all of SexLab) from working in the scripts. It doesn't affect SexLab itself or anything, it just means until you update to v110, commands like 'sl_isin' and such will not be recognized, nor will you be able to use the command libraries expansion feature. @kamithemoon Well, if there is a Papyrus API that will allow trigger of specific voice files (like with a string identifier or something), that seems like a good idea to expand the command set with. I'll look into it.
kamithemoon Posted April 30, 2025 Posted April 30, 2025 (edited) 41 minutes ago, hextun said: @kamithemoon Well, if there is a Papyrus API that will allow trigger of specific voice files (like with a string identifier or something), that seems like a good idea to expand the command set with. I'll look into it. Now that would be awesome! Looking at the other mod, I mentioned, I don't think it has quite all the features that I was looking for, which might be easier to implement with SL Triggers. I love me a bit of immersion and triggered voiced responses could be a really nice thing to have! Edited May 1, 2025 by kamithemoon
MannySauce Posted May 1, 2025 Posted May 1, 2025 I haven't gotten around to try out v109-v110, but I've written down some feature expansion stuff some time ago that I'm not sure is feasible or even a good idea overall, but; Would it be possible for operations (is that the correct terminology?) that check if a thing is true or not on a target, like 'actor_haskeyword' or the recent 'actor_isaffectedby', to have several use cases/modes which handle multiple parameters to; return 1 if at least one parameter is true. return 1 if ALL parameters are true. Example for at least one parameter, with fake magic effects: actor_isaffectedby one $self "calmeffect" "courageeffectweak" "courageeffectstrong" "thatalcoholstaminadebuff" if = 1 $$ underinfluence Example for all parameters, with fake keywords: actor_haskeyword all $partner "argonian" "male" "scaredexpression" "THEKEYISRIGHTTHERE" "bowconjurer" if = 1 $$ thatsjustderkeethus It just seems like a larger overhaul with potentially more pain than gain, if any, so I'm just throwing it out here for a quick yea/no. Also I'm not even sitting on a personal script idea for this anyway, but the concept kept bugging me.
hextun Posted May 1, 2025 Author Posted May 1, 2025 Variadic functions - Functions that can take a variable/arbitrary number of arguments. The mechanics are technically already supported; that is, aside from crashing your computer, there is nothing stopping you from creating an .ini script with a command plus as many arguments as you want to give it and the engine will do its best to oblige. It's just that up until now all functions have been written from the perspective of a fixed set of arguments. As for your specific ask, it appears, at least for the two (I keep using operation and function interchangeably and I'm sorry about that) functions that you want the syntax to go from strictly: actor_isaffectedby <actor variable> <MGEF> actor_haskeyword <actor variable> <keyword name> to: actor_isaffectedby <actor variable> <MGEF> <any|all> <actor variable> <MGEF> (<MGEF>...) actor_haskeyword <actor variable> <keyword name> <any|all> <actor variable> <keyword name> (<keyword name>...) I would suggest that the original case becomes 'any' and can accept any number of arguments, and then if the first argument is one of the strings "any" or "all" that mode is explicitly chosen. It's not a difficult change, though if you wouldn't mind providing a list of specific functions you are aware of that need this change. I've been delving in the guts but haven't spent a whole lot of time with the function library to date.
MannySauce Posted May 1, 2025 Posted May 1, 2025 (edited) 33 minutes ago, hextun said: Variadic functions - Functions that can take a variable/arbitrary number of arguments. The mechanics are technically already supported; that is, aside from crashing your computer, there is nothing stopping you from creating an .ini script with a command plus as many arguments as you want to give it and the engine will do its best to oblige. It's just that up until now all functions have been written from the perspective of a fixed set of arguments. As for your specific ask, it appears, at least for the two (I keep using operation and function interchangeably and I'm sorry about that) functions that you want the syntax to go from strictly: actor_isaffectedby <actor variable> <MGEF> actor_haskeyword <actor variable> <keyword name> to: actor_isaffectedby <actor variable> <MGEF> <any|all> <actor variable> <MGEF> (<MGEF>...) actor_haskeyword <actor variable> <keyword name> <any|all> <actor variable> <keyword name> (<keyword name>...) I would suggest that the original case becomes 'any' and can accept any number of arguments, and then if the first argument is one of the strings "any" or "all" that mode is explicitly chosen. It's not a difficult change, though if you wouldn't mind providing a list of specific functions you are aware of that need this change. I've been delving in the guts but haven't spent a whole lot of time with the function library to date. Yep, just like that. Though I don't have any specific functions in mind, pulled the examples out of my ass as I wrote - another "ok but what if" scenario during testing. But honestly actor_haskeyword or actor_infaction would not be bad ones to start with for toying around. 🤔 Also as a layman squinting my eyes at this, maybe it should have a parameter limit? Feels like after a certain point (if/when I get there) it just feels like a new dedicated function would be the sanest option when needed rather than me feeding the script a list of 100 entries just to msg_notify "oh shit, a rat". Of course this is just a case of needing self-restraint. Or me writing better scripts. 🤡 Edited May 1, 2025 by MannySauce crucial clown emoji was missing
hextun Posted May 1, 2025 Author Posted May 1, 2025 Nah, no parameter limits. I mean... firstly I would literally have to code them in, which is effort and I have allergies... maybe not to effort but still. And one can't be too careful when it comes to identifying rats. In other news, the next release is going to alter the .esp, removing some SPEL and MGEF records and also removing some properties from a couple of quests. I suspect folks will need a new save, but it shouldn't hurt to try. 1
Anunya Posted May 1, 2025 Posted May 1, 2025 This looks great. I hope folks will share their scripts here and - if I may suggest it and if it's not too much work - @hextun links to them in the main mod so they're easy to find. I used the original triggers for a few games and they were great. I'm really looking forward to what this version will bring
hextun Posted May 1, 2025 Author Posted May 1, 2025 New update: v111 PROBABLY-SAVE-BREAKING: cleaning up last bits of extension pools (should have done this pre 109); this changes the .esp, so I suspect you will need a new save (I mean, you can try) enhancement: added new ModEvent that SLT listens for sl_triggers_SLTRequestList AFormObject.SendModEvent("sl_triggers_SLTRequestList", "StorageUtilKey", (optional) 1.7 (yes, 1.7)) - when received, will populate a StorageUtil string list located at "StorageUtilKey" with the list of scripts - the list will be attached to the Form sender - if you specify 1.7 for the float value, the StorageUtilKey will be assumed to be a global value (i.e. not stored to the Form) - if you put a mod event name into the first element of the list before invoking this event, that mod event will be fired when the list is populated bugfix: the 'TopOfTheHour' layout was set to use the 'Keymapping' layout via a lovely little typo change: shipped script cleanup - recoded all .json shipped scripts as .ini - reformatted some of the .ini files to pretty them up a little - removed a few scripts referencing objects no longer shipped with the .esp - NOTE: IF YOU ARE UPGRADING, YOU WILL HAVE A BUNCH OF DUPLICATE SCRIPTS IN YOUR (for legacy purposes, incorrectly named) 'Data\SKSE\Plugins\sl_triggers\commands\' folder, because you already have the old .json versions I removed and will receive new .ini versions. Unless you have a preference for the .json versions, I would recommend you clean out your commands folder prior to updating.
mhgm Posted May 1, 2025 Posted May 1, 2025 Hi, Do you know if this mod has any incompatibility with Sexlab P+?
hextun Posted May 1, 2025 Author Posted May 1, 2025 53 minutes ago, mhgm said: Hi, Do you know if this mod has any incompatibility with Sexlab P+? Not that I'm aware of. I had used the original sl_triggers on the Masterstroke list which uses SexLab P+ and it worked fine. Nothing about the SexLab API or ModEvent interfaces was changed in the rearchitecture. The events fired have not changed to my knowledge and the API for the bits that there are currently functions for doesn't appear to have changed, though it's possible one of the functions is malfunctioning. There's no unit tests set up. Simplest thing would be to drop it on an existing save (should be fine), create a Begin SexLab trigger, and set it to something obvious like "Give Gold(10)", then go start a sex scene. If you get 10 gold at the start, you are up and running. 1
hextun Posted May 1, 2025 Author Posted May 1, 2025 Something else I was thinking about... patches and fixes. I ran into an issue somewhat recently with SexLab Disparity where a variable on a Papyrus script object was set incorrectly. I ended up creating a new release to fix the problem but also included a self repair patch that went to that object in memory and changed the value to the correct one. Imagine now other patches/fixes, little scripts that you could run to fix various issues. I recently added some functions (dd_unlockslot and dd_unlockall) that can be used to remove restraints when things have bugged out. You could script the fix to set Aela back to Nord from Werewolf when she gets stuck in some sex scenes. Can you think of any such patches or fixes that would be a good fit? With the keymapping and console command options you could run such scripts on demand, as needed.
hextun Posted May 1, 2025 Author Posted May 1, 2025 15 hours ago, kamithemoon said: Neato! I've been using the original triggers (poorly, as I don't understand scripts) but it's a very useful mod nonetheless. Updates are always welcome. Just out of curiosity, would it be possible using these triggers to set up voiced responses? With all the audio packs out there, I'd love it if you and NPCs can detect when sex happens and the type of sex and play commentary before, during and after the act. Right now, the only mod that I'm aware of that has a similar feature is Sexist Guards, but it is a very large dialogue mod and by it's nature, only detects non-consensual acts performed on the player. But I got it working with a voice pack and it was awesomely immersive having my character promising bloody vengeance on the thing raping her. Update: Well, darn me. If I had just scrolled down a bit, I would have noticed someone had just released a mod that did exactly what I wanted lol! It turns out SLT already has a function, snd_play, that takes a form identifier for the sound to play, and the actor from whom it should be played (e.g. $player). That would still require some digging to find the formIDs for the particular sound bites you want played but once you have them, that is your function of choice I think. Unless I'm missing some information.
Nalzt Posted May 1, 2025 Posted May 1, 2025 I set up the mod (v111, new save) in the simplest way possible, so that a command would trigger for the PC at the end of any sex, and tested most of the .ini commands. The following are working fine: Add perk point.ini Cast Calm.ini Cast Fear.ini Cast Light.ini Cry.ini DD Unlock All.ini Doomstone Lover.ini Give Gold(10).ini Harm (-100).ini Heal (+100).ini Heart beat (A).ini Lovers Comfort.ini Necks bitten(+1).ini Time Slow.ini The following didn't work for me: Alcohol.ini - nothing happened Disease.ini - nothing happened Eat (sweets).ini - nothing happened Heart beat (A).ini - the sound started playing, but wouldn't stop Sound - Levelup.ini - nothing happened Sex is crime.ini - I get the notification that I was reported, but my bounty didn't increase (I changed the condition to beginning of sex for this one) Change stats (bad/good/mix).ini - I get the notification, but my attributes stayed the same (note: the Skyrim symbol on screenshot is the "$" character in the font replacer I'm using) Learn skill (random/thief/mage/warrior).ini - nothing happened Is the issue just on my end? I have all the requirements installed.
hextun Posted May 1, 2025 Author Posted May 1, 2025 49 minutes ago, Nalzt said: I set up the mod (v111, new save) in the simplest way possible, so that a command would trigger for the PC at the end of any sex, and tested most of the .ini commands. The following are working fine: Add perk point.ini Cast Calm.ini Cast Fear.ini Cast Light.ini Cry.ini DD Unlock All.ini Doomstone Lover.ini Give Gold(10).ini Harm (-100).ini Heal (+100).ini Heart beat (A).ini Lovers Comfort.ini Necks bitten(+1).ini Time Slow.ini The following didn't work for me: Alcohol.ini - nothing happened Disease.ini - nothing happened Eat (sweets).ini - nothing happened Heart beat (A).ini - the sound started playing, but wouldn't stop Sound - Levelup.ini - nothing happened Sex is crime.ini - I get the notification that I was reported, but my bounty didn't increase (I changed the condition to beginning of sex for this one) Change stats (bad/good/mix).ini - I get the notification, but my attributes stayed the same (note: the Skyrim symbol on screenshot is the "$" character in the font replacer I'm using) Learn skill (random/thief/mage/warrior).ini - nothing happened Is the issue just on my end? I have all the requirements installed. I'll get crackin' I haven't been as thorough about regression testing as I should have been; looks like I have some test scripts to write. And I suppose it's time I started looking for some sort of Papyrus unit testing framework. Probably a google search away this whole time... ... okay, so yeah, options turned up pretty quickly.
hextun Posted May 1, 2025 Author Posted May 1, 2025 (edited) 4 hours ago, Nalzt said: Is the issue just on my end? I have all the requirements installed. I've been looking at the state of the CmdLibSLT and regarding whether the issue is just on your end? No, sir. No it is not. Upcoming update soon-ish. And by update I mean bug fix. And by bug fix I mean a Raid defogger is going to go off in the source code. I should clarify before causing an unnecessary panic. I picked this codebase up roughly a week ago and although I've been programming for a long time, this is my first significant Skyrim mod development. I'm having a blast, but the architecture has been modified roughly 3 times I think since I started, and I have moved the implementation of all of the functions around and had to alter them to accommodate these changes. Unfortunately some of my assumptions were wrong and as I'm going through I'm seeing subtle issues throughout. Easy to fix now that I'm going through all 2000 lines of code *cough*, but... you know... 2000 lines of code is why I haven't to date. I am also taking this time to mark up the code to hopefully make generation of documentation easier. I'm at about line 750, so yay, but I figured I should let folks know. Sorry for the mess, but I hope to have things settled soon! Edited May 2, 2025 by hextun
hextun Posted May 2, 2025 Author Posted May 2, 2025 Update: I've worked out the issue and I'm working on a fix for the key issues. It's to do with the rearchitecture to support extensions. I got a little overambitious with my custom resolver implementation and realized I needed to actually take a simpler approach. I am also in the process of creating an .ini regression test script (or set of scripts depending on how long they take to run). I also met a random dude who offered me a toke on one of my walks. That was nice. Suuuuper rare here too. I expect a new release new later than Sunday, perhaps earlier depending on how things go. In the meantime enjoy our snack bar, have a go in our casino, or get a little carefree in our downstairs dance club. Mind the illithid.
PenBoozerX Posted May 2, 2025 Posted May 2, 2025 Picked this up, but I think like half of the premade scripts don't do anything?
hextun Posted May 3, 2025 Author Posted May 3, 2025 5 hours ago, PenBoozerX said: Picked this up, but I think like half of the premade scripts don't do anything? See my post directly above yours. During the process of rearchitecting, I introduced some subtle bugs due to some overengineering. I'm in the process right now of undoing that, simplifying the approach, and creating a regression test script to prevent these sorts of issues going forward. I currently plan to have an update by Sunday evening but possibly sooner. Things are looking good right now. I can't believe I just said that. In the meantime, don't forget to tip your waitress. 1
Raid001 Posted May 3, 2025 Posted May 3, 2025 I am not an English speaker so please allow me to post through a translation. First of all, thanks for providing this great mod. I have a question: can this mod trigger the SlaveTats overlay like LE's SexlabUtil does? Or are there plans to implement a triggering feature in the future? I look forward to seeing this mod develop further.
hextun Posted May 3, 2025 Author Posted May 3, 2025 Alright, v112 dropped, with fixes. Many, many... many fixes. And some rearchitecture. And not a little bit of cursing and swearing. This release addresses the issues reported about failing functionality; entirely my fault, as I've been lax on testing, and the limited testing I had been doing had been working, leading me to believe things were working better than they were. And then you download it and are all like "this guy doesn't know what he's doing" and really I do I just don't always do all of it when I don't have to or think I'm "on top of it". You would think I would have learned by now (we are never actually "on top of anything"). Library extension is still a thing and just as easy as always, BUT... custom resolvers (i.e. introduction of new operators (like +, -, !=), variables (like $self, $player), or variable types (i.e. $23, $g89) will require an extension be created. The performance just wasn't there, and I spent more time than I would like to admit trying to shave 3/4 of a second off of a 2 second execution time. Rabbit holes can be fun. I do apologize for having released such a horrifically buggy release; no one needs to waste their time with broken code. As I've said, I'm taking steps to be able to more easily detect issues going forward and even included a couple of scripts in the release in case you wanted to play with them. Although I have spent a lot of time testing today, I'm still a little anxious; would love to hear back from anyone as to how v112 is doing for them. 2
hextun Posted May 3, 2025 Author Posted May 3, 2025 On 5/1/2025 at 3:05 PM, Nalzt said: I set up the mod (v111, new save) in the simplest way possible, so that a command would trigger for the PC at the end of any sex, and tested most of the .ini commands. The following are working fine: Add perk point.ini Cast Calm.ini Cast Fear.ini Cast Light.ini Cry.ini DD Unlock All.ini Doomstone Lover.ini Give Gold(10).ini Harm (-100).ini Heal (+100).ini Heart beat (A).ini Lovers Comfort.ini Necks bitten(+1).ini Time Slow.ini The following didn't work for me: Alcohol.ini - nothing happened Disease.ini - nothing happened Eat (sweets).ini - nothing happened Heart beat (A).ini - the sound started playing, but wouldn't stop Sound - Levelup.ini - nothing happened Sex is crime.ini - I get the notification that I was reported, but my bounty didn't increase (I changed the condition to beginning of sex for this one) Change stats (bad/good/mix).ini - I get the notification, but my attributes stayed the same (note: the Skyrim symbol on screenshot is the "$" character in the font replacer I'm using) Learn skill (random/thief/mage/warrior).ini - nothing happened Is the issue just on my end? I have all the requirements installed. I was able to set up and run all of the scripts you mentioned (well, I did a selection from the learn skills) and they worked for me with v112, so I believe an update will fix you up. And again, the problem was entirely mine. Just a bit of a trainwreck, ol' v111.
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