feat(menu): live rupee editing in Debug Inventory #2814
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
5 participants
Notifications
Total time spent: 1 hour
Due date
cfw34683
1 hour
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2814
Loading…
Reference in a new issue
No description provided.
Delete branch "cfw34683/Longshot:feat/2717-live-rupee-editing"
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?
See #2717 (split from #2753). Rebased onto
main(d6e819e08) and ported to the per-iteminv_*Inventory UI.Summary
Adds live rupee editing via Debug → Inventory → Upgrades → Rupees (
inv_rupees,0..500,commitOnRelease = true):game/crates/game-core/src/travel.rs: AppendedRUPEE_ITEM("PlayerStatus.CurrentRupee") at the end ofINVENTORY_ITEMSso existing action indices stay unchanged. Addedrupee_cap()(99 / 200 / 500 by owned wallet, returningNoneif either wallet lookup fails) and wireditem_count()toGameData::number(FlagKind::Int, layout::player::FLAG_RUPEES).game/crates/game-core/src/debug.rs(inventory_edit): Clamps rupee edits to[0, cap], refuses on failed wallet lookups, and queuestarget - haveviaGameData::add_int_queuedso both live rupees and the save copy update. Addedrupee_edits_respect_wallet_caps_and_refuse_failed_lookupsunit test.game/mods/cheats/mod.toml,game/mods/cheats/debug.json,game/mods/menu/test/menu.test.ts: Added theinv_rupeesslider right afterinv_walletininv_upgrades.Testing
python -I scripts/dev.py cargo -- test -p game-core debug::tests: 14 passed, 0 failed (includingrupee_edits_respect_wallet_caps_and_refuse_failed_lookups).python -I scripts/dev.py cargo -- test -p game-core travel::tests: 21 passed, 0 failed.python -I -B tests/run_all.py --exact tests/test_i18n_complete.py tests/test_menu_ini_keys.py tests/test_settings_link.py: 3 passed, 0 failed, 0 skipped.Possibly related, for context:
@review
Recommendation: Request changes. Inserting the new item changes the meaning of existing recorded inventory actions, and the new test cannot compile or pass as written. The feature also has not yet been exercised in the game.
Adds a rupee quantity editor with wallet caps and faster Shift stepping. It also changes the existing inventory action numbering and adds a test that currently cannot validate the behavior.
Blocking (4): must change before merging.
game/oot_cheat_items.h:21: Inserting Rupees in the middle renumbers every subsequent inventory action, including actions already stored in input recordings. (more on the line) Do: Keep existing action identifiers stable, for example by assigning explicit persistent IDs independent of display order, and add a compatibility check for recorded actions.tests/test_oot_rupee_inventory.py:151: The helper extractor matches the forward declaration of oot_gamedata_queue_int instead of its definition and takes the following oot_item_count body. (more on the line) Do: Select the function definition rather than the declaration and ensure each helper is emitted once in dependency order.tests/test_oot_rupee_inventory.py:117: The two decrement actions are issued without applying the first queued write, but the test expects both decrements to accumulate. (more on the line) Do: Apply the queued update between the two actions, or explicitly test and implement accumulation of pending edits if that is the intended behavior.@fixor@rebasetry first). (for the author)Should fix (1): not blocking, but worth doing before merging.
Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1, L2, L3 and L5.Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: no in-game run is reported for the new editor, HUD updates, wallet caps, or save/reload persistence.
Other systems: Recorded input playback uses the same numeric inventory actions and is affected by the inserted item. Windows and Linux share the menu and game-side paths; the Linux key shim supports Shift. The fake flags service cannot establish the guest setter's behavior or persistence.
Switches: None.
Reviewed:
5b338f3d06against22d0d20098: Read AGENTS.md, CONTRIBUTING.md, the PR template, relevant standards, the complete diff, commit, changed header and test, and the changed inventory code with its callers and flag reader. Skimmed the guide manifest and source-review note, menu implementation, test runner, and remaining portions of the large changed code files; did not read vk_menu.cpp or oot_tools.c in full. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: No commands from the project, builds, or tests were run. CI is still running; the PR reports earlier compilation and guide checks but no in-game test of this feature.
Overlaps and merge order: Unknown; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -18,6 +18,7 @@OOT_ITEM("Iron Boots", "Armor_Adult_HeavyBoot", 0) \OOT_ITEM("Hover Boots", "Armor_Adult_HoverBoot", 0) \OOT_SECTION("Items") \OOT_ITEM("Rupees", "PlayerStatus.CurrentRupee", 1) \L1 (blocking): Inserting Rupees in the middle renumbers every subsequent inventory action, including actions already stored in input recordings.
When: An existing recording that edited Deku Sticks contains the old item index. Playback passes that numeric action to oot_inventory_edit, which now resolves the index to Rupees and changes the balance instead.
Do: Keep existing action identifiers stable, for example by assigning explicit persistent IDs independent of display order, and add a compatibility check for recorded actions.
@ -0,0 +114,4 @@act(-50);update_and_reload();CHECK(int_flags[RUPEE_HASH] == 0);L3 (blocking): The two decrement actions are issued without applying the first queued write, but the test expects both decrements to accumulate.
When: After the balance reaches 99, both calls read 99 from int_flags and queue 49; update_and_reload therefore produces 49, not the asserted 0.
Do: Apply the queued update between the two actions, or explicitly test and implement accumulation of pending edits if that is the intended behavior.
@ -0,0 +148,4 @@args = parser.parse_args()source = (ROOT / "game" / "oot_tools.c").read_text(encoding="utf-8")helpers = "\n\n".join(function(source, sig) for sig in ("static const char *oot_gamedata_queue_int(Ctx *c, uint32_t hash, int value)",L2 (blocking): The helper extractor matches the forward declaration of oot_gamedata_queue_int instead of its definition and takes the following oot_item_count body.
When: The generated fixture contains oot_item_count twice, before oot_rupee_cap is declared, and never includes the setter definition, so the new check fails to compile.
Do: Select the function definition rather than the declaration and ensure each helper is emitted once in dependency order.
2e65a3f56fa8d169c072Only L4 (manual in-game verification) remains on both PRs. Needs testing
@review
Recommendation: Request changes. Rupees still precedes six existing inventory actions, so recordings can edit the wrong item. The pull request also remains conflicted with its base, and in-game verification is outstanding.
Adds live rupee editing with wallet caps and faster Shift adjustments. It provides a useful debug feature, but its current item placement breaks recorded inventory actions.
Blocking (2): must change before merging.
game/oot_cheat_items.h:21: Inserting Rupees in the middle renumbers every subsequent inventory action, including actions already stored in input recordings. When: An existing recording that edited Deku Sticks contains the old item index. Playback passes that numeric action to oot_inventory_edit, which now resolves the index to Rupees and changes the balance instead. Do: Keep existing action identifiers stable, for example by assigning explicit persistent IDs independent of display order, and add a compatibility check for recorded actions.@fixor@rebasetry first). (for the author)Should fix (1): not blocking, but worth doing before merging.
Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1 and L5.Since the last review (on
5b338f3d06)Resolved: L2 (The helper extractor matches the forward declaration of oot_gamedata_queue_int instead of…); L3 (The two decrement actions are issued without applying the first queued write, but the test…)
Still open: L1 (Inserting Rupees in the middle renumbers every subsequent inventory action, including acti…); L4 (The new editor has not been shown working in the game.); L5 (The checklist claims in-game testing and a passing mise run test without matching results…); L6 (It conflicts with its base branch: bring it up to date (
@fixor@rebasetry first).)Checks: Still running: 10 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven: the author reports game-free tests passing, but the editor, HUD and save/reload behavior have not been verified in game.
Other systems: The item indices are shared by the menu, game-side editor and recorded input playback; the six More Upgrades actions are shifted. The guest setter and save behavior still need an in-game check.
Switches: None.
Reviewed:
a8d169c072againste4801d6a55: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the diff, item list and both inventory test fixtures; inspected the relevant inventory helpers and menu references. Skimmed the guide manifest and source review. The full game and renderer files were not read. Tooling's AGENTS.md was unavailable; docs/review-checklist.md is absent.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run project code were executed. The author reports Windows game-free checks passing; the in-game run remains outstanding. CI is still running.
Overlaps and merge order: Not checked; network access is unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
a8d169c07261deb6150b@review
Recommendation: Request changes. Rupee editing has been demonstrated in game and the existing action indices are preserved, but the pull request is still reported as unmergeable. The testing checklist also claims a full test run without reporting its result.
Adds live rupee editing to Debug Inventory, capped by the owned wallet, with faster Shift adjustments. Appending the entry preserves recorded inventory actions.
Blocking (1): must change before merging.
@fixor@rebasetry first). (for the author)Should fix (1): not blocking, but worth doing before merging.
@fixcan do L5.Since the last review (on
a8d169c072)Resolved: L1 (Inserting Rupees in the middle renumbers every subsequent inventory action, including acti…); L4 (The new editor has not been shown working in the game.)
Still open: L5 (The checklist claims that mise run test passes, but Testing reports only individual checks…); L6 (It conflicts with its base branch: bring it up to date (
@fixor@rebasetry first).)Checks: Still running: 10 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes: the author reports that an in-game edit persisted through save/reload and a full restart on Windows 11. This is not a performance change.
Other systems: The inventory action IDs are shared by the menu, game code and recorded input; appending Rupees preserves the existing IDs. The author reports Windows testing; the Linux renderer build check is still running.
Switches: None.
Reviewed:
61deb6150bagainsta425fa2aac: Read the diff, repository rules, pull request template, cheat item list, rupee test and source-review note. Skimmed the larger game and menu files, song fixture and screenshot manifest; their full output was truncated.; nothing run (a code review).Checked and fine:
Testing: No commands or tests were run during review. The author reports Windows in-game testing and four individual game-free checks; CI is still running.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
61deb6150b71ee3b3e5071ee3b3e50214a75a1ba214a75a1ba42b2abd2c942b2abd2c944da85358144da85358149ceec204d49ceec204dcddeb89b36@review
Recommendation: Approve. The feature has game-free test coverage, but the current rupee editor has no reported in-game verification. It needs a manual run before merge. Nothing blocking is left. Recommend approval; not approved on the forge.
Adds a Debug Inventory slider for live rupee editing, with wallet-cap checks and queued updates to the game and save. It adds a small amount of game-specific code and reuses the existing inventory UI.
Since the last review (on
61deb6150b)Resolved: L5 (The checklist claims that mise run test passes, but Testing reports only individual checks…); L6 (It conflicts with its base branch: bring it up to date (
@fixor@rebasetry first).)Checks: Still running: 11 checks.
Also noticed (3; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven: the description reports passing game-core tests, but no in-game result for this implementation.
Other systems: The change uses the existing inventory action queue and game flag adder. It affects live rupees and their save copy; no platform-specific behavior is introduced.
Switches: None. The run-only inv_rupees slider defaults to 0 and is synchronized to the current balance.
Reviewed:
07c320ba57against7bc53f8413: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the diff, changed Rust sections, and the inventory action and flag-adder callers. Skimmed the changed menu manifest, menu test, debug data, and development standards; the full changed code files were not read. Tooling's AGENTS.md was unavailable locally.; nothing run (a code review).Checked and fine:
Testing: The author reports 14 debug tests, 21 travel tests, and three game-free checks passing. No tests were run during this review; an in-game verification remains needed.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
There is still a small issue with the live rupee editing. The wallet UI only shows a cap of 500 rupees, but I already have the upgraded wallet that can hold up to 1000.



The 1000-rupee wallet is obtained by collecting 100 Gold Skulltula tokens. Could you please fix this minor bug? Thank you for all your hard work.