Commit Graph

20 Commits

Author SHA1 Message Date
LemonNexus c4aab56a9e fix: better cache folder detection with nested subfolder support
- Now checks 2 levels deep for TGA files (handles version subfolders like 19.3.2.201024)
- convert_cache_folder now uses rglob to find TGA files in all subfolders
- Will auto-detect the version folder in ProgramData
2026-02-11 16:45:31 +00:00
LemonNexus 6983d74f34 fix: actually apply canvas sizing during TGA conversion
The _apply_canvas method existed but was never called in convert_tga_to_png.
Now properly applies canvas sizing in both PIL and manual conversion paths.
2026-02-11 16:43:17 +00:00
LemonNexus b666e40bfc feat: add canvas sizing with centered icons and upscale option
- Removed WebP support (PNG only now)
- Added canvas size selector: Original, 64x64, 128x128, 256x256, 280x280, 320x320, 512x512
- Icons are centered on transparent canvas
- Added 'Upscale small icons' checkbox to scale up small icons to better fill canvas
- Uses high-quality Lanczos resampling for upscaling
- Default canvas size: 320x320
2026-02-11 16:37:14 +00:00
LemonNexus ac334ac4a8 feat: add WebP output format support for TGA conversion
- Updated TGAConverter.convert_tga_to_png() to support 'webp' format
- High quality WebP encoding (quality=95, method=6)
- Added format selector in UI (PNG or WebP)
- Convert button text updates based on selected format
- WebP is better for web uploads: smaller files, better quality

WebP advantages:
- 25-35% smaller file size than PNG
- Better quality at same file size
- Alpha channel support
- Widely supported in modern browsers
2026-02-11 16:17:31 +00:00
LemonNexus 14bac40fdf fix: use PIL as primary TGA reader with manual fallback
- PIL handles more TGA formats correctly
- Manual parser fixed to properly skip ID and color map fields
- Added better error messages with expected vs actual data size
- Fallback chain: PIL first, then manual parser
2026-02-11 16:00:03 +00:00
LemonNexus f2dff103a8 fix: add actual game cache path and search subfolders for icons
- Added: C:\ProgramData\Entropia Universe\public_users_data\cache\icon
- Now searches version subfolders (e.g., 19.3.2.201024)
- Also searches ProgramData recursively as fallback
2026-02-11 15:39:36 +00:00
LemonNexus acca0d3491 feat: add TGA Icon Converter for game cache files
- New module: modules/tga_converter.py
  - Reads Truevision TGA format from game cache
  - Converts to PNG with proper color handling (BGR->RGB)
  - Auto-detects cache folder location
  - Batch conversion support
  - Handles alpha channels

- New dialog: ui/tga_converter_dialog.py
  - Visual interface for TGA conversion
  - Shows list of cached .tga files
  - Progress tracking during conversion
  - One-click convert all

- Added to Tools → Computer Vision → TGA Icon Converter (Ctrl+T)

This is much more efficient than extracting icons from screenshots!
The game already has the icons in cache as .tga files.
2026-02-11 15:37:14 +00:00
LemonNexus adc76e42cc refactor: reorganize default directories to Documents/Entropia Universe/
Changed default locations:
- Screenshots: Documents/Entropia Universe/Screenshots
- Icons: Documents/Entropia Universe/Icons

This provides better organization and easier access for users.
All directories are created automatically if they don't exist.
2026-02-11 15:27:39 +00:00
LemonNexus 18ce52a72e fix: remove invalid import from inventory_scanner.py
The create_ocr_backend and AVAILABLE_BACKENDS don't exist in ocr_backends module
2026-02-11 15:25:06 +00:00
LemonNexus 1a0c0d4231 feat: add Inventory Scanner for extracting item icons and stats
- New module: modules/inventory_scanner.py
  - Detects inventory and item details windows
  - Extracts item icons from inventory grid
  - Reads item stats from details panel
  - Parses weapon, armor, and common stats
  - Handles scrolling (planned for future)

- New dialog: ui/inventory_scanner_dialog.py
  - Visual interface for scanning
  - Shows extracted icons in grid view
  - Displays item stats in table
  - Saves results to JSON
  - Background worker for non-blocking scans

- Updated main_window.py:
  - Added Tools → Computer Vision → Inventory Scanner (Ctrl+I)
  - Integrated with existing GameVisionAI

