Jump to content

Recommended Posts

Posted (edited)
18 hours ago, hextun said:

 

So, the 67221051 came from the original, and apparently included the mod index but excluded the highest order bits. Anyhow, I'm a dumbass that forgot that since po3 is a requirement for SLTR, you have access to editorIDs. Because of the regularity of the labels and editorIDs, I was able to (hopefully correctly) convert all of the values to appropriate editorIDs. This means it should now be functional for either ESP or ESL versions.

 

As for SexLab vs OStim, I was able to alter HumanVials.sltscript so that it checks for the existence of both $system.partner and $system.ostim.partner and uses the first it finds that is set. Unfortunately CreatureVials.stlscript relies on a SexLab dependent feature of actor_race to retrieve the race of creatures, so without SexLab installed, I don't think that script will work. Mind you, with both OStim and SexLab installed, an OStim scene would work with it. I need to investigate this and see how to obtain parity here.

 

Anyhow, here's the latest converted scripts. Let me know how they work; if they do, I'll post them to the script-hole.

CumAlchemy-SLTR-ESP-ESL.zip 3.37 kB · 3 downloads

Everything works so far. 
Except for one thing,. I play as female. In ostim the vial is given when female player orgasms not the male. It should give vial when Male reach orgasm and ignore for female. 
for Sexlab, since the orgasm is played at last stage for everyone, It is not a problem for me.
any suggestions?
also what does your other script 'Give Vial_v1.66.sltscript' Do? is it the same or more function added?

Edited by Edzio
Posted

I'm not seeing it, but I figure I might be missing something, so I figured I'd ask:

 

Is there a way to trigger an event when the player attempts to steal something? Particularly, from a non-hostile actor who isn't eligible to report them?

 

Thanks,

Posted
On 8/18/2025 at 8:25 AM, hextun said:

 

Hah, good point, I guess I didn't really say what sl_startsex is exactly. :)

Here's the SexLab doc-header:

; sltname sl_startsex
; sltgrup SexLab
; sltdesc Starts a SexLab scene and returns the threadid
; sltargs Form[] list: actors: Form[] list containing the Actors to be in the scene, limited to 5
; sltargs Form: submissive: Form (Actor) to be the submissive in the scene; specify 'none' if no submissive to be set; must also be in the actors list
; sltargs string: tags: (From the SexLabFramework source) AnimationTags [OPTIONAL], is the list of tags the animation has to have. You can add more than one tag by separating them by commas "," (Example: "Oral, Aggressive, FemDom"), the animations will be collected if they have at least one of the specified tags.
; sltargs bool: allowBed: true to allow bed use, false otherwise
; sltsamp sl_startsex $actorList none "Oral, Anal" false
; sltsamp ; starts a sex scene with the given actor list, no victims, oral or anal tagged only, with no beds allowed
; sltsamp sl_startsex $actorList $actorList[0] "Vaginal" true
; sltsamp ; starts a sex scene with the given actor list, the first on the list being the submissive, vaginal tagged only, beds allowed


And the SexLab P+ version doc-header:

; sltname sl_startsex
; sltgrup SexLab P+
; sltdesc Starts a SexLab scene and returns the threadid
; sltargs Form[] list: actors: Form[] list containing the Actors to be in the scene, limited to 5
; sltargs Form: submissive: Form (Actor) to be the submissive in the scene; specify 'none' if no submissive to be set; must also be in the actors list
; sltargs string: tags: (From the SexLabFramework source) Requested animation tags (may be empty). Supported prefixes: '-' to disable a tag, '~' for OR-conjunctions
; sltargs                Example: "~A, B, ~C, -D" <=> Animation has tag B, does NOT have tag D and has EITHER tag A or C 
; sltargs int: furniture: 0 - Disable, 1 - Allow, 2 - Prefer
; sltsamp sl_startsex $actorList none "Oral, Anal" 0
; sltsamp ; starts a sex scene with the given actor list, no victims, oral or anal tagged, with no beds allowed
; sltsamp sl_startsex $actorList $actorList[0] "Vaginal" 1
; sltsamp ; starts a sex scene with the given actor list, the first on the list being the submissive, vaginal tagged, beds allowed but not necessarily preferred


