Jump to content

Recommended Posts

Posted
6 minutes ago, hextun said:

 

I think I may be overexplaining. :)

 

The file you are looking for will likely be named 'trigger001.json'. Can you find that file somewhere on your computer?

next try, sorry

trigger001.json

Posted
3 hours ago, andi23 said:

 

Just to double check, let me know if you have created any other triggers.

 

TL;DR - Your trigger is configured to fire for any SLSO orgasm, regardless of participant. It would then give them gold. So... not my best suggestion of a test as it doesn't give good feedback. Nothing useful at all really.

 

I'd like you to save this as PrintNameToConsoleOnOrgasm.sltscript to the commands folder so it is available:

set $name resultfrom actor_name $system.self
msg_console $"SLSO Orgasm reported for :{name}:"

 

It should print something to the console (i.e. ~ access) whenever an SLSO Orgasm is detected, like "SLSO Orgasm reported for :Lydia:" or what have you.

 

Then I would like you to modify your trigger001.json to reflect this and save it (outside of the game running of course):

{
    "float" : 
    {
        "chance" : 100.0
    },
    "int" : 
    {
        "__slt_mod_version__" : 974,
        "event" : 4,
        "partner_gender" : 1,
        "player" : 3
    },
    "string" : 
    {
        "do_1" : "PrintNameToConsoleOnOrgasm"
    }
}

 

The configuration should only run the script if 1) a male, 2) in a scene with the player, 3) has an orgasm.

 

With the trigger updated and the new command .sltscript in place, trigger a sex scene and check the console for any output. If you are having sex with, say, Balgruuf, you should see in the console when he has an orgasm:

  SLSO Orgasm reported for :Balgruuf:

 

Try that out. If it works then yay! (and please follow-up with your success story here)

 

If not, let me know and we will start enabling debug flags to see what is going on.

Posted
24 minutes ago, hextun said:

 

Just to double check, let me know if you have created any other triggers.

 

TL;DR - Your trigger is configured to fire for any SLSO orgasm, regardless of participant. It would then give them gold. So... not my best suggestion of a test as it doesn't give good feedback. Nothing useful at all really.

 

I'd like you to save this as PrintNameToConsoleOnOrgasm.sltscript to the commands folder so it is available:

set $name resultfrom actor_name $system.self
msg_console $"SLSO Orgasm reported for :{name}:"

 

It should print something to the console (i.e. ~ access) whenever an SLSO Orgasm is detected, like "SLSO Orgasm reported for :Lydia:" or what have you.

 

Then I would like you to modify your trigger001.json to reflect this and save it (outside of the game running of course):

{
    "float" : 
    {
        "chance" : 100.0
    },
    "int" : 
    {
        "__slt_mod_version__" : 974,
        "event" : 4,
        "partner_gender" : 1,
        "player" : 3
    },
    "string" : 
    {
        "do_1" : "PrintNameToConsoleOnOrgasm"
    }
}

 

The configuration should only run the script if 1) a male, 2) in a scene with the player, 3) has an orgasm.

 

With the trigger updated and the new command .sltscript in place, trigger a sex scene and check the console for any output. If you are having sex with, say, Balgruuf, you should see in the console when he has an orgasm:

  SLSO Orgasm reported for :Balgruuf:

 

Try that out. If it works then yay! (and please follow-up with your success story here)

 

If not, let me know and we will start enabling debug flags to see what is going on.

damn, forgot that I tried some other trigger just for testing. so this is the rigger following your proposal at the beginning of this Odyssey

trigger001.json

Posted

 

40 minutes ago, hextun said:

 

Just to double check, let me know if you have created any other triggers.

 

TL;DR - Your trigger is configured to fire for any SLSO orgasm, regardless of participant. It would then give them gold. So... not my best suggestion of a test as it doesn't give good feedback. Nothing useful at all really.

 

I'd like you to save this as PrintNameToConsoleOnOrgasm.sltscript to the commands folder so it is available:

set $name resultfrom actor_name $system.self
msg_console $"SLSO Orgasm reported for :{name}:"

 

It should print something to the console (i.e. ~ access) whenever an SLSO Orgasm is detected, like "SLSO Orgasm reported for :Lydia:" or what have you.

 

Then I would like you to modify your trigger001.json to reflect this and save it (outside of the game running of course):

{
    "float" : 
    {
        "chance" : 100.0
    },
    "int" : 
    {
        "__slt_mod_version__" : 974,
        "event" : 4,
        "partner_gender" : 1,
        "player" : 3
    },
    "string" : 
    {
        "do_1" : "PrintNameToConsoleOnOrgasm"
    }
}

 

The configuration should only run the script if 1) a male, 2) in a scene with the player, 3) has an orgasm.

 

With the trigger updated and the new command .sltscript in place, trigger a sex scene and check the console for any output. If you are having sex with, say, Balgruuf, you should see in the console when he has an orgasm:

  SLSO Orgasm reported for :Balgruuf:

 

Try that out. If it works then yay! (and please follow-up with your success story here)

 

If not, let me know and we will start enabling debug flags to see what is going on.

ok, priting the name on orgasm works

Posted
1 hour ago, andi23 said:

 

ok, priting the name on orgasm works

 

So that means that the trigger is firing at the right time with the right target.

 

Can you attach the .sltscript you were originally going to run?

Posted
8 minutes ago, hextun said:

 

So that means that the trigger is firing at the right time with the right target.

 

Can you attach the .sltscript you were originally going to run?

at the Moment I'm using the one posted yesterday

Give Vial_v1.66.sltscript.zip

Posted

i tried other scripts to start from this trigger like give gold ad perk point,... They don't work just the printing name script

Posted
26 minutes ago, andi23 said:

at the Moment I'm using the one posted yesterday

Give Vial_v1.66.sltscript.zip 1.64 kB · 0 downloads

 

Okay, would you mind now finding sl-triggers.log somewhere on your filesystem? Possibly somewhere under your My Documents folder?

 

Then I would like you to use this version of the script, which adds some deb_msg calls which will output to sl-triggers.log.

 

Spoiler
actor_name  $system.self
set   $selfName  $$
actor_getgender $system.self
set  $selfGender $$
set  $hasPartner false
actor_isvalid   $system.partner
if $$  ==  false  [nopartner]
	set  $hasPartner true
	actor_name  $system.partner
	set   $partnerName  $$
[nopartner]

deb_msg $"Give Vial - start, selfName:{selfName}: selfGender:{selfGender}: partnerName:{partnerName}:"

if $selfGender  ==  2 [iscreature]
if $selfGender  ==  1 [isfemale]

	actor_race   $system.self  ""
	set   $selfRace  $$
