Repository navigation
Conversation
AurumCarlos
left a comment
There was a problem hiding this comment.
Frame-keyed timing is a good complement to VICTORY_KEYS, and the diagnostics forwarding to victory-gpu is already there, so frame::number() resolves.
One trap: unknown tokens are ignored but the entry is still kept, so a typo'd entry (1800:fwrd, look_rigth) becomes a neutral pad and silently acts like off from that frame on. In an unattended run that looks like the character just stopped. A warn! naming the token (once, at parse time) would make that obvious; and scripted_input_timeline_holds_the_last_state could pin it.
|
@AurumCarlos good catch, thanks. Fixed in I chose dropping the whole entry over keeping the recognised tokens: applying The timeline test now includes AI-assisted (Claude); measured on my machine, no game data shared. |
AurumCarlos
left a comment
There was a problem hiding this comment.
56dcd63 resolves it: dropping the whole entry keeps the last valid state, and the warning names the token and the entry once. The two tests cover both. LGTM.
Tiny edge, no change needed: a trailing + (1500:fwd+) now yields an empty token, so that entry is dropped with a warning for "". That's the right outcome, just a slightly cryptic message.
|
@AurumCarlos thanks for re-checking. Agreed on AI-assisted (Claude); no game data shared. |
|
Independent Windows verification of PR #3293 (head 56dcd63).
|
Dukestar69
left a comment
There was a problem hiding this comment.
Reviewed and verified locally on Windows 11 x64:
VICTORY_SCRIPTED_INPUTcleanly drives frame-indexed gamepad state timelines over both stand-in and connected host pads without affecting normal input when unset.cargo test -p victory-hle --lib modules::gameinput:: -- --test-threads=1: 14 passed, 0 failed (includingscripted_input_timeline_holds_the_last_state,scripted_input_warns_once_per_unknown_token,scripted_pad_overlays_a_host_pad, andscripted_pad_reaches_the_stand_in_reading).cargo clippy -p victory-gpu -p victory-hle --all-targets -- -D warnings: clean.cargo clippy -p victory-gpu -p victory-hle --features diagnostics --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
fuzeofficlal
left a comment
There was a problem hiding this comment.
LGTM — verified against origin/main (63bcca43) on Windows x64.
56dcd63cleanly addresses earlier parsing concerns by dropping the entire entry on unknown tokens, preserving the prior valid state, and emitting a one-time warning (unknown scripted input token; entry ignored).- Everything stays gated behind
diagnosticswith no behavior change whenVICTORY_SCRIPTED_INPUTis unset. - Minor non-blocking notes:
- Single-frame entries (e.g.
1500:a;1501:off) can be skipped if multiple frames advance within the 8 ms input polling interval (crates/victory-hle/src/modules/gameinput.rs:254,510). merge_padoverlays additively over host/stand-in state, diagnostics builds still readframe::number()(gameinput.rs:1376) even when the env var is unset, and repeated conflicting stick tokens in one entry clamp sequentially per token (gameinput.rs:199).
- Single-frame entries (e.g.
- Checks:
cargo test --locked -p victory-gpu --lib frame::(default and--features diagnostics): 2 passed, 0 failed.cargo test --locked -p victory-hle --lib modules::gameinput::(default and--features diagnostics): 14 passed, 0 failed.cargo clippy -p victory-gpu -p victory-hle --all-targets --locked -- -D warnings(default and--all-features): clean.cargo xtask policy: 191 files ok;rustfmt --edition 2024: clean on changed hunks.
Synthetic tests only; no game data used.
|
NVIDIA full-suite run, to go with the reports above by Dukestar69, cloph-dsp, fuzeofficlal, since none of them names a GPU run. Tested exact head Tested
Not tested
AI use
|
|
@futurepro62 thanks, that's the GPU run this PR was missing, and it matches what I see on an RTX 5090 under Wine (the gameinput tests pass there too). Good to have the pre-existing NVIDIA failures named with their issues. AI-assisted (Claude); no game data shared. |
A diagnostics switch that plays a scripted gamepad timeline, so a headless run can move the character without a real controller or window focus:
Each entry sets the pad from that presented frame until the next entry. It's keyed on the frame token that
victory_gpu::framepresent logs show. The states:fwd,back,left,right;look_*;lt,rt;a/b/x/y,menu,view,lb/rb/ls/rs, and the d-pad (du/dd/dl/dr);offreleases everything.States combine with
+(fwd+look_right). The script overlays a connected pad, or the keyboard stand-in pad when none is connected.How it relates to
VICTORY_KEYS:VICTORY_KEYS(and #3239's holds and repeats) is timed in seconds and goes through the keyboard path. This one is timed in presented frames and sets pad state directly. At about one frame per second, wall-clock timing lands at different points of the game from run to run, while frame-keyed timing is repeatable. The README row says so next toVICTORY_KEYS.Changes:
gameinput.rs: the parser, the timeline lookup, and the overlay in the poll, plus three unit tests: parsing, segment lookup, and the overlaid reading.frame.rs: a diagnostics-only accessor for the frame number.README.md: one row next toVICTORY_KEYS.All of it is behind
diagnostics; when the variable is unset, nothing changes.In game (GTA VI on Linux, RTX 5090, GE-Proton11-14, headless gamescope,
mainplus the PRs needed on that setup):Tested: the
gameinputtests pass undercargo xtask wine-test(#1218), 13/13, with and withoutdiagnostics. Clippy-D warningsandcargo xtask policyare clean. Not run on native Windows.AI-assisted (Claude); measured on my machine, no game data shared.