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.
This commit is contained in:
@@ -978,6 +978,66 @@ Player position: X=2048.00, Y=2048.00, Z=0.00, AngleZ=0.00
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-02 - GUI Fake Client Manager
|
||||
|
||||
### Summary
|
||||
|
||||
Added GUI-managed synthetic TCP clients for local relay testing. Fake clients
|
||||
connect through the normal server socket, receive a welcome `playerId`, send one
|
||||
idle transform per second for `F4TTestCell01`, and disconnect cleanly from the
|
||||
Fake Clients tab or when the GUI server stops.
|
||||
|
||||
### Files Changed
|
||||
|
||||
- `server/fake_player.py`
|
||||
- `server/dev_server_app.py`
|
||||
- `server/README.md`
|
||||
- `docs/dev-log.md`
|
||||
|
||||
### Details
|
||||
|
||||
- Added `FakePlayerClient` and `FakePlayerManager` as GUI test tooling only.
|
||||
- Fake clients use TCP `127.0.0.1:7777` and newline-separated JSON packets, so
|
||||
the server sees them as normal external clients.
|
||||
- The Fake Clients tab now supports `+ Add Fake Client` and
|
||||
`- Remove Selected`.
|
||||
- Fake-client lifecycle logs are routed to the GUI console with a
|
||||
`[FakeClient]` prefix through the Qt signal bridge.
|
||||
- Stopping or closing the GUI disconnects all fake clients before stopping the
|
||||
server.
|
||||
- The Fallout 4 plugin, network protocol, terminal server launcher, and
|
||||
standalone `fake_client.py` were left unchanged.
|
||||
|
||||
### Testing
|
||||
|
||||
- Ran `python -m py_compile server.py server_core.py client_session.py
|
||||
fake_client.py dev_server_app.py fake_player.py` from `server`; it succeeded.
|
||||
- Ran `python server.py` from `server` and confirmed the terminal launcher
|
||||
reached the expected listening state.
|
||||
- Ran a headless fake-client smoke test on an alternate local port after
|
||||
`127.0.0.1:7777` was temporarily held by another process. The fake client
|
||||
received `playerId` 1, reached `Connected`, and the server recorded the idle
|
||||
transform for `0B000F99`.
|
||||
- Imported `dev_server_app.py` successfully to confirm the GUI module and
|
||||
PySide6 dependency load in the current Python environment.
|
||||
- Not yet run: interactive `python dev_server_app.py` GUI clicks.
|
||||
- Not yet run: Fallout 4/F4SE validation that a real client receives the fake
|
||||
client's idle transform in `F4TTestCell01`.
|
||||
|
||||
### Known Issues
|
||||
|
||||
- No movement scripts beyond `Idle` are implemented yet.
|
||||
- Full Fallout 4/F4SE validation still needs to be run manually.
|
||||
|
||||
### Next Steps
|
||||
|
||||
- Add selectable fake-client movement scripts after the idle-client milestone is
|
||||
validated.
|
||||
- Consider fake-client controls for script start/stop once multiple scripts
|
||||
exist.
|
||||
|
||||
---
|
||||
|
||||
## Entry Template
|
||||
|
||||
Use this format for future updates:
|
||||
|
||||
Reference in New Issue
Block a user