Jump to content

1 Screenshot

About This File

Framework that allows you to attach REAL leashes to NPC's and either have them guide you around, or you guide them. No real limitation, you can make a huge train if you wanted. 

 

Important note: FSMP's "Limit rotations" option in it's SKSE Mod Menu/MCM is NOT compatible with Leash Framework and WILL cause visual bugs

 

 

Important Note

This is a FRAMEWORK. Other mods can use its Papyrus API, and you can create and manage leashes yourself through the debug menu.

The framework provides its own pathfinding and direct locomotion for pulling and following, without adding or replacing AI packages. NPCs do not need a dedicated follow package. Pulling temporarily takes control of movement, but animation states, movement restrictions, and other mods controlling the actor can prevent it from starting.

The default setup uses a standalone rope, so neither actor needs leash equipment. Equipped leashes are also supported: the rope can be worn by either the leashed actor or the holder, depending on your configuration.

 

Features

  • Papyrus API for connecting actors to other actors or fixed world positions. Each actor can have one active leash, and a holder can hold multiple leashes.
  • Standalone rope NIFs, leashes equipped on the leashed actor, and holder-equipped leashes.
  • Attachments to either hand, named actor bones with adjustable offsets, or a fixed world position.
  • Custom rope physics with gravity, tension, friction, Havok world-collision queries, and configurable actor-body collision.
  • Navmesh pathfinding and smooth following. NPCs can start following before reaching the maximum distance, then settle when the holder stops.
  • Player pulling with configurable input assistance and resistance, plus procedural leaning as the rope becomes taut.
  • Configurable holder movement limits to help prevent overstretching, ragdoll recovery, and teleport recovery for separated actors.
  • Debug tools for creating leashes, saving presets, adjusting active leashes, equipping armor, inspecting bones, and viewing diagnostics.
  • Optional save persistence, ownership factions, and mod events for leash changes and pull transitions.
  • Includes multiple leash assets by @kzrp.

 

Quick Start - No Papyrus Required

  1. Open SKSE Menu Framework using your configured hotkey, then select Leash Framework > Debug > Test leash.
  2. Fresh settings use the Standalone Neck-leash longish configuration. You can also select it under Saved presets and click Load.
  3. Choose the Leashed actor and Leasher. The leashed actor is the one being pulled; the leasher is the holder. Use Refresh nearby actors if needed.
  4. Keep Physical leash owner set to Standalone NIF and choose the holder's right or left hand under Attach to. No equipment is needed.
  5. Start with Minimum length: 200 and Maximum length: 300. Enable Keep leash in saves if you want this connection restored when loading your save.
  6. Click Apply test leash. Use the Active leashes tab to adjust distances or disconnect it.

 

Using Equipped or Custom Leashes

  • For an equipped leash, set Physical leash owner to Leashed actor or Leasher, and equip the rope on that actor. The Equipment tab provides equipment tools; applying an equipped leash does not automatically equip its armor.
  • For a holder-equipped leash, choose the attachment bone on the leashed actor. The optional closed-hand setting controls the holder's grip.
  • Parent bone is an exact node name containing the rope bones. Leash bone match is text contained in their names, not necessarily a prefix. At least two matching bones are required. Use the Skeleton tab to inspect equipped rope bones.
  • A custom standalone NIF must contain its own rope skeleton and skinned geometry, with no NIF collision objects. Its path is relative to Data/Meshes.
  • Third-party ropes and chains, including suitable Devious Devices meshes, may work when their bones and skinning are compatible. Compatibility depends on the individual mesh; it is not automatic for every collar or chain.

 

Distances and Recovery

Minimum and maximum lengths control movement behavior; they do not change the rope mesh's physical length. NPCs following an actor holder can move before the maximum is reached. Player pulling and world-position pulling begin beyond the maximum and release at the minimum.

 

Under Settings > Behavior > Ragdoll recovery, you can configure physics-based recovery when an actor strays too far. Ragdoll NPCs is enabled by default; Ragdoll player is disabled. The default trigger is attachment separation greater than twice the maximum length. Recovery respects actor eligibility restrictions.

