# Server World State Packet Server-authoritative weather and time control from the dev server GUI. ## Authority - **Time** (`timeHHmm`): sent to **all** clients; each converts `HHmm` to Fallout game-hour float (for example `2200 -> 22.0`, `1830 -> 18.5`) before applying. - **Weather** (`weatherConsoleArg`): sent to **all** clients, but only the current **world-state host** runs `fw <8-digit-id>`. The host then relays usual `worldState` updates to other clients. ## Packet Format Time-only (all clients): ```json { "type": "serverWorldState", "timeHHmm": "1900", "serverTime": 1780212128.301 } ``` Weather (all clients receive; only world-state host acts): ```json { "type": "serverWorldState", "weatherConsoleArg": "001ca7e4", "weatherFormId": "001CA7E4", "serverTime": 1780212128.301 } ``` ## Field Definitions | Field | Type | Required | Description | |-------|------|----------|-------------| | `type` | string | yes | Must be `"serverWorldState"` | | `timeHHmm` | string | no | 24-hour clock value (HHmm) converted client-side to game-hour float for `set gamehour to ` | | `weatherConsoleArg` | string | no | Exact argument for `fw` on the current world-state host (8-digit lowercase hex) | | `weatherFormId` | string | no | Relay form ID used in host `worldState` broadcast | | `serverTime` | number (double) | no | Relay timestamp | ## Client Apply Rules - **Time:** all clients convert `timeHHmm` to game-hour float and apply `set gamehour to ` on the game thread. - **Weather:** only the current world-state host runs `fw `. - Weather commands are scheduled on the F4SE game thread from the network receive path. - After the host runs `fw`, it immediately relays `worldState` with `weatherFormId`. Edit `server/world_state_presets.py` so each preset uses the exact `fw` ID that works in your console (for example `0000015e`). ## Preset Weather Console Args | Label | Default `fw` arg | |-------|------------------| | Clear | `0002b52a` | | Cloudy | `001cc186` | | Overcast | `001c8556` | | Fog | `001c3473` | | Rain | `001ca7e4` | | Radstorm | `001c3d5e` | | Glowing Sea | `000f1033` | ## Backward Compatibility Older clients that do not handle `serverWorldState` ignore the packet safely.