Jump to content

Recommended Posts

Posted
On 8/28/2025 at 7:31 PM, MannySauce said:

Is there a way to stitch together a variable name from data in other variables?
I'm hoping to condense a 200+ line script into the single digits with something like:

 

set $Prefix resultfrom function
set $Suffix resultfrom function
inc $"$global.{Prefix}{Suffix}" $global.CindyTheTVsLeaking

 

 

 

Can you give me an idea of what your 200+ line script looks like? Maybe I can help even if this isn't the way?

Posted
On 8/17/2025 at 5:23 PM, Fraying9981 said:

 

if i understand correctly, sl_startsex would trigger sex scenes start based on world conditions.

 

you can do something even better than this mod below, already amazing. I have faith in you :D

 

What I find great in this mod:

  • consensual/non consensual logic
  • probability based system with multiple parameters
  • gender specific settings
  • scene types
  • location based settings (which you already have)

 

Ideas of improvement:

  • player specific settings (in SMM player is mixed with followers which is not ideal as it can directly interrupt your gameplay by triggering a scene with you; the reason for this is not design philosophy but probably rather that the mod author was already busy with all the other options and took a shortcut)
  • sex scene triggers combat option (no sex in public)
  • since SLT is more customizable: define sequences for sex: for example in the case of non con, sequence #1 is groping, sequence #2 is the real thing
  • take/give items after sex (already in SLT)
  • store a list of actors (hall of fame/felony list)

 

 

 

Gave it some thought and roughed out a loose set of triggers and scripts that could get started with something like this.

 

General design:
Multiple triggers with the number and filter settings balanced for optimal performance (i.e. balancing more triggers with specific filters with the overhead of multiple scripts but with less logic in each vs fewer triggers with less selective filters with scripts that have to do more logic). Script activity will either involve setting values or, for the driver script, reading all variables to determine whether to take an action and what action to take.

 

By separating data collection logic from decision making logic, contextually relevant information can be taken advantage of to more optimally gather the relevant information for decision making, without incurring the burden of explicit data collection (which is impossible in some cases). 

 

In some cases, the same script might have both data collection and action logic; data collection would occur first, clearly delineated, followed by any decision making and action logic.

 

In turn, the decision making logic simply looks at "latest recorded state" for relevant variables to make the decision of what to do. An example layout is described below:

 

Triggers:
- Timer:
    - This is your "driver script", that reads variables, makes decisions, and takes actions
    - Delay: 5 minute (adjust to how frequently you wish to have "things happen")
    - Script: MM_Driver.sltscript
        - actions
            - reads variables and makes decisions
            - e.g. if $global.mm_aggressive_scene_count > 5 [ExceededAggressiveSceneCount]
- Timer: 
    - Delay: 1 minute (longer for easier performance)
    - Script: MM_TimerUpdate.sltscript
        - data collection
            - higher frequency
            - reads non event-specific values and updates SLTR variables
                - e.g. set $global.mm_player_arousal resultfrom osla_get_arousal $system.player
- SexLab Start/OStim Start:
    - Player Relationship: Player
    - Script: MM_SexStart.sltscript
        - data collection
            - collects information
                - partner count
                - scene aggression
                - any other factors relevant to the start of a scene
            - store scene data to be retrieved during the end script
            - stores relevant values into variables, possibly with adjustment (like clamping to 0.0..1.0)
                - e.g. inc $global.mm_aggressive_partner_count $partnercount, inc $global.mm_aggressive_scene_count
        - actions
            - the same script (because same cadence, and this event won't spam; should be safe)
            - this could be where, for example, maybe you forcibly stop a scene if you detect conditions to that effect
- SexLab Orgasm Separate/OStim Orgasm:
    - Player Relationship: Player
    - Script: MM_PlayerOrgasm.sltscript
        - data collection
            - player orgasm count, plus condition related data
        - actions
            - optional, not sure what you would want to do right at this point, but sure
- SexLab Orgasm Separate/OStim Orgasm:
    - Player Relationship: Player Partner
    - Script: MM_PlayerPartnerOrgasm.sltscript
        - data collection
            - player partner orgasm count, plus condition related data
        - actions
            - optional, not sure what you would want to do right at this point, but sure
- SexLab End/OStim End:
    - Player Relationship: Player
    - Script: MM_SexEnd_Data.sltscript
        - data collection
            - fetch scene data stored at start to perhaps compare sub-aggregate data (i.e. in-scene orgasm count)
        - actions
            - make end of scene decisions
            - e.g. add items, update faction ranks

 

You mentioned using things like gender specific settings and consensuality logic. I suspect in this case it would be better to have a script that runs regardless of e.g. gender, consensuality, etc. and simply checks for those conditions inside during data collection.

Posted

Not sure if this has been asked before. I scanned through the pages and couldn't find an answer. What I'm trying to do is have one set of equipment on my character, and when a sexlab scene starts, switch to the lewd version of that equipment. Then when the scene ends, switch back to the normal version. Since I know more about marine life on mars than writing script, I have been trying to use AH Hotkeys as a middleman. So my question is, is there a way to make a trigger that just activates a hotkey? Or would this need to be completely written out?

Posted
5 hours ago, Sage Of The Seventh Dab said:

Not sure if this has been asked before. I scanned through the pages and couldn't find an answer. What I'm trying to do is have one set of equipment on my character, and when a sexlab scene starts, switch to the lewd version of that equipment. Then when the scene ends, switch back to the normal version. Since I know more about marine life on mars than writing script, I have been trying to use AH Hotkeys as a middleman. So my question is, is there a way to make a trigger that just activates a hotkey? Or would this need to be completely written out?

Not sure about hotkeys, but it fairly easy to set up what you request as is, either using wairforend, or just with two scripts. For PC, anyway, for NPC the redress bug may or may not be an issue.

Posted
6 hours ago, hextun said:

 

Can you give me an idea of what your 200+ line script looks like? Maybe I can help even if this isn't the way?

 

Spent some time while ill to work it over myself and reached the conclusion "bro what the fuck am I doing I don't need this".
If I hadn't already overwritten the script, I'd be too embarrassed of the mess to share it regardless.

(It was a long list of subroutines with multiple {race}{action} and {race}{count} variables for literally every single race in the game for no other reason than seeing if I could.)

But now I am staring (respectfully) at the new "Stage Start" event - is it on all stages or do you specify which ones?

 

Posted (edited)
18 hours ago, Sage Of The Seventh Dab said:

Not sure if this has been asked before. I scanned through the pages and couldn't find an answer. What I'm trying to do is have one set of equipment on my character, and when a sexlab scene starts, switch to the lewd version of that equipment. Then when the scene ends, switch back to the normal version. Since I know more about marine life on mars than writing script, I have been trying to use AH Hotkeys as a middleman. So my question is, is there a way to make a trigger that just activates a hotkey? Or would this need to be completely written out?

 

Question: Will the "lewd" set be a fixed set of items or can it vary? For example, will it always include e.g. "Red Luxe Corset", with "Red and White Bunny Ears", or were you hoping it would be more variable? It would be easy enough to add a bit of randomization, so that "Collar" might pick from a list of possible collars. Possibly even using themed sets.

 

I'm assuming the following:

- the lewd armor is not in their inventory and must be added at scene start and removed at scene end

- the normal armor should be unequipped to inventory and reequipped from inventory at scene end

- the normal armor can vary during play as normal (i.e. no hard-coding the Leather bikini armor set)

- you can find the armor slot ID for the normal and lewd armor items (e.g. the "basic" 4 are: 30 - head, 32 - body, 33 - hands, 37 - feet, but collars are typically using slot 45 for example)

 

The following script should (untested), using the slot IDs, unequip items in each slot you specify and add and equip lewd versions, wait for the end of the scene, then unequip and remove the lewd versions and reequip the previously unequipped items.

 

** Bad script removed **

Edited by hextun
Posted
27 minutes ago, MannySauce said:

 

Spent some time while ill to work it over myself and reached the conclusion "bro what the fuck am I doing I don't need this".
If I hadn't already overwritten the script, I'd be too embarrassed of the mess to share it regardless.

(It was a long list of subroutines with multiple {race}{action} and {race}{count} variables for literally every single race in the game for no other reason than seeing if I could.)

But now I am staring (respectfully) at the new "Stage Start" event - is it on all stages or do you specify which ones?

 

 

It's for each stage. Say you do the following:

 

Start->Stage 1->Stage 2->back to Stage 1->Stage 2->Stage 3->End

 

You would get the following SexLab events:

- Start

- (followed immediately by) Stage Start (for Stage 1)

- Stage End (for Stage 1)

- (followed immediately by) Stage Start (for Stage 2)

- Stage End (for Stage 2)

- (followed immediately by) Stage Start (for Stage 1)

- Stage End (for Stage 1)

- (followed immediately by) Stage Start (for Stage 2)

- Stage End (for Stage 2)

- (followed immediately by) Stage Start (for Stage 3)

- Stage End (for Stage 3)

- (followed immediately by) End

 

The "(followed immediately by)" is because "Start/Stage Start" happen at the same time basically, and "Stage End/Stage Start" happens at the same time, as does "Stage End/End".

 

I'm.. unfortunately pretty sure I do not know which stage you are on, that is, I have no sl_getstage (I don't think).

 

