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.
This commit is contained in:
@@ -1038,6 +1038,63 @@ Fake Clients tab or when the GUI server stops.
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-02 - Fake Client Walk To Player
|
||||
|
||||
### Summary
|
||||
|
||||
Added Fake Clients tab movement controls and a first useful fake-client movement
|
||||
script. GUI-managed fake clients can now be set to Idle or Walk To Player while
|
||||
remaining ordinary external TCP clients that send normal transform packets
|
||||
through the Python server.
|
||||
|
||||
### Files Changed
|
||||
|
||||
- `server/fake_player.py`
|
||||
- `server/dev_server_app.py`
|
||||
- `server/README.md`
|
||||
- `docs/dev-log.md`
|
||||
|
||||
### Details
|
||||
|
||||
- Added `Idle` and `Walk To Player` script modes to `FakePlayerClient`.
|
||||
- Added thread-safe script switching, pose tracking, and target state for
|
||||
GUI-managed fake clients.
|
||||
- Added `Set Idle` and `Walk To Player` buttons to the Fake Clients tab.
|
||||
- Added safe selected-client handling with readable logs when no fake client is
|
||||
selected or the server is stopped.
|
||||
- Walk To Player reads `FalloutTogetherServer.get_clients()` snapshots through a
|
||||
manager callback, filters out GUI-managed fake clients, and targets the lowest
|
||||
real `playerId` with a valid `lastTransform`.
|
||||
- Walk To Player moves in a straight line toward the real player's latest
|
||||
transform plus a +150 X offset, sends moving transforms at about 10 Hz, and
|
||||
returns to low-rate idle keep-alive transforms after reaching the stop
|
||||
distance.
|
||||
- No plugin code, protocol fields, `server/server.py`, or `server/fake_client.py`
|
||||
were changed.
|
||||
|
||||
### 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.
|
||||
- Still needs manual GUI validation with `python dev_server_app.py`.
|
||||
- Still needs in-game Fallout 4/F4SE validation in `F4TTestCell01`.
|
||||
|
||||
### Known Issues
|
||||
|
||||
- Walk To Player uses simple straight-line movement only; it does not perform
|
||||
pathfinding, navmesh checks, or obstacle avoidance.
|
||||
- Additional fake-client scripts are still future work.
|
||||
|
||||
### Next Steps
|
||||
|
||||
- Manually validate the GUI buttons with no real player connected and with a
|
||||
Fallout 4 client in `F4TTestCell01`.
|
||||
- Add future dev/test scripts such as Walk Circle, Walk Square, Follow Player,
|
||||
Jump Loop, Sneak Toggle, Teleport Test, Leave Cell / Return, and Disconnect
|
||||
After Delay.
|
||||
|
||||
---
|
||||
|
||||
## Entry Template
|
||||
|
||||
Use this format for future updates:
|
||||
|
||||
Reference in New Issue
Block a user