F1 menu: GAME SETTINGS, the game's own settings.xml with its ranges, steps and defaults #4934
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by NICKNAMErutschovkonikovan on 2026-12-01T14:35:44Z.
What 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 #4634 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
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.