WIP: feat(prompts): a DualSense face for the PlayStation 5 prompts #406

Draft
Stellarznith wants to merge 2 commits from Stellarznith/Longshot:feat/dualsense-face into main
First-time contributor

Why

The PlayStation 5 prompt face draws the pause menu's controller picture from Kenney's PlayStation 5 glyph, scaled and placed by the numbers in nx2/prompt_faces.py. On screen it reads as a generic gamepad: no DualSense shape, no light bar, and the page's leader lines are routed to Kenney's proportions, so each label's line ends near, not on, the control it names.

What changed

  • nx2/prompt_faces/ps5/Controller_Pro.png (new, 1160x680 RGBA): a DualSense front view drawn for this face. The page's tinted copy and the shadow are still made from it.
  • nx2/prompt_faces/ps5/ControllerGuide_Pro_0{0..4}.png (new, 1555x1511 grey): the page's five leader line textures, drawn for this picture, so each line ends on the control its label names.
  • nx2/prompt_assets.py: a picture given by hand keeps its own colours — the page's tinted copy is fitted from the game's grey picture to its brown one, which takes a drawn picture's colours away (the DualSense's light bar is blue), so a hand-given picture is its own tinted copy. A hand-given guide texture is written whole, and when both the router's two textures are given the router draws nothing. HAND_GUIDES names the five guide textures.
  • nx2/prompt_faces.py: the ps5 face's parts follow the new picture — sticks, d-pad, face buttons, shoulders, touchpad and mute, at the picture's own coordinates — as nx2/prompt_faces/README.md requires when a face's picture changes.

Nothing else changes: the Switch, Xbox, PlayStation 4 and Steam Deck faces keep their generated pictures, icons and lines, and the game's own textures stay wherever a face does not override them.

Flags and settings

Flag What it does Default now Recommendation Helps on Doesn't help on Untested on
Button prompts = PlayStation 5 (the Button prompts row, or button_prompts=4) draws the PS5 face: this picture, these lines, Kenney's PlayStation glyphs for the icons unchanged (Auto) leave it on Auto unless you use a DualSense a DualSense every other pad -

Measurements

main: 0caf0618 (2026-11-14)
this PR: feat/dualsense-face @ b9f5540
Hardware: RTX 4060 Ti 16 GB, NVIDIA 617.42; i5-14600KF, 32 GB; Windows 11 Pro 26300
Scene: a copied save, the pause menu's System page (Basic Controls) and the Items page behind it; 1589x720 window, default options, frame generation off
Method: one run of main @ 0caf0618 and one of this PR on the same PC, each reaching the System page; prompts: ps5 textures, N runs and prompts: ps5 icons, N buttons from the game's logs/longshot_log.txt, the size of prompts/ps5/textures.bin, and the page itself; one run of this PR
How to reproduce: python -I -B nx2/prompt_assets.py --romfs <romfs> --out <dir> --faces switch,xbox,ps4,ps5,steamdeck (or let nx2/make_game.py do it), set button_prompts=4, start the game, Continue, then the pause menu's System page

main @ 0caf0618 this PR @ b9f5540
prompts/ps5/textures.bin 4,161,408 bytes 3,791,248 bytes
prompts: ps5 textures, N runs 1914 1929 (the three guide textures the router no longer redraws, written as they are given)
The page's controller picture Kenney's PlayStation 5 glyph, recoloured to the page's brown the drawn DualSense, light bar blue, its own colours kept
The page's leader lines routed to Kenney's proportions: several end off their control each ends on the control its label names (L2, L1, touchpad, d-pad, left stick, face buttons, right stick, +, -)
The other four faces - byte-identical textures.bin to main (switch, xbox, ps4, steamdeck compared file to file)
Frame rate, the same page vk: 6120 presents, 60.1 fps vk: 21000 presents, 60.0 fps

Testing

