# Server This folder is for the external multiplayer test server. The current server is a tiny local-only TCP test server. It listens on `127.0.0.1:7777`, accepts one or more clients, reads newline-separated JSON packets, prints received player transform packets, and broadcasts transform packets to every other connected client. ## Run ```bash cd server python server.py ``` Then launch Fallout 4 through F4SE and move the player. The plugin should keep logging player position changes to `Fallout4Together.log`, and this server should print matching `transform` packets. If the server is not running, the plugin should log a warning and Fallout 4 should continue launching normally. ## Broadcast Test Terminal 1: ```bash cd server python server.py ``` Terminal 2: ```bash cd server python fake_client.py ``` Then launch Fallout 4 through F4SE and move the player. Expected result: - The server assigns a `playerId` to each connected client and sends each client a `welcome` packet. - The fake client prints its `welcome` packet. - The server prints transform packets received from Fallout 4. - The server adds `playerId` and `serverTime` to each transform packet. - The server broadcasts those transform packets to connected clients except the sender. - `fake_client.py` receives and prints the broadcast transform packets. The fake client exists so broadcast behavior can be tested before coordinating a second Fallout 4/F4SE instance. It is only a receiver for now and does not send movement. ## Current Server Goals - Start local server - Accept client connections - Receive transform packets - Assign server-owned player IDs - Add server timestamps - Broadcast transforms to other connected clients - Handle disconnects ## Not Planned Yet - Remote actor spawning - Gameplay synchronization - Authentication - Public matchmaking - Anti-cheat - Persistence - Quest state - Settlement state - Large-scale world simulation