Jump to content

Recommended Posts

Posted
3 hours ago, Fraying9981 said:

is there a way to scan npcs around?

for example:

1. trigger: load cell or every in game hour (not SL related)

2. scan NPCs

3. create a buff/debuff fpr example on arousal

 

 

https://github.com/lynnpye/sl_triggers/wiki/Function-Libraries#util_getrndactor?

 

3 hours ago, Fraying9981 said:

and (different question): is there a way to trigger SL trigger redux based on equipping objects?

1. trigger: every hour or so (not on equip) = object X is equipped

2. SL trigger global variable $g1 ++ or --

that's it

 

So, not asking to trigger based on equipping, but rather during a trigger, detect if a specific object is equipped and if so, act accordingly?

 

I do want to add a host of additional triggers. For example, the following events for Actors sound useful (combat state has been requested and you're asking about onequip/onunequip):

- OnCombatStateChanged (i.e. enter/exit combat)

- OnDying/OnDeath - I *want* to do this, but because right now SLTScript is run as a spell effect, I'm not sure if OnDying would start working quickly enough and don't even know if OnDeath would work at all

- OnEquip/OnUnequip

- OnLycanthropyStateChange

- OnVampirismStateChanged

- OnPlayerFastTravelEnd

Posted

It's spooky quiet. Any bugs not squashed that I've either overlooked, said I would address and apparently have forgotten, or that are new and shiny?

Posted
3 hours ago, hextun said:

It's spooky quiet. Any bugs not squashed that I've either overlooked, said I would address and apparently have forgotten, or that are new and shiny?

 

On v123 the MCM page says v122 - my disappointment is immeasurable, and my day is ruined. 

 

 

 

Ok no but that's all I've ran into, my test scripts said👌and my real ones aren't misbehaving (at the moment, no jinx please).

Posted

Found something:

 

The "sl_triggers_PlayerTrackerActor" NPC draws aggro from hostile NPCs, so mods like Defeat will be stuck waiting on the hostile NPC as they're chasing nothing forever.

 

I did find a console workaround for the time being, using "moveto player" on the hostile NPC.

Using "stopcombat" was no bueno, that just reset their combat state for a split second, then they start chasing the tracker actor again.

Posted
1 hour ago, MannySauce said:

Found something:

 

The "sl_triggers_PlayerTrackerActor" NPC draws aggro from hostile NPCs, so mods like Defeat will be stuck waiting on the hostile NPC as they're chasing nothing forever.

 

I did find a console workaround for the time being, using "moveto player" on the hostile NPC.

Using "stopcombat" was no bueno, that just reset their combat state for a split second, then they start chasing the tracker actor again.

 

I'll have a look; this problem seems far easier to tackle than the version output mismatch on the MCM screen. I might have to let that one sit while I figure out what to do about it. ;)

 

Also, for anyone who's appetite needs whetting, here's something from the latest regression test run you might like:

 

[2025-07-08 17:42:01.583] [log] [debug] [sl_triggers.cpp:340] DebMsg> inside an if block

 

Posted
2 hours ago, MannySauce said:

Found something:

 

The "sl_triggers_PlayerTrackerActor" NPC draws aggro from hostile NPCs, so mods like Defeat will be stuck waiting on the hostile NPC as they're chasing nothing forever.

 

I did find a console workaround for the time being, using "moveto player" on the hostile NPC.

Using "stopcombat" was no bueno, that just reset their combat state for a split second, then they start chasing the tracker actor again.

 

Also, can you provide more details? Which defeat mod was it? And what behavior did you see? i.e. did the NPC just run off somewhere? Did it freak out trying to find someone it couldn't? Any help would be much appreciated. :)

Posted
2 hours ago, MannySauce said:

Found something:

 

The "sl_triggers_PlayerTrackerActor" NPC draws aggro from hostile NPCs, so mods like Defeat will be stuck waiting on the hostile NPC as they're chasing nothing forever.

 

I did find a console workaround for the time being, using "moveto player" on the hostile NPC.

Using "stopcombat" was no bueno, that just reset their combat state for a split second, then they start chasing the tracker actor again.

 

This is a quick hack: sl_triggersExtensionCore-patch-script-force-actor-dontmove-ghost-nostealthmeter.7z this .7z contains a single file, sl_triggersExtensionCore.pex. Manually replace the file and try it out (make a backup of the .pex file to restore in case this doesn't work). This is a recompiled version with one change: it adds the following lines after the sentinel (pkSentinel) is instantiated:

 

pkSentinel.SetDontMove(true)
pkSentinel.SetGhost(true)
pkSentinel.SetNotShowOnStealthMeter(true)

 

I'm not sure it will help, but I'm not ready to release what I have and this might work in the meantime. Please let me know either way.

 

Important to note: as far as I can tell, IsGhost() should be sufficient and that is already set in CK on the ActorBase, so I'm not sure what the issue is; i.e. I *thought* it would work as is. And if IsGhost() is not sufficient, I'll want to have a look at the Defeat mod to see how it is searching for actors to see what I'm doing wrong.

 

Posted (edited)
1 hour ago, hextun said:

 

Also, can you provide more details? Which defeat mod was it? And what behavior did you see? i.e. did the NPC just run off somewhere? Did it freak out trying to find someone it couldn't? Any help would be much appreciated. :)

 

This one: https://www.loverslab.com/topic/19941-sexlab-defeat/page/556/#comment-3583646

 

Behaviour wise they kept searching the same immediate area. Sometimes taunting in a random direction, and then going back to searching.

It feels like I've got a follower they can't reach for the follower knockdown settings in Defeat.

 

EDIT: If they're capable of ranged attacks, they'll do that too. 🫠 So they do have a target.

 

1 hour ago, hextun said:

 

This is a quick hack: sl_triggersExtensionCore-patch-script-force-actor-dontmove-ghost-nostealthmeter.7z this .7z contains a single file, sl_triggersExtensionCore.pex. Manually replace the file and try it out (make a backup of the .pex file to restore in case this doesn't work). This is a recompiled version with one change: it adds the following lines after the sentinel (pkSentinel) is instantiated:

 

pkSentinel.SetDontMove(true)
pkSentinel.SetGhost(true)
pkSentinel.SetNotShowOnStealthMeter(true)

 

I'm not sure it will help, but I'm not ready to release what I have and this might work in the meantime. Please let me know either way.

 

Important to note: as far as I can tell, IsGhost() should be sufficient and that is already set in CK on the ActorBase, so I'm not sure what the issue is; i.e. I *thought* it would work as is. And if IsGhost() is not sufficient, I'll want to have a look at the Defeat mod to see how it is searching for actors to see what I'm doing wrong.

 

 

I'll give the script a go. 👍

 

EDIT: No dice with the patch. 😔

Doesn't seem to happen 100% of the time. On some save loads it's on first surrender and on others it was third, fourth, etc, with and without the patch.

 

Edited by MannySauce
we be editin mon
Posted (edited)

I'm transitioning from the old SL trigger to this new, much more complete version, but I must say I'm a bit lost by the changes in syntax :D

Can somebody share script examples/tips for any of the following?

- a script using the SL has tag function to do sth

- a script using PC's arousal level to do sth

- a script using a db, for example if I want to store all my comments in a file to unclog the code, and fetch them in my main script

- a script that store persistent values across saves. I understand global variables can do this, but they need to be initialized at some point right? so let's say I'm looking at creating a new permanent stat for the player just for SLT, let's call it "self-esteem". then how would I do that?

- a script that happens during a SL scene, and does sth every 10 secs, for example, display a message

- a script that fetches mod variables, for example, apropos2 wear and tear

- a script that scans the room for all actors to check if one particular actor is present

- a script that fetches SL proficiency levels (e.g. oral) to do sth

 

regarding triggers, is there a way to have a script fire up every time the player gains experience (in general)?

 

thanks in advance for your tips

Edited by Fraying9981
Posted
1 hour ago, Fraying9981 said:

I'm transitioning from the old SL trigger to this new, much more complete version, but I must say I'm a bit lost by the changes in syntax :D

Can somebody share script examples/tips for any of the following?

- a script using the SL has tag function to do sth

- a script using PC's arousal level to do sth

- a script using a db, for example if I want to store all my comments in a file to unclog the code, and fetch them in my main script

- a script that store persistent values across saves. I understand global variables can do this, but they need to be initialized at some point right? so let's say I'm looking at creating a new permanent stat for the player just for SLT, let's call it "self-esteem". then how would I do that?

- a script that happens during a SL scene, and does sth every 10 secs, for example, display a message

- a script that fetches mod variables, for example, apropos2 wear and tear

- a script that scans the room for all actors to check if one particular actor is present

- a script that fetches SL proficiency levels (e.g. oral) to do sth

 

regarding triggers, is there a way to have a script fire up every time the player gains experience (in general)?

 

thanks in advance for your tips

 

Hey there and welcome! First, I'd suggest you have a look at the wiki. There's a section showing syntax and examples, a section with all of the available functions listed, along with their documentation and examples, as well as other stuff.

 

Broadly speaking, for now at least, a simple rule of thumb for converting from JSON is:

- for each JSON command row paste the converted line to a new file with an .sltscript extension

- if it's a label, turn it from [":", "labelname"] to [labelname]

- otherwise, if it's the first thing in the row (i.e. the function name), remove it from double quotes

- for the second and remaining items on the row:

  - if it is a number, you can leave it or take it out of quotes

  - if it is a string, i.e. data you are intending to use, leave it in quotes

  - for most things, honestly, you could probably just leave it in quotes 

  - but each row has to go on to a single line

 

Technically, JSON is still supported, though I haven't been thorough about testing it with the latest features.

 

Anyhow, here's an example JSON converted to it's equivalent .sltscript:

 

{
    "cmd" : 
    [
       // obviously, these comment lines aren't valid, just, you know, comments
       // so, we had 10 gold
       ["item_add", "$self", "skyrim.esm:15", "10", "0"],
       // quick goto
       ["goto", "there"],
       [":", "here"],
       // step 3: add yet more gold
       ["item_add", "$self", "skyrim.esm:15", "7", "0"],
       // go to finally
       ["goto", "finally"],
       [":", "there"],
       // step 2: add more gold
       ["item_add", "$self", "skyrim.esm:15", "11", "0"],
       ["goto", "here"],
       // final: and out
       [":", "finally"]
   ]
}

 

And converted to .sltscript

; The .sltscript does actually support comments like this

; Note: Where you used to refer to $player, now it is $system.player: same with the other special variables you recall
item_add $system.self "skyrim.esm:15" 10 0   ; including on the same line, it just starts a comment to end of line
// step 1: go to there
goto there

; empty space is ignored
	; including tabs and other leading spaces
[here]
; step 3: add yet more gold
; note: you can use 0x hex notation: 0xf is the same is 15, for example
item_add $system.self "skyrim.esm:0xf" 7 0
; goto finally
goto finally

[there]
   ; step 2: add more gold
   item_add $system.self "skyrim.esm:15" 11 0
   goto here

; final: and out
[finally]

 

I kind of made the formatting not so great to point out that the white space doesn't matter so much outside of quotes. I hope I didn't goof anything up; a) it would be embarrassing and b) it would be very embarrassing. Regardless, and not to be repetitive, but go check out the wiki or the existing .sltscript files that come with the mod for examples. :)

 

