fix(menu): show learned songs correctly in the inventory editor #429
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!429
Loading…
Reference in a new issue
No description provided.
Delete branch "gustavogyn/Longshot:fix/song-inventory-flags"
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?
The Debug inventory editor keeps showing learned songs as Locked because it reads their pouch quantity. Unlock can succeed in the game while the editor still offers Unlock; this change makes its status and toggle follow the saved learned-song flag.
Why
Songs set saved
IsGet.Item_Melody_*Bool flags and do not retain ordinary pouch quantities. The editor must use those flags to display and toggle the learned state.What changed
host/hos_main.c: map the twelve song entries to their learned flags; read those flags for status, toggle only the selected flag, report unavailable state, and use the same values in the inventory diagnostic log. Ordinary items and mask handling retain their pouch paths.tests/test_oot_song_inventory.py: compile the real host helpers with fake GameData and pouch calls. Cover all twelve mappings, unlock/relock, missing flags, refused writes, quantity requests, and an ordinary item.docs/tested/: record the player's confirmed Linux run and a separate unattended Epona toggle run with screenshots.Flags and settings
None. No new settings, environment switches, renderer API changes, or shader changes.
Measurements
main:
5e072fc8c2(2026-11-14)this PR: fix/song-inventory-flags @
ba05271c85Hardware: RTX 5090, NVIDIA 620.70.06, Ryzen 9 9950X3D, 31 GiB RAM, CachyOS Linux, kernel 7.3.4-1-cachyos, Wayland.
Scene: Hyrule Field, adult Link; 3840x2160, Debug tools enabled. This is a correctness fix; no frame-rate or performance claim.
Method: game-free regression against the host helpers, plus the player's manual validation and session log. The manual build was main
0caf0618with this song fix (source 71a08907). The two subsequent upstream commits change renderer code and test records, not this inventory path; the cleanup since that run changes comments and mask-only local setup, not the song logic.How to reproduce: load a save with a learned song, press F1, enable Debug tools, open Inventory > Quest, inspect that song, then Relock and Unlock it. Its status must match the game's song list.
5e072fc8c2ba05271c85Player log, manual fixed build:
Unattended run02: this branch on main
5e072fc8, built withdev_packs.py(sourcedd8ba6a9), in a separate runtime and virtual display. Same PC as above; 1600x900 window / 1600x896 output, DLSS Transformer 2 (M), 83% render resolution, frame generation Off,RX_VK_PRECOMPILE=0,HOS_AUDIO=0. A copied save loaded Hyrule Field with adult Link on horseback. Enter performed one relock/unlock cycle; mouse clicks performed another. The menu showed Locked / Unlock and Unlocked / Relock after the respective operations. The original save folders were read-only in the test process; afterward all 14 source files matched their original SHA-256, size and modification time, and the shared-save links were unchanged.Regression against main
5e072fc8:FAIL:128 oot_item_count(&c, name) == 1. With this PR:PASS: all 12 songs read and toggle their saved flags; ordinary inventory still uses the pouch.Testing
Tested: Live song checks cover Epona's Song and Song of Storms. The player confirmed the corrected UI in the game on the Linux configuration above; the unattended run02 also verified both Epona toggle directions with Enter and the mouse, with screenshots and flag-transition logs. The regression passes with GCC and Clang, including refused writes and missing flags. The repository test-record validator passes. The full branch suite is recorded below.
Full branch suite:
543 passed, 3 failed, 16 skipped in 171 s(python -I -B tests/run_all.py --jobs 4).The known baseline failures are
test_framegen_resources.py(missing fixture driver-gate declarations),test_module_ids.py(stale source-function signature), andtest_pad_layout.py(missing fixture HoldToggle declaration). They were reproduced from unchanged upstream files; this PR does not change their source inputs.Not tested: Native Windows compilation/runtime and other GPUs. The ten remaining mappings have game-free coverage; they were not changed during the live runs.
Needs other testers:
None required before review by the author's decision. Windows compilation and runtime remain untested; a Windows check would be welcome but is not being requested as a review prerequisite for this small host-logic fix.
Screenshots
Original report and run02 screenshots
The original report image predates the fix; its exact commit was not recorded. The two new screenshots are from this PR on main
5e072fc8, in the same Hyrule Field scene: Epona's Song Locked / Unlock, then Unlocked / Relock. They were captured from the actual game window, with a copied save.Risk and rollback
Limited to debug inventory operations for the twelve fixed songs. An incorrect mapping could affect a different learned flag; the regression independently checks all mappings against their
IsGet.name hashes and verifies that unrelated state is unchanged. Missing flags are unavailable and refused writes do not fall back to pouch edits. Revert this commit to restore the previous editor behavior.Reviewer notes
Start with
oot_item_countand the song branch inoot_inventory_edit; the regression exercises those actual helpers. The change uses existing GameData helpers and standard C types and does not add platform-specific code or dependencies.The author requested that this minor correctness fix be marked ready using the Linux game validation and regression evidence already recorded. Windows validation and the checklist's interleaved gameplay comparison remain outstanding and are disclosed above; they have not been represented as completed.
Issues
No issue linked; reported and reproduced by the player.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md; no appended row or assembled view).mainand passing here.tests/that reads changed source updated in this PR, not weakened. The new regression compiles the actual host helpers.Captured the actual game window on an isolated save copy in Hyrule Field. Enter and the mouse action button each completed a relock/unlock cycle. The original save files and shared-save links were verified unchanged after the test.
Original report image (exact build commit was not recorded):
this PR @
ba05271c85after Relock: Epona's Song is Locked and the action reads Unlock.this PR @
ba05271c85after Unlock: Epona's Song is Unlocked and the action reads Relock.The new screenshots come from the branch build on main
5e072fc8(source dd8ba6a9), before committing the already-built source. The configuration and run are recorded in docs/tested/2026-11-14-song-inventory-gustavo-run02.md.Added the original report image and actual game screenshots of both Epona toggle states. Run02 verified Enter and mouse activation using a copied save; original save checksums, modification times and links were unchanged. Windows validation and interleaved gameplay comparisons remain outstanding, so this stays WIP.
Clarified the live-testing scope and recorded the source-reading regression in the checklist. Epona and Storms were checked in the game on Linux; the remaining ten mappings have game-free coverage.
Marking this minor host-logic fix ready for review at the author's request, based on the existing Linux game validation, screenshots and regression evidence. Windows is unavailable to the author and remains untested. The change uses existing GameData helpers and standard C types, with no new platform-specific code or dependencies. The unmet Windows and interleaved-gameplay checklist items remain unticked and disclosed; they are being waived as prerequisites for review.
WIP: fix(menu): show learned songs correctly in the inventory editorto fix(menu): show learned songs correctly in the inventory editorView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.