Add Papyrus sync scripts and proxy spawn refactor

Add new Papyrus scripts (CoSync.psc, CoSyncPlayer.psc, CoSyncQuest.psc) providing native bindings and quest/player proxy logic for networking: connection/session APIs, entity management, world/weather/workshop/companion sync, consumable/pipboy/door/power-armor events, and proxy animation/initialization handlers. Refactor the proxy actor controller (F4TProxyActorController.cpp) to support dynamic/runtime proxy spawning and improved lifecycle/visibility handling: change proxy base/form IDs to COPlayerProxy/CommonwealthOnline, add process-list actor lookup, spawn helpers, play-space/cell checks, 3D visibility refresh, ActorHandle usage, and spawn mutexes and globals for safer spawning. Update docs and setup (architecture.md, limitations.md, plugin/setup.md) to describe global dynamic spawn behavior, max runtime proxies (kMaxRuntimeProxyActors = 4), and validation checklist; update launch-two-fallout4.bat to show instance log locations. Misc: small tweaks to logging and debug flags to gate diagnostics.
This commit is contained in:
2026-06-07 20:31:51 +12:00
parent 21c8bf9593
commit cc4d8aac5a
10 changed files with 1645 additions and 190 deletions
+11 -6
View File
@@ -111,13 +111,18 @@ both send and receive paths:
candidate isolation and settle, then promotes the settled actor into the
existing single-proxy movement pipeline.
The Fallout 4 plugin now dynamically spawns one runtime proxy actor per
represented remote `playerId` in the test cell, up to a small Stage 4 test cap.
The Fallout 4 plugin dynamically spawns one runtime proxy actor per represented
remote `playerId` in the local player's current loaded cell, up to a small cap
(`kMaxRuntimeProxyActors = 4`). The proxy controller runs in any cell when global
mode is enabled; dynamic spawn is the default path. Pre-placed Creation Kit
proxy refs and the single placed fallback remain available behind compile-time
flags for regression testing in `F4TTestCell01`.
When the local player changes cells, stale proxy actors in the prior cell are
released and fresh proxies are spawned for co-located remotes in the new cell.
Disconnected held slots can be reassigned to later server `playerId` values after
the grace period, but slots held for connected players outside the cell are not
reused.
The placed proxy reference remains as a single fallback path if runtime spawning
fails for one selected remote player.
Proxy animation sync applies curated graph variables from remote movement state:
@@ -143,8 +148,8 @@ The native plugin is responsible for:
- Receiving server packets on a background thread
- Storing assigned and remote `playerId` state internally
- Moving runtime proxy actors from per-`playerId` remote-player state on the
game thread, preferring runtime slots and falling back to the placed reference
for one selected player only if runtime spawning fails
game thread via dynamic spawn in the local player's current cell (pre-placed
CK pool and placed fallback available behind compile-time regression flags)
- Holding only the affected proxy actor at a hidden in-cell position when its
remote player disconnects or leaves the same cell
- Assigning each runtime proxy slot a unique hidden holding position and
+4 -1
View File
@@ -6,7 +6,8 @@ Fallout 4 was designed as a single-player game. Commonwealth Online is therefore
The first prototype will likely require:
- All players to remain in the same test cell
- Remote players to be in the same cell/worldspace as the local player to be visible (proxies are not shown across unloaded cells)
- `Fallout4Together_Test.esp` loaded for the `F4T_RemotePlayerProxy` actor base
- A clean Fallout 4 test profile
- A dedicated test save
- No large gameplay mods
@@ -15,6 +16,8 @@ The first prototype will likely require:
- No VATS synchronization
- No dialogue synchronization
Up to four concurrent remote proxies are supported per client (`kMaxRuntimeProxyActors`).
## Systems Not Supported Early
### Quests