WIP: feat(items): support custom items in Quick Select Items #2528
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2528
Loading…
Reference in a new issue
No description provided.
Delete branch "snaildev99/Longshot:feat/rust-usable-items"
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?
Summary
Mods can register usable items in Quick Select Items, which opens with L or R by default. Confirming an item equips it. A script can read the selection and set the count shown on the tile and HUD.
An item can reserve a + menu slot with
slot: { id }. Until the layout supplies its button, the item remains available in Quick Select Items. The Hookshot retains its icon and the previous native item loses its highlight when a custom item is equipped. Creating layout buttons is future work.This stacks on controller PR #2516 at
f8b0c6c68, based on Rust Mod API #2434 atb9ac71657. The forge target ismod-api. This supersedes #2340. Seegame/crates/oot/src/equipment.rsfor menu behavior anddocs/modding/api-guide.mdfor the mod-author example. Item-only diffTesting
Previous Windows hand test. Windows, GeForce RTX 3090, NVIDIA 610.88. Hand-tested custom selection, HUD counts and icon shadows in Adult Kakariko with three custom items. On
0243535e9, custom items appeared on the left. With a custom item equipped, the + Items page opened, closed and reopened, the Hookshot was visible, and the previously equipped native item stayed unhighlighted.Before the compiler-selection fix, all 236 content, 312 OOT and 30 game-site tests passed with the game-site suite run serially. The Rust mod tool regression passed for selection, trigger release and independent equipment slots. The schema consistency check passed. Seven repository hook-site checks passed, and all 27 ported hook contracts and placements match the prior implementation. The broader Windows suites reported three failures: the API loader test
a_content_mods_changed_module_runs_again_and_its_outputs_are_served, the mod tool emulator discovery testeden_and_ryujinx_mods_are_found_with_their_switches, andevery_example_passes_its_testsin the UI2 demo. All three failures also reproduced on the parent controller revision.The standard Windows builder at this #2434 revision misses the ImGui include flags for
vk_ui2.cpp. The local play builds use the renderer's existing ImGui flags for that file.Still to test:
Measurements
The earlier Windows play log recorded 60.0 fps in its final two reporting intervals. A matched, interleaved performance comparison against the dependency base is pending.
Risks
Both menus use the same pouch row IDs. The changes reorder display entries and skip missing buttons while retaining those IDs. Incorrect mapping could affect a native upgrade, cursor movement or an icon. Custom selection lasts for the session.
Checklist
The integration target is
mod-api. Windows hand-testing passed on the earlier head and is pending on the rebased build. The strict suite, matched timings, paired screenshots and Linux verification remain open.Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.mainand here, for a change that shows on screen.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Tested in game: Windows, GeForce RTX 3090, NVIDIA 610.88. In Adult Kakariko on
0243535e9, the tester confirmed custom item selection and left-side order in Quick Select Items, HUD icons and counts, and reopening the + Items page with the Hookshot visible and the previous native highlight cleared.Possibly related, for context:
1a44c88c92bc334cec67bc334cec67c2fe49e249Rebased Quick Select Items on #2516 and ported the selection regression to #2434's Rust mod tool. The focused tests and schema consistency check passed on
c2fe49e24. The Testing section distinguishes the earlier Windows playtest from checks run on this head. Item-only diffConfirmed all three broader test failures on the parent revision. The game builder placed 193 hook sites on this branch, up from 166 on the controller base. All 27 added item hooks were placed.
@rebase
I rebased this pull request onto
mod-api(93c7a8e8ae): the new head isecc9979525.Conflicts resolved
Nothing was built or run: read the resolution before merging.
Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
c2fe49e249ecc9979525@review
@review
Recommendation: Approve. A new controller test ignores the configured compiler and can fail on supported developer setups. The rebased feature and controller transport also still need in-game verification. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The change lets mods register custom Quick Select Items, display counts and reserve item-use input. It also carries the stacked Windows sandbox controller transport and changes load-event handling.
Should fix (1): not blocking, but worth doing before merging.
tests/test_pad_motion_policy.py:12: The new test hard-codes gcc and ignores CC. (more on the line) Do: Honor CC and select an available supported compiler by default, as the other new controller tests do.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L1.Questions (1) (not confirmed from the code; they don't hold the recommendation)
game/crates/oot/src/items.rs:569: Can two distinct save-load requests reach save.load in consecutive polls, and if so, how can that sequence be reproduced?Checks: Still running:
PR description / Description follows the template (pull_request_target),Guide screenshots / Guide images and local UI source review (pull_request),Third-party parts / As their notes say (pull_request).More: does it help, other systems, switches, what was read
Does it help: Unproven on the rebased head. The earlier Windows playtest confirmed selection, counts and menu reopening on
0243535e9; the reported 60.0 fps has no matched base comparison.Other systems: The item hooks affect native inventory highlighting, HUD updates, save-load notifications and input reservation. The stacked transport affects Windows sandbox controllers, motion and rumble; Linux also receives the motion-policy and item-input changes. The supplied runs do not verify these paths on the rebased head.
Switches: HOS_SWITCH2 remains on by default on unconfined Windows; its USB driver is unavailable in the Windows sandbox. HOS_SWITCH2_RUMBLE_TEST remains off and is likewise limited to unconfined Windows. The switch table and documentation describe these limits.
Reviewed:
ecc9979525against93c7a8e8ae: Read the repository rules, PR template, standards, commit log, item equipment implementation, controller broker implementation and the focused diffs for content, item services, input and tests. Skimmed the remaining changed files and generated site declarations; not every changed code file was read in full. Tooling's sibling AGENTS.md and docs/review-checklist.md were unavailable.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no builds, tests or project scripts were run.
Overlaps and merge order: The PR states that it stacks on #2516 and #2434 and supersedes #2340; the network was unavailable to verify their current status or merge order.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.
@ -0,0 +9,4 @@def main():parser = argparse.ArgumentParser()parser.add_argument("--cc", default="gcc")L1 (should fix): The new test hard-codes gcc and ignores CC.
When: A supported Windows or Linux development environment with clang configured through CC but no gcc executable fails this check before exercising the motion policy.
Do: Honor CC and select an available supported compiler by default, as the other new controller tests do.
@fix
Recommendation: Approve. The code is ready: only testing is left. The rebased item hooks and controller transport still need in-game verification and a matched cost comparison. The compiler-selection fix preserves the test’s purpose. Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
34dfb5c177. It was already up to date withmod-api. I edited its description to match the change.Changed
Nothing was built or run: the checks run again on the new head.
Mods can add usable items to Quick Select Items and control their displayed counts. The change also carries controller transport work; its runtime cost and behavior on the rebased head remain unverified.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
Checks: they run again on this head; a failure shows on the pull request.
More: does it help, other systems, switches, what was read
Does it help: Unproven on the rebased head. An earlier Windows playtest confirmed custom selection, counts and menu behavior; its 60.0 fps log is not a matched comparison.
Other systems: The item hooks affect menu and HUD behavior; controller transport affects Windows input, motion and rumble. Windows and Linux in-game verification remains outstanding.
Switches: HOS_SWITCH2 remains on by default and HOS_SWITCH2_RUMBLE_TEST remains off; their documented scope changes to unconfined Windows. The documentation also states that HOS_HD_RUMBLE and HOS_RUMBLE_BACKEND cannot enable HD rumble in confined Windows play. The defaults have not been validated on the rebased head.
Reviewed:
34dfb5c177against93c7a8e8ae: Read tests/test_pad_motion_policy.py, AGENTS.md, CONTRIBUTING.md and the pull request template in full; read the motion polling code and compiler-selection references. Skimmed the overall diff statistics and excerpts of equipment.rs and pad_broker_windows.c; the remaining changed files were not read in full. docs/review-checklist.md and the adjacent Tooling AGENTS.md were unavailable.; nothing run (a code review).Checked and fine:
Testing: No tests were run during this read-only review. The reported earlier Windows hand test and pre-fix automated results are recorded in the description; CI has not run on this head.
Overlaps and merge order: Stacks on controller PR #2516 and Rust Mod API PR #2434; the dependencies need to merge first.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.