deb_msg $"Give Vial - selfRace:{selfRace}: checking race"

	; you know, like a cum-chemical? a cumichal? hah...*sigh*
	set  $cumichal  "ca_CumAltmer"
	if $selfRace  &=  "High Elf"  [giveit]

	set  $cumichal  "ca_CumArgonian"
	if $selfRace  &=  "Argonian"  [giveit]

	set  $cumichal  "ca_CumBosmer"
	if $selfRace  &=  "Wood Elf"  [giveit]

	set  $cumichal  "ca_CumBreton"
	if $selfRace  &=  "Breton"  [giveit]

	set  $cumichal  "ca_CumDunmer"
	if $selfRace  &=  "Dark Elf"  [giveit]

	set  $cumichal  "ca_CumKhajiit"
	if $selfRace  &=  "Khajiit"  [giveit]

	set  $cumichal  "ca_CumNord"
	if $selfRace  &=  "Nord"  [giveit]

	set  $cumichal  "ca_CumImperial"
	if $selfRace  &=  "Imperial"  [giveit]

	set  $cumichal  "ca_CumOrsimer"
	if $selfRace  &=  "Orc"  [giveit]

	set  $cumichal  "ca_CumRedguard"
	if $selfRace  &=  "Redguard"  [giveit] 

deb_msg $"Give Vial - no race match, checking keywords"
	set  $selfRace "Argonian"
	set  $cumichal  "ca_CumArgonian"
	actor_haskeyword   $system.self  "ActorProxyArgonian"
	if $$  ==  1  [giveit]

	set  $selfRace "Breton"
	set  $cumichal  "ca_CumBreton"
	actor_haskeyword   $system.self  "ActorProxyBreton"
	if $$  ==  1  [giveit]

	set  $selfRace "Bosmer"
	set  $cumichal  "ca_CumBosmer"
	actor_haskeyword   $system.self  "ActorProxyWoodElf"
	if $$  ==  1  [giveit]

	set  $selfRace "Dunmer"
	set  $cumichal  "ca_CumDunmer"
	actor_haskeyword   $system.self  "ActorProxyDarkElf"
	if $$  ==  1  [giveit]

	set  $selfRace "Khajiit"
	set  $cumichal  "ca_CumKhajiit"
	actor_haskeyword   $system.self  "ActorProxyKhajiit"
	if $$  ==  1  [giveit]

	set  $selfRace "Imperial"
	set  $cumichal  "ca_CumImperial"
	actor_haskeyword   $system.self  "ActorProxyImperial"
	if $$  ==  1  [giveit]

	set  $selfRace "Nord"
	set  $cumichal  "ca_CumNord"
	actor_haskeyword   $system.self  "ActorProxyNord"
	if $$  ==  1  [giveit]

	set  $selfRace "Orsimer"
	set  $cumichal  "ca_CumOrsimer"
	actor_haskeyword   $system.self  "ActorProxyOrc"
	if $$  ==  1  [giveit]

	set  $selfRace "Redguard"
	set  $cumichal  "ca_CumRedguard"
	actor_haskeyword   $system.self  "ActorProxyRedguard"
	if $$  ==  1  [giveit]

	msg_notify  $"actor_race: {selfName} / {selfRace}"
deb_msg $"Give Vial - keyword fallthrough to mysterious"
	set  $selfRace "Unknown Race"
	set  $cumichal  "ca_CumMysterious"
	goto [giveit] 

[isfemale]
deb_msg $"Give Vial - isfemale"
	set   "$4"  "ZaZAnimationPack.esm:159072"
	item_equip   $system.self  "$4"  0  1
	actor_qnnu   $system.self
	util_wait  5
	item_unequipex   $system.self  "$4"  0
	item_remove   $system.self  "$4"  1  1	
	goto [exit]


[iscreature]

deb_msg $"Give Vial - iscreature"
	actor_race   $system.self  "SL"
	set   $selfRace  $$

	if $selfRace  &=  "Canines"  [Canine]

	set   $cumichal  "ca_CumAshHopper" 
	if $selfRace  &=  "Ashhoppers"  [giveit]

	set   $cumichal  "ca_CumBear" 
	if $selfRace  &=  "Bears"  [giveit]

	set   $cumichal  "ca_CumChaurus" 
	if $selfRace  &=  "Chaurus"  [giveit]

	set   $cumichal  "ca_CumChaurusHunter" 
	if $selfRace  &=  "ChaurusHunters"  [giveit]

	set   $cumichal  "ca_CumCow" 
	if $selfRace  &=  "Cows"  [giveit]

	set   $cumichal  "ca_CumElk" 
	if $selfRace  &=  "Deers"  [giveit]

	set   $cumichal  "ca_CumDog" 
	if $selfRace  &=  "Dogs"  [giveit]

	set   $cumichal  "ca_CumDragon" 
	if $selfRace  &=  "Dragons"  [giveit]

	set   $cumichal  "ca_CumDraugr" 
	if $selfRace  &=  "Draugrs"  [giveit]

	set   $cumichal  "DwarvenOil" 
	if $selfRace  &=  "DwarvenBallistas"  [giveit]
	if $selfRace  &=  "DwarvenCenturions"  [giveit]
	if $selfRace  &=  "DwarvenSpheres"  [giveit]
	if $selfRace  &=  "DwarvenSpiders"  [giveit]

	set   $cumichal  "ca_CumFalmer" 
	if $selfRace  &=  "Falmers"  [giveit]

	set   $cumichal  "ca_CumGargoyle" 
	if $selfRace  &=  "Gargoyles"  [giveit]

	set   $cumichal  "ca_CumGiant" 
	if $selfRace  &=  "Giants"  [giveit]

	set   $cumichal  "ca_CumGoat" 
	if $selfRace  &=  "Goats"  [giveit]

	set   $cumichal  "ca_CumHorker" 
	if $selfRace  &=  "Horkers"  [giveit]

	set   $cumichal  "ca_CumHorse" 
	if $selfRace  &=  "Horses"  [giveit]

	set   $cumichal  "ca_CumLurker" 
	if $selfRace  &=  "Lurkers"  [giveit]

	set   $cumichal  "ca_CumMammoth" 
	if $selfRace  &=  "Mammoths"  [giveit]

	set   $cumichal  "ca_CumNetch" 
	if $selfRace  &=  "Netches"  [giveit]

	set   $cumichal  "ca_CumRabbit" 
	if $selfRace  &=  "Rabbits"  [giveit]

	set   $cumichal  "ca_CumRiekling" 
	if $selfRace  &=  "Rieklings"  [giveit]

	set   $cumichal  "ca_CumSabreCat" 
	if $selfRace  &=  "Sabrecats"  [giveit]

	set   $cumichal  "ca_CumSeeker" 
	if $selfRace  &=  "Seekers"  [giveit]

	set   $cumichal  "ca_CumSkeever" 
	if $selfRace  &=  "Skeevers"  [giveit]

	set   $cumichal  "ca_CumSpriggan" 
	if $selfRace  &=  "Spriggans"  [giveit]

	set   $cumichal  "ca_CumTroll" 
	if $selfRace  &=  "Trolls"  [giveit]

	set   $cumichal  "ca_CumWerewolf" 
	if $selfRace  &=  "Werewolves"  [giveit]

	set   $cumichal  "ca_CumWolf" 
	if $selfRace  &=  "Wolves"  [giveit]

	set  $selfRace "Ash Spawn"
	set   $cumichal  "ca_CumAshSpawn" 
	actor_infaction   $system.self  "dragonborn.esm:112187"
	if $$  ==  1  [giveit]

	set  $selfRace "Dremora"
	set   $cumichal  "ca_CumDremora" 
	actor_infaction   $system.self  "skyrim.esm:275863"
	if $$  ==  1  [giveit]

	set  $selfRace "Skeleton"
	set   $cumichal  "ca_CumSkeleton" 
	actor_infaction   $system.self  "skyrim.esm:184799"
	if $$  ==  1  [giveit]

	set  $selfRace "Spider"
	set   $cumichal  "ca_CumSpider" 
	actor_infaction   $system.self  "skyrim.esm:170367"
	if $$  ==  1  [giveit]
	
