Fraying9981 Posted July 29 Posted July 29 28 minutes ago, hextun said: https://www.nexusmods.com/skyrimspecialedition/mods/65629 is a mod that allows you to use a configuration file to attach custom Papyrus code (presumably of your own making) to any object on load. So, for example, if you wrote a bit of Papyrus code that had a "OnTimeIsTicking" handler that, in turn, used the SLTriggers API or ModEvent integration to request a suitable script be invoked, you wouldn't need to wait and could get going immediately. In fact you could do this with any mod that lacks existing integration. very interesting. my knowledge of papyrus is still limited. i'm going one step at a time. i understand the code and the logic (it's just functions in the end) but the big blocker for me is the esp creation/compilation, since papyrus functions refer to and update objects that are tracked inside the esp. I have OOP experience but the fact that part of the project data in skyrim lives in this esp thing that you can only access reliably at runtime makes it difficult for me to try new things. 30 minutes ago, hextun said: Interesting. Bit of a pickle for me though. On the one hand, if I stick to the current architecture, being as this type of event wouldn't belong in "Core" (not being Vanilla or SKSE) nor is it tied to SexLab nor OStim, nor is it "adult general", it would properly belong in its own .esp (lite). On the other hand, that's yet another .esp in the load order, even if it is lite flagged. All to have the listener set up to trigger events. yes i understand. i was thinking it could be a replacement for your current top of the hour system, if it's more efficient, so that you can focus on other parts of the mod. not a feature request at all!
hextun Posted July 30 Author Posted July 30 19 hours ago, Fraying9981 said: very interesting. my knowledge of papyrus is still limited. i'm going one step at a time. i understand the code and the logic (it's just functions in the end) but the big blocker for me is the esp creation/compilation, since papyrus functions refer to and update objects that are tracked inside the esp. I have OOP experience but the fact that part of the project data in skyrim lives in this esp thing that you can only access reliably at runtime makes it difficult for me to try new things. yes i understand. i was thinking it could be a replacement for your current top of the hour system, if it's more efficient, so that you can focus on other parts of the mod. not a feature request at all! Regarding being a replacement for the top of the hour functionality: for now I plan to retain existing top of the hour functionality as-is. For one thing, it's a fairly simple mechanism that mimics functionality existing mods already use (i.e. regular updates "on the hour"); so the enhanced functionality that TimeIsTicking provides would be overkill for those situations. For another, TimeIsTicking *does* over a lot of additional functionality that would be missed out on if I tied the top of the hour trigger to it; it can do a lot more, and has its own configuration menus and files to manage it, so why restrict its use to just "top of the hour" stuff? That's why I was saying it would probably be better to just embrace it fully as a proper mod integration. TimeIsTicking already offers its own configuration capabilities that fully map all of its functionality and, best of all, already sends an event when one of its timers fires. I think, then, that, if integration with TimeIsTicking were to happen, it would be better to have an SLTriggers MCM area where you can set up a trigger for OnTimeIsTicking events where you can enter the ruleId you want to listen for and then select the SLTscripts you want fired as a result. Then do your TimeIsTicking configuration in its configuration dialog. Clean break. Full functional support. As I said, the only problem is that, unless I choose to add it to the "Core" area, it leads to adding one more .esp to the load order. And, again, I can make it a light plugin and make it an optional include, but I already feel awkward about having 3 plugins in the load order for SexLab instances anyway (sl_triggers.esp, sl_triggersSexLabExtension.esp, sl_triggersAdultGeneralExtension.esp). Light flagged, sure, but I still feel bad. Now, on to making an .esp. Firstly, the mod I linked is called NoESP because it includes a .dll that reads a config file that lets it, at runtime, bind the Papyrus script you specify to the object you specify (though based on the instructions I gave, it should just bind to the Player). All of this, without needing an .esp (thus the mod's name ). So in that case, the *only* tough thing you would be doing would be compiling Papyrus. And while that still requires some setup (to make sure you have the base Papyrus files plus the SKSE files in your include path), for the very limited example I gave, you wouldn't need anything else included, like SLTriggers files. That said, think of the whole .esp system like a database. Each type of object described in it becomes available in game. If you set up a dependency on another .esp, you can override an existing record or create a new one. Some records, like Quest (QUST) objects might have special handling that let you mark them as being automatically available and running at start (i.e. like quests that the Player automatically receives at the start of the game). Others might only come into play when triggered in game, like Spells (SPEL) and their associated Magic Effects (MGEF). These objects, just as with a database, can have links to other records and other *types* of records. So a MGEF says what it does and a SPEL links to the MGEF it triggers along with info about how long it lasts and so forth. They may also specify Papyrus scripts that are associated with them. Then when the associated object (QUST, or MGEF) comes into play, that script is loaded and relevant events are fired for it (like OnInit or OnEffectStart). And you can do a LOT in xEdit without having to actually crank up CreationKit, which simplifies things.
thorax339 Posted July 30 Posted July 30 I was looking at updating my BAC related script i posted in the club as i noticed ANOTHER typo i made making one of the features comepletely not work and decided to try and improve some things. Looking at hte list of available functions i couldn't see a way so i thought id ask Any idea if theres a way to simulate the player taking an item from a container? be it a chest or npc? The one downside i have with my script is that it can bypass stealing and pickpocketing as it uses the removeitem function with its transfer parameter as a way to make sure it cant add more than what was in the inventory. Specifically in the event someone opens a container, starts to take the items before the script does. Side note. seeing the new leash framework adst is making could be a nice addition to the functions of SL triggers.
Fraying9981 Posted July 30 Posted July 30 43 minutes ago, hextun said: And you can do a LOT in xEdit without having to actually crank up CreationKit, which simplifies things. thanks, how would you recommend to start? i read somewhere that the way to go was to ask claude to generate scripts to extract data from xedit (by loading the xedit script) then modify/add whatever you want then write a script to put it back in? or recompile?
hextun Posted July 30 Author Posted July 30 On 7/26/2026 at 9:56 AM, adragtobearound said: How might I make a script that tells the actor to get naked first? I am trying to create a masturbation upon viewing sex script. Also, how do I specifically end a scene? If you are triggering a masturbation scene with SexLab, wouldn't the SexLab strip settings automatically handle that? For example, you can use the "sl_startsex" command to start a solo scene (i.e. masturbation); wouldn't that basically automatically handle stripping (and redressing post-coitus) automatically? Form[] $scene_actors listadd $scene_actors $system.player sl_startsex $scene_actors none "" false I know there is a SexLab strip function which I haven't bound; I just haven't done so. As for ending a scene, you would be looking for sl_endthread which just takes an Actor as the only parameter, ending any SexLab animation associated with them. So: sl_endthread $system.self or sl_endthread $system.player ; to explicitly target the player
hextun Posted July 30 Author Posted July 30 1 hour ago, thorax339 said: I was looking at updating my BAC related script i posted in the club as i noticed ANOTHER typo i made making one of the features comepletely not work and decided to try and improve some things. Looking at hte list of available functions i couldn't see a way so i thought id ask Any idea if theres a way to simulate the player taking an item from a container? be it a chest or npc? The one downside i have with my script is that it can bypass stealing and pickpocketing as it uses the removeitem function with its transfer parameter as a way to make sure it cant add more than what was in the inventory. Specifically in the event someone opens a container, starts to take the items before the script does. Side note. seeing the new leash framework adst is making could be a nice addition to the functions of SL triggers. By "simulate" what do you mean? For example, I've run across what you mentioned; I have a script I play with that uses the "Container Opened" trigger and inspects it for any of the Transformative Elixirs potions, automatically pulls them, and then quaffs them (my DB is morphically challenged in that way). But as you said, it ignores locked status so even on a locked chest, right as I'm settling in for a lockpicking session the elixirs have already been removed and drank. I don't mind it so much because, hey, it's supposed to be a curse, but technically it would be nice if it were delayed until a successful lockingpicking attempt is completed. So, are you talking about addressing that problem? Or do you mean something else? I saw the leash framework posted as well. Got a kick out of them dragging Nazeem around for a bit ("c'mon Nazeem, let's go check out the Cloud District!"). As for integration, you mean a way to add/remove leashes?
thorax339 Posted July 30 Posted July 30 (edited) 1 hour ago, hextun said: By "simulate" what do you mean? For example, I've run across what you mentioned; I have a script I play with that uses the "Container Opened" trigger and inspects it for any of the Transformative Elixirs potions, automatically pulls them, and then quaffs them (my DB is morphically challenged in that way). But as you said, it ignores locked status so even on a locked chest, right as I'm settling in for a lockpicking session the elixirs have already been removed and drank. I don't mind it so much because, hey, it's supposed to be a curse, but technically it would be nice if it were delayed until a successful lockingpicking attempt is completed. So, are you talking about addressing that problem? Or do you mean something else? I saw the leash framework posted as well. Got a kick out of them dragging Nazeem around for a bit ("c'mon Nazeem, let's go check out the Cloud District!"). As for integration, you mean a way to add/remove leashes? Basically. On normal interaction. AKA player takes item from an owned chest (stealing) or playing takes item from an actor (pickpocketing) you run the risk of being spotted, this can cause crime or other consequences based on mods. With the ways ive tried from the functions all of these function more like adding items via console which completely bypasses these consequences as if the player is always succeeding at taking these items. So "simulating" the player taking them would be having it so instead of using additem or removeitem (and using the transfer parameter) i was wondering if there was something else ive missed that can still carry those consequences of stealing / pickpocketing (without having to manually script that in). For integration of the Leash framework i guess it would be to be able to access the papyrus api i guess and have all the functions of adding, removing and customising the lengths etc Edited July 30 by thorax339
hextun Posted July 30 Author Posted July 30 (edited) Okay... v0.987 is up with Leash Framework integration enhancement: Leash Framework integration leash_applyleash leash_disconnectleash leash_unleashall leash_isleashed leash_isleashholder leash_getleashholder leash_getleashedactor new scripts: LeashPlayerDisconnectsTarget LeashPlayerHoldsTarget The scripts expect you to target an NPC who will then be leashed to the Player. Edited July 30 by hextun fixed 'leash_applylash' typo to 'leash_applyleash'
hextun Posted July 30 Author Posted July 30 1 hour ago, thorax339 said: Basically. On normal interaction. AKA player takes item from an owned chest (stealing) or playing takes item from an actor (pickpocketing) you run the risk of being spotted, this can cause crime or other consequences based on mods. With the ways ive tried from the functions all of these function more like adding items via console which completely bypasses these consequences as if the player is always succeeding at taking these items. So "simulating" the player taking them would be having it so instead of using additem or removeitem (and using the transfer parameter) i was wondering if there was something else ive missed that can still carry those consequences of stealing / pickpocketing (without having to manually script that in). For integration of the Leash framework i guess it would be to be able to access the papyrus api i guess and have all the functions of adding, removing and customising the lengths etc Okay, so, I just added and released Leash Framework integration. It was an easy grab, so, done. Back to the simulation. So, to be clear, you want to somehow be able to loot (from chest or NPC via pickpocket) without triggering theft/pickpocket consequences? Is it safe to assume you want this to occur as part of a normal interaction i.e. clicking on a chest to open it or an NPC to pickpocket? Do you have specific items in mind that you want the script to look for to pull? For example, "when a player opens a chest or pickpockets an NPC, always grab any gold without triggering theft/pickpocket consequences"?
thorax339 Posted July 30 Posted July 30 (edited) 26 minutes ago, hextun said: Okay, so, I just added and released Leash Framework integration. It was an easy grab, so, done. Back to the simulation. So, to be clear, you want to somehow be able to loot (from chest or NPC via pickpocket) without triggering theft/pickpocket consequences? Is it safe to assume you want this to occur as part of a normal interaction i.e. clicking on a chest to open it or an NPC to pickpocket? Do you have specific items in mind that you want the script to look for to pull? For example, "when a player opens a chest or pickpockets an NPC, always grab any gold without triggering theft/pickpocket consequences"? Specifically the opposite. Id like the script to be able to trigger theft / pickpocket consequences as if the player was manually taking the items themselves. My Bac script/s search for any Lactacid or Blended Lactacid in a container and depending on variables will have a chance to make the player take those items. As it is now im using the item_remove function like this: item_remove $request.core.activatedContainer "MilkModNEW.esp:0x0343f2" $Lcount false $system.player $Lcount is determined earlier when i got the count of that item in the chest. using hte player on the end is what transfers those items to the player instead of just deleting them. this currently was the only way i could find to make sure nothing was able to be duplicated by players taking things manually before the script manages to trigger (as the script does take a few seconds to work through). Also even if the player takes items. no matter the actualy count that was in there. The function can only take what is left and give the player that amount. the count isn't technically needed but making a set # isn't best practice Doing it this way however is just like using the console to remove items from the chest and hten add items to the player which bypasses the consequences. Ideally. if taking from an owned chest (stealing) or pickpocketing. When this transfer occurs id like the same chance of pickpocket failure or being caught resulting in whatever consequences come after from whatever mods one might have. Also from your previous post about lockpicking. I never actually tested that and that might cause the same issue with it taking the items before even looking inside. p.s. my 69th post. nice. Edited July 30 by thorax339
Fraying9981 Posted July 30 Posted July 30 2 hours ago, hextun said: Okay... v0.987 is up with Leash Framework integration enhancement: Leash Framework integration leash_applylash leash_disconnectleash leash_unleashall leash_isleashed leash_isleashholder leash_getleashholder leash_getleashedactor new scripts: LeashPlayerDisconnectsTarget LeashPlayerHoldsTarget The scripts expect you to target an NPC who will then be leashed to the Player. no way! ure the absolute king! can you suggest a keystroke implementation? leash crosshair target 1 to crosshair target 2?
thorax339 Posted July 30 Posted July 30 40 minutes ago, Fraying9981 said: no way! ure the absolute king! can you suggest a keystroke implementation? leash crosshair target 1 to crosshair target 2? Could probably make one using the keymapping trigger using the "cursor_ref" option https://github.com/sltriggersredux/sltriggersredux/wiki/Scripts#cursor_ref---objectreference-under-cursor Would probably need a script that on first press stores an actor as a global variable as the first slot in an array then second press would set the secondtarget as the second part of the array. Then if the array has 2 entries it will leash the 2 together with whatever settings you have.
hextun Posted July 30 Author Posted July 30 2 hours ago, Fraying9981 said: no way! ure the absolute king! can you suggest a keystroke implementation? leash crosshair target 1 to crosshair target 2? LeashManager.sltscript - attach to the key binding of your choice If no one is targeted, target is set to Player, otherwise target is whomever is under cursor at keypress Uses 1-2 popups. First popup lets you set the Holder or Wearer, which uses two global variables If you choose '- Execute -' a second popup is shown allowing you to choose which action to take: attach, disconnect, unleash all Spoiler ; $global.leash_holder is currently selected holder ; for purposes of this script; it doesn't mean they are actually a holder just that ; any operation run by this script will use them as the holder ; $global.leash_wearer is currently selected leashed actor ; for purposes of this script; it doesn't mean they are actually leashed by the holder just that ; any operation run by this script will use them as the leashed actor ; Leash_neck -> Leash.esp:0x804 ; Leash_body -> Leash.esp:0x800 set $leash_item "Leash.esp:0x804" set $target_actor resultfrom cursor_ref if $target_actor == none set $target_actor $system.player endif set $target_name resultfrom actor_name $target_actor set $target_formid resultfrom form_dogetter $target_actor GetFormID [setup] if $global.leash_holder != none set $holder_name resultfrom actor_name $global.leash_holder set $holder_formid resultfrom form_dogetter $global.leash_holder GetFormID else set $holder_name "None" set $holder_formid "0x0" endif if $global.leash_wearer != none set $wearer_name resultfrom actor_name $global.leash_wearer set $wearer_formid resultfrom form_dogetter $global.leash_wearer GetFormID else set $wearer_name "None" set $wearer_formid "0x0" endif listclear $labels string[] $labels listadd $labels $"Set Holder (Currently: {holder_name} - {holder_formid})" $"Set Wearer (Currently: {wearer_name} - {wearer_formid})" "- Execute -" "- Done -" set $selection resultfrom uilib_showlist $"Leash Actor: {target_name} - {target_formid}" $labels 0 0 if $selection == 0 set $global.leash_holder $target_actor goto [setup] elseif $selection == 1 set $global.leash_wearer $target_actor goto [setup] elseif $selection == 2 ; no-op, fallthrough else return endif listclear $labels listadd $labels "- Cancel -" "Apply Leash" "Disconnect Leash" "Unleash All for Holder" set $selection resultfrom uilib_showlist "Leash Action" $labels 0 0 goto $selection msg_notify "Invalid selection" return ; Cancel [0] return ; Apply Leash [1] set $leash_item_count resultfrom objectreference_dofunction $global.leash_wearer GetItemCount $leash_item if $leash_item_count < 1 item_equip $global.leash_wearer $leash_item false false endif leash_applyleash $global.leash_holder $global.leash_wearer "NPC Spine2 [Spn2]" "Leash1" 200 500 true return ; Disconnect Leash [2] leash_disconnectleash $global.leash_holder $global.leash_wearer set $leash_item_count resultfrom objectreference_dofunction $global.leash_wearer GetItemCount $leash_item if $leash_item_count > 0 item_remove $global.leash_wearer $leash_item $leash_item_count false none endif return ; Unleash All for Holder [3] leash_unleashall $global.leash_holder return
Fraying9981 Posted July 30 Posted July 30 7 minutes ago, hextun said: LeashManager.sltscript - attach to the key binding of your choice If no one is targeted, target is set to Player, otherwise target is whomever is under cursor at keypress Uses 1-2 popups. First popup lets you set the Holder or Wearer, which uses two global variables If you choose '- Execute -' a second popup is shown allowing you to choose which action to take: attach, disconnect, unleash all Hide contents ; $global.leash_holder is currently selected holder ; for purposes of this script; it doesn't mean they are actually a holder just that ; any operation run by this script will use them as the holder ; $global.leash_wearer is currently selected leashed actor ; for purposes of this script; it doesn't mean they are actually leashed by the holder just that ; any operation run by this script will use them as the leashed actor ; Leash_neck -> Leash.esp:0x804 ; Leash_body -> Leash.esp:0x800 set $leash_item "Leash.esp:0x804" set $target_actor resultfrom cursor_ref if $target_actor == none set $target_actor $system.player endif set $target_name resultfrom actor_name $target_actor set $target_formid resultfrom form_dogetter $target_actor GetFormID [setup] if $global.leash_holder != none set $holder_name resultfrom actor_name $global.leash_holder set $holder_formid resultfrom form_dogetter $global.leash_holder GetFormID else set $holder_name "None" set $holder_formid "0x0" endif if $global.leash_wearer != none set $wearer_name resultfrom actor_name $global.leash_wearer set $wearer_formid resultfrom form_dogetter $global.leash_wearer GetFormID else set $wearer_name "None" set $wearer_formid "0x0" endif listclear $labels string[] $labels listadd $labels $"Set Holder (Currently: {holder_name} - {holder_formid})" $"Set Wearer (Currently: {wearer_name} - {wearer_formid})" "- Execute -" "- Done -" set $selection resultfrom uilib_showlist $"Leash Actor: {target_name} - {target_formid}" $labels 0 0 if $selection == 0 set $global.leash_holder $target_actor goto [setup] elseif $selection == 1 set $global.leash_wearer $target_actor goto [setup] elseif $selection == 2 ; no-op, fallthrough else return endif listclear $labels listadd $labels "- Cancel -" "Apply Leash" "Disconnect Leash" "Unleash All for Holder" set $selection resultfrom uilib_showlist "Leash Action" $labels 0 0 goto $selection msg_notify "Invalid selection" return ; Cancel [0] return ; Apply Leash [1] set $leash_item_count resultfrom objectreference_dofunction $global.leash_wearer GetItemCount $leash_item if $leash_item_count < 1 item_equip $global.leash_wearer $leash_item false false endif leash_applyleash $global.leash_holder $global.leash_wearer "NPC Spine2 [Spn2]" "Leash1" 200 500 true return ; Disconnect Leash [2] leash_disconnectleash $global.leash_holder $global.leash_wearer set $leash_item_count resultfrom objectreference_dofunction $global.leash_wearer GetItemCount $leash_item if $leash_item_count > 0 item_remove $global.leash_wearer $leash_item $leash_item_count false none endif return ; Unleash All for Holder [3] leash_unleashall $global.leash_holder return amazing. does it conjure the leash item too + equip it?
hextun Posted July 30 Author Posted July 30 22 minutes ago, Fraying9981 said: amazing. does it conjure the leash item too + equip it? Yes, though if you do Unleash All, the leash object won't be removed (though now I think about it that should also be doable using leash_getleashedactors)
Fraying9981 Posted July 30 Posted July 30 6 minutes ago, hextun said: Yes, though if you do Unleash All, the leash object won't be removed (though now I think about it that should also be doable using leash_getleashedactors) nice! will you consider at some point adding a quick UI with Prisma to trigger scripts? in particular instead of keystrokes
hextun Posted Friday at 09:29 AM Author Posted Friday at 09:29 AM 11 hours ago, Fraying9981 said: nice! will you consider at some point adding a quick UI with Prisma to trigger scripts? in particular instead of keystrokes To be clear, you are inquiring about adding a PrismaUI based interface to SLTriggers that would provide the list of available scripts and allow you to trigger them via mouseclick instead of keystroke? Wouldn't you still need a keystroke to open the list? And why PrismaUI? For displaying a list and selecting an item, UILIB provides that fairly easily. PrismaUI is not a simple thing to add; certainly not as simple as the UILIB functionality was.
Fraying9981 Posted Friday at 11:40 AM Posted Friday at 11:40 AM 2 hours ago, hextun said: To be clear, you are inquiring about adding a PrismaUI based interface to SLTriggers that would provide the list of available scripts and allow you to trigger them via mouseclick instead of keystroke? Wouldn't you still need a keystroke to open the list? And why PrismaUI? For displaying a list and selecting an item, UILIB provides that fairly easily. PrismaUI is not a simple thing to add; certainly not as simple as the UILIB functionality was. okay yeah I was just suggesting it because it's so much easier to use as a user :p To fire scripts, navigate through menus...MCM is slow and clunky But i totally understand if you have other priorities!
hextun Posted Friday at 02:53 PM Author Posted Friday at 02:53 PM I have some testing to do, but for now here is the changelog for the upcoming 0.988 release: Spoiler update: cursor_ref now in lang support enhancement: added $request.cursor_ref: provides Form under cursor at time of script launch for any script differs from 'cursor_ref' which provides current Form under cursor useful to know exactly which Actor was being pointed at when the script was first called enhancement: new Leash Framework bindings leash_getminleashlength leash_getmaxleashlength leash_setminleashlength leash_setmaxleashlength enhancement: new commands sltr_get_scripts_list - returns the list of available SLTScripts enhancement: new SLTScripts: RunScript - displays all available SLTScripts and allows you to select one to run LeashManager - uses Actor under crosshair to manage potential holder/wearer for executing leash commands bugfix: form_doaction, objectreference_doaction, quest_doaction will no longer cause script execution to hang enhancement: new system variable: $system.is_available.sexlabpp true if SexLabPP module is installed and functioning update: $system.is_available.sexlab is true if either SexLab OR SexLabPP is installed and functioning use $system.is_available.sexlabpp to determine which version is explicitly installed if necessary Worth noting: - $request.cursor_ref returns the actor under the cursor AT THE TIME THE SCRIPT WAS LAUNCHED REGARDLESS OF WHEN USED - use this when you want to keep working with whomever the script was original pointing at - cursor_ref returns the actor CURRENTLY UNDER THE CURSOR WHICH MAY CHANGE FOR LONG ENOUGH RUNNING SCRIPTS - use this when you want to work with whomever you are currently pointing at regardless of whom you originally pointed at - this is NOT the same as $system.target sltr_get_scripts_list returns the list of scripts the RunScript.sltscript that is included presents that list, lets you pick from it (or pick '- Cancel -' in case you changed your mind) and then will run that script $system.is_available.sexlabpp is to help you discern via SLTScript which SexLab variant (SexLab or SexLabPP) you are using The new leash_* bindings were added because the Leash Framework developer just added them. Only use them if you are on a recent enough version of Leash Framework
Fraying9981 Posted Friday at 03:57 PM Posted Friday at 03:57 PM a guide on how to use the menu for the leash script would be good :p can you explain? i understand there are 2 sequences.
hextun Posted Friday at 04:41 PM Author Posted Friday at 04:41 PM 22 minutes ago, Fraying9981 said: a guide on how to use the menu for the leash script would be good 😛 can you explain? i understand there are 2 sequences. The LeashManager.psc? First, when it is run it takes note of who you are pointing at. If you aren't pointing at anyone it assumes you mean the player. This becomes $target_actor. Now, it pops up the first menu. Only this menu has anything to do with $target_actor; once you leave this menu, $target_actor has no bearing. $target_actor is *only* used here for purposes of setting either $global.leash_holder and/or $global.leash_wearer. This menu allows you to: - set $global.leash_holder to $target_actor - If you choose this, you the first popup will be shown again, to let you either change your mind (i.e. set the other leash actor) or to choose to "Execute" - set $global.leash_wearer to $target_actor - If you choose this, you the first popup will be shown again, to let you either change your mind (i.e. set the other leash actor) or to choose to "Execute" - move to the "Execute" popup - Done If you choose "Done", the script ends but since $global variables were set those changes remain. If you choose "Execute", a new popup is presented. From here you can: - Cancel - Apply Leash - Disconnect Leash - Unleash All Note that the "Execute" popup functions based on the $global variables, $global.leash_holder and $global.leash_wearer. Furthermore, no attempts are made to verify that your selections make sense. So if you have only set one of them, or they are both the same, or you try to apply when a leash is already setup, or disconnect when no proper leash is setup, it will still make the attempt but fail in whatever way the Leash Framework decides. So: - you've never run the script - $global.leash_holder and $global.leash_wearer are both empty/none - you point at nothing and run LeashManager - the player is $target_actor - in the first popup you choose "Set Holder" - this sets $global.leash_holder to the player - the popup reappears but now has your player identified in the "Set Holder" (i.e. "Set Holder (Currently: Fraying9981 - 20)" - you choose "Execute" - a new popup appears - you choose "Apply Leash" - nothing happens (presumably) because the script tries to send "none" as the leash wearer to the Leash Framework and of course it fails - the script has ended - you walk up to a guard and make sure the mouse cursor is pointing at them - you run LeashManager - the guard is $target_actor - the first popup is shown - the player is still identified as the holder i.e. "Set Holder (Currently: Fraying9981 - 20)" - you choose "Set Wearer" - this sets $global.leash_wearer to the guard - the popup reappears and now has the player identified as the holder and the guard identified as the wearer i.e. "Set Wearer (Currently: Whiterun Guard - 1928384)" (totally a madeup FormID for the guard in base 10) - you choose "Done" (maybe by accident) - you didn't "Execute" but you have set one of the required $global variables - you *could* have chosen "Execute" instead and that would allow you to "Apply Leash" - the script has ended - you point at nothing - you run LeashManager - the player is $target_actor - the first popup appears and shows the player as holder and the guard as the wearer - you select "Execute" - because you did not choose either "Set Holder" or "Set Wearer" $target_actor is basically ignored - you're just here to "Execute" using the global variables - the second popup appears - you select "Apply Leash" - a leash is equipped to the guard and Leash Framework is told to apply a leash with the player as the holder and the guard as the wearer - you should now see a leash in game using the default values I set on line 73 of the SLTScript for things like the animation bones and min/max lengths and persistence - the script has ended So the point here is that: - The holder and wearer are set and placed into $global variables that are retained across script executions - This happens in the first popup and requires that when you ran LeashManager you were pointing at the actor you want to set as a holder or wearer - Execution, the second popup, *completely ignores $target_actor* and runs the selected operation using the $global variables you set in the first popup - If you are leashing multiple actors to the same holder, you will set the holder once (it goes into the $global.leash_holder and stays there) and then you can run the script again against each wearer and "set Wearer" followed by "Execute"->"Apply Leash" - "Execute"->"Disconnect Leash" applies specifically to the current $global.leash_holder and $global.leash_wearer and removes the collar from the wearer - "Execute"->"Unleash All for Holder" just calls the Leash Framework unleash all function but currently does not remove leashes, which leads to the items remaining equipped and looks goofy - I will probably fix this in a future update
hextun Posted Friday at 05:18 PM Author Posted Friday at 05:18 PM Probably works best if you attach it to a key binding trigger
Fraying9981 Posted Friday at 11:37 PM Posted Friday at 11:37 PM 6 hours ago, hextun said: The LeashManager.psc? First, when it is run it takes note of who you are pointing at. If you aren't pointing at anyone it assumes you mean the player. This becomes $target_actor. Now, it pops up the first menu. Only this menu has anything to do with $target_actor; once you leave this menu, $target_actor has no bearing. $target_actor is *only* used here for purposes of setting either $global.leash_holder and/or $global.leash_wearer. This menu allows you to: - set $global.leash_holder to $target_actor - If you choose this, you the first popup will be shown again, to let you either change your mind (i.e. set the other leash actor) or to choose to "Execute" - set $global.leash_wearer to $target_actor - If you choose this, you the first popup will be shown again, to let you either change your mind (i.e. set the other leash actor) or to choose to "Execute" - move to the "Execute" popup - Done If you choose "Done", the script ends but since $global variables were set those changes remain. If you choose "Execute", a new popup is presented. From here you can: - Cancel - Apply Leash - Disconnect Leash - Unleash All Note that the "Execute" popup functions based on the $global variables, $global.leash_holder and $global.leash_wearer. Furthermore, no attempts are made to verify that your selections make sense. So if you have only set one of them, or they are both the same, or you try to apply when a leash is already setup, or disconnect when no proper leash is setup, it will still make the attempt but fail in whatever way the Leash Framework decides. So: - you've never run the script - $global.leash_holder and $global.leash_wearer are both empty/none - you point at nothing and run LeashManager - the player is $target_actor - in the first popup you choose "Set Holder" - this sets $global.leash_holder to the player - the popup reappears but now has your player identified in the "Set Holder" (i.e. "Set Holder (Currently: Fraying9981 - 20)" - you choose "Execute" - a new popup appears - you choose "Apply Leash" - nothing happens (presumably) because the script tries to send "none" as the leash wearer to the Leash Framework and of course it fails - the script has ended - you walk up to a guard and make sure the mouse cursor is pointing at them - you run LeashManager - the guard is $target_actor - the first popup is shown - the player is still identified as the holder i.e. "Set Holder (Currently: Fraying9981 - 20)" - you choose "Set Wearer" - this sets $global.leash_wearer to the guard - the popup reappears and now has the player identified as the holder and the guard identified as the wearer i.e. "Set Wearer (Currently: Whiterun Guard - 1928384)" (totally a madeup FormID for the guard in base 10) - you choose "Done" (maybe by accident) - you didn't "Execute" but you have set one of the required $global variables - you *could* have chosen "Execute" instead and that would allow you to "Apply Leash" - the script has ended - you point at nothing - you run LeashManager - the player is $target_actor - the first popup appears and shows the player as holder and the guard as the wearer - you select "Execute" - because you did not choose either "Set Holder" or "Set Wearer" $target_actor is basically ignored - you're just here to "Execute" using the global variables - the second popup appears - you select "Apply Leash" - a leash is equipped to the guard and Leash Framework is told to apply a leash with the player as the holder and the guard as the wearer - you should now see a leash in game using the default values I set on line 73 of the SLTScript for things like the animation bones and min/max lengths and persistence - the script has ended So the point here is that: - The holder and wearer are set and placed into $global variables that are retained across script executions - This happens in the first popup and requires that when you ran LeashManager you were pointing at the actor you want to set as a holder or wearer - Execution, the second popup, *completely ignores $target_actor* and runs the selected operation using the $global variables you set in the first popup - If you are leashing multiple actors to the same holder, you will set the holder once (it goes into the $global.leash_holder and stays there) and then you can run the script again against each wearer and "set Wearer" followed by "Execute"->"Apply Leash" - "Execute"->"Disconnect Leash" applies specifically to the current $global.leash_holder and $global.leash_wearer and removes the collar from the wearer - "Execute"->"Unleash All for Holder" just calls the Leash Framework unleash all function but currently does not remove leashes, which leads to the items remaining equipped and looks goofy - I will probably fix this in a future update thanks, yeah i applied a key trigger. but i'm still struggling to use the UI lol. the item gets properly conjured on the leashed target, and the vanilla Leash Framework interface still works to leash them. With your UI I still haven't been able to connect the two friends
hextun Posted Saturday at 01:40 AM Author Posted Saturday at 01:40 AM 1 hour ago, Fraying9981 said: thanks, yeah i applied a key trigger. but i'm still struggling to use the UI lol. the item gets properly conjured on the leashed target, and the vanilla Leash Framework interface still works to leash them. With your UI I still haven't been able to connect the two friends I set up a key bind trigger to run two scripts: - one to msg_notify that I pressed '=' (because that was the key that was bound and I wanted it displayed for your benefit so you could see that I was pressing a key to trigger everything) - LeashManager In the clip, you'll see: - first use was pointing at no one and was therefore targeting the player (Lina) which I set to the holder - second use was pointing at a guard and was set to the wearer followed in the same use by Execute->Apply - it was applied and I led them around a bit - third use was pointing at no one but it didn't matter because the globals were still set and I disconnected which also removed the leash I had to zip the file but it contains an mp4 video. I don't have a mega account to upload to. SLTriggers-LeashManager-Demo.zip
Fraying9981 Posted Saturday at 02:20 AM Posted Saturday at 02:20 AM 26 minutes ago, hextun said: I set up a key bind trigger to run two scripts: - one to msg_notify that I pressed '=' (because that was the key that was bound and I wanted it displayed for your benefit so you could see that I was pressing a key to trigger everything) - LeashManager In the clip, you'll see: - first use was pointing at no one and was therefore targeting the player (Lina) which I set to the holder - second use was pointing at a guard and was set to the wearer followed in the same use by Execute->Apply - it was applied and I led them around a bit - third use was pointing at no one but it didn't matter because the globals were still set and I disconnected which also removed the leash I had to zip the file but it contains an mp4 video. I don't have a mega account to upload to. SLTriggers-LeashManager-Demo.zip 9.33 MB · 0 downloads thanks! I managed to find the fix: since im using invicta leash, this is the correct line "leash_applyleash $global.leash_holder $global.leash_wearer "NPC Spine2 [Spn2]" "Leash" 200 500 true" -> Leash, not Leash1 it works. i added some nice narration, so NPCs react, it's amazing 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now