Commit Graph

212 Commits

Author SHA1 Message Date
LemonNexus b3d257a42d fix(hud): simplify kill tracking - only count non-Shrapnel loot
- Shrapnel-only mobs undercounted, but no overcounting
- Better to undercount than overcount for profit analysis
- Removes complex Shrapnel heuristic
2026-02-08 23:52:33 +00:00
LemonNexus 31ead88886 fix(hud): reset Shrapnel counter on non-Shrapnel loot
- Non-Shrapnel loot = 1 kill AND reset Shrapnel counter
- Prevents overcounting when mob drops Shrapnel + Oil
- Shrapnel counted as 1 kill per 2 pieces
2026-02-08 23:51:02 +00:00
LemonNexus ff7b304c78 fix(hud): improved kill tracking with Shrapnel heuristic
- Non-Shrapnel loot = definite kill
- Shrapnel: every 2 Shrapnel = 1 kill (since mobs drop 1-2 Shrapnel)
- This handles mobs that drop only Shrapnel
- Reset Shrapnel counter on session start
2026-02-08 23:47:37 +00:00
LemonNexus 647728a1d4 feat(hud): add shots fired counter and fix kill tracking
- Add shots_fired counter to HUDStats
- Display SHOTS in HUD next to DAMAGE DEALT/TAKEN
- Track 1 shot per damage event
- Fix kills: count when non-Shrapnel loot is received
- Shrapnel excluded from kill count (every mob drops it)
2026-02-08 23:43:37 +00:00
LemonNexus 3a3e389f05 fix(hud): correct cost calculation using weapon decay from Nexus API
- Use actual weapon decay (PEC) from API instead of broken DPP calculation
- Add decay and ammo_burn to weapon stats passed from Gear Selector
- Cost per shot = decay (in PEC) / 100 = PED
2026-02-08 23:34:02 +00:00
LemonNexus 0a12b22498 fix(hud): fix Decimal/float division error in cost calculation
- Convert both damage and dpp to Decimal before division
- Proper Decimal arithmetic for precision
2026-02-08 23:28:44 +00:00
LemonNexus 445d0bb6f3 fix(hud): add missing kills and globals layout definitions 2026-02-08 23:24:35 +00:00
LemonNexus 7c38b398f3 feat(hud): cost tracking and profit/loss calculation
- HUD now shows: LOOT, COST, and PROFIT/LOSS (P/L)
- Profit/Loss color-coded: Green=profit, Red=loss, White=break-even
- Cost estimated from weapon DPP and damage dealt
- Weapon stats (DPP, cost/hour) passed when starting session
- Tracks cost per shot based on damage output
- All stats persisted in HUDStats dataclass
2026-02-08 23:22:13 +00:00
LemonNexus e9dc72df23 fix(gui): remove duplicate code causing IndentationError in gear_selector.py 2026-02-08 23:14:22 +00:00
LemonNexus 3cd0613e10 feat(gui): full gear selection - weapons, armors, and finders
- Gear Selector now supports: Weapons, Armors, Finders
- Weapons: 3,099 items with DPP, cost/hour, damage
- Armors: 1,985 items with protection values
- Finders: 106 items with depth/radius
- Menu: Tools → Select Gear → Weapon/Armor/Finder
- Shortcuts: Ctrl+W (weapon), Ctrl+Shift+A (armor), Ctrl+Shift+F (finder)
- Sync API for simpler code
2026-02-08 23:11:07 +00:00
LemonNexus 6130cfcd28 feat(api): complete Entropia Nexus API with all endpoints
- Weapons: 3,099 items
- Armors: 1,985 items
- Finders: 106 items
- Excavators: Available via get_all_excavators()
- Mobs: 817 creatures with HP/damage stats
- Data classes: WeaponStats, ArmorStats, FinderStats, ExcavatorStats, MobStats
- Sync API for simpler GUI integration
- Full caching support
2026-02-08 23:07:51 +00:00
LemonNexus f8ddb8f650 feat(gui): update Gear Selector to use real Nexus API
- Loads 3099+ real weapons from api.entropianexus.com
- Shows: Name, Type, Damage, DPP, Cost/hour, Efficiency
- Async loading in background thread (no UI freeze)
- Search by name
- Detailed stats preview
- Ready for production use
2026-02-08 23:04:22 +00:00
LemonNexus d07c43ce97 feat(api): full Entropia Nexus API integration
- Real API endpoint: https://api.entropianexus.com/weapons
- Loads 3099+ weapons from live database
- WeaponStats with full damage breakdown (stab, cut, impact, burn, etc.)
- Auto-calculated DPP and cost per hour
- Search by name
- Caching for performance