But... you know... if you wanted... :

 

Stage Tracker:

Trigger: Start

Script: set $target.current_stage 0

 

Trigger: Stage Start(SexLab)/Scene Changed(OStim)

Script: inc $target.current_stage 1

 

Trigger: End

Script: set $target.current_stage -1 ; optional, marker so if you try to use it outside of a scene, you know it's not valid

 

It wouldn't tell you if you went stage 1->stage 2->stage 1, but it would tell you you are on the third stage you have visited so far. And as it is a target scoped variable, it would be tracked and run per actor.

Posted (edited)
32 minutes ago, hextun said:

 

Question: Will the "lewd" set be a fixed set of items or can it vary? For example, will it always include e.g. "Red Luxe Corset", with "Red and White Bunny Ears", or were you hoping it would be more variable? It would be easy enough to add a bit of randomization, so that "Collar" might pick from a list of possible collars. Possibly even using themed sets.

 

I'm assuming the following:

- the lewd armor is not in their inventory and must be added at scene start and removed at scene end

- the normal armor should be unequipped to inventory and reequipped from inventory at scene end

- the normal armor can vary during play as normal (i.e. no hard-coding the Leather bikini armor set)

- you can find the armor slot ID for the normal and lewd armor items (e.g. the "basic" 4 are: 30 - head, 32 - body, 33 - hands, 37 - feet, but collars are typically using slot 45 for example)

 

The following script should (untested), using the slot IDs, unequip items in each slot you specify and add and equip lewd versions, wait for the end of the scene, then unequip and remove the lewd versions and reequip the previously unequipped items.

 

int[] $slots
Form[] $normalArmors
Form[] $lewdArmors

beginsub normal_to_lewd
	; int: $arg_slot
	; string: $arg_lewdformid
	listadd $slots $arg_slot
	set $theArmor resultfrom actor_dofunction $system.self $arg_slot
	listadd $normalArmors $theArmor
	if $theArmor != none
		actor_doconsumer $system.self UnequipItem $theArmor
	endif
	set $lewdArmor resultfrom form_getbyid $arg_lewdformid
	listadd $lewdArmors $lewdArmor
	if $lewdArmor != none
		item_addex $system.self $lewdArmor 1 true
		item_equipex $system.self $lewdArmor $arg_slot false false
	endif
endsub

beginsub lewd_to_normal
	; int: $arg_slot
	if $lewdArmors[$arg_slot] != none
		actor_doconsumer $system.self UnequipItem $lewdArmors[$arg_slot]
		item_remove $system.self $lewdArmors[$arg_slot] 1 true
	endif
	if $normalArmors[$arg_slot] != none
		item_equipex $system.self $normalArmors[$arg_slot] $arg_slot false false
	endif
endsub

; add one of these blocks for each slot
; slot 32 - Body
set $arg_slot 32
; use this rnd_list format to add variety
set $arg_lewdformid resultfrom rnd_list "lewdbodyarmor_01" "lewdbodyarmor_02" "lewdarmor.esp:0xB00B"
gosub normal_to_lewd

; slot 45 - Collar
set $arg_slot 45
; use this direct assignment format if you have a specific set you want
set $arg_lewdformid "lewdarmor.esp:0x869"
gosub normal_to_lewd


; wait until the sex stops
util_waitforend $system.self

; iterate the list of slots and revert
set $slotCount resultfrom listcount $slots
while $slotCount > 0
	inc $slotCount -1
	set $arg_slot $slots[$slotCount]
	gosub lewd_to_normal
endwhile

 

In this particular case I was looking for a specific set. Starting with the Venus Cage, switching to the Venus Cage (Slutty), and then switching back. Only those two pieces would change, slot 32 and 52, I believe. Also thought about some other sets but the basic idea was to keep the same equipment set but switching between the normal and lewd versions. The random idea does have its own appeal though.

Edited by Sage Of The Seventh Dab
punctuation
Posted (edited)
1 hour ago, Sage Of The Seventh Dab said:

In this particular case I was looking for a specific set. Starting with the Venus Cage, switching to the Venus Cage (Slutty), and then switching back. Only those two pieces would change, slot 32 and 52, I believe. Also thought about some other sets but the basic idea was to keep the same equipment set but switching between the normal and lewd versions. The random idea does have its own appeal though.

 

So, should the script assume the Venus Cage starts equipped? And is it safe to assume neither of these involve locking (i.e. devious)?

 

Also, can you provide me the modname e.g. "VenusCages.esp" or whatever, whether it is ESL flagged, and the FormID of the Venus Cage and Venus Cage (Slutty)?

Edited by hextun
Posted
1 hour ago, hextun said:

 

So, should the script assume the Venus Cage starts equipped? And is it safe to assume neither of these involve locking (i.e. devious)?

 

Also, can you provide me the modname e.g. "VenusCages.esp" or whatever, whether it is ESL flagged, and the FormID of the Venus Cage and Venus Cage (Slutty)?

Yes, the Venus Cage would start equipped, and then on scene start would switch to Venus Cage (Slutty), and then on scene end would switch back to Venus Cage.

The mod is from Rektas.

[NINI] Venus Cage [SE].esp

It is an espfe i believe.

Venus Cage Upper FormID is  0VenusCageUpper "Venus Cage Upper" [ARMO:FE000806]

Venus Cage Upper Slutty FormID is 0VenusCageUpperSlutty "Venus Cage Upper Slutty" [ARMO:FE00080A]

Venus Cage Lower FormID is 0VenusCageLower "Venus Cage Lower" [ARMO:FE000807]

Venus Cage Lower Slutty FormID is 0VenusCageLowerSlutty "Venus Cage Lower Slutty" [ARMO:FE00080B]

Posted
7 hours ago, Sage Of The Seventh Dab said:

Yes, the Venus Cage would start equipped, and then on scene start would switch to Venus Cage (Slutty), and then on scene end would switch back to Venus Cage.

The mod is from Rektas.

[NINI] Venus Cage [SE].esp

It is an espfe i believe.

Venus Cage Upper FormID is  0VenusCageUpper "Venus Cage Upper" [ARMO:FE000806]

Venus Cage Upper Slutty FormID is 0VenusCageUpperSlutty "Venus Cage Upper Slutty" [ARMO:FE00080A]

Venus Cage Lower FormID is 0VenusCageLower "Venus Cage Lower" [ARMO:FE000807]

Venus Cage Lower Slutty FormID is 0VenusCageLowerSlutty "Venus Cage Lower Slutty" [ARMO:FE00080B]

 

I removed the previous script as it contained some fairly heinous errors. My apologies. :/

 

So, first, here is a "quick and dirty" script that works specifically with just those items you mentioned. If you try this and it has problems, let me know, but this should be the most straightforward method of doing things.

 

; quick and dirty, assumes 0VenusCageUpper and 0VenusCageLower are already equipped; no customization
item_addex $system.self "0VenusCageUpperSlutty" 1 true
item_addex $system.self "0VenusCageLowerSlutty" 1 true
item_equipex $system.self "0VenusCageUpperSlutty" 32 false false
item_equipex $system.self "0VenusCageLowerSlutty" 52 false false

util_waitforend $system.self

item_equipex $system.self "0VenusCageUpper" 32 false false
item_equipex $system.self "0VenusCageLower" 52 false false
item_remove $system.self "0VenusCageUpperSlutty" 1 true
item_remove $system.self "0VenusCageLowerSlutty" 1 true

 

It adds the two items, then equips each, which of course unequips the current items. Then it waits for the end of the scene (which will be instant if not in a scene, in case you run this outside of a scene) to end, then equips the originals and removes 1 copy each of the ones it added. Easy-peasy.

 

You mentioned, however, being interested in having choices and perhaps expanding this. The following is a (hopefully corrected) script that lets you use that repeated chunk of code for each slot you want to do a swap for. It also has a (commented out) example of how you could modify it to allow for some randomness on a given swapped in item. Note that it adds each armor to a list that you are wearing, including 'none', and then uses that list for the equips, meaning it doesn't really care what you had on previously, it just puts it back on. Also note that I am not taking into account any quest items that cannot or should not be removed, nor am I taking into account devious items which would have locks and such, not to mention other mod-specific items.

 

int[] $slots
Form[] $normal_armors
Form[] $lewd_armors

beginsub normal_to_lewd
	; int: $arg_slot
	; string: $arg_lewdformid
	listadd $slots $arg_slot
	set $the_armor resultfrom actor_dofunction $system.self GetEquippedArmorInSlot $arg_slot
	listadd $normal_armors $the_armor
	set $lewd_armor resultfrom form_getbyid $arg_lewdformid
	listadd $lewd_armors $lewd_armor
	if $lewd_armor != none
		item_addex $system.self $lewd_armor 1 true
		item_equipex $system.self $lewd_armor $arg_slot false false
	endif
endsub

beginsub lewd_to_normal
	; int: $arg_index
	if $lewd_armors[$arg_index] != none
		actor_doconsumer $system.self UnequipItem $lewd_armors[$arg_index]
		item_remove $system.self $lewd_armors[$arg_index] 1 true
	endif
	if $normal_armors[$arg_index] != none
		item_equipex $system.self $normal_armors[$arg_index] $slots[$arg_index] false false
	endif
endsub

; add one of these blocks for each slot
set $arg_slot 32
set $arg_lewdformid "0VenusCageUpperSlutty"
;; use this rnd_list format to add variety
;set $arg_lewdformid resultfrom rnd_list "lewdarmor.esp:0x801" "otherlewdarmor.esp:0x12345" "LewdArmorEditorID"
gosub normal_to_lewd

set $arg_slot 52
set $arg_lewdformid "0VenusCageLowerSlutty"
gosub normal_to_lewd

; wait until the sex stops
util_waitforend $system.self

; iterate the list of slots and revert
set $arg_index resultfrom listcount $slots
while $arg_index > 0
	inc $arg_index -1
	gosub lewd_to_normal
endwhile

 

Posted
3 hours ago, hextun said:

 

I removed the previous script as it contained some fairly heinous errors. My apologies. :/

 

So, first, here is a "quick and dirty" script that works specifically with just those items you mentioned. If you try this and it has problems, let me know, but this should be the most straightforward method of doing things.

 

; quick and dirty, assumes 0VenusCageUpper and 0VenusCageLower are already equipped; no customization
item_addex $system.self "0VenusCageUpperSlutty" 1 true
item_addex $system.self "0VenusCageLowerSlutty" 1 true
item_equipex $system.self "0VenusCageUpperSlutty" 32 false false
item_equipex $system.self "0VenusCageLowerSlutty" 52 false false

util_waitforend $system.self

item_equipex $system.self "0VenusCageUpper" 32 false false
item_equipex $system.self "0VenusCageLower" 52 false false
item_remove $system.self "0VenusCageUpperSlutty" 1 true
item_remove $system.self "0VenusCageLowerSlutty" 1 true

 

It adds the two items, then equips each, which of course unequips the current items. Then it waits for the end of the scene (which will be instant if not in a scene, in case you run this outside of a scene) to end, then equips the originals and removes 1 copy each of the ones it added. Easy-peasy.

 

You mentioned, however, being interested in having choices and perhaps expanding this. The following is a (hopefully corrected) script that lets you use that repeated chunk of code for each slot you want to do a swap for. It also has a (commented out) example of how you could modify it to allow for some randomness on a given swapped in item. Note that it adds each armor to a list that you are wearing, including 'none', and then uses that list for the equips, meaning it doesn't really care what you had on previously, it just puts it back on. Also note that I am not taking into account any quest items that cannot or should not be removed, nor am I taking into account devious items which would have locks and such, not to mention other mod-specific items.

 

int[] $slots
Form[] $normal_armors
Form[] $lewd_armors

beginsub normal_to_lewd
	; int: $arg_slot
	; string: $arg_lewdformid
	listadd $slots $arg_slot
	set $the_armor resultfrom actor_dofunction $system.self GetEquippedArmorInSlot $arg_slot
	listadd $normal_armors $the_armor
	set $lewd_armor resultfrom form_getbyid $arg_lewdformid
	listadd $lewd_armors $lewd_armor
	if $lewd_armor != none
		item_addex $system.self $lewd_armor 1 true
		item_equipex $system.self $lewd_armor $arg_slot false false
	endif
endsub

beginsub lewd_to_normal
	; int: $arg_index
	if $lewd_armors[$arg_index] != none
		actor_doconsumer $system.self UnequipItem $lewd_armors[$arg_index]
		item_remove $system.self $lewd_armors[$arg_index] 1 true
	endif
	if $normal_armors[$arg_index] != none
		item_equipex $system.self $normal_armors[$arg_index] $slots[$arg_index] false false
	endif
endsub

; add one of these blocks for each slot
set $arg_slot 32
set $arg_lewdformid "0VenusCageUpperSlutty"
;; use this rnd_list format to add variety
;set $arg_lewdformid resultfrom rnd_list "lewdarmor.esp:0x801" "otherlewdarmor.esp:0x12345" "LewdArmorEditorID"
gosub normal_to_lewd

set $arg_slot 52
set $arg_lewdformid "0VenusCageLowerSlutty"
gosub normal_to_lewd

; wait until the sex stops
util_waitforend $system.self

; iterate the list of slots and revert
set $arg_index resultfrom listcount $slots
while $arg_index > 0
	inc $arg_index -1
	gosub lewd_to_normal
endwhile

 

Thank you very much. I'll try these out and today.

Posted

Next release is in progress but a bit tepid. Currently, I've added the "weapon_*" series of functions for Weapon objects, I've added a new SLTScript, "Show Limited Racemenu" which does what it says, similar to Vanity Mirror mod, and made a lot of documentation cleanups and a few odd bits and bobs. Nothing big.

 

I'm looking at swimming. I have something in progress that seems, so far, to properly detect when you start and stop swimming, along with the ability to determine an amount of game time you've spent in the water. I haven't hooked it up to anything yet, but..

 

I'm also looking at SexLab Survival and see that in fact it has quite a few mod event and API integrations available. And one thing that's bothered me with the modlist I play is, since it lacks Frostfall, the "drenched licenses get destroyed" setting doesn't work. Frostfall introduces a "Wetness" attribute and in the SLS code, once it gets over something like 550?590? the setting triggers.

 

I'm considering the "Swim Start" and "Swim Stop" triggers. To get the SLS license drenching behavior, you would have to start the script, note the game time, then, for example, wait 0.5 seconds and check the amount of time spent swimming (I'd have to introduce that as a new system variable) and, if it has increased, do your checks. Maybe after each 0.5 second increment, the percent chance increases by 5% from the baseline (just jumping in gets you, say, a 25% chance per check to destroy a license), so then, for each 0.5 second, the chance goes up. If no licenses are found, or once the swim time goes down (i.e. you are no longer swimming, or exited) you exit the script.

 

Thoughts?

Posted (edited)

I was looking for a way to have a nice little breakdown after aggressive sex.  like maybe an assault from defeat or something like that.  Hoping for crying, some tears and running mascara.  I'm assuming slavetats could be used?  no idea where to get crying from.  Plus i have no idea what the script would look like.  I am totally ok with someone else writing it and I will just sit back and enjoy 😁

 

Being able to run it at will would be nice as well, sometimes you just need a good cry.

Edited by alex61821
more thoughts
Posted (edited)

I noticed that with the current version my scripts no longer fire if I set Partner Sex to anything other than Any. I wanted to restrict my hunger restoration script (Eat Food) so that the script would only fire if the partner (my character) is female - since I can't set the partner to Player, I specified female instead - and only if the script target is a male. 

 

I tested 3 times:

1. Partner Sex Female. Result: Eat Food does not fire

2. Partner Sex Male. Result: Eat Food does not fire

3. Partner Sex All. Result: Eat Food fires.

 

I tested this at High Hrothgar with one of the Greybeards using the Blowjob animation in all 3 tests.

 

As you can see I am very confused about whether this is an SLTriggers issue or is this an understanding issue because it is my understanding that Partner Sex refers to what the script target's partner's sex is.

 

This is my log file showing the results of the 3 tests.

sl-triggers.log

 

This is the Eat Food script:

;;;;
;; Action check
set $hasAction resultfrom ostim_hasaction "blowjob"
if $hasAction [Oral]
set $hasAction resultfrom ostim_hasaction "deepthroat"
if $hasAction [Oral]
; all else leave
return

[Oral]
;; Action check
;;;;

set $survivalFood resultfrom rnd_list "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" "SLTriggers-Addon.esp:0x802" "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" "SLTriggers-Addon.esp:0x800"
item_adduse $system.player $survivalFood 1 0

if $system.self != $system.player
	ostim_stallclimax $system.self
endif

 

And this is my screenshot showing how the trigger for Eat Food is set up: 

 

Spoiler

image.thumb.png.34f6a77098092b99bc5032635b71f7cf.png

 

Can you please shed light on whether this is an SLTriggers issue or an understanding issue? Thanks again!

Edited by just let me download
Posted (edited)
7 hours ago, just let me download said:

I noticed that with the current version my scripts no longer fire if I set Partner Sex to anything other than Any. I wanted to restrict my hunger restoration script (Eat Food) so that the script would only fire if the partner (my character) is female - since I can't set the partner to Player, I specified female instead - and only if the script target is a male. 

 

I tested 3 times:

1. Partner Sex Female. Result: Eat Food does not fire

2. Partner Sex Male. Result: Eat Food does not fire

3. Partner Sex All. Result: Eat Food fires.

 

I tested this at High Hrothgar with one of the Greybeards using the Blowjob animation in all 3 tests.

 

As you can see I am very confused about whether this is an SLTriggers issue or is this an understanding issue because it is my understanding that Partner Sex refers to what the script target's partner's sex is.

 

This is my log file showing the results of the 3 tests.

sl-triggers.log 105.32 kB · 1 download

 

This is the Eat Food script:

;;;;
;; Action check
set $hasAction resultfrom ostim_hasaction "blowjob"
if $hasAction [Oral]
set $hasAction resultfrom ostim_hasaction "deepthroat"
if $hasAction [Oral]
; all else leave
return

[Oral]
;; Action check
;;;;

set $survivalFood resultfrom rnd_list "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" "SLTriggers-Addon.esp:0x802" "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" "SLTriggers-Addon.esp:0x800"
item_adduse $system.player $survivalFood 1 0

if $system.self != $system.player
	ostim_stallclimax $system.self
endif

 

And this is my screenshot showing how the trigger for Eat Food is set up: 

 

  Reveal hidden contents

image.thumb.png.34f6a77098092b99bc5032635b71f7cf.png

 

Can you please shed light on whether this is an SLTriggers issue or an understanding issue? Thanks again!

 

*cough* *mumbles something about sl_triggersExtensionCore.psc, line 825*

 

*ahem*

 

*pointless code babble removed*

 

I'll fix that in the next release.

 

In the meantime, keep in mind that the "Partner Sex", "Partner Race", and "Partner Role" filters are all relative to the target; if you specify "Player Relationship: Partner Player" you shouldn't use "Partner Sex" (or probably even "Partner Race") *unless* you expect to use this trigger with multiple different saves where your player choices differ and matter (i.e. play a save as a Male and a save as a Female (and maybe a save as .. Goat? a Draugr?)).

 

So if you specify "Partner Relationship: Partner Player", you can safely (at least) the "Partner Sex: " filter because the Player is the only valid partner and unless you specify the same traits for each "Partner X" filter as fits the Player, you'll automatically disqualify your trigger.

 

Short answer (TL;AR): remove the "Partner Sex" filter altogether; it is not only currently bugged for the "Female" option, it is superfluous if a) you also have "Partner Player" chosen and b) your PC is a Female.

 

ETA: It occurs to me you may wonder when this crept in and why; I made a slight logic adjustment that changed some booleans to integers, accruing a count instead of determining simple true/false status. This was meant to align with a few other stats that I had added after I had implemented the first (two, actually). I did not test this in the OStim environment, making the assumption I hadn't made any mistakes when copying the change from the first extension I implemented it in. 

 

(tl;ar) - Too Late; Already Read ... kinda like this...

Edited by hextun
Posted

Okay, v0.930 released. I had been sitting on it for no real reason, but with the OStim bug, here it is. 

 

Savegame compatible
Reminder: Note 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: Keymapping intermittent unresponsiveness
bugfix: OStim: Partner Sex: Female; fails due to logic error
enhancement: added weapon_doaction/weapon_dogetter/weapon_doconsumer/weapon_dofunction to implement Weapon related functions
enhancement: added script: "Show Limited RaceMenu.sltscript" - shows the limited Race selection menu, which has race and sex options removed (like Vanity Mirror mod)
change: PetCollarGame: remove collar from player inventory with 1 sec delay after sending manipulate event to PetCollar mod to unequip
change: reduced log chatter for "ConsumptionLifestyle"
documentation: numerous documentation improvements and standardizations

 

Keymapping Issues

I had made the keymapping handler too smart for its own good and fixed an issue.

 

An outstanding issue, however, occurs when you alt-tab out of the game (say, to check a browser for quest info or a console command); similar to the walk mode getting stuck issue, the state of the alt button (or sometimes other modifier buttons I guess?) gets "stuck", at least until you tap it again. So say you have your "Cheat Heal Me +100" script mapped to a hotkey, you're in a fight, about to die, you alt-tab out, look up a strat or to find out why they are still invuln, you alt-tab back in, try to use your hot key, and it fails.

 

Now, you might ask "wait, my keymapping doesn't even USE a modifier key, why would it being stuck matter?". So, about that.

 

Back in release 0.128, I added a change so that if a keymapping did not require a modifier key, but one of the "standard" modifier keys was currently pressed, the keymapping would no longer fire. This was to address one of my longstanding pet peeves about the "modifier key" setup with hotkeys. Using a key with a modifier (like 'LShift' + '=') won't prevent anything listening for just the key (i.e. '=' in this case) from doing reacting. 

 

So if you create a Keymapping for '=' and some other mod is configured for 'LShift' (or 'RShift' or 'Ctrl' or 'Alt') + '=', then your Keymapping will get activated every time you go to activate the LShift+= hotkey.

 

When the 'Alt/Ctrl/Shift' status gets sticky due to e.g. alt-tab activity, it reverses the state and the logic for preventing activation kicks in.

 

I've found that tapping said key when I notice my keymappings not working seems to fix the issue. That said, I've also added a mod to my own modlist, AltTabFix, whose sole purpose is to address this problem.

 

