Commit Graph

268 Commits

Author SHA1 Message Date
LemonNexus d130550c68 fix: sync standalone extractor with EU-Icon-Extractor repo 2026-02-11 19:11:02 +00:00
LemonNexus 5832bdd282 feat: major UI redesign - vertical layout
New layout structure:
1. Top row: Cache Source | Output Location (side by side)
   - More vertical space allocated
   - Both sections have equal width

2. Middle: Available Icons (full width)
   - Takes remaining vertical space
   - Expands to fill available area

3. Bottom: Action buttons
   - Select All / Select None on left
   - Open Output Folder in middle
   - Start Extracting Icons (main action) on right

Removed:
- Export Settings box (hardcoded settings)
- EntropiaNexus.com box (already explained in top text)
- Splitter layout (now vertical flow)

Simplified, cleaner UI with all essential elements visible.
2026-02-11 19:00:04 +00:00
LemonNexus ed98f073c7 feat: standalone extractor - theme toggle and UI improvements
Changes:
- Removed "Include ALL version folders" checkbox (redundant with dropdown)
- Adjusted splitter sizes: left panel 420px, right panel 400px
  (Available Icons list now takes less space)
- Added Light/Dark theme toggle button in header
  - ☀️ Light / 🌙 Dark modes
  - Toggle switches between themes
  - Dark theme is default

Theme support:
- _toggle_theme() method switches between modes
- _apply_dark_theme() - dark color scheme
- _apply_light_theme() - light color scheme

Code cleanup:
- Removed _on_all_subfolders_changed() method
- Simplified _refresh_file_list() logic
2026-02-11 18:55:48 +00:00
LemonNexus f1349fe366 feat: add application icon
Added ImpulsiveFPS icon as application icon:
- icon.ico in project root
- assets/icon.ico for organization

Icon appears in:
- Window title bar
- Header next to title (48x48)
- Taskbar
2026-02-11 18:51:34 +00:00
LemonNexus e22a8e3378 fix: restore icons/emojis to UI with improved layout
Restored all the nice icons throughout the UI:
- 📂 Cache Source, 💾 Output Location, ⚙️ Export Settings
- 🌐 EntropiaNexus.com, 📄 Available Icons, ⚠️ Important Information
- 📁 Version, 🔄 Refresh, ☑️ Include ALL, ▶️ Start Extracting
- ☑️ Select All,  Select None, 📂 Open Output Folder
- 🖼️ Format, 📐 Canvas, 📏 Size, 📤 Submit, 💡 hint,  Ready

Layout improvements:
- Smaller font (10px) for paths in Cache Source and Output Location
- Reduced padding for better fit
- All emojis restored as requested
2026-02-11 18:50:41 +00:00
LemonNexus 3943a5cdf5 fix: standalone extractor - clean UI and icon support
UI Cleanup:
- Removed gamepad from header
- Removed emojis from footer
- Cleaned up group box titles (no emojis in section headers)
- Tighter spacing in all boxes for better fit
- Shorter path displays with tooltips for full paths
- Reduced padding and margins throughout

Layout Improvements:
- Cache Source: Shows shortened path with tooltip for full path
- Output Location: Cleaner display with consistent styling
- All boxes now fit content without overflow
- Reduced minimum window size slightly

Icon Support:
- Added header icon placeholder (48x48)
- _load_icon() method loads icon.ico or icon.png
- Icon appears in window title bar and header
- Falls back gracefully if no icon file present

To add your icon:
Place icon.ico or icon.png in same folder as the script, or in assets/ folder
2026-02-11 18:47:35 +00:00
LemonNexus 77f210f594 feat: standalone extractor - classy emojis and clickable links
Added classy emojis throughout:
- 📂 Cache Source, 💾 Output Location
- ⚙️ Export Settings, 🌐 EntropiaNexus.com
- 📄 Available Icons, ⚠️ Important Information
- 📁 Version, 🔄 Refresh, ☑️ Include ALL
- 📂 Change Output Folder, 📂 Open Output Folder
- ▶️ Start Extracting Icons, ☑️ Select All,  Select None
- 💡 Double-click hint,  No files found,  Ready
- 👨‍💻 Developer, 💬 Discord, 📎 GitHub, 📜 Disclaimer

