Implemented a comprehensive module viewer for fleet carriers with expandable tree view, categorization, and grouping.
- Added "Modules" button next to "Ships" button in the Shipyard column
- Button is disabled when no modules are cached for that carrier
- Clicking opens the Stored Modules window
Modules are organized into a hierarchical structure:
Main Categories:
- Core Internal Modules (7 types)
- Optional Internal Modules (20+ types)
- Hardpoint Weapons (20+ types)
- Utility Mounts (10+ types)
- Other Modules (catch-all)
Subcategories: Each main category contains specific subcategories (e.g., "Thrusters", "Pulse Laser", "Shield Booster")
Modules are grouped by exact match:
- Same module name
- Same size and class
- Same engineering type, level, and quality
Example:
- Two identical "Pulse Laser (Large, Fixed) - Weapon_Overcharged G5" → Shown as (×2)
- Different engineering levels → Shown separately
Hierarchy:
Main Category (count, engineered count)
└─ Subcategory (count, engineered count)
└─ Individual modules with details
Behavior:
- All categories start collapsed
- Click category name or arrow (▶/▼) to expand/collapse
- Smooth, intuitive navigation
Format:
Module Name (Size X, Class Y) - (Engineering GX) (×Count) Price CR
Examples:
Thrusters (Size 6, Class 5) - (Dirty G3) - 14,197,539 CRAFM Unit (Size 4, Class 5) - (×2) 4,145,240 CRCargo Rack (Size 5, Class 1) - 97,900 CR
Engineering Display:
- Shows cleaned-up engineering name (removes prefixes)
- Shows grade level (G1-G5)
- Only shown if module is engineered
Top of window displays:
- Total Modules: Count of all modules
- Total Value: Sum of all buy prices (formatted with commas)
- Engineered: Count of engineered modules
Example:
Total Modules: 101 | Total Value: 42,156,789 CR | Engineered: 19
- All widgets use EDMC theme system
- Scrollbars styled to match theme
- Colors update when theme changes
- Consistent with rest of GalaxyGPS UI
Within subcategories:
- Modules sorted alphabetically by name
- Ensures consistent, predictable display
Categories:
- Main categories sorted alphabetically
- Subcategories sorted alphabetically
All user-facing strings are translatable:
- Window title: "Stored Modules"
- Error messages
- German translations included
GalaxyGPS/modules_window.py(450+ lines)- Complete module viewer implementation
- Categorization logic
- Tree view creation
- Module grouping and formatting
-
GalaxyGPS/windows.py- Added Modules button in Fleet Carrier window
- Created shipyard_frame to hold Ships and Modules buttons
- Added error handling for module window
-
L10n/en.template- Added 4 new translation strings
-
L10n/en.strings- Added 4 new translation strings
-
L10n/de.strings- Added 4 German translations
Uses pattern matching on internal module names:
'powerplant' → ('Core Internal Modules', 'Power Plant')
'pulselaser' → ('Hardpoint Weapons', 'Pulse Laser')
'shieldbooster' → ('Utility Mounts', 'Shield Booster')Parses internal names to extract:
- Size (from
_sizeX_) - Class (from
_classY_) - Engineering details (from StoredModulesManager)
Creates unique keys for exact matching:
key = (name, size, class, engineering_string)All modules with identical keys are grouped and shown with (×count).
- Uses nested frames for hierarchy
- Click handlers toggle expand/collapse
- Visual indicators (▶/▼) show state
- Proper indentation for readability
- Open Fleet Carrier Details window (View All button)
- Find your carrier in the list
- Click "Modules" button in Shipyard column
- Explore modules by expanding categories
# Access module data
modules = plugin.modules_manager.get_modules_for_carrier(callsign)
# Get statistics
total_value = plugin.modules_manager.get_total_modules_value(callsign)
engineered_count = plugin.modules_manager.get_engineered_module_count(callsign)Total Modules: 101 | Total Value: 42,156,789 CR | Engineered: 19
▶ Core Internal Modules (7, 2 Engineered)
▶ Optional Internal Modules (45, 3 Engineered)
▼ Hardpoint Weapons (35, 12 Engineered)
▼ Pulse Laser (3, 3 Engineered)
Pulse Laser (Large, Fixed) - (Overcharged G5) - 68,640 CR
Pulse Laser (Large, Fixed) - (Overcharged G3) - 68,640 CR
Pulse Laser (Large, Fixed) - (Overcharged G1) - 68,640 CR
▼ Multi-Cannon (2, 1 Engineered)
Multi-Cannon (Large, Gimbal) - (Overcharged G5) - 507,579 CR
Multi-Cannon (Large, Gimbal) - 507,579 CR
▶ Fragment Cannon (4, 0 Engineered)
▶ Remote Flak Launcher (6, 4 Engineered)
▶ Utility Mounts (14, 2 Engineered)
✅ Button appears in Fleet Carrier window
✅ Button is disabled when no modules cached
✅ Button is enabled when modules exist
✅ Window opens with correct title
✅ Summary statistics display correctly
✅ Categories expand/collapse properly
✅ Modules group correctly (×count)
✅ Engineering details display correctly
✅ Sorting works (alphabetical)
✅ Theme awareness works
✅ Scrolling works for long lists
✅ Translations work (English/German)
✅ Error handling works (no crashes)
- Fast categorization: O(n) where n = number of modules
- Efficient grouping: Uses defaultdict for O(1) lookups
- Lazy rendering: Tree nodes only created when expanded
- Smooth scrolling: Canvas-based scrolling for any list size
- Search/Filter: Add search box to filter modules
- Export: Export module list to CSV
- Value Sorting: Option to sort by value instead of name
- Engineering Filter: Show only engineered modules
- Slot Numbers: Display storage slot numbers
- Module Transfer: Track when modules move between carriers
- Comparison: Compare modules across multiple carriers
python deploy.pyRestart EDMC and the Modules button will appear in the Fleet Carrier Details window!
✅ Complete implementation with all requested features
✅ Hierarchical tree view with expand/collapse
✅ Smart grouping by exact match
✅ Engineering details displayed clearly
✅ Summary statistics at top
✅ Theme-aware styling throughout
✅ Localized for multiple languages
✅ Error-safe with proper handling
The module viewer is production-ready and fully integrated! 🎉