You also came with DEMANDS!

 

Let's see, here is a script I put together by memory, with the wiki open, and the source code too because apparently I need to and make my document generation work properly. Oh my god the state of the jsonutil and storageutil docs. My apologies. Anyway, I *think* this shows a number of things you asked about:

; you could have this target the player or perhaps any male, aggressor, partner to the player for example
; and you could likewise have it run when that target has a Separate Orgasm

; really you can set this up with anything that checks a value
sl_hastag "Oral" $system.self
if $$ == true hadOral

; had no Oral, leaving
goto done

[hadOral]

; so now you had oral... maybe you have SLSO and that gives you bonus enjoyment
slso_bonus_enjoyment $system.self 15.0

; or maybe you have SexLab P+ instead (this isn't documented for some reason on the wiki; gotta fix that)
sl_adjustenjoyment $system.self 15.0

; or perhaps you are cutoff from orgasms for awhile
sl_disableorgasm $system.self true

; perhaps it just generally increases your arousal
osla_modify_arousal $system.self 15.0

; you also asked about querying the PC's arousal
; there's that:
osla_get_arousal $system.player
; $$ now has the player's arousal value

osla_get_arousal_multiplier $system.player
; there's a setter too

; for long-term storage, there's still
set $jsonfilename "../whatever/somefolder/yourfile.json"

set $defaultint 42

json_getvalue $jsonfilename int "yourkey" $defaultint
set $yourval $$

; there is also a shortcut syntax, where using resultfrom allows you to directly assign the value
set $yourval resultfrom json_getvalue $jsonfilename int "yourkey" $defaultint

inc $yourval 38

; and storage
json_setvalue $jsonfilename int "yourkey" $yourval

; there is string interpolation
msg_notify $"You stored (and we retrieve) {yourval}"

; and globals
set $global.yourglobalvalue 32000
; $global.yourglobalvalue will be available to any script,
; there are also thread and target scopes

; target scope might scratch your itch for actor tied values
; first, if the target variable doesn't translate as an empty string
; consider it initialized
if $target.selfEsteem &!= "" selfEsteemInitialized
; if we are here, we need to initialize, should just be the one time
$target.selfEsteem = $yourval ; you know, from your json file up there?
[selfEsteemInitialized]
; $target.selfEsteem, being a target scoped variable, is per-actor/target
; so the same script running on two different targets will resolve $target.selfEsteem
; to the value associated with that actor
; obviously these are not real ActorValues, so you can't use them as such, but they
; are actor-associated values and will persist across script executions

; let's see... how about... each 10 seconds, whichever between self and partner that has higher
; magicka, either % or absolute based on a json flag, gets a stamina restore while the other 
; gains arousal (we're assuming in this case it represents more self control and an ability
; to enforce arousal on the other)
; and also the loser loses a tiny bit of self esteem, no lower than a set min
; self esteem will be tracked through storageutil
set $jfile "../yourfolder-under-SKSE-Plugins-maybe-qmark-qmark/yourconfig.json"

; the as aforementioned json_getvalue
set $suEsteemKey resultfrom json_getvalue $jfile string "suEsteemKey" "YourSelfEsteemStorageUtilKey"
set $useAbsoluteMana resultfrom json_getvalue $jfile int "useAbsoluteMana" 0 ; default use percentage
set $staminaBoost resultfrom json_getvalue $jfile float "staminaBoost" 15.0
set $arousalBoost resultfrom json_getvalue $jfile float "arousalBoost" 15.0
set $esteemLoss resultfrom json_getvalue $jfile int "esteemLoss" 3
set $secondsBetweenChecks resultfrom json_getvalue $jfile float "secondsBetweenChecks" 4.5
set $defaultEsteem resultfrom json_getvalue $jfile int "defaultEsteem" 80

; and by the way, I'll be introducing while/endwhile in the next release, but for now, the current way
[startpoint]
; okay, do whatever it is you came to do each period

if $useAbsoluteMana == 1 use_absolute_mana
; use percentage mana
set $myvalue resultfrom av_getpercentage $system.self Magicka
set $theirvalue resultfrom av_getpercentage $system.partner Magicka

; skip past this section
goto done_with_mana
[use_absolute_mana]
; use absolute mana
set $myvalue resultfrom av_get $system.self Magicka
set $theirvalue resultfrom av_get $system.partner Magicka

[done_with_mana]

; if they won
if $myvalue <= $theirvalue theywon
; I won

set $winner $system.self
set $loser $system.partner

goto donewinning
[theywon]
; they won

set $winner $system.partner
set $loser $system.self

[donewinning]

av_restore $winner "Stamina" $staminaBoost
osla_modify_arousal $loser $arousalBoost

; man, I just realized how mangled the formatting is for the storageutil docs on the wiki, sorry about that
set $currentLoserEsteem resultfrom storageutil get $loser $suEsteemKey int $defaultEsteem
set $currentLoserEsteem $currentLoserEsteem - $esteemLoss
storageutil set $loser $suEsteemKey int $currentLoserEsteem

; check if we are still in a scene
sl_isin $system.self
set $stillInScene $$ 
; if not still in the scene, go to the exit point of the script
if $stillInScene != true [exitpoint]
; otherwise we loop, and before we loop, we wait
util_wait $secondsBetweenChecks
goto startpoint
[exitpoint]

; you're done... do done things
; say you have a particular Actor in mind
; How about Nazeem?
set $nazeemNPC "Nazeem" ; conveniently also his editorID
set $nazeemNPC "0x0013BBF" ; this will TECHNICALLY work as an absolute formID and is guaranteed ONLY because he is in the base game and thus guaranteed to be at plugin slot 00
set $nazeemNPC "Skyrim.esm:0x013BBF" ; this would be a preferable alternative, leaving enough room for a light mod if it happened to be one
set $nazeemNPC "0x013BBF|Skyrim.esm" ; as would this
set $nazeemNPC "Nazeem" ; but in this case an editorID is the preferable option

; so at some point, if you want to know specifically if an actor is in the room, you have options
set $inTheRoom false

set $inlos resultfrom actor_haslos $system.self $nazeemNPC

if $inlos == false notInTheRoom

; this checks being in the same cell, though of course if you are both just on opposites of cell borders it might be off
set $mycell resultfrom actor_dogetter $system.self GetParentCell
set $nazeemCell resultfrom actor_dogetter $nazeemNPC GetParentCell

if $mycell == $nazeemCell samecell

; check proximity?
; and holy cow I need to work on the documentation... this stuff is abysmal... :(
set $distance resultfrom actor_dofunction $system.self GetDistance $nazeemNPC

if $distance < $maxDistanceForRoomProximity roomDistance



[roomDistance]
set $inTheRoom true
goto respondToRoomCheck

[samecell]
set $inTheRoom true
goto respondToRoomCheck

[notInTheRoom]
; this was already set, so no need to do it here
;set $inTheRoom false
; but maybe something else?
; eh, moving on

; and technically not necessary as we will fall through
; if you're okay with the extra few cycles, it makes the script look more balanced :)
goto respondToRoomCheck

[respondToRoomCheck]

if $inTheRoom == true doInTheRoom
; not in the room?


goto doneRooming
[doInTheRoom]
; do room things



[doneRooming]


;; all done?

 

 

So, as you can see, generally... flow control, variables... language stuff.. it's getting there. It's serviceable. *slaps.. something* Responding less chaotically:

- See the script

- See the script

- See the script

- See the script

- See the script

- Aha... see below

- See the script, maybe?

- Also aha :)

 

The "aha" bits are about mod integration. And while I've done my best to make it as easy as I can for someone to drop code in with some config files and add interactions, as you can see with some of the docs, there's been some growing pains. :) So while I've spent a lot of time on improvements (well, to my mind) to the "scripting engine" side of things, to be honest, I think I've not paid enough attention (balanced anyway) to the other two aspects: mod integration and trigger support.

 

