Skip to content

Fix/reliability-porting - #25

Open
absol89 wants to merge 6 commits into
devfrom
fix/reliability-porting
Open

absol89 wants to merge 6 commits into
devfrom
fix/reliability-porting

Conversation

@absol89

@absol89 absol89 commented Nov 2, 2026

Copy link
Copy Markdown
Owner

source and credit from urSovngarde @Dosylia in case this is relevant to the upstream main project. Check with ghidra for steam 1.6.1170 and 1.7.104. Awaiting playtesting in 1.8.7-8 unless there are objections

  • 4e02cc2 Exterior lock synchronization: When someone unlocks or locks an outdoor door or container, nearby players should see the same lock state—even when they’re standing across one of Skyrim’s invisible outdoor area boundaries. This helps prevent “it’s unlocked for me but locked for you.”
  • 6e47ad6 Oversized message handling: Players with large inventories or long mod lists can produce more network data than the normal message buffer holds. This change gives larger messages more room and prevents incomplete messages from being sent. It helps avoid connection or synchronization problems caused by cut-off data; messages exceeding the larger limit are still rejected.
  • 3c6d94e Papyrus native lookup hardening: Some game scripting functions may not be ready the first time the multiplayer mod asks for them. Previously, that initial failure could remain cached and lead to a crash when used. This change safely skips unavailable calls and tries finding the function again later.
  • c122f79 Deferred inventory application: Skyrim sometimes knows an NPC exists before its body and equipment are fully loaded. This change waits until the NPC is ready before applying its synchronized inventory, preserving incoming changes while waiting. It should reduce missing or incorrect equipment and instability when entering areas or encountering newly loaded NPCs.
    These are reliability improvements. Their actual gameplay effects still need testing with multiple players.

Port the server relay change from Dosylia/urSovngarde 87ea449f. Nearby exterior players in the same worldspace receive lock updates while interior delivery stays cell-scoped.

Validation: SkyrimTogetherServer release build passed using a temporary correction of the existing TiltedCore tag to v0.2.9. Two-client cell-boundary testing remains required.
Adapt urSovngarde 347ce181 and local 35717e8. Track failed buffer growth explicitly, retry outside the scratch allocator up to the transport's 512 KiB limit, and preserve packet flags.

Validation: client release build and TPTests passed (76 assertions, 8 cases), including exact-size limits, failed writes followed by successful writes, and a 2000-plugin authentication round trip.
Port urSovngarde 9342bca4 lookup hardening. Synchronize our registry, cache only successful lookups, and skip missing calls with one diagnostic. Missing values are false, null or zero; void calls are not replayed.

Ghidra MCP: SE 1.6.1170 registration ID 104788 at 0x141445FE0 locks the VM registration table. Our queued registry access is source-verified. Native ABI, positive function-pointer lifetime and 1.7.104 equivalence remain assumed; hooks are unchanged. Client release build passed; delayed-registration gameplay testing remains required.
Adapt the inventory portion of urSovngarde 7712c3e6. Store pending snapshots on entities with ownership epochs, preserve subsequent inventory and equipment updates in order, and clear deferred state on removal or disconnect. Require process and 3D readiness for spawn and ownership grants.

Ghidra MCP, SE 1.6.1170: equip ID 38894 at 0x1406C9820 reaches 0x1406CBE30, reading Actor+0xF8; spell equip ID 38896 reaches 0x1406CBAD0 with the same process access. CommonLib places middleHigh at AIProcess+0x8, now asserted. This is a conservative readiness gate; the exact fork crash, all engine threading guarantees and 1.7.104 equivalence remain unproven. Client release build passed; two-client loading, loot, transfer and disconnect tests remain required.
I found the relevant fix in 34fe6f91, plus a correction in 83be966c. The problem is timing: applying zero health before an NPC’s body loads can mark it dead before it gets a chance to fall over. The fix keeps a newly arriving copy briefly alive until its body is ready, then applies the death. The correction prevents doing that to an NPC that is already dead locally.

I’m checked the Skyrim 1.6.1170 death routine before adapting those changes to our existing loading flow.

  Used Ghidra integration, ran commands

In the 1.6.1170 binary, the death routine at 0x1406972D0 (Address Library ID 37896) has an early-return state check and separate handling when the actor’s process or loaded body is missing. That supports deferring the death until loading completes, though the visible result still needs an in-game test.

I ported the health and loading guards, including the “already dead locally” correction. The fork’s VR-specific corpse repair code isn’t needed for this port.

The port is in place across new spawns, recreated actors, and reconciliation. Already-dead NPCs retain their original health values.

The client build has compiled the changed service without errors and is continuing through the remaining files. This port uses the existing WaitingFor3D step and adds no hooks or offsets.

The key in-game check is to kill an NPC, have a second player enter the cell, then leave and re-enter. The corpse should lie down correctly on each client, while bodies already dead locally should stay untouched.

The client release build passed. I’ll restore the temporary build-file change, commit this as the fifth reliability fix, and push it to the same fork branch.
Retain canonical death state across unloaded actors and defer NPC death until its high process and body are ready. Suppress stale living animation writes on corpses while retaining position synchronization, and update pending spawns from death notifications.

Verified KillImpl readiness branches in Skyrim 1.6.1170 via read-only Ghidra. Client releasedbg build passes; multiplayer regression checks and 1.7.104 binary equivalence remain unverified. See RemoteDeathSystem.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant