Jump to content

SL Triggers(v12) [2022-06-05]


Recommended Posts

Posted

I'm trying to make some "flavor text" commands that will print randomly-rolled messages to the notification area on certain events, but it doesn't seem like they're working properly. Can someone take a look at the structure of my code and tell me if I'm doing something wrong with the basic random integer/goto structure? The objective is to make it wait 2 seconds (a status message from a different mod gets in the way, otherwise), and to then pick a random number between 1-3 (or whatever number of messages I include) and "goto" that message, before proceeding to the end.

 

{
	"cmd": [
		["util_wait", "2"],
		["rnd_int", "1", "3"],
		["set", "$1", "$$"],
		["goto", "$1"],
		[":", "1"],
		["msg_notify", "Message text 1"],
        	["goto", "end"],
		[":", "2"],
		["msg_notify", "Message text 2."],
        	["goto", "end"],
		[":", "3"],
		["msg_notify", "Message text 3."],
        	["goto", "end"],
        	[":", "end"]
	]
}

 

Posted
On 2/9/2023 at 9:19 PM, harems said:

can we do multi command with time base in one trigger ?

 

example: command 1 > after 1s > command 2 > after 1s > command 3 ....

 

but write it with one trigger ?

You might need to make a custom command as a .json file, something like this:

 

{
	"cmd": [
		["command", "parameter"],
		["util_wait", "1"],
		["command", "parameter"],
		["util_wait", "1"],
		["command", "parameter"]
	]
}

You could take a look at the other command files you'd want to incorporate, and then combine them in a single .json file with the "util_wait" command used between their code blocks. This could get messy though if they're particularly complicated, or if they share variable names/uses.

Posted

I am trying to make a trigger to use the Rose of Azura found in Dark Desires Club. Well there are two versions in that mod, both don't work.

 

I've copied a previous use item trigger, replaced the mod/item references, but but nothing happens. It has worked for other mods and items. Any ideas what is up?


 

Spoiler

Item 1:

 

{
    "cmd" :
    [
    ["item_adduse", "$self", "DarkDesiresClub.esp:253B2F", "1", "0"]
    ]
}

 

Item 2:

 

{
    "cmd" :
    [
    ["item_adduse", "$self", "DarkDesiresClub.esp:253B30", "1", "0"]
    ]
}

 

Posted (edited)
1 hour ago, ebbluminous said:

I am trying to make a trigger to use the Rose of Azura found in Dark Desires Club. Well there are two versions in that mod, both don't work.

 

I've copied a previous use item trigger, replaced the mod/item references, but but nothing happens. It has worked for other mods and items. Any ideas what is up?


 

  Reveal hidden contents

Item 1:

 

{
    "cmd" :
    [
    ["item_adduse", "$self", "DarkDesiresClub.esp:253B2F", "1", "0"]
    ]
}

 

Item 2:

 

{
    "cmd" :
    [
    ["item_adduse", "$self", "DarkDesiresClub.esp:253B30", "1", "0"]
    ]
}

 

I think I saw on another post further back that the hex codes for items only work if they are preceded by a 0. Alternatively, you could convert them to decimal from hex, which is the way SL Triggers was originally designed. 253B2F would convert to 2439983, and 253B30 would convert to 2439984. I can't be sure if the leading "25" is the load order, though, so they may alternatively be 15151 and 15152, if that's the case. Given the two numbers are only 1 increment apart, that looks right, so I'd try it like that, first, e.g. "DarkDesiresClub.esp:15152".

Edited by meatslinger
Fixed quoting.
Posted
15 hours ago, meatslinger said:

You might need to make a custom command as a .json file, something like this:

 

{
	"cmd": [
		["command", "parameter"],
		["util_wait", "1"],
		["command", "parameter"],
		["util_wait", "1"],
		["command", "parameter"]
	]
}

You could take a look at the other command files you'd want to incorporate, and then combine them in a single .json file with the "util_wait" command used between their code blocks. This could get messy though if they're particularly complicated, or if they share variable names/uses.

 

 

thanks bro, it worked

Posted

I don't know if this problem is just on my end, but the mod doesn't seem to be able to find objects to equip when it comes from a file tagged as esl.

 