I have added a few things; the Keymapping is my personal favorite as it makes testing easier, but you also have console command access. That said, I've been making a list of sorts, including triggers I want to add. Right now I've been finalizing the last few language features I wanted to add as well as trying to squash bugs; there will be a large number of bug fixes in the next release. Once the dust settles, I definitely want to add things like combat events and such.

 

As for expanding mod support, as I've said, one of the first things I tried to do was expand the number of ways to run a script as well as the number of ways others could expand the functionality, I also get it's a pretty niche product. :) So as a result, it's still reliant on me. Check the wiki though. Although I definitely need to fix it, take a look at util_sendevent, util_sendmodevent, and.. ugh.. okay, I need to fix my automated script that generates the docs. Apparently my spotchecking wasn't sufficient. There are bindings for storageutil and jsonutil, too. Point being that that gives you persistence and some flexibility for e.g. sending events like arousal, FHU, and other events that mod authors expose. Beyond that, I have ideas but nothing firm. I'm always willing to take suggestions, and anyone willing to brave the wilds and help with the documentation would be a champ. :D

 

 

Posted
19 hours ago, MannySauce said:

Is there a way to get and put $system.self/whoever RefID into a var? Did a quick CTRL+F skimming through the docs, so sorry if I missed it.

 

Direct assignment will work.

 

