kamithemoon Posted May 4, 2025 Posted May 4, 2025 On 5/1/2025 at 8:13 AM, hextun said: 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. Neato! Now I just need a kind soul to write an example command to call for a sound bite. I know a bit to expand upon existing stuff but not enough to generate anything from scratch. =(. But I'm quite looking forward to one day having immersive voiced responses to sexlab scenes. Kind of like Apropos' messages, but voiced!
PenBoozerX Posted May 4, 2025 Posted May 4, 2025 (edited) Doesn't look like the "soft deletion" is working. I have this test trigger "soft deleted" but each scene start I fire all three spells out regardless. Another deleted one has "time slow" and it also still makes time slow down in a soft deleted event. And where do I go to actually completely delete a "soft deleted" trigger? These clutter the menu pretty fast when testing and carry over to new game too. Edited May 4, 2025 by PenBoozerX
hextun Posted May 4, 2025 Author Posted May 4, 2025 4 hours ago, PenBoozerX said: Doesn't look like the "soft deletion" is working. I have this test trigger "soft deleted" but each scene start I fire all three spells out regardless. Another deleted one has "time slow" and it also still makes time slow down in a soft deleted event. And where do I go to actually completely delete a "soft deleted" trigger? These clutter the menu pretty fast when testing and carry over to new game too. Yep, I had it hooked up in the MCM but had forgotten to check it while responding to events. Fixed. The original intent was to let you manage the triggers on the filesystem, including deletion. You can rename them, you know, to more meaningful trigger names, though of course length becomes an issue. That said... FULLY DELETE has been added as an option for Soft Deleted triggers. Surprisingly it actually does fully delete the trigger. I also added compatibility files for ConsoleUtil Extended so that if it is installed the custom console command functionality will come through CUE instead of my little hack job. The upshot of *that* is that the SLT custom console command (and any others you add through CUE) will also be callable via the SLT 'console' function, so that's a nice upgrade. And, I didn't mention it in the CHANGELOG because I have not tested it yet, but there is a new function added to the command library, actor_setalpha. actor_setalpha <actor variable> <opacity: 0.0 - 1.0 (higher is more visible)> <transition: 0 - no, instant | 1 - yes, fade to new alpha> The interface itself is pretty standard so I don't suspect anything is wrong with it. My intent was to play around with X-Ray options during scenes, but I don't know yet if it will work how I want it to.
hextun Posted May 4, 2025 Author Posted May 4, 2025 Btw, were you all aware you can do things like this in your scripts? set $1 "This is the message" ; yep, $2 is being set to the same value as the name of a function, hmm set $2 "msg_notify" ; that's right... it looked up $2, saw it resolved to "msg_notify", and ran it because it was the first value on the line $2 $1 ; new function, same argument set $2 "msg_console" ; and now to the console instead of the notification area $2 $1 I plan to add the ability to do that with your goto/gosub/call targets as well in the next release.
MannySauce Posted May 4, 2025 Posted May 4, 2025 Guess I'm too slow, I was just about to report the same thing about soft delete, then you posted. Had some others issues to report, but v112 also dealt with my bug backlog. Buglog? Also did you do anything related to event/script performance? I swear my Begin script is firing off earlier now. Anyway. I mentioned some time ago how one of my scripts using 'msg_notify' to report a value returned my value as a float despite starting out as an integer, so I sat down a few minutes ago and did a quick test. So for some reason using 'inc' does just that, integer to float. At least I think that is what is happening here. I did the following: set $1 2 msg_notify "Value is " $1 Notification shows up as "Value is 2" But if I do; set $1 1 inc $1 1 msg_notify "Value is " $1 Notification shows up as "Value is 2.000000"
MannySauce Posted May 4, 2025 Posted May 4, 2025 Forgot to mention sl_triggers_script_description.txt has been missing for a few versions, is this intended?
hextun Posted May 4, 2025 Author Posted May 4, 2025 Just now, MannySauce said: Forgot to mention sl_triggers_script_description.txt has been missing for a few versions, is this intended? I've been meaning to provide an updated version. I've done most of the legwork, just have some scripting to do. (I added doc-like comments in my library to be able to auto-generate the descriptions in whatever format I need) In the meantime, https://github.com/lynnpye/sl_triggers/wiki/Commands has the original contents in a github wiki-fied form.
MannySauce Posted May 4, 2025 Posted May 4, 2025 20 minutes ago, hextun said: I've been meaning to provide an updated version. I've done most of the legwork, just have some scripting to do. (I added doc-like comments in my library to be able to auto-generate the descriptions in whatever format I need) In the meantime, https://github.com/lynnpye/sl_triggers/wiki/Commands has the original contents in a github wiki-fied form. Nice, didn't know you added a wiki. 👍
hextun Posted May 4, 2025 Author Posted May 4, 2025 43 minutes ago, MannySauce said: Guess I'm too slow, I was just about to report the same thing about soft delete, then you posted. Had some others issues to report, but v112 also dealt with my bug backlog. Buglog? Also did you do anything related to event/script performance? I swear my Begin script is firing off earlier now. Anyway. I mentioned some time ago how one of my scripts using 'msg_notify' to report a value returned my value as a float despite starting out as an integer, so I sat down a few minutes ago and did a quick test. So for some reason using 'inc' does just that, integer to float. At least I think that is what is happening here. I did the following: set $1 2 msg_notify "Value is " $1 Notification shows up as "Value is 2" But if I do; set $1 1 inc $1 1 msg_notify "Value is " $1 Notification shows up as "Value is 2.000000" I'll have a look at the float/int thing. Also, yes, I have been working on performance improvements and have some more coming up in the next release. I don't like to mention them usually (expectations management, you know; I'd rather tell you how slow it's going to be and let you be surprised ), but since you noticed, yes. Thank you for noticing.
Jokekiller Posted May 4, 2025 Posted May 4, 2025 Hi, can someone help me to figure out can this be used in this scenario: A certain named NPC engage in a sexlab scene with a PC = PC takes a certain ingestible. If it's possible can someone maybe give a tip how to do that? Thanks in advance!
hextun Posted May 4, 2025 Author Posted May 4, 2025 34 minutes ago, Jokekiller said: Hi, can someone help me to figure out can this be used in this scenario: A certain named NPC engage in a sexlab scene with a PC = PC takes a certain ingestible. If it's possible can someone maybe give a tip how to do that? Thanks in advance! It seems like you would want: - SexLab trigger - Event: Begin - Chance: 100% (I assume) - Player: Partner Player - Do 1: your script And your script would presumably look something like this: NPCNameFeedsPlayer.ini ---------------------- actor_name $self if $$ != "NPCName" notme ; the next few lines are from Alcohol.ini ; this is a random list of vanilla Skyrim alcohols ; if you know what you want to use, you could replace this line and "set $1 $$" with "set $1 "whatevermod.esp:integer form id" rnd_list "skyrim.esm:216158" "skyrim.esm:853342" "skyrim.esm:181082" "skyrim.esm:329930" "skyrim.esm:201531" "skyrim.esm:201532" "skyrim.esm:1079946" "skyrim.esm:901490" "skyrim.esm:758231" ; this puts the random selection into $1 set $1 $$ ; this differs a little from Alcohol.ini in that it targets the player directly instead of self item_adduse $player $1 1 0 [notme]
Nalzt Posted May 4, 2025 Posted May 4, 2025 (edited) On 5/3/2025 at 9:42 PM, hextun said: 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. Awesome, thanks. All seems to be working now. I wanted to make a command that would decrease a level of player's random skill. (like in the mods Succubus Skill Loss or Love Sickness) I tried using "av_mod" like the "Change stats" command does with attributes, and it seemed to work on the surface. But looks like it just applied a debuff that can't be removed, the actual skill level stayed the same. Any idea how to write a script that would make you permanently lose a skill level? Edited May 4, 2025 by Nalzt replaced with a cleaner screenshot
hextun Posted May 4, 2025 Author Posted May 4, 2025 v114 dropped and it's faster >:) I know I said I don't promise on that but this time I'm breaking that promise to.. not ... um... whatever... Here's official changelog: enhancement: performance improvements centered around speeding up the command library access enhancement: improved error reporting for your scripts (see the console for errors in your scripts; feature developing) bugfix: inc no longer coerces to float; will keep it an int if it finds an int enhancement: improved performance for 'set'/'inc'/'cat' (should never have been part of the command library; moved to built-in functionality; much faster) enhancement: documentation is available again with the .zip (sl_triggers_function_library.txt); now being generated from source, as well as the wiki content (should be essentially identical) So on the performance improvement front my execution time for the "regression test 1" script (which admittedly has a util_wait in it), went from around 17 seconds to just over 14 seconds, which is more like a 12 to 9 second improvement. This comes from a) moving 'set'/'inc'/'cat' into where the core language syntax is handled instead of in a function library and b) performing some prefetching/caching of the function libraries on startup. It's refreshed each start, so changes between launches will be fun, and function libraries aren't hotswappable. Fixed the float coercion with inc. There is now an 'sl_triggers_function_library.txt' included which should be essentially identical to the (wiki content)[https://github.com/lynnpye/sl_triggers/wiki/Function-Libraries]. And also I have been adding some error reporting for your SLT scripts. I'm trying to list the file and line number and what problem I ran into, into the console. So check there if you have problems with your scripts. If you have any suggestions for how to improve that experience (or any of it), please let me know. Oh... and one more thing... did you know this script is functional? [start] set $3 "start" set $1 "This is a message to communicate" set $2 msg_notify $2 $1 ; yup, it's going to print that as a notification, but wait... set $2 msg_console $2 $1 ; now we sent it to the console goto $3 ; yup, that too Nuts I said... go... nuts...
hextun Posted May 4, 2025 Author Posted May 4, 2025 1 hour ago, Nalzt said: Awesome, thanks. All seems to be working now. I wanted to make a command that would decrease a level of player's random skill. (like in the mods Succubus Skill Loss or Love Sickness) I tried using "av_mod" like the "Change stats" command does with attributes, and it seemed to work on the surface. But looks like it just applied a debuff that can't be removed, the actual skill level stayed the same. Any idea how to write a script that would make you permanently lose a skill level? Well, looking at the Creation Kit documentation I get the impression they never considered that (permanent loss of skill levels) as a possibility, because the API reflects that. Things like Game.AdvanceSkill (basis for actor_advskill) explicitly states it only takes positive values and while the documentation for Game.IncrementSkillBy doesn't outright say that it only takes positive values, the existence of Game.IncrementSkill and no DecrementSkill would suggest it wants positives as well. If someone has an idea, chime in, otherwise I'll give it some thought though I suspect any solution is going to be a little hacky. And yeah, as a result, modav tends to get most of the attention because debuffs are just expected to be non-permanent. Or at least not affecting the base stat itself.
yjsp810 Posted May 5, 2025 Posted May 5, 2025 How can I make an actor to wear something in the scene?
MannySauce Posted May 5, 2025 Posted May 5, 2025 Ollo. Ran into some stuff. The command list is not updating (what I assume is a cached result) on v112-v114, it doesn't list new scripts I've added and deleted ones are still listed. Seems set in stone after mod install. And the SexLab portion of v114 (skipped v113, sorry) is not triggering anymore, none of my Begin/Orgasm/End commands are running. Or maybe your performance improvements just made them too fast to notice. 🥵
hextun Posted May 5, 2025 Author Posted May 5, 2025 (edited) 3 hours ago, MannySauce said: Ollo. Ran into some stuff. The command list is not updating (what I assume is a cached result) on v112-v114, it doesn't list new scripts I've added and deleted ones are still listed. Seems set in stone after mod install. And the SexLab portion of v114 (skipped v113, sorry) is not triggering anymore, none of my Begin/Orgasm/End commands are running. Or maybe your performance improvements just made them too fast to notice. 🥵 Hmm... I was not able to reproduce either of your problems. I tried a new save and existing, and found that the commands list updated correctly. As well, SL events were working. Honestly it sounds like the main quest (sl_triggersMain) has stopped. Can you try going into the MCM and using the 'Reset SL Triggers' option, then once it backs out, give it a couple of seconds, save, and restart? I'm not sure why it would have stopped but do let me know if that fixes it. Also, look for 'Data\SKSE\Plugins\sl_triggers\debugmsg.log' (it may be in overwrite). There is a line that gets printed about pre-caching on each launch. Verify that line is being added if you don't mind. Edited May 5, 2025 by hextun
MannySauce Posted May 5, 2025 Posted May 5, 2025 30 minutes ago, hextun said: Hmm... I was not able to reproduce either of your problems. I tried a new save and existing, and found that the commands list updated correctly. As well, SL events were working. Honestly it sounds like the main quest (sl_triggersMain) has stopped. Can you try going into the MCM and using the 'Reset SL Triggers' option, then once it backs out, give it a couple of seconds, save, and restart? I'm not sure why it would have stopped but do let me know if that fixes it. Also, look for 'Data\SKSE\Plugins\sl_triggers\debugmsg.log' (it may be in overwrite). There is a line that gets printed about pre-caching on each launch. Verify that line is being added if you don't mind. I tried again and instead of cleaning my save I just removed v112, installed v114 and I got the same result. Gave 'Reset SL Triggers' a try and it kinda worked, my new .ini was added to the list of commands and triggers fired off again until I wanted to double check with the cache, so I saved, relaunched the game and loaded the new save - back to cache and trigger issues again. This doesn't happen on a new game, so maybe a save game compatibility issue with older versions? Oh and yeah debugmsg.log prints "26.320000: Libraries pre-cached in sl-triggers-internal" as expected.
hextun Posted May 5, 2025 Author Posted May 5, 2025 1 minute ago, MannySauce said: I tried again and instead of cleaning my save I just removed v112, installed v114 and I got the same result. Gave 'Reset SL Triggers' a try and it kinda worked, my new .ini was added to the list of commands and triggers fired off again until I wanted to double check with the cache, so I saved, relaunched the game and loaded the new save - back to cache and trigger issues again. This doesn't happen on a new game, so maybe a save game compatibility issue with older versions? Oh and yeah debugmsg.log prints "26.320000: Libraries pre-cached in sl-triggers-internal" as expected. I was just coming back to say that when I then took 114 and updated my own save which had 112 I experienced the same problem and was going to say it's probably a save compatibility issue that I didn't realize I had created. I'll update the release notes accordingly. Thanks and sorry for the confusion.
MannySauce Posted May 5, 2025 Posted May 5, 2025 9 minutes ago, hextun said: I was just coming back to say that when I then took 114 and updated my own save which had 112 I experienced the same problem and was going to say it's probably a save compatibility issue that I didn't realize I had created. I'll update the release notes accordingly. Thanks and sorry for the confusion. New save game time. 👍 No biggie.
Vertaghost_ Posted May 6, 2025 Posted May 6, 2025 Small Request to add a SMP Reset command for Predator's HPH SMP. I tried the old SMP reset command but they are in json format. These new commands are ini format.
hextun Posted May 6, 2025 Author Posted May 6, 2025 1 hour ago, Vertaghost_ said: Small Request to add a SMP Reset command for Predator's HPH SMP. I tried the old SMP reset command but they are in json format. These new commands are ini format. If I'm understanding correctly, you are looking for a script (previously a .json (though .json still works!) and now an .ini) that will perform the "smp reset" command as described. I think there is a typo on the third line. That I believe should be a reference to the "console" function. The following would be the two scripts. .ini util_waitforend $self util_wait 4 console $self "smp reset" which in .json is { "cmd": [ ["util_waitforend", "$self"], ["util_wait", "4"], ["console", "$self", "smp reset"] ] } I've put the function library documentation on the wiki: https://github.com/lynnpye/sl_triggers/wiki/Function-Libraries#console And it is also in a .txt file again in the most recent v114, and will be going forward. Let me know if this isn't what you were looking for. 1
hextun Posted May 6, 2025 Author Posted May 6, 2025 v115 changenotes: Savegame compatibility: tested succesfully with an update from v114 (install 114, new game, verify, save, update to 115, load, verify) bugfix: Core function library (toh_elapsed_time only) was looking for the extension with the wrong formID bugfix: corrected several functions with edge case failures to set $$ appropriately bugfix: several logic bugfixes while going through the function libraries enhancement: completed the addition of argument checking for all operations/functions enhancement: actor_isaffectedby now can match for ALL (see updated documentation) enhancement: several sl_ functions did not take an actor; an actor has been added as an optional param (e.g. sl_animname) enhancement: added protective checks around param index access and object referencing change: added roughly 4 second (technically 3.9 second) additional delay on SLT start before trying to register extensions to improve startup sync I made an attempt at verifying save game compatibility and was able to upgrade from 114 to 115, but my test was perhaps rudimentary as you can see my steps listed in the changelog. So while I do not expect a problem with updating, I did make a lot of changes under the hood. I've made an effort to add parameter list length checks as well as some additional parameter validation. Some of that will already result in additional script errors available for you (i.e. messages to let you know what problems were encountered with your script). I am looking to extend that functionality further (i.e. to be more informative when your script is having problems). The $$ set edge cases were mostly to do with the failure cases, so in success cases you would not notice a problem. But if you were explicitly testing for specific failure scenarios you might have gotten false results. I'm not commenting further on my dumbass mistake about not putting my own valid FormID for my own extension into my own mod. *facepalm* Thank you to @MannySauce for the idea: `actor_isaffectedby` now has an ALL optional parameter 2 (go check out the docs). Also, in a similar spirit, several of the sl_ functions did not (never did) take an actor. Things like sl_animname, which just defaulted to $self. I've added optional parameters on those to accept an actor if specified. The delay on startup was to aid with listening for extensions on startup during registration.
Mauler158 Posted May 6, 2025 Posted May 6, 2025 Are commands such as "actor_body $self "SetWeight" 110" limited to using specific integers for parameter 3? or can i use a nested ((actor_body $self "GetWeight") -10) to decrement weight by 10 from the previous value? or perhaps this is a convoluted way about decreasing weight, any alternatives?
hextun Posted May 7, 2025 Author Posted May 7, 2025 (edited) 2 hours ago, Mauler158 said: Are commands such as "actor_body $self "SetWeight" 110" limited to using specific integers for parameter 3? or can i use a nested ((actor_body $self "GetWeight") -10) to decrement weight by 10 from the previous value? or perhaps this is a convoluted way about decreasing weight, any alternatives? I'll answer the general question first: have a look at the wiki for the functions, their descriptions, and some examples: https://github.com/lynnpye/sl_triggers/wiki/Function-Libraries. In general, the functions do what the name suggests and what the descriptions state. Not a slight; just saying that I like the names Fotogen picked and haven't chosen to rename them because I felt they were accurate and unambiguous. The somewhat more specific answer, generally if the function says "set" it is expecting a fully new value which will replace the previous one. If it says something like 'inc(rement)', 'add', 'mod(ify)', etc. then it's going to expect a delta value for you to supply. In your specific case, `actor_body` does not have a "ModWeight" sub-function but does have both "GetWeight" and "SetWeight". At the moment that means you would need to do something like: actor_body $self GetWeight set $1 $$ ; do whatever it is you want to do... mult by 1.1? add 3? for example... set $1 $1 * 1.1 ; increase weight by 10% actor_body $self SetWeight $1 Edited May 7, 2025 by hextun
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