Jump to content

Recommended Posts

Posted
11 hours ago, MannySauce said:

If you were to trigger the same script through the same means a second or more times before the previous instance finishes, does that run a new separate instance or reset the existing one?

And target scope vars - do they persist after creation like global scope vars, just being limited to the target?

 

Each script request stands alone; you would get additional instances of the same script. There is not (currently) a notion of prohibiting concurrency.

 

If you want to prevent it, you could try adding an executing flag global (or target context, whichever makes sense) so that at the beginning of the script, if it detects the flag is set, it just returns but otherwise it sets the flag and then unsets it before exiting. Rudimentary mutexes if you will. Still not guaranteed to work but it's about as close as I think you'll get under the current circumstances.

 

Target scope vars are like global vars but tied to a specific Actor/target; they persist across script executions (i.e. are always available) and are shared by any script running on that Actor/target (i.e. the same variable has potentially different values depending on which Actor the script targeted). I use StorageUtil for target scoped variables. Globals, Locals, and Thread scoped variables are all just stored directly on game objects.

Posted

@hextun - thank you for the in depth and informative answer. Everything you say there makes sense and is reasonable.

 

I'd love to really engage with SLTR and write proper mods with it, but I'm pretty sure my ambition exceeds my skills by an order of magnitude at least (and not just with SLTR) 😆😢

 

In the meantime I'm trying to ascertain what's actually within reach for me with what you're providing (which is amazing and appreciated). Please don't take any of my questions as a backhanded way to ask you to do any work - you have your own plans and roadmap (or not) and that's how it should be. I'm happy to use SLTR within my capabilities (and within the capabilities of other people who use it for their own projects and share them). That's already a great and appreciated contribution to Skyrim modding.

 

Posted
1 hour ago, Anunya said:

@hextun - thank you for the in depth and informative answer. Everything you say there makes sense and is reasonable.

 

I'd love to really engage with SLTR and write proper mods with it, but I'm pretty sure my ambition exceeds my skills by an order of magnitude at least (and not just with SLTR) 😆😢

 

In the meantime I'm trying to ascertain what's actually within reach for me with what you're providing (which is amazing and appreciated). Please don't take any of my questions as a backhanded way to ask you to do any work - you have your own plans and roadmap (or not) and that's how it should be. I'm happy to use SLTR within my capabilities (and within the capabilities of other people who use it for their own projects and share them). That's already a great and appreciated contribution to Skyrim modding.

 

 

No worries and as far as I'm concerned you've been a total gentleperson from the get-go; I don't feel pressured nor do I feel that you've inappropriately requested or insisted upon anything. :)

 

Safe to say, I have some ego invested in this and I appreciate that folks express interest and suggest new features. It shows investiture beyond my own, which is always encouraging.

 

Suffice to say I want to make something that people want to use, so by all means, keep the ideas coming. They are very much welcome. :)

Posted

sl-triggers.log says "[5]: 'endif' encountered outside of if-block; ignoring" when doing:
 

if $var1
	if $var2
		function
	endif
endif

 

It does still work, but I'm just wondering if I'm doing something wrong, like line 5 being superfluous?

Posted
8 hours ago, MannySauce said:

sl-triggers.log says "[5]: 'endif' encountered outside of if-block; ignoring" when doing:
 

if $var1
	if $var2
		function
	endif
endif

 

It does still work, but I'm just wondering if I'm doing something wrong, like line 5 being superfluous?

 

No, that message shouldn't come up for that syntax; I'll have a look. Thanks. :)

 

Posted

Hi,

I've noticed a performance issue in populated areas in sl_triggers126.
I'm not 100 percent sure it's due to this mod, but when i remove it from the load order, the problem disappears.
It's the same problem as with version 125, which caused a lot of stuttering during combat (it took me one day to figure out it was due to this mod :) ).
I'm now on version 126 and have no problems during combat, but as mentioned above, i have this problem when there are a lot of NPCs.
Is there a way to make the script work only for PC? The only feature i'm interested in is a Player script.
Is there a log i can send you to understand the performance issue?

Thanks.

Posted
3 hours ago, alain31 said:

Hi,

I've noticed a performance issue in populated areas in sl_triggers126.
I'm not 100 percent sure it's due to this mod, but when i remove it from the load order, the problem disappears.
It's the same problem as with version 125, which caused a lot of stuttering during combat (it took me one day to figure out it was due to this mod :) ).
I'm now on version 126 and have no problems during combat, but as mentioned above, i have this problem when there are a lot of NPCs.
Is there a way to make the script work only for PC? The only feature i'm interested in is a Player script.
Is there a log i can send you to understand the performance issue?

Thanks.


I need to remove the download for 126. 127 removed the code and esp object that are causing the performance issue. 
 