i.e.

 

set $targetVar $system.self

Posted
43 minutes ago, hextun said:

 

Direct assignment will work.

 

i.e.

 

set $targetVar $system.self

 

Oh cool you can just do that huh, thanks. 😘

 

I completely forgot about the base 10 thing, got so confused when it threw numbers like -16773301 into my log.

Posted

It's been a productive couple of days. Based on my updates to the CHANGELOG for v124:

- it has 14 bugfixes (significant enough to bother documenting... so far)

- it has 3 "changes" (not a bug, not a feature, just different)

- it has 8 enhancements

- it has a lot of love put into it

 

What's coming in v124?

; if/endif
set $flag true
set $bigval 100
set $lilval 10
[jumpback]
; simple one argument <bool> check for if/endif
if $flag
  msg_notify "Inside 1 parm if block"
endif
; similarly, you can do the typical operator comparison for an if block
if $lilval < $bigval
  msg_notify "Yes, little is smaller than big"
endif
; and the original versions still work too
if $flag jumpback
if $lilval < $bigval jumpback

; while/endwhile blocks
while $flag
  msg_notify "This will loop forever"
endwhile

while $lilval < $bigval
  msg_notify "This will also loop forever"
endwhile

; nested if and while blocks
if $flag
  ; stuff that will be skipped if $flag is false
  if $lilval < $bigval
    ; inner block, simple parsing would cause the next line to close the 'if $flag'
    ; but the parser (at least was built to be) smart enough to know this is not our endif
  endif
  ; more stuff to be skipped if $flag is false