deb_msg $"Give Vial - creature race not matched, going mysterious"

[Unknown]
	actor_race   $system.self  "SL"
	msg_notify  $"actor_race/SL {selfName} / {$$} / {selfRace}"

	set  $selfRace "Unknown Race"
	set   $cumichal  "ca_CumMysterious" 
	goto [giveit] 

[Canine]
	actor_race   $system.self  "SL"
	msg_notify  $"actor_race/SL {selfName} / {$$} / {selfRace}"

	set  $selfRace "Wolf"
	set   $cumichal  "ca_CumWolf" 
	actor_infaction   $system.self  "skyrim.esm:255633"
	if $$  ==  1  [giveit] 
	actor_race   $system.self  ""
	if $$  ==  "WolfRace"  [giveit]
	actor_haskeyword   $system.partner  "CA_CreatureTypeWolf"
	if $$  ==  1  [giveit]

	set  $selfRace "Dog"
	actor_infaction   $system.self  "skyrim.esm:275862"
	if $$  ==  1  [giveit]
	actor_race   $system.self  ""
	if $$  ==  "DogRace"  [giveit]
	actor_haskeyword   $system.partner  "CA_CreatureTypeDog"
	if $$  ==  1  [giveit]

	goto [Unknown] 

[giveit]
deb_msg $"Give Vial - giveit, cumichal:{cumichal}:"
	if "$6" == "0" "solo"
deb_msg $"Give Vial - after the solo check"
	item_add   $system.partner  $cumichal  1  "0"			
	msg_notify  $"{selfName} / {selfRace} vial -> {partnerName}"
	goto [exit]

[solo]
deb_msg $"Give Vial - solo"
	item_add   $system.self  $cumichal  1  0
	msg_notify  $"{selfName} / {selfRace} vial -> himself"
	goto [exit]


[exit]

deb_msg $"Give Vial - exit"

 

 

I added some deb_msg calls; those lines of text all start with "Give Vial". Use this script, have your male npc orgasm, close the game, then upload your sl-triggers.log. 

 

Thanks for being so patient! :)

 

Posted
13 minutes ago, hextun said:

 

Okay, would you mind now finding sl-triggers.log somewhere on your filesystem? Possibly somewhere under your My Documents folder?

 

Then I would like you to use this version of the script, which adds some deb_msg calls which will output to sl-triggers.log.

 

  Reveal hidden contents
actor_name  $system.self
set   $selfName  $$
actor_getgender $system.self
set  $selfGender $$
set  $hasPartner false
actor_isvalid   $system.partner
if $$  ==  false  [nopartner]
	set  $hasPartner true
	actor_name  $system.partner
	set   $partnerName  $$
[nopartner]

deb_msg $"Give Vial - start, selfName:{selfName}: selfGender:{selfGender}: partnerName:{partnerName}:"

if $selfGender  ==  2 [iscreature]
if $selfGender  ==  1 [isfemale]

	actor_race   $system.self  ""
	set   $selfRace  $$
deb_msg $"Give Vial - selfRace:{selfRace}: checking race"

	; you know, like a cum-chemical? a cumichal? hah...*sigh*
	set  $cumichal  "ca_CumAltmer"
	if $selfRace  &=  "High Elf"  [giveit]

	set  $cumichal  "ca_CumArgonian"
	if $selfRace  &=  "Argonian"  [giveit]

	set  $cumichal  "ca_CumBosmer"
	if $selfRace  &=  "Wood Elf"  [giveit]

	set  $cumichal  "ca_CumBreton"
	if $selfRace  &=  "Breton"  [giveit]

	set  $cumichal  "ca_CumDunmer"
	if $selfRace  &=  "Dark Elf"  [giveit]

	set  $cumichal  "ca_CumKhajiit"
	if $selfRace  &=  "Khajiit"  [giveit]

	set  $cumichal  "ca_CumNord"
	if $selfRace  &=  "Nord"  [giveit]

	set  $cumichal  "ca_CumImperial"
	if $selfRace  &=  "Imperial"  [giveit]

	set  $cumichal  "ca_CumOrsimer"
	if $selfRace  &=  "Orc"  [giveit]

	set  $cumichal  "ca_CumRedguard"
	if $selfRace  &=  "Redguard"  [giveit] 

deb_msg $"Give Vial - no race match, checking keywords"
	set  $selfRace "Argonian"
	set  $cumichal  "ca_CumArgonian"
	actor_haskeyword   $system.self  "ActorProxyArgonian"
	if $$  ==  1  [giveit]

	set  $selfRace "Breton"
	set  $cumichal  "ca_CumBreton"
	actor_haskeyword   $system.self  "ActorProxyBreton"
	if $$  ==  1  [giveit]

	set  $selfRace "Bosmer"
	set  $cumichal  "ca_CumBosmer"
	actor_haskeyword   $system.self  "ActorProxyWoodElf"
	if $$  ==  1  [giveit]

	set  $selfRace "Dunmer"
	set  $cumichal  "ca_CumDunmer"
	actor_haskeyword   $system.self  "ActorProxyDarkElf"
	if $$  ==  1  [giveit]

	set  $selfRace "Khajiit"
	set  $cumichal  "ca_CumKhajiit"
	actor_haskeyword   $system.self  "ActorProxyKhajiit"
	if $$  ==  1  [giveit]

	set  $selfRace "Imperial"
	set  $cumichal  "ca_CumImperial"
	actor_haskeyword   $system.self  "ActorProxyImperial"
	if $$  ==  1  [giveit]

	set  $selfRace "Nord"
	set  $cumichal  "ca_CumNord"
	actor_haskeyword   $system.self  "ActorProxyNord"
	if $$  ==  1  [giveit]

	set  $selfRace "Orsimer"
	set  $cumichal  "ca_CumOrsimer"
	actor_haskeyword   $system.self  "ActorProxyOrc"
	if $$  ==  1  [giveit]

	set  $selfRace "Redguard"
	set  $cumichal  "ca_CumRedguard"
	actor_haskeyword   $system.self  "ActorProxyRedguard"
	if $$  ==  1  [giveit]

	msg_notify  $"actor_race: {selfName} / {selfRace}"