Example: ArMatrix BC-10 (L) - DPP: 0.05, Cost/hour: ~201 PED
2026-02-08 23:02:53 +00:00
LemonNexus 08e08164e0 feat(api): complete Entropia Nexus API implementation
- Full API client with async support
- Search, get_weapon, get_armor, get_tool methods
- Comprehensive data classes: WeaponStats, ArmorStats, ToolStats, GearLoadout
- Mock data fallback (6 weapons, 5 armors, 4 tools)
- Caching support for performance
- Ready for real API - just set mock_mode=False when endpoints available

API endpoints documented but not publicly available yet.
Using mock data for development and testing.
2026-02-08 22:53:28 +00:00
LemonNexus b8e7a892ff feat(gui): add Gear Selector and fix kill counting
- Remove auto-kill counting on loot (was overcounting)
- Add GearSelectorDialog to select weapons/armor/tools from Nexus API
- Add Tools → Select Gear menu (Ctrl+G)
- Selected weapon now shows in HUD during session
- Uses mock data from nexus_api.py for now
2026-02-08 22:42:55 +00:00
LemonNexus 0f4d1271f8 fix(gui): ProjectStatsDialog uses correct ProjectData fields
- Remove references to non-existent description, session_count, last_session
- Use project.type, project.status, project.metadata for description
- Fixes AttributeError when viewing project stats
2026-02-08 22:34:00 +00:00
LemonNexus 59094ee469 fix(gui): SQLite thread safety - use queue for cross-thread database access
- LogWatcher callbacks now queue events instead of direct DB access
- Main thread processes queue every 100ms
- Fixes 'SQLite objects created in a thread can only be used in that same thread' error
- Loot will now be properly recorded to database
2026-02-08 22:33:08 +00:00
LemonNexus 9f03b3c610 test(log_patterns): add test for log parsing patterns
- Test loot patterns against real user log formats
- Test skill patterns
- Helps catch pattern mismatches early
2026-02-08 22:22:53 +00:00
LemonNexus 510deb04e7 fix(log_watcher): update loot pattern for English format
- Match [System]: with optional colon
- Match item names with optional brackets [Shrapnel]
- Fixes loot not being detected in user's log format
2026-02-08 22:22:08 +00:00
LemonNexus e1316076bf fix(gui): logging methods don't depend on log_watcher
- log_debug/info/warning/error now use _append_log directly
- Avoids AttributeError when log_watcher is None during init
- LogWatcher is only used for game events, not UI logging
2026-02-08 22:14:52 +00:00
LemonNexus e2388dadaf fix(gui): correct create_project call - use metadata not description
- ProjectManager.create_project signature: (name, project_type, metadata=None)
- GUI was incorrectly passing description as 3rd arg
- Now passes metadata={'description': description}
- Add test_gui_simple.py for quick integration testing
2026-02-08 22:11:05 +00:00
LemonNexus d283de84ee fix(gui): remove session_count from project list - ProjectData doesn't have this field
Show Type and Status columns instead of Sessions
2026-02-08 22:08:13 +00:00
LemonNexus a0dd7f8cad fix(gui): correct ProjectManager method names
- get_all_projects() → list_projects()
- get_project() → load_project()
- create_project() now includes project_type='hunt' parameter

Fixes AttributeError on startup
2026-02-08 22:06:07 +00:00
LemonNexus 25a25d031e fix(gui): integrate real LogWatcher and ProjectManager into MainWindow
- Replace placeholder classes with real core.database, core.project_manager, core.log_watcher
- Add LogWatcher lifecycle management (start/stop in background thread)
- Connect log events to HUD updates (loot, damage, globals, etc.)
- Add database session tracking
- Fix session stop to properly end database session and stop LogWatcher