endif

while $flag
  ; same
  while $lilval < $bigval
    ;same
  endwhile
  ; same
endwhile

; target scope extension
; with target scoped variables, you can tie a variable to the target of the script
set $target.happiness 10
; but what if in your script you want to reference another actor's target variable? what do?
; THIS DO
set $target.<system.player>.happiness 10
set $target.<system.self>.happiness 10
set $anActor $system.player
set $target.<anActor>.happiness 10
set $anActor $system.self
set $target.<anActor>.happiness 10
set $somestring $"interpolation woohoo! {target.<anActor>.happiness}"

; new boolean operators for set and if:
set $flag1 true
set $flag2 false
if $flag1 && $flag2
  ; this code wouldn't execute, because of boolean logic
endif

 

This gets pretty close to feature completion for the language itself, i.e. actual features of the language vs. functions in the function library. The main thing I haven't added yet is lists. And that's not to say that the grammar won't change due to refinements, but in terms of adding features to the language, I'm pretty close to happy. (Whether you know it or not) you have type handling with coercion, you have somewhat more useful control features with if/while/beginsub/goto/call, you have multiple variable scopes, including some with long-term persistence (i.e. global and target scopes persist beyond script runs within your save) as well as disk-storage, and the framework itself has multiple methods of integration/execution, including console commands, mod events to fetch the script list and request one be run, and options to add your own function library to expand the function set. Putting aside the question of bugs remaining, v124 would technically be able to stand as-is and be integrated externally with other mods (i.e. without having an MCM to manage triggers for example, but you could still create a mod, manage your own triggers, and just send events to SLTR to request scripts be run).

 

What this also means is that, again aside from refinement or bug fixes (including potential bug fixes that end up requiring a grammar change), the actual syntax/grammar of the SLTScript language should be pretty close to stable. There are things I've done (oh god, the things I've done)... wait... hold up... wrong thought... there are things I've done to accommodate being very relaxed about SLTScript parsing that have reduced efficiency, but for now I'm okay with those tradeoffs.

 

Post v124:

- fix the documentation

- more triggers

- improved configuration: configurable script loading locations (i.e. specify one or more folders that will contain your custom .sltscript files; specify a specific folder where your trigger files will be created (instead of somewhere in overwrite)

- more bound creation kit functions (i.e. analogs to the various functions in Papyrus script like Actor.GetName()); we have some, but I want to vastly increase what's available, preferably dynamically if possible

Posted

Hot off the presses! v124 is up for download!

 

In a last minute twist, we upped our game: you thought you were getting if/endif? Oh no, no, no... 

 

You got if/elseif/else/endif. TYVM.

 

Also, I broke out the test scripts. They no longer ship by default. But I have a brand new set with over 110 tests raring to be.. um.. tested.

 

Quick question... is there something special I need to do to make said file visible as a download on the main download page? When I go to attach a file, it makes it seem like I'm trying to replace a version of the mod, which I'm not. This is just an ancillary file. sltr_test_scripts.zip

Posted

I should mention I wrote a LOT of SLTScript code for the sltr_test_scripts.zip, so if you want to see examples of working code, specifically new code for the latest version written by me (vs code that has been migrated from the original), there's plenty in the .zip.

Posted

Oh, I further modified the sl_triggers_PlayerTrackerActor code to reduce likelihood of being picked up in scenes and what not. If anyone indicates they are having a problem with it this version I'm going to pull it. It was added to support a feature (trigger on player load screen) that I added simply because it was mentioned in something related to the "on cell change" code. I have other things I'd like to work on if this is problematic, so I would just as soon rip it back out as bother trying to fix it if it won't behave. It's not very tightly integrated. That said, it would be nice to have it working because it could open up some other scripting options. But I digress...

 

I'm eyeballing "Player Combat State Change" trigger for next release. I have a couple of others in mind, too, but does anyone have any suggestions or requests? Feature ideas?

Posted (edited)
5 hours ago, hextun said:

Oh, I further modified the sl_triggers_PlayerTrackerActor code to reduce likelihood of being picked up in scenes and what not. If anyone indicates they are having a problem with it this version I'm going to pull it. It was added to support a feature (trigger on player load screen) that I added simply because it was mentioned in something related to the "on cell change" code. I have other things I'd like to work on if this is problematic, so I would just as soon rip it back out as bother trying to fix it if it won't behave. It's not very tightly integrated. That said, it would be nice to have it working because it could open up some other scripting options. But I digress...

 

I'm eyeballing "Player Combat State Change" trigger for next release. I have a couple of others in mind, too, but does anyone have any suggestions or requests? Feature ideas?

 

How about:

- player becomes unarmed

- player becomes nude

- player bumps/collides with npc

 

Edit:

Also not a trigger per say bc it could be just every xx minutes, but is it possible to do this?

- get random actor

- check arousal

- start sl scene w player

 

Edit 2:

You mentioned you may implement lists soon.

Have you implemented arrays yet? Is json dictionary the only way to store and retrieve key value pairs?

Edited by Fraying9981
Posted
15 hours ago, Fraying9981 said:

 

How about:

- player becomes unarmed

- player becomes nude

- player bumps/collides with npc

 

Edit:

Also not a trigger per say bc it could be just every xx minutes, but is it possible to do this?

- get random actor

- check arousal

- start sl scene w player

 

Edit 2:

You mentioned you may implement lists soon.

Have you implemented arrays yet? Is json dictionary the only way to store and retrieve key value pairs?

 

Your ideas are intriguing to me and I wish to subscribe to your newsletter. :)

 