Slight difference regarding tags and bed/furniture. Both use lists (this actual function, StartSex, was what first spiked my drive to implement lists, funnily enough; this request has been on the list for awhile).

 

It's a new SLTScript function that will allow you to initiate a SexLab scene by providing:
- the list of Actors
- an optional submissive
- a single string containing zero (i.e. empty string) or more tag designations (like Oral, Anal) but as you can see the formatting changed between versions
- an indicator for bed/furniture use (also changed between SexLab versions)

 

Note that this does no validation: if you pick an actor already in a scene, your call won't work. There are other APIs to help find and validate potential SexLab scene actors, and of course you can use SLTScript to do some of the checks already (i.e. sl_isin). Thus me talking about maybe adding those APIs as well.

 

In fact, in this next release I will be updating the SexLab P+ version to eliminate as many of the deprecated API usages as I can. Currently the only one I haven't been able to convert is sl_animname. SexLab P+ took a philosophy of isolating a developer from needing to work directly with animations; as a result, while you can still get the animation name, that's only until they remove access to the now deprecated approach needed to obtain it. Also, the return values of some functions differ. Docs are updated to reflect this.

 

Anyhow, yup, slap this bad boy into an SLTScript and you can trigger it however you like. 

 

On to your idea: I love the mini-game (mini-mod?) idea. :) I'll point out that SRM is a great mod, one that is in one of my test modlists. There are also a number of mods that will initiate sex, including the SexLab P+ Matchmaker.  But yes, especially now that I'm thinking about an SLTScript function to try to force combat, one could create a single set of SLTScripts that can encapsulate much of the logic of many mods.

 

It's been mentioned upstream to have a place where users can share scripts. I'll go further and say that if anyone has an implementation of an addon for SLTR (like these mini-mods or the PetCollarGame mini-game), post it here. I'll give it a look and we (anyone) can discuss it. I'll be happy to help, but a big part of me working to build up a scripting engine is to encourage others to create scripts as well. If it looks like something I'd be willing to take on and support, I'll include it in the github repo, in the extern/add-ons or extern/libraries folder, where I keep things like add-ons (e.g. test scripts, the PetCollar game, or any other mini-mod/mini-game I end up including) and libraries (e.g. the extensions and function libraries that either add integration with mods like SexLab and OStim to support triggers, or that just add new SLTScript functions, like the sexlab-dependencies library and the adult-general library). At that point it would be my obligation to support going forward and would be available in the FOMOD for installation. I would, of course, include attribution if desired. :)

 