deb_msg $"Give Vial - keyword fallthrough to mysterious"
	set  $selfRace "Unknown Race"
	set  $cumichal  "ca_CumMysterious"
	goto [giveit] 

[isfemale]
deb_msg $"Give Vial - isfemale"
	set   "$4"  "ZaZAnimationPack.esm:159072"
	item_equip   $system.self  "$4"  0  1
	actor_qnnu   $system.self
	util_wait  5
	item_unequipex   $system.self  "$4"  0
	item_remove   $system.self  "$4"  1  1	
	goto [exit]


[iscreature]

deb_msg $"Give Vial - iscreature"
	actor_race   $system.self  "SL"
	set   $selfRace  $$

	if $selfRace  &=  "Canines"  [Canine]

	set   $cumichal  "ca_CumAshHopper" 
	if $selfRace  &=  "Ashhoppers"  [giveit]

	set   $cumichal  "ca_CumBear" 
	if $selfRace  &=  "Bears"  [giveit]

	set   $cumichal  "ca_CumChaurus" 
	if $selfRace  &=  "Chaurus"  [giveit]

	set   $cumichal  "ca_CumChaurusHunter" 
	if $selfRace  &=  "ChaurusHunters"  [giveit]

	set   $cumichal  "ca_CumCow" 
	if $selfRace  &=  "Cows"  [giveit]

	set   $cumichal  "ca_CumElk" 
	if $selfRace  &=  "Deers"  [giveit]

	set   $cumichal  "ca_CumDog" 
	if $selfRace  &=  "Dogs"  [giveit]

	set   $cumichal  "ca_CumDragon" 
	if $selfRace  &=  "Dragons"  [giveit]

	set   $cumichal  "ca_CumDraugr" 
	if $selfRace  &=  "Draugrs"  [giveit]

	set   $cumichal  "DwarvenOil" 
	if $selfRace  &=  "DwarvenBallistas"  [giveit]
	if $selfRace  &=  "DwarvenCenturions"  [giveit]
	if $selfRace  &=  "DwarvenSpheres"  [giveit]
	if $selfRace  &=  "DwarvenSpiders"  [giveit]

	set   $cumichal  "ca_CumFalmer" 
	if $selfRace  &=  "Falmers"  [giveit]

	set   $cumichal  "ca_CumGargoyle" 
	if $selfRace  &=  "Gargoyles"  [giveit]

	set   $cumichal  "ca_CumGiant" 
	if $selfRace  &=  "Giants"  [giveit]

	set   $cumichal  "ca_CumGoat" 
	if $selfRace  &=  "Goats"  [giveit]

	set   $cumichal  "ca_CumHorker" 
	if $selfRace  &=  "Horkers"  [giveit]

	set   $cumichal  "ca_CumHorse" 
	if $selfRace  &=  "Horses"  [giveit]

	set   $cumichal  "ca_CumLurker" 
	if $selfRace  &=  "Lurkers"  [giveit]

	set   $cumichal  "ca_CumMammoth" 
	if $selfRace  &=  "Mammoths"  [giveit]

	set   $cumichal  "ca_CumNetch" 
	if $selfRace  &=  "Netches"  [giveit]

	set   $cumichal  "ca_CumRabbit" 
	if $selfRace  &=  "Rabbits"  [giveit]

	set   $cumichal  "ca_CumRiekling" 
	if $selfRace  &=  "Rieklings"  [giveit]

	set   $cumichal  "ca_CumSabreCat" 
	if $selfRace  &=  "Sabrecats"  [giveit]

	set   $cumichal  "ca_CumSeeker" 
	if $selfRace  &=  "Seekers"  [giveit]

	set   $cumichal  "ca_CumSkeever" 
	if $selfRace  &=  "Skeevers"  [giveit]

	set   $cumichal  "ca_CumSpriggan" 
	if $selfRace  &=  "Spriggans"  [giveit]

	set   $cumichal  "ca_CumTroll" 
	if $selfRace  &=  "Trolls"  [giveit]

	set   $cumichal  "ca_CumWerewolf" 
	if $selfRace  &=  "Werewolves"  [giveit]

	set   $cumichal  "ca_CumWolf" 
	if $selfRace  &=  "Wolves"  [giveit]

	set  $selfRace "Ash Spawn"
	set   $cumichal  "ca_CumAshSpawn" 
	actor_infaction   $system.self  "dragonborn.esm:112187"
	if $$  ==  1  [giveit]

	set  $selfRace "Dremora"
	set   $cumichal  "ca_CumDremora" 
	actor_infaction   $system.self  "skyrim.esm:275863"
	if $$  ==  1  [giveit]

	set  $selfRace "Skeleton"
	set   $cumichal  "ca_CumSkeleton" 
	actor_infaction   $system.self  "skyrim.esm:184799"
	if $$  ==  1  [giveit]

	set  $selfRace "Spider"
	set   $cumichal  "ca_CumSpider" 
	actor_infaction   $system.self  "skyrim.esm:170367"
	if $$  ==  1  [giveit]
	
deb_msg $"Give Vial - creature race not matched, going mysterious"

[Unknown]
	actor_race   $system.self  "SL"
	msg_notify  $"actor_race/SL {selfName} / {$$} / {selfRace}"

	set  $selfRace "Unknown Race"
	set   $cumichal  "ca_CumMysterious" 
	goto [giveit] 

[Canine]
	actor_race   $system.self  "SL"
	msg_notify  $"actor_race/SL {selfName} / {$$} / {selfRace}"

	set  $selfRace "Wolf"
	set   $cumichal  "ca_CumWolf" 
	actor_infaction   $system.self  "skyrim.esm:255633"
	if $$  ==  1  [giveit] 
	actor_race   $system.self  ""
	if $$  ==  "WolfRace"  [giveit]
	actor_haskeyword   $system.partner  "CA_CreatureTypeWolf"
	if $$  ==  1  [giveit]

	set  $selfRace "Dog"
	actor_infaction   $system.self  "skyrim.esm:275862"
	if $$  ==  1  [giveit]
	actor_race   $system.self  ""
	if $$  ==  "DogRace"  [giveit]
	actor_haskeyword   $system.partner  "CA_CreatureTypeDog"
	if $$  ==  1  [giveit]

	goto [Unknown] 

