# Plugin Setup The Fallout 4 Together native plugin is based on `Fallout4Together`. ## Selected Template ```text Template: Fallout4Together Template URL: https://github.com/libxse/Fallout4Together Use: Copied into plugin/ as the starting plugin scaffold Forked: No ``` ## Build Target ```text Project Name: Fallout4Together Output DLL: Fallout4Together.dll Expected Install Path: Data/F4SE/Plugins/Fallout4Together.dll ``` ## Current Goal The current goal is to build the F4SE plugin, confirm it loads through F4SE, and verify the local networking prototype against `server/server.py`. This means the plugin should be able to: * Build successfully * Output `Fallout4Together.dll` * Be copied into `Data/F4SE/Plugins/` * Load when Fallout 4 is launched through F4SE * Create or write to a `Fallout4Together.log` file * Prefix multiplayer/networking log lines with `[LocalPlayerId=unassigned]` before the server welcome packet and `[LocalPlayerId=N]` after assignment * Connect to the local server on `127.0.0.1:7777` * Send local transform packets * Receive `welcome`, `transform`, and `disconnect` packets * Store remote player state internally * Move the single placed test proxy actor from remote player state on the game thread without dynamically spawning actors * Smooth normal proxy movement and snap cell changes, worldspace changes, and teleports safely ## Not Included Yet The plugin does not currently include: * Dynamic actor spawning * Multiple proxy actors * Remote player spawning * Combat sync * Quest sync ## Required Tools The plugin setup is expected to require: * Fallout 4 on Steam * Fallout 4 Script Extender, F4SE * Visual Studio 2022 * MSVC C++ compiler * Windows SDK * XMake * Git ## Recommended Folder Layout ```text plugin/ ├─ xmake.lua ├─ src/ ├─ include/ ├─ external/ ├─ build/ ├─ README.md └─ SETUP.md ``` ## Build Steps From the repository root: ```bash cd plugin xmake xmake build ``` If the build succeeds, look for the compiled DLL in the output folder created by XMake. ## Install Location For manual testing, the compiled plugin DLL should eventually be copied to: ```text Fallout 4/Data/F4SE/Plugins/Fallout4Together.dll ``` If the `F4SE/Plugins/` folder does not exist inside `Data/`, create it manually. ## Testing Checklist Use this checklist for the first plugin test: * [ ] Fallout 4 launches normally without the plugin * [ ] Fallout 4 launches through F4SE without the plugin * [ ] `Fallout4Together.dll` builds successfully * [ ] `Fallout4Together.dll` is copied to `Data/F4SE/Plugins/` * [ ] Fallout 4 launches through F4SE with the plugin installed * [ ] Game reaches the main menu without crashing * [ ] Plugin log file is created * [ ] Plugin log confirms that the plugin loaded * [ ] Local server is running before gameplay networking tests * [ ] Plugin log shows `[LocalPlayerId=unassigned]` before assignment * [ ] Plugin log shows `[LocalPlayerId=N] Assigned server playerId: N` * [ ] Plugin logs prefixed remote player updates from another connected client * [ ] Plugin logs prefixed remote player removal after a disconnect * [ ] `Fallout4Together_Test.esp` is enabled * [ ] `coc F4TTestCell01` places the local player in the test cell * [ ] `F4TProxyRemotePlayer01REF` resolves in the test cell * [ ] With two Fallout 4 instances in `F4TTestCell01`, each instance moves its local proxy to the other player's networked position ## Notes Remote actor spawning is intentionally not part of the current prototype. The receive loop stores plain remote-player state, and the game-thread proxy actor controller consumes a copied snapshot to move the one placed test proxy actor.