Back to your idea; conceptually:
- any settings needed can be accessed via json_* calls and thus persisted (and editable out of game) via json in something like the commandstore folder
- sl_startsex accepts an optional 'submissive' parameter, matching the SexLab API; thus con/non-con
- I expect this would be using something like the Timer trigger, so probability would just be using rnd_int or rnd_float in script
- defining sequences for scene: the SexLab (not P+, but it supports lists of "scenes" and "stages" I think, but I still haven't figured out how to work with them) API supports this, but at the moment I had only implemented the equivalent of the quickstart call, which is solely tag driven; i.e. "just play something that runs Oral or Vaginal". As opposed "okay, start with this foreplay scene, but let's extend with a second foreplay scene, now add these three and this finisher". Or is that not what you were looking at?
- I need to review the function library with regard to functions to find nearby actors; now that lists are available, that should open up new options
- depending on what you want to have happen, you could have multiple smaller scripts all set to trigger on specific events/filters: on cell change, location change, on hit, sex start, orgasm
  - in those short scripts you do calculations and update flags
    - these would be best used only for tracking specific transitions (i.e. you get an increased chance at amory as a werewolf; on transition, increase player's initiation percent by 10, and during nighttime by an additional 10 (two global variables in this case))
  - then one script set to run on a timer
    - can do the baseline time based checks (i.e. if current stamina is < 25% max, decrease amory chance; this would last until the next timer run, which would be more coarse than most mods like SLD)
        - you could work around the 1 minute granularity by creating a script that is designed to run indefinitely, launched on session start, that checks a global at start and exits if it's found (to prevent multiple copies running)
            - have it sit in sub-minute util_wait loop updating flags
            - be careful not to make the loop to short to prevent thrashing
                - I mean, leaving an SLTRScript to run indefinitely without a wait timer somewhere in there just feels not great; like do you really need that high of a frequency of an update?
                    - SexLabDisparity does a LOT to optimze here for example
                        - how many indents will he use?
                            - this many
    - checks flags and behaves accordingly
- CHALLENGE: no UI/MCM for configuration; no UI for in-game display beyond simple message notification (no HUD for example)
- CHALLENGE: overall design; conceptually SLTR has all (or at least is close to having all) of the pieces, but the approach I outlined above was my bleary morning thoughts; it may be an awful approach and there are lot of moving parts to consider; probably :)
- CHALLENGE: performance concerns
    - e.g.: if you place a timer set to run every minute and it's doing enough processing to last beyond 1 minute, you're likely going to have a bad time

 

@Fraying9981, what are your thoughts?

 

thanks for your detailed reply and sorry for my late reply!

 

It's helpful to know the limitations, especially on timers.

Can you suggest a basic script I can start working on that does the following?

1. registers a couple of keys, lets say A, B, C

2. pressing one key increases enjoyment by X and reduces player stamina by Y. Question: the 'press key' logic reacts to single keystroke or continuous key stroke? Ideally long press would count as repeated triggers. 

3. pressing a key emits a sound. Question: does this sound need to be an already existing/referenced SL sound? or can you add sounds to SL triggers folder that can be referenced?

4. pressing a key changes animation

 

 

Also, I was wondering how easy it is to do the following:

1. define a timer at the beginning of the scene

2. end the scene no matter what when the timer is done.

 

And, separately:

1. build a list of animations

2. use a key to cycle through them

 

Thanks for your inputs!

Posted
On 8/2/2025 at 9:28 PM, nopseudomoi said:

Hello, would it be possible to add independent race filters?
This would allow for example having argonians be abused by nords in windhelm, orcs abusing non orcs guests, nords abusing elves in conquered stormcloack cities, and so on

Hello!

Bumping this request, is it possible through rules already?

Posted
49 minutes ago, nopseudomoi said:

Hello!

Bumping this request, is it possible through rules already?

 

I think there is a code snippet for that in the club/somewhere recent in the the thread.

Posted

I have a series of noobish questions:

 

Question 1:

 

In the user interface, I can trigger a bunch of events relating to the the Pet Collar. There's equipping and unequpping the Pet Collar (keyless or not keyless), which I think are pretty self explanatory. But there's also "Pet Collar Game". What does the Pet Collar Game script do when triggered? Is it simply add Pet Collar if it's not there, and remove it if it is?

 

Question 2:

 

Where are the default .ini scripts located? I'd like to open them and look at them to see if I can figure out how to write my own simple .ini scripts.

 

Question 3:

 

If I wanted to have an event that simple printed a text string (in the upper left screen corner, as I think is traditional), what would that look like? I've found that for a lot of these type of things, I find a little bit of text helps my immersion as it underscores what's happening - so I'd like to add that to the events I'm going to use.

 

Question 4:

 

Is there a collection somewhere of scripts / events / additional triggers that people have written that others can potentially download and use?

Posted
On 10/8/2025 at 8:10 AM, Fraying9981 said:

 

thanks for your detailed reply and sorry for my late reply!

 

It's helpful to know the limitations, especially on timers.

Can you suggest a basic script I can start working on that does the following?

1. registers a couple of keys, lets say A, B, C

2. pressing one key increases enjoyment by X and reduces player stamina by Y. Question: the 'press key' logic reacts to single keystroke or continuous key stroke? Ideally long press would count as repeated triggers. 

3. pressing a key emits a sound. Question: does this sound need to be an already existing/referenced SL sound? or can you add sounds to SL triggers folder that can be referenced?

4. pressing a key changes animation

 

 

Also, I was wondering how easy it is to do the following:

1. define a timer at the beginning of the scene

2. end the scene no matter what when the timer is done.

 

And, separately:

1. build a list of animations

2. use a key to cycle through them

 

Thanks for your inputs!

 

Sounds like you might be trying to add a bit of interactivity to SexLab/ P+ sex using triggers. I wish you good luck, and request that you share your results if you can make it work :) 