I scratched my head for a few hours wondering why my script wasn't equipping the item I asked for in the script, and finally tried to untag the mod containing the object of its esl flag, and it worked immediately.

 

If anyone is having a similar problem and has no idea why it's not working, I suggest you to try this.

 

PS : If somebody has a better workaround to my problem, I'll take it.

Posted
On 2/18/2023 at 11:50 AM, meatslinger said:

I think I saw on another post further back that the hex codes for items only work if they are preceded by a 0. Alternatively, you could convert them to decimal from hex, which is the way SL Triggers was originally designed. 253B2F would convert to 2439983, and 253B30 would convert to 2439984. I can't be sure if the leading "25" is the load order, though, so they may alternatively be 15151 and 15152, if that's the case. Given the two numbers are only 1 increment apart, that looks right, so I'd try it like that, first, e.g. "DarkDesiresClub.esp:15152".

Yes. This hex and dec can be confusing. Add skyrim's "load order" stuff, and it can be a mess :/

 

If you write a hex number, it has to be preceded by 0. Its how my code knows if its a hex or dec number.

 

Skyrims item id is a 32 bit number. Written in hex notation, 32 bit numbers go from 0 to FFFFFFFF. So max 8 letters/digits.

Skyrim "stores" load number in the first 2 letters. So, if you see 8 letters for item ID, first 2 are load order, the other 6 are actual items ID.

"253B2F" has 6 letters, so it doesn't have a load order.

 

So for the purpose of SL Triggers, you'd write "DarkDesiresClub.esp:0253B2F".

"DarkDesiresClub.esp" is mods name. In code, its dynamicaly replaced with load order number.

"0253B2F" is items ID. Because it starts with 0, SL Triggers thinks its written in hex notation.

 

Posted (edited)

Hmm... I wonder if this is beyond the scope of this mod, but is there a way to set an NPC as protected or even unprotect them with any of these commands?

 

Was trying to set it up so that an NPC can become protected during sex and then unprotect them afterwords.

 

Edit: And the answer to that is a very conditional maybe.

 

I was able to add it to the sl_triggercmds.psc myself, but...

Protected status can only be applied to the Base of an Actor and not the Ref, so it would affect anyone of that base... It would only work well on unique actors.

 

I added onto Dweezer's additions just in case anyone wanted to use both.

 

New to this is under actor_state is Get/Set Protected/Essential/Invulnerable with Essential/Invulnerable disabled for non-uniques as a safeguard and an "auto" set protection if they are unique(they turn essential) or not (just protected).

 

Quote

 

		elseif ss1 == "GetProtected"
			stack[0] = matebase.IsProtected() as string
		elseif ss1 == "SetProtected"
            int p3
            p3 = resolve(param[3]) as int
				matebase.SetProtected(p3 as bool)
		elseif ss1 == "GetEssential"
			stack[0] = matebase.IsEssential() as string		
		elseif ss1 == "SetEssential"
            int p3
            p3 = resolve(param[3]) as int
			if (matebase.IsUnique() == true)  || (p3 == 0)
				matebase.SetEssential(p3 as bool)
			endif
		elseif ss1 == "GetInvulnerable"
			stack[0] = matebase.IsInvulnerable() as string
		elseif ss1 == "SetInvulnerable"
            int p3
            p3 = resolve(param[3]) as int
			if (matebase.IsUnique() == true) || (p3 == 0)
				matebase.SetInvulnerable(p3 as bool)
			endif
		elseif ss1 == "SetProtectionUnique"
            int p3
            p3 = resolve(param[3]) as int
				if (matebase.IsUnique() == true)
					matebase.SetEssential(p3 as bool)
				else
					matebase.SetProtected(p3 as bool)
				endif
        endIf

 

 

sl_triggersCmd.pex sl_triggerscmd.psc

Edited by Mushano
  • 2 weeks later...
Posted

I was trying to run a script for all player animations and found that the scripts wouldn't run when setting race to Player in the trigger condition for masturbation animations. Is there a way to get around this via a separate condition trigger or did I miss an option somewhere trying to make it work?

Posted

Is there a way to write a command to apply slave tats to PC's and NPC's, like Tears & Makeup Running?  Wouldn't have to be on a timer, it could stay on