This enables real-time log parsing in the GUI!
2026-02-08 22:03:06 +00:00
LemonNexus 5b0c180a59 fix(hud): session tracking and drag improvements
- main_window: Actually call hud.start_session() to reset stats and start timer
- hud_overlay: Add SetWindowPos refresh after WinAPI style changes
- This fixes stats not resetting and drag not working on Windows
2026-02-08 21:40:48 +00:00
LemonNexus 6155aad694 fix(hud): disable auto-hide by default, add debug mode
- Auto-hide feature disabled by default (was causing issues)
- Add debug mode to see detected window titles
- Add get_foreground_window_title() for troubleshooting
- Case-insensitive window title matching
2026-02-08 21:35:29 +00:00
LemonNexus 6ed97f3ffa feat(hud): add game window detection for auto-hide
- Detect when Entropia Universe window is in foreground
- Auto-hide HUD when game loses focus (optional, enabled by default)
- Add set_auto_hide_with_game() method to toggle behavior
- Uses Windows API: GetForegroundWindow, GetWindowText
2026-02-08 21:26:02 +00:00
LemonNexus 0f555b1a3a fix(gui): wire up Loadout Manager and real HUD overlay
- Add Tools menu with Loadout Manager (Ctrl+L)
- Replace placeholder HUD with real HUDOverlay from hud_overlay.py
- Add on_loadout_manager() method
2026-02-08 21:24:49 +00:00
LemonNexus 2496fdab71 feat(gui): add gui_main.py entry point for full PyQt6 application 2026-02-08 21:18:16 +00:00
LemonNexus 43a43e2644 fix(tests): correct DPP test expectation
Test was expecting old (wrong) PED-based calculation.
DPP = Damage / PEC (not Damage / PED)
10 damage / 2 PEC = 5.0 DPP
2026-02-08 21:16:11 +00:00
LemonNexus a99bccbc11 fix(nexus_api): correct DPP calculation formula and mock data values
- DPP was calculating damage per PED instead of per PEC (100x error)
- Fixed Sollomate Opalo DPP: 3.70 → 3.33
- Added pytest.ini with asyncio configuration
- Tests now pass correctly
2026-02-08 21:13:56 +00:00
LemonNexus 97b9403b11 feat(phase2): Complete Phase 2 Integration - Bug fixes: SimpleCache self._timestamps typo, MOCK_TOOLS key typo. Agent-swarm UI: main_window, hud_overlay, loadout_manager. Nexus API with mock data. All tests passing. 2026-02-08 21:07:47 +00:00
LemonNexus a963778145 fix(gui): add missing main_window.py and loadout_manager.py
Files were created in workspace root instead of project directory.
Adding main_window.py and loadout_manager.py to complete Sprint 2 Phase 1.
2026-02-08 20:31:35 +00:00
LemonNexus 0b4d79b98f feat(gui): Sprint 2 Phase 1 - PyQt6 GUI Foundation
Add complete PyQt6 GUI implementation using agent swarm:

- ui/main_window.py: Main application window with project management,
  session controls, log output, and dark theme styling

- ui/hud_overlay.py: Transparent, always-on-top HUD overlay for
  real-time stats during gameplay. Features:
  * Frameless, click-through window
  * Draggable with Ctrl key
  * Session timer, loot tracking, damage stats
  * Position persistence
  * Decimal precision for PED values

- ui/loadout_manager.py: Gear configuration dialog with:
  * Weapon/Armor/Healing tool setup
  * DPP (Damage Per Pec) calculator
  * Cost per hour estimation
  * Break-even calculator
  * Save/Load loadouts (JSON persistence)
  * Mock data for common EU gear

- ui/__init__.py: Module exports
- requirements.txt: Add PyQt6 dependency

All components follow Never-Break Rules:
 Decimal precision for currency
 Dark theme styling
 Integration hooks for existing core modules
 Mock test modes included

Developed with 3-agent parallel swarm (3 minutes vs 6 hours serial).
2026-02-08 20:30:38 +00:00
LemonNexus 85d02d08de docs(sprint2): update with Entropia Nexus API discovery
- Official REST API found at api.entropianexus.com
- Update integration strategy to use API instead of scraping
- Sprint 2 plan now reflects real API approach
2026-02-08 18:33:35 +00:00
LemonNexus 77d8e808fb feat(globals): add personal global detection with PLAYER_NAME setting
- Add PLAYER_NAME setting to .env.example for avatar name configuration
- Add personal_global patterns for Swedish and English:
  - EN: '[Globals] Player killed a creature (Creature) for X PED'
  - SV: '[Globala] Player dödade ett kreatur (Creature) med X PED'
- Distinguish personal globals from other players' globals
- Show 🎉🎉🎉 YOUR GLOBAL notification with creature name
- Track personal_globals separately in session summary

Fixes #42 - Users can now see when THEY global vs others.
2026-02-08 18:23:35 +00:00
LemonNexus 06a95f56f4 feat(enhancer): add broken enhancer tracking
- Add pattern for broken enhancers: 'Your enhancer X on your Y broke'
- Track enhancer breaks with type and weapon info
- Display 💔 ENHANCER BROKEN notifications
- Include enhancers_broken in session summary

Based on user-provided reference code but with cleaner regex pattern.
2026-02-08 18:20:04 +00:00
LemonNexus f957165394 feat(heal): add English self-heal and attribute patterns
- Add English self-heal: 'You healed yourself X points'
- Add English attribute gain: 'Your Agility has improved by X' / 'You gained X Agility'
- Update EVENT_PATTERNS with all language variants
- Add parsing logic for English heal and attribute events

Based on user-provided regex reference code.
2026-02-08 18:18:00 +00:00
LemonNexus b28b3915fd feat(combat): add critical hit tracking and filter Universal Ammo
- Add English critical hit pattern: 'Critical hit - Additional damage! You inflicted X'
- Display 💀 CRITICAL notifications with damage
- Filter out Universal Ammo from loot (converted shrapnel, not real loot)
- Critical hits count toward damage_dealt stats