please update, preferably to 128

Posted

Has anyone been able to convert the creature vials script for this new version of Sl Triggers?

Posted
1 hour ago, MannySauce said:

"Not Player" option for trigger actor broke in v128. 🥺

 

Checking into it now.

Posted
35 minutes ago, myhouseatl said:

Can this be set up to start an OStim scene?  If not, can you adopt OStim Standalone please?

 

I haven't created an OStim extension similar to SexLab but it is on my todo list. :)

Posted
4 hours ago, Padawanda21 said:

Has anyone been able to convert the creature vials script for this new version of Sl Triggers?

 

What is the "creature vials" script? Can you link to it? Conversion is typically pretty simple. (another page I should create)

Posted
5 hours ago, MannySauce said:

"Not Player" option for trigger actor broke in v128. 🥺

 

Found the problem; I was attempting to optimize the loop that occurs inside the SL event handler and removed a single line of code that reset a truth checker variable to true. Having done so, subsequent loops fail because it's still flagged false (assuming it failed on the first pass).

 

Fix ASAP.

Posted

v129 out. I pulled all older versions (but release zips are still available on github; although I pulled them because of bugs, so.. y'know)

 

Here's the changelog:

Savegame compatibility: CLEAN SAVE REQUIRED (New game or (not supported) Uninstalling SLTR, Cleaning your save (e.g. Load, click through the warning, Save; use a cleaner), Reinstall SLTR and reapply your customizations, Load)

Note: Reminder that logging output is all sent to <My Documents>\My Games\Skyrim Special Edition\SKSE\sl-triggers.log (or whichever folder you have your SKSE logs directed to)

bugfix: Timer: timer progress now persists across saves (i.e. if you save 59 minutes into a 60 minute timer and reload that save, you only have 1 minute remaining before it runs)
    - or as I like to call it, the "Why Didn't You Do This In The First Place" patch
bugfix: CumControl.sltscript was still partially built for running during a scene
bugfix: nested if/if/endif/endif constructs were erroneously reporting imbalanced endif
bugfix: 'Contamination - MME_Lactacid.sltscript' was not using editorid correctly
bugfix: SexLab event handler not resetting doRun flag back to true during each actor loop iteration, causing some triggers to fail to run
enhancement: Added NiOverride/Racemenu functions:
    - getoverlay_slot
    - param_overlay
    - changeoverlay_transparency
    - remove_overlay
    - apply_overlay

 

@MannySauce: your reported bugs (if/if/endif/endif ; "Not Player") should be fixed

Posted

Also, big thanks to @Nevropath for donating the NiOverride code for the functions: 

- getoverlay_slot
- param_overlay
- changeoverlay_transparency
- remove_overlay
- apply_overlay

 

I've merged the update into the Core library, and will assume responsibility for issues and problems of course. Thanks again! :)

 

Posted

There's a humanvials and creaturevials script included in this mod (for se version), it adds a specific type of vial per npc based on a sizeable set of conditions in the scripts so unlike the simpler scripts i didn't really figure out how to start converting the conditions. If it would be too much of a hassle converting every condition it would already be a big help if i had an example a part of the condition sets being converted into working version so i could copy paster the other npc races in

 

Posted (edited)
On 7/26/2025 at 10:12 PM, Padawanda21 said:

There's a humanvials and creaturevials script included in this mod (for se version), it adds a specific type of vial per npc based on a sizeable set of conditions in the scripts so unlike the simpler scripts i didn't really figure out how to start converting the conditions. If it would be too much of a hassle converting every condition it would already be a big help if i had an example a part of the condition sets being converted into working version so i could copy paster the other npc races in

 

 

I've made a quick conversion. Let me know if you run into any problems. :)

 

 

I took the time to try converting the Give Vial 1.66 script as well.

 

 

 

Edited by hextun
fixed links
Posted

v130 is posted. Save game compatible.

 

One caveat: I renamed the SexLab version of 'util_waitforkbd' to 'sl_waitforkbd'. Scripts currently using 'util_waitforkbd' will no longer wake up at the end of a SexLab scene. No shipped scripts are affected, but you may want to check your own. You probably won't notice in many cases, such as when you are likely to have pressed one of the keys (and therefore not have the problem of running into the scene end before hitting a key).

 

That said... *ahem*... you now have OStim support, along with a fresh batch of ostim_* functions.

 

Lang support files (Notepad++, VSCode) have been updated with the new keywords.

 

I also updated a lot of the function library examples to use correct special variable names i.e. $system.self instead of $self.

Posted

Regarding OStim, I should point out that while the triggers are setup, all shipped scripts using sex themed functions are currently written against SexLab. 
 

Until I provide new versions that work for OStim, you will have to stick with scripts not using SexLab or write your own.

Posted

Btw, to be clear, in v130 I explicitly changed the MCM to not display an extension if it's required mod is not installed (different from being installed but the extension disabled).

 

So, pre-v130:

- I have mod, extension is disabled; MCM displays the extension and lets you edit triggers

- I do not have mod; MCM still displays the extension and lets you edit triggers which will never fire

 

Post-v130:

- I have mod, extension is disabled; MCM displays the extension and lets you edit triggers

- I do not have mod; MCM will not display the extension

 

If that's confusing, I can add a "Show Hidden Extensions" option on the main settings page.

Posted
1 hour ago, Nevropath said:

@hextun Hello,

 

Here is 2 files requested used to test the NiOverride function on player (and all male). Right I could not get it fired normally but the script works when I fire it by console commands

 

Maybe I did something wrong in the trigger conf.

Apply Blush Male.zip 466 B · 1 download trigger002.zip 322 B · 1 download

 

First, I was, unfortunately, not able to reproduce your problem. I used an existing modlist and save from v129, updated to v130 without attempting a new/clean save, added your script and trigger, and was able to see the changes applied during the scene (subtle, but there) as well as see log output when I had debug flags enabled.

 

My suspicion: If you are using ModOrganizer2 for your modlist, you may have multiple copies of trigger002.json somewhere such that the copy you created for 'Apply Blush Male' is being hidden by another copy. If you are using MO2, check the 'Data' tab and look for 'trigger002.json'. If it appears like this, in red, indicating there are multiple copies and one is hiding another, that may be your culprit.

image.png.648b52d09846ecdea12a9cd7c671a40d.png

 

That said, there's a minor issue with the trigger, but nothing that should have prevented it from working for you. If I understand correctly:

- trigger: On SexLab Start

  - chance: 100%

  - Race: Humanoid

  - Gender: Male

 

- Apply Blush Male.sltscript

  - apply the "blush_cheeks" overlay to the player with increasing strength during the scene, with various waits, then wait for the scene to end and start undoing the strength until you remove it and exit the script.

 

So basically, any time, any where, that any male humanoid starts a SexLab scene, with or without the player (this is the issue), the script will run. If anything it appears to be too permissive; i.e. if NCPMale engages NPCFemale the script runs. Moreover, if you have a scene like MMF, you'll get two copies running simultaneously.

 

I should add a "Partner Gender" filter.


In the meantime, I recommend you change the trigger to:

- trigger: On SexLab Start

  - chance: 100%

  - Player: Player

 

Then use this slightly modified copy of your script. It adds a check for $system.partner1 being humanoid and male. If not, the script exits. This makes it so only one instance will ever be run.

Spoiler
; this version of the script is meant to be run on the player:
; event: On SexLab Start
; chance: 100%
; player: Player
msg_console "start male blushing"

; this checks the partner in the scene for being male (value 0) and humanoid (value 2)
; if none are found, exit the script
set $partnerRace 	resultfrom actor_race $system.partner1 "SL"
set $partnerGender 	resultfrom actor_getgender $system.partner1
if $partnerRace == 0
	if $partnerGender == 2
		goto [malePartnerFound]
	endif
endif

msg_console "Male humanoid partner not found, exiting"
return

[malePartnerFound]
getoverlay_slot $system.player False Face
set $1 $$
msg_console "1st available slot " $1

param_overlay $system.player False $1 "actors\\character\\slavetats\\DoMBlush\\blush_cheeks_1.dds" 0.2

apply_overlay $system.player
actor_qnnu $system.player

util_wait 20

param_overlay $system.player False $1 "actors\\character\\slavetats\\DoMBlush\\blush_cheeks_1.dds" 0.6

apply_overlay $system.player
actor_qnnu $system.player

util_wait 20

param_overlay $system.player False $1 "actors\\character\\slavetats\\DoMBlush\\blush_cheeks_1.dds" 1.0

apply_overlay $system.player
actor_qnnu $system.player

msg_console "blushing applied"

util_waitforend $system.player

param_overlay $system.player False $1 "actors\\character\\slavetats\\DoMBlush\\blush_cheeks_1.dds" 0.6

apply_overlay $system.player
actor_qnnu $system.player

util_wait 15

param_overlay $system.player False $1 "actors\\character\\slavetats\\DoMBlush\\blush_cheeks_1.dds" 0.2

apply_overlay $system.player
actor_qnnu $system.player

util_wait 15

remove_overlay $system.player False $1

apply_overlay $system.player
actor_qnnu $system.player

 

 

 

Posted

Some questions I've been sitting on:

 

- How girthy can a script be? Is there a line count limit or recommended max?
- Does subroutines have a limit on how many you can have in a single script?
- If you use "return" inside a subroutine, does that exit the subroutine or the script?

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