-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't workingcriticalSomething like crashes or unusabilitySomething like crashes or unusability
Description
Bug Report
Description
The Module Solver's OCR feature successfully reads text from the game window, but the text is not being properly converted into module data that the solver can use. The OCR extracts the text correctly, but the parsing step fails to convert it into ModuleInfo objects.
Expected Behavior
- User starts OCR capture
- OCR reads module information from game screen
- Text is parsed and converted to ModuleInfo objects with:
- Module name (e.g., "Excellent Attack Module")
- Quality/rarity level
- Module category (Attack/Defense/Support)
- Module attributes (e.g., "Strength Boost+5", "Agility+3")
- Modules appear in the solver's module list
- User can analyze and optimize module combinations
Current Behavior
- OCR successfully captures screenshots
- OCR extracts text from screenshots (visible in debug logs)
- Text parsing fails to create ModuleInfo objects
- No modules are added to the solver list
- Solver has no data to work with
Possible Causes
The parsing failure could be due to:
- Attribute name mismatches: OCR text doesn't match the attribute mappings in NormalizeAttributeToGameFormat()
- Module type detection failing: Regex pattern for "Attack/Defense/Support Module" not matching OCR output
- Quality/rarity detection issues: Patterns like "Excellent", "Superior", etc. not being found
- Regex pattern issues: Attribute value patterns (e.g., "Strength+5") not matching the actual OCR text format
- Language/localization issues: OCR might be reading non-English text
Steps to Reproduce
- Open BlueMeter and navigate to Module Solver
- Click "Start OCR" button
- Open module details screen in game
- Wait for OCR to capture
- Click "Stop OCR"
- Observe that no modules are added to the list (or very few modules captured)
- Check debug logs to see OCR text was extracted but parsing failed
Files Involved
BlueMeter.WPF/Services/ModuleSolver/ModuleOCRCaptureService.cs- OCR capture and parsing logic- Line 399-533:
ParseModuleFromText()method - Line 535+:
NormalizeAttributeToGameFormat()method
- Line 399-533:
BlueMeter.WPF/Services/ModuleSolver/ModuleConstants.cs- Attribute ID and name mappings
Debug Information Available
The OCR service saves debug files to help diagnose issues:
- Screenshots:
ModuleOCR_debug_*.png - OCR text output:
ModuleOCR_text_*.txt - Debug log:
ModuleOCR_debug.log
These files show what text OCR is reading, which helps identify why parsing is failing.
Investigation Needed
- Review debug logs to see actual OCR text output
- Compare OCR text format with regex patterns in ParseModuleFromText()
- Check if attribute names in OCR text match the mappings in NormalizeAttributeToGameFormat()
- Test with different module types (Attack/Defense/Support)
- Test with different quality levels (Common/Rare/Excellent/etc.)
- Check if game language affects OCR text format
- Verify regex patterns handle various text formatting (spacing, capitalization, etc.)
Potential Solutions
- Update regex patterns to be more flexible/tolerant of OCR variations
- Add more attribute name aliases to NormalizeAttributeToGameFormat()
- Improve text preprocessing (cleaning, normalization)
- Add fuzzy matching for attribute names
- Support multiple languages/localizations
- Add better error logging to show exactly which parsing step is failing
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcriticalSomething like crashes or unusabilitySomething like crashes or unusability