This morning I've added "Player Location Change" and "Player Equipment Change" triggers.

 

Player Location Change is less granular than Player Cell Change, and you have the following filters:

  Chance, Daytime, Departing Location (inside/outside/wilderness/city/dungeon/etc.), Is Departed Location Cleared, Arriving Location, Is Arrival Location Cleared
  request vars introduced:

    $request.core.from_location

    $request.core.to_location

 

Player Equipment Change occurs for both equipping and unequipping and you have the following filters:

  Is Equipping/Unequipping, Is Unique, Has Enchantments, Item Type (Armor, Weapon, Potion, etc.), Armor Slot (if applicable)
  request vars introduced:

    $request.core.equipped_item.base_form

    $request.core.equipped_item.object_reference

    $request.core.equipped_item.is_equipping

    $request.core.equipped_item.is_unique

    $request.core.equipped_item.has_enchantments

    $request.core.equipped_item.type

 

I've got Player Combat State Change and Player Hit wired up, but I haven't yet set up the MCM or actual trigger handler. Won't take long.

 

"Player Is Unarmed" - could probably be a filter for "Player Equipment Change", like "Was Disarmed", implying not only that the player now has now weapon equipped, but that this event is specifically the cause.

"Player Is Disrobed" - similar, e.g. named "Was Disrobed"

