Skip to content

Add Quanah: event-equipment set solver with tooltip scanning - #10

Merged
ejpham merged 2 commits into
mainfrom
feature/quanah-set-solver
Nov 24, 2026
Merged

ejpham merged 2 commits into
mainfrom
feature/quanah-set-solver

Conversation

@ejpham

@ejpham ejpham commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Players farm Libae's Supercharged event pieces (hat, top, bottom, cape, gloves, shoes). Each piece rolls 1–3 "+1" skill lines, and players need the one-per-slot set that fills their build's 18 lines. Entering dozens of pieces by hand is the bottleneck, so this adds a Quanah page that scans them from hovered tooltips.

  • Page: opened from a pinned Quanah tile in the roster, independent of characters.
    • Pick a class, then scan pieces or add them by hand. Pieces can be edited and deleted.
    • Shows the best set for the Skill, GanDi, EU or Custom build (up to 18 points), plus pieces that would finish the set in one drop.
  • Solver: ports the community 3L / GanDi / EU solvers' DP. Tests check it against each site's own output on its example gear.
  • Scanning: watches the game until stopped and captures every new tooltip, from the inventory or the Equipment window.
    • In the inventory it picks the hovered tooltip over the equipped comparison one. The OCR step reads the exact tooltip chosen at capture time.
    • Reads run in the background queue. The name is read first, so a shoulder or medal is skipped after one row (about 1 s instead of 30–50 s), and stat rows stop at Scroll Enhancement.
    • Handles wrapped lines, "Skill Level" job-line wording, the cursor covering the name, and tooltips clipped at the screen's edge.
    • A capture that genuinely fails is saved to logs/quanah-failed/ for diagnosis.
  • Flags: pieces for another class are marked Can't wear and left out of the solver. Identical pieces (same slot, same lines in any order) are marked Duplicate.
  • Shared scanner code:
    • equipment_scan gains tooltip_bottom and row_crop, and row_regions gains an optional split.
    • item_tooltip gains level_anchors.
    • Existing callers behave exactly as before; the equipment replay tests match crops byte-for-byte.

Test plan

  • pytest: solver against the three sites, store/API, and the reader on 8 real tooltip fixtures (hovered, equipped, bottom-clipped, a wrapped line, a one-line piece, a shoulder, a medal).
  • node --test tests/js/*.test.cjs
  • Checked in the app with real scanned pieces: builds, editing, flags, layout.
  • Live scanning in game at 2560×1440 (Filter Applied) is untested. Scale detection there uses the tooltip's Required Level label, which may need a masked match.
  • Known follow-up: when a tooltip's bottom edge isn't found, the comparison area runs to the screen's bottom. Animated scenery there could block a capture or repeat it.

🤖 Generated with Claude Code

Eric Joseph Pham and others added 2 commits November 24, 2026 16:21
Players farm Libae's Supercharged event pieces (hat, top, bottom, cape,
gloves, shoes), each rolling 1-3 "+1" skill lines, and need the one-per-slot
set that fills a build's 18 lines. Entering dozens of pieces by hand is the
bottleneck, so the scanner reads them from hovered tooltips.

- A pinned Quanah tile in the roster opens a character-agnostic page: pick a
  class, scan or add pieces by hand, edit or delete them, and see the best
  set for the Skill, GanDi, EU or Custom (max 18 points) build.
- The solver ports the community 3L/GanDi/EU solvers' DP and also lists
  "one drop finishes it" options.
- Scanning watches the game until stopped and captures every new tooltip, in
  the inventory (picking the hovered tooltip over the equipped comparison)
  or the Equipment window. Reads run in the background queue; the name is
  read first, so other items are skipped after one row, and stat rows stop
  at Scroll Enhancement. Wrapped lines, "Skill Level" job lines, a cursor
  over the name and tooltips clipped at the screen's edge are handled.
- Pieces for another class are flagged and left out; identical pieces are
  flagged as duplicates. Saved scans are re-matched when the catalog improves.
- equipment_scan gains tooltip_bottom, row_crop and an optional split in
  row_regions; item_tooltip gains level_anchors. Existing callers behave as
  before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI's Lint step failed on two I001 errors: an extra blank line inside
_save_quanah_piece's imports, and an equipment_scan import in
quanah/vision.py longer than the 110-character limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ejpham
ejpham merged commit 297b143 into main Nov 24, 2026
1 check passed
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