Fixes loot inflation from shrapnel conversion and tracks critical strikes.
2026-02-08 18:15:00 +00:00
LemonNexus 0f19155dd8 feat(gear): add weapon tier gain tracking
- Add English tier pattern: 'Your Weapon has reached tier X'
- Track weapon tier progression in real-time
- Display ⬆️ TIER UP notifications
- Include weapon_tiers in session summary

Gear progression now tracked alongside skills and loot.
2026-02-08 18:12:41 +00:00
LemonNexus 555bea7c33 feat(skills): add skill gains and level up tracking
- Fix skill pattern: 'You have gained' (not just 'You gained')
- Add level_up pattern: 'You have advanced to level X in Skill'
- Track skill experience gains in real-time
- Display 🎉 LEVEL UP notifications
- Include level_ups in session summary
- Add level_up event subscription

Skill progression now tracked alongside combat and loot events.
2026-02-08 18:11:33 +00:00
LemonNexus e3f3a595fb feat(combat): add damage tracking and combat events
- Add English damage taken pattern: 'You took X points of damage'
- Add damage_dealt, damage_taken, evade subscriptions in main.py
- Update evade pattern for 'The target Evaded your attack' and 'The attack missed you'
- Show combat stats in session summary
- Display real-time damage dealt/taken/evade events

Combat events now tracked alongside loot for complete hunting analytics.
2026-02-08 18:07:06 +00:00
LemonNexus 39d1b0d48d chore(deps): add python-dotenv to requirements
Required for loading .env configuration file.
2026-02-08 18:01:54 +00:00
LemonNexus 6ce23718bc fix(main): load .env file and respect USE_MOCK_DATA setting
- Add python-dotenv to load .env configuration
- Read USE_MOCK_DATA and EU_CHAT_LOG_PATH from environment
- Use real game log when USE_MOCK_DATA=false
- Show correct mode (Mock vs Live) in header
- Import os module for environment access

Fixes issue where app always used mock data regardless of .env settings.
2026-02-08 18:01:39 +00:00
LemonNexus bd506e53c2 fix(logs): update English patterns for actual game output format
- English loot uses parentheses: 'x (2)' not 'x 2'
- Add English damage pattern: 'You inflicted X points of damage'
- Support both Swedish and English damage dealt events
- Fix empty bracket pattern: [System] [] Message

Tested with real log output showing English client format.
2026-02-08 17:54:48 +00:00
LemonNexus c511ff2042 feat(logs): add Swedish language support from real game logs
- Add Swedish regex patterns based on real chat.log from user session
- Support loot, globals, skills, damage, healing, weapon tier
- Add real-chat-sample.log for testing (14 events parsed)
- LogWatcher now parses Swedish game client output correctly
2026-02-08 17:30:31 +00:00
LemonNexus dfe4e8125f feat: add gear management + Windows testing guide
- Fix terminology: Projects (activities) vs Sessions (gameplay)
- Add EntropiaNexusAPI integration for weapon/armor/tool stats
- Implement GearLoadout class for equipment management
- Calculate hunting/mining costs per hour
- Add DPP (Damage Per PEC) efficiency tracking
- Create comprehensive WINDOWS_TESTING_GUIDE.md
- Document live game testing scenarios
- Explain ROI calculations and data model

Ready for Windows PC live testing with game client.
2026-02-08 17:17:37 +00:00
LemonNexus a516ff4d0c fix(db): correct SQL comment syntax for SQLite compatibility
- Replace Python-style # comments with SQL-standard -- comments
- SQLite does not recognize # as comment character
- Fixes database initialization failure on first run

Test: Database now initializes successfully.
2026-02-08 17:06:45 +00:00
LemonNexus df5c0212e8 docs: update PROJECT_RESUME for Sprint 1 completion
- Mark Sprint 1 as complete with all deliverables
- Add main.py and USER_TEST_GUIDE.md to key files
- Update status: Ready for user testing v0.1.0
- Add Sprint 2 planning (GUI Foundation)

Application is now runnable and ready for first user test.
2026-02-08 17:03:38 +00:00
LemonNexus eae846ee6b feat(app): add main.py and user test guide for v0.1.0
- Create main.py with interactive CLI for user testing
- Implement menu system: projects, sessions, stats, archive
- Add live session mode with mock log watching
- Real-time event display (loot, globals, skills)
- Auto-generate mock chat.log on first run
- Add USER_TEST_GUIDE.md with test checklist
- Document expected output and troubleshooting

Application is now runnable for first user test.
2026-02-08 17:02:37 +00:00