Clickable links in footer:
- MindArk PE AB → https://www.mindark.com/
- Entropia Universe → https://www.entropiauniverse.com/
- GitHub placeholder added

Also fixed text sizing to show full content in boxes
2026-02-11 18:39:21 +00:00
LemonNexus 9de20ad9d8 fix: standalone extractor UI improvements
- Removed EntropiaNexus.com from footer
- Description now on two lines with clickable link to EntropiaNexus.com
- Shortened Important Information text:
  "REQUIREMENT: Items must be seen in-game before they appear in the cache!
   If an icon is missing, view the item in your inventory or the auction first.
   Output: Documents/Entropia Universe/Icons/"
- Increased minimum heights for path labels to show full content
- Fixed box sizing for Cache Source, Output Location, and Nexus sections
2026-02-11 18:31:18 +00:00
LemonNexus f498dffa69 feat: standalone extractor - improved UI and TGA preview
Major improvements:

1. Disclaimer updated:
   - "Entropia Universe Icon Extractor is a fan-made resource..."

2. Important Information moved to bottom:
   - Orange header, amber text on dark background
   - Larger, easier to read font (13px)
   - Better line spacing

3. Improved text readability throughout:
   - Larger font sizes (12-13px)
   - Better contrast (lighter text on dark bg)
   - Bold headers in group boxes
   - Consistent spacing and padding

4. Fixed box layouts:
   - All content fits properly in Cache Source and Output Location
   - Better margins (12, 18, 12, 12)
   - Path labels wrap properly with minimum heights

5. Added TGA Preview feature:
   - Double-click any icon in the list to preview
   - Shows original size and scaled preview
   - Modal dialog with close button
   - Tooltip on items indicates preview is available

6. Updated styling:
   - Better hover effects on list items
   - Improved color scheme
   - Larger window default size (1150x900)
2026-02-11 18:23:43 +00:00
LemonNexus 6bf90e5230 fix: improve UI scaling and layout
- Increased minimum window size (1000x800)
- Removed maximumHeight from notice text box (auto-sizes)
- Better spacing and margins in group boxes
- Shorter, wrapped text for paths and labels
- Fixed footer to have proper height and multi-line layout
- Better button sizing and constraints
- Files list now expands to fill available space
2026-02-11 18:17:09 +00:00
LemonNexus a30515bf1e fix: update legal disclaimer in standalone extractor
Footer now reads:
"Entropia Nexus is a fan-made resource and is not affiliated with MindArk PE AB. Entropia Universe is a trademark of MindArk PE AB."

Also updated header comment with same disclaimer.
2026-02-11 18:13:40 +00:00
LemonNexus eba76cf59c feat: standalone extractor - professional polish and hardcoded settings
Major updates to standalone_icon_extractor.py:

Settings:
- Hardcoded to 320x320 canvas size (removed upscale options)
- Output folder uses Path.home() for any Windows username
- Added explanation about output location (Documents/Entropia Universe/Icons)

UI Changes:
- Removed game controller emoji from title
- Button changed to "Start Extracting Icons" (no rocket emoji)
- Removed all emojis from UI for professional look

Attribution & Legal:
- Footer: "Developed by ImpulsiveFPS"
- Discord contact: impulsivefps
- Disclaimer: Not affiliated with Entropia Universe or Mindark PE AB
- Trademark notice for Entropia Universe

Features:
- Added EntropiaNexus.com link and button
- Added explanation that items must be seen in-game to be cached
- Added "Important Information" box explaining cache requirements
- Icon support (looks for assets/icon.ico or icon.ico)

Technical:
- Uses QSettings under ImpulsiveFPS organization
- Added set_app_icon() function for custom icon support
2026-02-11 18:13:05 +00:00
LemonNexus 8b97dbc58c fix: standalone extractor - hardcoded path + subfolder support
- Hardcoded base path: C:/ProgramData/Entropia Universe/public_users_data/cache/icon
- Added version subfolder selector dropdown
- Shows icon count per subfolder
- "All Folders" option to merge from all subfolders
- Checkbox to include ALL subfolders at once
- Files list shows folder prefix (e.g., "19.3.2.201024/icon001.tga")
- Refresh button to re-scan for subfolders
- Auto-scan now properly detects and lists version folders
2026-02-11 18:00:01 +00:00
LemonNexus 7fa889a9bc feat: add standalone icon extractor tool
New standalone tool: standalone_icon_extractor.py

A focused, single-purpose GUI tool for extracting Entropia Universe icons:
- Auto-detects cache folder including version subfolders
- Converts TGA to PNG with transparent backgrounds
- Canvas sizing options (64x64 to 512x512)
- Upscale options: None, NEAREST, HQ4x, LANCZOS
- Selective conversion (select specific files or all)
- Saves settings between sessions
- Dark theme UI

Usage:
    python standalone_icon_extractor.py

Does not require Lemontropia Suite to be installed/running.
2026-02-11 17:56:33 +00:00
LemonNexus 8f7c7cb5a1 fix: TGA converter improvements
1. Auto-detection now uses rglob to find TGA files in ALL subfolders
   - Properly finds icons in version subfolders like 19.3.2.201024
   - Shows relative paths in the file list

2. Default settings changed:
   - Default canvas: 320x320 (index 5)
   - Default upscale: No Upscaling (first in list)

3. Added iconcache.dat parser module (icon_cache_parser.py)
   - Attempts to extract item names from binary cache file
   - Uses heuristics to find icon ID to name mappings
2026-02-11 17:39:49 +00:00
LemonNexus 5ec7541e78 feat: add "No Upscaling" option to TGA converter
- New option: " No Upscaling" - keeps original icon size, just centers on canvas
- Useful when you want the icon at original resolution on a larger canvas
- Tooltip updated to explain all options
- When "none" is selected, upscale parameter becomes False
2026-02-11 17:35:21 +00:00
LemonNexus 5374eba08f feat: add Real-ESRGAN AI upscaling support
- New module: modules/ai_upscaler.py
  - Real-ESRGAN integration for AI-powered upscaling
  - Designed specifically for low-res game textures/icons
  - 4x upscale factor with neural network enhancement
  - Falls back gracefully if model not available

- Updated TGA Converter UI:
  - New "AI Enhanced (Real-ESRGAN)" option in upscale dropdown
  - Only shown if Real-ESRGAN is installed
  - AI upscaling happens before canvas placement
  - Shows progress during AI model loading

Real-ESRGAN is much better than basic methods for rendered (non-pixel) icons!

To use AI upscaling:
1. pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
2. pip install realesrgan
3. Download RealESRGAN_x4plus.pth model
4. Select "AI Enhanced" in the UI
2026-02-11 17:32:40 +00:00
LemonNexus 0034cc9453 feat: add 3 upscale methods - Sharp Pixels, Smooth HQ4x-style, Photorealistic
- NEAREST: Sharp pixel edges (best for clean pixel art)
- HQ4x-style: Integer scale first, then smooth to target with edge enhancement
- LANCZOS: Very smooth (best for photorealistic textures)
- Added upscale method selector to UI
- Each method uses UnsharpMask for enhanced crispness
2026-02-11 17:25:00 +00:00
LemonNexus da52b99a36 fix: improve upscaling for pixel art icons
- Use integer scaling (2x, 3x, 4x) instead of fractional for sharp pixels
- Use NEAREST neighbor resampling (better for pixel art than Lanczos)
- Add sharpening filter after upscale
- Reduced padding to 85% so icons fill more of canvas

This produces much sharper results for game icons!
2026-02-11 16:53:44 +00:00
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 46e84b39e3 fix: pass selected cache path to conversion worker
- Worker now accepts cache_path parameter
- _start_conversion passes the selected path to worker
- Fixes 'Cache folder not found' error during conversion
2026-02-11 15:56:47 +00:00
LemonNexus 681b07688c fix: respect manually selected cache folder path
- _scan_cache now checks if manual path is set before auto-finding
- Fixes issue where browsing and selecting path was ignored
2026-02-11 15:54:29 +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 fc13b26135 fix: correct VisionCalibrationWizard import name
The class is VisionCalibrationWizard, not VisionCalibrationDialog
2026-02-11 15:24:08 +00:00
LemonNexus d01f98503a fix: add screenshot and icons directory settings back to Settings dialog
- Add Directories group to General tab
- Settings for screenshots directory
- Settings for extracted icons directory
- Browse buttons for both directories
- Values saved to QSettings
2026-02-11 15:22:42 +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 b06b98e6cc fix: change TIMESTAMP columns to TEXT to avoid SQLite auto-conversion errors
SQLite's TIMESTAMP type causes auto-conversion issues when data is in ISO format
- Changed all TIMESTAMP columns to TEXT in schema.sql
- Disabled detect_types in database.py to prevent auto-conversion
- This stores datetime as ISO strings without parsing issues
2026-02-11 13:13:55 +00:00
LemonNexus 381c0e2b50 fix: template and session loading - convert rows to lists before accessing
- Convert sqlite3.Row to list before accessing by index
- Add detailed debug logging for troubleshooting
- Fix fromisoformat error by checking for None values
- Add try/except around each row to skip bad data
2026-02-11 13:00:10 +00:00
LemonNexus 5a76c64b2f fix: template loading - use index-based row access to avoid unpack error
- Changed from dict-style access (proj['type']) to index access (proj[0])
- Added try/except around each row processing to skip bad rows
- Added detailed error logging with traceback
- Handle cases where row has fewer columns than expected
2026-02-11 12:58:21 +00:00
LemonNexus 91a8da3910 fix: template selection - add placeholder item and improve selection
- Add '-- Select a template --' as first item in combo box
- Block signals while refreshing to prevent unwanted callbacks
- Select newly created template automatically
- Fix index check to skip placeholder (index > 0 instead of >= 0)
- Add enable/disable based on whether templates exist
2026-02-11 12:57:23 +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 299b1e0fa5 fix: correct screenshot directory path for hotkey manager
ScreenshotCapture doesn't have screenshot_dir attribute - use Path directly
2026-02-11 12:34:13 +00:00
LemonNexus 9c6ad18c2b chore: add pynput to requirements for screenshot hotkeys 2026-02-11 12:32:14 +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 786b292fcd fix: import torch before PyQt to fix DLL loading on Windows
- Add early torch import before PyQt6 imports in main_window.py
- This prevents the c10.dll initialization error on Windows
- Solution 3 from user research: import torch before PyQt
2026-02-11 12:12:57 +00:00
LemonNexus 049a59136d fix: update verify_vision.py for Python 3.13 compatibility
- Use latest PyTorch versions (old ones don't exist for Python 3.13)
- Install PaddleOCR without PyMuPDF (avoids build errors)
- Skip PyMuPDF which requires Visual Studio build tools
2026-02-11 11:54:01 +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 92558d3e49 feat: wire Computer Vision features to UI menu
- Add Computer Vision submenu under Tools menu
- Add Vision Settings, Calibrate Vision, and Test Vision actions
- Add handler methods: on_vision_settings, on_vision_calibrate, on_vision_test
- Features accessible via Tools -> Computer Vision
2026-02-11 11:44:04 +00:00
LemonNexus 1ef6b0c0a1 fix: add QCheckBox import and fix sqlite3.Row access
- Add missing QCheckBox to PyQt6.QtWidgets import
- Fix sqlite3.Row access - use 'in row.keys()' instead of .get()
- Fixes template and session loading errors
2026-02-11 11:36:21 +00:00