Files
Commonwealth-Online-Public/docs/setup.md
T
andrew 3d14918ee8 Add staging step and reorganize assets
Add stage-mod.bat and update build scripts to stage the mod package instead of automatically deploying (build-all.bat now calls stage-mod.bat; build.bat prints plugin output path and packaging hint). Reorganize Creation Kit assets into DataFolder and RawAssets directories, add new mesh/texture files, and update CommonwealthOnline_Vault109.esp. Also include ancillary updates to deploy scripts, docs, and server code to reflect the new packaging workflow.
2026-06-17 23:03:30 +12:00

126 lines
3.6 KiB
Markdown

# Development Setup
## Required Tools
- Fallout 4 on PC
- Fallout 4 Script Extender, F4SE
- Fallout 4 Creation Kit
- Visual Studio 2022 or newer
- Git
- CMake or another build system required by the selected plugin template
- Mod Organizer 2 or Vortex
## Recommended Fallout 4 Setup
Use a clean test profile.
Recommended:
```text
Fallout 4
F4SE
Commonwealth Online test plugin
No other gameplay mods
Dedicated test save
```
Avoid testing with a full modlist while developing the core systems.
## Main menu
Do **not** deploy a patched `Interface/MainMenu.swf`. Commonwealth Online injects the **Multiplayer** row at runtime via the F4SE plugin. Use vanilla `MainMenu.swf` or no loose override. See [`MainMenu_Button_Injection_Guide.md`](MainMenu_Button_Injection_Guide.md) (full how-to) and [`MainMenu_Injection.md`](MainMenu_Injection.md) (project-specific notes).
## Version Tracking
Record the exact versions used:
```text
Fallout 4 version:
F4SE version:
Creation Kit version:
CommonLibF4 template:
Windows version:
Compiler version:
```
## Git Submodules
After cloning, initialize vendored dependencies:
```bat
git submodule update --init --recursive
```
This includes:
* `ThirdParty/framework-F4-Conversion` — PrismaUI_F4 HTML overlay framework
* `ThirdParty/Ultralight-SDK` — Ultralight SDK (`Windows` branch) for PrismaUI_F4 builds
* `ThirdParty/GameNetworkingSockets-src` — networking library
* `ThirdParty/xbyak` — assembler dependency
`build-prismaui.bat` links the Ultralight SDK submodule into the PrismaUI build tree automatically. Override the SDK location with `ULTRALIGHT_SDK_PATH` if needed.
## Build and Install
From the repository root:
```bat
build-all.bat
```
This builds the plugin, PrismaUI_F4, and stages a complete mod package into `build/Fallout 4/Data` at the repo root. The layout mirrors the real game path under your Fallout 4 install.
```text
build/
└─ Fallout 4/
└─ Data/
├─ CommonwealthOnline.esp
├─ CommonwealthOnline_Vault109.esp
├─ F4SE/
│ └─ Plugins/
│ ├─ CommonwealthOnline.dll
│ └─ PrismaUI_F4.dll
├─ Materials/ (from creation-kit/assets)
├─ Meshes/ (from creation-kit/assets)
├─ Textures/ (from creation-kit/assets)
└─ PrismaUI_F4/
├─ libs/ (Ultralight runtime DLLs)
├─ resources/ (Ultralight assets)
├─ misc/
│ └─ cursor.png
└─ views/
└─ CommonwealthOnline/
└─ browser/
└─ index.html
```
Merge `build\Fallout 4` into your game install directory, or copy the contents of `build\Fallout 4\Data` into `Data\`. Mod managers can point at `build\Fallout 4` as the mod root.
To install directly into a Fallout 4 install:
```bat
deploy-all.bat
deploy-all.bat "D:\SteamLibrary\steamapps\common\Fallout 4"
```
`deploy-all.bat` re-stages `build/Fallout 4/Data` then copies it into the game's `Data` folder. On first use it prompts for the install path and saves it in `.fallout4-path` (gitignored).
Individual steps:
```bat
build.bat REM CommonwealthOnline.dll only
build-prismaui.bat REM PrismaUI_F4.dll only
stage-mod.bat REM assemble build/ from existing DLL outputs
deploy-ui.bat REM HTML views only (requires PrismaUI_F4 installed separately)
```
See also `plugin/setup.md` for plugin-specific build notes.
## Folder Notes
Do not copy Fallout 4 game files into this repository.
Do not copy F4SE binaries into this repository.
Use the `plugin/external/README.md` file to document where external dependencies should be installed.