Files
Commonwealth-Online-Public/protocol/message-types.md
T
andrew 62635f4226 Add plugin receive loop & remote player state
Add a networking receive loop and in-plugin remote-player storage. Introduces F4TRemotePlayerState (header + implementation) to track assigned playerId and remote player snapshots with thread-safe access. Expands F4TNetworking to start/stop a background receive thread, parse newline-separated JSON packets (welcome, transform, disconnect), validate fields, update remote state, throttle logs, and handle socket/thread synchronization. Add nlohmann_json to xmake and plugin build. Update docs and dev log to reflect the new receive behavior and current prototype scope.
2026-05-31 20:10:41 +12:00

1.5 KiB

Message Types

This file tracks current and planned message type names for the Fallout 4 Together local networking prototype.

Implemented

These message types are currently implemented:

welcome
transform
disconnect

Current behavior:

  • welcome is sent by the server after assigning a playerId.
  • transform is sent by the Fallout 4 plugin, processed by the server, and broadcast to other connected clients.
  • disconnect is sent by the server when a client disconnects.

The Fallout 4 plugin sends transform packets and receives welcome, transform, and disconnect packets. Received transforms are stored as plain remote-player state only.

Current Receivers

The Fallout 4 plugin and server/fake_client.py currently receive:

welcome
transform
disconnect

The plugin and fake client store broadcast transform packets in in-memory remote player state tables and remove entries when disconnect packets arrive.

Planned Later

These message types are planned but not implemented yet:

ping
pong
chat_message
animation_state
weapon_fire
health_update
cell_change
actor_spawn
actor_remove

cell_change is currently represented through the movementType field inside transform packets. It is not its own packet type yet.

Remote actor spawning, combat, inventory, quest, settlement, and broader gameplay sync are planned later and are outside the current local prototype.

Naming Rules

Message types should be:

  • Lowercase
  • Snake case
  • Short but clear
  • Stable once used in test builds