Commit Graph
10 Commits
Author SHA1 Message Date
andrew 77751c69f7 Use world-state host for server weather actions
Stop hardcoding player 1 for server-initiated weather/time and instead use the current world-state host. Plugin code now defers weather commands until GetWorldStateHostPlayerId() is available, uses IsWorldStateHost() to gate execution, logs local/host IDs, and requeues when host assignment is missing. Relay logic now attempts ForceHostWorldStateBroadcast and logs if relay fails. Updated protocol docs, dev server UI tooltips, presets comment, changelog, and dev log to reflect world-state host terminology and behavior. This ensures weather/time control survives host reassignment and avoids dropped commands on reconnect/restart.
2026-06-25 10:48:18 +12:00
andrew 4c17e70620 Add serverWorldState packet and GUI controls
Introduce a server-authoritative world-state packet to control weather and time from the dev server GUI. Adds protocol docs and message type (serverWorldState), a new Weather/Time tab in dev_server_app.py, server-side broadcasting in server_core.py, and preset utilities in server/world_state_presets.py. Plugin changes (F4TNetworking.cpp, F4TWorldStateSync.*) queue and apply incoming serverWorldState on the game thread, run `set gamehour` for all clients, and run `fw <8-digit-id>` on the assigned player 1 then force the host to relay a worldState snapshot. Also includes parsing/validation of hex form IDs, logging improvements, and minimal fake client handling. This ensures consistent server-driven time/weather and documents usage and presets.
2026-06-23 23:03:34 +12:00
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
andrew 8dfec0a4b3 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.
2026-06-07 16:22:50 +12:00
andrew 5ba440ab5d Add crouch state and fix jump sync
Add isCrouching to network, state and animation systems; enable proxy jump syncing with a jump-hold debounce and update animation descriptor and server tooling.

Key changes:
- Networking: F4TNetworking.h/cpp: added a_isCrouching, include "isCrouching" in transform packets and parsing, and logging.
- Remote state: F4TRemotePlayerState.h: added isCrouching field.
- Proxy animation: F4TProxyAnimationSync.*: added crouch fields, enabled jump sync, implemented ApplyJumpHoldState and jump hold timing, wrote crouch/jump bools into descriptors when available, updated event firing and logs.
- Animation descriptor: F4AnimationDescriptor.cpp: added isJumping and isCrouching to bool variable list.
- Local detection: main.cpp: added isCrouching in movement state, stubbed GetCrouchState(), adjusted jump hold timing and included crouch in outgoing transform calls.
- Server/dev tooling: server/dev_server_app.py, fake_client.py, fake_player.py, README.md: added crouch reporting, toggle UI/control and fake client support for crouch, and updated docs/logging.
- Docs: docs/dev-log.md updated with notes on jump/crouch fixes and testing.

Rationale: ensure remote players can report crouch state and make jump animations transition reliably by debouncing jump state on proxies and writing available graph bools; also provide dev-server controls and fake-client support for testing.
2026-06-05 14:22:17 +12:00
andrew a6b2505242 Add animation sync docs and descriptor infra
Add detailed design and implementation scaffolding for TiltedEvolution-style animation synchronization. New documentation: animation-architecture-alignment.md, animation-sync-analysis.md, f4-animation-descriptor.md, phase1-3-completion-report.md and updates to dev-log.md describing Phase 1-3 progress. Plugin: introduce F4AnimationDescriptor (plugin/include/F4AnimationDescriptor.h, plugin/src/F4AnimationDescriptor.cpp) and extend remote state handling (plugin/include/F4TRemotePlayerState.h). Integrate protocol/state extensions and refactor points: plugin/src/F4TNetworking.cpp now parses optional actorStateFlags and actionEvents; proxy controller and animation sync files (F4TProxyActorController.cpp, F4TProxyAnimationSync.cpp) updated to support descriptor-based bulk variable snapshots and actor state replication. Server/tools: update server/dev_server_app.py and server/fake_client.py to handle and display the new optional fields. These changes are additive and backward-compatible and set up phases for action capture, dynamic proxy spawn, and action-replay integration.
2026-06-03 16:52:47 +12:00
andrew 0e67209ab1 Add fake-client dev scripts and GUI actions
Add developer-only fake-client scripts and UI actions for testing proxy behavior. Files updated: server/fake_player.py, server/dev_server_app.py, server/README.md, docs/dev-log.md. New scripts/actions: Walk Circle, Jump Once, Toggle Sneak, Leave Cell (Left Cell), Return To Cell, and Teleport Test. UI: added buttons and handlers in the DevServerWindow to trigger these actions. fake_player: implemented script/state handling, one-shot jump thread, teleport toggle, sneak flag, walk-circle movement, cell change transforms, a socket send lock, and protection for one-shot/action state. README and dev log updated with usage, testing notes, and known issues. Basic headless smoke tests and py_compile checks were performed; full in-game Fallout 4/F4SE validation remains manual.
2026-06-02 15:46:59 +12:00
andrew 0b73b1eff1 Add Walk To Player script and GUI controls
Add developer tooling to make GUI-managed fake clients run a Walk To Player script and provide UI controls.

Changes:
- server/fake_player.py: implement SCRIPT_WALK_TO_PLAYER, thread-safe script switching, pose/angle tracking, walk-to-player movement (straight-line, +150 X offset), target selection via a walk target provider, configurable send rates/speed/stop distance, and robust parsing of server client snapshots. Sends moving transforms ~10 Hz and falls back to idle keep-alives. Logs when no target is available.
- server/dev_server_app.py: add Set Idle and Walk To Player buttons, safe selected-client handling, and pass a client snapshot provider callback (server.get_clients()) to the fake player manager.
- server/README.md & docs/dev-log.md: document the new controls, behavior, testing notes, known limitations, and next steps.

Notes:
- Walk To Player picks the lowest non-fake playerId with a valid lastTransform and targets that player's last transform +150 X.
- Movement is simple straight-line stepping (no pathfinding/navmesh/obstacle avoidance).
- No protocol, plugin, server core, or existing fake_client networking behavior was changed.
- Quick static check: py_compile ran for relevant modules; manual GUI and in-game validation are still required.
2026-06-02 15:19:32 +12:00
andrew 9db37d3436 Add GUI-managed fake TCP clients
Introduce GUI test tooling that spawns synthetic TCP clients for local relay testing. Adds server/fake_player.py implementing FakePlayerClient and FakePlayerManager which create TCP connections to 127.0.0.1:7777, parse newline-delimited JSON, receive server-assigned playerId, and send one idle transform per second for cell 0B000F99. Integrates the manager into server/dev_server_app.py: start/stop lifecycle handling, Add/Remove buttons, table snapshots, logging bridge, and clean shutdown of fake clients. Updates server/README.md and docs/dev-log.md with usage, testing notes, and known issues. Includes basic error handling and thread-safe snapshots; movement scripts beyond Idle and full in-game validation are noted as next steps.
2026-06-02 14:43:01 +12:00
andrew fff6680fe5 Refactor server into reusable core and GUI
Split the monolithic test server into a reusable server core and a thin terminal launcher, and add a PySide6 developer GUI. Added server_core.py (FalloutTogetherServer) with lifecycle control, thread-safe client snapshots, stats and log listener support; added client_session.py for per-client state; added dev_server_app.py GUI and requirements.txt. Updated server.py to use the new server core, and revised server/README.md and docs/dev-log.md to document the new structure, usage, and validation steps. Protocol behavior (welcome/transform/disconnect handling and newline-separated JSON) remains unchanged.
2026-06-02 14:30:20 +12:00