WIP: fix(prompts): draw every System guide from the face's parts #1623

Closed
gab9281 wants to merge 12 commits from gab9281/Longshot:fix/system-guide-lines into main
Member

Type: fix · Risk: low · Tested on: Linux, AMD Radeon 680M (RADV), 1280x720

Issue: #1211

TL;DR: The System page's controller lines were built from fixed Pro Controller rows and only two of the game's five guide textures. This makes every line come from the active face's parts, builds one line per slot and per bindable input, and gives the keyboard face its own bindings panel. The Switch face keeps the game's images byte-identical.

Why

nx2/prompt_assets.py built guide textures 00 and 01 only. Guide 02 (ZR), 03 (the d-pad frame and line) and 04 (L/R) were the game's own Pro Controller art, so on another face the frame could land on the left stick and the shoulder dots were shared or off the controller. Six rows had per-binding images; the other four slots and every rebind of them did not.

What changed

  • GUIDES covers all five ControllerGuide_Pro_00..04 textures.
  • GUIDE_PAGES is a generic table: (texture, bar, row, Switch button, group) for every System slot. guide_page_lines makes a line for every slot × pad input, grouped where the input is in a group. prompts/<face>/guide.bin holds them.
  • host/prompts.c picks the line of the currently bound input and writes it into Common.bntx after the base runs (renumbered write indices: each file numbers runs from 0, so without this the base textures were written over the new lines). This covers ZR, L, R, the d-pad and all rebinding, and follows live face/control changes.
  • Dynamic group boxes: for each subset of two or more d-pad, face-button or L1/L2/R1/R2 members, a box replaces their individual lines (prompts/<face>/groups.bin, selected by the current binding mask).
  • PAGE_LAYOUTS is a generic page-variant table. The keyboard face's System page moves the controller picture, shadows and guide panes off the page and places the action labels in two columns, with the bound key/mouse icons the keyboard font already shows. prompts/keyboard/page.bin holds the pane runs; the browser applies the file of the active face. Adding another page is another table row, with no new runtime code.
  • The Switch face keeps the game's own guide images and has no guide/page files.
  • Tests: all five textures generated for every face; ten slots × seventeen inputs per face; the C cut of the run selector (bound input chosen, write order); keyboard key/stick mappings across binding layouts; page-variant runs.

Screenshots

Before/after on the same save, face and spot, and the keyboard panel: see the next comment.

How to reproduce

Build this branch. Set button_prompts=4 (PlayStation 5), load a save, open the pause menu's System page: the d-pad frame is around the d-pad and every line ends on its control. Set button_prompts=6 (Keyboard) and open the same page: the controller is gone and the page is a two-column list of actions with their bound key/mouse icons.

Testing

Tested: Linux (CachyOS), Radeon 680M / Mesa RADV, 1280x720, HOS_HEADLESS=1, through the job queue (--mode shared). PlayStation 5 before: prompts: ps5 textures, 1914 runs; after: 3272 runs; keyboard: prompts: keyboard textures, 1872 runs. The System page screenshots show the corrected d-pad frame and the keyboard panel; no prompt errors. Game-free: tests/test_prompt_system_guides.py fails on main and passes here; all prompt checks pass, including the new run-selector C test. python -I -B tests/run_all.py: 656 passed, 34 failed, 96 skipped; no prompt check fails (the unrelated failures vary between runs on main too).

Open: labels still use the game's slots, so a crossing can remain on a face whose physical order differs; that is the next step of the design doc. Art for the other faces is separate. The F1 control-rebind page also needs a per-row "reset to default" button (planned in the design doc).

Not tested: a control rebound on the System page in-game (the run selector is covered by the C test); other faces, languages and 4K/ultrawide in-game; live face switching to/from keyboard in-game.

Must be tested: a rebound control and a live face change on Linux/Windows after review.

Risks

What could break: build-time guide images/layout patches only; a wrong part puts a line beside its control, and a wrong pane puts a label in the wrong place. The Switch face is unchanged. A hand-drawn picture with stale parts would put lines in the wrong place, as before.

Turning it off: revert the commits.

Compatibility: no saves or options changes; a rebuild regenerates the prompts. A mod's own files are never touched (the file precedence is unchanged).

**Type:** fix · **Risk:** low · **Tested on:** Linux, AMD Radeon 680M (RADV), 1280x720 **Issue:** https://git.magicbean.dev/MagicBeanDev/Longshot/issues/1211 **TL;DR:** The System page's controller lines were built from fixed Pro Controller rows and only two of the game's five guide textures. This makes every line come from the active face's parts, builds one line per slot and per bindable input, and gives the keyboard face its own bindings panel. The Switch face keeps the game's images byte-identical. ## Why `nx2/prompt_assets.py` built guide textures 00 and 01 only. Guide 02 (ZR), 03 (the d-pad frame and line) and 04 (L/R) were the game's own Pro Controller art, so on another face the frame could land on the left stick and the shoulder dots were shared or off the controller. Six rows had per-binding images; the other four slots and every rebind of them did not. ## What changed - `GUIDES` covers all five `ControllerGuide_Pro_00..04` textures. - `GUIDE_PAGES` is a generic table: `(texture, bar, row, Switch button, group)` for every System slot. `guide_page_lines` makes a line for every slot × pad input, grouped where the input is in a group. `prompts/<face>/guide.bin` holds them. - `host/prompts.c` picks the line of the currently bound input and writes it into `Common.bntx` after the base runs (renumbered write indices: each file numbers runs from 0, so without this the base textures were written over the new lines). This covers ZR, L, R, the d-pad and all rebinding, and follows live face/control changes. - Dynamic group boxes: for each subset of two or more d-pad, face-button or L1/L2/R1/R2 members, a box replaces their individual lines (`prompts/<face>/groups.bin`, selected by the current binding mask). - `PAGE_LAYOUTS` is a generic page-variant table. The keyboard face's System page moves the controller picture, shadows and guide panes off the page and places the action labels in two columns, with the bound key/mouse icons the keyboard font already shows. `prompts/keyboard/page.bin` holds the pane runs; the browser applies the file of the active face. Adding another page is another table row, with no new runtime code. - The Switch face keeps the game's own guide images and has no guide/page files. - Tests: all five textures generated for every face; ten slots × seventeen inputs per face; the C cut of the run selector (bound input chosen, write order); keyboard key/stick mappings across binding layouts; page-variant runs. ## Screenshots Before/after on the same save, face and spot, and the keyboard panel: see the next comment. ## How to reproduce Build this branch. Set `button_prompts=4` (PlayStation 5), load a save, open the pause menu's System page: the d-pad frame is around the d-pad and every line ends on its control. Set `button_prompts=6` (Keyboard) and open the same page: the controller is gone and the page is a two-column list of actions with their bound key/mouse icons. ## Testing **Tested:** Linux (CachyOS), Radeon 680M / Mesa RADV, 1280x720, `HOS_HEADLESS=1`, through the job queue (`--mode shared`). PlayStation 5 before: `prompts: ps5 textures, 1914 runs`; after: `3272 runs`; keyboard: `prompts: keyboard textures, 1872 runs`. The System page screenshots show the corrected d-pad frame and the keyboard panel; no prompt errors. Game-free: `tests/test_prompt_system_guides.py` fails on main and passes here; all prompt checks pass, including the new run-selector C test. `python -I -B tests/run_all.py`: 656 passed, 34 failed, 96 skipped; no prompt check fails (the unrelated failures vary between runs on main too). **Open:** labels still use the game's slots, so a crossing can remain on a face whose physical order differs; that is the next step of the design doc. Art for the other faces is separate. The F1 control-rebind page also needs a per-row "reset to default" button (planned in the design doc). **Not tested:** a control rebound on the System page in-game (the run selector is covered by the C test); other faces, languages and 4K/ultrawide in-game; live face switching to/from keyboard in-game. **Must be tested:** a rebound control and a live face change on Linux/Windows after review. ## Risks **What could break:** build-time guide images/layout patches only; a wrong part puts a line beside its control, and a wrong pane puts a label in the wrong place. The Switch face is unchanged. A hand-drawn picture with stale `parts` would put lines in the wrong place, as before. **Turning it off:** revert the commits. **Compatibility:** no saves or options changes; a rebuild regenerates the prompts. A mod's own files are never touched (the file precedence is unchanged).
Issue 1211: all five ControllerGuide_Pro textures must follow the face's picture, and every pad input must have a routable part on every face. The keyboard face's key/stick mappings are checked across several binding layouts.

