Jump to content

Recommended Posts

  • 1 month later...

Hm, back at it. Can someone tell me whats wrong with the following command?

Spoiler

{
    "cmd" :
    [
        ["actor_getgender", "$partner"],
        ["if", "$$", "!=", "1", "end"],
            ["set", "$1", "[Predator] Fuck Doll.esp:2058"],
            ["item_equip", "$partner", "$1", "0", "1"],
            ["actor_qnnu", "$partner"],
            ["util_wait", "600"],
            ["item_unequipex", "$partner", "$1", "0"],
            ["item_remove", "$partner", "$1", "1", "1"]
        [":", "end"]
    ]
}

Woks just fine if what i intended to be a gender check removed =-/

Link to comment
On 1/24/2022 at 10:12 AM, Jenova23 said:

Does anyone have a problem with this mod equipping clothes during sex? If I disable this mod it fixes the issue.

 Issue isnt SL triggers, but its interaction with something else.

Had this problem with Skill Based musle. Found a fix later somehwere on forums.

On 2/1/2022 at 1:37 PM, Hello539 said:

I don't know how Json works, could someone please provide an example in, say, if i want to equip a ZaZ mouth gag on the actor for an animation and remove it after the animation end, how would i write the command file?

Example commands come with mod, including one that equips zaz item. Poke around the files in the archive.

Link to comment

Borrowing this from Billy's SLAL pack for reference:

 

##Pair 2p##

Animation(
    id="B_SKiss1",
    name="Kissing",
    tags="Straight,MF,Standing,Kissing,Loving,Foreplay",
    sound=NoSound,
    actor1=Female(),
            a1_stage_params=[
        Stage(1,  silent=True,  animvars="AVbHumanoidFootIKDisable"),
        Stage(2, silent=True),
        Stage(3, silent=True),
        Stage(4, silent=True),
        Stage(5, silent=True),        
    ],        
    actor2=Male(strap_on=True),
            a2_stage_params=[
        Stage(1,  silent=True, sos=-9,  animvars="AVbHumanoidFootIKDisable"),
        Stage(2, silent=True, sos=-9,),
        Stage(3, silent=True, sos=-9,),
        Stage(4, silent=True, sos=-9,),
        Stage(5, silent=True, sos=-9,),
    ],        
)

 

In this animation there are two positions, actor1 and actor2.
Is there a way to tell which position an NPC is in during a scene using Triggers?

Basically a check to see if an NPC is actor1/actor2/actor3, etc.

 

Ultimately the goal is to check if an animation has a tag, and then to apply effects to actor1/actor2/actor3, etc.

I could use a gender check, but the 'male' in a scene isn't necessarily always male (as defined by actual gender or Sexlab) and vice versa.

Link to comment
  • 2 weeks later...

If I wanted to set a trigger for giving/getting a random number of gold from 1 - 1000 how would that look? So far I have this:
["rnd_int", "1", "1000"],
["set", "$1", "$$"],
["item_remove", "$target", "skyrim.esm:15", "$1", "0"],
["item_add", "$self", "skyrim.esm:15", "$1", "0"]

Link to comment
  • 1 month later...

Does anyone know how to create a command to trigger custom sound file instead of a built-in sound? I remember back when I was still playing in LE, I made a command to play a custom creampie sound effect back in SexlabUtil whenever the male actor orgasm but I can't seem to remember how I did it before.

Edited by Saber2th
Link to comment

Use data\SKSE\Plugins\sl_triggers\Sound - Levelup.json as a base.

 

Duplicate/rename, copy/paste the file.

 

The key is line with:

        ["snd_play", "skyrim.esm:359237", "$self"],

 

 

Change the bolded part. Its mod : id of sound. IDs are the same as in LE. But in SL Triggers its dec, not hex. Use Calc to convert.

Link to comment
  • 3 weeks later...

Hi, I need help ? I am using a script that on the face of it, works very well. The script equips all npcs with headgear (execution hood) for every sexlab scene. The issue I have is that it is generally overriding sexlab's stripping settings, such that all other items (armour, clothing, weapons) are also being re-equipped. Can anyone show me how to prevent this. Here is the script.

 

{
	"cmd" : 
	[
 	["msg_notify", "I feel rather Saucy too!"],
        ["set", "$0", "skyrim.esm:371167"],
        ["item_addex", "$self", "$0", "1", "1"],
        ["item_equipex", "$self", "$0", "0", "1"],
		[":","eqf"],
        ["actor_qnnu", "$self"],
	["util_waitforend", "$self"],
	["item_unequipex", "$self", "$0", "0"],
        ["item_remove", "$self", "$0", "1", "1"],
	]
}

 

