HLE: VICTORY_KEYS repeats and holds, and VICTORY_KEYS_FILE #3237
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3239"
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 Marvisak/VIctory. Originally posted by EgoraWyn on 2026-11-26T14:15:35Z.
Extends the diagnostic scripted-key list (
VICTORY_KEYS,diagnosticsfeature) incrates/victory-hle/src/modules/gameinput.rs.What
<from>-<to>:<key>holds the key for the whole span.<from>-<to>/<every>:<key>presses it for 0.2 s every<every>seconds in the span.<from>-<to>/<every>+<hold>:<key>holds each press<hold>seconds.<hold>must be > 0 and <<every>, otherwise the entry is rejected.VICTORY_KEYS_FILE=<path>: a key name appended as a new line is pressed once that line appears, so a script that watches the log can press exactly when a screen is ready (Add-Content <path> Enter).Existing
<seconds>:<key>lists parse as before. Nothing changes unless the variables are set.Why
In unattended smoke runs, fixed timestamps either press too early or wait up to a whole period. Hold-to-skip cutscenes need a long press. For example,
2-200/3+2.5:Entersteps through menus and also holds long enough to skip the cutscene.Testing
scripts_repeat_and_hold: covers periods, spans and holds, and rejects a zero hold or a hold >= the period.cargo check -p victory-hlewith and without--features diagnostics: no new warnings.🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by AurumCarlos on 2026-11-26T14:24:53Z.
Review: COMMENTED
Useful for unattended runs. Pulling
parse_script/held_atout of theLazyLockmakes the timing testable, and old<seconds>:<key>lists still give a 0.2 s press. I checked the test rows by hand:5.1hits both5:EnterandDown's fourth period (3.1 % 1 < 0.2),10.05is outside2-10(the end is exclusive), and7/0.1is rejected because its default 0.2 s hold isn't shorter than the period. All as expected.On
VICTORY_KEYS_FILE:1. A line read before it's complete is consumed.
asked()re-reads the file and takeslines().nth(done), butlines()also yields a last line with no trailing newline yet. If the poll happens while a writer is midway through (EntofEnter),key_namedreturnsNone,donestill advances, and that key is never pressed. The log line even says a key "was asked for".Add-Contentusually writes the line and newline together, but an editor or a different script may not. Counting only lines terminated by\n, i.e. takingtext.split_inclusive('\n'), skipping a last piece without'\n', and leavingdonealone in that case, would make this robust.2. Unknown names fail silently. A typo (
enter,Space) is logged as asked and then dropped. Awarn!naming the line whenkey_namedreturnsNonewould save a confusing unattended run.3. Append-only, worth one doc line. Since
doneindexes lines, a script that truncates or rewrites the file (instead of appending) stops all further presses. The doc comment could say "append one line per key".A minor point:
<at>/<every>without a-<to>parses (the span becomesat..at + 0.2 s), so the period never applies. Rejecting a period without a span would catch that mistake too.Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-26T14:23:17Z.
Independent local verification of head
29b45f0on Windows 11, Rust 1.100.0/MSVC:cargo test --locked -p victory-hle --lib -- modules::gameinput::host::scripts_repeat_and_hold --exact— 1 passed, 0 failed (143 filtered).git diff --check <merge-base 940d32f> HEAD— clean.git diff --check origin/main HEADflags an unrelated new blank line at EOF incrates/victory-formats/src/xma/tables.rsfrom newer main, not from this PR.CARGO_TARGET_DIRused.Synthetic
VICTORY_KEYSstring fixtures only; no game assets, extracted data or DRM material used. AI-assisted (Hy4 flash). GPU/driver N/A (CPU-only unit test).Imported from Marvisak/VIctory. Originally posted by evan-kolberg on 2026-11-26T16:20:53Z.
On an M4 Pro with CrossOver 26.3.0.39832, a headless Rust probe read only the first 4,890 characters of a generated 37,658-character ASCII
VICTORY_KEYSvalue. Both the reported length and the digest matched that exact prefix. Equivalent schedules of 18,464 characters in the existing pulse format and 404 characters in a duration encoding both arrived byte-for-byte. This matches the 16-bit byte count in Wine 11's environment query and gives a practical use for @EgoraWyn's compact hold ranges.Prepared and tested with Codex.
Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-27T23:02:57Z.
NVIDIA full-suite run, to go with the reports above by cloph-dsp, since none of them names a GPU run. Tested exact head
29b45f0(on its base940d32f).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 697 passed, 0 failed, 10 ignored.scripts_repeat_and_hold.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
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.