sedoacsltwwloqrddi Posted August 25 Posted August 25 (edited) INTRODUCTION This is a set of scripts and mods which emulate player captivity / enslavement after defeat. What does it do? These scripts: Leash the player if they're the victim of aggressive sex Set the player's factions so that most intelligent enemies won't then immediately murder them Doesn't interfere with anything else Is escapable by simply removing (you have to drop, not just unequip) their collar - with the caveat that doing so will immediately make your captors enemies again unless you're wearing some other heavy restraints. Requirements Leash Framework a defeat mod (I use Defeat (the BaneMaster edition) (Optional) a mod to handle any interactions while captive (I use deviously enslaved and the player whore dialogue options from Notice Me Senpai) Installation Add the two .sltscript files to your SKSE\Plugins\sl_triggers\commands folder In SLTriggers config, add: Helpless.sltscript -> on player equipment change (at 100%) LeashPlayer.sltscript -> on sexlab start with player victim (at whatever % you want depending on how frequently you want to be held captive, with whatever limitations to aggressors fit your taste) How can I escape? Drop (don't unequip) the collar. If something else is preventing you from doing so (for example, an armbinder), get rid of that first. What might go wrong? It messes with enemy factions, so there's the potential that it'll make some of them angry at you in ways that could interfere with normal game functionality (for example, if there's a quest that relies on one of the listed factions being friendly) As a side effect, anytime you're wearing heavy bondage you will be set as friendly to most enemy factions (the ones in the list in helpless.sltscript). How can I customize this? The easy one is factions. They're set in a list. Add any more you want to (for example, if you want regular creatures to become nonhostile, add that faction. If you want giants to still invite you to fly the friendly skies while captive, remove that faction). You can also set your events to trigger on things other than what I've expected. Potentially this could also be set up to affect NPCs, but without a lot of careful thought I expect that will end in an experiment that would make a budding epidemiologist proud. Make sure to add any problematic factions to the denylist in LeashPlayer.sltscript. These factions won't leash your player (because e.g. guards leashing your player while you're in jail could be problematic). Will this crash my game? Possibly. However: These scripts are intended only run on relatively uncommon events: Equip and starting scenes. They're written to handle most of their processing up front, and quickly close out if the circumstances don't suit their logic. They're mostly written to be idempotent. There's a denylist for problematic factions As usual, I recommend not using this on a long-running save you care about until you've tested it for a while with your setup and understand its behavior and limitations. There will be bugs. Taking people captive and abusing them is immoral. Correct. I recommend never doing so in real life for any reason. Where are the scripts? In the below spoiler tag: LeashPlayer.sltscript Spoiler ; INTENDED FOR USE ON SLTR SEXLAB: SEXLAB START + PLAYER VICTIM (partner male + humanoid only optional) ; I use DEFEAT, which is why this doesn't use the Prisoner faction. ; get variables set $actorName resultfrom actor_name $system.player set $partnerName resultfrom actor_name $system.partner set $isWearingLeash resultfrom actor_wornhaskeyword $system.player "lf_leash" set $isLeashed resultfrom leash_isleashed $system.player set $leash_item "Leash_neck_chain" ; --- Check if the Denylist Faction Map needs initialization --- if $global.denylistFactionsInitialized ; Map is already set up, skip initialization block else ; --- Populate the Map (Only runs the first time) --- set $global.denylistFactionMap{GuardFaction} true set $global.denylistFactionMap{PlayerFaction} true ; Set our global tracker flags on first run set $global.denylistFactionsInitialized true set $global.playerIsHelpless false endif string[] $factionList set $factionList resultfrom mapkeys $global.denylistFactionMap ; --- Setup Loop Variables --- set $counter 0 set $totalFactions resultfrom listcount $factionList while $counter < $totalFactions set $currentFaction $factionList[$counter] msg_console $"updating {$currentFaction} for player" set $isDenylisted resultfrom actor_infaction $system.partner $currentFaction if $isDenyListed msg_console $"{$partnerName} not eligible to leash {$actorName}." endif inc $counter 1 endwhile ; if the player's not wearing a leash, put one on. if $isWearingLeash else msg_notify $"{$partnerName} collars you. You're just a pet now..." item_equip $system.player $leash_item true false endif ; if the player's not leashed, leash them. if $isLeashed else actor_doaction $system.partner StopCombat item_equip $system.player $leash_item true false msg_notify $"{$partnerName} takes hold of your leash." leash_applyleash $system.partner $system.player "NPC Spine2 [Spn2]" "Leash1" 150.0 300.0 true endif Helpless.sltscript Spoiler ; INTENDED FOR USE ON SLTR: NPC DEFEAT EVENT (Non-Player Victor) ; Checks if the target is essential, verifies victor is not the player, matches factions, and applies the leash. set $actorName resultfrom actor_name $system.self set $partnerName resultfrom actor_name $system.partner set $isWearingLeash resultfrom actor_wornhaskeyword $system.self "lf_leash" set $isLeashed resultfrom leash_isleashed $system.self set $leash_item "Leash_neck_chain" ; --- Check if the target NPC is Essential --- ; If they are essential, we exit immediately to avoid breaking quests or game logic. set $isEssential resultfrom actorbase_dogetter $system.self IsEssential if $isEssential msg_console $"{$actorName} is essential. Skipping leash script." return endif ; --- Check if victor is the Player --- ; If the player caused the defeat, exit script immediately. set $isPlayerVictor resultfrom actor_isplayer $system.partner if $isPlayerVictor return endif ; --- Check if the Faction Map needs initialization --- if $global.npcFactionsInitialized ; Map is already set up, skip initialization block else ; --- Populate the Map with Verified Real Skyrim Factions (Only runs the first time) --- set $global.npcFactionMap{BanditFaction} true set $global.npcFactionMap{ForswornFaction} true set $global.npcFactionMap{FalmerFaction} true set $global.npcFactionMap{WarlockFaction} true set $global.npcFactionMap{VampireFaction} true set $global.npcFactionMap{CreatureFaction} true set $global.npcFactionMap{GiantFaction} true set $global.npcFactionMap{SprigganFaction} true set $global.npcFactionMap{DragonFaction} true set $global.npcFactionMap{DwarvenAutomatonFaction} true set $global.npcFactionMap{DremoraFaction} true set $global.npcFactionMap{HagravenFaction} true set $global.npcFactionMap{AtronachFlameFaction} true set $global.npcFactionMap{AtronachFrostFaction} true set $global.npcFactionMap{AtronachStormFaction} true set $global.npcFactionMap{DraugrFaction} true set $global.npcFactionMap{SkeletonFaction} true set $global.npcFactionMap{NecromancerFaction} true set $global.npcFactionMap{JobBanditFaction} true set $global.npcFactionMap{GuardFaction} true set $global.npcFactionMap{WhiterunHoldFaction} true set $global.npcFactionMap{EastmarchHoldFaction} true set $global.npcFactionMap{HaafingarHoldFaction} true set $global.npcFactionMap{ReachHoldFaction} true set $global.npcFactionMap{RiftHoldFaction} true set $global.npcFactionMap{HjaalmarchHoldFaction} true set $global.npcFactionMap{PaleHoldFaction} true set $global.npcFactionMap{FalkreathHoldFaction} true set $global.npcFactionMap{WinterholdHoldFaction} true set $global.npcFactionMap{CitizenFaction} true set $global.npcFactionMap{HouseElfFaction} true ; Set our global tracker flag on first run set $global.npcFactionsInitialized true endif string[] $factionList set $factionList resultfrom mapkeys $global.npcFactionMap ; --- Setup Loop Variables --- set $counter 0 set $totalFactions resultfrom listcount $factionList ; Loop through the verified factions and check if the victor belongs to them. ; If the victor belongs to a faction, add the defeated NPC ($system.self) to it. while $counter < $totalFactions set $currentFaction $factionList[$counter] ; Check if the victorious NPC is in this faction set $isVictorInFaction resultfrom actor_infaction $system.partner $currentFaction if $isVictorInFaction msg_console $"{$partnerName} is in {$currentFaction}. Adding defeated {$actorName} to match." ; Add the defeated target NPC to the same faction so the victor doesn't attack them actor_doconsumer $system.self addToFaction $currentFaction endif inc $counter 1 endwhile ; if the target NPC's not wearing a leash, put one on. if $isWearingLeash else msg_notify $"{$partnerName} collars {$actorName}. They're just a pet now..." item_equip $system.self $leash_item true false ; makes sure they are keyworded for ASF form_removekeyword $system.self "SESNeverEnslave" form_addkeyword $system.self "ASF_ActorBase_Included" form_addkeyword $system.self "ASF_PackageValid" form_addkeyword $system.self "ASF_PackageValid_Recipient" endif ; if the target NPC's not leashed, leash them. if $isLeashed else actor_doaction $system.partner StopCombat item_equip $system.self $leash_item true false msg_notify $"{$partnerName} takes hold of {$actorName}'s leash." leash_applyleash $system.partner $system.self "NPC Spine2 [Spn2]" "Leash1" 150.0 300.0 true endif LeashNPC.sltscript Spoiler ; INTENDED FOR USE ON SLTR Sexlab BEGIN event ; with player relationship NOT PLAYER and role VICTIM ; Checks if the target is essential, verifies victor is not the player, matches factions, and applies the leash. set $actorName resultfrom actor_name $system.self set $partnerName resultfrom actor_name $system.partner set $isWearingLeash resultfrom actor_wornhaskeyword $system.self "lf_leash" set $isLeashed resultfrom leash_isleashed $system.self set $leash_item "Leash_neck_chain" ; --- Check if the target NPC is Essential --- ; If they are essential, we exit immediately to avoid breaking quests or game logic. set $isEssential resultfrom actorbase_dogetter $system.self IsEssential if $isEssential msg_console $"{$actorName} is essential. Skipping leash script." return endif ; --- Check if victor is the Player --- ; If the player caused the defeat, exit script immediately. set $isPlayerVictor resultfrom actor_isplayer $system.partner if $isPlayerVictor return endif ; --- Check if the Faction Map needs initialization --- if $global.npcFactionsInitialized ; Map is already set up, skip initialization block else ; --- Populate the Map with Verified Real Skyrim Factions (Only runs the first time) --- set $global.npcFactionMap{BanditFaction} true set $global.npcFactionMap{ForswornFaction} true set $global.npcFactionMap{FalmerFaction} true set $global.npcFactionMap{WarlockFaction} true set $global.npcFactionMap{VampireFaction} true set $global.npcFactionMap{CreatureFaction} true set $global.npcFactionMap{GiantFaction} true set $global.npcFactionMap{SprigganFaction} true set $global.npcFactionMap{DragonFaction} true set $global.npcFactionMap{DwarvenAutomatonFaction} true set $global.npcFactionMap{DremoraFaction} true set $global.npcFactionMap{HagravenFaction} true set $global.npcFactionMap{AtronachFlameFaction} true set $global.npcFactionMap{AtronachFrostFaction} true set $global.npcFactionMap{AtronachStormFaction} true set $global.npcFactionMap{DraugrFaction} true set $global.npcFactionMap{SkeletonFaction} true set $global.npcFactionMap{NecromancerFaction} true set $global.npcFactionMap{JobBanditFaction} true set $global.npcFactionMap{GuardFaction} true set $global.npcFactionMap{WhiterunHoldFaction} true set $global.npcFactionMap{EastmarchHoldFaction} true set $global.npcFactionMap{HaafingarHoldFaction} true set $global.npcFactionMap{ReachHoldFaction} true set $global.npcFactionMap{RiftHoldFaction} true set $global.npcFactionMap{HjaalmarchHoldFaction} true set $global.npcFactionMap{PaleHoldFaction} true set $global.npcFactionMap{FalkreathHoldFaction} true set $global.npcFactionMap{WinterholdHoldFaction} true set $global.npcFactionMap{CitizenFaction} true set $global.npcFactionMap{HouseElfFaction} true ; Set our global tracker flag on first run set $global.npcFactionsInitialized true endif string[] $factionList set $factionList resultfrom mapkeys $global.npcFactionMap ; --- Setup Loop Variables --- set $counter 0 set $totalFactions resultfrom listcount $factionList ; Loop through the verified factions and check if the victor belongs to them. ; If the victor belongs to a faction, add the defeated NPC ($system.self) to it. while $counter < $totalFactions set $currentFaction $factionList[$counter] ; Check if the victorious NPC is in this faction set $isVictorInFaction resultfrom actor_infaction $system.partner $currentFaction if $isVictorInFaction msg_console $"{$partnerName} is in {$currentFaction}. Adding defeated {$actorName} to match." ; Add the defeated target NPC to the same faction so the victor doesn't attack them actor_doconsumer $system.self addToFaction $currentFaction endif inc $counter 1 endwhile ; if the target NPC's not wearing a leash, put one on. if $isWearingLeash else msg_notify $"{$partnerName} collars {$actorName}. They're just a pet now..." item_equip $system.self $leash_item true false ; makes sure they are keyworded for ASF form_removekeyword $system.self "SESNeverEnslave" form_addkeyword $system.self "ASF_ActorBase_Included" form_addkeyword $system.self "ASF_PackageValid" form_addkeyword $system.self "ASF_PackageValid_Recipient" endif ; if the target NPC's not leashed, leash them. if $isLeashed else actor_doaction $system.partner StopCombat item_equip $system.self $leash_item true false msg_notify $"{$partnerName} takes hold of {$actorName}'s leash." leash_applyleash $system.partner $system.self "NPC Spine2 [Spn2]" "Leash1" 150.0 300.0 true endif Troubleshooting The global helplessness variable they set to achieve the optimization in #2) can get out of sync. If that's the case, add Quote set $global.playerIsHelpless false to the top of the 'helpless' script, save the script, unequip all your devices, then remove it from the script and save again and it should start working again. Updating the denylist It may be problematic for some NPCs to leash your player. If you find one, add their faction to the denylist. For example, if I have a mod that adds Mr. Beeblebrox, President of the Universe to my game, but if he leashes my character they end up going on adventures in space instead of Skyrim, I can click him in console, check his factions, and add one to the denylist on a new line below the existing one in LeashPlayer.sltscript, like so: Quote ; --- Populate the Map (Only runs the first time) --- set $global.denylistFactionMap{GuardFaction} true set $global.denylistFactionMap{BeeblebroxFaction} true This doesn't work for me Sorry about that. Please feel free to edit the scripts so that they do. License TLDR: Do what you like, but let others do the same, keep it on the site, and don't blame me if something goes wrong. Details In the below spoiler tag: Spoiler Consider these scripts under a slightly modfiied MIT license, which reads: Quote Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), without limitation the rights to use, copy, or modify copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Permission is not granted to redistribute or rebundle the software on any other site for any reason without explicit permission of its creator. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Edited September 19 by sedoacsltwwloqrddi Updates with NPCLeash and improved Helpless 2
sedoacsltwwloqrddi Posted September 19 Author Posted September 19 Updated the above scripts: 1) HELPLESS now changes the relationship of the player *to* factions instead of adding them to factions. This means guards will no longer attempt to murder you while you are helpless. Sorry about that, took a while to find something that would actually work. Please note: a) NPCs can be less than understanding if you become helpless while you are still attacking them (so you may need to be defeated, i.e. get out of combat, before they will respect the change) b) NPCs can take a while to notice when you're no longer helpless, so you may have a few precious seconds to murder them while they still think you're bound. Not intended, but it... kinda works well and I don't think I have a good way to optimize that out. 2) There is now a LeashNPC.sltscript . This does two things: When triggered (it is intended to trigger at the start of a sexlab scene. Why the start? It takes a while to process), it leashes the victim to the aggressor, meaning an unfortunate stormcloak who gets defeated and gangbanged by imperials (or vice versa), or a merchant who falls afoul of bandits will now ... also be enslaved and bound to their aggressor. Secondly, it adds the victim to the aggressor's faction, and adds SLA keywords to make them a recipient. This does mean that e.g. a merchant enslaved by bandits will now probably be murdered by guards, but it means that if you are running SexLab Automated Sex, enemies imprisoned and leashed by this script will now automatically be taken advantage of by their captors based on your SLA settings. Please note : a) that NPCs leashed / faction-bumped in this way cannot really be freed. (You can kill their captor, but they'll still be KOS to certain factions; there's no cleanup mechanism). b) this intentionally doesn't work on NPCs flagged as essential (so tag your followers, folks) or enemies defeated by the player. The broader intent is, with the following mods: - SLTriggers (of course) - a defeat mod - a random sex mod (ex: SLA) both the player and NPCs who are defeated will be leashed, enslaved, and assaulted based on those settings.
Recommended Posts