feat(prompts): hand-drawn DualSense and Xbox pictures for the System page, and the game's own tint #1589
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1589
Loading…
Reference in a new issue
No description provided.
Delete branch "madebyjordan/Longshot:feat/dualsense-picture"
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?
Type: feat · Risk: low · Tested on: Windows 11, RX 6700 XT · Needs: Linux, any GPU
TL;DR
The pause menu's System page drew the PlayStation and Xbox controllers as generic pads, and several label lines pointed at the wrong control (the d-pad's at the left stick, R2's and RT's at empty space). This PR replaces them with pictures drawn by hand in the game's style, a DualSense for both PlayStation faces and an Xbox One pad for Xbox, with every line on its control. It also fixes how the page colours a controller picture, so these and the Steam Deck's match the game's Pro Controller. Checked in the game on Windows for PS5, PS4 and Xbox, before and after, with a new test for the colours.
Breakdown
Why
On the System page (Basic Controls) with Button prompts on PlayStation 5, the controller was a generic pad generated from Kenney's glyph: no DualSense shape, stacked shoulder plates, a house icon for the PS button. The page's lines followed the Switch Pro Controller: the d-pad's frame and line sat on the left stick, R2's line ended in the air above the right shoulder, and L1 and L2 ended on one point. The PlayStation 4 face showed the same generated kind of picture. On Xbox the picture was a generated Xbox Series pad with a house for the Xbox button; LT's and LB's lines ended on one point and RT's dot sat in the air above the right shoulder.
The tinted copy every drawn picture gets was off as well: the game turns its black outlines a brown lighter than the body and the body almost black, which a straight-line fit can't do, so the outlines went black, the body brown-grey and the buttons dull.
This builds on #406 (Stellarznith), which started the hand-drawn DualSense and the hand-given line textures: its two commits are kept, rebased onto main, under their author. See #1211 for the general fix the lines still need on the other faces.
The other controllers are planned the same way: the DualSense was chosen first, the Xbox pad followed and is in this PR too; the Steam Deck and a DualShock 4 for the PS4 face are next (the DualSense serves both PlayStation faces until then).
How to reproduce
Seen on: Windows 11, RX 6700 XT, AMD 26.10.1 (any PC: the images are made at the build)
Settings and switches: Button prompts = PlayStation 5 (
button_prompts=4) or Xbox (2)Steps: load a save, open the pause menu, ZR to the System page
Expected: a DualSense (an Xbox pad), each label's line ending on its control
Actual: a generic pad; PS5: the d-pad's frame round the left stick, R2's dot in the air, L1 and L2 on one point; Xbox: LT and LB on one point, RT's dot in the air
What changed
The pictures are Jordan's (madebyjordan): drawn in the game's greys like its Pro Controller, so the page tints them as it does the game's own. The page's two routed line textures follow its parts, and the three the router doesn't draw are given for it. The tint takes each grey's colour from the game's own picture pair.
picture_layersinnx2/prompt_assets.pybuilds a table of the median tinted colour of each grey the game's Pro Controller pair drew enough of (20+ pixels), and blends between them, instead of a line fitted per channel. Measured on the game's own pair: mean error 8.0 → 1.4 of 255, 95th percentile 19.2 → 4.3. #406'sby_hand(a hand-given picture kept its own colours) is gone: a picture in colours of its own gives itsController_Pro1.pngby hand, which the overrides already take.nx2/prompt_faces/ps4/andps5/Controller_Pro.png(1160x680; the controller 857x585 at 151,48, as wide as the game's Pro Controller);_DUALSENSEparts innx2/prompt_faces.py, shared by both faces.nx2/prompt_faces/xbox/Controller_Pro.png(1160x680, an Xbox One pad, the controller 860x608 at 152,35, in the same greys) and its_XBOXparts, with its ownControllerGuide_Pro_02to04drawn the same way as the DualSense's. A bumper's line ends on the band under its trigger's hump, inside the trigger's line: the Menu line leaves no other way to RB without a crossing.ControllerGuide_Pro_00/01are routed from the parts again (#406 gave them by hand, which kept them from following the controls).ControllerGuide_Pro_02(ZR),03(the d-pad's frame and line) and04(L and R) are given for this picture, drawn with the router's ownguide_lineandguide_frameto its parts at the game's rows (333, 1016, 446): lines only.guide_layers_ofkeeps the game's labels' bars under them at the build, so nothing of the game's is in git;hand_layers(the overrides, moved out offace_layers) leaves those three to it. A hand-given one is size-checked first and written whole even with no line in it; a face that gives them without theController_Pro.pngthey were drawn for stops the build rather than falling back to the generated picture.tests/test_prompt_picture_tint.py: a synthetic pair with the colours measured on the game's Pro Controller, a few stray pixels, a blended edge and a part the tinted copy leaves clear, and greys checked against their rounded blend; fails on main (grey #00 is tinted (0, 0, 0), the game's is (26, 19, 10)), and catches a nearest-grey lookup, the mean, no edge filter, the plain picture's alpha alone and truncation (each tried).tests/test_prompt_hand_guides.py: 02 to 04 keep the game's bars and cover its lines (fails with the overrides putting them back raw).nx2/prompt_faces/README.md(the hand-given 02 to 04, drawing in the game's greys);docs/tested/2026-11-18-dualsense-picture-jordan-run01.mdand2026-11-18-xbox-picture-jordan-run01.md.Measurements
Verdict: it works: on PS5 and PS4 the System page shows the DualSense, on Xbox the Xbox One pad, with every line on its control and none crossing on Xbox; the Switch face's prompts are byte-identical to main's. The tint's error against the game's own pair drops from 8.0 to 1.4 (mean, of 255).
The numbers still hold on main
876dc360, which this PR is now on: its one commit since430eef4f(#1569, the build's package extraction) changes no prompt file (nx2/prompt_assets.py,prompt_faces.py,prompt_draw.pyandprompt_faces/are the same), so main's prompts are made by the same code.Hardware: Windows 11 Home 26200, AMD Radeon RX 6700 XT 12 GB, AMD 26.10.1, Ryzen 5 5600, 16 GB
Scene: a copied save in Kakariko Village, the pause menu's System page; 1920x1080 offscreen (
HOS_HEADLESS), the folder's options otherwiseMethod: one run per side and face (main PS5, this PR PS5, PS4, then main Xbox, PS4; this PR's Xbox once the picture was in, run twice as the first missed its ZR presses) in a copy of the nightly-484-430eef4f game folder, only its
prompts/swapped (this PR's made bynx2/prompt_assets.py); presses byHOS_INPUT_SCRIPTon the frame clock, a capture every 60 presents; the log'sprompts:lines. Prompts output compared file by file with main's from the same RomFS.How to reproduce:
python -I nx2/prompt_assets.py --romfs <romfs> --out <game folder>/prompts, setbutton_prompts=4(PS5),3(PS4) or2(Xbox), load a save, PLUS, then ZR to System430eef4fab11ff63prompts: <face> texturesController_Pro1only; ps4, ps5 and xbox newThe PlayStation screenshots are of
659c6bdf, before the Xbox picture and a rebase onto main876dc360; the PlayStation and Steam Deck prompts are byte-identical atab11ff63.The System page with Button prompts = PlayStation 5, the same save and spot,
Before: main @ 430eef4fabove,After: this PR @ 659c6bdfbelow:The picture at 2x. Before: the d-pad's frame on the left stick, R2's dot in the air, L1 and L2 on one point. After: every line on its control.
PlayStation 4 (the same picture now):
The System page with Button prompts = Xbox,
Before: main @ 430eef4fabove,After: this PR @ ab11ff63below:The Xbox picture at 2x. Before: LT's and LB's lines on one point, RT's dot in the air. After: every line on its control, none crossing.
Flags and settings
None.
Testing
Tested: On Windows 11 Home 26200, RX 6700 XT, AMD 26.10.1: headless runs to the pause menu's System page from a copied save, this PR's prompts against the nightly-484-430eef4f folder's own (main
430eef4f), PS5, PS4 and Xbox (this PR's Xbox run with this head's prompts): the screenshots above. Game-free:tests/test_prompt_picture_tint.pyfails on main and at its own commit and passes from the fix on; every check that reads the prompt files passes with--strict(test_prompt_guide_lines,test_prompt_font_bind,test_prompt_skip,test_prompt_speed,test_prompts_live,test_prompt_auto_face,test_appimage_prompt_fonts,test_lift_cache,test_build_long_pathsand the two new ones); the whole suite,python -I -B tests/run_all.pywith llvm-mingw from the nightly-484 toolchain: 683 passed, 51 failed, 48 skipped here against main's 681 / 51 / 48 on the same PC, the same 51 failing on both (FSR, pipeline cache, the tested-configurations CRLF check and other checks that fail on this Windows PC on main too). The prompts output compared file by file with main's from the same RomFS; the in-game runs used an earlier state of this branch whose prompts are byte-identical to this head's (the review's changes touch no image); after the Xbox picture and the rebase onto main876dc360the prompt checks were run again, all passing. A second agent reviewed the branch cold; its findings (looser tests, an untested override skip, an empty tint table's message, an all-black hand texture skipping its size check, a silent fallback to the generated picture) are fixed here.Not tested: Linux (the images are made by the same Python on both, nothing platform-specific changed); the Steam Deck face in the game (only its picture's colours change, by the same tint as the others'); 4K and ultrawide (the page's textures are fixed-size; nothing here changes how they're drawn).
Must be tested:
Risks
What could break: the System page's controller picture and lines on the PlayStation and Xbox faces, and the picture's colours on the Steam Deck face. A part out of place would put a line beside its control; the screenshots show none. The d-pad's line crosses the Move line: on a DualSense the left stick sits below the d-pad while its label sits above the d-pad's, so the lines have to cross until the labels follow the controller (#1211; #406's picture crosses them the same way). The Steam Deck face still has the game's fixed L, R, ZR and d-pad lines (#1211).
Turning it off: revert the commits (the PlayStation and Xbox faces go back to the generated pictures).
Compatibility: nothing for saves, options or caches; a build regenerates the button prompts (their stamp covers these files).
Issues
See #1211
See #406
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md).mainand passing here.Reviewer notes
by_hand, and keeps itsHAND_GUIDES(the way 02 to 04 are given). If #406 lands first this rebases cleanly onto it.nx2/prompt_faces.pykeeps the makers' logos out of the icons (every face keeps the game's Home icon); say if the pictures should drop them too.🤖 Generated with Claude Code
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 HarnessTested in game: Windows 11 Home 26200, RX 6700 XT, AMD 26.10.1: the pause menu's System page from a Kakariko Village save with Button prompts on PlayStation 5, PlayStation 4 and Xbox, against main 430eef4f's prompts in the same nightly-484 folder. PS5 and PS4 show the drawn DualSense with every line on its control (L2, L1, Create, the d-pad's frame, both sticks, R2, R1, Options, the face buttons); main puts the d-pad's frame on the left stick and R2's dot in the air. Xbox: the same picture in the game's own colours. Log: prompts: ps5 textures, 2488 runs (main 1914). No crash.
@Beanstalk linux, any GPU: build this PR, set Button prompts to PlayStation 5, load a save and open the pause menu's System page (PLUS, then ZR to System). Expect the drawn DualSense with every label's line ending on its control (L2, L1, Create, the d-pad's frame, both sticks, R2, R1, Options, the face buttons' frame) and the log line
prompts: ps5 textures, 2488 runs.@madebyjordan approval of
659c6bdrecorded. This diff touches sensitive paths, so a second member ofBigBeansmust approve it too.Beanstalk test farm
Commit
ab11ff6· tier untrusted · approved by madebyjordan · dashboardThis diff touches sensitive paths, so it needs two members of
BigBeans:nx2/prompt_assets.py,nx2/prompt_faces.py,nx2/prompt_faces/README.md,nx2/prompt_faces/ps4/ControllerGuide_Pro_02.png,nx2/prompt_faces/ps4/ControllerGuide_Pro_03.png,nx2/prompt_faces/ps4/ControllerGuide_Pro_04.png,nx2/prompt_faces/ps4/Controller_Pro.png,nx2/prompt_faces/ps5/ControllerGuide_Pro_02.png,nx2/prompt_faces/ps5/ControllerGuide_Pro_03.png,nx2/prompt_faces/ps5/ControllerGuide_Pro_04.pngA member of
BigBeanscan review this commit and comment@Beanstalkto test it.WIP: feat(prompts): a hand-drawn DualSense for the PlayStation faces' System page, and the game's own tintto feat(prompts): a hand-drawn DualSense for the PlayStation faces' System page, and the game's own tint659c6bdf24ab11ff6341feat(prompts): a hand-drawn DualSense for the PlayStation faces' System page, and the game's own tintto feat(prompts): hand-drawn DualSense and Xbox pictures for the System page, and the game's own tintAdded Jordan's hand-drawn Xbox One pad for the Xbox face (
5356cff4, with its tested file inab11ff63), and rebased onto main876dc360(no prompt file changed there). Tested in game: Windows 11 Home 26200, RX 6700 XT, AMD 26.10.1, the System page with Button prompts on Xbox. Every line ends on its control (LT, LB, View, the left stick, the d-pad's frame, RT, RB, Menu, the face buttons, the right stick) and none crosses another. Main put LT and LB on one point and RT's dot in the air. Log:prompts: xbox textures, 2652 runs(main 2201). No crash. The PlayStation and Steam Deck prompts are byte-identical to 659c6bdf's. Screenshots are in the description.🤖 Generated with Claude Code
@Beanstalk linux, any GPU: build this PR, set Button prompts to PlayStation 5, load a save and open the pause menu's System page (PLUS, then ZR to System), then the same with Button prompts on Xbox. Expect the drawn DualSense, then the drawn Xbox One pad, with every label's line ending on its control, and the log lines
prompts: ps5 textures, 2488 runsandprompts: xbox textures, 2652 runs.@madebyjordan approval of
ab11ff6recorded. This diff touches sensitive paths, so a second member ofBigBeansmust approve it too.