Meone101201-RarityWeightMod icon

RarityWeightMod

Configure cosmetic box spawn count and rarity weights per level. Set how many boxes spawn and control the chance of each rarity tier.

CHANGELOG

Changelog

v1.1.0 (2026-06-01)

Added

  • In-game Settings Panel — press F5 to open a full settings window during gameplay
    • All config options accessible in-game (no need to edit .cfg file)
    • Mode selector with ◄ ► buttons to cycle between spawn modes
    • Sliders for BoxCount and all Rarity Weights
    • Toggle switches for Enabled, ShowHUD, and ShowBoxMarkers
    • Hotkey rebinding interface (click button → press new key)
    • Dark themed UI with section headers and proper layout
  • Box Markers (Brackets) — visual indicators showing cosmetic box locations on screen
    • Color-coded by rarity: Green (Common), Blue (Uncommon), Purple (Rare), Orange (UltraRare)
    • Toggle on/off with F6 hotkey or via Settings panel
    • Toast notification when toggling markers
    • Automatically hides when ShowBoxMarkers is disabled
  • Display Settings — new config section
    • ShowHUD — toggle HUD display (top-left corner info)
    • ShowBoxMarkers — toggle box location brackets
  • Hotkeys — customizable keyboard shortcuts (hidden from REPOConfig, managed in-game)
    • OpenSettingsKey (default: F5) — open/close Settings panel
    • ToggleBoxMarkersKey (default: F6) — toggle box markers on/off
    • ESC closes Settings panel
  • CosmeticBoxTracker Component — attaches to each cosmetic box
    • Spawns and manages ValuableDiscoverGraphic for each box
    • Saves/restores custom waitTime to prevent game-triggered discover conflicts
    • Scans and hides all graphics targeting the box when markers are disabled
    • Handles both mod-created and game-triggered graphics correctly

Changed

  • Settings panel blocks camera rotation — OverrideAimStop() called every frame while panel is open
  • Cursor management — unlocks and shows cursor when Settings panel is open, restores state on close
  • HUD now shows hotkey hints — displays [Settings : F5] and [F6] next to relevant info
  • Toast system — shows "Box Markers : ON/OFF" message for 2.5 seconds when toggling

Fixed

  • Game-triggered discover graphics no longer persist when ShowBoxMarkers is disabled
    • Previous issue: setting custom.waitTime = 99999f permanently affected game's own discover triggers
    • Solution: save/restore custom component state before/after calling ValuableDiscover.New()
  • HideAllBoxGraphics() now scans all children of ValuableDiscover.instance to remove orphaned graphics
  • Marker graphics properly destroyed when box is collected or level ends

Technical

  • Added CosmeticDiscoverPatch.cs with CosmeticWorldObjectStartPatch and CosmeticBoxTracker
  • Settings panel uses GUI.Window with draggable title bar
  • Rebind system uses Event.current for accurate key detection
  • All GUI styles initialized once and reused (performance optimization)
  • Section backgrounds use separate texture for visual hierarchy

v1.0.1 (2026-05-30)

Changed

  • Replaced SpawnMode enum — removed ChanceRate_Online, added AutoLevel_Online
  • AutoLevel_Online: spawns cosmetic boxes matching the level's natural extract limit automatically — no more being stuck at 1 box per level; scales with progression (e.g. level 1-5 = 1 box, level 6-10 = 2 boxes, level 11+ = 3 boxes)
  • Removed BoxCountEnabled toggle — consolidated into SpawnMode selector (3 modes replace the old toggle + mode combo)
  • Removed SpawnChance slider — replaced by AutoLevel_Online which handles online play correctly
  • Mode selector now shows Volume_Offline, All_Offline, AutoLevel_Online with clear online/offline labels

Fixed

  • AutoLevel_Online correctly reads cosmeticWorldObjectsLevelLoop and cosmeticWorldObjectsLevelLoopsMax at runtime from ValuableDirector instance
  • Extract limit on client side now matches spawned box count when using AutoLevel_Online (host-only mod)
  • Counter reset now also clears AutoLevelLimit on level start

Technical

  • CosmeticWorldObjectLevelLoopsClampedGet Postfix stores raw game limit in BoxSpawnTracker.AutoLevelLimit before overriding loop count
  • CosmeticWorldObjectLevelLoopsGet Postfix forces chance gate to pass until AutoLevelLimit + 1 boxes have spawned
  • Removed ChanceRate_Online branch from all patches
  • Removed SpawnChancePatch.cs (Transpiler approach abandoned — nested type name not resolvable at runtime)

v1.0.0 (2026-05-28)

Added

  • Initial release
  • Enabled toggle: enable or disable the mod
  • SpawnMode enum: Volume_Offline, All_Offline, ChanceRate_Online
  • BoxCount: configurable 1-20 boxes per level (Offline modes)
  • Rarity weight system: independent weight for Common, Uncommon, Rare, UltraRare (ratio-based)
  • Level-only guard: all patches check SemiFunc.RunIsLevel()
  • Counter resets on SetupHost entry