[giveit]
deb_msg $"Give Vial - giveit, cumichal:{cumichal}:"
	if "$6" == "0" "solo"
deb_msg $"Give Vial - after the solo check"
	item_add   $system.partner  $cumichal  1  "0"			
	msg_notify  $"{selfName} / {selfRace} vial -> {partnerName}"
	goto [exit]

[solo]
deb_msg $"Give Vial - solo"
	item_add   $system.self  $cumichal  1  0
	msg_notify  $"{selfName} / {selfRace} vial -> himself"
	goto [exit]


[exit]

deb_msg $"Give Vial - exit"

 

 

I added some deb_msg calls; those lines of text all start with "Give Vial". Use this script, have your male npc orgasm, close the game, then upload your sl-triggers.log. 

 

Thanks for being so patient! :)

 

I have to thank you for the help

sl-triggers.log

Posted (edited)
6 hours ago, andi23 said:

I have to thank you for the help

sl-triggers.log 9.77 kB · 1 download

 

Thanks, and thanks for turning on the debug flags!

 

So... these lines:

[2026-02-06 20:04:39.656] [log] [debug] [sl_triggers.cpp:743] sl_triggers_internal.StartScript(actualTarget=<[Actor < (0C0A3BF1)>]>, initialScriptName=<Give Vial_v1.66>) reported success
[2026-02-06 20:04:39.692] [log] [error] [sl_triggers.cpp:747] SLTR:()[1]: SLT: (unusual here) attempted to parse an unknown file type() for scrtype (0)

 

indicate that it understands you want to run "Give Vial_v1.66.sltscript", but that it was unable to find it.

 

Spoiler

This is all internal, in the SKSE plugin. I just felt like popping off with some splanations.

 

scrtype values:

0 - unrecognized (i.e. could not find "scriptname.sltscript", so it might be named with the wrong extension or something.

2 - explicitly .ini (i.e. you specified the .json extension when passing the scriptname)

3 - explicitly .sltscript (I still support the scripts having the .ini extension but they are parsed identically)

20 - implicitly .ini (i.e. you specified no extension, just something like "scriptname", but a "scriptname.ini" was found )

30 - implicitly .sltscript (same, but "scriptname.sltscript" was found)

 

The numbering is misleading; obviously if the extension is explicitly provided, that will be looked for and if not found, 0 is returned. Otherwise, .sltscript is checked for implicit match and finally .ini. So if you have both "script.sltscript" and "script.ini" and just try to run "script", "script.sltscript" will be run.

 

1) In game, please open the console and run "slt list" and let me know if "Give Vial_v1.66" shows up.

 

2) Out of game, can you tell me what folder "Give Vial_v1.66.sltscript" is in?

 

3) Out of game, can you try renaming the script to just "GiveVial.sltscript" and updating your trigger to point to "GiveVial" and try that?

 

4) ... edited to add: Um.. silly question... did you remember to unzip "Give _Vials_v1.66.sltscript.zip"? The juicy, juicy script is inside. You probably did, but I wanted to mention it for completeness. :)

 

5) Another avenue to explore. I just realized that "Give Vial_v1.66.sltscript.zip" does not contain the proper folder structure. If you just dropped it into MO2, the script won't be found because it will have installed it to the root of the mod folder instead of to "<modfolder>/SKSE/Plugins/sl_triggers/command/". I have uploaded a new version with the correct layout if you'd like to grab it. 

 

Edited by hextun
Think I found the actual problem!
Posted
4 hours ago, hextun said:

 

Thanks, and thanks for turning on the debug flags!

 

So... these lines:

[2026-02-06 20:04:39.656] [log] [debug] [sl_triggers.cpp:743] sl_triggers_internal.StartScript(actualTarget=<[Actor < (0C0A3BF1)>]>, initialScriptName=<Give Vial_v1.66>) reported success
[2026-02-06 20:04:39.692] [log] [error] [sl_triggers.cpp:747] SLTR:()[1]: SLT: (unusual here) attempted to parse an unknown file type() for scrtype (0)

 

indicate that it understands you want to run "Give Vial_v1.66.sltscript", but that it was unable to find it.

 

  Reveal hidden contents

This is all internal, in the SKSE plugin. I just felt like popping off with some splanations.

 

scrtype values:

0 - unrecognized (i.e. could not find "scriptname.sltscript", so it might be named with the wrong extension or something.

2 - explicitly .ini (i.e. you specified the .json extension when passing the scriptname)

3 - explicitly .sltscript (I still support the scripts having the .ini extension but they are parsed identically)

20 - implicitly .ini (i.e. you specified no extension, just something like "scriptname", but a "scriptname.ini" was found )

30 - implicitly .sltscript (same, but "scriptname.sltscript" was found)

 

The numbering is misleading; obviously if the extension is explicitly provided, that will be looked for and if not found, 0 is returned. Otherwise, .sltscript is checked for implicit match and finally .ini. So if you have both "script.sltscript" and "script.ini" and just try to run "script", "script.sltscript" will be run.

 

1) In game, please open the console and run "slt list" and let me know if "Give Vial_v1.66" shows up.

 

2) Out of game, can you tell me what folder "Give Vial_v1.66.sltscript" is in?

 

3) Out of game, can you try renaming the script to just "GiveVial.sltscript" and updating your trigger to point to "GiveVial" and try that?

 

4) ... edited to add: Um.. silly question... did you remember to unzip "Give _Vials_v1.66.sltscript.zip"? The juicy, juicy script is inside. You probably did, but I wanted to mention it for completeness. :)

 

5) Another avenue to explore. I just realized that "Give Vial_v1.66.sltscript.zip" does not contain the proper folder structure. If you just dropped it into MO2, the script won't be found because it will have installed it to the root of the mod folder instead of to "<modfolder>/SKSE/Plugins/sl_triggers/command/". I have uploaded a new version with the correct layout if you'd like to grab it. 

 

1) GiveVial_v1.66 shows up, good so far

2) I took the Give Vial v.66 script from the zip-file and dropped it into the folder ...\SLTriggers Redux\SKSE\Plugins\sl_triggers\commands, where all other scripts are located. In my understanding is has to be there.

3)renaming the script to GiveVial helped, now the script is triggered. Great.

4) see 2)

5) I installed it with MO2, doesn't work. The mod seems to dislike numbers:)

 

what is strange: If I add another trigger in the mod MCM, like GiveGold f.e, with same event, it doesn't work. Not that I want to use that but there seems to be something wrong:  I have the feeling, that I did a stupid mistake but I cannot find it. Installation is easy with MO2.

Posted

v0.978 just hit the stands. This is a minor bugfix for the SKSE plugin .dll to properly handle script filenames with a dot in the name (e.g. say, something like "Give Vial_v1.66.sltscript") when specifying scripts without an extension (as is the default through the MCM). 

 

 