Assisted-by: OpenCode (Hy4 flash Free)
fix(prompts): route all five System guide textures from the face's parts
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
PR description / Description follows the template (pull_request_target) Successful in 11s
Website / Website on Cloudflare (pull_request_target) Has been skipped
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 13s
Third-party parts / As their notes say (pull_request) Successful in 14s
b26874ab74
The game has five ControllerGuide_Pro textures; main built two per face. The bumpers, triggers and d-pad frame stayed the game's Pro Controller art, so on PlayStation the d-pad frame sat on the left stick, L1/L2 shared a dot and R2 pointed into empty space, and a live face change mixed the old lines with the new picture. Build all five from each face's parts, keeping the Switch face's images byte-identical. Add the design for the remaining work (per-binding lines for those slots, label placement, keyboard/mouse page).

Assisted-by: OpenCode (Hy4 flash Free)
Author
Member

Tested in game: Linux (CachyOS), Radeon 680M / Mesa RADV, 1280x720, HOS_HEADLESS=1, PlayStation 5 face, pause menu System page: before main 430eef4f the d-pad frame is around the left stick; on this branch it is around the d-pad. prompts: ps5 textures, 2437 runs (main 1914), no prompt errors.

Tested in game: Linux (CachyOS), Radeon 680M / Mesa RADV, 1280x720, HOS_HEADLESS=1, PlayStation 5 face, pause menu System page: before main 430eef4f the d-pad frame is around the left stick; on this branch it is around the d-pad. prompts: ps5 textures, 2437 runs (main 1914), no prompt errors.
Member

Possibly related, for context:

  • issue #1211 Game: the System page's controller lines don't follow the controller or its mapping (PS5: the d-pad's line ends on the left stick) — Directly fixes the System-page guide-line bug; follow-up slices remain.
  • PR #1589 feat(prompts): hand-drawn DualSense and Xbox pictures for the System page, and the game's own tint — Merged predecessor changed System-page controller pictures and guides; this extends guide generation.
Possibly related, for context: - issue #1211 Game: the System page's controller lines don't follow the controller or its mapping (PS5: the d-pad's line ends on the left stick) — Directly fixes the System-page guide-line bug; follow-up slices remain. - PR #1589 feat(prompts): hand-drawn DualSense and Xbox pictures for the System page, and the game's own tint — Merged predecessor changed System-page controller pictures and guides; this extends guide generation.
Author
Member

System page, PlayStation 5: before and after

Same save (Kakariko Village), 1280x720, English, button_prompts=4, pause menu → System. Left: main @ 430eef4f. Right: this branch @ b26874ab. The crop is the controller at the same spot.

Before/after, controller crop

Before, full page

After, full page

On main the d-pad's frame is drawn around the left stick (the game's Pro Controller row). On this branch it is drawn around the d-pad from the PlayStation face's own parts. Both runs used the job queue (--mode shared), HOS_HEADLESS=1 and HOS_INPUT_SCRIPT to reach the page; the log line was prompts: ps5 textures, 1914 runs before and 2437 runs after.

What is still open (WIP): the bumper/trigger/d-pad lines are still fixed to the face's default inputs, so a rebind of those controls is not followed yet; the label side/order and the keyboard/mouse bindings panel are designed but not implemented here.

## System page, PlayStation 5: before and after Same save (Kakariko Village), 1280x720, English, `button_prompts=4`, pause menu → System. Left: main @ `430eef4f`. Right: this branch @ `b26874ab`. The crop is the controller at the same spot. ![Before/after, controller crop](https://git.magicbean.dev/attachments/a1c1568f-895a-441d-8a7e-ba01071205af) ![Before, full page](https://git.magicbean.dev/attachments/05d66e73-52aa-4fb2-a319-0b9b563cb09e) ![After, full page](https://git.magicbean.dev/attachments/b827522a-c330-4480-b78f-392f90f69d00) On main the d-pad's frame is drawn around the **left stick** (the game's Pro Controller row). On this branch it is drawn around the **d-pad** from the PlayStation face's own parts. Both runs used the job queue (`--mode shared`), `HOS_HEADLESS=1` and `HOS_INPUT_SCRIPT` to reach the page; the log line was `prompts: ps5 textures, 1914 runs` before and `2437 runs` after. What is still open (WIP): the bumper/trigger/d-pad lines are still fixed to the face's default inputs, so a rebind of those controls is not followed yet; the label side/order and the keyboard/mouse bindings panel are designed but not implemented here.
Author
Member

Updated screenshots (full fix)

Same save, 1280x720, HOS_HEADLESS=1, pause menu → System. Left: main @ 430eef4f. Right: this branch @ cbb6548f. The crop is the controller at the same spot; the frame now sits on the d-pad, and every line is selected from the face's parts by its binding.

Before/after, controller crop

After, full page

Keyboard / mouse bindings panel