Posted
5 hours ago, Anunya said:

 

Sounds like you might be trying to add a bit of interactivity to SexLab/ P+ sex using triggers. I wish you good luck, and request that you share your results if you can make it work :) 

 

Yes i've been trying for some time now and hextun has been super helpful. I'm a bit of a perfectionist so after trying and testing, I'm still not satisfied with the result and haven't shared anything, but I hope I can soon.

Posted
3 hours ago, Fraying9981 said:

 

Yes i've been trying for some time now and hextun has been super helpful. I'm a bit of a perfectionist so after trying and testing, I'm still not satisfied with the result and haven't shared anything, but I hope I can soon.

 

Sounds great, I'm looking forward to whatever may come out of this :) 

Posted (edited)

So I rewrote the Follower Slavery Mod Script's for Redux, they did need a bit of tweaking, for best results they should be set at scene start.

 

Also is there any place where people are sharing scripts for this new version, going through the thread is a bit cumbersome.

 

And coming from the last thing I asked in the old triggers thread, is there a way for redux to resolve a leveled list and then equip and item from it? Last time I tried to do this in regular triggers it just added the actual leveled list to the target NPC's inventory, which is not what I actually want.

 

Also also, how can I get msg_notify to display an actor name, I was trying to use actor_display_name and variable but I wasn't getting what I want, should I use getname?

 

what I want is

 

msg_notify $actorname "some other text" $actor2name

 

but that syntax appears incorrect or at least it doesn't get me what I want.

 

FSMScripts.7z

Edited by ttpt
Posted

Could someone please advise how to set a hostile actor to become non-hostile/allied after sex? I've tried adding factions but either I'm using the wrong one or I wrote it wrong.

 

Using actor_addtofaction $partner "skyrim.esm:369060" 1 didn't seem to work for me.

Posted

Hiya folks. Been awhile. I've had a lot on my mind of late and SLTR has taken a lower priority.

 

Let's see.... responses...

 

A Place To Share Scripts

@ttpt I am encouraging folks to share scripts at 

 where you can create essentially a thread/post per script. That should allow folks to find individual scripts by search and keep discussion and updates isolated.

 

AddToFaction

@borrims

7 hours ago, borrims said:

Could someone please advise how to set a hostile actor to become non-hostile/allied after sex? I've tried adding factions but either I'm using the wrong one or I wrote it wrong.

 

Using actor_addtofaction $partner "skyrim.esm:369060" 1 didn't seem to work for me.

 

There is no actor_addtofaction; if you see documentation for such, please point it out to me. There is, however, the following:

 

actor_doconsumer $system.partner AddToFaction "skyrim.esm:369060"

 

assuming, of course, that that points to a valid faction.

 

I'm guessing you are attempting to use/convert code from an extension of the original (or a different fork I suppose).

 

 

@Anunya Pet Collar Game

If you enable the "Pet Collar Game" in the FOMOD installer, and have the PetCollar mod installed, additional SLTR items will be installed, including a new command (PetCollarGame.sltscript), a new trigger (PetCollarGame.json) that will run at sex start, and a new json in commandstore (pet_collar_game.json) that has some configuration options within. Essentially each time you have sex (configurable: with only a follower or with anyone) there is a (configurable, increasing per sex event) chance that player will either be collared or freed from the keyless collar. A little message is output to let you know when it occurs.

 

