fix(debug): the Debug tab's Empty Bottle row counts the bottles held, and Left takes one away #2785

Merged
HumanBean merged 4 commits from llun/Longshot:fix/debug-bottle-count into main 2026-11-29 06:23:56 +00:00
Member

Summary

Stacked on #2779 (the ammunition amounts): it touches the same functions, so merge #2779 first. This pull request's own commits are the last four: test(debug): the Debug tab's Empty Bottle row on a save with bottles, fix(debug): the Debug tab's Empty Bottle row counts the bottles held, and Left takes one away, docs(debug): ... (one sentence about the row in the Debug tab's paragraph of docs/user/graphics-and-controls.md), and fix(debug): preserve recorded inventory action IDs. The guide manifest change is #2779's.

Players report "I can't reduce my number of empty bottles". In the Debug tab's Inventory page, the Empty Bottle row always showed 0, and Left on it did nothing. Right did give a bottle.

The cause: the game doesn't keep bottles as a pouch content. Its count by name (QueryGetPouchContentNumByActorName) reads 0 for Item_Bottle, Weapon_Bottle and every Item_Bottle_* with bottles held, and it refuses to remove one (event status 3). The game keeps bottles in five slots, PlayerStatus.AssignableItem.BottleInfo.BottleA to BottleE. Each slot is a struct with two flags: the Bool .IsValid (a bottle is there) and the Enum .BottleItem (what is in it: Empty, RedPotion, ... HalfMilk, by the hash of the name; it also reads Empty when no bottle is there). Seen in the game: each Right set the next slot's IsValid with Empty in it, and added 1 to an Int whose name isn't known (0x8a5eeacf). That Int is the number of bottles held: the HUD reads it to show the bottle button when it is 1 or more.

This changes the Empty Bottle row:

  • The count is the number of slots held with Empty in them. A bottle with something in it isn't counted.
  • Left takes the last empty bottle away, using the game's own flag setters, so the next save keeps it: the Bool setter (as the song rows already use), the Enum setter (f_80400980) and the Int adder the game itself calls for each bottle given (f_80fe42d0).
    • The bottles held stay in the first slots, because the game puts the next bottle in the first free slot. So when the last bottle held isn't empty, its contents move into the empty one's slot.
    • An item button (PlayerStatus.AssignableItem.Child, .Adult) that named a bottle moved there follows it, and one that named the bottle taken is cleared.
    • The bottles held go down by as many, never below 0.
    • A removal of more than is empty takes what is empty, and a bottle with something in it is never taken.
  • Right stays the game's own add.

To see it on main: load a save with bottles, or give some with Right on Debug > Inventory > Items > Empty Bottle. The row stays at 0, the log says cheats: inventory Item_Bottle +1 (had 0, now 0, ...) each time, and Left does nothing.

Read first: the /* Bottles. block before oot_item_count in game/oot_tools.c (oot_bottles_take is the removal), then tests/test_oot_bottles.py. The game's setters are together in oot_gamedata_queue (the Bool one moved there from oot_gamedata_queue_bool, unchanged).

See #2335 (its bottle half), #803.

Testing

Tested: Windows 11 (build 26300), RTX 5080 (NVIDIA 621.40). This branch's game was built as a pack over the shared base 22d0d200 (dev.py pack / rt) and run through the job queue on the repository's market-entrance save, the run's own copy of it, with Debug tools on (HOS_OOT_CHEATS=1). The edits were sent as the menu sends them, as !cheat actions in the live input file, and read back from the log and the pause screen.

  • Before (this branch without the fix, the same base): Right four times put four empty bottles on the pause screen, but every inventory Item_Bottle +1 line said had 0, and Left did nothing. A flag scan showed what the game changes for each bottle given: BottleInfo.BottleA.IsValid, then BottleB's, and the Int 0x8a5eeacf going 0, 1, 2.
  • After: Right four times gave had 0, had 1, had 2, had 3, and the pause screen showed four bottles. Left: cheats: bottles: took 1 empty of 1 asked (slots now ABC.., ...; bottles held before 4), and the pause screen showed three. Left twice more: one bottle (bottles held before 3, then 2). Right: had 1, and two bottles.
  • A save and a load: a map change (teleport to Kokiri Forest, the game's autosave), then the game started again (the bridge's relaunch) and loaded the save. The inventory probe line said Item_Bottle=2. The pause screen showed 3 bottles: the relaunched game replayed the live file's last +1 (the log shows +1 (had 2, ...) after the load).
  • Checks: tests/test_oot_bottles.py fails at the test commit (FAIL: 4 empty bottles held, the Empty Bottle row shows 0) and passes at the fix, with both clang++ and g++. It also fails when the fix's removal is undone, or when it takes the empty bottle's own slot instead of the last one (Left on EF... left .F...). test_oot_ammo_bags.py and test_oot_song_inventory.py cut the same functions, so they now get the setters and the bottle block. They pass, as do the other checks that read game/oot_tools.c. The checks that read docs/user/graphics-and-controls.md pass (test_settings_table.py, test_hud_layout_row.py, test_stick_dead_zone.py, test_stick_range.py, test_camera_speed.py, test_skip_title.py, test_threaded_rendering.py, test_walk_key.py). game/oot_tools.c compiles with Linux gcc (-fsyntax-only -Wall -Wextra, WSL Ubuntu 24.04) with the same three warnings as before the change. mise run test (tests/run_all.py through the queue, Windows, clang from the pinned llvm-mingw, RX_CPM the pinned headers): 635 passed, 71 failed, 187 skipped here; on #2779's head (705b91b0, the same PC and settings) 633 passed, 72 failed, 187 skipped. Every check failing here also fails there; most are this PC's Windows setup for the renderer, queue and dev-tool checks (for example test_parity_gates.py, test_job_queue.py, test_input_movie.py: a clang -Wunused-but-set-global in its glue). Two of them read game/oot_tools.c (test_bug_report.py, test_hle_guest_ranges.py): they fail the same way on #2779's head, for things outside the bottle code (bug_report_save does not take the game folder; a program not found on this PC).

Still to test:

  • Windows, by hand: assign a bottle to the item button (child and adult), then Left on the Empty Bottle row. If the bottle on the button was taken, the button is cleared. If the last bottle held moved into its slot, the button follows it. The game-free test covers this, but it can't be scripted in a game run (by hand).
  • Windows, by hand: a bottle with a fairy in the last slot and an empty one before it, then Left. Expect the fairy to stay, moved into the earlier slot, with one bottle fewer on the pause screen (by hand: the Debug tab has no row that fills a bottle).
  • Linux: Right four times on Empty Bottle, then Left once, on the market-entrance save with Debug tools on. Expect the row to read 4, then 3, and the pause screen to show three bottles (@Beanstalk).

Measurements

Nothing to measure: the bottle change runs only when the Debug tab's Empty Bottle row is read or changed (twice a second for the count while a save is loaded: five Bool and five Enum flag reads). The inventory row order also preserves recorded action IDs. The in-game evidence is the log lines above. Before: this branch's parent (#2779 @ 705b91b0) on base 22d0d200; After: this PR's fix, tested at the commit before the rebase onto #2779's newest head, which only brought in main's renderer and builder changes.

Risks

  • The Debug tab's Empty Bottle row changes, and the stick and nut bag rows move to a More Upgrades section to preserve recorded inventory action IDs. Left on Empty Bottle writes the save's bottle flags, and the next save keeps them, as any Debug tab edit does.
  • Another Enum whose name isn't known (0x6bee602d) names the slot of the newest bottle given. Left doesn't change it, so after a removal it can name a slot with no bottle. The pause screen opened normally on slot A after that.
  • On another game build where a setter isn't found, Left writes nothing and logs cheats: bottles: ... not found.
  • A revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. (Stacked on #2779, which is on current main.)
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary **Stacked on #2779** (the ammunition amounts): it touches the same functions, so merge #2779 first. This pull request's own commits are the last four: `test(debug): the Debug tab's Empty Bottle row on a save with bottles`, `fix(debug): the Debug tab's Empty Bottle row counts the bottles held, and Left takes one away`, `docs(debug): ...` (one sentence about the row in the Debug tab's paragraph of `docs/user/graphics-and-controls.md`), and `fix(debug): preserve recorded inventory action IDs`. The guide manifest change is #2779's. Players report "I can't reduce my number of empty bottles". In the Debug tab's Inventory page, the Empty Bottle row always showed 0, and Left on it did nothing. Right did give a bottle. The cause: the game doesn't keep bottles as a pouch content. Its count by name (`QueryGetPouchContentNumByActorName`) reads 0 for `Item_Bottle`, `Weapon_Bottle` and every `Item_Bottle_*` with bottles held, and it refuses to remove one (event status 3). The game keeps bottles in five slots, `PlayerStatus.AssignableItem.BottleInfo.BottleA` to `BottleE`. Each slot is a struct with two flags: the Bool `.IsValid` (a bottle is there) and the Enum `.BottleItem` (what is in it: `Empty`, `RedPotion`, ... `HalfMilk`, by the hash of the name; it also reads `Empty` when no bottle is there). Seen in the game: each Right set the next slot's `IsValid` with `Empty` in it, and added 1 to an Int whose name isn't known (`0x8a5eeacf`). That Int is the number of bottles held: the HUD reads it to show the bottle button when it is 1 or more. This changes the Empty Bottle row: - **The count** is the number of slots held with `Empty` in them. A bottle with something in it isn't counted. - **Left takes the last empty bottle away**, using the game's own flag setters, so the next save keeps it: the Bool setter (as the song rows already use), the Enum setter (f_80400980) and the Int adder the game itself calls for each bottle given (f_80fe42d0). - The bottles held stay in the first slots, because the game puts the next bottle in the first free slot. So when the last bottle held isn't empty, its contents move into the empty one's slot. - An item button (`PlayerStatus.AssignableItem.Child`, `.Adult`) that named a bottle moved there follows it, and one that named the bottle taken is cleared. - The bottles held go down by as many, never below 0. - A removal of more than is empty takes what is empty, and a bottle with something in it is never taken. - **Right** stays the game's own add. To see it on `main`: load a save with bottles, or give some with Right on Debug > Inventory > Items > Empty Bottle. The row stays at 0, the log says `cheats: inventory Item_Bottle +1 (had 0, now 0, ...)` each time, and Left does nothing. Read first: the `/* Bottles.` block before `oot_item_count` in `game/oot_tools.c` (`oot_bottles_take` is the removal), then `tests/test_oot_bottles.py`. The game's setters are together in `oot_gamedata_queue` (the Bool one moved there from `oot_gamedata_queue_bool`, unchanged). See #2335 (its bottle half), #803. ## Testing **Tested:** Windows 11 (build 26300), RTX 5080 (NVIDIA 621.40). This branch's game was built as a pack over the shared base `22d0d200` (`dev.py pack` / `rt`) and run through the job queue on the repository's `market-entrance` save, the run's own copy of it, with Debug tools on (`HOS_OOT_CHEATS=1`). The edits were sent as the menu sends them, as `!cheat` actions in the live input file, and read back from the log and the pause screen. - **Before (this branch without the fix, the same base):** Right four times put four empty bottles on the pause screen, but every `inventory Item_Bottle +1` line said `had 0`, and Left did nothing. A flag scan showed what the game changes for each bottle given: `BottleInfo.BottleA.IsValid`, then `BottleB`'s, and the Int `0x8a5eeacf` going 0, 1, 2. - **After:** Right four times gave `had 0`, `had 1`, `had 2`, `had 3`, and the pause screen showed four bottles. Left: `cheats: bottles: took 1 empty of 1 asked (slots now ABC.., ...; bottles held before 4)`, and the pause screen showed three. Left twice more: one bottle (`bottles held before 3`, then `2`). Right: `had 1`, and two bottles. - **A save and a load:** a map change (teleport to Kokiri Forest, the game's autosave), then the game started again (the bridge's `relaunch`) and loaded the save. The inventory probe line said `Item_Bottle=2`. The pause screen showed 3 bottles: the relaunched game replayed the live file's last `+1` (the log shows `+1 (had 2, ...)` after the load). - **Checks:** `tests/test_oot_bottles.py` fails at the test commit (`FAIL: 4 empty bottles held, the Empty Bottle row shows 0`) and passes at the fix, with both clang++ and g++. It also fails when the fix's removal is undone, or when it takes the empty bottle's own slot instead of the last one (`Left on EF... left .F...`). `test_oot_ammo_bags.py` and `test_oot_song_inventory.py` cut the same functions, so they now get the setters and the bottle block. They pass, as do the other checks that read `game/oot_tools.c`. The checks that read `docs/user/graphics-and-controls.md` pass (`test_settings_table.py`, `test_hud_layout_row.py`, `test_stick_dead_zone.py`, `test_stick_range.py`, `test_camera_speed.py`, `test_skip_title.py`, `test_threaded_rendering.py`, `test_walk_key.py`). `game/oot_tools.c` compiles with Linux gcc (`-fsyntax-only -Wall -Wextra`, WSL Ubuntu 24.04) with the same three warnings as before the change. `mise run test` (`tests/run_all.py` through the queue, Windows, clang from the pinned llvm-mingw, `RX_CPM` the pinned headers): 635 passed, 71 failed, 187 skipped here; on #2779's head (705b91b0, the same PC and settings) 633 passed, 72 failed, 187 skipped. Every check failing here also fails there; most are this PC's Windows setup for the renderer, queue and dev-tool checks (for example `test_parity_gates.py`, `test_job_queue.py`, `test_input_movie.py`: a clang `-Wunused-but-set-global` in its glue). Two of them read `game/oot_tools.c` (`test_bug_report.py`, `test_hle_guest_ranges.py`): they fail the same way on #2779's head, for things outside the bottle code (`bug_report_save does not take the game folder`; a program not found on this PC). **Still to test:** - Windows, by hand: assign a bottle to the item button (child and adult), then Left on the Empty Bottle row. If the bottle on the button was taken, the button is cleared. If the last bottle held moved into its slot, the button follows it. The game-free test covers this, but it can't be scripted in a game run (by hand). - Windows, by hand: a bottle with a fairy in the last slot and an empty one before it, then Left. Expect the fairy to stay, moved into the earlier slot, with one bottle fewer on the pause screen (by hand: the Debug tab has no row that fills a bottle). - Linux: Right four times on Empty Bottle, then Left once, on the `market-entrance` save with Debug tools on. Expect the row to read 4, then 3, and the pause screen to show three bottles (@Beanstalk). ## Measurements Nothing to measure: the bottle change runs only when the Debug tab's Empty Bottle row is read or changed (twice a second for the count while a save is loaded: five Bool and five Enum flag reads). The inventory row order also preserves recorded action IDs. The in-game evidence is the log lines above. Before: this branch's parent (#2779 @ 705b91b0) on base `22d0d200`; After: this PR's fix, tested at the commit before the rebase onto #2779's newest head, which only brought in `main`'s renderer and builder changes. ## Risks - The Debug tab's Empty Bottle row changes, and the stick and nut bag rows move to a More Upgrades section to preserve recorded inventory action IDs. Left on Empty Bottle writes the save's bottle flags, and the next save keeps them, as any Debug tab edit does. - Another Enum whose name isn't known (`0x6bee602d`) names the slot of the newest bottle given. Left doesn't change it, so after a removal it can name a slot with no bottle. The pause screen opened normally on slot A after that. - On another game build where a setter isn't found, Left writes nothing and logs `cheats: bottles: ... not found`. - A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. (Stacked on #2779, which is on current `main`.) - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On a save with no Bomb Bag, Bullet Bag, Quiver, Deku Stick Bag or Deku Nut Bag, Right on Bombs, Bombchus, Deku
Seeds, Arrows, Deku Sticks or Deku Nuts (the Inventory page's amounts, and the Debug tab's Change quantity row) left
them at 0: the game keeps as many as the largest bag held holds and clamps an add past it (#871, #2335). And a
removal of more than is held is refused whole: -3 on 2 Bombchus left 2. The check cuts oot_inventory_edit and
oot_edit_pouch out of game/oot_tools.c and runs them on a pouch with the game's rules, as seen in the game; it also
asks for an Inventory row for each bag. It fails on main: no Deku Stick Bag row, and Bombs +1 with no bag stays 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Inventory page's amounts and the Debug tab's Change quantity row did nothing to Deku Sticks, Deku Nuts, Bombs,
Bombchus, Deku Seeds or Arrows on a save without the bag that holds them: the game keeps as many as the largest bag
held holds, so with none an add is clamped to nothing (#871, #2335). An add of ammunition with none of its bags now
gives the smallest bag first, then the add: a Bomb Bag comes with 20 bombs, a Bullet Bag with 30 seeds, a Quiver
with 30 arrows, as the game gives them; the smallest Deku Stick or Nut Bag comes empty and takes the sticks or nuts
added.

The Inventory page gets the Deku Stick and Nut Bags' rows (three sizes each, the game's Item_StickBag_* and
Item_NutBag_*), so the bigger ones can be given and taken away; the Bomb Bags, Bullet Bags and Quivers had theirs.
PR #1411 found the same bags.

A removal of more than is held is cut to what Link holds: the game refused it whole (the Change quantity row's -10
on a smaller count did nothing).

Fixes #871. See #2335 (its bottle is not this).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs(guide): the Graphics tab's guide picture is retained after the Inventory page's new bag rows
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 11s
PR description / Title and description (pull_request_target) Successful in 5s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m12s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m52s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m19s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m12s
CI / Website build and checks (pull_request) Failing after 1m19s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 17m39s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 37m55s
705b91b081
game/oot_cheat_items.h is among the Graphics tab picture's reviewed UI sources (the Insert menu's code includes it).
This pull request adds the Deku Stick and Nut Bags' rows to the Debug tab's Inventory page, which the picture does not
show: its rows, labels, values, tab strip and footer are unchanged. The review is recorded at 9963d60b with the
header's new hash, and the PNG is kept, as #2771 recorded #2730's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game keeps bottles in five slots (PlayerStatus.AssignableItem.BottleInfo.BottleA to E: a Bool IsValid and an Enum
BottleItem), not as a pouch content: its count by name reads 0 for every bottle name with bottles held, and it refuses
the removal of one. tests/test_oot_bottles.py cuts oot_item_count and oot_inventory_edit out of game/oot_tools.c and runs
them on a model of those flags as seen in the game. It fails here: 4 empty bottles held, the row shows 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(debug): the Debug tab's Empty Bottle row counts the bottles held, and Left takes one away
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Successful in 14s
PR description / Title and description (pull_request_target) Successful in 8s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 14s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
a2b898aff5
The game keeps bottles in five slots, PlayerStatus.AssignableItem.BottleInfo.BottleA to E: a Bool IsValid (a bottle is
there) and an Enum BottleItem (what is in it). Its pouch count by name reads 0 for every bottle name, and it refuses a
removal, so the row showed 0 and Left did nothing (#803, #2335).

The row now counts the slots held with Empty in them. Left takes the last empty bottle away with the game's own setters
(Bool, Enum, and the Int adder the game uses for each bottle given), which the next save keeps. When the last bottle held
is not empty, its contents move into the slot taken, so the bottles held stay the first slots; an item button
(PlayerStatus.AssignableItem.Child, .Adult) on a bottle moved follows it, one on the bottle taken is cleared; and the
bottles held (Int 0x8a5eeacf, which the HUD reads) goes down by as many. The add stays the game's own.

The ammunition and song checks cut the same functions: they get the setters and the bottles' slots too.

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

Tested in game: Windows 11 (26300), RTX 5080 (NVIDIA 621.40), the repository's market-entrance save (child Link, the Market), Debug tools on, through the job queue: Right four times on Empty Bottle read had 0, 1, 2, 3 and the pause screen showed four bottles; Left took one (pause screen: three), twice more (one), Right gave one back (two). After a map change's autosave and a relaunch the save loaded with Item_Bottle=2. Before the fix the row stayed at 0 and Left did nothing.

Tested in game: Windows 11 (26300), RTX 5080 (NVIDIA 621.40), the repository's market-entrance save (child Link, the Market), Debug tools on, through the job queue: Right four times on Empty Bottle read had 0, 1, 2, 3 and the pause screen showed four bottles; Left took one (pause screen: three), twice more (one), Right gave one back (two). After a map change's autosave and a relaunch the save loaded with Item_Bottle=2. Before the fix the row stayed at 0 and Left did nothing.
llun changed title from WIP: fix(debug): the Debug tab's Empty Bottle row counts the bottles held, and Left takes one away to fix(debug): the Debug tab's Empty Bottle row counts the bottles held, and Left takes one away 2026-11-29 04:39:08 +00:00
docs(debug): the Debug tab's Empty Bottle row counts the empty bottles, and Left takes one away
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 13s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2581ff11a2
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Added one sentence about the Empty Bottle row to the Debug tab's paragraph in docs/user/graphics-and-controls.md (2581ff11), and ticked Docs updated. The checks that read that page pass.

Added one sentence about the Empty Bottle row to the Debug tab's paragraph in docs/user/graphics-and-controls.md (2581ff11), and ticked Docs updated. The checks that read that page pass.
Author
Member
@review
BeanBot left a comment

Recommendation: Request changes. The bottle fix works for the tested empty-bottle sequence, but inserting inventory rows changes the meaning of existing recorded actions and can alter the wrong saved item on playback. The filled-bottle and assigned-button paths still need an in-game check.

The Debug inventory counts empty bottles and removes one while preserving filled bottles in its slot model. It also includes the stacked ammunition fix and bag rows; the added rows currently break compatibility with recorded inventory actions.

Blocking (1): must change before merging.

  1. L1 game/oot_cheat_items.h:69: Inserting these rows changes the numeric action IDs of every later inventory item, including items already present in input recordings. (more on the line) Do: Give inventory actions stable item IDs independent of menu order, or preserve the existing indices and assign new IDs to these six rows. Add a playback compatibility check for an existing later-item action.

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)

  • L2 game/oot_tools.c:427: The filled-bottle move and assigned-button updates have not yet been exercised in the game. (more on the line) Do: Run the described in-game fairy and child/adult button cases, including a save and reload, and report the results.

@fix can do L1.

Checks: Still running: 7 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes for the tested basic case: the Windows run showed four empty bottles, then three after Left, and two after subsequent edits and a save/load. Filled-bottle moves and item-button updates have only been checked against a game-free model.

Other systems: The slot and button edits affect saved inventory for both ages. Input recordings store the numeric Debug action and replay it through the same inventory table; existing recordings after the inserted rows are affected. The change does not target rendering or GPU-specific behavior.

Switches: None added, changed, or removed.

Reviewed: 2581ff11a2 against 3ab4db6e91: Read the available AGENTS.md, CONTRIBUTING.md, PR template and standards, the commit log and diff, the changed game code and tests, and the relevant flag, game-call, menu and input-recording paths. Skimmed the guide manifest and other unrelated portions of the large game file. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review).

Checked and fine:

  • The commit trailers record AI assistance.
  • No game-derived output or generated shader files appear in the diff.
  • The basic bottle count, removal and save/load have a reported Windows game run.
  • The bottle test exercises count, removal, slot compaction and button remapping against its model.

Testing: No commands from the project were run. The reported Windows game run and game-free checks were considered; CI was still running. Merge also waits for the stated #2779 dependency.

Overlaps and merge order: #2779 is the stated prerequisite and supplies the ammunition and bag changes; merge it first.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The bottle fix works for the tested empty-bottle sequence, but inserting inventory rows changes the meaning of existing recorded actions and can alter the wrong saved item on playback. The filled-bottle and assigned-button paths still need an in-game check. The Debug inventory counts empty bottles and removes one while preserving filled bottles in its slot model. It also includes the stacked ammunition fix and bag rows; the added rows currently break compatibility with recorded inventory actions. **Blocking (1)**: must change before merging. 1. **L1** `game/oot_cheat_items.h:69`: Inserting these rows changes the numeric action IDs of every later inventory item, including items already present in input recordings. (more on the line) **Do:** Give inventory actions stable item IDs independent of menu order, or preserve the existing indices and assign new IDs to these six rows. Add a playback compatibility check for an existing later-item action. **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) - **L2** `game/oot_tools.c:427`: The filled-bottle move and assigned-button updates have not yet been exercised in the game. (more on the line) **Do:** Run the described in-game fairy and child/adult button cases, including a save and reload, and report the results. `@fix` can do L1. **Checks:** Still running: 7 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the tested basic case: the Windows run showed four empty bottles, then three after Left, and two after subsequent edits and a save/load. Filled-bottle moves and item-button updates have only been checked against a game-free model. **Other systems:** The slot and button edits affect saved inventory for both ages. Input recordings store the numeric Debug action and replay it through the same inventory table; existing recordings after the inserted rows are affected. The change does not target rendering or GPU-specific behavior. **Switches:** None added, changed, or removed. **Reviewed:** 2581ff11a2fb against 3ab4db6e9154: Read the available AGENTS.md, CONTRIBUTING.md, PR template and standards, the commit log and diff, the changed game code and tests, and the relevant flag, game-call, menu and input-recording paths. Skimmed the guide manifest and other unrelated portions of the large game file. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review). **Checked and fine:** - The commit trailers record AI assistance. - No game-derived output or generated shader files appear in the diff. - The basic bottle count, removal and save/load have a reported Windows game run. - The bottle test exercises count, removal, slot compaction and button remapping against its model. **Testing:** No commands from the project were run. The reported Windows game run and game-free checks were considered; CI was still running. Merge also waits for the stated #2779 dependency. **Overlaps and merge order:** #2779 is the stated prerequisite and supplies the ammunition and bag changes; merge it first. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -66,6 +66,12 @@
OOT_ITEM("Bullet Bag", "Item_BulletBag_Small", 0) \
OOT_ITEM("Big Bullet Bag", "Item_BulletBag_Medium", 0) \
OOT_ITEM("Biggest Bullet Bag", "Item_BulletBag_Large", 0) \
OOT_ITEM("Deku Stick Bag", "Item_StickBag_Small", 0) \
Member

L1 (blocking): Inserting these rows changes the numeric action IDs of every later inventory item, including items already present in input recordings.

When: A recording made on the base with an Adult's Wallet toggle stores its table index in the action. Playback on this branch uses that same index for Deku Stick Bag and changes that item instead; later quest and song actions are similarly shifted and can change the wrong saved state.

Do: Give inventory actions stable item IDs independent of menu order, or preserve the existing indices and assign new IDs to these six rows. Add a playback compatibility check for an existing later-item action.

**L1** (blocking): Inserting these rows changes the numeric action IDs of every later inventory item, including items already present in input recordings. *When:* A recording made on the base with an Adult's Wallet toggle stores its table index in the action. Playback on this branch uses that same index for Deku Stick Bag and changes that item instead; later quest and song actions are similarly shifted and can change the wrong saved state. **Do:** Give inventory actions stable item IDs independent of menu order, or preserve the existing indices and assign new IDs to these six rows. Add a playback compatibility check for an existing later-item action.
game/oot_tools.c Outdated
@ -318,0 +424,4 @@
OotBottles was, now;
const char *missing = oot_gamedata_setters();
if (missing || !oot_bottles_read(&was)) {
if (missing) hos_log("cheats: bottles: %s not found", missing);
Member

L2 (should fix): The filled-bottle move and assigned-button updates have not yet been exercised in the game.

When: With an empty bottle before a filled bottle, Left moves the contents and rewrites the child and adult button flags. The test models those setters and flag meanings, so it cannot establish that the game retains the contents and button assignments after the actual queued writes and reload.

Do: Run the described in-game fairy and child/adult button cases, including a save and reload, and report the results.

**L2** (should fix): The filled-bottle move and assigned-button updates have not yet been exercised in the game. *When:* With an empty bottle before a filled bottle, Left moves the contents and rewrites the child and adult button flags. The test models those setters and flag meanings, so it cannot establish that the game retains the contents and button assignments after the actual queued writes and reload. **Do:** Run the described in-game fairy and child/adult button cases, including a save and reload, and report the results.
Author
Member
@fix
fix(debug): preserve recorded inventory action IDs
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 14s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m1s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m8s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m21s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m24s
CI / Website build and checks (pull_request) Failing after 1m33s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 18m15s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
ef2d9cead3
As the review on #2785 asked.
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The ordinary empty-bottle count and removal worked in the reported Windows run, but the filled-bottle move and assigned-button updates still need an in-game check. This pull request also depends on #2779 merging first. Recommend approval; not approved on the forge.

What @fix changed
I changed this pull request: the new head is ef2d9cead3. I edited its description to match the change.

Changed

  • Preserve inventory playback compatibility: Appended the six bag rows after existing items in game/oot_cheat_items.h:98, preserving recorded indices, and added a base-version wallet action check in tests/test_oot_song_inventory.py:137. Tests were not run as instructed.

Nothing was built or run: the checks run again on the new head.

The Debug inventory row counts empty bottles and can remove them while preserving filled bottles and button assignments. The follow-up restores existing recorded inventory action IDs by appending the new bag rows.

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)

  • L2 game/oot_tools.c:427: The filled-bottle move and assigned-button updates have not yet been exercised in the game. When: With an empty bottle before a filled bottle, Left moves the contents and rewrites the child and adult button flags. The test models those setters and flag meanings, so it cannot establish that the game retains the contents and button assignments after the actual queued writes and reload. Do: Run the described in-game fairy and child/adult button cases, including a save and reload, and report the results.

Checks: they run again on this head; a failure shows on the pull request.

Also noticed (2; not asked for, not blocking)
  • The guide describes the bigger bags under Upgrades, while the new stick and nut bag rows now appear under More Upgrades.
  • The pull request description still lists a Linux empty-bottle run as outstanding.
More: does it help, other systems, switches, what was read

Does it help: Yes for the tested empty-bottle case: the Windows run showed counts rising from 0 to 4 and falling on Left, with the result surviving a save and load. The filled-bottle and assigned-button cases remain unverified in game.

Other systems: The bottle logic writes game save flags and item-button assignments on both Windows and Linux. The reported Windows run covers empty bottles; the filled-bottle and button cases and a Linux run remain outstanding.

Switches: None added, changed or removed.

Reviewed: ef2d9cead3 against 3ab4db6e91: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the bottle removal and inventory edit code, the inventory item list and the relevant test fixture. Inspected the follow-up diff and references to the inventory action IDs; other changed files and the full game source were not read in full. The review checklist file was absent.; nothing run (a code review).

Checked and fine:

  • The six bag rows now follow the pre-existing inventory rows, preserving their recorded item indices.
  • The added wallet playback check targets the base-version action ID.
  • The follow-up retains the bottle fix and the new bag rows.

Testing: No commands from the project were run. The author reports game-free checks and a Windows in-game empty-bottle run; the filled-bottle and assigned-button cases still need an in-game run. CI has not run on this head.

Overlaps and merge order: Stacked on #2779; merge #2779 first.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The ordinary empty-bottle count and removal worked in the reported Windows run, but the filled-bottle move and assigned-button updates still need an in-game check. This pull request also depends on #2779 merging first. Recommend approval; not approved on the forge. **What `@fix` changed** I changed this pull request: the new head is ef2d9cead3b1. I edited its description to match the change. **Changed** - **Preserve inventory playback compatibility**: Appended the six bag rows after existing items in game/oot_cheat_items.h:98, preserving recorded indices, and added a base-version wallet action check in tests/test_oot_song_inventory.py:137. Tests were not run as instructed. Nothing was built or run: the checks run again on the new head. The Debug inventory row counts empty bottles and can remove them while preserving filled bottles and button assignments. The follow-up restores existing recorded inventory action IDs by appending the new bag rows. **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) - **L2** `game/oot_tools.c:427`: The filled-bottle move and assigned-button updates have not yet been exercised in the game. *When:* With an empty bottle before a filled bottle, Left moves the contents and rewrites the child and adult button flags. The test models those setters and flag meanings, so it cannot establish that the game retains the contents and button assignments after the actual queued writes and reload. **Do:** Run the described in-game fairy and child/adult button cases, including a save and reload, and report the results. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The guide describes the bigger bags under Upgrades, while the new stick and nut bag rows now appear under More Upgrades. - The pull request description still lists a Linux empty-bottle run as outstanding. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the tested empty-bottle case: the Windows run showed counts rising from 0 to 4 and falling on Left, with the result surviving a save and load. The filled-bottle and assigned-button cases remain unverified in game. **Other systems:** The bottle logic writes game save flags and item-button assignments on both Windows and Linux. The reported Windows run covers empty bottles; the filled-bottle and button cases and a Linux run remain outstanding. **Switches:** None added, changed or removed. **Reviewed:** ef2d9cead3b1 against 3ab4db6e9154: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the bottle removal and inventory edit code, the inventory item list and the relevant test fixture. Inspected the follow-up diff and references to the inventory action IDs; other changed files and the full game source were not read in full. The review checklist file was absent.; nothing run (a code review). **Checked and fine:** - The six bag rows now follow the pre-existing inventory rows, preserving their recorded item indices. - The added wallet playback check targets the base-version action ID. - The follow-up retains the bottle fix and the new bag rows. **Testing:** No commands from the project were run. The author reports game-free checks and a Windows in-game empty-bottle run; the filled-bottle and assigned-button cases still need an in-game run. CI has not run on this head. **Overlaps and merge order:** Stacked on #2779; merge #2779 first. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
Owner
@rebase
Member

I rebased this pull request onto main (569537f71d): the new head is 9d0162700e.

Conflicts resolved

  • docs/user/images/guide/manifest.json: Kept the base branch’s reviewed revision and source updates, including the pull request’s bag-row review and hash.

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.

I rebased this pull request onto `main` (569537f71d42): the new head is 9d0162700ef7. **Conflicts resolved** - docs/user/images/guide/manifest.json: Kept the base branch’s reviewed revision and source updates, including the pull request’s bag-row review and hash. Nothing was built or run: read the resolution before merging. --- <sub>Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed fix/debug-bottle-count from ef2d9cead3
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 14s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m1s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m8s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m21s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m24s
CI / Website build and checks (pull_request) Failing after 1m33s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 18m15s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
to 9d0162700e
Some checks failed
PR description / Title and description (pull_request_target) Successful in 13s
CI / What the change needs (pull_request) Successful in 13s
CI / Third-party parts and guide screenshots (pull_request) Failing after 20s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m13s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m9s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m15s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m20s
CI / Website build and checks (pull_request) Failing after 1m23s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 21m18s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 37m0s
2026-11-29 06:23:35 +00:00
Compare
HumanBean deleted branch fix/debug-bottle-count 2026-11-29 06:23:56 +00:00
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The reported game run shows empty bottles can be counted and removed, but the filled-bottle move and assigned-button updates still need an in-game check. The change also depends on #2779 merging first. Recommend approval; not approved on the forge.

The Debug inventory row counts empty bottles and can remove them while preserving filled bottles and recorded inventory action IDs. The added slot and flag handling increases complexity, with its more involved cases covered by a game-free model.

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)

  • L2 game/oot_tools.c:427: The filled-bottle move and assigned-button updates have not yet been exercised in the game. When: With an empty bottle before a filled bottle, Left moves the contents and rewrites the child and adult button flags. The test models those setters and flag meanings, so it cannot establish that the game retains the contents and button assignments after the actual queued writes and reload. Do: Run the described in-game fairy and child/adult button cases, including a save and reload, and report the results.

Since the last review (on ef2d9cead3)
Still open: L2 (The filled-bottle move and assigned-button updates have not yet been exercised in the game…)

Checks: Still running: 11 checks.

Also noticed (3; not asked for, not blocking)
  • The pull request is stacked on #2779, which should merge first.
  • The reported Linux in-game check is still outstanding.
  • The listed CI checks are still running.
More: does it help, other systems, switches, what was read

Does it help: Yes for empty bottles: the reported Windows run showed counts rising from 0 to 4, then falling with Left, and two bottles persisted through a save and reload. Filled-bottle and assigned-button behavior remains unproven in game.

Other systems: The change writes save-backed bottle and item-button flags for both ages; the game-free test models those paths, but their actual game behavior remains to be checked. Linux has a reported syntax check but no reported in-game run.

Switches: None.

Reviewed: 9d0162700e against 569537f71d: Read AGENTS.md and CONTRIBUTING.md, the bottle implementation and its caller, and the reported tests and review history. Skimmed the remaining diff; did not read every changed file in full.; nothing run (a code review).

Checked and fine:

  • The bottle model covers moving a filled bottle, clearing an assignment to a removed bottle, and following a moved bottle.
  • The reported Windows run covers empty-bottle changes and persistence through save and reload.

Testing: No commands from the project were run. The author's reported Windows game run and game-free checks were considered.

Overlaps and merge order: #2779 is the prerequisite; merge it first.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The reported game run shows empty bottles can be counted and removed, but the filled-bottle move and assigned-button updates still need an in-game check. The change also depends on #2779 merging first. Recommend approval; not approved on the forge. The Debug inventory row counts empty bottles and can remove them while preserving filled bottles and recorded inventory action IDs. The added slot and flag handling increases complexity, with its more involved cases covered by a game-free model. **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) - **L2** `game/oot_tools.c:427`: The filled-bottle move and assigned-button updates have not yet been exercised in the game. *When:* With an empty bottle before a filled bottle, Left moves the contents and rewrites the child and adult button flags. The test models those setters and flag meanings, so it cannot establish that the game retains the contents and button assignments after the actual queued writes and reload. **Do:** Run the described in-game fairy and child/adult button cases, including a save and reload, and report the results. **Since the last review** (on ef2d9cead3b1) Still open: L2 (The filled-bottle move and assigned-button updates have not yet been exercised in the game…) **Checks:** Still running: 11 checks. <details> <summary>Also noticed (3; not asked for, not blocking)</summary> - The pull request is stacked on #2779, which should merge first. - The reported Linux in-game check is still outstanding. - The listed CI checks are still running. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for empty bottles: the reported Windows run showed counts rising from 0 to 4, then falling with Left, and two bottles persisted through a save and reload. Filled-bottle and assigned-button behavior remains unproven in game. **Other systems:** The change writes save-backed bottle and item-button flags for both ages; the game-free test models those paths, but their actual game behavior remains to be checked. Linux has a reported syntax check but no reported in-game run. **Switches:** None. **Reviewed:** 9d0162700ef7 against 569537f71d42: Read AGENTS.md and CONTRIBUTING.md, the bottle implementation and its caller, and the reported tests and review history. Skimmed the remaining diff; did not read every changed file in full.; nothing run (a code review). **Checked and fine:** - The bottle model covers moving a filled bottle, clearing an assignment to a removed bottle, and following a moved bottle. - The reported Windows run covers empty-bottle changes and persistence through save and reload. **Testing:** No commands from the project were run. The author's reported Windows game run and game-free checks were considered. **Overlaps and merge order:** #2779 is the prerequisite; merge it first. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.</sub>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2785
No description provided.