Skip to content

BBQ Farmer: start Make TM at the last craftable TM - #29

Closed
dayfine wants to merge 10 commits into
mainfrom
bbq/make-tm-resume
Closed

dayfine wants to merge 10 commits into
mainfrom
bbq/make-tm-resume

Conversation

@dayfine

@dayfine dayfine commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Depends on: nothing. Base branch: main, so the diff shows only this change. Draft on the fork until it has a live run; then it can go upstream as is.

Part of PokemonAutomation/ComputerControl#263.

Problem

The TM machine opens on the first TM, and quest_make_tm() steps through every TM it can't craft before the one it can, ~2.5 s per step (A, wait, A, right, wait). R4 and R5 took 12-16 steps on every Make TM quest (counted from the logs), ~30-40 s of a ~79 s quest. The craftable TM moves only a few places between quests, as materials run out.

Change

quest_make_tm() remembers the index of the last craftable TM for the program run, and tries it first: right that many times, then A. If the craft prompt shows, it makes that TM. If not, it closes the dialog, goes back left to the first TM and scans as before. A new run starts at the first TM (the index is kept with the run's ProgramInfo::start_time, so it needs no new parameters).

Tests

None: this is console-only (controller presses and the craft prompt watcher), with no injectable seam on main. Builds on macOS arm64. Needs a live check: two Make TM quests in one run, the second one logging "Trying TM N first, the last one made." and making TM N.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine and others added 4 commits October 22, 2026 17:35
The TM machine opens on the first TM, and quest_make_tm() walked
through every uncraftable TM before the craftable one: 12-16 steps of
~2.5 s each in R4 and R5, on every Make TM quest.

Remember the index of the last craftable TM for the program run (keyed
by the run's start time) and try it first. If it is no longer
craftable, go back to the first TM and scan as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
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 6 commits November 2, 2026 07:01
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by consolidated Tree 4 PR #275.

@dayfine dayfine closed this Nov 9, 2026
@dayfine
dayfine deleted the bbq/make-tm-resume 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