Teleport recovery helps eligible leashed actors follow a player through positioning transitions and lets NPC holders recover actors separated by excessive distance or different cells. Fixed world-position leashes do not use holder teleport recovery.

 

For Mod Authors

See LeashFramework.psc for the documented API, factions, and event contracts. Available events include LeashFramework_OnLeash, LeashFramework_OnUnleash, LeashFramework_OnActorPulled, LeashFramework_OnActorStopPull, and LeashFramework_OnActorRagdollPulled.

 

Known Issues and Limitations

  • Actors can still get stuck on obstacles or fail to find a usable navmesh path.
  • Furniture interactions, scripted animations, restricted movement, or another system controlling locomotion can prevent normal pulling.
  • Rope appearance depends on its bone count, skinning, physical length, and attachment settings. Too few bones or excessive separation can produce sharp bends and stretching.
  • Actor collision uses adjustable simplified body shapes, so some clipping is possible.
  • The default attachment, leaning, and body-collision setup targets humanoid skeletons. Animal and custom-creature compatibility is not guaranteed.

 

 

Requirements

  • Skyrim SE/AE (Doubt VR support works, this required a lot of reverse engineering)
  • SKSE64 and Address Library for SKSE Plugins matching your game runtime.
  • SKSE Mod Menu Framework (Optional for the mod menu)

 

Papyrus API

https://github.com/asdasdduck/Skyrim-Leash-Framework/blob/master/papyrus/source/LeashFramework.psc

 

 

Source code:

https://github.com/asdasdduck/Skyrim-Leash-Framework


What's New in Version 1.1.6

Released

1.1.6:

  • Added 3 new leashes for the standalone leash type, world_chain, world_chain_long, world_chain_xlong
  • Added "LeashFramework_OnActorStopPull" mod event for when an actor's movement is no longer being controlled by the leash

 

1.1.5:

  • Added a new "Standalone" leash type. It's basically a world object that isn't owned by either NPC. Takes up zero equipment slots, works on all creatures (Aside from dragons for whatever reason). 
  • Added ability to save "presets" for leash configs (Default has one for the new standalone leash type)
  • Some fixes/improvements to the mod menu

 

1.1.5 will unleash all your older 1.1.4 leashes upon loading.

 

1.1.4:

  • Added an option to help prevent overstretch by stopping the leasher from pulling further if the leash exceeds a specified threshold in your config. This can be overriden through papyrus using `SetPreventOverstretchOverride`
  • Added locale (translation) support for the mod menu. Right now it ships with AI translated Russian and Chinese locales.

 

1.1.3:

  • Improved chain leashes so they stretch significantly better
  • Added a long and extra-long variant of the hand leash

 

1.1.2 will unleash all your older 1.11 leashes upon loading.

 

Significant update, I consider it a beta as it wasn't tested too much

 

1.1.2:

  • Improved ragdoll: More seamless and immersive. NPC's can't get up unless you give them slack. You can also pull around dead bodies now
  • Improved collision: More advanced collision was added to cut down on visible artifacts like the leashes constantly moving. Increased the perceived collision accuracy too, and added friction solving which tends to look better while the leash is dragging on the ground. 
  • Improved body collision: Similar to the object collision. More stable with dynamic objects, less likely to clip as easily through bodies.
  • Expanded Papyrus API:  SetRagdollOverride, and SetTeleportOverride - they'll allow you to override the user's config behavior. So you can force-on/off ragdoll or teleports
  • AE 1.799+ and VR support: Added UNTESTED support for both of these. I did NOT bother to verify the memory layout or vtable for a handful of thing since it's tedious. Produce a Crashlogger SSE (Latest version) crash log if you have crashes, along with what led up to your crash
  • Pull/locomotion improved: The follow logic has been changed quite a bit. I also made it so the NPC (by default) targets 40% between your min-max ranges while following to try and avoid stop-go-stop-go behavior. Also made it quite a bit more responsive to avoid leash stretching. You may have to find new min/max values that suite this version better!
  • Mod Menu UI revamp: Re-did the mod menu UI since it was getting waay too cluttered and convoluted with every update
  • An option to suppress NPC greetings/etc: Leashed actors will not dispatch their greetings anymore. This is the skyrim system where an NPC interrupts whatever they were doing (Like walking), turns around, and says something to you like.. "You get to the cloud district often?". NPC's will still have their random dialogue, just not greetings
  • More responsive procedural leaning/pose to help avoid gaps in metal chains. Also uses the chain's physical length to calculate rather than using the min distance. Default config is a bit harsh/fast, I'd mess with the response rate if you're fine with minor stretching at times
  • Fixed some minor jitter issues with the rope solving at low FPS (Thanks DLSS 5 for exposing this to me!)
  • Keep leashes sorted, so actors in a leash-train configuration properly solve without leaving floating leashes/etc 
  • Replaced the metal leash with the very long variant someone in this thread made (lordbuttcheese's edit I believe) 
  • Changed some config defaults (I recommend pressing the RESET button in the mod menu UI)

 

1.1.1 will unleash all your older 1.0.9 leashes upon loading.

 

1.1.1:

  • Added API/functionality to allow the leasher to have the leash equipped instead of the leashed actor
  • Some stability improvements to leash physics/actor-collision
  • Added lordbuttcheese's modified hand-leash (The leasher equips this instead to their shield slot)
  • Corrected Skyrim's premature culling of the rope

 

1.0.9

  • Pretty significant internal code refactor/cleanup - use with caution (Backing up saves recommended just in case)
  • Added procedural body animations, so the body will react to the physical pull force of the leash
  • Added an option to allow camera movement while player's follow/AiMode is enabled (Patches for all of skyrim, not just this mod)
  • New API events LeashFramework_OnLeash, LeashFramework_OnUnleash
  • Leash anchors expanded, you can now anchor to either right/left hand, a specific world position, or specific bones in the leasher's body
  • krzp: Added new magic leash - formid 32ce

 

Due to the .esp to .esm - you'll need to unleash your actors before upgrading to 1.0.8 to avoid save issues. Make sure you also rename the Leash.esp to Leash.esm in the add-leash part of the debug menu otherwise obviously it wont add the leash since Leash.esp doesn't exist anymore.

 

1.0.8

  • Added escort teleporting (for both player/npc) between cells and if you get too far away (Lightly tested, GL!)
  • Fixed some data getting baked into the save file
  • Prevent SexLab actors from being yanked out of animations
  • Converted to a light master (.esm) instead of an .esp

 

1.0.7

  • Fixed dangling pointer (Likely lead to many random bugs, including potential crashes. WOOPS)

 

1.0.6

  • Expanded the Papyrus API
  • Leashed/Leashers will now be entered into a faction
  • Cleaned up the holder's fist a bit more
  • Player input is while leashed and in follow mode will allow you to catch up, or resist

 

1.0.5

  • Improved leash-on-actor collision a bunch, exposed configuration for it in the Mod Menu. It's enabled by default now too
  • krzp: Unleashed items now have a simple SMP config, so they don't load as sticks if SMP is present (doesn't have any colliders, I didn't bother editing all the meshes now, may do so later)
  • krzp: New leash model, Neck chain (id 806)

 

1.0.4

  • Allow more actor states to be ragdolled (It's safer than I thought)
  • Fixed some bugs with the pathfinding

 

1.0.3:

  • Fixed following not working on Skyrim AE for certain people (Don't expect it to work on NPC's who are in an unwalkable state)
  • Other minor tweaks

 

1.0.2:

  • Improved pathfinding object avoidance 
  • QoL updates, such as warnings and a debug toggle in the menu 

 

1.0.1:

  • Significantly improved the pathfinding (Actors following). I still need to implement an obstacle avoidance heuristic though since the navmesh in Skyrim isn't perfect (And dynamic objects like doors...)
  • Put some more effort into the collision system to avoid collision boiling (Didn't iterate on actor collision at all yet)
  • Exposed more configuration to the SKSE Mod Menu
  • Fixed a bug with equipping through the mod menu
  • Added a skeleton dump to the menu to help you find the proper nodes
  • Freeze the rope while the game is froz


×
×
  • Create New...