Scenario benchmark: the title drives and fights by itself, measured unattended (scripts\autotest.ps1, script commands from our side, build 1.0.2.1) #4941
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4941
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4940"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@bentsignal on GitHub · 2026-12-01 14:55 UTC · original
bentsignal:scenario-bench→main· +4204 −3 · 14 files · 3 commits · openWhat it changes
A benchmark for A/B measurements that needs nobody at the PC and repeats:
scripts\autotest.ps1 -Scenario drive-downtown-calmboots the title from a fixed save, and once the world is live starts a scenario through the title's own script
commands: the player is seated in his car and the title's own driving task takes it round a loop of downtown streets
through its traffic (or over the bridges and the highway, or 8 armed peds fight around him). Every frame of a fixed window
is measured, and the run is checked for validity (still in his car, alive, not wrecked, not standing). The car, its
physics, the route, the traffic, the AI and the streaming are the title's; recorded pad input could not do that (a
replay parts from its recording within seconds, and a walk never reaches downtown traffic).
Nothing changes for players: every part is off unless its switch is set, and only the runner sets them.
Layer (Rust):
crates/victory-loader/src/script_calls.rs(+direct.rs,legs.rs): withVICTORY_TITLE_HOOKS=<file>the title'sscript machine's one call of a command's handler goes through us (a call-site redirect, bytes checked first; another
build is refused and nothing is changed). There the lines of
VICTORY_SCRIPT_CALLS_FILErun on the title's scriptthread between two of its commands: commands and actions named in the hooks file,
every(the title's "this frame"commands held),
until(wait for a result),legs(a route handed to the title's go-to driving a leg at a time),call(a title function the file names, bytes checked before every call).VICTORY_NATIVE_CENSUS=<file>counts everycommand the title's scripts call, to find new ones. Called from
run.rsnext towrite_sites::apply_asked.host.rs:VICTORY_SCENE_FILE(the first second with 1000+ draws a frame: "scene live", logged and written as a Unixms time, which the runner times everything from) and
VICTORY_FRAME_TIMES_FILE(every present interval, a line asecond, for exact percentiles over any window).
xgamesave.rs:VICTORY_SAVES_READONLY=1gives the title a throwaway copy of its saves (ofVICTORY_SAVES_FROM, underVICTORY_SAVES_THROWAWAY): every run starts from the same save and its autosaves never reach the real ones.Runner and data:
scripts\autotest.ps1(runsvictory play <exe> --set ..., presses Enter through the menus, writes the command linesas the run goes, takes shots, summarises),
scripts\issue-scenarios.ps1(worst-case places, night and rain; not forA/B). A machine-wide lock (
Global\victory-autotest) queues runs from several checkouts.scripts\bench\title-hooks.toml: the commands' places for game_scarlett_master.exe 1.0.2.1 only, checked by bytes.scripts\bench\spots.toml: places, routes and scenario presets in that build's world. Values are places, our own namesand short byte signatures (as
victory-loader'sscenes.rshas);cargo xtask policypasses.docs/benchmark.md: setup, scenarios, validity, how the commands are called, credits.Credits: the commands' places in this build and their argument layouts come from the tables of modpapi/scripthook-vi,
ifBars/palmhook, viper-community/viper and fraustiz/fro-trainer (facts only; none of their code is here).
How it was tested
GPU and profile: RTX 5070 Ti 16 GB, Ryzen 9 9900X, Windows 11, title 1.0.2.1; Series X 1440p, DLSS Quality, no frame
generation, no frame cap:
victory play's defaults. Release build of this branch on5fabb46e(in the runs belowmerged with one other, off-by-default change whose switches were off in these runs).
7 runs of
-Scenario drive-downtown-calmwith nothing else set, 2026-12-01, over ~1.5 hours with other test runsbetween them: every run valid (in his car, alive, never stood), the car moved 2-3 s after the order and drove 830 m in the 75 s window. Run to run:
Six of seven within 22.4-23.3 fps and 450-495 frames over 50 ms; one run 10% slower. So: A B B A, three or four runs
a side. One error line in every run's log: Streamline's "presentCommon() was not observed" notice.
Launch to the measured window ~50 s (boot to scene live ~21-25 s, the car carried downtown and ordered 25 s after live);
a run ~2.5 min.
cargo test --locked -p victory-loader(83 passed; script_calls' own: the stub, argument slots, rooms,every,hooks files, legs, direct calls),
cargo test --locked -p victory-hle --lib xgamesave(17 passed),cargo xtask policy(ok).
cargo clippy --workspace --all-targets --locked -- -D warningsfails onmainalready (host/font.rstoo_many_arguments x2, host/menu.rs manual_is_multiple_of, host/panel.rs collapsible_if x2, from #4635); with those
three lints allowed it passes with this branch.
1 run of
-Scenario fight-calm: valid, 8 fighters made (10 with replacements, 0 refused), 28.9 fps, p50 34.2 ms, p8543.5, p99 65.8, 108 frames over 50 ms, submitting thread 30.9 ms, 5,835 draws a frame; launch to the measured window
39 s, the run 84 s.
Not tested on this branch: the spots, teleport drives and issue scenarios (they ran on our fork for two days with the
same code), other builds of the title (refused by design), AMD cards, Series S, frame generation on.
Size
~4,100 lines, most of them the runner script (970), the data files (910) and
script_calls.rs(1,330). It splitscleanly if that is easier to review: (1) the layer support (script calls, scene-live and frame-times files, throwaway
saves: ~1,850 lines of Rust, nothing on without a switch), then (2) the runner, data and docs (~2,350).
Checked for overlap
(victory-probe-mod: a mod DLL with teleports, a held clock and unattended test plans, by debug-register breakpoints,
outside the workspace). This one is in the layer (one call-site redirect, off without its switch) and has the title's
own driving and combat tasks do the moving, which is where frames are worst; the two do not touch the same files.
scripts\bench.ps1measures the free-roaming world from frame lines and is left as it is.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.