Weather: the season follows the story (F1 WEATHER FIX, after VI-Patch's PS5 weather fix) #4955

Open
github-bot wants to merge 1 commit from github-bot/gh-4954 into main AGit
Owner

@⁠NICKNAMErutschovkonikovan on GitHub · 2026-12-01 15:24 UTC · original
NICKNAMErutschovkonikovan:pr/weather-fix → main · +885 −3 · 7 files · 1 commits · open

What it changes

The game's weather picks its next state from the list of the season it is in, and the
season is changed only by scripts, a network event and a loaded save. Stuck in winter, there
is hardly any rain and no storm for days (VI-Patch's note on the PS5; Rockstar's 1.0.2.2 notes
say "weather not changing for extended periods").

This adds WEATHER FIX to the F1 menu: an ordinary live row (VICTORY_WEATHER_FIX,
OFF by default, saved like the other rows), placed after ENGLISH KEYBOARD.

  • victory-hle/src/weatherfix.rs: an entry hook on the weather's update (0x142370f50)
    doing what VI-Patch's PS5 "Weather fix" does (ZiZc3,
    findings by idarius and TaPiOn-): its logic one to one, no byte of it. When the game is not
    changing the weather itself (no change under way, nothing asked by a script, not held), the
    first of five story flags that is set picks a season and one of its lists, and the game's
    own setter (0x142370890) puts the weather there, under the script lock its native takes.
    The list is kept for 600 runs of the update; a list the setter does not take is tried eight
    times. Missions and scripts that set the weather come first.
  • Off is the game's own: the hook forgets what it aimed at (on again starts as VI-Patch
    starts), looks up no story flag, and its once-a-minute line about the weather is at DEBUG.
    Turning it off does not put the old season back: the season set stays the weather's,
    and the game's save keeps it (said in the row's text and the README).
  • A settled season is not checked again while the story's flag stays the same (VI-Patch's
    logic, which leaves a list a script set later alone). The aim is also forgotten while the
    game's table of set flags is empty, so the season is looked at anew once it is there again;
    whether loading a save empties that table was not read out of the image. So a save loaded
    later in the same chapter with another season (say, winter) may keep it until the row is
    turned off and on again (said in the row's text and the README).
  • Every place is this build's (1.0.2.1), found by its structure (the same block of globals as
    on the PS5, every offset in it the same) and checked byte by byte before the hook goes in.
    On another build nothing is changed, the row's tag says NOT ACTIVE (not LIVE) and its text
    says why.
  • victory-gpu/src/weather.rs (new): the live switch and whether the hook is in, read by the
    hook and set by the menu (apply_live); run.rs installs the hook next to mousehook.
  • README: the row in the F1 guide (a WEATHER table) and VICTORY_WEATHER_FIX under "Game and
    console behaviour".

Open question: the hook calls the setter under the script lock (0x14aad44e0), as one
more native would, from the weather's step of the game's update. Whether a native can wait for
the weather's step while it holds that lock was not read out of the image (VI-Patch does the
same on the PS5). If one can, this could stall the game's update; a run where the season is
actually set would show it.

How it was tested

Commit 4943a113 (on origin/main 5fabb46e), Windows, rustc 1.98.1:

  • cargo clippy --workspace --all-targets --locked -- -D warnings: fails with the same five
    errors as on main (host/font.rs:213, :260, host/menu.rs:667 (now :681, the lines
    above it moved), host/panel.rs:602, :668), nothing else. Because victory-gpu stops
    there, the crates after it are not linted by that command; the same command with
    -A clippy::too_many_arguments -A clippy::manual_is_multiple_of -A clippy::collapsible_if
    (just those three) passes over the whole workspace.
  • cargo test --workspace --locked --no-fail-fast: everything passes except 9 GPU/WARP tests
    in victory-shader (emit::intersect_tests::*_on_the_card (4),
    permlane_rows_and_inactive_sources, a_pixel_mask_draws_only_its_pixels_of_each_quad,
    edge_flagged_triangles_draw_as_unflagged_ones, quad_neighbours_at_a_triangles_edge_are_read,
    cndmask_saved_exec_respects_dispatch_x_partial_active). victory-shader is unchanged by
    this branch, and they also fail when run alone on this machine. The new tests pass: 9 in
    weatherfix (the step logic against a stand-in weather: set once and watched, put back
    only to a story list, eight tries, no flag; the switch off forgetting the aim through the
    hook's own run; rip-relative operand checks; an image too small left alone) and 2 in
    weather (the seasons' joaat hashes, the switch and state). In earlier runs on this machine
    host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end failed once (it
    fails on unchanged main alone too) and modules::xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_it
    once (passes alone); both passed in this run.
  • cargo build --release --locked -p victory: succeeds. cargo xtask policy: 466 files ok.
  • In the game: the reference version this is ported from was run in the game on an RTX 5090 +
    Ryzen 7 5800X3D, in a combined build with other changes. Its log shows the hook put in and
    the weather's update reaching it. The season change itself (the setter path) has not been
    seen in a run yet: no "weather fix: season set by the story" line. This branch itself was not
    run in the game.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2825 (an F4 mod menu that sets and holds the world clock; no weather). No open pull request changes the weather update.

🤖 Generated with Claude Code

**@⁠NICKNAMErutschovkonikovan** on GitHub · 2026-12-01 15:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4954) `NICKNAMErutschovkonikovan:pr/weather-fix` → `main` · +885 −3 · 7 files · 1 commits · open ## What it changes The game's weather picks its next state from the list of the season it is in, and the season is changed only by scripts, a network event and a loaded save. Stuck in winter, there is hardly any rain and no storm for days (VI-Patch's note on the PS5; Rockstar's 1.0.2.2 notes say "weather not changing for extended periods"). This adds **WEATHER FIX** to the F1 menu: an ordinary live row (`VICTORY_WEATHER_FIX`, OFF by default, saved like the other rows), placed after ENGLISH KEYBOARD. - `victory-hle/src/weatherfix.rs`: an entry hook on the weather's update (`0x142370f50`) doing what [VI-Patch](https://github.com/ZiZc3/VI-Patch)'s PS5 "Weather fix" does (ZiZc3, findings by idarius and TaPiOn-): its logic one to one, no byte of it. When the game is not changing the weather itself (no change under way, nothing asked by a script, not held), the first of five story flags that is set picks a season and one of its lists, and the game's own setter (`0x142370890`) puts the weather there, under the script lock its native takes. The list is kept for 600 runs of the update; a list the setter does not take is tried eight times. Missions and scripts that set the weather come first. - **Off** is the game's own: the hook forgets what it aimed at (on again starts as VI-Patch starts), looks up no story flag, and its once-a-minute line about the weather is at DEBUG. **Turning it off does not put the old season back**: the season set stays the weather's, and the game's save keeps it (said in the row's text and the README). - **A settled season is not checked again** while the story's flag stays the same (VI-Patch's logic, which leaves a list a script set later alone). The aim is also forgotten while the game's table of set flags is empty, so the season is looked at anew once it is there again; whether loading a save empties that table was not read out of the image. So a save loaded later in the same chapter with another season (say, winter) may keep it until the row is turned off and on again (said in the row's text and the README). - Every place is this build's (1.0.2.1), found by its structure (the same block of globals as on the PS5, every offset in it the same) and checked byte by byte before the hook goes in. On another build nothing is changed, the row's tag says NOT ACTIVE (not LIVE) and its text says why. - `victory-gpu/src/weather.rs` (new): the live switch and whether the hook is in, read by the hook and set by the menu (`apply_live`); `run.rs` installs the hook next to `mousehook`. - README: the row in the F1 guide (a WEATHER table) and `VICTORY_WEATHER_FIX` under "Game and console behaviour". **Open question**: the hook calls the setter under the script lock (`0x14aad44e0`), as one more native would, from the weather's step of the game's update. Whether a native can wait for the weather's step while it holds that lock was not read out of the image (VI-Patch does the same on the PS5). If one can, this could stall the game's update; a run where the season is actually set would show it. ## How it was tested Commit `4943a113` (on `origin/main` `5fabb46e`), Windows, rustc 1.98.1: - `cargo clippy --workspace --all-targets --locked -- -D warnings`: fails with the same five errors as on `main` (`host/font.rs:213`, `:260`, `host/menu.rs:667` (now `:681`, the lines above it moved), `host/panel.rs:602`, `:668`), nothing else. Because `victory-gpu` stops there, the crates after it are not linted by that command; the same command with `-A clippy::too_many_arguments -A clippy::manual_is_multiple_of -A clippy::collapsible_if` (just those three) passes over the whole workspace. - `cargo test --workspace --locked --no-fail-fast`: everything passes except 9 GPU/WARP tests in `victory-shader` (`emit::intersect_tests::*_on_the_card` (4), `permlane_rows_and_inactive_sources`, `a_pixel_mask_draws_only_its_pixels_of_each_quad`, `edge_flagged_triangles_draw_as_unflagged_ones`, `quad_neighbours_at_a_triangles_edge_are_read`, `cndmask_saved_exec_respects_dispatch_x_partial_active`). `victory-shader` is unchanged by this branch, and they also fail when run alone on this machine. The new tests pass: 9 in `weatherfix` (the step logic against a stand-in weather: set once and watched, put back only to a story list, eight tries, no flag; the switch off forgetting the aim through the hook's own run; rip-relative operand checks; an image too small left alone) and 2 in `weather` (the seasons' joaat hashes, the switch and state). In earlier runs on this machine `host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end` failed once (it fails on unchanged `main` alone too) and `modules::xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_it` once (passes alone); both passed in this run. - `cargo build --release --locked -p victory`: succeeds. `cargo xtask policy`: 466 files ok. - In the game: the reference version this is ported from was run in the game on an RTX 5090 + Ryzen 7 5800X3D, in a combined build with other changes. Its log shows the hook put in and the weather's update reaching it. The season change itself (the setter path) has **not** been seen in a run yet: no "weather fix: season set by the story" line. This branch itself was not run in the game. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2825 (an F4 mod menu that sets and holds the world clock; no weather). No open pull request changes the weather update. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A live row in the F1 menu, WEATHER FIX (VICTORY_WEATHER_FIX=1, off by
default, saved as the other rows). The game's weather picks its next state
from the list of the season it is in, and only scripts, a network event and a
loaded save change the season: stuck in winter, there is hardly any rain and
no storm for days (VI-Patch's note on the PS5, and Rockstar's 1.0.2.2 note
"weather not changing for extended periods").

An entry hook on the weather's update (0x142370f50, victory-hle weatherfix)
does what VI-Patch's PS5 "Weather fix" does (ZiZc3, findings by idarius and
TaPiOn-), its logic one to one and no byte of it: when the game is not
changing the weather itself (no change under way, nothing asked by a script,
not held), the first of five story flags that is set picks a season and one
of its lists, and the game's setter (0x142370890) puts the weather there,
under the script lock its native takes. The list is kept for 600 runs of the
update; a list the setter does not take is tried eight times.

Switched off, the hook forgets what it aimed at, so on again starts as
VI-Patch starts, and it does none of the fix's work: no story flag is looked
up, and its once-a-minute line about the weather is at DEBUG. Off does not
put back a season it set; that stays the weather's and the game's save keeps
it (said in the row's text and the README). A settled season is not looked at
again while the story's flag stays the same (VI-Patch's logic): the aim is
also forgotten while the game's table of set flags is empty, and a save
loaded later in the same chapter may keep its own season until the row is
turned off and on again (said too).

Every place is this build's (1.0.2.1), found by its structure (the same block
of globals as on the PS5, every offset in it the same) and checked byte by
byte before the hook goes in; another build is left alone, and the row shows
NOT ACTIVE and says why. The module notes say why the setter may be called
from the update, and what is open: whether a native can wait for the
weather's step while it holds the script lock was not read out of the image.

The switch and the hook's state live in victory-gpu's new `weather` module,
where the menu is. Tests (no game data): the step logic against a stand-in
weather (set once and watched, put back only to a story list, eight tries,
no flag), the switch off forgetting the aim through the hook's own run, the
rip-relative operand checks, an image too small left alone, and the seasons'
joaat hashes. Not run in the game on this branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 15:24:59 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/menu.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4955/head:github-bot/gh-4954'
git switch 'github-bot/gh-4954'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4954'
git switch 'github-bot/gh-4954'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4954'
git switch 'github-bot/gh-4954'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4954'
git switch 'main'
git merge --squash 'github-bot/gh-4954'
git switch 'main'
git merge --ff-only 'github-bot/gh-4954'
git switch 'main'
git merge 'github-bot/gh-4954'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4955
No description provided.