I like the PetCollar mod, but the keyless version I felt needed some love and an excuse to use. So why not have your follower (or just the citizens of Skyrim in general) continue to play a little game with the Dragonborn, every now and again latching the collar on or taking it off if it's been on for awhile.

 

Shipped SLTScripts

Scripts are written with an .sltscript extension now, though .ini is still recognized and parsed the same. Still, what you are looking for can be found in the installed mod folder under 'SKSE/Plugins/sl_triggers/commands'. If you select additional features from the baseline that add .sltscript files, they will still go there.

 

Printing a Message in the Upper Left Screen Corner

The command you are looking for is msg_notify, as in:

 

msg_notify "Hello world!"

 

And to do this, you would put it into e.g. "HelloWorld.sltscript" in the commands folder alongside the other commands (or, better yet, in MO2, create your own empty mod and place this content there so you don't lose it during updates) and then, from the desired trigger in the MCM, select the "HelloWorld" script for execution. At that point it's just a matter of selecting from the available triggers. :)

 

Collection of Written Scripts
So far, not yet. That said, I have created

to facilitate such sharing. And of course, there are the scripts that have been posted in this support thread. Finally, many older scripts from the original sl_triggers work with minor updates, the instance above notwithstanding. :)

 

@nopseudomoi Race-Specific Template

Yep, check out 

 

 

Posted
On 10/7/2025 at 4:45 PM, sedoacsltwwloqrddi said:

I'm not seeing it, but I figure I might be missing something, so I figured I'd ask:

 

Is there a way to trigger an event when the player attempts to steal something? Particularly, from a non-hostile actor who isn't eligible to report them?

 

Thanks,

 

I haven't set up "on steal" triggers, but that sounds like a good option. :)

Posted
On 10/8/2025 at 10:10 AM, Fraying9981 said:

 

thanks for your detailed reply and sorry for my late reply!

 

It's helpful to know the limitations, especially on timers.

Can you suggest a basic script I can start working on that does the following?

1. registers a couple of keys, lets say A, B, C

2. pressing one key increases enjoyment by X and reduces player stamina by Y. Question: the 'press key' logic reacts to single keystroke or continuous key stroke? Ideally long press would count as repeated triggers. 

3. pressing a key emits a sound. Question: does this sound need to be an already existing/referenced SL sound? or can you add sounds to SL triggers folder that can be referenced?

4. pressing a key changes animation

 

 

Let's see:

- key handling is per key press (i.e. key down), and while the original papyrus script does support press duration, it's not exposed in SLTScript. So for multiple hits you would need multiple taps.
- key handling is also on a 0.5 second window, meaning it's more of a "were any of the relevant keys pressed in the last half second" because of how it is implemented, in a loop with a half second wait timer, checking for key presses or end of scene
- so as currently implemented, you could do a "you have a 0.5 second cooldown per enjoyment change attempt" but the ability to spam the key for multiple rapid hits is not currently implemented
- sounds need to exist, which is to say, SLTR has no way to just be pointed at e.g. an .ogg and have it play. See the "Heart beat(A).sltscript" script for an example.
- I only have a limited subset of the animation functions bound for SexLab/SexLab P+


I'll do a little more digging, because I like the track you're laying down. :) I too think an SLTR/SLSO game is possible and just haven't put the time in on the animation bindings.

set $key_increase_enjoyment 72 ; no idea which one this is
set $key_advance_anim 80 ; you said keys A, B, and C so I'm assuming you will need multiple, just list them here

listadd $listen_keys $key_increase_enjoyment $key_advance_anim

[waitloop]
; I'm assuming this is SL related, so use sl_waitforkbd instead of util_waitforkbd
sl_waitforkbd $system.player $listen_keys
set $key_found $$

if $key_found == $key_increase_enjoyment
    ; more SLTScript bindings needed for SexLab scene enjoyment
    ; I have some for SLSO, which is obviously missing the point
    ; It's not really exposed in SLP+ as I recall, but again, warrants investigation
elseif $key_found == $key_advance_anim
    ; believe it or not, more SLTScript bindings needed for SexLab animation related functionality
endif

