Tools: victory-probe holds the world clock for comparable runs, and bench.ps1 runs them unattended #2340

Closed
RomanFama592 wants to merge 2 commits from upstream-pr/2340 into main
RomanFama592 commented 2026-11-29 12:08:45 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T12:08:45Z.


The time of day decides how much an 8 GB card holds and draws, so A/B runs taken at different in-game hours are not comparable. On an RTX 4060 Ti 8 GB the same spot ran at about 16 fps at night and 6 fps at noon (GPU 55 → 156 ms a frame), and an overnight run of seven builds came out up to 3x slower in its second round for every build, the base included. This adds a way to hold the world clock, on anyone's copy of the title and without storing anything of it, and the unattended run script that uses it. Details in docs/victory-probe.md.

What it changes

tools/victory-probe (a new workspace binary, Windows only; nothing else depends on it). It attaches to the running victory*.exe, finds the title's image (the loader's victory-image-* module) and reads or writes words of the title's memory:

  • find clock: watches the image's writable memory for words that only ever step up one minute at a time, ranks those with an hour (and a date) beside them first, then tells the source apart from its copies: each likely copy is moved 30 minutes, and the one that keeps the value and that the others follow is the one the title reads (the copies are rewritten from it every frame, so holding a copy holds nothing). It prints the two set lines.
  • time HH:MM, hold HH:MM (set and hold until the game ends), hold-args HH:MM (the --set lines for the layer's own hold), menu (a console menu), serve <file> (commands appended to a file, for scripts).
  • find pos <keys file> (the player's position, read only, found by walking the player through VICTORY_KEYS_FILE), pos, spot <name>; a generic scan start|next|show and read/write.
  • Nothing of the title is stored (docs/asset-policy.md): what it finds goes to %LOCALAPPDATA%\victory\probe\probe.cfg.

VICTORY_IMAGE_HOLD_AFTER_S=<seconds> (victory-hle image_watch.rs): the existing VICTORY_IMAGE_HOLD can start that long after the title's start, so a run can hold the clock with no other program. Unset: as before, at once.

tools/bench.ps1: unattended runs, one variant after another (name[@exe][=VAR=VALUE;…], -Repeats), each started with a keys file, Continue pressed until the world draws, -Clock HH:MM held once the world is loaded, a fixed route (standing with the camera turning, then a short walk), a clean close with the window's close command, and medians of fps, CPU preparing time, GPU time, VRAM past the budget, dropped draws and refused first uploads appended to bench\results.csv, plus two screenshots per run.

docs/victory-probe.md, linked from the README's docs list.

Not included: writing the position does not move the player (the copies found are put back within about two seconds; the physics keeps its own), so there is no teleport.

How it was tested

  • RTX 4060 Ti 8 GB, Ryzen 9 5900X, 64 GB, Windows 11 26300; Series X, 1080p to 1440p, DLSS balanced.
  • find clock 60 in the world: the minute and hour found, the source told apart from three copies (the copies were put back, the source kept the value and the three followed). hold 12:00 kept the clock at 12:00 for the whole check while the copies followed; the light changed from night to noon.
  • tools/bench.ps1 -Clock 12:00: 14 runs of seven variants unattended, each closed cleanly. While writing this up I found that the first version held a copy rather than the source, so those runs were not truly held; the probe now checks for that.
  • The probe was run against a build of 568c5e5: builds of current main stop at start on this PC (0x80000003 in System Init, like #2081/#2055). For the same reason VICTORY_IMAGE_HOLD_AFTER_S was checked by its unit test (the_hold_waits_as_long_as_asked) and not in a run.
  • cargo test -p victory-probe and cargo test -p victory-hle --lib image_watch pass; cargo clippy -p victory-probe --all-targets has no findings (the workspace has older warnings in other crates). cargo xtask policy reports only an existing file (crates/victory-loader/src/heap_sites/frame_users.rs).

Checked for overlap

  • I searched the open pull requests and issues for clock, time of day, image hold and bench tools. VICTORY_IMAGE_HOLD already exists in image_watch.rs; this adds the delay and a way to find the words. Related: #1944 (the 8 GB work these runs are for), #1962 (an 8 GB test matrix that needs comparable runs).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5550555785 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2340). Originally posted by [RomanFama592](https://github.com/RomanFama592) on 2026-11-29T12:08:45Z. --- The time of day decides how much an 8 GB card holds and draws, so A/B runs taken at different in-game hours are not comparable. On an RTX 4060 Ti 8 GB the same spot ran at about 16 fps at night and 6 fps at noon (GPU 55 → 156 ms a frame), and an overnight run of seven builds came out up to 3x slower in its second round for every build, the base included. This adds a way to hold the world clock, on anyone's copy of the title and without storing anything of it, and the unattended run script that uses it. Details in `docs/victory-probe.md`. ## What it changes **`tools/victory-probe`** (a new workspace binary, Windows only; nothing else depends on it). It attaches to the running `victory*.exe`, finds the title's image (the loader's `victory-image-*` module) and reads or writes words of the title's memory: - `find clock`: watches the image's writable memory for words that only ever step up one minute at a time, ranks those with an hour (and a date) beside them first, then tells the source apart from its copies: each likely copy is moved 30 minutes, and the one that keeps the value and that the others follow is the one the title reads (the copies are rewritten from it every frame, so holding a copy holds nothing). It prints the two `set` lines. - `time HH:MM`, `hold HH:MM` (set and hold until the game ends), `hold-args HH:MM` (the `--set` lines for the layer's own hold), `menu` (a console menu), `serve <file>` (commands appended to a file, for scripts). - `find pos <keys file>` (the player's position, read only, found by walking the player through `VICTORY_KEYS_FILE`), `pos`, `spot <name>`; a generic `scan start|next|show` and `read`/`write`. - Nothing of the title is stored (docs/asset-policy.md): what it finds goes to `%LOCALAPPDATA%\victory\probe\probe.cfg`. **`VICTORY_IMAGE_HOLD_AFTER_S=<seconds>`** (`victory-hle` `image_watch.rs`): the existing `VICTORY_IMAGE_HOLD` can start that long after the title's start, so a run can hold the clock with no other program. Unset: as before, at once. **`tools/bench.ps1`**: unattended runs, one variant after another (`name[@exe][=VAR=VALUE;…]`, `-Repeats`), each started with a keys file, Continue pressed until the world draws, `-Clock HH:MM` held once the world is loaded, a fixed route (standing with the camera turning, then a short walk), a clean close with the window's close command, and medians of fps, CPU preparing time, GPU time, VRAM past the budget, dropped draws and refused first uploads appended to `bench\results.csv`, plus two screenshots per run. **`docs/victory-probe.md`**, linked from the README's docs list. Not included: writing the position does not move the player (the copies found are put back within about two seconds; the physics keeps its own), so there is no teleport. ## How it was tested - RTX 4060 Ti 8 GB, Ryzen 9 5900X, 64 GB, Windows 11 26300; Series X, 1080p to 1440p, DLSS balanced. - `find clock 60` in the world: the minute and hour found, the source told apart from three copies (the copies were put back, the source kept the value and the three followed). `hold 12:00` kept the clock at 12:00 for the whole check while the copies followed; the light changed from night to noon. - `tools/bench.ps1 -Clock 12:00`: 14 runs of seven variants unattended, each closed cleanly. While writing this up I found that the first version held a copy rather than the source, so those runs were not truly held; the probe now checks for that. - The probe was run against a build of `568c5e5`: builds of current `main` stop at start on this PC (`0x80000003` in System Init, like #2081/#2055). For the same reason `VICTORY_IMAGE_HOLD_AFTER_S` was checked by its unit test (`the_hold_waits_as_long_as_asked`) and not in a run. - `cargo test -p victory-probe` and `cargo test -p victory-hle --lib image_watch` pass; `cargo clippy -p victory-probe --all-targets` has no findings (the workspace has older warnings in other crates). `cargo xtask policy` reports only an existing file (`crates/victory-loader/src/heap_sites/frame_users.rs`). ## Checked for overlap - [x] I searched the open pull requests and issues for clock, time of day, image hold and bench tools. `VICTORY_IMAGE_HOLD` already exists in `image_watch.rs`; this adds the delay and a way to find the words. Related: #1944 (the 8 GB work these runs are for), #1962 (an 8 GB test matrix that needs comparable runs). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WiREjB6TQEQ2QzFVNzZKGS
Yuanzer commented 2026-11-29 17:04:23 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yuanzer on 2026-11-29T17:04:23Z.


Independent validation on the current main 829188e9 and title 1.0.2.1 (AI-assisted local test), which the PR notes could not be run on its author's current-main build:

  • i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40; Windows 11.
  • victory-probe find clock 60, while the title stood in the opening world, found the source as minute img+0xab5cdd4 and hour img+0xab5cdd0.
  • victory-probe hold 12:00 then held the clock across four complete game runs (two baseline and two #1944 candidate runs). The hold process remained alive through each run, and 12:00 produced stable, much narrower frame-time distributions than the unclocked runs.
  • Nothing of the title was copied or stored; only the two offsets are in the local probe config.

One discrepancy: the docs' introduction says what find clock finds is kept in probe.cfg, but the find command did not create that file here. hold-args 12:00 failed until I manually added hour and minute from its printed set lines. If persistence is intended, find_clock cannot currently do it because it receives only Proc, not Cfg; either persist on discovery or adjust the wording to say the printed set commands must be run.

Aside from that, the tool did exactly what the 8 GB A/B needed.

Observed locally on behalf of the reporter; analysis is AI-assisted.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7259399000 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2340#issuecomment-7259399000). Originally posted by [Yuanzer](https://github.com/Yuanzer) on 2026-11-29T17:04:23Z. --- Independent validation on the current main `829188e9` and title 1.0.2.1 (AI-assisted local test), which the PR notes could not be run on its author's current-main build: - i7-14700KF, 32 GB RAM; RTX 5060 Ti 8 GB, driver 621.40; Windows 11. - `victory-probe find clock 60`, while the title stood in the opening world, found the source as **`minute img+0xab5cdd4`** and **`hour img+0xab5cdd0`**. - `victory-probe hold 12:00` then held the clock across four complete game runs (two baseline and two #1944 candidate runs). The hold process remained alive through each run, and 12:00 produced stable, much narrower frame-time distributions than the unclocked runs. - Nothing of the title was copied or stored; only the two offsets are in the local probe config. One discrepancy: the docs' introduction says what `find clock` finds is kept in `probe.cfg`, but the find command did not create that file here. `hold-args 12:00` failed until I manually added `hour` and `minute` from its printed `set` lines. If persistence is intended, `find_clock` cannot currently do it because it receives only `Proc`, not `Cfg`; either persist on discovery or adjust the wording to say the printed `set` commands must be run. Aside from that, the tool did exactly what the 8 GB A/B needed. *Observed locally on behalf of the reporter; analysis is AI-assisted.*
Yuanzer commented 2026-11-29 17:58:47 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yuanzer on 2026-11-29T17:58:47Z.


Validation of f0f9397c on Windows 11, title 1.0.2.1, i7-14700KF / RTX 5060 Ti 8 GB:

  • I ran the game in the world and gave the new probe a temporary, empty LOCALAPPDATA so the test could not use my existing probe.cfg.
  • victory-probe find clock 60 reported minute img+0xab5cdd4 and hour img+0xab5cdd0.
  • It created victory\probe\probe.cfg by itself, containing exactly those two lines.
  • Running victory-probe hold-args 12:00 immediately afterward, with nothing added manually, exited 0 and printed:

--- output ---
--set VICTORY_IMAGE_HOLD=hour=ab5cdd0:4=12,minute=ab5cdd4:4=0 --set VICTORY_IMAGE_HOLD_AFTER_S=120

So the defect I reported on the previous head is fixed, including the no-existing-config case.

One stale help line remains in HELP:

--- old line ---
victory-probe find clock [secs] the minute and hour (then set minute, set hour)

It now saves them automatically, so that parenthetical should be removed or changed to "saved in probe.cfg"; otherwise it still documents the old workflow. victory-probe help reports no checks for this branch, so I could not use CI to cover that wording.

Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7260112623 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2340#issuecomment-7260112623). Originally posted by [Yuanzer](https://github.com/Yuanzer) on 2026-11-29T17:58:47Z. --- Validation of f0f9397c on Windows 11, title 1.0.2.1, i7-14700KF / RTX 5060 Ti 8 GB: - I ran the game in the world and gave the new probe a temporary, empty LOCALAPPDATA so the test could not use my existing probe.cfg. - victory-probe find clock 60 reported minute img+0xab5cdd4 and hour img+0xab5cdd0. - It created victory\probe\probe.cfg by itself, containing exactly those two lines. - Running victory-probe hold-args 12:00 immediately afterward, with nothing added manually, exited 0 and printed: --- output --- --set VICTORY_IMAGE_HOLD=hour=ab5cdd0:4=12,minute=ab5cdd4:4=0 --set VICTORY_IMAGE_HOLD_AFTER_S=120 ---------------- So the defect I reported on the previous head is fixed, including the no-existing-config case. One stale help line remains in HELP: --- old line --- victory-probe find clock [secs] the minute and hour (then `set minute`, `set hour`) ---------------- It now saves them automatically, so that parenthetical should be removed or changed to "saved in probe.cfg"; otherwise it still documents the old workflow. victory-probe help reports no checks for this branch, so I could not use CI to cover that wording. *Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.*
RomanFama592 commented 2026-11-29 19:09:49 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T19:09:49Z.


Closing this as superseded by #2825 (victory-probe-mod), to keep the queue clean. That PR does what this tool was for from inside the title's process, and adds teleports, a fixed camera per place and unattended test plans with reports:

  • Holding the clock: freeze on (menu, command or plan step) holds the world clock from the mod itself, so the layer switch added here (VICTORY_IMAGE_HOLD / VICTORY_IMAGE_HOLD_AFTER_S in image_watch.rs) is not carried over.
  • Finding the clock on another build: the same search as victory-probe find clock (the stepping minute, the hour before it, the 30-minute move that tells the title's copy apart), saved into the mod's per-build mod.cfg. It is being folded into #2825 as find clock [seconds].
  • Unattended runs: run-bench.ps1 (variants as exes and/or switches, repeats in A B A B order, the warm-up restart, a side-by-side summary) takes over from bench.ps1. It is also being folded into #2825.

@Yuanzer, thank you for both validations. The words you found on the RTX 5060 Ti (hour img+0xab5cdd0, minute img+0xab5cdd4) are the ones built into #2825. The stale help line you pointed out goes away with this PR; #2825's guide describes find clock as saving what it finds.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7261058982 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2340#issuecomment-7261058982). Originally posted by [RomanFama592](https://github.com/RomanFama592) on 2026-11-29T19:09:49Z. --- Closing this as superseded by #2825 (victory-probe-mod), to keep the queue clean. That PR does what this tool was for from inside the title's process, and adds teleports, a fixed camera per place and unattended test plans with reports: - **Holding the clock:** `freeze on` (menu, command or plan step) holds the world clock from the mod itself, so the layer switch added here (`VICTORY_IMAGE_HOLD` / `VICTORY_IMAGE_HOLD_AFTER_S` in `image_watch.rs`) is not carried over. - **Finding the clock on another build:** the same search as `victory-probe find clock` (the stepping minute, the hour before it, the 30-minute move that tells the title's copy apart), saved into the mod's per-build `mod.cfg`. It is being folded into #2825 as `find clock [seconds]`. - **Unattended runs:** `run-bench.ps1` (variants as exes and/or switches, repeats in A B A B order, the warm-up restart, a side-by-side summary) takes over from `bench.ps1`. It is also being folded into #2825. @Yuanzer, thank you for both validations. The words you found on the RTX 5060 Ti (`hour img+0xab5cdd0`, `minute img+0xab5cdd4`) are the ones built into #2825. The stale help line you pointed out goes away with this PR; #2825's guide describes `find clock` as saving what it finds.
RomanFama592 commented 2026-11-29 23:43:21 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-11-29T23:43:21Z.


A correction to the note above: find clock is not in #2825 yet. In this title the clock words are written back from another value, so its test (move the minute alone and see whether it stays) picks the wrong word. Until that is solved, #2825's watch command finds the offsets; the rest of this PR (holding the clock, the unattended bench) is there.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7264675972 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2340#issuecomment-7264675972). Originally posted by [RomanFama592](https://github.com/RomanFama592) on 2026-11-29T23:43:21Z. --- A correction to the note above: `find clock` is not in #2825 yet. In this title the clock words are written back from another value, so its test (move the minute alone and see whether it stays) picks the wrong word. Until that is solved, #2825's `watch` command finds the offsets; the rest of this PR (holding the clock, the unattended bench) is there.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

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