Skip to content

BBQ Farmer: check which quest a reroll pays for, and that it was replaced - #8

Closed
dayfine wants to merge 7 commits into
bbq/pin-stuck-roundsfrom
bbq/verified-reroll
Closed

dayfine wants to merge 7 commits into
bbq/pin-stuck-roundsfrom
bbq/verified-reroll

Conversation

@dayfine

@dayfine dayfine commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Stage 1 ("never stuck"), PR 4 of 9. Based on bbq/pin-stuck-rounds (#53), so the diff shows only this change. Parents: #53 → #38 → #37 → #51 → main.

Part of PokemonAutomation/ComputerControl#263.

Rerolling a quest costs BP, but the farmer did not check which quest it paid for, or whether anything was rerolled at all.

  • Wrong quest. reroll_slot() opened the quest panel and pressed DOWN once per slot, assuming the cursor started on the top quest. On a Switch the panel often opens with the cursor where it was left. In one run, 3 of 10 rerolls opened the menu on a different quest than planned.
  • Nothing checked. It then pressed A twice and closed the panel. When out of BP, nothing was rerolled, the same quest came back, and it was rerolled again every round.

Change

reroll_quest() does one reroll through an injectable BBQRerollActions:

  1. Open the panel and press A wherever the cursor is.
  2. See which quest the reroll menu opened next to, from the position of its arrow. If it isn't the planned quest, close the menu, move the cursor by the difference, and try again (up to 3 times).
  3. Confirm only once the menu is open next to the planned quest.
  4. Read the panel again, up to 3 times since OCR can miss a read, to check the quest was replaced.

reroll_slot() becomes reroll_quest_slot(), declared next to reroll_quest(), which runs it on the console and stops the program if it fails:

Result BP spent Stops with
Panel did not open no error report
Reroll menu not found no error report
Quest not replaced maybe no error report; usually means out of BP

Reroll-all is unchanged.

Limits

  • The arrow boxes for the top three quests were checked on a Switch. The fourth uses the same spacing but hasn't been seen live.
  • A reroll that gives back the same quest looks the same as running out of BP, so it also stops.

Tests

9 PokemonSV::BBQReroll cases run reroll_quest() against a simulated panel with a cursor. Each checks the result, which slots were paid for, the updated quests, and that the panel was closed. They cover the cursor left below the quest, the fourth quest, panel or menu not found, out of BP, missed reads, and a same-quest replacement. All pass, along with the existing PokemonSV::BBQuestPlan cases.

Tested on the Switch with the rest of stage 1 in runs S1b and S1c (STAGE_RUNS.md): 15 quests, no stretch over 11 min without a completion, BP check OK. All 7 rerolls hit the intended slot and were confirmed replaced.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

reroll_slot() opened the quest panel, pressed DOWN once per slot from where
it assumed the cursor was, and pressed A twice. The panel does not always
open with the cursor on the top quest: on a Switch it opened where the
cursor was left, so the reroll paid for a different quest than planned.
Nothing checked the menu opened or the quest changed, so running out of
BP went unnoticed and the same quest was rerolled every round.

reroll_quest() now does a reroll through injectable BBQRerollActions:
open the reroll menu wherever the cursor is, see which quest the menu
opened next to from its arrow, move to the planned quest, and only then
confirm. Afterwards it reads the panel (up to 3 times, as OCR can miss a
read) to check the quest was replaced. Panel or menu not found stops
before spending BP; a quest not replaced stops without an error report,
as it usually means out of BP.

The arrow boxes for the top three slots were checked on a Switch; the
fourth uses the same spacing. Reroll-all is unchanged.

reroll_slot() becomes reroll_quest_slot(), declared next to
reroll_quest(): it runs reroll_quest() on the console and stops the
program if the reroll fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine
dayfine force-pushed the bbq/pin-stuck-rounds branch from 0725fc7 to 037549e Compare October 28, 2026 08:14
@dayfine
dayfine force-pushed the bbq/verified-reroll branch from 99d6497 to e6afd5e Compare October 28, 2026 08:14
dayfine and others added 2 commits October 29, 2026 22:16
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonSV/Programs/Farming/PokemonSV_BBQTests.cpp
Windows Clang builds with -Werror,-Wmissing-designated-field-initializers,
and the scenarios leave these fields out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine dayfine added farmer Farming programs game:sv Scarlet/Violet labels Nov 1, 2026
dayfine and others added 2 commits November 4, 2026 07:01
@dayfine

dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by consolidated Tree 1 PR #272.

@dayfine dayfine closed this Nov 9, 2026
@dayfine
dayfine deleted the bbq/verified-reroll branch November 13, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

farmer Farming programs game:sv Scarlet/Violet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant