Files
my-botty/docs/fix_plan.md
2026-06-07 17:52:55 +02:00

2.7 KiB

Botty Fix Plan — 2026-06-05

Symptoms (from today's logs)

  • 4 sessions today: 31 + 1 + 9 + 6 games = 47 games total
  • 51 deaths across all sessions
  • 0 valuable items found (only charms, jewels, gold)
  • Nihlathak run fails every time, ending entire games
  • Vendor trade button never found (can't buy potions)
  • Stash never opens (can't stash items)
  • CTA weapon switch fails occasionally

Priority 1: Nihlathak approach fails (game-ending)

Error: Approach failed for run_nihlathak — ends game after 600-650s Impact: 3+ games ended per session

Root cause: Teleport activation times out, bot can't reach Nihlathak Fix:

  • Check config/game.ini for Nihlathak coordinates (a5_nihlathak_*)
  • Likely missing or stale path nodes
  • Re-record path with node_recorder.py
  • May need fresh template images for Nihlathak area

Files to check:

  • config/game.ini (Nihlathak section)
  • src/run/nihlathak.py
  • assets/templates/nihlathak/

Priority 2: Vendor trade button not found

Error: Could not find trade btn. Should not happen! Impact: Can't buy potions every town return

Root cause: Trade button template outdated or offset wrong for Hell difficulty UI Fix:

  • Take fresh screenshot of vendor trade window
  • Update trade button template in assets/templates/
  • Check if trade button position shifted between Normal/Nightmare/Hell

Files to check:

  • assets/templates/ (trade button template)
  • src/ (vendor interaction code — search for "trade btn")

Priority 3: Stash detection fails

Error: select_by_template: could not find ['A1_TOWN_0'] then ['A5_STASH', 'A5_STASH_2'] Impact: Can't stash items, inventory fills with junk

Root cause: Stash template confidence threshold too high or template outdated Fix:

  • Take fresh screenshot of stash UI in Hell difficulty
  • Update A1_TOWN_0, A5_STASH, A5_STASH_2 templates
  • Consider lowering confidence threshold (currently 0.68)

Files to check:

  • assets/templates/a1_town/
  • assets/templates/a5_stash/
  • Template matching threshold in code

Priority 4: CTA weapon switch fails

Error: _pre_buff_cta: switch to CTA slot failed — retrying Impact: Occasional, bot retries

Root cause: Weapon switch key or template unreliable Fix:

  • Verify weapon switch key binding (capslock per memory)
  • Check CTA slot detection template
  • May need more robust retry logic

Files to check:

  • src/ (search for _pre_buff_cta)
  • config/ (weapon_switch key)

Approach

All four issues are template/coordinate problems — stale screenshots or wrong positions. Fix pattern: screenshot current game UI at those locations, update templates.

Do in order: Nihlathak > vendor > stash > CTA.