Story time! Gather round kiddies and here how ol' Uncle Hextun made a boo-boo.

- Originally, scripts were in .json format only

- Wanting a more script-like style, and not yet ready to assume a new extension, and also wanting text editor syntax highlighting, I added support for an ".ini" extension

  - This was actually the first iteration of SLTScript

- After awhile I realized that by adding support for an ".sltscript" extension I could customize my syntax highlighting, so I did

- But when I added that, I retained the .ini support because I hadn't introduced it very long ago at that point

- Moreover, I did not want users to have to explicitly specify a filename extension when trying to run a script

- So I added code that, if you provide an extension, I honor it, otherwise I check for ".sltscript" and then for ".ini" appended to the filename

  - But if you specified an invalid extension (i.e. not .sltscript or .ini) it would just not do anything

- Along come filenames with dots in them (why didn't I consider that?)

  - So say you asked to run a script "foo.bar.sltscript"

  - But naturally via the MCM it just shows "foo.bar"

  - Well, it finds the ".bar" extension and the logic says "you shall not pass"

- Silly, ay?

  - So now if you give me an extension that is valid, I use it.

  - But if the extension is now considered invalid, I fall through to the extensionless case and at least try slapping ".sltscript" and ".ini" on the provided scriptname

  - So "foo.bar" would first see that ".bar" is not valid and then check for "foo.bar.sltscript" and, if not found, then "foo.bar.ini"

 

So the problem really has to do with me not handling implicit extension checking well. Still, I should probably just remove the .ini support at this point. Nothing of value would be lost. :)

 

And on a second point, I wonder if I should add back .json support with an upvert feature that would try to auto convert things like "$system.player" to just "$player" and so on. Basically a compat mode with the original sl_triggers to be able to use those scripts automatically.

 

Posted
6 hours ago, hextun said:

And as an aside, @andi23, this update would have prevented your pain. So sorry! 

Thanks a lot to solve this issue. It's l about details.

 

Now I'm trying to use this Mod: SpermAlchemyIngredients101-SLTR, the log tells me Form ID cannot found. Can you give me a hint what to do? Or is there more to do than installing it with MO2, like other mods?

sl-triggers.log

Posted (edited)
On 2/7/2026 at 2:23 PM, andi23 said:

Thanks a lot to solve this issue. It's l about details.

 

Now I'm trying to use this Mod: SpermAlchemyIngredients101-SLTR, the log tells me Form ID cannot found. Can you give me a hint what to do? Or is there more to do than installing it with MO2, like other mods?

sl-triggers.log 11.69 kB · 1 download

 

I'm sorry, I apparently missed this one. 

 

I actually had attached two different copies of SpermAlchemyIngredients101-SLTR.7z. The first one used FormIDs and the second one I modified to use editorIDs.

 

I just deleted the first version in lieu of the editorID version.

 

Can you verify whether you obtained it from this post: 

and if not, please download it and try it?

 

If you did, let me know and we can troubleshoot. :)

 

ETA: I just realized that I also had updated multiple scripts at the "Various SL Triggers Addons" page, including this one. I'll have to modify all of those to use editorIDs as well, and I think push them to the club and alter comments to point there (single sourced).

Edited by hextun
Posted
58 minutes ago, emaki5 said:

Quick guestion,
what do I write so I can load under $$ skill level (for example Block level for player)?

 

If I understand correctly, you want to be able to retrieve the player's current skill level for various skills, including Block.

 

If that's the case, you want actor values.

 

The code (for retrieving block skill value for the player specifically):

 

set $player_block_skill_level resultfrom av_get $system.player "Block"

 

This also works for other Actors. The following does the same as before, but for whomever the script is targeted at:

 

set $target_block_skill_level resultfrom av_get $system.self "Block"

 

The available actor values can be found here: https://github.com/sltriggersredux/sltriggersredux/wiki/Function-Libraries#actor-value. Use the "Console Name" column. So, for the "Heavy Armor" skill, it would be:

 

set $player_heavy_armor_skill_level resultfrom av_get $system.player "HeavyArmor" ; note, no space inside

 

SLTScript has several functions related to actor values: https://github.com/sltriggersredux/sltriggersredux/wiki/Function-Libraries#actor-value

 

Let me know if this isn't what you were looking for.

Posted
9 hours ago, hextun said:

 

If I understand correctly, you want to be able to retrieve the player's current skill level for various skills, including Block.

 

If that's the case, you want actor values.

 

The code (for retrieving block skill value for the player specifically):

 

set $player_block_skill_level resultfrom av_get $system.player "Block"

 

This also works for other Actors. The following does the same as before, but for whomever the script is targeted at:

 

set $target_block_skill_level resultfrom av_get $system.self "Block"

 

The available actor values can be found here: https://github.com/sltriggersredux/sltriggersredux/wiki/Function-Libraries#actor-value. Use the "Console Name" column. So, for the "Heavy Armor" skill, it would be:

 

set $player_heavy_armor_skill_level resultfrom av_get $system.player "HeavyArmor" ; note, no space inside

 

SLTScript has several functions related to actor values: https://github.com/sltriggersredux/sltriggersredux/wiki/Function-Libraries#actor-value

 

Let me know if this isn't what you were looking for.

 

As always, great help and answer!

Exactly what I needed. Thanks!

Posted
On 2/12/2026 at 4:24 AM, hextun said:

 

I'm sorry, I apparently missed this one. 

 

I actually had attached two different copies of SpermAlchemyIngredients101-SLTR.7z. The first one used FormIDs and the second one I modified to use editorIDs.

 

I just deleted the first version in lieu of the editorID version.

 

Can you verify whether you obtained it from this post: 

and if not, please download it and try it?

 

If you did, let me know and we can troubleshoot. :)

 

ETA: I just realized that I also had updated multiple scripts at the "Various SL Triggers Addons" page, including this one. I'll have to modify all of those to use editorIDs as well, and I think push them to the club and alter comments to point there (single sourced).

great, with this version, it works. thanks a lot.

  • 2 weeks later...
Posted

It's been awhile. Hope everyone's been enjoying their Skyrimming.

 

I was thinking about the on level up trigger. I don't want to do that.

 

Instead, how about triggers for MenuOpen and MenuClose, with one of the contextual parameters being the menuName? Perhaps with the filter using a text field entry to let you specify a menuName to match against?

 

I would have to hook that event anyway, and it's really just a matter of comparing the level before to the level after, but why then limit the trigger? Yes, it wouldn't be quite as simple because you'd have to create two triggers, one that stuffs the player's level into a global on menu open (for the skill tab) and again on menu close, comparing current level to stored level. 

 

But then you could use it for any menu screen.

Posted
1 hour ago, hextun said:

It's been awhile. Hope everyone's been enjoying their Skyrimming.

 