This allows users to extract item data from Entropia Universe
for gear management and loadout configuration.
2026-02-11 15:19:56 +00:00
LemonNexus 27b3bd0fe1 feat: comprehensive settings dialog and UI cleanup
- Create new ui/settings_dialog.py with tabbed interface
- Tabs: General, Screenshot Hotkeys, Computer Vision, Advanced
- Remove old SettingsDialog from main_window.py
- Update on_settings() to use new comprehensive dialog
- Screenshot hotkey settings now in Settings (Ctrl+,)
- Computer Vision settings now in Settings dialog
2026-02-11 13:26:31 +00:00
LemonNexus 53f7896dfa fix: screenshot thread safety - use fresh mss context per capture
- Remove persistent mss.mss() instance from AutoScreenshot
- Use context manager 'with mss.mss() as sct:' for each capture
- Fixes '_thread._local' object has no attribute 'srcdc' error
- Allows screenshots to work from hotkey callbacks in background threads
2026-02-11 13:14:44 +00:00
LemonNexus f403f3edfe fix: screenshot hotkeys - use Qt shortcuts + optional global hotkeys
- Rewrote screenshot_hotkey.py to use Qt QShortcut as primary method
- Qt shortcuts work reliably when app is focused (no admin needed)
- Added optional 'keyboard' library for global hotkeys (requires admin)
- Updated main_window.py to pass parent window to hotkey manager
- Shows clear status: global vs Qt-only mode
- Users can now press F12 etc when app is focused
2026-02-11 12:55:24 +00:00
LemonNexus 21c2508842 fix: hotkey parsing and initialization order
- Use pynput format <f12>, <shift>+<f12> etc for hotkey parsing
- Initialize screenshot hotkeys AFTER UI setup (fixes log_output error)
- Clean up hotkey display in help text (remove angle brackets)
2026-02-11 12:37:12 +00:00
LemonNexus 286d3b4f5c feat: add screenshot hotkey manager for manual game capture
- Add modules/screenshot_hotkey.py with global hotkey listener using pynput
- Default hotkeys: F12=Full, Shift+F12=Region, Ctrl+F12=Loot, Alt+F12=HUD
- Integrate into main_window.py with Settings dialog
- Hotkeys work globally (even when game is focused)
- Add Tools → Screenshot Hotkeys menu (Ctrl+Shift+S)
- Shows status message when screenshot is captured
2026-02-11 12:31:59 +00:00
LemonNexus 1ff64ac53f feat: add OpenCV GPU text detection as fallback to PaddleOCR
Based on PyImageSearch article: https://pyimagesearch.com/2022/03/14/improving-text-detection-speed-with-opencv-and-gpus/

- Add opencv_text_detector.py using EAST model with CUDA support
- OCRProcessor now uses PaddleOCR first, falls back to OpenCV
- OpenCV text detection: ~97 FPS on GPU vs ~23 FPS on CPU (4x faster)
- No heavy dependencies (PyTorch/PaddlePaddle) required for OpenCV mode
- Auto-downloads EAST model on first use
2026-02-11 12:26:12 +00:00
LemonNexus b9ff965185 fix: add PyTorch fix scripts and make torch import optional
- Add fix_pytorch.bat for Windows users to repair PyTorch installation
- Add verify_vision.py to check and auto-fix vision dependencies
- Make torch import optional in game_vision_ai.py to prevent crashes
- Provides graceful fallback if PyTorch fails to load
2026-02-11 11:49:58 +00:00
LemonNexus 522ee8e719 feat: add AI Computer Vision with local GPU support
- modules/game_vision_ai.py - Main AI vision engine with OCR and icon detection
- modules/icon_matcher.py - Icon similarity matching using perceptual hashing
- ui/vision_settings_dialog.py - GPU/OCR settings panel
- ui/vision_calibration_dialog.py - Calibration wizard
- ui/vision_test_dialog.py - Test and debug dialog
- vision_example.py - Usage examples
- Update requirements.txt with paddlepaddle, opencv, torch dependencies

Features:
- GPU auto-detection (CUDA, MPS, DirectML)
- PaddleOCR for text extraction (English/Swedish)
- Icon detection from loot windows
- Icon matching against database
- Real-time screenshot processing
2026-02-11 11:29:10 +00:00
LemonNexus 7c7922a508 feat: implement icon extraction, market prices, and GUI dialogs
- icon_manager.py: Download item icons from EntropiaWiki with caching
- market_prices.py: Manual price tracking and profit calculators
- icon_price_dialogs.py: GUI for browsing icons and managing prices
- FEATURE_RESEARCH.md: Comprehensive feature research document
- Multiple icon sizes (32x32, 64x64, 128x128)
- Batch export to PNG
- Profit calculation with markup for hunting/crafting
- Price database with import/export
2026-02-09 23:51:15 +00:00
LemonNexus ca9b4fb862 feat: add 4 new modules for enhanced gameplay tracking
- loot_analyzer.py: Detailed loot analysis by mob/item category, DPS/DPP tracking, global alerts
- crafting_tracker.py: Blueprint success rates, QR progression, material tracking
- game_vision.py: Computer vision for detecting equipped gear and target mobs
- notifications.py: Discord/Telegram alerts for globals, HoFs, session summaries
- auto_screenshot.py: Automatic screenshot capture on important events

All modules ready for integration with main application
2026-02-09 23:29:15 +00:00