; verify scene ended and if so, exit the script
sl_isin $system.player
if $$ == false
    goto [waitloop]
endif

; you could print a message here if you wanted, like a summary of what they did here?
return


 

 

On 10/8/2025 at 10:10 AM, Fraying9981 said:

 

Also, I was wondering how easy it is to do the following:

1. define a timer at the beginning of the scene

2. end the scene no matter what when the timer is done.

 

And, separately:

1. build a list of animations

2. use a key to cycle through them

 

Thanks for your inputs!

 

I am lacking required bindings here. For example, while I did create the sl_startsex functions, which return, as I recall, the thread id, it now seems reasonable to see about creating sl_endsex functions if possible. Or just exposing more SL thread related functions generally. There's definitely interest here but I'm a little beat at the moment. :/

 

Same thing with animation cycling. I created some rudimentary animation related functions, and even went so far as to implement SLTScript Aliases to handle ReferenceAliases returned as part of the SL animation frameworks, but never actually implemented the bound functions intended to use them. :P  If those get created (doesn't have to be by me) then it would open up exactly the scripts you're talking about.

Posted
On 10/4/2025 at 10:44 AM, Edzio said:

Everything works so far. 
Except for one thing,. I play as female. In ostim the vial is given when female player orgasms not the male. It should give vial when Male reach orgasm and ignore for female. 
for Sexlab, since the orgasm is played at last stage for everyone, It is not a problem for me.
any suggestions?
also what does your other script 'Give Vial_v1.66.sltscript' Do? is it the same or more function added?

 

I'll check into this. That was a rewrite of the original that someone donated for original sl_triggers. I think one was meant for humanoids and the other to include creatures? Also, if I recall, it uses SexLab functions for some things, so the creature version wouldn't work anyway. I thought I had posted an OStim specific version somewhere (or thought hard enough about it I thought I had), but again, for the creature version there is no alternative that I'm aware of.

Posted

@hextun - thanks for the reply and - as I've started dipping my toes into I'd like to thank you for the wiki. It's very thorough and informative, you must have put a lot of work into it.

 

Also, I agree completely about giving the Pet Collar some love. When (if) I get a bit more comfortable with basic events and triggers, I'm pretty sure I'll write something to make the Pet Collar work the way I like in my game, which I'm pretty excited about.

 

One question though - I'm trying to undress my player character as part of a scripted event. As far as I can tell, there's item_unequipex but it removes a specified item in the relevant slot. I'd like to remove whatever is in the specified slot (or maybe just call SexLab's strip effect).

 

... I suppose I could go hunting through all my many installed LL mods and see if one of them has a "target player undress" spell I can call, but if there's a convenient function instead I think I'd prefer that :) 

Posted
2 hours ago, Anunya said:

@hextun - thanks for the reply and - as I've started dipping my toes into I'd like to thank you for the wiki. It's very thorough and informative, you must have put a lot of work into it.

 

Also, I agree completely about giving the Pet Collar some love. When (if) I get a bit more comfortable with basic events and triggers, I'm pretty sure I'll write something to make the Pet Collar work the way I like in my game, which I'm pretty excited about.

 

One question though - I'm trying to undress my player character as part of a scripted event. As far as I can tell, there's item_unequipex but it removes a specified item in the relevant slot. I'd like to remove whatever is in the specified slot (or maybe just call SexLab's strip effect).

 

... I suppose I could go hunting through all my many installed LL mods and see if one of them has a "target player undress" spell I can call, but if there's a convenient function instead I think I'd prefer that :) 

 

Binding the SL strip functionality is on my todo. Basically it takes your settings (i.e. which slots to strip etc) and performs the strip, returning an Armor[] containing the stripped items. There is an unstrip function IIRC which you would pass that list to and it reclothes you.

 

 

<deleted pseudo-code to prevent folks from believing I have it implemented>

 

I was going to show you what it would look like. Suffice to say, one line to retrieve and store the list of items, another call to reequip, is what I expect. :)

 

Posted
12 hours ago, hextun said:

