Convert HHmm to Fallout game-hour float

Add parsing and application of HHmm time strings as Fallout game-hour floats so GUI time presets apply correctly. Introduce ParseHHmmToGameHour in plugin/src/F4TWorldStateSync.cpp and use it when building the console command (formats as set gamehour to <float> with fallback to the raw HHmm string if parsing fails). Improve logging to indicate when a parsed HHmm was used. Update protocol/server-world-state.md, changelog.md, and docs/dev-log.md to document the behavior and rationale.
This commit is contained in:
2026-06-24 12:34:18 +12:00
parent 1493e68349
commit c4466718a3
4 changed files with 87 additions and 5 deletions
+30
View File
@@ -9,6 +9,36 @@ failed experiments, successful tests, and next steps.
---
## 2026-06-24 - Convert `HHmm` Time to Game-Hour Float
### Summary
Fixed server GUI time presets applying the wrong time in Fallout 4 by converting `HHmm` values (such as `2200`) to game-hour float values before running `set gamehour`.
### Files Changed
- `plugin/src/F4TWorldStateSync.cpp`
- `protocol/server-world-state.md`
- `changelog.md`
### Details
- `serverWorldState.timeHHmm` is now parsed as `HHmm` on the client.
- Parsed times are applied as float hours:
- `2200` -> `22.0`
- `1830` -> `18.5`
- If parsing fails, plugin falls back to the original raw command for compatibility.
### Testing
- Not re-tested in-game in this session.
- User reported `Night (2200)` previously set daytime while console showed `set gamehour to 2200`.
- Recommended: test `0600`, `1200`, `1900`, and `2200` from GUI and verify resulting in-game time.
### Known Issues
- None currently known.
### Next Steps
- Rebuild plugin and verify each time preset maps correctly in-game.
---
## 2026-06-24 - Replace Invalid GUI Weather IDs
### Summary