Rename project to Commonwealth Online

Replace occurrences of "Fallout 4 Together" with "Commonwealth Online" across docs and testing guidance. Add Interface assets and tooling: MainMenu/Pipboy SWFs, translation/fonts, exported scripts (Interface/exported/scripts/MainMenu.as) and a PATCH_MainMenu_Multiplayer.md describing how to add a Multiplayer menu entry that calls root.f4se.plugins.commonwealthOnline.openManager(). Also add build/run batch scripts and apply assorted updates to README, plugin, server and protocol documentation/source to align with the rename and UI changes.
This commit is contained in:
2026-06-07 16:22:50 +12:00
parent 4adc7d57ef
commit 8dfec0a4b3
47 changed files with 3138 additions and 132 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# Fallout4Together Plugin
# Commonwealth Online Plugin
This is the native Fallout4Together plugin using CommonLibF4.
This is the native Commonwealth Online F4SE plugin using CommonLibF4.
### Requirements
* [XMake](https://xmake.io) [3.0.0+]
+9 -9
View File
@@ -1,6 +1,6 @@
# Plugin Setup
The Fallout 4 Together native plugin is based on `Fallout4Together`.
The Commonwealth Online native plugin is based on `Fallout4Together`.
## Selected Template
@@ -14,9 +14,9 @@ Forked: No
## Build Target
```text
Project Name: Fallout4Together
Output DLL: Fallout4Together.dll
Expected Install Path: Data/F4SE/Plugins/Fallout4Together.dll
Project Name: CommonwealthOnline
Output DLL: CommonwealthOnline.dll
Expected Install Path: Data/F4SE/Plugins/CommonwealthOnline.dll
```
## Current Goal
@@ -27,10 +27,10 @@ verify the local networking prototype against `server/server.py`.
This means the plugin should be able to:
* Build successfully
* Output `Fallout4Together.dll`
* Output `CommonwealthOnline.dll`
* Be copied into `Data/F4SE/Plugins/`
* Load when Fallout 4 is launched through F4SE
* Create or write to a `Fallout4Together.log` file
* Create or write to a `CommonwealthOnline.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
@@ -93,7 +93,7 @@ If the build succeeds, look for the compiled DLL in the output folder created by
For manual testing, the compiled plugin DLL should eventually be copied to:
```text
Fallout 4/Data/F4SE/Plugins/Fallout4Together.dll
Fallout 4/Data/F4SE/Plugins/CommonwealthOnline.dll
```
If the `F4SE/Plugins/` folder does not exist inside `Data/`, create it manually.
@@ -104,8 +104,8 @@ 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/`
* [ ] `CommonwealthOnline.dll` builds successfully
* [ ] `CommonwealthOnline.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
+14 -14
View File
@@ -89,7 +89,7 @@ namespace
WSADATA winsockData{};
const auto startupResult = WSAStartup(MAKEWORD(2, 2), std::addressof(winsockData));
if (startupResult != 0) {
LogWarningWithLocalPlayerPrefix("Could not initialize Winsock for Fallout 4 Together local networking.");
LogWarningWithLocalPlayerPrefix("Could not initialize Winsock for Commonwealth Online local networking.");
return false;
}
@@ -540,7 +540,7 @@ namespace
}
if (bytesReceived == 0) {
LogWarningWithLocalPlayerPrefix("Fallout 4 Together local server closed the connection.");
LogWarningWithLocalPlayerPrefix("Commonwealth Online local server closed the connection.");
CloseSocket();
break;
}
@@ -552,7 +552,7 @@ namespace
}
if (g_receiveThreadRunning.load()) {
LogWarningWithLocalPlayerPrefix("Lost connection to Fallout 4 Together local server while receiving.");
LogWarningWithLocalPlayerPrefix("Lost connection to Commonwealth Online local server while receiving.");
}
CloseSocket();
break;
@@ -614,14 +614,14 @@ namespace F4T::Networking
// packet path without exposing any gameplay state to a remote server.
const auto localSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (localSocket == INVALID_SOCKET) {
LogWarningWithLocalPlayerPrefix("Could not create socket for Fallout 4 Together local server connection.");
LogWarningWithLocalPlayerPrefix("Could not create socket for Commonwealth Online local server connection.");
return false;
}
if (!SetNonBlocking(localSocket)) {
closesocket(localSocket);
LogWarningWithLocalPlayerPrefix(
"Could not configure non-blocking socket for Fallout 4 Together local server connection.");
"Could not configure non-blocking socket for Commonwealth Online local server connection.");
return false;
}
@@ -630,7 +630,7 @@ namespace F4T::Networking
serverAddress.sin_port = htons(kLocalServerPort);
if (inet_pton(AF_INET, kLocalServerHost, std::addressof(serverAddress.sin_addr)) != 1) {
closesocket(localSocket);
LogWarningWithLocalPlayerPrefix("Could not parse Fallout 4 Together local server address.");
LogWarningWithLocalPlayerPrefix("Could not parse Commonwealth Online local server address.");
return false;
}
@@ -644,7 +644,7 @@ namespace F4T::Networking
// The server is a developer tool, not a runtime requirement. A failed
// connection should leave Fallout 4 running and simply disable packet sends.
LogWarningWithLocalPlayerPrefix(std::format(
"Could not connect to Fallout 4 Together local server at {}:{}",
"Could not connect to Commonwealth Online local server at {}:{}",
kLocalServerHost,
kLocalServerPort));
return false;
@@ -662,7 +662,7 @@ namespace F4T::Networking
StartReceiveThread();
LogInfoWithLocalPlayerPrefix(
std::format("Connected to Fallout 4 Together local server at {}:{}.", kLocalServerHost, kLocalServerPort));
std::format("Connected to Commonwealth Online local server at {}:{}.", kLocalServerHost, kLocalServerPort));
return true;
}
@@ -745,7 +745,7 @@ namespace F4T::Networking
}
if (packetSize <= 0 || static_cast<std::size_t>(packetSize) >= packet.size()) {
LogWarningWithLocalPlayerPrefix("Could not format Fallout 4 Together transform packet.");
LogWarningWithLocalPlayerPrefix("Could not format Commonwealth Online transform packet.");
return false;
}
@@ -758,7 +758,7 @@ namespace F4T::Networking
a_cellId);
if (appended <= 0 || static_cast<std::size_t>(appended) >= remaining) {
LogWarningWithLocalPlayerPrefix("Could not format Fallout 4 Together transform packet cell ID.");
LogWarningWithLocalPlayerPrefix("Could not format Commonwealth Online transform packet cell ID.");
return false;
}
@@ -774,7 +774,7 @@ namespace F4T::Networking
a_worldspaceId);
if (appended <= 0 || static_cast<std::size_t>(appended) >= remaining) {
LogWarningWithLocalPlayerPrefix("Could not format Fallout 4 Together transform packet worldspace ID.");
LogWarningWithLocalPlayerPrefix("Could not format Commonwealth Online transform packet worldspace ID.");
return false;
}
@@ -784,7 +784,7 @@ namespace F4T::Networking
const auto remaining = packet.size() - static_cast<std::size_t>(packetSize);
const auto appended = std::snprintf(packet.data() + packetSize, remaining, "}\n");
if (appended <= 0 || static_cast<std::size_t>(appended) >= remaining) {
LogWarningWithLocalPlayerPrefix("Could not finish Fallout 4 Together transform packet.");
LogWarningWithLocalPlayerPrefix("Could not finish Commonwealth Online transform packet.");
return false;
}
@@ -803,7 +803,7 @@ namespace F4T::Networking
if (bytesSent == SOCKET_ERROR) {
const auto error = WSAGetLastError();
if (error != WSAEWOULDBLOCK) {
LogWarningWithLocalPlayerPrefix("Lost connection to Fallout 4 Together local server.");
LogWarningWithLocalPlayerPrefix("Lost connection to Commonwealth Online local server.");
CloseSocket();
}
@@ -811,7 +811,7 @@ namespace F4T::Networking
}
if (bytesSent != packetSize) {
LogWarningWithLocalPlayerPrefix("Could not send full Fallout 4 Together transform packet.");
LogWarningWithLocalPlayerPrefix("Could not send full Commonwealth Online transform packet.");
CloseSocket();
return false;
}
+2 -2
View File
@@ -55,7 +55,7 @@ namespace
constexpr float kRunGraphSpeedThreshold = 280.0F;
// Graph Speed range confirmed from local-player read-by-name debug in
// Fallout4Together.log: walk starts ~47, full run ~373. FO4's graph "Speed" is in the
// CommonwealthOnline.log: walk starts ~47, full run ~373. FO4's graph "Speed" is in the
// same world-units/sec scale as our network movementSpeed, so the mapping is ~1:1.
// (The earlier 0-105 calibration was wrong and compressed run speed, causing foot slide.)
constexpr float kGraphSpeedMin = 0.0F;
@@ -635,7 +635,7 @@ namespace F4T::ProxyAnimationSync
}
// FO4 graph "Speed" is in the same world-units/sec scale as our derived
// movementSpeed (confirmed in Fallout4Together.log: run movementSpeed ~306 lines up
// movementSpeed (confirmed in CommonwealthOnline.log: run movementSpeed ~306 lines up
// with graph Speed ~296-373). Map ~1:1 so the walk/run foot cadence matches the
// proxy's actual ground translation and does not slide.
float graphSpeed = a_movementSpeed;
+1 -1
View File
@@ -1,6 +1,6 @@
# Source
This folder is for Fallout 4 Together native plugin source files.
This folder is for Commonwealth Online native plugin source files.
Initial planned source areas:
+2 -2
View File
@@ -308,7 +308,7 @@ namespace
// vertical-speed heuristic (a_verticalSpeed >= kJumpVerticalSpeedThreshold) produced
// constant false positives: (z - prevZ)/dt spikes to thousands of units/sec on flat
// ground due to tiny dt and z micro-jitter, so proxies were stuck in a perpetual jump
// state that masked the run/walk locomotion animation (see Fallout4Together.log).
// state that masked the run/walk locomotion animation (see CommonwealthOnline.log).
const auto apiJumping = a_player.IsJumping();
if (apiJumping) {
jumpHoldUntil = a_currentTime + kJumpStateHoldDuration;
@@ -649,7 +649,7 @@ F4SE_PLUGIN_LOAD(const F4SE::LoadInterface* a_f4se)
{
F4SE::Init(a_f4se);
LogInfoWithLocalPlayerPrefix("Fallout 4 Together plugin loaded successfully.");
LogInfoWithLocalPlayerPrefix("Commonwealth Online plugin loaded successfully.");
// TODO: Consider separate per-instance log files once launcher/profile support exists.
// Networking is intentionally localhost-only for the first milestone. If the
+5 -5
View File
@@ -2,7 +2,7 @@
includes("lib/commonlibf4")
-- set project constants
set_project("Fallout4Together")
set_project("CommonwealthOnline")
set_version("0.0.0")
set_license("GPL-3.0")
set_languages("c++23")
@@ -14,11 +14,11 @@ add_rules("plugin.vsxmake.autoupdate")
add_requires("nlohmann_json")
-- define targets
target("Fallout4Together")
target("CommonwealthOnline")
add_rules("commonlibf4.plugin", {
name = "Fallout4Together",
author = "Fallout4Together",
description = "Fallout4Together F4SE plugin using CommonLibF4"
name = "CommonwealthOnline",
author = "Commonwealth Online",
description = "Commonwealth Online F4SE plugin using CommonLibF4"
})
-- add src files