refactor(chanceman): refactor rolled vs obtained semantics, UI filtering, and roll causality, bump to v3.0.0
- Clarify Rolled (allowed) vs Obtained (acquired) item states
- refactor roll → obtain causality and chat messaging
- Migrate legacy unlocked naming to rolled/obtained
- Gate unlocks and GE filtering by Rolled
- Require Rolled + Obtained for usability
- Replace sidebar toggles with list-based filtering
- Update drops UI to track Obtained state
- Resolve client-thread item lookups and UI race conditions
- Rename and archive legacy rolled file
- Create new rolled/obtained files without overwrites
- Add guards for existing and new player data
- Update docs and bump to v3.0.0
* Update chance-man to v2.8.1
- Ensure snap triggers whenever entering the snap window or highlight phase, preventing indefinite spinning.
- Consolidate snap initialization into startSnap() for consistent slot targeting and winner selection.
- Move away from hard coded values for Spell/Autocast requirements and use Gameval.
- Ensure MusicWidgetController reinitializes the drop table override on music tab reloads and reliably rebuilds the “Search Drops” icon.
- Purge old override widgets and reset caches to prevent stale UI elements from reappearing after searches or widget rebuilds.
- update to v2.8.1
* Update chance-man
- add giant's head to EnsouledHeadMapping
- update EnsouledHeadMapping to use gameval
refactor: refactor ChanceManOverlay and improve roll animation flow
- Refactored `ChanceManOverlay`:
- Rewrote animation logic using float based positions for smoother motion and precise snapping.
- Added easing based deceleration and smoothstep snapping to settle on the final slot cleanly.
- Integrated textured visuals via `roll_box.png` and `icon_slot.png`.
- Added radial glow highlight for the winning slot.
- Simplified render loop and reduced unnecessary allocations.
- Updated `RollAnimationManager`:
- Unlocks and announces items immediately after the snap phase completes.
- Keeps highlight rendering active for visual polish before the next roll.
- Ensures thread safety and proper Swing UI updates.
- Added new resources:
- `roll_box.png`
- `icon_slot.png`
- add roll sound volume config option
- update to v2.8.0
* Update chance-man to v2.7.1
- Add option to deprioritize menu entries for locked items
- Refactor ItemDimmerController: fixing a bug related to bank placeholders
- Correct D-pick ID, Add fur to f2p blocks items
* Update chance-man
- ignore dimming in CLOG interface
- alway allow "Check" option
* Update chance-man
feat: normalize and lock untradeable ensouled heads
- Added EnsouledHeadMapping utility to map untradeable ensouled heads to their
tradeable IDs for consistent handling
- Updated ActionHandler to use mapped IDs when checking ground items so
untradeable heads cannot be picked up unless unlocked
- Updated ItemDimmerController to map ensouled heads before canonicalization,
ensuring both tradeable and untradeable IDs are dimmed when locked
- Removed legacy name-based ensouled mapping in favor of ID only approach
- Added private constructor to EnsouledHeadMapping to enforce static utility use
* Update chance-man
- Backup/restore root (239.0) children instead of blanket re-hide
- Track override created widgets and purge them on revert to prevent bleed-through
- Preserve and restore original root widget type
- Fix type issues and ensure no progress bar/eye/search/icons persist after “Show drops”
- add Swift Blade to blocked f2p items
* Update chance-man
- null safe restoreChildren to avoid NPEs
* Update chance-man
Shut down executors immediately
- Do not wait for termination so teardown and cache reset don’t block shutdown.
* Update chance-man to v2.7.0
Dim locked tradeables, improve drops, rolls, and persistence
- Add ItemDimmerController to dim locked tradeables in UI.
- Drops: improve DropCache (startup/shutdown, pruning), DropFetcher (error handling), DropItem (rarity parsing), and refresh viewer live on updates.
- Roll animation: switch to time-based easing with smooth slowdown; unify highlight duration to overlay.
- Persistence: refactor RolledItemsManager & UnlockedItemsManager for safer, leaner handling.
• Windows safe backups (COPY with retries, pruning via try-with-resources).
• Atomic tmp→main swap with watcher echo suppression.
• LWW reconciliation using ConfigPersistence with stamped keys.
• Debounced cloud mirrors with write-if-newer to prevent stale writes.
• Track dirty state and flush immediately on shutdown.
- Plugin: replace polling with ScriptPostFired for inventory/bank; gracefully shut down file executor and clear refs on disable.
- Misc: update README and internal helpers for cleaner structure and logging. update to v2.7.0
* Update chance-man
update build.gradle
* Update chance-man
- remove deprecated usages for SpriteOverrideManager
- remove deprecated usages for TabListener
- Maintain locked item dimming across UI updates
- update tests
* Update chance-man
- remove the random 'o' in build.gradle
* Update chance-man to v2.6.0
Refactor MusicWidgetController:
- centralize constants
- extract draw/layout helpers
- enforce client-thread safety
- add hide-rolled-items toggle
ChanceManPlugin:
- Register and inject new NpcSearchService for fast NPC drop searching.
- Enable NPC drop searching and lookup UI.
- Ensure drop cache initialization and integration with search system.
- Minor cleanups related to plugin startup and drop fetching.
NpcSearchService:
- Add new NpcSearchService providing fast, parallelized fuzzy and ID-based NPC drop searching.
- All searches filter out NPCs without drop tables them.
- Includes Levenshtein based fuzzy matching and flexible query parsing (ID, name, level).
DropFetcher:
- Refactor to fully discard NPCs with no drop table sections when fetching from the wiki.
- Only NPCs with at least one drop section are passed to the cache and search layers.
DropCache:
- Heavily refactor cache/indexing: never write or retain NPCs lacking drop tables on disk or in-memory.
- Updated search logic to combine in-memory and wiki-backed queries, always skipping empty NPCs.
MusicWidgetController:
- Integrate NpcSearchService for in-game NPC drop search dialog.
- Various small refactors and search-driven UI improvements.
- update to v2.6.0
* Update chance-man
- update UA to 2.6.0
- added Unlocked and Rolled items color config option
- Add config option for rarity-based sorting for Show Drops
- add config options for showing "RDT" and "GDT"
- update plugin TAGS in rl properties and ChanceManPlugin
- update project name in settings.gradle
- update README
- update to version 2.5.0
- Precompile regex patterns
- Split on “;” or comma-space to handle multi-value lists
- Strip thousand-separator commas and handle percentages, multipliers, simple fractions
- Support ranges (–/—/-), “in” syntax, parenthetical notes, and approximate markers
- Provide a clean fallback for any unrecognized formats
- Update to v2.4.1
- add `requiresUnlock` flag and lookup map to SkillItem
- register untradeable items with unlock disabled
- bypass unlock checks for those items when evaluating inventory/equipment
- fix: nullify music widget children to prevent NPEs on Profile Switch
- fix false positives by skipping non-item entries in getItemId and ground-item handling
- add "fire" to SkillOp
- add Unfired pottery to SkillItem
* Update chance-man to 2.2.0
feat: Implement NPC drop table viewer in music tab
This commit introduces a major UI feature that allows players to view NPC drop tables directly in-game by temporarily hijacking the music tab interface.
A "Show Drops" menu option has been added to the right-click menu for NPCs. When selected, the plugin fetches the NPC's drop data and dynamically replaces the content of the music tab with a custom drop viewer UI.
The new UI consists of several components:
- **`DropsTabUI`**: The main class that initializes and manages the lifecycle of this feature.
- **`DropsMenuListener`**: Injects the "Show Drops" option into the NPC context menu.
- **`MusicWidgetController`**: The core of the feature, responsible for:
- Backing up and hiding the original music widget elements.
- Drawing a new interface that displays the NPC's name, level, and a progress bar for rolled vs. total drops.
- Creating a scrollable grid of all possible drop items, with items the player has already "rolled" appearing faded.
- **`SpriteOverrideManager`**: Replaces the default music tab icon with a custom "drops" icon to indicate that the drop viewer is active.
- **`TabListener`**: Detects when the player navigates away from the music tab and restores its original content, ensuring the drop viewer is temporary.
- **`WidgetUtils`**: Provides helper functions for creating menu entries and managing widget children.
* Update chance-man
Fix dependency injection for Gson and OkHttpClient; add DropFetcher shutdown
* Update chance-man
Fix dependency injection for Gson and OkHttpClient; add DropFetcher shutdown
* Update chance-man
- Replace manual name-and-ID search fallback with MediaWiki’s Special:Lookup extension
(always queries by npcId first, then falls back to the provided name)
- Simplify `buildWikiUrl` to emit `/w/Special:Lookup?type=npc&id=<npcId>&name=<fallback>#Drops`
- Remove `findTitleByNpcId` and obsolete two-stage lookup logic
- Streamline `fetch()` to log the Special:Lookup URL, fetch HTML, and parse drop tables
* Update chance-man
Add Jsoup as implementation and thirdParty dependency
* Update chance-man
* Update build.gradle
* Update chance-man
update HTTP User-Agent to "RuneLite-ChanceMan/2.2.0"
* Update chance-man to v2.1.6
- consolidate onConfigChanged handlers into switch-case for tradeable item refresh
- add Silver Bar and Gold Bar to SkillItems
- add tick.wav for the roll animation
- reduce roll time/speed/deacceleration time/minimum speed
- add configOption "enableRollSounds"
* Update chance-man
- fix tick.wav resource path to /com/chanceman/tick.wav
- add destroy option to bank
- bypass spell restrictions for Blighted Surge Sack
- add option to disable rolling f2p trade only items
- add FreeToPlayBlockedItems enum for items that cannot be self-sufficiently obtained on f2p
- add option to filter out f2p items that cannot be self-sufficiently obtained on f2p
- only update panel after roll completion in performRoll()
- wire ChanceManPanel into RollAnimationManager via setChanceManPanel
- allow spells in Last Man Standing by bypassing spell restrictions
- register WorldChanged listener and refactor startUp()/shutDown() to enable/disable features
- introduce featuresActive flag to guard all @subscribe handlers
- add BlightedSack enum to map the sacks to spells
- update ActionHandler to call isSpellOpEnabled(target) for spell checks
- Use JList virtualization instead of per-item JPanels for rolled/unlocked lists to improve performance.
* Update chance-man to 2.1.3
Switch to java.nio Files for safer saves and add automatic backups
- Migrated UnlockedItemsManager & RolledItemsManager from old FileReader/FileWriter to java.nio.Files/Path
- Write JSON via a temp file + ATOMIC_MOVE so saves are atomic
- Keep up to 10 rotating backups in a `backups/` folder, automatically pruning older ones
- Cleaned up ChanceManPlugin.startUp(): only register the overlay once (removed duplicate call)
* Update chance-man
Ensure “clean”/“rub” only locked for tracked items
* Update chance-man
harden persistence for rolled & unlocked items
- Automatically create data files on first run to avoid null pointer errors
- Add `safeMove()` helper for atomic‐move fallback and AccessDeniedException handling
- Rotate and prune backups, keeping only the latest `MAX_BACKUPS`
- Streamline load/save: write to a `.tmp` and then swap it into place
- Fix edge cases: NPEs on login, atomic‐move failures, and backup conflicts during rapid saves
* Update chance-man to v2.1.2
Normalize item ID handling, fix Clean/Rub, and add rune pouch & fountain support
- Introduce `getItemId(...)` in ActionHandler to unify raw, inventory, and ground item ID lookup, and canonicalize for all checks
- Special‑case “Clean” and “Rub” menu options so they always appear (greyed out when locked), and remove ground‑item actions from the global disabled list
- Extend `RuneProvider` with blighted‑sack entries (Surge, Entangle, Teleblock, Vengeance, Ice Barrage) so unlocked spell‑sacks supply the correct runes
- In `Restrictions`, define a Fountain of Rune `WorldArea` and short‑circuit `isSpellOpEnabled()` there for free casting
- Integrate rune pouch contents into `availableRunes` by reading explicit type/amount varbits and decoding with the pouch enum
* Update chance-man
add felling axes to skillitems
- Added a boolean flag (tradeableItemsInitialized) that triggers refreshTradeableItems() only once during the GameTick when the client state is LOGGED_IN.
- Updated onShutdown() to reset tradeableItemsInitialized to false
- changed ItemID.SIGIL_OF_STORAGE_ATTUNED to ItemID.SIGIL_OF_STORAGE_UNATTUNED
* Update chance-man to 2.0.0
Massive Overhaul: Integrate New Menus & Account Systems, Refactor Core Functionality
Menus Enhancements:
- Differentiated ground item interactions from other menu entries.
- Introduced helper methods (isGroundItem and isLockedGroundItem) to accurately detect and manage locked ground items.
- Locked ground items now display their 'Take' (and similar) options in grey (<col=808080> tags) and are disabled via a no-op click handler, while 'Drop' actions remain enabled.
- Added a static method handleGroundItems as an extra safeguard to ensure locked ground item events are properly consumed.
Account System Overhaul:
- Integrated a new Account package to streamline multi-account management.
- Added event handling (AccountChanged) for seamless account state transitions.
- Enhanced item tracking and permissions with a robust account management logic.
- Updated ChanceManPlugin with a public getter getItemManager() for reliable canonicalization, ensuring consistent operations across accounts.
Refactoring and Structural Improvements:
- Restructured the project into clearer packages: com.chanceman.account for account-related functionality and com.chanceman.menus for menu interactions.
- Updated ActionHandler to manage user interactions more robustly, preventing unintended operations and enforcing skill, spell, and item usage restrictions.
- Consolidated various helper classes and logic, including Restrictions, RuneProvider, SkillItem, SkillOp, and Spell.
- Enhanced overall code quality and readability
* Update chance-man
add more blocked items to ItemsFilter
increase item pool number
* Update chance-man
add more blocked items.
* Update chance-man
preserve order and improve manual roll messaging
- Change unlocked/rolled items storage to LinkedHashSet to maintain insertion order, allowing the UI to display the most recent items on top.
- set a manualRoll flag in the roll animation so manual rolls display "by pressing a button" instead of a random item name.
* Update chance-man
update deprecated usages to use gameval
add items to itemfilter
* Update chance-man
update world types in "isNormalWorld"
* Update chance-man to 2.1.0
Enhance filtering for poison weapons, flatpacks, and armour sets
- Refactor ItemsFilter:
- Add new files for supporting features (e.g., PoisonWeapons, ArmourSets, BlockedItems).
- Simplify isBlocked() to combine checks for flatpacks, armour sets, and blocked items.
- Add isPoisonEligible() method that wraps the PoisonWeapons logic for filtering eligible poisonable weapons.
- Add new global prerequisites for poisonable weapons in the PoisonWeapons enum:
- Introduce global constants for standard, enhanced, and superior weapon poisons.
- Update all poisonable weapons (e.g. daggers, javelins, spears, darts, knives, arrows, bolts) with four variants: base, (p), (p+), and (p++).
- Add new configuration options:
- enableArmourSets: Toggle armour set items in the rollable list.
- enableFlatpacks: Toggle flatpack items in the rollable list.
- requireWeaponPoison: Require that both the base weapon and its matching global weapon poison are unlocked for poison variants.
- Update ChanceManPlugin:
- Modify refreshTradeableItems() to exclude poison variants when the base weapon or its corresponding global poison is not unlocked.
* Update chance-man
Refactor ChanceManPanel and expand ItemsFilter
- Updated Chance Man to treat noted items as their regular variants,
ensuring that noted drops are handled like normal items.
- Refactored layout code to improve panel viewing
- Expanded the ItemsFilter list with additional blocked items
* Update chance-man to 1.1.4
fix: reset plugin state, enhance UI with count labels and colored messages, and update ItemsFilter
- Reset plugin state in shutDown() by nullifying managers, panels, navButton, and fileExecutor,
and setting itemsInitialized to false. This fixes the issue where toggling the plugin off/on
required a client restart.
- Update refreshTradeableItems() to filter items with isNotTracked()
- Modify chat message output to display the unlocked item in green and the rolled item in red.
- Add rolled/unlocked count labels to ChanceManPanel, updating counts as "Rolled: X/Y" and "Unlocked: X/Y".
- Update init() and updatePanel() methods to integrate the new UI components.
- Update ItemsFilter to include additional blocked items
* Update chance-man
add a new more items to itemsFilter
* Update chance-man
add filter buttons with tooltips for unlocked/rolled item filtering
* Update chance-man
fix Rolled/Unlocked indicator under Rolled/Unlocked columns
Fix timing issue by deferring tradeable items refresh
- Add an "itemsInitialized" flag to ensure initialization only happens once.
- Remove the early call to refreshTradeableItems() in startUp().
- Update onGameTick() to initialize managers and UI (and call refreshTradeableItems) only when client.getLocalPlayer() is available and itemsInitialized is false.
feat: add ItemsFilter to exclude non-rollable items, handle ensouled heads, and implement GE blocking
- Implement ItemsFilter with a hard-coded, case-insensitive set of blocked item names.
- Integrate ensouled head mapping into ItemsFilter to assign proper item IDs based on the item name.
- Update ChanceManPlugin to skip blocked items and remap ensouled heads during the item pull.
- Implement GE blocking using a ScriptPostFired subscriber (script ID 751) to kill GE search results so that locked items are hidden from the GE
* Create chance-man
Chance Man is a plugin that locks tradeable items until they are unlocked with a random roll. The plugin tracks rolled and unlocked items per player and saves progress using JSON files. It also includes a roll animation and a simple user interface panel for viewing rolled and unlocked items
* Update chance-man
Fix Icon
* Update chance-man
Fix: Use injected Gson instead of creating new instances
- Removed direct `new Gson()` calls in UnlockedItemsManager and RolledItemsManager
- Injected RuneLite's Gson in ChanceManPlugin and passed it to each manager constructor
* Update chance-man
Create LICENSE
* Update chance-man
Fix roll trigger logic for unlocked items
- Update ground and inventory event handlers to trigger a roll for new instances (locked or unlocked) if not already rolled.
- Remove extra checks in RollAnimationManager so that every new instance triggers a roll once.
* Update chance-man
* Update chance-man
- Updated UnlockedItemsManager and RolledItemsManager to construct file paths using RuneLite.RUNELITE_DIR.
- Replaced manual system property construction with the RuneLite constant
- Added a null-check for rolledItemsManager in onItemContainerChanged to prevent NullPointerExceptions.
* Update chance-man
feat: use shared executor for file I/O, update roll animation chat message, and add search bar
- Initialize a shared single-threaded executor in ChanceManPlugin for asynchronous file operations.
- Update UnlockedItemsManager and RolledItemsManager to use the shared executor for load/save tasks.
- Remove individual executor shutdowns from managers and shut down the shared executor in plugin shutdown.
- Modify RollAnimationManager to include the queued (rolled) item in the chat message ("Unlocked {itemname} by rolling {rolleditemname}").
- Add a search bar to ChanceManPanel for filtering of rolled and unlocked items.