HLE: VICTORY_KEYS repeats and holds, and VICTORY_KEYS_FILE #3239
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3239
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@EgoraWyn on GitHub · 2026-11-26 14:15 UTC · original
EgoraWyn:victory-keys-repeat-hold→main· +174 −31 · 1 files · 1 commits · openExtends 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
@cloph-dsp on GitHub · 2026-11-26 14:23 UTC · original
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).@AurumCarlos on GitHub · 2026-11-26 14:24 UTC · original · reviewed
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.@evan-kolberg on GitHub · 2026-11-26 16:20 UTC · original
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.
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.