"Player Bump into NPC" - I'll have to look into that; I know some mods already do this, I'm just not clear on how

"Periodic" - There's the "Top of the Hour" event which, without sleeping, is on about a 3 minute interval I think (3 minutes realtime => 1 hour gametime?); that said, maybe a trigger that lets you choose from e.g. "1 minute", 3, 5, 10? realtime, not gametime. 

 

I haven't implemented associative arrays yet either. I've had some thoughts but so far I've not yet settled on an implementation I like. But for now, if you want something like that, yes, you either need to use jsonutil or storageutil.


Anyone feel like testing? :)



 

 

 

Posted

Hello,


I'm upgrading from the old version to yours in a new game, and i can't get armor-type equipment from an ESL plugin to appear.
Here's the JSON file that worked with the old version. The ID was in hexadecimal.
With your new version, i also tried the 0x000 format, but nothing works. )=
I send you the log from sltrigger too.
Can you tell me how to do this?

 

Thanks.

Face Cum SMP.json sl-triggers.log

Posted
4 hours ago, alain31 said:

Hello,


I'm upgrading from the old version to yours in a new game, and i can't get armor-type equipment from an ESL plugin to appear.
Here's the JSON file that worked with the old version. The ID was in hexadecimal.
With your new version, i also tried the 0x000 format, but nothing works. )=
I send you the log from sltrigger too.
Can you tell me how to do this?

 

Thanks.

Face Cum SMP.json 371 B · 2 downloads sl-triggers.log 15.88 kB · 1 download

 

The old version actually used decimal value of the last three hex digits of an ESL form ID (took me a while to work that shit out...).  I can't confirm since I'm still using old version, but I'd bet the new version is using just the hex conversion of the old decimal value - or more simply, just the last 3 digits of the hex form ID. 

 

Try the value replacement for 2057 and 2052 with 809 and 804 respectively.

Posted
9 hours ago, Bigglsby said:

Try the value replacement for 2057 and 2052 with 809 and 804 respectively.

Hello Bigglsby,

Thanks for your help, but i've already tried this form and it doesn't work either )=

Posted
2 hours ago, alain31 said:

Hello Bigglsby,

Thanks for your help, but i've already tried this form and it doesn't work either )=

 

It's a bug. :(

 

I hadn't yet added form-specific regression tests (and you can bet your sweet ass I have now) and when I added the type support recently, the conversion from other types to Form was bugged. It didn't show up in any old tests and as I said, I hadn't yet created new ones.

 

Now I have. :/

 

I'll have a patch ASAP.

Posted
20 hours ago, hextun said:

"Periodic" - There's the "Top of the Hour" event which, without sleeping, is on about a 3 minute interval I think (3 minutes realtime => 1 hour gametime?); that said, maybe a trigger that lets you choose from e.g. "1 minute", 3, 5, 10? realtime, not gametime. 

 

 

that would be awesome!

sth like a tick rate, maybe every 30 secs 

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