Tested: Windows 11 Pro 26300, RTX 4060 Ti, NVIDIA 617.42, i5-14600KF, 32 GB. In the game: a copied save, the pause menu's System page with Button prompts = PlayStation 5 — the DualSense picture, its light bar and all nine leader lines ending on their controls (evidence pictures in the first comment); the Items page behind it for the prompt glyphs. prompts: ps5 textures, 1929 runs, prompts: ps5 icons, 16 buttons on these pad's controls. Game-free: tests/test_prompt_guide_lines.py (30 lines on 5 faces end on their part's edge), tests/test_prompt_font_bind.py (384 text codes rewritten, each face's icons kept), tests/test_prompt_speed.py, tests/test_prompt_skip.py, tests/test_readme_menu_rows.py — all exit 0. python -I -B tests/run_all.py on this branch: 485 passed, 6 failed, 70 skipped — and a run of the same suite on a worktree of main @ 0caf0618 in this environment fails 7 (the same six, plus tests/test_native_suatom.py, which passes here: it is flaky under the runner's 20 parallel checks). The six are test_bug_report (a Chinese-locale console read as UTF-8), test_module_ids, test_pad_layout, test_oot_state_tap and test_release (each needs something this PC lacks), and test_tested_configurations (a CRLF/LF difference in a piped read on Windows).

Not tested: the same page on a 4K window and with a non-default menu size (the page's layout scales, and these pictures are drawn for the sizes the game asks for); a DualSense on Bluetooth (the face is chosen by the Button prompts row, not by the pad); the Linux build's prompt generation (same Python, same inputs, but not run here).

Needs other testers:

  • A 4K or ultrawide window on Windows: check that the picture and its lines stay aligned on the System page, expecting no drift (T-LBTJ).
  • Linux: check that nx2/prompt_assets.py makes the ps5 face and the game draws it, expecting the same prompts: ps5 textures line (T-LBTJ).

Screenshots

this PR @ b9f5540: the pause menu's System page — the DualSense picture with its light bar, and each leader line ending on its control — attached to the first comment, with a zoom of the picture.

Risk and rollback

What could break: a picture of the wrong size stops the build with its name (nx2/prompt_faces/README.md says so, and the check is in prompt_assets.py); parts that do not follow the picture would put lines on the wrong controls, which tests/test_prompt_guide_lines.py guards (every route must reach its part's edge); a hand-given guide texture that misses a line leaves that line out (the router draws nothing when all five are given). The other faces are untouched, and a face with no folder in nx2/prompt_faces/ is generated exactly as before. Reverting the commit, or deleting nx2/prompt_faces/ps5/, brings main's face back.

Reviewer notes

The two code changes are small and both in nx2/prompt_assets.py: picture_layers takes by_hand so a drawn picture keeps its colours, and guide_layers_of writes a hand-given guide texture whole instead of routing over it. The rest is six PNGs and the ps5 parts. nx2/prompt_faces/README.md describes this folder as the place for exactly this.

Issues

Fixes #

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later; the pictures are drawn for this, not taken from the game or from the Kenney set.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Flags noted (the Button prompts row is unchanged; the README already documents it).
  • Screenshots for a change that shows on screen.
  • A file in docs/tested/ for each new measured run.
  • A check under tests/ that reads changed source updated in this PR, not weakened (none needed weakening; test_prompt_guide_lines.py passes as it is).
  • Docs updated.
## Why The PlayStation 5 prompt face draws the pause menu's controller picture from Kenney's PlayStation 5 glyph, scaled and placed by the numbers in `nx2/prompt_faces.py`. On screen it reads as a generic gamepad: no DualSense shape, no light bar, and the page's leader lines are routed to Kenney's proportions, so each label's line ends near, not on, the control it names. ## What changed - `nx2/prompt_faces/ps5/Controller_Pro.png` (new, 1160x680 RGBA): a DualSense front view drawn for this face. The page's tinted copy and the shadow are still made from it. - `nx2/prompt_faces/ps5/ControllerGuide_Pro_0{0..4}.png` (new, 1555x1511 grey): the page's five leader line textures, drawn for this picture, so each line ends on the control its label names. - `nx2/prompt_assets.py`: a picture given by hand keeps its own colours — the page's tinted copy is fitted from the game's grey picture to its brown one, which takes a drawn picture's colours away (the DualSense's light bar is blue), so a hand-given picture is its own tinted copy. A hand-given guide texture is written whole, and when both the router's two textures are given the router draws nothing. `HAND_GUIDES` names the five guide textures. - `nx2/prompt_faces.py`: the ps5 face's `parts` follow the new picture — sticks, d-pad, face buttons, shoulders, touchpad and mute, at the picture's own coordinates — as `nx2/prompt_faces/README.md` requires when a face's picture changes. Nothing else changes: the Switch, Xbox, PlayStation 4 and Steam Deck faces keep their generated pictures, icons and lines, and the game's own textures stay wherever a face does not override them. ## Flags and settings | Flag | What it does | Default now | Recommendation | Helps on | Doesn't help on | Untested on | |---|---|---|---|---|---|---| | Button prompts = PlayStation 5 (the Button prompts row, or `button_prompts=4`) | draws the PS5 face: this picture, these lines, Kenney's PlayStation glyphs for the icons | unchanged (Auto) | leave it on Auto unless you use a DualSense | a DualSense | every other pad | - | ## Measurements main: 0caf0618 (2026-11-14) this PR: feat/dualsense-face @ b9f5540 Hardware: RTX 4060 Ti 16 GB, NVIDIA 617.42; i5-14600KF, 32 GB; Windows 11 Pro 26300 Scene: a copied save, the pause menu's System page (Basic Controls) and the Items page behind it; 1589x720 window, default options, frame generation off Method: one run of `main @ 0caf0618` and one of this PR on the same PC, each reaching the System page; `prompts: ps5 textures, N runs` and `prompts: ps5 icons, N buttons` from the game's `logs/longshot_log.txt`, the size of `prompts/ps5/textures.bin`, and the page itself; one run of this PR How to reproduce: `python -I -B nx2/prompt_assets.py --romfs <romfs> --out <dir> --faces switch,xbox,ps4,ps5,steamdeck` (or let `nx2/make_game.py` do it), set `button_prompts=4`, start the game, Continue, then the pause menu's System page | | main @ 0caf0618 | this PR @ b9f5540 | |---|---|---| | `prompts/ps5/textures.bin` | 4,161,408 bytes | 3,791,248 bytes | | `prompts: ps5 textures, N runs` | 1914 | 1929 (the three guide textures the router no longer redraws, written as they are given) | | The page's controller picture | Kenney's PlayStation 5 glyph, recoloured to the page's brown | the drawn DualSense, light bar blue, its own colours kept | | The page's leader lines | routed to Kenney's proportions: several end off their control | each ends on the control its label names (L2, L1, touchpad, d-pad, left stick, face buttons, right stick, +, -) | | The other four faces | - | byte-identical `textures.bin` to main (`switch`, `xbox`, `ps4`, `steamdeck` compared file to file) | | Frame rate, the same page | `vk: 6120 presents, 60.1 fps` | `vk: 21000 presents, 60.0 fps` | ## Testing **Tested:** Windows 11 Pro 26300, RTX 4060 Ti, NVIDIA 617.42, i5-14600KF, 32 GB. In the game: a copied save, the pause menu's System page with Button prompts = PlayStation 5 — the DualSense picture, its light bar and all nine leader lines ending on their controls (`evidence` pictures in the first comment); the Items page behind it for the prompt glyphs. `prompts: ps5 textures, 1929 runs`, `prompts: ps5 icons, 16 buttons on these pad's controls`. Game-free: `tests/test_prompt_guide_lines.py` (30 lines on 5 faces end on their part's edge), `tests/test_prompt_font_bind.py` (384 text codes rewritten, each face's icons kept), `tests/test_prompt_speed.py`, `tests/test_prompt_skip.py`, `tests/test_readme_menu_rows.py` — all exit 0. `python -I -B tests/run_all.py` on this branch: 485 passed, 6 failed, 70 skipped — and a run of the same suite on a worktree of `main @ 0caf0618` in this environment fails 7 (the same six, plus `tests/test_native_suatom.py`, which passes here: it is flaky under the runner's 20 parallel checks). The six are `test_bug_report` (a Chinese-locale console read as UTF-8), `test_module_ids`, `test_pad_layout`, `test_oot_state_tap` and `test_release` (each needs something this PC lacks), and `test_tested_configurations` (a CRLF/LF difference in a piped read on Windows). **Not tested:** the same page on a 4K window and with a non-default menu size (the page's layout scales, and these pictures are drawn for the sizes the game asks for); a DualSense on Bluetooth (the face is chosen by the Button prompts row, not by the pad); the Linux build's prompt generation (same Python, same inputs, but not run here). **Needs other testers:** - A 4K or ultrawide window on Windows: check that the picture and its lines stay aligned on the System page, expecting no drift (T-LBTJ). - Linux: check that `nx2/prompt_assets.py` makes the ps5 face and the game draws it, expecting the same `prompts: ps5 textures` line (T-LBTJ). ## Screenshots `this PR @ b9f5540`: the pause menu's System page — the DualSense picture with its light bar, and each leader line ending on its control — attached to the first comment, with a zoom of the picture. ## Risk and rollback What could break: a picture of the wrong size stops the build with its name (`nx2/prompt_faces/README.md` says so, and the check is in `prompt_assets.py`); `parts` that do not follow the picture would put lines on the wrong controls, which `tests/test_prompt_guide_lines.py` guards (every route must reach its part's edge); a hand-given guide texture that misses a line leaves that line out (the router draws nothing when all five are given). The other faces are untouched, and a face with no folder in `nx2/prompt_faces/` is generated exactly as before. Reverting the commit, or deleting `nx2/prompt_faces/ps5/`, brings main's face back. ## Reviewer notes The two code changes are small and both in `nx2/prompt_assets.py`: `picture_layers` takes `by_hand` so a drawn picture keeps its colours, and `guide_layers_of` writes a hand-given guide texture whole instead of routing over it. The rest is six PNGs and the ps5 `parts`. `nx2/prompt_faces/README.md` describes this folder as the place for exactly this. ## Issues Fixes # ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later; the pictures are drawn for this, not taken from the game or from the Kenney set. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Flags noted (the Button prompts row is unchanged; the README already documents it). - [x] Screenshots for a change that shows on screen. - [x] A file in `docs/tested/` for each new measured run. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened (none needed weakening; `test_prompt_guide_lines.py` passes as it is). - [x] Docs updated.
The PlayStation 5 prompt face draws its pause menu controller picture with
Kenney's PlayStation 5 glyph, scaled and placed by nx2/prompt_faces.py's
`drawing` numbers. It reads as a generic gamepad: the DualSense's own shape,
its light bar and its sticks are not there, and the page's leader lines are
routed to Kenney's proportions.

This gives that face a hand-drawn picture and the page's five leader line
textures, all in nx2/prompt_faces/ps5/ (the folder nx2/prompt_faces/README.md
documents), and makes the picture's own parts match:

- nx2/prompt_faces/ps5/Controller_Pro.png (1160x680 RGBA): a DualSense front
  view, drawn for this. The page's tinted copy and the shadow are still made
  from it.
- nx2/prompt_faces/ps5/ControllerGuide_Pro_0{0..4}.png (1555x1511, grey):
  the page's leader lines, drawn for this picture, so each line ends on the
  control its label names.
- nx2/prompt_assets.py: a picture given by hand is its own tinted copy. The
  page's tinted copy is fitted from the game's grey picture to its brown one,
  which takes a hand-drawn picture's colours away (the DualSense's light bar
  is blue). A hand-given guide texture is written whole, and the two the
  router draws are left to it when both are given.
- nx2/prompt_faces.py: the ps5 face's `parts` follow the new picture (sticks,
  d-pad, face buttons, shoulders, touchpad, mute), as its README requires.

Nothing else changes: the Switch, Xbox, PlayStation 4 and Steam Deck faces
keep their generated pictures, icons and lines, and the game's own textures
stay where a face does not override them.

Assisted-by: DeepSeek Harness
docs(testing): the DualSense face's run on Windows
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
b9f55401c9
Assisted-by: DeepSeek Harness
Author
First-time contributor

this PR @ b9f5540: the pause menu's System page (基本操作 / Basic Controls) with Button prompts = PlayStation 5. The picture is the drawn DualSense, its light bar blue, and every leader line ends on the control its label names.

System page with the DualSense face

A 3x zoom of the same page: L2 → left trigger, L1 → left shoulder, the touchpad label → the touchpad, the d-pad label → the cross, L → the left stick, the face labels → the four buttons, R3 → the right stick, and the + / − labels → the small keys.

Zoom of the picture and its leader lines

[hos ARes Loading 0] prompts: ps5 icons, 16 buttons on these pad's controls
[hos ARes Loading 1] prompts: ps5 textures, 1929 runs for this pad's controls

1929 against main 0caf0618's 1914: the three guide textures the router used to redraw from the game's Switch Pro lines are now written from the five given ones. The other four faces' textures.bin files are byte-identical to main's.

`this PR @ b9f5540`: the pause menu's System page (基本操作 / Basic Controls) with Button prompts = PlayStation 5. The picture is the drawn DualSense, its light bar blue, and every leader line ends on the control its label names. ![System page with the DualSense face](https://git.magicbean.dev/attachments/cf7c57f0-46fb-4341-8b9d-c3efcbd81992) A 3x zoom of the same page: L2 → left trigger, L1 → left shoulder, the touchpad label → the touchpad, the d-pad label → the cross, L → the left stick, the face labels → the four buttons, R3 → the right stick, and the + / − labels → the small keys. ![Zoom of the picture and its leader lines](https://git.magicbean.dev/attachments/824eafc8-59ce-46ad-abe2-e67697cabed1) ``` [hos ARes Loading 0] prompts: ps5 icons, 16 buttons on these pad's controls [hos ARes Loading 1] prompts: ps5 textures, 1929 runs for this pad's controls ``` 1929 against main `0caf0618`'s 1914: the three guide textures the router used to redraw from the game's Switch Pro lines are now written from the five given ones. The other four faces' `textures.bin` files are byte-identical to main's.
Author
First-time contributor

Status: this is still WIP on purpose, and it wants a maintainer's eye before anyone claims it.

The Windows side is measured here: the drawn DualSense on the pause menu's System page, its light bar blue, every leader line ending on the control its label names, with prompts: ps5 textures, 1929 runs against main's 1914 (the three guide textures now come from the five given ones) and the other four faces' extures.bin byte-identical to main's.

Not verified: a 4K window and a non-default menu size (the picture and its parts are drawn for the sizes in the table), Linux (no WSL or container on this host, so CI is the first build there), and the Steam Deck face, which this does not touch.

Could a maintainer add the esting wanted label? Test request T-LBTJ is open, and until the label is there nobody but a collaborator can claim it.

Status: this is still WIP on purpose, and it wants a maintainer's eye before anyone claims it. The Windows side is measured here: the drawn DualSense on the pause menu's System page, its light bar blue, every leader line ending on the control its label names, with prompts: ps5 textures, 1929 runs against main's 1914 (the three guide textures now come from the five given ones) and the other four faces' extures.bin byte-identical to main's. Not verified: a 4K window and a non-default menu size (the picture and its parts are drawn for the sizes in the table), Linux (no WSL or container on this host, so CI is the first build there), and the Steam Deck face, which this does not touch. Could a maintainer add the esting wanted label? Test request T-LBTJ is open, and until the label is there nobody but a collaborator can claim it.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
This pull request is marked as a work in progress.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/dualsense-face:Stellarznith-feat/dualsense-face'
git switch 'Stellarznith-feat/dualsense-face'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!406
No description provided.