AddToFaction

@borrims

 

There is no actor_addtofaction; if you see documentation for such, please point it out to me. There is, however, the following:

 

actor_doconsumer $system.partner AddToFaction "skyrim.esm:369060"

 

assuming, of course, that that points to a valid faction.

 

I'm guessing you are attempting to use/convert code from an extension of the original (or a different fork I suppose).

 

Thank you, I think that did the trick!

Posted
1 hour ago, hextun said:

 

Binding the SL strip functionality is on my todo. Basically it takes your settings (i.e. which slots to strip etc) and performs the strip, returning an Armor[] containing the stripped items. There is an unstrip function IIRC which you would pass that list to and it reclothes you.

 

 

<deleted pseudo-code to prevent folks from believing I have it implemented>

 

I was going to show you what it would look like. Suffice to say, one line to retrieve and store the list of items, another call to reequip, is what I expect. :)

 

 

Looking forward to it.

 

Right now I'm working with Estrus and for whatever reason, when I trigger Estrus it interacts with the PC fully clothed which is... less fun. So this will help :)

 

Another question as I'm poking at this...

 

Am I correct in understanding that if you want to add triggers, you'll have to do Papyrus or JSON scripts?

 

I'd love to be able to trigger scripts off some of the various sltscript functions - like if a specific spell is cast on the player; if they reach a particular level of arousal or stamina; if they equip a particular type of equipment; and so on.

Posted
14 hours ago, Anunya said:

 

Looking forward to it.

 

Right now I'm working with Estrus and for whatever reason, when I trigger Estrus it interacts with the PC fully clothed which is... less fun. So this will help :)

 

Another question as I'm poking at this...

 

Am I correct in understanding that if you want to add triggers, you'll have to do Papyrus or JSON scripts?

 

I'd love to be able to trigger scripts off some of the various sltscript functions - like if a specific spell is cast on the player; if they reach a particular level of arousal or stamina; if they equip a particular type of equipment; and so on.

 

How New Triggers Are Made

*mumbles something about mommy and daddy triggers loving each other very much* Essentially all a trigger is, for SLTR purposes, is an agreement that "when this occurs, I'll give you a chance to define one or more SLTScripts to run". Generally that's going to involve, at minimum, doing some Papyrus development (write and compile) to patch something in that calls SLTR to run a script on a target. I suppose if a mod existed that let you define, via text inputs, an event to be sent in response to something else, you could create an event to send to SLTR, meaning that that would allow you to run SLTScript without having written/compiled Papyrus; but said mod would have to exist and you would still be limited to whatever events the mod author was running against.

 

No, generally, you (as I have) would need to create something like a Quest with a script extending Quest, and then:

- if the trigger is based on an event, create an event handler and run your script

- if the trigger is condition based (i.e. health is low, magicka is maxed, currently stealthed) I would suggest creating a simple polling timer, set to run as frequently as you want updates (i.e. if you're okay with health status only being checked once per second, then there's no need to poll two times per second), along with a state flag, and if the state changes, fire the event; this is an edge-state trigger

 

If your Quest extends sl_triggersExtension and performs the requisite setup, you'll get MCM support for your trigger as well.

 

This is the most unfortunate aspect here; there are just too many cool points where it would be neat to be able to run an SLTScript, but they each require a not insignificant amount of work to hook up. So it's not "quite" trivial to add them. Like, simple but annoying, you know? Boilerplate.

Posted

A note: Has anyone gotten the $system.partner variables to work for the latest version of SL P+? (2.16.0) ? Whenever I use, e.g:

 

actor_doconsumer $system.partner ModActorValue MagickaRate 10

 

or even

 

set $partnerName resultfrom actor_name $system.partner
msg_notify $"{$partnerName} is exhausted..." 

 

The script seems to fail silently; I don't see anything in the log indicating why. If replace $system.partner name with a placeholder, the text appears with the placeholder.

 