sl triggers settings,

setting1.jpg.f91bbdc39a47d33a56f93adcb1a9396e.jpg

 

I just need to replace the headgear, and nothing else.

Link to comment
2 hours ago, satanfist said:
["item_addex", "$self", "$0", "1", "1"],

Remove this line.

 

Don't add item. Auto re-equip happens when you add an item that is armor or weapon. "item_equipex" should be enough.

 

Maybe "item_unquipex" is also not required.

 

 

Link to comment
16 hours ago, Fotogen said:

Remove this line.

 

Don't add item. Auto re-equip happens when you add an item that is armor or weapon. "item_equipex" should be enough.

 

Maybe "item_unquipex" is also not required.

 

 

Hmm, I did as you suggested and removed both cmds. I certainly do not get an override of the sexlab strip settings now, but the 'hood' is no longer equipped. Is it assumed that the 'hood' is already in the NPCs inventory?

 

p.s. The execution hood I think is classed as clothing as it has no armour rating. The hood utilitizes body slots 30,31,42,43. I checked sexlab and at least one of these was marked for removal. I unchecked all of these slots, but the hood is still not worn or present in the inventory. I assume that I'm using the correct cmd syntax?

 

p.p.s. O.K. I think I have found the solution to my issue thanks to Fotogen's guidance and this wonderful mod that is an essential part of every Skyrim playthrough. I admit I used the script of someone else as a template for my script, without fully understanding what the commands did. As a last resort I looked at the documentation ? I see that many commands have a standard edition and a SKSE version.

 

{
	"cmd" : 
	[
 	["msg_notify", "I feel rather Saucy too!"],
        ["set", "$0", "skyrim.esm:371167"],
        ["item_equip", "$self", "$0", "0", "1"],
		[":","eqf"],
        ["actor_qnnu", "$self"],
	["util_waitforend", "$self"],
        ["item_remove", "$self", "$0", "1", "1"],
	]
}

 

I removed the command item_addex and item_unequipex as suggested. I changed item_equipex to item_equip, with the same syntax. Wow! it works perfectly. The hood is equipped without any nasty re-equip effects and is nicely removed from the NPCs inventory at the end. Hopefully this will be helpful to anyone else who has experienced armour and weapons being re-equipped.

Edited by satanfist
Link to comment

I have no idea if this mod is still being updated or not, but could I request a floor (or ceiling, or round, any would be workable) command?

 

Context: I'm using the experience mod (https://www.nexusmods.com/skyrimspecialedition/mods/17751) and trying to set up a trigger so that I gain experience after every sex scene my character is in. I got this working, but I had to do a weird workaround since the console command used to grant experience (player.advlevel) insists that it is given an integer and fails if given, for example, 20.5 or 45.0. I hit this because I wanted to add scaling based on the number of partners, like a base amount of EXP for with one partner then X% more for each additional partner, but that leads to decimal values.

 

My somewhat ugly workaround is

; calculate some base exp in $2 and multiplier in $6
["set", "$2", "$2", "*", "$6"],
["rnd_int", "$2", "$2"],
["set", "$2", "$$"],
["console", "$self", "advlevel ", "$2"],

 

Based on duplicating how the other commands are handled, I think something similar to the following might work, but I wasn't able to test it because I can't compile SexLab locally. I seem to be missing the source of some dependency of SexLab but I haven't figured out what yet.

State cmd_floor ;floor "number"
function oper(string[] param)
    string p1
    int ret

    p1 = resolve(param[1])
    ret = Math.Floor(p1 as float)
    stack[0] = ret as string
endFunction
EndState

 

Other than that slight annoyance this is working great though, thanks for the mod!

Edited by zeelok
Link to comment
19 hours ago, satanfist said:

I removed the command item_addex and item_unequipex as suggested. I changed item_equipex to item_equip, with the same syntax. Wow! it works perfectly. The hood is equipped without any nasty re-equip effects and is nicely removed from the NPCs inventory at the end. Hopefully this will be helpful to anyone else who has experienced armour and weapons being re-equipped.

Good. It worked.

Personally, I don't know how skyrim really works when adding/removing items to NPC. I think noone really knows. Skyrim is weird. I usually just experiment util it starts working.

 

Link to comment

New version:

 

v12:
    General:
        - Form ID for objects can now be in dex or hex notation. If ID starts with 0, it is assumed to be hex, else its dec
        - Example:
        -     Hex version:
        -     ["item_equip", "$self", "skyrim.esm:0166d6", "0", "1"],
        -     Dec version:
        -     ["item_equip", "$self", "skyrim.esm:91862", "0", "1"],
        - I hope I didn't broke something :(
        
    Functions:
        - actor_race: get actors race name. Vannila(Nord, Bretonr, etc) or SL "RaceKey" (Dogs, Trolls, etc)
        - math: math fuctions: asint, floor, ceiling, abs
 

Link to comment

That's much cleaner, thanks. When (it's always when, never if, when it comes to coding, especially stuff like this that reminds me of writing assembly) I have to debug my trigger later, ["math", "floor", "$2"] is much better than having to remember why I was generating random ints.

Link to comment

I'm writing a command using the new "actor_race" function that gives the player an ingredient after having sex with a male partner and it's not working for me. How does it work with the "if … goto" condition? Here is part of the command.

 

Spoiler

{
    "cmd" : 
    [
        ["actor_getgender", "$partner"],
        ["if", "$$", "!=", "0", "end"],
        ["actor_race", "$partner", ""],
        ["if", "$$", "=", "0", "Altmer"],
        ["actor_race", "$partner", ""],
        ["if", "$$", "=", "0", "Argonian"],
        ["actor_race", "$partner", ""],
        ["if", "$$", "=", "0", "Bosmer"],
        [":", "Altmer"],
        ["item_add", "$player", "cum alchemy.esp:191552", "1", "0"],
        ["goto", "end"], 
        [":", "Argonian"],
        ["item_add", "$player", "cum alchemy.esp:191548", "1", "0"],
        ["goto", "end"], 
        [":", "Bosmer"],
        ["item_add", "$player", "cum alchemy.esp:191550", "1", "0"],
        ["goto", "end"],
        [":", "end"]
    ]
}

 

Link to comment
2 hours ago, RangerEdas said:

I'm writing a command using the new "actor_race" function that gives the player an ingredient after having sex with a male partner and it's not working for me. How does it work with the "if … goto" condition? Here is part of the command.

 

The command returns the name of the race into $$, so it looks like something similar to this should work:

["actor_race", "$partner", ""],
["set", "$1", "$$"],
["if", "$1", "=", "Altmer", "Altmer"],
["if", "$1", "=", "Argonian", "Argonian"],
["if", "$1", "=", "Bosmer", "Bosmer"],

 

Also, your cum alchemy mod is the reason I found this one, so thank you for that. Hopefully you posting here means that you are adding that trigger to the next version now that the capability for race checks exists, would be a nice feature.

Edited by zeelok
Link to comment

This is what I used for quick test:

{
    "cmd" : 
    [
    ["actor_name", "$self"],
    ["msg_notify", "My name: ", "$$"],
    ["actor_race", "$self", ""],
    ["msg_notify", "  Race: ", "$$"],
    ["actor_race", "$self", "SL"],
    ["msg_notify", "  Race SL: ", "$$"]
    ]
}

 

["actor_race", "$self", ""] returns whatever skyrim returns for race name (race name in CK)

["actor_race", "$self", "SL"] return whatever Sexlab framework returns for "Race Key". Its ""(blank) for humanoids and generic name for creatures. Like "dogs", "bears".

 

This is what I have for SL "Race Key":

Spoiler

"ashhoppers"
"bears",
"boars",
"boarsany",
"boarsmounted",
"canines",
"chaurus",
"chaurushunters",
"chickens",
"cows",
"deers",
"dogs",
"dragonpriests",
"dragons",
"draugrs",
"dwarvenballistas",
"dwarvencenturions",
"dwarvenspheres",
"dwarvenspiders",
"falmers",
"flameatronach",
"foxes",
"frostatronach",
"gargoyles",
"giants",
"goats",
"hagravens",
"horkers",
"horses",
"icewraiths",
"lurkers",
"mammoths",
"mudcrabs",
"netches",
"rabbits",
"rieklings",
"sabrecats",
"seekers",
"skeevers",
"slaughterfishes",
"stormatronach",
"spiders",
"largespiders",
"giantspiders",
"spriggans",
"trolls",
"vampirelords",
"werewolves",
"wispmothers",
"wolves",
"wisps"

 

 

Link to comment
23 hours ago, Fotogen said:

This is what I used for quick test:

{
    "cmd" : 
    [
    ["actor_name", "$self"],
    ["msg_notify", "My name: ", "$$"],
    ["actor_race", "$self", ""],
    ["msg_notify", "  Race: ", "$$"],
    ["actor_race", "$self", "SL"],
    ["msg_notify", "  Race SL: ", "$$"]
    ]
}

 

["actor_race", "$self", ""] returns whatever skyrim returns for race name (race name in CK)

["actor_race", "$self", "SL"] return whatever Sexlab framework returns for "Race Key". Its ""(blank) for humanoids and generic name for creatures. Like "dogs", "bears".

 

This is what I have for SL "Race Key":

  Reveal hidden contents

"ashhoppers"
"bears",
"boars",
"boarsany",
"boarsmounted",
"canines",
"chaurus",
"chaurushunters",
"chickens",
"cows",
"deers",
"dogs",
"dragonpriests",
"dragons",
"draugrs",
"dwarvenballistas",
"dwarvencenturions",
"dwarvenspheres",
"dwarvenspiders",
"falmers",
"flameatronach",
"foxes",
"frostatronach",
"gargoyles",
"giants",
"goats",
"hagravens",
"horkers",
"horses",
"icewraiths",
"lurkers",
"mammoths",
"mudcrabs",
"netches",
"rabbits",
"rieklings",
"sabrecats",
"seekers",
"skeevers",
"slaughterfishes",
"stormatronach",
"spiders",
"largespiders",
"giantspiders",
"spriggans",
"trolls",
"vampirelords",
"werewolves",
"wispmothers",
"wolves",
"wisps"

 

 

 

This made me realize that I needed to use "High Elf" and "Dark Elf" instead of "Altmer" and Dunmer". Thanks!

 

On 6/6/2022 at 8:20 PM, zeelok said:

 

The command returns the name of the race into $$, so it looks like something similar to this should work:

["actor_race", "$partner", ""],
["set", "$1", "$$"],
["if", "$1", "=", "Altmer", "Altmer"],
["if", "$1", "=", "Argonian", "Argonian"],
["if", "$1", "=", "Bosmer", "Bosmer"],

 

Thanks for this! It sorta works now. It gives out the ingredient but only whatever is in the first ":" section so it would only give a vial of Altmer cum. If I delete the Altmer and Argonian sections, then it would only give out a vial of Bosmer cum. I'm not sure what's happening. Once I get this figured out, then I'm posting an update for my mod. 

HumanVials.json

Link to comment
5 hours ago, RangerEdas said:

Thanks for this! It sorta works now. It gives out the ingredient but only whatever is in the first ":" section so it would only give a vial of Altmer cum. If I delete the Altmer and Argonian sections, then it would only give out a vial of Bosmer cum. I'm not sure what's happening. Once I get this figured out, then I'm posting an update for my mod. 

 

I re-read the sl_triggers_script_description.txt file and it turns out "=" only does numeric equality, you need "&=" for string equality. So the conditions should be

["if", "$1", "&=", "High Elf", "Altmer"],
["if", "$1", "&=", "Argonian", "Argonian"],
["if", "$1", "&=", "Wood Elf", "Bosmer"],
["if", "$1", "&=", "Breton", "Breton"],
["if", "$1", "&=", "Dark Elf", "Dunmer"],
["if", "$1", "&=", "Khajiit", "Khajiit"],
["if", "$1", "&=", "Nord", "Nord"],
["if", "$1", "&=", "Imperial", "Imperial"],
["if", "$1", "&=", "Orc", "Orsimer"],
["if", "$1", "&=", "Redguard", "Redguard"],

 

I actually tested my suggestion this time instead of just posting it, I found some nord NPC and verified I got a nord vial.

Edited by zeelok
Link to comment
8 hours ago, zeelok said:

 

I re-read the sl_triggers_script_description.txt file and it turns out "=" only does numeric equality, you need "&=" for string equality. So the conditions should be

["if", "$1", "&=", "High Elf", "Altmer"],
["if", "$1", "&=", "Argonian", "Argonian"],
["if", "$1", "&=", "Wood Elf", "Bosmer"],
["if", "$1", "&=", "Breton", "Breton"],
["if", "$1", "&=", "Dark Elf", "Dunmer"],
["if", "$1", "&=", "Khajiit", "Khajiit"],
["if", "$1", "&=", "Nord", "Nord"],
["if", "$1", "&=", "Imperial", "Imperial"],
["if", "$1", "&=", "Orc", "Orsimer"],
["if", "$1", "&=", "Redguard", "Redguard"],

 

I actually tested my suggestion this time instead of just posting it, I found some nord NPC and verified I got a nord vial.

 

I can't believe I missed that! Thanks so much for your help! I confirmed that it works and I have posted a new version for my mod.

Link to comment
  • 2 weeks later...
45 minutes ago, Tlam99 said:

Will this break all older json ?

Suggest, use leading 0x for hex, so older dec id will not be broken.

It should not. I have never seen, that someone would write 01234. Usually you see a number in hex, use calc to convert and it displays 1234, not 01234.

 

But its "should". So, not 100% sure.

 

 

 

Link to comment

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use