Ground-up reimplementation of yox92/SmartAction targeting SPT 4.0.13 / EFT 0.16.9.0.40087. Only the walk-while-healing feature is implemented; see NOTES.md for status and the deferred sprint work. Design departures from upstream: - CanWalk is a guarded postfix, not a transpiler. Upstream rewrote the method body, which affects every MovementContext in the raid including bots, and is hard-incompatible with the three other mods already patching MovementContext in a typical load order (SAIN, ORBIT, maschine-DualSideDoorBreach). A postfix that only flips false -> true for IsYourPlayer is inert for other entities by construction. - The postfix re-tests ObstacleCollisionFacade_1.CanMove() before lifting. Upstream's transpiler dropped that check along with the HealingLegs check, silently disabling obstacle blocking. - Targets resolve by name via AccessTools.PropertyGetter + nameof rather than by GClass number, so they survive EFT version bumps. Verified in-game against 78 loaded plugins: both patches attach, the guard rejected 985 non-local MovementContext calls with zero leaks, and _player was never null across ~4000 guard calls. CanSprintPatch is parked in deferred/ rather than deleted: MovementContext.CanSprint does not gate sprinting (EnableSprint calls Physical.Sprint unconditionally), and forcing it true makes EnableSprint run ForceStopInteractions()/RemoveLeftHandItem() mid-heal. Details and the 3.11 -> 4.0.13 rename table are in NOTES.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2.1 KiB
SmartAction — SPT 4.0.x
Lets you walk while healing a leg in SPT.
Targets SPT 4.0.13 / EFT 0.16.9.0.40087, BepInEx 5, netstandard2.1.
Attribution
This is a reimplementation of yox92/SmartAction, which targets an earlier SPT version. The feature idea, the original research into which EFT internals to touch, and the name are yox92's work.
Upstream ships no LICENSE file. If you intend to redistribute this or build on it, ask yox92 for an explicit license first — absence of a license means all rights reserved, and that applies to derivatives too.
This is not a drop-in port. The patches were rewritten rather than translated; see NOTES.md for what changed and why.
Status
| Feature | Status |
|---|---|
| Walk while healing legs | Working |
| Sprint while using meds | Not implemented — see NOTES.md |
| Adaptive heal speed | Not implemented |
| Quick-cancel surgery | Not implemented |
Only the first feature exists today. The rest of upstream's feature set is unported.
Install
Drop SmartAction.dll into BepInEx/plugins/SmartAction/.
Build
Requires the .NET SDK. Reference assemblies are read from a local SPT install:
dotnet build -c Release -p:SptDir=/path/to/SPT
Add -p:DeployToGame=true to copy the result straight into BepInEx/plugins/SmartAction/.
No BSG or SPT assemblies are redistributed here — the build reads them from your own install.
Multiplayer / Fika
The patch is guarded on IsYourPlayer and only ever grants movement, never removes it, so
it is inert for bots and remote players by construction. Verified in a live raid: 985 guard
rejections of non-local MovementContext instances with zero leaks, alongside SAIN, ORBIT
and maschine-DualSideDoorBreach, all of which also patch MovementContext.
No Fika dependency, no custom packets. It does not touch authoritative health state.
Config
BepInEx/config/com.yox92.smartaction.cfg
| Setting | Default | Purpose |
|---|---|---|
Diagnostics |
true |
Logs patch/guard activity and a counter summary every 30s. Turn off once you trust it. |