button_prompts=6 (Keyboard), the same page. The controller picture and its guide lines are gone; the action labels are in two columns with the keys actually bound (Z, Q, M, WASD, mouse buttons, etc.). The panel is data-driven (PAGE_LAYOUTS → prompts/keyboard/page.bin), so a different page or face can be added without runtime code changes.

Keyboard panel, full page

Keyboard panel, zoom

The runs logged: main ps5 textures, 1914 runs; this branch ps5 textures, 3272 runs; keyboard 1872 runs. All runs were through scripts/job_queue.py --mode shared.

## Updated screenshots (full fix) Same save, 1280x720, `HOS_HEADLESS=1`, pause menu → System. Left: main @ `430eef4f`. Right: this branch @ `cbb6548f`. The crop is the controller at the same spot; the frame now sits on the d-pad, and every line is selected from the face's parts by its binding. ![Before/after, controller crop](https://git.magicbean.dev/attachments/9775c38f-9f13-4086-b096-6f6098057c3f) ![After, full page](https://git.magicbean.dev/attachments/a905aae8-bb90-471e-8ffe-ac03b4520f52) ## Keyboard / mouse bindings panel `button_prompts=6` (Keyboard), the same page. The controller picture and its guide lines are gone; the action labels are in two columns with the keys actually bound (Z, Q, M, WASD, mouse buttons, etc.). The panel is data-driven (`PAGE_LAYOUTS` → `prompts/keyboard/page.bin`), so a different page or face can be added without runtime code changes. ![Keyboard panel, full page](https://git.magicbean.dev/attachments/8aa977ee-7f57-42ac-85e7-a7fe0c74dd8c) ![Keyboard panel, zoom](https://git.magicbean.dev/attachments/6101c492-3ee8-43a5-9f30-b37197f80448) The runs logged: main `ps5 textures, 1914 runs`; this branch `ps5 textures, 3272 runs`; keyboard `1872 runs`. All runs were through `scripts/job_queue.py --mode shared`.
The System page has ten slots; each needs a line for every pad input, and the browser must pick the bound input's run and write it after the base textures. The keyboard face needs a layout variant that hides the controller and puts the bindings in two columns.

Assisted-by: OpenCode (Hy4 flash Free)
feat(prompts): every System guide follows its binding, plus a keyboard bindings panel
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 14s
Third-party parts / As their notes say (pull_request) Successful in 15s
PR description / Description follows the template (pull_request_target) Successful in 4s
cbb6548f72
GUIDE_PAGES describes all ten System slots. The build writes one line per slot and pad input to guide.bin; host/prompts.c selects the bound one and writes it into Common.bntx after the base runs (fixing the write order that hid the lines). PAGE_LAYOUTS describes generic page variants; the keyboard face's System page moves the controller art off the page and its binding labels into two columns, selected per face at runtime, including after a live change.

Assisted-by: OpenCode (Hy4 flash Free)
gab9281 force-pushed fix/system-guide-lines from 4576b8e158
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 15s
PR description / Description follows the template (pull_request_target) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
to 0de72e14bb
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 17s
CI / Conventional Commit title (pull_request) Successful in 16s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
CI / Workflow lint (actionlint) (pull_request) Successful in 27s
Third-party parts / As their notes say (pull_request) Successful in 31s
2026-11-18 19:35:06 +00:00
Compare
Author
Member

Aggressive rebinding, all five controllers

These are the build's line-target heatmaps, rendered from the same data the game receives: the controller picture with the invisible button map (one colour per pad input) and every System label's line drawn in the colour of the input it is bound to. Three cases for each face:

  1. Default bindings — each label on its own control.
  2. Aggressive split — controls moved to the opposite side, sticks and shoulders exchanged, several controls sharing one input.
  3. Every control rebound to L3 — all ten lines converge on one input (worst-case overlap).

All faces, three binding sets

PS5 on its own, larger:

PS5 default bindings

PS5 aggressive split

PS5 all controls rebound to L3

Switch face, game's own guide images

The Switch face keeps the game's original guide images (byte-identical prompts), so its lines do not move with a rebind of the four fixed slots; the other four faces use guide.bin and do. In the split/converge columns you can see lines crossing and inputs being shared — the router avoids other lines where it can, but when ten labels target one input the overlap near that input is unavoidable. tests/test_prompt_rebinding_harsh.py checks all ten slots against representative pad inputs on every face and measures the overlap away from the target; tests/test_prompt_guide_runs.py checks the runtime selection in C.

The keyboard panel's wide key icons have also been moved clear of their label text (using the per-pane dx in PAGE_LAYOUTS), so each row shows a box with its key icon and binding rather than the icon drawn over the words.

## Aggressive rebinding, all five controllers These are the build's line-target heatmaps, rendered from the same data the game receives: the controller picture with the invisible button map (one colour per pad input) and every System label's line drawn in the colour of the input it is bound to. Three cases for each face: 1. **Default bindings** — each label on its own control. 2. **Aggressive split** — controls moved to the opposite side, sticks and shoulders exchanged, several controls sharing one input. 3. **Every control rebound to L3** — all ten lines converge on one input (worst-case overlap). ![All faces, three binding sets](https://git.magicbean.dev/attachments/0cd9a29b-c705-4e4e-a5e8-e0dc28f92634) PS5 on its own, larger: ![PS5 default bindings](https://git.magicbean.dev/attachments/fa8f2546-7028-4031-9c6b-77efa50212fa) ![PS5 aggressive split](https://git.magicbean.dev/attachments/6c61a064-081d-49f8-b56c-f8610160a36a) ![PS5 all controls rebound to L3](https://git.magicbean.dev/attachments/3767eed6-37ed-4a9b-b786-c76a742f4974) ![Switch face, game's own guide images](https://git.magicbean.dev/attachments/eb9a80b3-4587-416d-be39-b54b4d65b573) The Switch face keeps the game's original guide images (byte-identical prompts), so its lines do not move with a rebind of the four fixed slots; the other four faces use `guide.bin` and do. In the split/converge columns you can see lines crossing and inputs being shared — the router avoids other lines where it can, but when ten labels target one input the overlap near that input is unavoidable. `tests/test_prompt_rebinding_harsh.py` checks all ten slots against representative pad inputs on every face and measures the overlap away from the target; `tests/test_prompt_guide_runs.py` checks the runtime selection in C. The keyboard panel's wide key icons have also been moved clear of their label text (using the per-pane `dx` in `PAGE_LAYOUTS`), so each row shows a box with its key icon and binding rather than the icon drawn over the words.
docs(prompts): heatmaps for split and converged bindings on every face
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
CI / Workflow lint (actionlint) (pull_request) Successful in 29s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 31s
Third-party parts / As their notes say (pull_request) Successful in 46s
PR description / Description follows the template (pull_request_target) Successful in 19s
7ce4d44d43
The reviewer images now use the same shared avoidance as the build, cover all five controllers and three binding sets (default, aggressive split, all inputs to one stick), and include the game's own Switch guides for comparison.

Assisted-by: OpenCode (Hy4 flash Free)
Author
Member

Button positioning for every face (invisible map over the picture)

These show each face's controller picture with the invisible button map drawn on top: one coloured disc per pad input at the position the guide router uses, plus the keep-out boxes (touchpad, screen, mute). The discs are drawn with the face's parts() radii, so this is the exact geometry the lines target.

All faces, button map over the controller

Individual faces, full resolution:

Switch

Xbox

PlayStation 4

PlayStation 5

Steam Deck

