New GUI overhaul!, version 3.0.1.0

This commit is contained in:
erik 2025-05-29 21:34:16 +02:00
parent c05d6c9d1b
commit 79304baaad
16 changed files with 1579 additions and 4589 deletions

282
README.md
View file

@ -1,90 +1,220 @@
# Mossy Plugins
# MosswartMassacre - Advanced DECAL Plugin for Asheron's Call
A collection of DECAL plugins for Asheron's Call, providing utility overlays and automation features.
> **Status**: Production Ready | VVS Direct Integration | Navigation Visualization Complete
## Contents
- `mossy.sln`: Visual Studio solution containing both projects.
- `GearCycler/`: Simple plugin with a UI button to cycle gear (placeholder behavior).
- `MosswartMassacre/`: Advanced plugin tracking monster kills, rare discoveries, and offering HTTP/telemetry features.
- `packages/`: Vendored NuGet packages (Newtonsoft.Json, YamlDotNet).
A comprehensive DECAL plugin for Asheron's Call that tracks monster kills, rare item discoveries, and provides advanced navigation route visualization with 3D rendering.
## Prerequisites
- Windows with .NET Framework 4.8
- Visual Studio 2017+ (MSBuild Tools 15.0) or equivalent MSBuild environment
- DECAL Adapter installed for Asheron's Call
- VirindiViewService (included in each project's `lib/` folder)
## 🚀 Features
## Setup & Build
1. Clone this repository.
2. Ensure the DECAL and Virindi DLLs are present under `MosswartMassacre/lib/` and referenced by each project.
3. Restore NuGet packages if needed (`nuget restore mossy.sln`).
4. Open `mossy.sln` in Visual Studio and build the solution.
5. The output DLLs will be in each projects `bin/Debug/` or `bin/Release/` folder.
6. Deploy the plugin DLLs (and any required XML or YAML files) to your DECAL plugin directory.
### Core Functionality
- **Kill Tracking**: Real-time monster kill counting with rate calculations (kills/5min, kills/hour)
- **Rare Item Discovery**: Automatic rare detection and counter with optional meta state control
- **Statistics Dashboard**: Detailed session statistics with best hourly performance tracking
- **Multi-System Integration**: WebSocket streaming, HTTP command server, and telemetry support
## GearCycler
A minimal plugin demonstrating a VirindiViewService-based UI.
- UI layout: `GearCycler/ViewXML/mainView.xml`.
- Core logic in `GearCycler/GearCore.cs`.
- On button click, it logs a chat message; extend the `btnCycle.Hit` handler to add gear-cycling logic.
### 🗺️ Navigation Visualization
**Advanced VTank route visualization with 3D rendering capabilities**
- **3D Route Display**: Renders VTank .nav files as red lines in the game world
- **Route Comparison**: Side-by-side visualization with UtilityBelt's active navigation
- **Full Format Support**: All VTank nav types (Circular, Linear, Target, Once) and waypoint types
- **Auto-Discovery**: Automatically detects VTank installation and scans for .nav files
- **Performance Optimized**: Smart rendering limits and memory management
## MosswartMassacre
Tracks monster kills and rare drops, with multiple utility features including navigation route visualization.
### 🎛️ User Interface
**Modern tabbed interface using direct VirindiViewService integration**
- **Main Tab**: Live kill stats, rare counts, elapsed time, and status indicators
- **Settings Tab**: Plugin configuration with real-time updates
- **Statistics Tab**: Enhanced analytics and session management
- **Navigation Tab**: Route selection, visualization controls, and status display
### Features
- **Kill Tracking**: Counts total kills and computes rates (kills/5 min, kills/hour).
- **Rare Discoveries**: Increments rare count and can automatically set rare meta state.
- **Navigation Visualization****NEW**: Visualize VTank navigation routes in 3D with route comparison capabilities.
- **Tabbed UI Interface**: Enhanced interface with Main, Settings, Statistics, and Navigation tabs.
- **Command Interface** (`/mm` commands):
- `/mm help` : Show available commands.
- `/mm report` : Display current stats in chat.
- `/mm loc` : Show current map coordinates.
- `/mm reset` : Reset kill counters and timers.
- `/mm meta` : Toggle automatic rare meta state.
- `/mm http <enable|disable>` : Start/stop local HTTP command server (port 8085).
- `/mm remotecommands <enable|disable>` : Listen for remote commands from your allegiance chat.
- `/mm telemetry <enable|disable>` : Enable/disable periodic telemetry streaming.
## 📥 Installation
### HTTP Command Server
- Listens on `http://localhost:8085/`.
- Accepts POST data: `target=<player>&command=<text>`, then sends a /tell and executes the command.
### Prerequisites
- Windows with .NET Framework 4.8
- Asheron's Call with DECAL Adapter installed
- VirindiViewService (included in lib/ folder)
### Navigation Visualization ✅ NEW
- **VTank Integration**: Automatically detects VTank installation and loads .nav files.
- **3D Route Display**: Shows navigation routes as red lines in the game world.
- **Route Comparison**: Visualize different routes alongside UtilityBelt's active navigation.
- **Supported Formats**: All VTank nav types (Circular, Linear, Target, Once) and waypoint types.
- **Usage**: Enable in Navigation tab, select route from dropdown, click "Load Route".
### Quick Setup
1. Download the latest release from the releases page
2. Extract to your DECAL plugins directory
3. Restart DECAL and enable the plugin
4. Configure settings through the in-game UI
### Configuration
- Per-character YAML config stored at `<PluginDir>/<CharacterName>.yaml`.
- Settings include:
- `remote_commands_enabled`
- `rare_meta_enabled`
- `http_server_enabled`
- `telemetry_enabled`
- `char_tag`
- `vtank_profiles_path`**NEW**: Custom VTank profiles directory
- Config is auto-generated on first run; modify it or use UI/commands to update.
### Building from Source
```bash
# Clone the repository
git clone [repository-url]
cd MosswartMassacre
### Telemetry
- Periodically posts JSON snapshots of position and stats to a configurable endpoint.
- Configure `Endpoint`, `SharedSecret`, and `IntervalSec` in `Telemetry.cs`.
# Restore packages and build
nuget restore packages.config
msbuild MosswartMassacre.csproj /p:Configuration=Release /p:Platform=AnyCPU
```
## Dependencies
- Decal.Adapter (v2.9.8.3)
- Decal.Interop.Core & Decal.Interop.Inject
- Decal.Interop.D3DService ✅ **NEW**: For 3D navigation visualization
- VirindiViewService
- Newtonsoft.Json (v13.0.3)
- YamlDotNet (v16.3.0)
## 🎮 Usage
## Contributing
1. Fork the repository.
2. Create a feature branch.
3. Commit your changes and ensure the solution builds.
4. Submit a pull request with a description of your changes.
### Basic Commands
Access all features through the `/mm` command interface:
--
_This README provides a high-level overview to get up and running quickly._
```
/mm help - Show available commands
/mm report - Display current kill statistics
/mm loc - Show current map coordinates
/mm reset - Reset kill counters and timers
/mm meta - Toggle automatic rare meta state
/mm http <on/off> - Control HTTP command server (port 8085)
/mm telemetry <on/off> - Control telemetry streaming
```
### Navigation Visualization
1. **Enable**: Check "Enable Navigation Visualization" in Navigation tab
2. **Configure**: Set VTank profiles path in Settings (auto-detected)
3. **Select Route**: Choose from dropdown and click "Load Route"
4. **View**: Red route lines appear in 3D game world
### Configuration
Settings are stored per-character in YAML format at `<PluginDir>/<CharacterName>.yaml`:
```yaml
rare_meta_enabled: true
remote_commands_enabled: false
http_server_enabled: false
websocket_enabled: true
telemetry_enabled: false
char_tag: "default"
vtank_profiles_path: "C:\\Games\\VirindiPlugins\\VirindiTank\\"
main_window_x: 100
main_window_y: 100
```
## 🏗️ Architecture
### Core Components
- **PluginCore.cs**: Main entry point and event coordination
- **PluginSettings.cs**: YAML-based per-character configuration
- **Views/VVSTabbedMainView.cs**: Main tabbed UI with direct VVS integration
- **Views/VVSBaseView.cs**: Base class for VVS-based views
### Navigation System
- **NavRoute.cs**: VTank .nav file parser and 3D renderer
- **NavVisualization.cs**: Route management and file discovery
- **Registry Integration**: Automatic VTank directory detection
### Communication Systems
- **WebSocket.cs**: Real-time data streaming to external services
- **HttpCommandServer.cs**: Local HTTP API for remote control
- **Telemetry.cs**: Periodic statistics reporting
### Game Integration
- **VtankControl.cs**: vTank automation interface
- **MossyInventory.cs**: Inventory monitoring and rare detection
- **Utils.cs**: Game coordinate systems and utility functions
## 🔧 Technical Details
### Dependencies
- **DECAL Framework**: Core plugin system (Decal.Adapter, Decal.Interop.Core, Decal.Interop.D3DService)
- **VirindiViewService**: UI framework for game overlays
- **Newtonsoft.Json**: JSON serialization for APIs
- **YamlDotNet**: Configuration file management
### Build Configuration
- **Target**: .NET Framework 4.8, x86 platform
- **Architecture**: Direct VVS integration (no wrapper abstraction)
- **Features**: Unsafe blocks enabled for P/Invoke operations
### Navigation File Format Support
**Complete VTank .nav format compatibility:**
- **Nav Types**: Circular (1), Linear (0/2), Target (3), Once (4)
- **Waypoint Types**: Point, Portal, Recall, Pause, ChatCommand, OpenVendor, Portal2, UseNPC, Checkpoint, Jump
- **Performance**: Optimized for routes up to 10,000 waypoints with 500-segment rendering limit
## 🔌 API Integration
### HTTP Command Server
```bash
# Enable server
curl -X POST http://localhost:8085/ -d "target=PlayerName&command=report"
# Available endpoints
POST / - Execute command for target player
```
### WebSocket Streaming
Real-time data streaming to `wss://overlord.snakedesert.se/websocket/` including:
- Monster spawn/despawn events
- Chat messages and rare discoveries
- Player position and statistics
- Session-based authentication with SharedSecret
### Telemetry Data
Periodic JSON snapshots posted to configurable endpoints:
```json
{
"timestamp": "2024-12-19T10:30:00Z",
"character": "PlayerName",
"position": {"x": 59.2, "y": -28.7, "z": 0.05},
"stats": {"kills": 150, "rares": 3, "session_time": "02:15:30"}
}
```
## 🛠️ Development
### Project Structure
```
MosswartMassacre/
├── Views/ # VVS-based UI components
│ ├── VVSBaseView.cs # Base view foundation
│ └── VVSTabbedMainView.cs # Main tabbed interface
├── ViewXML/ # UI layout definitions
│ └── mainViewTabbed.xml # Current layout
├── NavRoute.cs # Navigation file parser
├── NavVisualization.cs # Route visualization manager
├── PluginCore.cs # Main plugin logic
├── PluginSettings.cs # Configuration management
└── lib/ # External dependencies
```
### Development Environment
- **IDE**: Visual Studio 2017+ or VS Code with C# extension
- **Tools**: MSBuild, NuGet Package Manager
- **Testing**: In-game with Asheron's Call client and DECAL
### Contributing
1. Fork the repository
2. Create feature branch (`git checkout -b feature/amazing-feature`)
3. Commit changes (`git commit -m 'Add amazing feature'`)
4. Push to branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## 📚 Related Documentation
- **CLAUDE.md**: Claude AI development guidance and build commands
- **Development History**: Successful VVS migration completed, wrapper system removed
- **Architecture Evolution**: Migrated from wrapper-based to direct VVS integration
## 📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
## 🎯 Roadmap
### Completed ✅
- [x] VVS Direct Integration Migration
- [x] Navigation Visualization System
- [x] Tabbed UI Interface
- [x] WebSocket Streaming
- [x] HTTP Command API
- [x] Telemetry System
- [x] Architecture Cleanup (Phase 3)
### Future Enhancements
- [ ] Multiple route visualization
- [ ] Route analysis and optimization tools
- [ ] Enhanced UI controls and themes
- [ ] Plugin integration marketplace
- [ ] Advanced statistics and reporting
---
*Built with ❤️ for the Asheron's Call community*