refactor: sync standalone extractor with cleaned up code

This commit is contained in:
LemonNexus 2026-02-11 19:32:44 +00:00
parent 3641e07745
commit af9ed2b456
2 changed files with 63 additions and 29 deletions

View File

@ -0,0 +1,55 @@
# Entropia Universe Icon Extractor
A standalone tool for extracting item icons from Entropia Universe game cache.
<img src="icon.ico" width="64" height="64" alt="EU Icon Extractor">
## Description
Extract item icons from Entropia Universe cache and convert them to PNG format.
**Important:** Items must be seen/rendered in-game before they appear in the cache! If an icon is missing, view the item in your inventory or the auction first.
## Usage
```bash
python icon_extractor.py
```
### Requirements
- Python 3.11+
- PyQt6: `pip install PyQt6`
- Pillow: `pip install Pillow`
## Features
- **Auto-detects** game cache from `C:\ProgramData\Entropia Universe\public_users_data\cache\icon`
- **Version selector** - Choose which game version to extract from
- **"All Folders" option** - Extract from all versions at once
- **Double-click preview** - Preview TGA files before extraction
- **320x320 PNG output** - Icons centered on transparent canvas
- **Light/Dark theme** - Toggle between themes
- **Custom output folder** - Choose where to save extracted icons
## Output
Icons are saved to your Documents folder:
```
Documents\Entropia Universe\Icons\
```
(Same location where `chat.log` is normally stored)
## Links
- **Developer:** ImpulsiveFPS
- **Discord:** impulsivefps
- **GitHub:** https://github.com/ImpulsiveFPS/EU-Icon-Extractor
## Disclaimer
Entropia Universe Icon Extractor is a fan-made resource and is not affiliated with [MindArk PE AB](https://www.mindark.com/). [Entropia Universe](https://www.entropiauniverse.com/) is a trademark of MindArk PE AB.
## License
MIT License - Feel free to use and modify!

View File

@ -2,59 +2,39 @@
Entropia Universe Icon Extractor Entropia Universe Icon Extractor
A standalone tool for extracting game icons from cache. A standalone tool for extracting game icons from cache.
Description: Extracts item icons from Entropia Universe game cache and converts
them to PNG format for use with EntropiaNexus.com wiki submissions.
Important: Items must be seen/rendered in-game before they appear in the cache.
Usage: Usage:
python standalone_icon_extractor.py python icon_extractor.py
Output Location:
Icons are saved to your Documents/Entropia Universe/Icons/ folder
(same location where chat.log is normally stored)
Developer: ImpulsiveFPS Developer: ImpulsiveFPS
Discord: impulsivefps Discord: impulsivefps
Website: https://EntropiaNexus.com GitHub: https://github.com/ImpulsiveFPS/EU-Icon-Extractor
Disclaimer:
Entropia Universe Icon Extractor is a fan-made resource and is not
affiliated with MindArk PE AB. Entropia Universe is a trademark of
MindArk PE AB.
""" """
import sys import sys
import logging import logging
from pathlib import Path from pathlib import Path
from typing import Optional, List, Tuple from typing import Optional, List
import ctypes import ctypes
try: try:
from PyQt6.QtWidgets import ( from PyQt6.QtWidgets import (
QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout, QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout,
QLabel, QPushButton, QComboBox, QListWidget, QListWidgetItem, QLabel, QPushButton, QComboBox, QListWidget, QListWidgetItem,
QFileDialog, QProgressBar, QGroupBox, QMessageBox, QCheckBox, QFileDialog, QProgressBar, QGroupBox, QMessageBox,
QSplitter, QTextEdit, QDialog, QScrollArea, QFrame QTextEdit, QDialog, QScrollArea
) )
from PyQt6.QtCore import Qt, QThread, pyqtSignal, QSettings, QSize from PyQt6.QtCore import Qt, QThread, pyqtSignal, QSettings
from PyQt6.QtGui import QIcon, QPixmap, QFont, QImage from PyQt6.QtGui import QIcon, QPixmap, QImage
PYQT_AVAILABLE = True
except ImportError: except ImportError:
PYQT_AVAILABLE = False
print("PyQt6 not available. Install with: pip install PyQt6") print("PyQt6 not available. Install with: pip install PyQt6")
sys.exit(1) sys.exit(1)
try: try:
from PIL import Image, ImageFilter from PIL import Image
PIL_AVAILABLE = True
except ImportError: except ImportError:
PIL_AVAILABLE = False
print("Pillow not available. Install with: pip install Pillow") print("Pillow not available. Install with: pip install Pillow")
sys.exit(1) sys.exit(1)
import numpy as np
# Setup logging # Setup logging
logging.basicConfig( logging.basicConfig(
level=logging.INFO, level=logging.INFO,
@ -68,7 +48,6 @@ APP_NAME = "Entropia Universe Icon Extractor"
APP_VERSION = "1.0.0" APP_VERSION = "1.0.0"
DEVELOPER = "ImpulsiveFPS" DEVELOPER = "ImpulsiveFPS"
DISCORD = "impulsivefps" DISCORD = "impulsivefps"
WEBSITE = "https://EntropiaNexus.com"
class TGAHeader: class TGAHeader: