Per-user character profiles (gitignored, survive git pulls):
- config/profiles/<name>/profile.ini overrides any params.ini key
(runs, difficulty, char type, keybinds...). Priority:
custom.ini > profile.ini > params.ini. Injected into _select_val and
all 22 build-section merges.
- Active profile selected via config/active_profile.txt (gitignored);
Config.get/set_active_profile + list_profiles/list_pickit_profiles.
Shared pickit profiles (git-tracked team content):
- config/pickit_profiles/<set>/*.bnip - one folder per season phase,
built once, shared via git. Selected per user with
[general] pickit_profile=<set> in their profile.
- Pickit dir priority: config/profiles/<me>/pickit/ (personal)
> config/pickit_profiles/<set>/ > config/bnip/ > default.bnip.
Menu integration (main.py):
- startup banner shows active profile + pickit set + available lists
- "end" hotkey cycles character profiles (applies on restart)
Verified: fistman profile active end-to-end (general/char/build-section
overrides + shared pickit set resolution + 474 expressions loaded).
Co-Authored-By: Claude Fable 5 <[email protected]>
Mirrors the D2R settings check: on the first on_maintenance of a bot
session, validate_build_skill_icons presses each configured skill hotkey
and verifies the icon on the right slot, warning loudly (with a pointer to
tools/set_binds_from_params.py) when a bind does not match params.ini.
Non-blocking; ~5s once per session.
Co-Authored-By: Claude Fable 5 <[email protected]>
Live finding (fresh game, 2026-06-12): D2R skill hotkeys select onto the
RIGHT skill slot, not the left as the old comments assumed. The left slot
permanently holds Blessed Hammer. Consequence: _cast_hammers pressing the
hammer hotkey after activating an aura was REPLACING the aura on the right
slot every cast cycle - the true root cause of fights running without
Concentration. _cast_hammers no longer touches the hammer hotkey: select
aura (lands on right, stays active), hold stand-still, spam left-click.
Verified live: full Diablo kill at 09:04, ~55s from last seal to kill.
Auto skill binding proven end-to-end (tools/set_binds_from_params.py):
blessed_hammer/concentration/redemption/vigor/holy_shield/teleport all
bound via the in-game picker and visually verified (6/7 OK; conviction
correctly reported missing - not skilled on this char).
- capture tool + preflight verify now watch the RIGHT slot
- fresh skill slot templates + clean PICKER_* cell templates captured at
current settings (blessed_hammer, concentration, redemption, vigor,
holy_shield, teleport)
- removed bogus conviction.png (had captured vigor's icon)
Co-Authored-By: Claude Fable 5 <[email protected]>
transfer_items now filters protected items out of BOTH the sell and drop
paths (previously only shields, only on sell): anything whose name contains
"charm" is blocked by default (charms live in the inventory permanently -
a pickit misread must not vendor them), shields stay protected, and
never_sell_keywords in [char] params can extend the list. Blocked items
stay untouched in the inventory.
Motivated by a real grand-charm-sold-by-mistake incident.
Co-Authored-By: Claude Fable 5 <[email protected]>
Layer 1 (Controls page / .keyo): tools/set_controls_keyo.py parses the
character keyo (same binary format as utils/key_detector) and verifies every
skill hotkey in params.ini is bound to a skill slot; --fix writes missing keys
into free skill slots with a backup (D2R must be closed). Picks the configured
character file. Verified: fistman controls match params.
Layer 2 (skill assignment / picker): enabled the existing skill_hotkey_setter
machinery for the hammerdin build:
- skill_preflight: hammerdin build rules (blessed_hammer left/required,
concentration right/required, redemption/vigor/conviction/holy_shield/
teleport right/optional) + PALADIN_TEMPLATE_ALIASES, merged TEMPLATE_ALIASES.
- skill_hotkey_setter: paladin picker template aliases with slot-icon fallback.
- tools/set_binds_from_params.py: end-to-end runner - opens the in-game picker,
binds each skill to its params hotkey, verifies via slot icon, reports
match/mismatch per skill.
- tools/capture_skill_hotkeys.py now saves crops straight into
assets/templates/ui/skills/ so captures immediately become live templates
for both the preflight and the picker search.
Co-Authored-By: Claude Fable 5 <[email protected]>
- hammerdin.py _cast_hammers: skip aura/hammer re-selection when the slot
already holds the wanted skill (tracked via _active_skill, invalidated by
pre_move/_weapon_switch/cast_buffs and all raw redemption/vigor hotkey
sends). Visible effect: aura stays on right-click and hammers fly from
plain left-click spam instead of constant F1/F3/F8 churn.
- 35 mid-clear attack casts switched from Redemption to Concentration
(damage aura while fighting); Redemption still pulses between packs and
after kills for corpse cleanup.
- DEPENDENCIES.md: full verified working-state snapshot (env paths, package
versions, tesseract wiring, D2R settings, DPI specifics, safety nets).
- tools/capture_skill_hotkeys.py: presses each params.ini skill hotkey
in-game and saves labeled left-slot icon crops - verifies binds match the
character and builds skill-icon templates for future aura checks.
- CLAUDE.md: remove stale main.exe mention (no exe build exists; bat runs
current source directly).
Co-Authored-By: Claude Fable 5 <[email protected]>
Session fixes (2026-06-11), all live-tested over multiple farm games:
- input_layer/hotkey.py: no-arg keyboard.wait() returned on ANY keypress,
silently killing the process right after F11 (all bot threads are
daemons). Now blocks forever like the original keyboard lib. Poll loop
is edge-triggered (no ~20ms refire while a hotkey is held) and callback
exceptions print instead of being swallowed. (Bug 13)
- d2r_image/ocr.py: pytesseract never read PYTESSERACT_TESSERACT_CMD;
tesseract_cmd is now wired from env var / PATH / winget default, fixing
exit 0xC0000135 on every OCR call. (Bug 14)
- bnip/utils.py + config/default.bnip: undefined NipSyntaxError ->
BNipSyntaxError, and Shaefershammer -> Schaefershammer typo; 474 pickit
expressions load (was 473 + parser error). (Bug 15)
- town_manager/a5/bot: A5 WP death-loop containment - per-game WP failure
budget (2 strikes), quick=True direct-path-only retries, sweep trimmed
10->6 steps with 4s select timeouts, A5 select thresholds lowered
(WP 0.62, stash 0.60/0.45; safe - every select is success_func-gated).
Worst case dropped from 10+ min wandering to ~4.5 min contained fail
with fresh-game recovery. (Bug 16)
- bot.py: vendor trip gating - the failure-prone A5->A4 Jamella round
trip now only runs when consumables are needed or 3+ sell items pend.
- town_manager.py: Cain identify skips acts whose Cain timed out this
session (straight to working A5 fallback).
- char/i_char.py: Battle Command buff check waits 0.6-0.8s after the
hotkey (icon fade-in) to reduce double weapon-swaps.
- char/paladin/hammerdin.py: kill_diablo fights with Concentration
instead of Conviction (useless for magic-damage hammers) and drops
mid-fight Redemption downtime - faster kills, merc survives. (Bug 17)
- inventory: stash supports all 6 pages (personal + 5 shared, D2R 2.7+);
gold deposits navigate via OCR-verified select_stash_page instead of
raw 4-tab clicks; rotation %6, shared-first starts at page 5. (Bug 18)
Docs: CLAUDE.md Bugs 13-18; .hermes/plans/dia_run_test_state.md has the
full test log (two complete Diablo kills verified end-to-end today).
Co-Authored-By: Claude Fable 5 <[email protected]>
OpenSSL 3.x + corrupted Windows cert store causes aiohttp to crash
at import time. Monkey-patch ssl.SSLContext.load_default_certs to
fall back to certifi when Windows store fails.
traverse_nodes previously gave up after one random-guess move when a node
template wasn't on screen, failing every travel path where the char was
mis-positioned (the A5-after-Pindle stranding was the worst case). Now,
on timeout during travel pathing (timeout > 3.1s, so boss approaches keep
their fast fail), it walks an expanding 12-step sweep, re-scanning for the
node each step, and only fails once the sweep is exhausted. Makes ALL
node pathing self-healing, not just A5.
Co-Authored-By: Claude Fable 5 <[email protected]>
The A5 waypoint was unopenable after a Pindle return: the char lands in
the NE near Anya, where the town_start->WP node templates are off-screen,
so the pather random-guessed and timed out. Pathing to NPC spots
(Qual-Kehk/Malah) DOES work from there, and each has a defined path to
the WP. New open_wp: direct -> re-anchor via Qual-Kehk/town_start/Malah
-> directed sweep that re-attempts node pathing + full-screen WP scan
each step. This is the linchpin: it unblocks the A5->A4 vendor redirect,
maintenance, stash, and the Diablo run's travel out of A5.
Co-Authored-By: Claude Fable 5 <[email protected]>
CRITICAL loot-loss bug: buy_consumables failure called end_game and
returned BEFORE the stash step, so Pindle runes/items piled in inventory
and were never banked (zero stash events across a whole session). Buying
pots is optional (belt refills from drops); stashing loot is the point.
Now warn + re-anchor + fall through to stash. Also raise
max_maintenance_time_s 120->240 so the A5 vendor thrash completes and
reaches stash instead of timing out first (transitional — disappears once
a Diablo run shifts spawns to A4).
Co-Authored-By: Claude Fable 5 <[email protected]>
A5-spawn games burn on the Malah vendor step (stale patch templates);
A4-spawn games sail through Jamella. The Diablo run ends with a TP to
A4 town, so running it LAST makes every next game spawn in A4.
Co-Authored-By: Claude Fable 5 <[email protected]>
The blind ESC after a failed sweep click opens the ESC game menu when no
dialogue was actually open (seen covering the screen during the Tyrael
hunt). Detect SaveAndExit after the ESC and close the menu again.
Co-Authored-By: Claude Fable 5 <[email protected]>
Diablo died in 22s but picked_up_items was false: his death animation /
lingering effects register as visible targets, so the mobs-alive guard
skipped his drops. pick_up_items(force=True) at the Diablo loot site.
Co-Authored-By: Claude Fable 5 <[email protected]>
The sweep for Tyrael clicked Deckard Cain (stands in the same zone) and
left his TALK dialogue open, blinding the rest of the sweep. Also sweep
the full search area as a second pass since NPCs can stand outside the
stored ROI, with a total time budget.
Co-Authored-By: Claude Fable 5 <[email protected]>
- OCR reads FISTMAN as "fabiman" — SequenceMatcher >= 0.6 on the first
word of the row handles the mangling
- start_bot_detached.bat kills existing main.py instances first: F11/F12
are global hotkeys, so duplicate bots receive every press and fight
each other (one starts while the other pauses/exits)
Co-Authored-By: Claude Fable 5 <[email protected]>
Body templates went stale with the June 2026 patch (Malah, Cain,
Tyrael, Larzuk, Qual-Kehk all undetectable), but name tags on hover
score 0.9+ reliably. When the body-template hunt times out, sweep a
coarse hover grid over the NPC ROI and click wherever the name tag
appears.
Co-Authored-By: Claude Fable 5 <[email protected]>
User-tuned detection thresholds and a safety guard against teleporting
into live packs during loot phases.
Co-Authored-By: Claude Fable 5 <[email protected]>
A misclick on the stash chest (Cain stands beside it) opens the stash
UI which covers most of the screen and blinds every template search:
NPC hunts, A5_WP selection, act detection. The old guard pressed the
inventory key, which leaves a stash panel open — ESC closes both.
Panels are now closed at hunt start, per hover-loop iteration, and
before WP traversal.
Co-Authored-By: Claude Fable 5 <[email protected]>
Malah wanders and her body templates predate the patch; the hunt fails
most games and the failed-hunt position strands the char. Jamella is
static and detects at 0.99+. Travel cost ~30s vs a lost game.
Co-Authored-By: Claude Fable 5 <[email protected]>
A full CS clear takes ~10 min; the 600s watchdog force-quit a game that
had all three seals open and was waiting for Diablo to spawn.
Co-Authored-By: Claude Fable 5 <[email protected]>
After a failed NPC hunt the char can be in a corner where no path nodes
anchor; both node traverses fail and the game dies. Walk a search
pattern across the small town scanning the whole screen for the WP
template directly each step.
Co-Authored-By: Claude Fable 5 <[email protected]>
- Seal 36 has two visual variants; dia_a2y4_36b_closed.png existed in
assets but was never searched, so the B variant could never be clicked
(8 sealdance tries then aborted the run)
- info_failed_seal_ screenshot name contained ": " (illegal on Windows)
producing 0-byte files
Co-Authored-By: Claude Fable 5 <[email protected]>
After Vizier/De Seis are dead, a failed recalibration traverse aborted
the whole Diablo run (threw away two boss kills at 13:43). The seal
stage re-anchors at the pentagram via template loop immediately after,
so just skip the extra loot pass and continue.
Co-Authored-By: Claude Fable 5 <[email protected]>
- town_manager.identify: return the reached A5 location when Cain fails
after successful travel (returning False made bot.py fall back to the
pre-travel act and run wrong-act pathing all maintenance long)
- town_manager.resurrect: leave last_known_loc breadcrumb when the A4
revive fails after travel; bot.py consumes it to re-anchor
- bot.py: alternate vendor retry prefers A4 Jamella (static, reliable)
over A1; Malah wanders and is the main A5 vendor failure
Co-Authored-By: Claude Fable 5 <[email protected]>
- diablo.py _layoutcheck: ambiguous/lost layout check now loops back to
the pentagram and retries the approach once before aborting the run;
template checks bumped from single-frame 0.1s to 0.5s
- hammerdin.py _cast_hammers: an unbound aura (e.g. conviction in
kill_diablo on a non-Infinity build) silently cast NOTHING, so Diablo
was never attacked with the damage aura. Fall back to concentration
and always cast hammers.
Co-Authored-By: Claude Fable 5 <[email protected]>
First encounter at char select blindly saved whichever character was
highlighted, locking in a wrong character for the whole session. Now,
when char_name is configured, select it via OCR first and warn if the
saved template name does not match.
Co-Authored-By: Claude Fable 5 <[email protected]>
Root causes from the 2026-06-09 session (51 games, 45 failed):
- Act desync: add TownManager.detect_current_act() and
Bot._verify_town_location(); every maintenance/end-run retry and
fallback now verifies the physical act instead of hardcoding town
starts. open_wp/go_to_act self-heal act mismatches. Never run A1
pathing when travel to A1 failed.
- NPC dialogue: poll action buttons up to 2.5s after click instead of
a single-frame check (premature retry click was closing the dialog).
- Stats integrity: log_end_game skips duplicate calls (phantom 0s
"successful" games were resetting the consecutive-fail breaker);
clear stale failure reason at game start; set chicken flag before
bot.stop() so chickens are no longer labeled "Bot stopped".
- Repair: prefer in-act Larzuk over cross-act Halbu trip (Halbu
detection failed 100% last session and desynced the act state).
Documented as Bugs 9-12 in CLAUDE.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
NPC body templates find Akara/Malah correctly but the name tag templates
score ~0.28, below the 0.35 threshold, causing 20s spinning when the NPC
is detected but the hover confirmation never passes.
Three targeted changes in open_npc_menu():
- Use a 240x140px ROI directly above the hover cursor for name tag search
instead of the full screen, containing false-positive risk
- Lower name tag threshold from 0.35 to 0.26 so Akara at ~0.28 now passes
- Check ScreenObjects.NPCDialogue after click as primary confirmation;
this is UI-state based and immune to stale template images
- Reduce per-NPC search timeout from 20s to 8s for faster failure recovery
Also lower max_maintenance_time_s from 120 to 60 to cap total stuck time.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Reliability
- All run approach() methods now set approach_fail_step before every return False;
bot.py _run_wrapper reads it and includes [step: X] in Discord/log failure reasons
- on_maintenance() sets _maintenance_step before each town step (heal, identify,
buy_consumables, stash_items, repair, resurrect_merc, gamble) for the same coverage
- on_init() logs startup line: char=X | difficulty=Y | routes=[...] each game
Per-run disable (bot runs as long as possible)
- GameStats tracks per-run failure counts across Bot instances (previously reset each game)
- After disable_run_after_failures consecutive failures a run is disabled for the session;
game-level consecutive-fail counter resets so the bot continues on remaining routes
- game_controller no longer quits on max_consecutive_fails if active routes remain;
only exits when all routes are disabled
Maintenance timeout (params.ini: max_maintenance_time_s=120)
- Hard 120 s wall on the entire town maintenance loop; checked between each major step
and before every retry (buy_consumables, stash, repair, resurrect_merc, gamble)
- On timeout: error screenshot + Discord, then trigger end_game → save-and-exit → rejoin
Bug fixes
- Win11 mouse overshoot: mouse_move() uses SetCursorPos + zero-delta MOUSEEVENTF_MOVE
- _curr_loc = True propagation: TownManager.identify() now returns the act Location enum
- DAMAGED KeyError in pickit: added ItemQualityKeyword.Damaged.value to NTIP_ALIAS_QUALITY_MAP
- A4 WP interaction range: force-move character to WP stone before select_by_template
- NPC click blocked by equipped-area guard: open_npc_menu() closes inventory if open
Docs
- Added CLAUDE.md: AI working guide with step tables, bug history, debugging tips
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>