Input: PlayStation button prompts and Settings controller picture, served over the title's reads (VICTORY_FILE_PATCH) #937
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!937
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-937"
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?
@abilliontokens on GitHub · 2026-11-28 09:26 UTC · original
abilliontokens:feat/playstation-prompts→main· +3458 −24 · 26 files · 3 commits · closed without mergingWhat this adds
The Xbox build ships only Xbox button art, so with a PlayStation pad the game still asks for A, B, X and Y. This makes the prompts PlayStation's, and lets the Settings > Controls picture be a DualSense, without writing anything into the game's folder.
VICTORY_PS_PROMPTS=1): at the next start the prompts are built once from the copy being played and kept in the cache. Face buttons become cross/circle/square/triangle, LB/LT/RB/RT become L1/L2/R1/R2, and View becomes the touchpad. The symbols are Kenney's Input Prompts (CC0), drawn inside the game's own button frames, so the look stays the game's.apps/victory/assets/ps5-controller.png, 1024x683, 605 KB). It is the contributor's own work under the repository's licence, and a policy exception inxtask/src/policy.rsgives the reason.VICTORY_PS_PICTURE=<png>, orps5-controller.pngin the home folder, replaces it. It is encoded into the 1024x512 BC7 texture indata\ttdb\ui\platform.ttpf. The built patches (game-derived) are never committed.VICTORY_DUALSENSE: AUTO / WITH XBOX PADS / OFF). Reading the pads over HID is unchanged; this only puts the switch in the menu.VICTORY_FILE_PATCH=<list>: the mechanism under both, usable for mods. Each line of the list is<file name> <offset> <blake3 of the original range> <file with the new bytes>.file_patchindstorage.rsputs those bytes over every DirectStorage read that meets the range. A patch whose hash no longer matches (another game version) is skipped, and the log says so.victory glyphs [--game] [--picture] [--out]builds the same list by hand.Docs:
docs/playstation-prompts.md(switches, list format, log lines, how it works) and a README section.Why patch reads instead of repacking the archive
data.rpf's table is encrypted, and no repacked RPF9 archive has been shown to load in the game. The rebuilt prompt movie therefore keeps its entry's exact compressed length (9,644 bytes): the movie is compressed with zopfli, then padded with stored blocks (victory_formats::zlib_exact). Archive, table and signature stay as the maker wrote them, and only the bytes the title reads from that range differ. The doc has the details and sources.Credits
Ported from Marvisak/VIctory PR #3399 by Anoyarou (GPL-3.0-or-later; co-author on the commit). Prompt symbols: Kenney's Input Prompts (CC0).
How it was checked
On
63b902fplus this commit:cargo test --locked -p victory -p victory-hle -p victory-formats -p victory-gamecargo xtask policydocs/asset-policy.md)cargo clippy --workspace --all-targets -- -D warningsvictory-gpu/src/shadow.rs:1708andvictory-shader/src/emit/mod.rs:2768. Those are existing lints onmain(#86, #265, #665, #687, #705 fix them); this PR touches neither file. On a base with those lints fixed, this same commit was clippy-clean in both builds (plain and--features diagnostics).cargo test -p victory-hle connected_playstation_pads -- --ignoredIn game (1.0.2.1 retail, Windows 11, RTX 5060 Ti 16 GB, diag build):
victory glyphson the realdata.rpf: the prompt entry was rebuilt at exactly 9,644 bytes, and it inflates to a valid movie of the original length (28,148 bytes). The picture texture decodes in an independent TTPF viewer.file patch: applies to this filefordata.rpfandplatform.ttpf, thenfirst read served from it. The title screen and the Settings footer showed △ ▢ ✕. Settings > Control Scheme showed the user's DualSense picture with PlayStation symbols, at 4K output and at 1440p.Not checked: every screen that shows prompts, the 1080to1440 and Series S profiles, and Linux/Wine.
Notes
Cargo.lockgainspngandzopfli, which, as any lock change does, makes the shader cache rebuild once (VICTORY_TRANSLATOR).VICTORY_FILE_PATCHandVICTORY_PS_PICTUREwhen they clear the other switches.@abilliontokens on GitHub · 2026-11-28 09:36 UTC · original
Added in
5b3e566: a DualSense render now ships as the default Settings controller picture (apps/victory/assets/ps5-controller.png, 1024x683 RGBA, 605 KB). It is my own render, released under the repository's licence, and contains nothing from the game. It has an exception entry inxtask/src/policy.rsthat gives the reason, like the BCPack tables.VICTORY_PS_PICTURE, orps5-controller.pngin the home folder, still takes precedence. The patch list now records which picture it was built from (# picture: ...), so changing the picture rebuilds it. The built patches themselves (the rebuilt prompt movie and texture) stay out of the repository: they are derived from the game, which the asset policy forbids, and they are built on the user's machine.Checked:
victory glyphswith no--pictureon the retaildata.rpfbuilds both patches; the texture decodes in an independent TTPF viewer; the glyphs tests (5) and xtask tests pass;cargo xtask policy: 302 files ok.@trustno1-coder on GitHub · 2026-11-28 19:23 UTC · original
Thanks for this. I'm closing it without merging: it adds new dependencies (png, zopfli) that the offline release build doesn't have, a binary asset, and patches to the title's files, and it conflicts with main. If you'd like the prompts change in, a smaller pull request against the current main without new dependencies would be easier to take.
Pull request closed