The shoulders/triggers have a radius of 0 in parts() (they are edges, not discs), so they appear as the small ltr1/rtr1/lsho/rsho labels at the top of the picture, not as discs. A line for a button or a stick is routed to the edge of its part (2 px inside, as the game's own lines do), and a stick's line goes to its centre — so a line ending just outside a coloured disc is expected, not a misalignment. Please point at any disc that sits off its control and I'll correct that face's parts().

## Button positioning for every face (invisible map over the picture) These show each face's controller picture with the **invisible button map** drawn on top: one coloured disc per pad input at the position the guide router uses, plus the keep-out boxes (touchpad, screen, mute). The discs are drawn with the face's `parts()` radii, so this is the exact geometry the lines target. ![All faces, button map over the controller](https://git.magicbean.dev/attachments/24b2022a-e913-4731-9bb9-b8efa53a558c) Individual faces, full resolution: ![Switch](https://git.magicbean.dev/attachments/c05a3b1f-b3ca-420f-a5d8-4e306a65b8b6) ![Xbox](https://git.magicbean.dev/attachments/1929ac42-c2b3-4bc6-b5a9-f31606f4de20) ![PlayStation 4](https://git.magicbean.dev/attachments/69626af5-8253-450f-beb1-6fa5e5a25940) ![PlayStation 5](https://git.magicbean.dev/attachments/ac66bd99-a30e-4ec1-92e4-a8435e8fad51) ![Steam Deck](https://git.magicbean.dev/attachments/a2bbe3bf-52c9-4aa7-a0a0-edf623646792) The shoulders/triggers have a radius of 0 in `parts()` (they are edges, not discs), so they appear as the small `ltr1`/`rtr1`/`lsho`/`rsho` labels at the top of the picture, not as discs. A line for a button or a stick is routed to the **edge** of its part (2 px inside, as the game's own lines do), and a stick's line goes to its centre — so a line ending just outside a coloured disc is expected, not a misalignment. Please point at any disc that sits off its control and I'll correct that face's `parts()`.
docs(prompts): label L1/L2/L3 clearly on the button maps
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 15s
PR description / Description follows the template (pull_request_target) Successful in 26s
CI / Workflow lint (actionlint) (pull_request) Successful in 34s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 39s
Third-party parts / As their notes say (pull_request) Successful in 41s
7081b83472
Bumpers and triggers are edge points in parts(), so they now get diamonds, a leader and a large L1/L2/R1/R2 label; sticks get an L3/R3 click label and a legend explains the equivalents.

Assisted-by: OpenCode (Hy4 flash Free)
Author
Member

Clearer L1 / L2 / L3 equivalents

Updated button maps: the bumpers and triggers are now diamonds with leaders and large labels, and the sticks carry L3 / R3 click labels. The legend at the top reads L1 = bumper, L2 = trigger, L3 = stick click (R1/R2/R3 on the right). This is the same invisible map data the line router uses, drawn over each face's picture — no game texture is changed.

All faces, L1/L2/L3 labelled

Switch

Xbox

PlayStation 4

PlayStation 5

Steam Deck

The coloured leader line points to the exact edge coordinate in parts() that the L1/L2 guide lines end on; the coloured disc for L3 is the stick's centre, where its line ends.

## Clearer L1 / L2 / L3 equivalents Updated button maps: the bumpers and triggers are now **diamonds with leaders and large labels**, and the sticks carry **L3 / R3 click** labels. The legend at the top reads `L1 = bumper, L2 = trigger, L3 = stick click (R1/R2/R3 on the right)`. This is the same invisible map data the line router uses, drawn over each face's picture — no game texture is changed. ![All faces, L1/L2/L3 labelled](https://git.magicbean.dev/attachments/0673c397-497b-459a-96c8-b67ca0c91add) ![Switch](https://git.magicbean.dev/attachments/c23b16fa-3e47-471e-851b-47dbdd1e564e) ![Xbox](https://git.magicbean.dev/attachments/b7016d55-ce99-4b4e-8d25-cfd64e60ca7e) ![PlayStation 4](https://git.magicbean.dev/attachments/cfdc80a3-4df4-4204-92d9-d98405bb0e3a) ![PlayStation 5](https://git.magicbean.dev/attachments/4c142495-100b-4686-a7cc-a58fecadccc3) ![Steam Deck](https://git.magicbean.dev/attachments/2be4e8a8-4310-47bc-83f8-a3f0a551e021) The coloured leader line points to the exact edge coordinate in `parts()` that the L1/L2 guide lines end on; the coloured disc for L3 is the stick's centre, where its line ends.
fix(prompts): emit grouped guide lines under every member's Switch button
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
PR description / Description follows the template (pull_request_target) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 14s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Third-party parts / As their notes say (pull_request) Successful in 22s
f4cc58b02d
The game selects a group's single line by the Switch button of the label it is showing. Emitting it under only one assumed member made the line disagree with the label icon when another member was rebound. Now the d-pad and face-button lines are written for every member, so the runtime picks the matching line for any of them.

Assisted-by: OpenCode (Hy4 flash Free)
Author
Member

Why the wild rebinds showed a line on the "wrong" button

The d-pad and face-button groups have one guide line for several labels, but the game picks that line by the Switch button of the label it is showing. The build had emitted it under only one assumed member (left for the d-pad, a for the face buttons). When a different member was rebound, the label's icon changed with its own binding while the line stayed the one for the assumed member — hence the disagreement in the aggressive screenshots.

Fixed in f4cc58b0: a group's line is now emitted under every member's Switch button (U/D/L/R and A/B/X/Y), so whichever member the game uses to select the line, the run matches that member's binding. guides.bin now has 17 pad-input lines for all 16 Switch buttons on every drawn face; the game-free checks pass.

Remaining limitation: a group has one line, so if several of its members are rebound to different inputs at once, only one of those targets can be shown. Proper per-label lines would need extra line panes in PaSystemController_00; that is layout work beyond this fix.

## Why the wild rebinds showed a line on the "wrong" button The d-pad and face-button groups have **one** guide line for several labels, but the game picks that line by the Switch button of the label it is showing. The build had emitted it under only one assumed member (`left` for the d-pad, `a` for the face buttons). When a *different* member was rebound, the label's icon changed with its own binding while the line stayed the one for the assumed member — hence the disagreement in the aggressive screenshots. Fixed in `f4cc58b0`: a group's line is now emitted under **every member's** Switch button (U/D/L/R and A/B/X/Y), so whichever member the game uses to select the line, the run matches that member's binding. `guides.bin` now has 17 pad-input lines for all 16 Switch buttons on every drawn face; the game-free checks pass. Remaining limitation: a group has one line, so if several of its members are rebound to *different* inputs at once, only one of those targets can be shown. Proper per-label lines would need extra line panes in `PaSystemController_00`; that is layout work beyond this fix.
docs(prompts): design dynamic group boxes that replace lines
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
PR description / Description follows the template (pull_request_target) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 18s
1411b53379
Subset frames keyed by which members are actually bound, for d-pad, face buttons and L1/L2/R1/R2; one box replaces several leaders.

Assisted-by: OpenCode (Hy4 flash Free)
feat(prompts): dynamic group boxes replace individual lines
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 14s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
Third-party parts / As their notes say (pull_request) Successful in 27s
PR description / Description follows the template (pull_request_target) Successful in 7s
da0db02953
Build a box for every subset of two or more d-pad, face-button or L1/L2/R1/R2 members, and store it in prompts/<face>/groups.bin keyed by the member mask. The browser computes the mask from the current bindings and writes that box, blanking the individual lines it replaces (and the second label row for the shoulders). A single grouped member keeps its own line. Run selector is covered by a new C-cut test.

Assisted-by: OpenCode (Hy4 flash Free)
Author
Member

Dynamic group boxes are implemented

The "boxes instead of lines" idea from the design doc now runs in the game: da0db029 builds a box for every subset of two or more members of the d-pad, face-button and L1/L2 / R1/R2 groups, stored in prompts/<face>/groups.bin keyed by the member mask. The browser computes the mask from the current bindings and writes that subset's box, blanking the individual leader lines it replaces (and the second label row for the shoulders). A group with only one member bound keeps its own line.

PlayStation 5, default bindings, System page:

In-game System page with dynamic group boxes

Controller crop

The d-pad frame is around the d-pad, the face frame around the symbols, and the two shoulders on each side share a small box instead of two lines. Logs: prompts: ps5 textures, 6053 runs (up from 4323, the added group-box runs).

tests/test_prompt_group_runs.py compiles the real mask selector: no box when neither or only one member is bound, the subset's runs when two are. Building another group is a row in GUIDE_DYNAMIC_GROUPS; no runtime code changes.

## Dynamic group boxes are implemented The "boxes instead of lines" idea from the design doc now runs in the game: `da0db029` builds a box for **every subset of two or more members** of the d-pad, face-button and L1/L2 / R1/R2 groups, stored in `prompts/<face>/groups.bin` keyed by the member mask. The browser computes the mask from the current bindings and writes that subset's box, blanking the individual leader lines it replaces (and the second label row for the shoulders). A group with only one member bound keeps its own line. PlayStation 5, default bindings, System page: ![In-game System page with dynamic group boxes](attach:dyn-ps5-page.png) ![Controller crop](attach:dyn-ps5-zoom.png) The d-pad frame is around the d-pad, the face frame around the symbols, and the two shoulders on each side share a small box instead of two lines. Logs: `prompts: ps5 textures, 6053 runs` (up from 4323, the added group-box runs). `tests/test_prompt_group_runs.py` compiles the real mask selector: no box when neither or only one member is bound, the subset's runs when two are. Building another group is a row in `GUIDE_DYNAMIC_GROUPS`; no runtime code changes.
Author
Member

Dynamic group boxes are implemented

The "boxes instead of lines" idea from the design doc now runs in the game: da0db029 builds a box for every subset of two or more members of the d-pad, face-button and L1/L2 / R1/R2 groups, stored in prompts/<face>/groups.bin keyed by the member mask. The browser computes the mask from the current bindings and writes that subset's box, blanking the individual leader lines it replaces (and the second label row for the shoulders). A group with only one member bound keeps its own line.

PlayStation 5, default bindings, System page:

In-game System page with dynamic group boxes

Controller crop

The d-pad frame is around the d-pad, the face frame around the symbols, and the two shoulders on each side share a small box instead of two lines. Logs: prompts: ps5 textures, 6053 runs (up from 4323, the added group-box runs).

tests/test_prompt_group_runs.py compiles the real mask selector: no box when neither or only one member is bound, the subset's runs when two are. Building another group is a row in GUIDE_DYNAMIC_GROUPS; no runtime code changes.

## Dynamic group boxes are implemented The "boxes instead of lines" idea from the design doc now runs in the game: `da0db029` builds a box for **every subset of two or more members** of the d-pad, face-button and L1/L2 / R1/R2 groups, stored in `prompts/<face>/groups.bin` keyed by the member mask. The browser computes the mask from the current bindings and writes that subset's box, blanking the individual leader lines it replaces (and the second label row for the shoulders). A group with only one member bound keeps its own line. PlayStation 5, default bindings, System page: ![In-game System page with dynamic group boxes](https://git.magicbean.dev/attachments/05bac941-8f1a-427d-a370-d281df22baa0) ![Controller crop](https://git.magicbean.dev/attachments/56ac5fd9-12eb-46e6-87f4-33a1afae0d26) The d-pad frame is around the d-pad, the face frame around the symbols, and the two shoulders on each side share a small box instead of two lines. Logs: `prompts: ps5 textures, 6053 runs` (up from 4323, the added group-box runs). `tests/test_prompt_group_runs.py` compiles the real mask selector: no box when neither or only one member is bound, the subset's runs when two are. Building another group is a row in `GUIDE_DYNAMIC_GROUPS`; no runtime code changes.
fix(prompts): group shoulder labels in one box with two lines
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
PR description / Description follows the template (pull_request_target) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 13s
Third-party parts / As their notes say (pull_request) Successful in 15s
b251cac26a
The shoulder pair now draws a single bracket around the two label rows in the guide texture, with one line from it to each of the bumper and trigger, instead of two separate label boxes. The earlier controller-side shoulder box is removed.

Assisted-by: OpenCode (Hy4 flash Free)
Author
Member

Shoulder pair: one box, two lines

This is the shape you described: the R2/R1 (and L2/L1) labels are enclosed by one bracket, and one line leaves that bracket for each control — one to the trigger, one to the bumper. No two separate input boxes. Xbox, button_prompts=2, System page:

Xbox shoulder pair: one bracket, two lines

Full page:

Xbox System page

The bracket is drawn in the guide texture at the label bar, so the game's own label text and icons stay on top of it. When only one of the pair is bound to its group input, no bracket is written and that input keeps its own single line in guide.bin.

## Shoulder pair: one box, two lines This is the shape you described: the R2/R1 (and L2/L1) labels are enclosed by one bracket, and **one line leaves that bracket for each control** — one to the trigger, one to the bumper. No two separate input boxes. Xbox, `button_prompts=2`, System page: ![Xbox shoulder pair: one bracket, two lines](https://git.magicbean.dev/attachments/cac09f2d-cf46-40ac-a94b-b2377231fa3a) Full page: ![Xbox System page](https://git.magicbean.dev/attachments/7d9bf1e6-7775-493b-b1a3-93b86746daca) The bracket is drawn in the guide texture at the label bar, so the game's own label text and icons stay on top of it. When only one of the pair is bound to its group input, no bracket is written and that input keeps its own single line in `guide.bin`.
wip(prompts): shoulder pair: one line from the label bracket to one control box
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
PR description / Description follows the template (pull_request_target) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
Third-party parts / As their notes say (pull_request) Successful in 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 2m24s
bcafa6f5dd
Reference commit before closing this PR in favour of #1700.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Superseded by #1700, which draws the System guide lines at run time (the issue asks for dynamic lines, not baked textures). This branch stays as a reference for what was tried: per-face parts for all five guide textures, per-binding baked runs, group boxes by member mask, the keyboard bindings panel, and (last commit bcafa6f5) the shoulder pair with one line from the label bracket to one control box.

Superseded by #1700, which draws the System guide lines at run time (the issue asks for dynamic lines, not baked textures). This branch stays as a reference for what was tried: per-face parts for all five guide textures, per-binding baked runs, group boxes by member mask, the keyboard bindings panel, and (last commit bcafa6f5) the shoulder pair with one line from the label bracket to one control box.
gab9281 closed this pull request 2026-11-19 05:18:43 +00:00
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
PR description / Description follows the template (pull_request_target) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
Third-party parts / As their notes say (pull_request) Successful in 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 2m24s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!1623
No description provided.