F1 menu: GAME SETTINGS, the game's own settings.xml with its ranges, steps and defaults #4935
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!4935
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4934"
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?
@NICKNAMErutschovkonikovan on GitHub · 2026-12-01 14:35 UTC · original
NICKNAMErutschovkonikovan:pr/game-settings→main· +2447 −10 · 7 files · 3 commits · openWhat it changes
Adds an F1 line, GAME SETTINGS (
ENTER OPENS, under the Series X/S picture lines). It opens a page with the game's own options, read from and written to<data>\<title id>\storage\settings\settings.xml(new modulecrate::game_settings). The page follows the F1 menu's #4635 look in the same way as KEY BINDINGS: a title, a help line, a divider, label/value rows with the row highlight, and a footer with three about lines, the note and REPO. It is a new branch inrender_menu.min + k * step, which ends atmaxand gives the same values both ways (for exampleframeRateLimit: 0, 30, … 120, 144). Enter opens a typed input. The input takes digits, a leading minus only where the range goes below zero, and one point in a decimal, with at most six places. A comma is refused rather than read as a point. Where the step is the title's own, a value between two steps is refused. Esc cancels the input. A controller's A on a number does not open an input, because a controller cannot type; it changes numbers with Left/Right.SPECS,Bound). The footer shows the range and where it comes from. That is the title's limits, or those limits started at the title's default where the default lies below the title's own minimum (twotexLodScale_Mat_*), or assumed (decorationResolutionShift). It also shows whether the step is the title's or ours, and the default.<taa value="High" />, not as a number. In all 257 XML files of the game's data written by the same RAGE parser, an enum member is always its value's name: mostly element text (<MotivationType>FearMotivation</MotivationType>), sometimes the attribute (<eGroundProbeSampleType value="GroundProbeSampleType_Spline" />,common\00223000.xml). No enum anywhere has a numeric value, and a realsettings.xmlholds no enum member at all, so a number would most likely be ignored. The names (Low, Medium, High, Ultra, Custom, Special) belong to the quality enumaae5818c: their case-kept hashes are in the default instance's enum list, and the lower- and upper-case variants are not. Reading accepts the name as an attribute or as element text, and a number (as the first commit wrote). SAVE and the start rewrite such numbers as names.settings.xmldoes not hold, as named levels within the title's own range only. A setting not in the file shows the title's default and is taggedDEFAULT. Stepping round back to the default is not a change. A level in the file outside the title's enum (from a file made elsewhere) is read as not there. SAVE adds only the ones that changed, each in its group. RESET ADVANCED takes all of them out again. Whether the game reads them from the file is not tested, and the footer says so.settings.xml.victory-backup. If any step fails, the file stays as it was. It never writes text that does not parse back as the game's settings file, including empty text.victory-game-settings.txtbesidevictory-settings.txt, even with PERSISTENT off.run.rswrites those recorded values back intosettings.xmlafter the save import, because the game rewrites the whole file when it saves its own settings. The console line names the file.VICTORY_GAME_SETTINGS_KEPT=0skips this for one start; turning PERSISTENT off or deleting the file ends it. Avictory-game-settings.txtthat exists but cannot be read is reported and left alone, never treated as empty.uiOverlay,uiResolution,resolutionFullscreen,fsrQuality,videoCardDescription), nor bookkeeping values.The digit, minus, point, comma and Backspace keys are now watched too. They are dropped everywhere except in this page's input. The menu's own settings file is now located through
game_settings::menu_file(), using the same lookup as before, so the recorded values sit beside it. README: a GAME SETTINGS row and section under PICTURE, plus rows forVICTORY_MENU_GAME_SETTINGSandVICTORY_GAME_SETTINGS_KEPT.Asset policy: please decide
The numbers in
SPECS,BoundandADVANCED(each option's minimum, maximum, step and default, and which ADVANCED levels exist) were read once from the game's executable: they are its settings parser's limits. Only those numbers and the setting names are in the source. There are no bytes, disassembly or files from the game. Six of the ADVANCED names (ambientLightingQuality,directionalShadowQuality,hairSimulationQuality,terrainQuality,imposterQuality,waterTessellationQuality) are not in any file. They are names whose hash matches one the executable uses, and the page says "NAME GUESSED" for them. The values seen in two realsettings.xmlfiles (one Series X, one Series S data folder) appear as comments. I am saying this openly so you can decide whether it fitsdocs/asset-policy.md. If it does not, the ranges can fall back to assumed ones and ADVANCED can be dropped.How it was tested
settings.xmlfrom F1.98d84fc1):cargo clippy --workspace --all-targets --locked -- -D warningsreports only the 5 errors already onmain(5fabb46e):host/font.rs:213,:260(too_many_arguments),host/menu.rs(manual_is_multiple_of, at :680 here, :667 on main),host/panel.rs:602,:668(collapsible_if). With those three lints allowed, the whole workspace is clean.cargo test -p victory-gpu --lib --locked -- game_settings menu --test-threads=1: 29 passed (17 ingame_settings, 11 inhost::menu::game, 1 insave_share). None of them need game files; they use temp folders. They cover:game_settings::tests::a_real_settings_file_reads_back_byte_for_bytereads a realsettings.xmlfromVICTORY_TEST_GAME_SETTINGS_XML. When that variable points at a real file, the test checks every offered option and that setting each to itself changes no byte. It returns early when the variable is unset, which it was in this run.7b8c1ec9),cargo test --workspace --locked --no-fail-fastshowed 10 failures outside this change:host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_endand 9 GPU-reference tests invictory-shader(emit::intersect_tests×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). The same 10 also fail on a cleanorigin/main(5fabb46e) on this machine, andvictory-shaderdoes not depend onvictory-gpu.cargo build --release --locked -p victory: succeeds.cargo xtask policy: 466 files ok.cargo testpassed for the crates it touches: yes for this change's tests. The pre-existing machine-specific failures are listed above.Checked for overlap
🤖 Generated with Claude Code
Review fixes to the page and game_settings.rs: - Doc::insert/remove change a copy and swap it in only when it parses again; before, a failed re-parse left an empty document that SAVE then wrote as a 0-byte settings.xml ("1 SAVED"). write_xml refuses any text Doc::parse does not read (an empty one too). - SAVE and RESET ADVANCED read the file again and work on that (the game may have written it since the page opened), count only values that went in, put only those into the kept file, and touch the page's copy only after the write succeeded. - write_atomic flushes the new file (File::create, write_all, sync_all) before the rename. - An ADVANCED level outside the enum in the file (taa="9", a file from elsewhere) is read as not there instead of indexing LEVELS out of bounds; ADVANCED offers only the title's own levels (no CUSTOM/SPECIAL beyond its maximum); stepping back to the default of a setting the file lacks is no change. - Kept::read returns a read error instead of an empty file, whose write would drop every kept value. - The start names victory-game-settings.txt in its console line, and VICTORY_GAME_SETTINGS_KEPT=0 skips writing the kept values for one start (README: the page, the file, the switch). - Slider steps run on the grid min + k * step, ending at max, the same both ways (frameRateLimit 0, 30, ... 120, 144); a typed value between two of the title's own steps is refused (ONLY STEPS OF ...). - Page::open tells a missing file from one that cannot be read; the warning before leaving is cleared with its note; a controller's A on a number opens no input it cannot fill. - The footer says where a range comes from, the title's own minimum where the range starts at its default below it; the stale range comment in SPECS is corrected. Tests (no game files): a failed write keeps the old file, a file without a final line end, an out-of-enum level, slider steps anchored at the minimum, SAVE onto a file the game changed, the kept file's read error, off-step typing, the pad and the warning. Co-Authored-By: Claude Opus 5.5 <[email protected]>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.Merge
Merge the changes and update on Forgejo.