Posted

I'm sorry but I have no idea about scripting and Json files etc.

What I'm looking for is something to get triggered after sex and then there is a SMALL boon - like a faction of a skill increase or a small buff to health, magic or stamina. Does something like that already exist or would somebody be willing to make it?

As far as I can see, the effects that come with SL Triggers are a bit too strong (whole perk point, skill increase, stat increase etc). Or ... is the skill increase SL Triggers already have (by one point) smaller than I think it is (I thought it would be like raising the skill so it counts for levelling - that's too much for me).

Posted

Does anyone know the name for the idle that plays when a character recovers from bleedout but is at low health and out of combat?  It's the limping one.  I want to make a trigger that causes characters to play this idle after a good screwing.  All I know is that it is not "IdleWounded_01" as that's the sitting on the ground one.

Posted (edited)

I'm trying to add tongue at the start of an oral scene then remove it at the end. I can remove it at the end but having an issue at the start. It gets added into inventory but not equipped. I have checked just the item, it works when equipping manually, so it's something with initial script.

This is what I'm using. Lightpatch has the armor record for tongue. Equip item then repaint actor to show. So what am I missing?


                                [

                                    ["set", "$1", "LIGHTPATCH.esp:956012"],

                                    ["item_equip", "$self", "$1", "0", "0"],

                                    ["actor_qnnu", "$self"]

                                ]
 

I have set 100% chance, on Oral, and involving player as actor.

Edited by ssskn
  • 3 weeks later...
Posted (edited)

Does anyone have an example of how to add a stacking buff on a follower when they receive semen from the player?

 

Example:  Player, with penis, having sex with female follower, cum inside, gain buff

 

 

Also, I need some clarification on these items:

 

"- if location: is it inside or outside" - is this indoors/outdoors or is it  "inside of body" / "outside of body" ?

 

"- if gender: male, female" - is this only 1 character in a specific position in the animation or does it scan every actor in the animation?

Edited by NicholasJMoore
  • 3 weeks later...
Posted

Hello. 

I have problem with trying to create minigame (task: press 4 buttons in right order, wich is random). There around about 200 lines code and most of them is commands "if" and "goto". And if i delete some of these very same lines (not matters what kind of) it works fine, but in full size trigger starts and stucks after some operations. I tried to delete different lines, and code works fine everytime, so i believe I didn't miss some commands or commas.

Is here any limit on numbers of commands in .json file? Or do I not understand anything?

Posted
1 hour ago, Someone92 said:

Check in an online json checker if you have made an error somewhere. That way you can exclude any syntax error.

Thank you. 

Online checker didn't find any syntax errors. And different parts of code works fine, i test them separately. And together they stucks :)

I guess , there's some limit of size or numbers of commands, unknown for me. I hope, there's the way to avoid it.

Posted (edited)

Hello everyone, I was hoping I could get some guidance on updating a previous command from sexlabutil to SL triggers. A few years ago someone made this for me for the Cleric mod

 

[Main]

Name=DibellaCleric50xp

Page=0

Type=cmd

Id=502

Cmd=modgv:mb_cleric_v2.esp:005903:-50+msg:Dibella smiles down on you.

 

I am trying to learn how to convert the coding above into a .json file. Would I just use the example of the changing health command but make it target that esp/global variable?
 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Edit:


I also started to try and work on a json for that would in the end regain a spell slot when using Vancian Magic from Ordinator. I couldn't get it working so I tried getting it to read and return how many slots I should have left. When testing it I had 19 slots left but for some reason it returned 0. When I convert the last 6 digits of the hexa - 03167A0E to decimal I get 1473038.

 

 

{
    "cmd" :
    [
        ["av_get", "$self", "Ordinator - Perks of Skyrim.esp:1473038"],
        ["msg_notify", "$$"]
    ]
}

Edited by Shi-ku
Posted
On 13.05.2023 at 22:33, Fotogen said:

Не более 32 уникальных ярлыков.

Итак, это:

        [":", "БОЛЕЕ"],

это метка перехода. Максимум 32 уникальных.

 

Thanks a lot for help.

It explains my problems. Great ?

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