Weather: order one of the game's weathers from F1, held until GAME DECIDES (MANUAL WEATHER) #4953

Open
github-bot wants to merge 2 commits from github-bot/gh-4952 into main AGit
Owner

@⁠NICKNAMErutschovkonikovan on GitHub · 2026-12-01 15:23 UTC · original
NICKNAMErutschovkonikovan:pr/manual-weather → main · +2149 −21 · 8 files · 2 commits · draft

Depends on #4954

Draft until that one is merged. This branch contains its commit 4943a113 first, then
3de95583. MANUAL WEATHER works through the hook WEATHER FIX puts into the weather's update
(one entry hook per function: a second one on the same entry would be refused), and WEATHER FIX
has to keep out while a weather of the player's is held. Only the second commit is this pull
request's own; review it with git diff 4943a113 3de95583.

What it changes

Two live rows in the F1 menu, after WEATHER FIX, in the style of the other ITEMS:

  • MANUAL WEATHER: Left/Right picks GAME DECIDES (the default) or one of 20 weather types
    of the game's weather data (cloudless, clear, sunny, scattered clouds, mixed clouds, cloudy,
    overcast, hazy and hot, misty, fog, dense fog, sea fog, drizzle, showers, rain, heavy rain,
    dry thunder, thunderstorm, tropical storm, hurricane). Enter orders it. The tag at the right
    says what became of it: * picked and not ordered yet, then WAITING, CHANGING, HELD,
    MISSION (a mission holds the weather, nothing done), MISSING (type not loaded), ENDED (a
    mission set its own later), LIVE (the game decides), or NOT ACTIVE (another build). Never
    saved (its name starts with VICTORY_MENU_, and the settings text skips it; a test checks
    the text a save writes): the game's own save does not keep a weather ordered either; after a
    restart the game decides.
  • WEATHER CHANGE (VICTORY_WEATHER_CHANGE, saved): AT ONCE, or over 10, 30, 60 seconds.

How (victory-hle/src/weatherpick.rs), the way a mission's script does it and not through the
game's cheat (its "cycle weather" comes only after the story and stops saving and
achievements): in the weather update's hook, on the update's thread, under the script lock,
through the set-weather native's own function 0x143e950f0 with "held" (0x142371e60 at once,
0x142370eb0 over time); GAME DECIDES through the let-go native's 0x143eb8510, or
0x142370e70 for a change of ours still under way with nothing asked. The look at what is
asked and every call are under the lock (a look without it that would want to call is done
again under it), and the menu stores WAITING before the order, so the hook's answer is the
last word.

What is "ours" is kept as the game shows it: the type held; the change to it over what was
asked when it began (a second weather over time while one is held: the game keeps the first
asked until the change ends); or the game's 45 s of letting go where the season's list has no
state of the type (if that change ends with ours still asked, it is let go again, so nothing
stays asked that the menu cannot let go).

  • A script that sets only the mix byte, or only the asked state, while our change still runs:
    ours no longer stands, and the game would finish our change into a hold of ours the menu had
    forgotten (GAME DECIDES doing nothing, every order saying MISSION). Our change is ended there
    (0x142370eb0(-1, 0.0, 1), the call the game's own end of every asking makes, already
    byte-checked), theirs is left; the tag says ENDED.
  • HELD is said from the game's state when our change comes to, so a later order the game
    could not take (MISSING) does not stand over it.
  • The game keeps no owner with what is asked: a mission that asks for the very weather type
    of ours held cannot be told from ours and counts as ours (GAME DECIDES would let it go). A
    mission's weather of a type when nothing of ours is held is the mission's (MISSION).
  • WEATHER FIX keeps out while ours is held, under way or being let go. The native's two extra
    switches are passed as 0, as read (the sky's per-frame flag; zeroing the ground's wetness and
    puddles). Every place is checked byte by byte at the start; another build, or no hook in the
    update, gives NOT ACTIVE and nothing is ordered.
  • victory-gpu/src/weather.rs gains the order, the answer and the change; weatherfix.rs
    shares its place checks (pub(crate)) and calls weatherpick::before_update first; the menu
    redraws when the hook's answer changes. README: both rows in the F1 guide's WEATHER table and
    VICTORY_WEATHER_CHANGE.

How it was tested

Commit 3de95583 (on 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 :772, 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: the new tests pass: 12 in weatherpick (the
    step logic against a stand-in weather after the title's functions as read: at once, over
    time, a second weather over one held, the 45 s of letting go and a letting go that did not
    end, a mission holding or taking the weather, a type not loaded, a script setting only the
    mix or only the asked state over our change, HELD after MISSING, an image too small left
    alone), weather::a_weather_ordered_is_taken_once, and in host::menu
    the_weather_rows_offer_what_the_hook_takes and a_save_never_writes_the_weather_picked;
    the 9 weatherfix tests too. Not green overall: the same 9 GPU/WARP tests in
    victory-shader as on the WEATHER FIX branch fail (victory-shader unchanged; they fail
    alone too); host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end
    fails, as it does on unchanged main alone on this machine; and
    watch::many_askers_tests::no_mapping_is_lost_between_askers failed in the full run and
    passed three times out of three when run alone (watch.rs is unchanged here).
  • cargo build --release --locked -p victory: succeeds. cargo xtask policy: 467 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; there its places were found and it
    was put in (no NOT ACTIVE). An order carried out by the hook has not been seen in a run:
    there is no "manual weather: asked, changing to, mix before and after" line in the logs. The
    fixes above (a script over our change, HELD after MISSING) are not in that version's run.
    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:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4952) `NICKNAMErutschovkonikovan:pr/manual-weather` → `main` · +2149 −21 · 8 files · 2 commits · draft Depends on #4954 Draft until that one is merged. This branch contains its commit `4943a113` first, then `3de95583`. MANUAL WEATHER works through the hook WEATHER FIX puts into the weather's update (one entry hook per function: a second one on the same entry would be refused), and WEATHER FIX has to keep out while a weather of the player's is held. Only the second commit is this pull request's own; review it with `git diff 4943a113 3de95583`. ## What it changes Two live rows in the F1 menu, after WEATHER FIX, in the style of the other `ITEMS`: - **MANUAL WEATHER**: Left/Right picks GAME DECIDES (the default) or one of 20 weather types of the game's weather data (cloudless, clear, sunny, scattered clouds, mixed clouds, cloudy, overcast, hazy and hot, misty, fog, dense fog, sea fog, drizzle, showers, rain, heavy rain, dry thunder, thunderstorm, tropical storm, hurricane). Enter orders it. The tag at the right says what became of it: `*` picked and not ordered yet, then WAITING, CHANGING, HELD, MISSION (a mission holds the weather, nothing done), MISSING (type not loaded), ENDED (a mission set its own later), LIVE (the game decides), or NOT ACTIVE (another build). Never saved (its name starts with `VICTORY_MENU_`, and the settings text skips it; a test checks the text a save writes): the game's own save does not keep a weather ordered either; after a restart the game decides. - **WEATHER CHANGE** (`VICTORY_WEATHER_CHANGE`, saved): AT ONCE, or over 10, 30, 60 seconds. How (`victory-hle/src/weatherpick.rs`), the way a mission's script does it and not through the game's cheat (its "cycle weather" comes only after the story and stops saving and achievements): in the weather update's hook, on the update's thread, under the script lock, through the set-weather native's own function `0x143e950f0` with "held" (`0x142371e60` at once, `0x142370eb0` over time); GAME DECIDES through the let-go native's `0x143eb8510`, or `0x142370e70` for a change of ours still under way with nothing asked. The look at what is asked and every call are under the lock (a look without it that would want to call is done again under it), and the menu stores WAITING before the order, so the hook's answer is the last word. What is "ours" is kept as the game shows it: the type held; the change to it over what was asked when it began (a second weather over time while one is held: the game keeps the first asked until the change ends); or the game's 45 s of letting go where the season's list has no state of the type (if that change ends with ours still asked, it is let go again, so nothing stays asked that the menu cannot let go). - A script that sets only the mix byte, or only the asked state, while our change still runs: ours no longer stands, and the game would finish our change into a hold of ours the menu had forgotten (GAME DECIDES doing nothing, every order saying MISSION). Our change is ended there (`0x142370eb0(-1, 0.0, 1)`, the call the game's own end of every asking makes, already byte-checked), theirs is left; the tag says ENDED. - HELD is said from the game's state when our change comes to, so a later order the game could not take (MISSING) does not stand over it. - **The game keeps no owner with what is asked**: a mission that asks for the very weather type of ours held cannot be told from ours and counts as ours (GAME DECIDES would let it go). A mission's weather of a type when nothing of ours is held is the mission's (MISSION). - WEATHER FIX keeps out while ours is held, under way or being let go. The native's two extra switches are passed as 0, as read (the sky's per-frame flag; zeroing the ground's wetness and puddles). Every place is checked byte by byte at the start; another build, or no hook in the update, gives NOT ACTIVE and nothing is ordered. - `victory-gpu/src/weather.rs` gains the order, the answer and the change; `weatherfix.rs` shares its place checks (`pub(crate)`) and calls `weatherpick::before_update` first; the menu redraws when the hook's answer changes. README: both rows in the F1 guide's WEATHER table and `VICTORY_WEATHER_CHANGE`. ## How it was tested Commit `3de95583` (on `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 `:772`, 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`: the new tests pass: 12 in `weatherpick` (the step logic against a stand-in weather after the title's functions as read: at once, over time, a second weather over one held, the 45 s of letting go and a letting go that did not end, a mission holding or taking the weather, a type not loaded, a script setting only the mix or only the asked state over our change, HELD after MISSING, an image too small left alone), `weather::a_weather_ordered_is_taken_once`, and in `host::menu` `the_weather_rows_offer_what_the_hook_takes` and `a_save_never_writes_the_weather_picked`; the 9 `weatherfix` tests too. Not green overall: the same 9 GPU/WARP tests in `victory-shader` as on the WEATHER FIX branch fail (`victory-shader` unchanged; they fail alone too); `host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end` fails, as it does on unchanged `main` alone on this machine; and `watch::many_askers_tests::no_mapping_is_lost_between_askers` failed in the full run and passed three times out of three when run alone (`watch.rs` is unchanged here). - `cargo build --release --locked -p victory`: succeeds. `cargo xtask policy`: 467 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; there its places were found and it was put in (no NOT ACTIVE). An order carried out by the hook has **not** been seen in a run: there is no "manual weather: asked, changing to, mix before and after" line in the logs. The fixes above (a script over our change, HELD after MISSING) are not in that version's run. 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]>
Two live rows in the F1 menu under WEATHER FIX. MANUAL WEATHER: Left/Right
picks GAME DECIDES (the default) or one of 20 weather types of the game's
weather data (the AM_ types its indirection list leads to, plus a few it has
besides, named after their precipitation, atmosphere, cloud and thunder
modifiers); Enter orders it, and the row's tag says what became of it
(WAITING, CHANGING, HELD, MISSION, MISSING, ENDED). WEATHER CHANGE: at once,
or over 10, 30, 60 seconds (VICTORY_WEATHER_CHANGE, saved). The weather
itself is not saved, as the game's save does not keep one ordered either.

Done the way a mission's script does it, without the game's own cheat (its
"cycle weather" comes only after the story and stops saving and
achievements): in the weather update's hook that WEATHER FIX puts in (the
update's thread), under the script lock, through the set-weather native's
own function 0x143e950f0 with "held" (0x142371e60 at once, 0x142370eb0 over
time); GAME DECIDES through the let-go native's 0x143eb8510, or 0x142370e70
for a change of ours still under way with nothing asked. The look at what is
asked and the call are both under the lock, and the menu stores WAITING
before the order, so the hook's answer is the last word.

What is ours is kept as the game shows it: the type held, the change to it
over what was asked when it began (a second weather over time while one of
ours is held: the game keeps the first asked until the change ends), or the
game's 45 s of letting go where the season's list has no state of the type;
that time is ours too, and if the change ends with ours still asked it is
let go again, so nothing stays asked that the menu cannot let go. Nothing is
done while a mission holds the weather (MISSION); a mission's own weather
later wins and ours is forgotten as it is (ENDED). If a script changes only
the mix or only what is asked while our change still runs, our change is
ended there (0x142370eb0(-1, 0.0, 1), the call the game's own end of every
asking makes), else the game would finish it into a hold of ours that the
menu had forgotten: GAME DECIDES would do nothing and every order would say
MISSION. HELD is said from the game's state when our change comes to, so a
later order the game could not take (MISSING) does not stand over it. The
game keeps no owner with what is asked: a mission asking for the very type
of ours held counts as ours. WEATHER FIX keeps out while ours is held, under
way or being let go; it shares the hook, so this needs it (weatherfix's place
checks are reused, made pub(crate)).

The two switches the native passes are given as 0, as read: the sixth's bit
0 (0x14ab461ac) is asked by the sky's update each frame, the seventh zeroes
the ground's wetness and puddles (0x14ab46220, 0x14ab4622c). Every place is
checked byte by byte at the start; another build, or no hook in the update,
says NOT ACTIVE and nothing is ordered.

Tests (no game data): the step logic against a stand-in weather after the
title's functions as read (at once, over time, a second weather over one
held, the 45 s of letting go and a letting go that did not end, a mission
holding or taking the weather, a type not loaded), an image too small left
alone, a script over our change, HELD after MISSING, the order taken once,
the menu's picks matching the hook's list, and a save never writing the
weather picked. README: the two rows and VICTORY_WEATHER_CHANGE. 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:55 +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/4953/head:github-bot/gh-4952'
git switch 'github-bot/gh-4952'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4952'
git switch 'github-bot/gh-4952'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4952'
git switch 'github-bot/gh-4952'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4952'
git switch 'main'
git merge --squash 'github-bot/gh-4952'
git switch 'main'
git merge --ff-only 'github-bot/gh-4952'
git switch 'main'
git merge 'github-bot/gh-4952'
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!4953
No description provided.