I was thinking about the on level up trigger. I don't want to do that.

 

Instead, how about triggers for MenuOpen and MenuClose, with one of the contextual parameters being the menuName? Perhaps with the filter using a text field entry to let you specify a menuName to match against?

 

I would have to hook that event anyway, and it's really just a matter of comparing the level before to the level after, but why then limit the trigger? Yes, it wouldn't be quite as simple because you'd have to create two triggers, one that stuffs the player's level into a global on menu open (for the skill tab) and again on menu close, comparing current level to stored level. 

 

But then you could use it for any menu screen.

 

chance to lose a DD key every time you open your inventory :D That would be fun

 

I'm trying to have a json file per actor to track stats. SL triggers already enables that with json file read, but is there a way I can a/ initialize/generate at scale, once ALL the files (1 json per NPC) b/ run a scan for nearby NPCs and update values in their json file, for example every hour using the existing top of the hour trigger?

Posted (edited)
8 hours ago, Fraying9981 said:

 

chance to lose a DD key every time you open your inventory :D That would be fun

 

I'm trying to have a json file per actor to track stats. SL triggers already enables that with json file read, but is there a way I can a/ initialize/generate at scale, once ALL the files (1 json per NPC) b/ run a scan for nearby NPCs and update values in their json file, for example every hour using the existing top of the hour trigger?

 

a) init/generate 1 or more JSON files, 1 per NPC, once for all files

  • I don't know about this; when you say "ALL the files" and "1 per NPC", do you mean "generate 1 JSON for each NPC in the game"?
    • if so, I would strongly recommend against this and would suggest lazy initialization or something
      • SLTScript is going to be slow compared to actual Papyrus
      • and even Papyrus would struggle trying to process all the NPCs at once, particularly if trying to create JSON for each
      • as for lazy initialization, I just mean that in your timed scan below, check for the existence of the JSON and, if it doesn't exist for that NPC, generate it
      • https://github.com/sltriggersredux/sltriggersredux/wiki/Function-Libraries#jsonutil - the jsonutil command has an "exists" subcommand for just this purpose
    • if not, please elaborate
  • the "new session" trigger might be of use here; it fires once at the start of a new session (i.e. starting a brand new save OR loading an existing save)

 

b) scan for nearby NPCs and update their JSON files

 

Point of note: what do you plan to use as your JSON names to correspond with a specific NPC? Name might work (i.e. <name>.json), though there may be duplicates (i.e. is there more than one Hod?). You could use FormID (i.e. <formid>.json) though the JSON files become specific to your load order. Which is fine for private use, and wouldn't limit the scripts being shared and useful, but the JSON files themselves might not be easily shared (assuming that would matter, which given your pre-gen idea probably not :) ).

 

Am curious what you're shooting for. Sounds ambitious. :)

 

ETA: Okay, you actually already said what you are shooting for; tracking stats. :P Do you need them to be stored as JSON? You can create target specific variables that will be stored per actor. 

https://github.com/sltriggersredux/sltriggersredux/wiki/Scripts#variables-and-scopes 

See the examples for altering the current target's variables (i.e. $target.somevar) and other actor's variables (i.e. $target<$otherActorThatYouAlreadySet>.somevar)

 

Edited by hextun
Posted
3 hours ago, hextun said:

a) init/generate 1 or more JSON files, 1 per NPC, once for all files

  • I don't know about this; when you say "ALL the files" and "1 per NPC", do you mean "generate 1 JSON for each NPC in the game"?
    • if so, I would strongly recommend against this and would suggest lazy initialization or something
      • SLTScript is going to be slow compared to actual Papyrus
      • and even Papyrus would struggle trying to process all the NPCs at once, particularly if trying to create JSON for each
      • as for lazy initialization, I just mean that in your timed scan below, check for the existence of the JSON and, if it doesn't exist for that NPC, generate it
      • https://github.com/sltriggersredux/sltriggersredux/wiki/Function-Libraries#jsonutil - the jsonutil command has an "exists" subcommand for just this purpose
    • if not, please elaborate
  • the "new session" trigger might be of use here; it fires once at the start of a new session (i.e. starting a brand new save OR loading an existing save)

 

thank you. yes i was thinking about 1 file per npc (excluding generics for simplicity). noted you don't recommend this for performance reasons.

 

3 hours ago, hextun said:

ETA: Okay, you actually already said what you are shooting for; tracking stats. :P Do you need them to be stored as JSON? You can create target specific variables that will be stored per actor. 

https://github.com/sltriggersredux/sltriggersredux/wiki/Scripts#variables-and-scopes 

See the examples for altering the current target's variables (i.e. $target.somevar) and other actor's variables (i.e. $target<$otherActorThatYouAlreadySet>.somevar)

 

thank you, yes this is what i'm looking for, but i want some form of persistent storage, and values to be updated periodically outside SL scenes. Think about how arousal works for example.

I understand this sounds pretty infeasible for performance reasons...right?

Posted
9 hours ago, Fraying9981 said:

 

thank you. yes i was thinking about 1 file per npc (excluding generics for simplicity). noted you don't recommend this for performance reasons.

 

 

thank you, yes this is what i'm looking for, but i want some form of persistent storage, and values to be updated periodically outside SL scenes. Think about how arousal works for example.

I understand this sounds pretty infeasible for performance reasons...right?

 

So you want to collect statistics on a per Actor basis, and presumably want to then reference these values at another time. And you want the storage to persist. It doesn't sound unreasonable, depending on what you are hoping to achieve. :)

 

Persistence:

Much like global variables, target scoped variables (i.e. actor scoped variables) also persist across saves. These values are stored via StorageUtil, attached to a given Actor. When you save your game, the StorageUtil data saves alongside it in the SKSE co-save. This will give you persistance in that subsequent SLTScripts will be able to read/write that data.

 

    set $otherActor $system.partner1
    set $target<$otherActor>.stat_one 42

 

If, however, what you explicitly want is externally persisted data, in the form of JSON files, outside of the save itself, instead of interacting with target scoped variables, you would use the jsonutil function (or the OG json_* functions) to read/write data to local scoped variables and act accordingly.

 

    set $theFormID resultfrom form_dogetter $system.partner1 GetFormID
    set $jsonfilename $"{theFormID}.json"
    json_setvalue $jsonfilename int "stat_one" 42

 

Note that if you save JSON apart from the savefile, if you start a new save you will have old statistics. And note further my example code for the JSON output uses the FormID for the filename, which is fine if the load order does not change, but could be problematic otherwise.

 

Unless you have a specific, as yet unspecified need for external JSON, I would strongly recommend just using the target scoped variables.

 

Statistics collection and usage:
Without knowing anything else, my thinking is to just make sure you have useful default values for each statistic. Then, at any point where you would reference the statistic, you check for whether the value has been set; if not, use the default.

For variables, the 'typeid' function (https://github.com/sltriggersredux/sltriggersredux/wiki/Scripts#typeid---returns-int-the-type-id-of-the-variable) was introduced which returns an int indicating which type it is (e.g. int, string, bool), and returning 0 if it is invalid, meaning it has never been set.

 

    set $otherActor $system.partner1
    set $typeid resultfrom typeid $target<$otherActor>.stat_one
    if $typeid == 0
      set $stat_one 12 ; whatever your default is
    else
      set $stat_one $target<$otherActor>.stat_one
    endif
    ; do stuff with $stat_one
    
For JSON, the json_getvalue function (and the jsonutil get sub-function) allow for a default value to be specified, which will be returned if it is not set, including if the JSON file does not exist IIRC (this last would be worth verifying).

 

    set $theFormID resultfrom form_dogetter $system.partner1 GetFormID
    set $jsonfilename $"{theFormID}.json"
    json_getvalue $jsonfilename int "stat_one" 12 ; whatever your default is

 

Keep in mind possible race conditions. Be careful about multiple scripts setting these variables after checking for existence because both might see it as not set, with one acting to default it and the other acting to, say, increment it, and thus one getting blown away.

 

If I Were Doing This:
I would use target scoped variables to track the statistics.

 

I would have a set of collection scripts and a set of usage scripts, unless there was some logical reason to have both activities in the same script.

 

Collection scripts would be responsible for collecting and/or altering the stats. This could be a timer trigger for periodic polling, or perhaps an in-water trigger if level of wetness impacted things, or whatever. Then you would accumulate wetness stats, or time-spent-existing stats.

 

Usage scripts would make use of the stats. So if the wetness stat should affect arousal, maybe you do this on another timer, or on a top of the hour trigger. 

 

If you have meta-stats (i.e. stat_one * stat_two == meta_stat_A) they could be calculated in either collection or usage scripts. I would probably try for collection *if* the base stats (e.g. stat_one and stat_two) are both being collected in the same script and only that script.

 

Hex's Vague Handwaving:
I'm sorry if what I'm writing seems a bit vague; without having specific objectives to reference it's hard to pin down a reasonable architecture. If you have some specific ideas you'd be willing to share (privately if you prefer), I may be able to firm some ideas up.

Posted
5 hours ago, hextun said:

 

So you want to collect statistics on a per Actor basis, and presumably want to then reference these values at another time. And you want the storage to persist. It doesn't sound unreasonable, depending on what you are hoping to achieve. :)

 

Persistence:

Much like global variables, target scoped variables (i.e. actor scoped variables) also persist across saves. These values are stored via StorageUtil, attached to a given Actor. When you save your game, the StorageUtil data saves alongside it in the SKSE co-save. This will give you persistance in that subsequent SLTScripts will be able to read/write that data.

 

    set $otherActor $system.partner1
    set $target<$otherActor>.stat_one 42

 

If, however, what you explicitly want is externally persisted data, in the form of JSON files, outside of the save itself, instead of interacting with target scoped variables, you would use the jsonutil function (or the OG json_* functions) to read/write data to local scoped variables and act accordingly.

 

    set $theFormID resultfrom form_dogetter $system.partner1 GetFormID
    set $jsonfilename $"{theFormID}.json"
    json_setvalue $jsonfilename int "stat_one" 42

 

Note that if you save JSON apart from the savefile, if you start a new save you will have old statistics. And note further my example code for the JSON output uses the FormID for the filename, which is fine if the load order does not change, but could be problematic otherwise.

 

Unless you have a specific, as yet unspecified need for external JSON, I would strongly recommend just using the target scoped variables.

 

Statistics collection and usage:
Without knowing anything else, my thinking is to just make sure you have useful default values for each statistic. Then, at any point where you would reference the statistic, you check for whether the value has been set; if not, use the default.

For variables, the 'typeid' function (https://github.com/sltriggersredux/sltriggersredux/wiki/Scripts#typeid---returns-int-the-type-id-of-the-variable) was introduced which returns an int indicating which type it is (e.g. int, string, bool), and returning 0 if it is invalid, meaning it has never been set.

 

    set $otherActor $system.partner1
    set $typeid resultfrom typeid $target<$otherActor>.stat_one
    if $typeid == 0
      set $stat_one 12 ; whatever your default is
    else
      set $stat_one $target<$otherActor>.stat_one
    endif
    ; do stuff with $stat_one
    
For JSON, the json_getvalue function (and the jsonutil get sub-function) allow for a default value to be specified, which will be returned if it is not set, including if the JSON file does not exist IIRC (this last would be worth verifying).

 

    set $theFormID resultfrom form_dogetter $system.partner1 GetFormID
    set $jsonfilename $"{theFormID}.json"
    json_getvalue $jsonfilename int "stat_one" 12 ; whatever your default is

 

Keep in mind possible race conditions. Be careful about multiple scripts setting these variables after checking for existence because both might see it as not set, with one acting to default it and the other acting to, say, increment it, and thus one getting blown away.

 

If I Were Doing This:
I would use target scoped variables to track the statistics.

 

I would have a set of collection scripts and a set of usage scripts, unless there was some logical reason to have both activities in the same script.

 

Collection scripts would be responsible for collecting and/or altering the stats. This could be a timer trigger for periodic polling, or perhaps an in-water trigger if level of wetness impacted things, or whatever. Then you would accumulate wetness stats, or time-spent-existing stats.

 

Usage scripts would make use of the stats. So if the wetness stat should affect arousal, maybe you do this on another timer, or on a top of the hour trigger. 

 

If you have meta-stats (i.e. stat_one * stat_two == meta_stat_A) they could be calculated in either collection or usage scripts. I would probably try for collection *if* the base stats (e.g. stat_one and stat_two) are both being collected in the same script and only that script.

 

Hex's Vague Handwaving:
I'm sorry if what I'm writing seems a bit vague; without having specific objectives to reference it's hard to pin down a reasonable architecture. If you have some specific ideas you'd be willing to share (privately if you prefer), I may be able to firm some ideas up.

 

Thank you for following up and clarifying. I didnt know about actor specific variables but that is exactly what im looking for. No need to have persistent storage.

 

Do you think its possible to do the following?

- use actor specific variables e.g. hextun's height, weight

- use one variable to store the last skyrim udpated time for these variables. For example tirdas 2 at 4pm or whatever skyrim game time format is easy and standard here

- when we have a sl event, update the value e.g. weight + 200kg

- in parallel we have a top of the hour that reduces hextun weight by 1 kg every hour. Question for that is: how does it go through each values?

1. Can we perhaps name these variables so that slt can loop through all of them every hour?

2. Or, simply if we have a top of the hour trigger on every actor, it calls their weight and does -1

 

Is this doable this way?

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