Repository navigation
Input: PlayStation button prompts and Settings controller picture, served over the title's reads (VICTORY_FILE_PATCH) - #937
Conversation
… patches - VICTORY_PS_PROMPTS=1 (F1: PLAYSTATION BUTTON ICONS): the game's prompt movie in data.rpf gets PlayStation symbols in its own button frames, rebuilt to its exact entry size (9644 bytes, zopfli), built once at start into the cache - Settings > Controls picture from a user PNG (VICTORY_PS_PICTURE, else ps5-controller.png in the home folder), BC7 into platform.ttpf - VICTORY_FILE_PATCH: blake3-guarded byte ranges served over DirectStorage reads; no game file changed on disk - `victory glyphs` builds the same list by hand; F1: PLAYSTATION PAD row for VICTORY_DUALSENSE - Checked live: patches served, DualSense connected, title screen shows triangle/square/cross Ported from Marvisak/VIctory PR #3399. Co-Authored-By: Anoyarou <anoyarou@tuta.com> Co-Authored-By: GLM-5.4 via omp <noreply@z.ai>
… controller picture - apps/victory/assets/ps5-controller.png (1024x683 RGBA, 605 KB): its contributor's own render, under the repository's licence; nothing of the game. Policy exception in xtask/src/policy.rs - Used when VICTORY_PS_PICTURE and the home folder's ps5-controller.png are absent; written once into the patch folder - The list now names the picture it was made from (`# picture:`), so a change of picture rebuilds it Co-Authored-By: GLM-5.4 via omp <noreply@z.ai>
|
Added in 5b3e566: a DualSense render now ships as the default Settings controller picture ( Checked: |
…ond exception - docs/asset-policy.md said bcpack-tables.bin was the one exception; ps5-controller.png (the contributor's own render, under the repository's licence) is now listed with its reason, as in xtask/src/policy.rs Co-Authored-By: GLM-5.4 via omp <noreply@z.ai>
|
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. |
What 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.