initialScriptName(AfterSex.sltscript) cmdLine(msg_notify), ("{$partnerName} is exhausted...")
[2025-10-22 07:47:38.991] [log] [info] [sl_triggers.cpp:751] SLTR:(AfterSex.sltscript)[2]: RunCommandLine values before: for cmdLine(msg_notify), ("{$partnerName} is exhausted..."): currentLine(1) totalLines(3) currentScriptName(AfterSex.sltscript) initialScriptName(AfterSex.sltscript)
[2025-10-22 07:47:38.991] [log] [debug] [sl_triggers.cpp:743] SLTR:(AfterSex.sltscript)[2]: Cmd.RunCommandLine
[2025-10-22 07:47:38.991] [log] [debug] [sl_triggers.cpp:743] SLTR:(AfterSex.sltscript)[2]: Cmd.RunScript: Resolve(msg_notify) => [msg_notify]
[2025-10-22 07:47:38.994] [log] [debug] [sl_triggers.cpp:743] SLTR:(AfterSex.sltscript)[2]: Cmd.RunScript: RunOperationOnActor(msg_notify), ("{$partnerName} is exhausted...")
[2025-10-22 07:47:39.024] [log] [info] [sl_triggers.cpp:751] SLTR:(AfterSex.sltscript)[2]: {$partnerName} is exhausted...
[2025-10-22 07:47:39.074] [log] [info] [sl_triggers.cpp:751] SLTR:(AfterSex.sltscript)[2]: RunCommandLine result: (CLRR_ADVANCE:1) for cmdLine(msg_notify), ("{$partnerName} is exhausted..."): currentLine(1) totalLines(3) currentScriptName(AfterSex.sltscript) initialScriptName(AfterSex.sltscript)
[2025-10-22 07:47:39.074] [log] [debug] [sl_triggers.cpp:743] SLTR:(AfterSex.sltscript)[2]: CLRR_ADVANCE; incrementing currentLine

 

 

Posted
10 hours ago, hextun said:

 

How New Triggers Are Made

*mumbles something about mommy and daddy triggers loving each other very much* 

 

LOL

 

10 hours ago, hextun said:

This is the most unfortunate aspect here; there are just too many cool points where it would be neat to be able to run an SLTScript, but they each require a not insignificant amount of work to hook up. So it's not "quite" trivial to add them. Like, simple but annoying, you know? Boilerplate.

 

I suspected as much, thanks for the breakdown.

 

That's unfortunately beyond my level to do, so I suppose all I can do is hope that someone at some point writes (and shares) some more triggers that coincide with the type of things I'd like to do...

Posted
10 hours ago, Anunya said:

 

That's unfortunately beyond my level to do, so I suppose all I can do is hope that someone at some point writes (and shares) some more triggers that coincide with the type of things I'd like to do...

 

That sounds like a great thread for the script-hole, i.e. "Trigger Wishlist". :)

Posted

set $blackLeatherMask   "Devious Devices - Integration.esm:203887"
item_add $system.self $blackLeatherMask 1 0
item_equip $system.self $blackLeatherMask true false
 

I wrote this script and successfully retrieved the DD blackLeatherMask.
The item was correctly added to the player character and appears as equipped in the inventory.
However, the Devious Devices (DD) effects are not triggering.

I'd like to confirm whether the issue lies in my script or if DD gear requires a different approach to activate its effects.


This is my first time learning to write scripts with this tool—it's been a lot of fun. Thanks!

Posted
1 hour ago, yongsin0129 said:

set $blackLeatherMask   "Devious Devices - Integration.esm:203887"
item_add $system.self $blackLeatherMask 1 0
item_equip $system.self $blackLeatherMask true false
 

I wrote this script and successfully retrieved the DD blackLeatherMask.
The item was correctly added to the player character and appears as equipped in the inventory.
However, the Devious Devices (DD) effects are not triggering.

I'd like to confirm whether the issue lies in my script or if DD gear requires a different approach to activate its effects.


This is my first time learning to write scripts with this tool—it's been a lot of fun. Thanks!

 

I think in DD you have 2 items & slot per device: one for the visual and one for the DD mechanism

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...