It does so by sending Skyrim.exe notifications to release the key states for such keys when window focus changes (i.e. it's a SKSE plugin that grabs Windows events and sends Skyrim messages in response; quite nifty). So far it's addressed the issue, and I remain hopeful. Other than this, the prevention-when-modifier-pressed-and-not-desired functionality seems to work as expected and this particular issue seems to be pretty much in line with other related problems. As such, I'm loathe as yet to remove the prevention logic. Jury remains out.

 

OStim Fix

Yeah, silly error on my part. Weird typo. I know how it happened and can still feel the tug of logic in my head (but... "not otherFemales"; yeah, I know, buddy) but still, goofy error. Should be fixed; still watching.

 

weapon_*

The do* family of functions now exists for the Weapon script: weapon_dogetter, weapon_doconsumer, to implement functionality as has been done for Form, ObjectReference, Actor, ActorBase, Quest, and Armor. There were no "Action" or "Function" class functions for Weapon, interestingly enough.

 

Show Limited RaceMenu.sltscript

This will display the RaceMenu selection, but with "Race" and "Sex" disabled, similar to the Vanity Mirror mod. 

 

I also made a dedicated pass to fix up a lot of documentation. Let me know if you see any issues.

Posted (edited)
1 hour ago, hextun said:

 

In the meantime, keep in mind that the "Partner Sex", "Partner Race", and "Partner Role" filters are all relative to the target; if you specify "Player Relationship: Partner Player" you shouldn't use "Partner Sex" (or probably even "Partner Race") *unless* you expect to use this trigger with multiple different saves where your player choices differ and matter (i.e. play a save as a Male and a save as a Female (and maybe a save as .. Goat? a Draugr?)).

 

 

The original reason was to account for threesome cases to avoid the script firing twice in an MMF scene, which was what I observed a few times. But now that I think of it, it was because the Ostim Action setting for my Eat Food trigger got reset to Any instead of Oral (I had to change it before I made that screenshot), so I unintentionally found this bug trying to fix the double firing unnecessarily.

 

While I am still here, I would like to know if there is a way to filter out my female PC from a female NPC in an MFF scene to avoid a potential misfiring of the Eat Food script? For example if the female NPC is giving a blowjob to a male NPC, and not my PC.

 

Could I do something like this? I don't know if participants can be compared like this, I just took a chance on it when I did a similar comparison for the stall climax part.

 

if $system.partner == $system.player
  set $survivalFood resultfrom rnd_list "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" "SLTriggers-Addon.esp:0x802" "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" "SLTriggers-Addon.esp:0x800"
  item_adduse $system.player $survivalFood 1 0
endif

 

Anyways, thank you for the latest release!

Edited by just let me download
Posted
2 hours ago, just let me download said:

 

The original reason was to account for threesome cases to avoid the script firing twice in an MMF scene, which was what I observed a few times. But now that I think of it, it was because the Ostim Action setting for my Eat Food trigger got reset to Any instead of Oral (I had to change it before I made that screenshot), so I unintentionally found this bug trying to fix the double firing unnecessarily.

 

While I am still here, I would like to know if there is a way to filter out my female PC from a female NPC in an MFF scene to avoid a potential misfiring of the Eat Food script? For example if the female NPC is giving a blowjob to a male NPC, and not my PC.

 

Could I do something like this? I don't know if participants can be compared like this, I just took a chance on it when I did a similar comparison for the stall climax part.

 

if $system.partner == $system.player
  set $survivalFood resultfrom rnd_list "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" "SLTriggers-Addon.esp:0x802" "SLTriggers-Addon.esp:0x800" "SLTriggers-Addon.esp:0x801" "SLTriggers-Addon.esp:0x800"
  item_adduse $system.player $survivalFood 1 0
endif

 

Anyways, thank you for the latest release!

 

The classic "Whose Load Is It Anyway?!"; love that gameshow.

 

As an OStim user, your partners are $system.ostim.partner1-4 (https://github.com/lynnpye/sl_triggers/wiki/Scripts#system). The "$system.partner1-4" series is for SexLab; they were first and got the good real estate. :(

 

You can safely do comparisons like "if $system.player == $system.ostim.partner1" and so on.

 

But the crux of the problem: which participant is the receiver for a given M orgasm?

 

You describe an MFF scene and want to "filter out your female PC from a female NPC in an MFF scene" and you describe if the NPC is giving a blowjob and not your PC. 

 

 

In any case, I can help you find e.g. "the first F listed in the scene" which is not in any particular guaranteed order and therefore, aside perhaps from consistency, could *almost* be construed as random, except that it would presumably be consistent within a scene, for example.

 

But I have no good way (that I am aware of) of knowing off hand whether *this* or *that* particular F in the MFF scene was the *specific* F that was receiving from the M that orgasmed.

 

Does that clear anything up? The upshot being, until I am confident in saying I know how to tell who the receiver was, the best I can suggest is iterate your partners, checking actor_gender for female and using the first you find. (Or that matches your list of prostitutes; I'm still a little unclear on who's doing what just yet :)

 

 

 

 

 

Posted (edited)
8 hours ago, hextun said:

 

The classic "Whose Load Is It Anyway?!"; love that gameshow.

 

As an OStim user, your partners are $system.ostim.partner1-4 (https://github.com/lynnpye/sl_triggers/wiki/Scripts#system). The "$system.partner1-4" series is for SexLab; they were first and got the good real estate. :(

 

You can safely do comparisons like "if $system.player == $system.ostim.partner1" and so on.

 

But the crux of the problem: which participant is the receiver for a given M orgasm?

 

You describe an MFF scene and want to "filter out your female PC from a female NPC in an MFF scene" and you describe if the NPC is giving a blowjob and not your PC. 

 

 

In any case, I can help you find e.g. "the first F listed in the scene" which is not in any particular guaranteed order and therefore, aside perhaps from consistency, could *almost* be construed as random, except that it would presumably be consistent within a scene, for example.

 

But I have no good way (that I am aware of) of knowing off hand whether *this* or *that* particular F in the MFF scene was the *specific* F that was receiving from the M that orgasmed.

 

Does that clear anything up? The upshot being, until I am confident in saying I know how to tell who the receiver was, the best I can suggest is iterate your partners, checking actor_gender for female and using the first you find. (Or that matches your list of prostitutes; I'm still a little unclear on who's doing what just yet :)

 

 

 

 

 

 

My intention was to be able to differentiate between a female NPC and my female PC giving a BJ to a male NPC, so if we had this situation:

 

  • Female NPC is giving male NPC a blowjob, while my female PC is doing something else, for example, kissing the male NPC.
  • If the male NPC orgasms and triggers the script, under action type "oral", I would have wanted SLTriggers to be able to tell which 2 NPCs are involved in the "blowjob" action (female NPC, male NPC)
  • ... And also be able to tell that the female NPC (not the female PC) is involved in the blowjob action

Each scene of an Ostim scene has enough information to be able to tell which actor is doing what action to which actor. For example, in Billyy's MFF animation that contains cowgirl vaginal sex and face-sitting, the actions are defined as such:

 

"actions":[
		{
			"type": "vaginalsex",
			"actor": 0,
			"target": 1,
			"performer": 1
		},
		{
			"type": "cunnilingus",
			"actor": 0,
			"target": 2,
			"performer": 2
		},
		{
			"type": "holdingleg",
			"actor": 1,
			"target": 0
		}
	]

 

Let's say (hypothetically) that I wanted a script to trigger Eat Food for any player actor that performs cunnilingus on a female NPC and causes her to orgasm. Looking above, if actor 2 orgasms, the script would trigger Eat Food for actor 0 if they (actor 0) were a player, or do nothing if actor 0 was not a player. With this given information, the script wouldn't consider actor 1 at all for the purposes of the Eat Food script since they weren't involved in the cunnilingus action. 

 

Is it true that SLTriggers can't use this information to be more specific in determining which actor is which? Edit: I took a look at some SexLab animations and it seems that SL config files don't have as much detail like who is doing what action on who, so this is likely not possible. I think it would be unreasonable to ask for Ostim-specific features to be added when SLTriggers is meant to support both SL and Ostim, so I'm fine with things as is, I'm already used to similar issues with other mods that support SL/Ostim together.

 

Also thanks for linking me that part of the wiki. There's a lot of information to take in and I will continue trying to read and understand it. 

Edited by just let me download
Posted

Did you know you can queue other scripts from your script without using call? Making them run in a completely different thread? i.e. asynchronous processing?

 

util_sendmodevent "OnSLTRequestCommand" "SLTScript name"

 

Just replace "SLTScript name" with the actual script name of choice and you could have long-running scripts that in turn fire off other scripts, but asynchronously unlike with call.

 

The difference is when things get executed. If you use call, i.e.:

    call "SLTScript name"

 

execution of your current script stops until "SLTScript name" completes, then your current script returns.

 

If you use util_sendmodevent, e.g.:

    util_sendmodevent "OnSLTRRequestCommand" "SLTScript name"

 

the request gets queued but execution returns immediately; it's just another single command. The new script gets its own thread and now will start executing alongside your current script.

 

Posted
15 hours ago, just let me download said:

 

My intention was to be able to differentiate between a female NPC and my female PC giving a BJ to a male NPC, so if we had this situation:

 

  • Female NPC is giving male NPC a blowjob, while my female PC is doing something else, for example, kissing the male NPC.
  • If the male NPC orgasms and triggers the script, under action type "oral", I would have wanted SLTriggers to be able to tell which 2 NPCs are involved in the "blowjob" action (female NPC, male NPC)
  • ... And also be able to tell that the female NPC (not the female PC) is involved in the blowjob action

Each scene of an Ostim scene has enough information to be able to tell which actor is doing what action to which actor. For example, in Billyy's MFF animation that contains cowgirl vaginal sex and face-sitting, the actions are defined as such:

 

"actions":[
		{
			"type": "vaginalsex",
			"actor": 0,
			"target": 1,
			"performer": 1
		},
		{
			"type": "cunnilingus",
			"actor": 0,
			"target": 2,
			"performer": 2
		},
		{
			"type": "holdingleg",
			"actor": 1,
			"target": 0
		}
	]

 

Let's say (hypothetically) that I wanted a script to trigger Eat Food for any player actor that performs cunnilingus on a female NPC and causes her to orgasm. Looking above, if actor 2 orgasms, the script would trigger Eat Food for actor 0 if they (actor 0) were a player, or do nothing if actor 0 was not a player. With this given information, the script wouldn't consider actor 1 at all for the purposes of the Eat Food script since they weren't involved in the cunnilingus action. 

 

Is it true that SLTriggers can't use this information to be more specific in determining which actor is which? Edit: I took a look at some SexLab animations and it seems that SL config files don't have as much detail like who is doing what action on who, so this is likely not possible. I think it would be unreasonable to ask for Ostim-specific features to be added when SLTriggers is meant to support both SL and Ostim, so I'm fine with things as is, I'm already used to similar issues with other mods that support SL/Ostim together.

 

Also thanks for linking me that part of the wiki. There's a lot of information to take in and I will continue trying to read and understand it. 

 

I'll keep this on the backburner (I keep a working todo.txt file to keep track of ideas, goals, progress). I'm not opposed to adding OStim specific code, I just need to know what to add. :) It's obviously a solved problem, even in SexLab, or else mods that do things like add overlays after blowjobs and such would never work right. Probably some API call I can expose via binding.

Posted
2 hours ago, hextun said:

 

I'll keep this on the backburner (I keep a working todo.txt file to keep track of ideas, goals, progress). I'm not opposed to adding OStim specific code, I just need to know what to add. :) It's obviously a solved problem, even in SexLab, or else mods that do things like add overlays after blowjobs and such would never work right. Probably some API call I can expose via binding.

 

You are too awesome, thanks for considering this.

Posted

v 0.940 is released and looking for vengeance! It's an action packed summer thriller!

 

First, I'm going to get this out of the way: I made a change to the harvest detection. I *had* been using the activated event, which fires very frequently, and simply filtered for TREE/FLORA/ACTI as needed. It fires pretty frequently and I didn't like the looseness of the implementation. However, there is a selection of harvestable items, mainly bugs and fish, which required that I manually detect for them. I switched to using the HarvestedEvent, which obviously fires far more selectively, BUT appears to have the same problem I had when I originally wrote my version, which is that it ignores a particular selection of harvestable items. I suspect this is probably common, as most likely most devs would use the HarvestedEvent as I have and accept the missed harvestables. I may revert this but am rolling with it for now.

 

Bleh, that said... on to the fun bits.

 

NEW TRIGGERS

 

Player Swim Start/Stop - this will fire when your player is in water and transitions from effectively walking to effectively swimming (or vice versa)

  filter: Either/Start/Stop

Player Water Enter/Exit - this will fire when your player steps foot into water or leaves it

  filter: Either/Enter/Exit

Soul Trap - this will fire for *any* actor trapping another actor

  filter: Is Player/Is Not Player/Either

  location

  daytime

 

NEW FUNCTION

actor_submerged_level <actor> - float: returns the "submerged level", [0.0, 1.0], where 0.0 is not touching water and 1.0 is fully submerged

 

NEW VARIABLES

$system.player.is_swimming : bool - (Added by SLTR Core) true if player is swimming; false otherwise
$system.player.is_in_water : bool - (Added by SLTR Core) true if player is in water; false otherwise
$system.player.submerged_level : float - (Added by SLTR Core) current submerged level of player; 0.0 if not in water, 1.0 if fully submerged
$system.player.swimming_start_gametime : float - (Added by SLTR Core) gametime when player started current swim session; resets to 0.0 when not swimming
$system.player.in_water_start_gametime : float - (Added by SLTR Core) gametime when player started current in water session; resets to 0.0 when player leaves water
$system.player.swimming_session : int - (Added by SLTR Core) unique int ID to identify a period of unbroken time player spent swimming; 0 if not swimming
$system.player.in_water_session : int - (Added by SLTR Core) unique int ID to identify a period of unbroken time player spent in water; 0 if not in water
$system.player.swimming_duration : float - (Added by SLTR Core) gametime duration player has currently spent swimming; 0.0 if not currently swimming
$system.player.in_water_duration : float - (Added by SLTR Core) gametime duration player has currently spent in water; 0.0 if not currently in water
$system.player.swimming_last_start_gametime : float - (Added by SLTR Core) gametime when player started previous swim session
$system.player.in_water_last_start_gametime : float - (Added by SLTR Core) gametime when player started previous in water session
$system.player.swimming_last_duration : float - (Added by SLTR Core) gametime duration player was last swimming; might be very small for repeated re-entries of deep water
$system.player.in_water_last_duration : float - (Added by SLTR Core) gametime duration player was last in water; might be very small for repeated re-entries of shallow water

 

NEW REQUEST VARIABLES

$request.core.soul_trapped.trapper : Form - (Added by SLTR Core) (for Soul Trapped) the trapper who trapped the target
$request.core.soul_trapped.target : Form - (Added by SLTR Core) (for Soul Trapped) the target that was trapped

 

And I don't know what, if anything, I would yet do with this (SLS license destruction without Frostfall?) but here is a wetness monitor setup, using two triggers and two scripts, hooked up to the Water Enter and Water Exit triggers.

 

It tracks time in and out of water and keeps a global variable updated with your "wetness", which ranges from 0 to 100. I could imagine that you could have another script entirely that performs actions based on the global wetness variable (again, SLS licenses should start feeling real nervous).

 

Wetness-WaterExit.jsonWetness-WaterEntry.json

 

Wetness-WaterEntry.sltscript

Spoiler
deb_msg "Wetness-WaterEntry"
set $water_session $system.player.in_water_session
if $water_session == 0
	deb_msg "Wetness-Waterentry: not in water; exiting early"
	return
endif
set $typeid resultfrom typeid $global.sltr_current_wetness
if $typeid == 0
	deb_msg "Wetness-WaterEntry: $global.sltr_current_wetness typeid is RT_INVALID; initializing"
	set $global.sltr_current_wetness 0.0
endif
set $water_time $system.gametime
while $water_session == $system.player.in_water_session
	if $global.sltr_current_wetness < 100.0
		set $gametime_slice $system.gametime - $water_time
		set $water_time $system.gametime
		set $accrued_wetness $gametime_slice * 14400
		set $accrued_wetness $accrued_wetness * $system.player.submerged_level
		inc $global.sltr_current_wetness $accrued_wetness
		if $global.sltr_current_wetness > 100.0 ; some arbitrary "max wetness"
			set $global.sltr_current_wetness 100.0
		endif
	endif
	deb_msg $"Wetness-WaterEntry - Current Wetness({$global.sltr_current_wetness})"
	util_wait 0.5
endwhile
deb_msg $"Wetness-WaterEntry Stop water_session({$water_session}) in_water_session({$system.player.in_water_session})"

 

 

Wetness-WaterExit.sltscript

Spoiler
deb_msg "Wetness-WaterExit"
set $dry_start $system.player.in_water_last_start_gametime
if $system.player.is_in_water == true
	deb_msg "Wetness-WaterExit: player in water; exiting immediately"
	return
endif
set $typeid resultfrom typeid $global.sltr_current_wetness
if $typeid == 0
	deb_msg "Wetness-WaterEntry: $global.sltr_current_wetness typeid is RT_INVALID; initializing"
	set $global.sltr_current_wetness 0.0
endif
while $global.sltr_current_wetness > 0.0
	if $dry_start != $system.player.in_water_last_start_gametime
		deb_msg "Wetnes-WaterExit: player has re-entered water at some point; exiting"
		return
	endif
	if $system.player.is_in_water == true
		deb_msg "Wetness-WaterExit: player in water; exiting inside loop"
		return
	endif
	util_wait 1.0
	inc $global.sltr_current_wetness -2.5
	if $global.sltr_current_wetness < 0.0
		set $global.sltr_current_wetness 0.0
	endif
	deb_msg $"Wetness-WaterExit - Current Wetness({$global.sltr_current_wetness})"
endwhile
deb_msg "Wetness-WaterExit Stop"

 

 

 

Posted
On 9/3/2025 at 6:35 AM, hextun said:

 

I removed the previous script as it contained some fairly heinous errors. My apologies. :/

 

So, first, here is a "quick and dirty" script that works specifically with just those items you mentioned. If you try this and it has problems, let me know, but this should be the most straightforward method of doing things.

 

; quick and dirty, assumes 0VenusCageUpper and 0VenusCageLower are already equipped; no customization
item_addex $system.self "0VenusCageUpperSlutty" 1 true
item_addex $system.self "0VenusCageLowerSlutty" 1 true
item_equipex $system.self "0VenusCageUpperSlutty" 32 false false
item_equipex $system.self "0VenusCageLowerSlutty" 52 false false

util_waitforend $system.self

item_equipex $system.self "0VenusCageUpper" 32 false false
item_equipex $system.self "0VenusCageLower" 52 false false
item_remove $system.self "0VenusCageUpperSlutty" 1 true
item_remove $system.self "0VenusCageLowerSlutty" 1 true

 

It adds the two items, then equips each, which of course unequips the current items. Then it waits for the end of the scene (which will be instant if not in a scene, in case you run this outside of a scene) to end, then equips the originals and removes 1 copy each of the ones it added. Easy-peasy.

 

You mentioned, however, being interested in having choices and perhaps expanding this. The following is a (hopefully corrected) script that lets you use that repeated chunk of code for each slot you want to do a swap for. It also has a (commented out) example of how you could modify it to allow for some randomness on a given swapped in item. Note that it adds each armor to a list that you are wearing, including 'none', and then uses that list for the equips, meaning it doesn't really care what you had on previously, it just puts it back on. Also note that I am not taking into account any quest items that cannot or should not be removed, nor am I taking into account devious items which would have locks and such, not to mention other mod-specific items.

 

int[] $slots
Form[] $normal_armors
Form[] $lewd_armors

beginsub normal_to_lewd
	; int: $arg_slot
	; string: $arg_lewdformid
	listadd $slots $arg_slot
	set $the_armor resultfrom actor_dofunction $system.self GetEquippedArmorInSlot $arg_slot
	listadd $normal_armors $the_armor
	set $lewd_armor resultfrom form_getbyid $arg_lewdformid
	listadd $lewd_armors $lewd_armor
	if $lewd_armor != none
		item_addex $system.self $lewd_armor 1 true
		item_equipex $system.self $lewd_armor $arg_slot false false
	endif
endsub

beginsub lewd_to_normal
	; int: $arg_index
	if $lewd_armors[$arg_index] != none
		actor_doconsumer $system.self UnequipItem $lewd_armors[$arg_index]
		item_remove $system.self $lewd_armors[$arg_index] 1 true
	endif
	if $normal_armors[$arg_index] != none
		item_equipex $system.self $normal_armors[$arg_index] $slots[$arg_index] false false
	endif
endsub

; add one of these blocks for each slot
set $arg_slot 32
set $arg_lewdformid "0VenusCageUpperSlutty"
;; use this rnd_list format to add variety
;set $arg_lewdformid resultfrom rnd_list "lewdarmor.esp:0x801" "otherlewdarmor.esp:0x12345" "LewdArmorEditorID"
gosub normal_to_lewd

set $arg_slot 52
set $arg_lewdformid "0VenusCageLowerSlutty"
gosub normal_to_lewd

; wait until the sex stops
util_waitforend $system.self

; iterate the list of slots and revert
set $arg_index resultfrom listcount $slots
while $arg_index > 0
	inc $arg_index -1
	gosub lewd_to_normal
endwhile

 

This works perfectly. I even modified it to use for a few other outfits as well. Thank you.

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