Skip to content

BBQ Farmer: save once when completion milestones advance - #1626

Closed
dayfine wants to merge 2 commits into
PokemonAutomation:mainfrom
dayfine:bbq/save-reset-milestones
Closed

dayfine wants to merge 2 commits into
PokemonAutomation:mainfrom
dayfine:bbq/save-reset-milestones

Conversation

@dayfine

@dayfine dayfine commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Depends on: #1632. Merge #1632 first. Until it merges, this PR also shows #1632's commit; only the last commit is new here.

The BBQ Farmer saves and resets when the completion count is an exact multiple of the save interval. That has two problems:

  • A round that completes nothing while the count sits at 0 or 50 saves and resets again.
  • A round that goes from 49 to 52 completions skips the 50 milestone entirely.

Changes

  • run_bbq_rounds() compares the completion count before and after each round, and asks end_round() to save once when the count crosses a multiple of the interval. Stalled rounds and an interval of 0 never save. The check is a file-local helper in BBQSoloFarmer.cpp.
  • The save/reset steps themselves are unchanged.
  • Fix the option label to say "after completing this many quests" instead of "attempting".

Validation

Recovery context: PokemonAutomation/ComputerControl#263.

🤖 Generated with Claude Code

@dayfine
dayfine force-pushed the bbq/save-reset-milestones branch 2 times, most recently from 1b9cbf1 to 0b933e1 Compare October 21, 2026 03:20
@dayfine
dayfine force-pushed the bbq/save-reset-milestones branch 4 times, most recently from cf29437 to 6c71a43 Compare October 21, 2026 04:55
dayfine and others added 2 commits October 20, 2026 22:02
BBQSoloFarmer::program() runs its quest rounds inline against the
console, so the round logic (which quests count, when to stop, when to
save) can only be exercised by running the farmer on a Switch.

Move the round loop into run_bbq_rounds(), which takes the game actions
it depends on as a BBQGameActions interface: read the quests, process
them, do a quest, report a completed quest, and end the round (saving
if due). BBQSoloFarmer implements these with the calls they replace, in
the same order; the date fix, save/reset, stats and notification move
together into end_round(). Startup, flying to the plaza and
end-of-program handling stay in program(). The commented-out
single-quest debug block declares its own egg counter now that the loop
locals have moved.

process_quest_list() only reads its quest list and egg count, so take
them as const& and by value.

Add PokemonSV::BBQFarmerRounds, a table of scenarios run against a
simulated singleplayer quest panel: 3 blue quests, completed quests are
replaced, impossible quests are skipped, and a panel with nothing doable
is rerolled. Each scenario checks the number of completed quests and the
exact action sequence: finishing the round that reaches the goal, a
quest already gone, a failed quest, a panel with nothing doable, saving
at exact multiples, and stopping when out of eggs. No behavior
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
The farmer saved and reset when the completion count was an exact
multiple of SAVE_NUM_QUESTS. A round that completed nothing while the
count sat at 0 or 50 saved again, and a round going from 49 to 52
skipped the 50 milestone entirely.

Compare the count before and after each round and ask end_round() to
save once when it crosses a multiple of the interval. Stalled rounds
and an interval of 0 never save. Fix the option label to say
"completing", not "attempting".

Add two PokemonSV::BBQFarmerRounds scenarios that fail with the old
rule: a round that skips past a milestone, and rounds with no
completions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Closing for now to keep the upstream queue to PRs that are ready: this one waits on unmerged parent PRs. It continues on my fork as dayfine#4, and I'll reopen it here once its parents merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant