Skip to content

Add configurations, Best Item Mode and Info Display Mode#21

Open
TYTheBeast wants to merge 27 commits into
knoellle:masterfrom
TYTheBeast:master
Open

Add configurations, Best Item Mode and Info Display Mode#21
TYTheBeast wants to merge 27 commits into
knoellle:masterfrom
TYTheBeast:master

Conversation

@TYTheBeast
Copy link
Copy Markdown

@TYTheBeast TYTheBeast commented Dec 22, 2024

Add Best Item Mode, Info Display Options, and Snap-it Feature

Overview

This PR enhances the reward analysis system with configurable evaluation modes, display formats, and a new Snap-it feature for individual item checking.

Key Features

Best Item Mode Selection

  • Combined: Balanced scoring of Platinum + Ducats (default)
  • Platinum: Pure platinum value prioritization
  • Ducats: Pure ducat value prioritization
  • Volatility: Market-based scoring using sales volume trends

Flexible Display Formats

  • Minimal: Streamlined output showing name, platinum, and ducats
  • Combined: Added context with labeled values
  • All: Comprehensive view including trading volume metrics

New Snap-it Feature

  • Screen region selection tool for checking individual items
  • Hotkey-activated (default: F10)
  • Real-time OCR processing of selected areas
  • Supports both X11 and Wayland via slop

Technical Implementation

  • Introduced configuration enums for mode selection
  • Enhanced database schema for trading volumes
  • Implemented volatility calculations
  • Added screen selection and OCR processing
  • Improved color highlighting for value types

Testing

  • Verified all mode combinations
  • Tested volume data processing
  • Confirmed OCR accuracy for selections

Documentation

  • Added CLI help text and examples
  • Included Snap-it usage instructions
  • Updated configuration documentation

…ion mode

- Introduced a new `BestItemMode` enum in `config.rs` to allow users to specify how the best item is determined (Default, Platinum, Ducats).
- Updated the `run_detection` function in `main.rs` to accept an `Arguments` struct, enabling the selection of the best item mode based on user input.
- Modified item evaluation logic to accommodate the new best item mode options.
- Updated the `Arguments` struct to include a new command-line argument for best item mode with a default value.
- Introduced `InfoMode` enum in `config.rs` to toggle between default and detailed item information display.
- Updated `Item` struct in `database.rs` to include `yesterday_vol` and `today_vol` for tracking item volume.
- Modified price data deserialization in `wfinfo_data.rs` to accommodate new volume fields.
- Enhanced logging in `main.rs` to display volume information based on the selected `InfoMode`.
- Updated command-line arguments to include `info_mode` for user-defined output preferences.
- Introduced `Volatility` variant to the `BestItemMode` enum in `config.rs`.
- Updated the item evaluation logic in `run_detection` function of `main.rs` to calculate item value based on the new `Volatility` mode (Platinum * (Yesterday Vol + Today Vol)).
- Enhanced documentation for command-line arguments to reflect the addition of the `volatility` mode.
Also updated volatility formula to better reflect market changes
… arguments

- Introduced a new `Minimal` variant to the `InfoMode` enum in `config.rs` for simplified item information display.
- Updated the default value of `info_mode` in the `Arguments` struct to `minimal`, changing the output format to show only the item name, platinum, and ducats.
- Enhanced documentation for `info_mode` to reflect the new `minimal` option.
…`InfoMode::Combined` and `InfoMode::All`. Updated output strings to ensure proper display of item name, platinum, ducats, and volume information, maintaining consistency across different info modes.
…streamline code and reduce unnecessary file generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant