Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
RarityWeightMod
Configure cosmetic box spawn count and rarity weights per level. Set how many boxes spawn and control the chance of each rarity tier.
By Meone101201
| Date uploaded | 3 weeks ago |
| Version | 1.1.0 |
| Download link | Meone101201-RarityWeightMod-1.1.0.zip |
| Downloads | 10344 |
| Dependency string | Meone101201-RarityWeightMod-1.1.0 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
RarityWeightMod
📖 About
RarityWeightMod is a R.E.P.O. mod that controls how many cosmetic boxes spawn per level and the rarity weight of each tier.
✨ Features
- In-game Settings Panel (F5) — configure everything without editing files
- Box Markers (F6) — color-coded brackets showing box locations on screen
- Three spawn modes: Volume_Offline, All_Offline, AutoLevel_Online
- Rarity weights: control spawn chance of Common, Uncommon, Rare, and UltraRare independently
- Customizable hotkeys: rebind Settings and Markers toggle keys in-game
- Level-only: patches apply only during actual levels — not in shop, lobby, or arena
- BepInEx config: edit
BepInEx/config/com.yourname.rarityweightmod.cfgor use in-game Settings
🎮 In-Game Controls
F5 — Open/Close Settings Panel
- Change spawn mode, box count, rarity weights
- Toggle HUD and box markers
- Rebind hotkeys (click button → press new key)
- ESC to close
F6 — Toggle Box Markers
- Shows/hides color-coded brackets around cosmetic boxes
- Green = Common, Blue = Uncommon, Purple = Rare, Orange = UltraRare
⚙️ Spawn Modes
Volume_Offline (requires all players to have the mod)
Spawns up to BoxCount boxes per level, limited by available spawn volumes. Stops naturally when no volumes remain.
All_Offline (requires all players to have the mod)
Forces BoxCount boxes using a compensation window of BoxCount × 3 - 1 attempts. More reliable than Volume on smaller levels.
AutoLevel_Online (host-only — friends do not need the mod) Automatically spawns the maximum number of boxes the current level allows to extract. Scales with progression:
| Levels completed | Can sell per level |
|---|---|
| 1–5 | 1 box |
| 6–10 | 2 boxes |
| 11+ | 3 boxes (max) |
Values depend on cosmeticWorldObjectsLevelLoop (5) and cosmeticWorldObjectsLevelLoopsMax (2) from the game's ValuableDirector.
🔧 Configuration
In-Game (Recommended)
Press F5 during gameplay to open the Settings panel. All options can be changed in real-time.
Config File (Advanced)
Edit BepInEx/config/com.yourname.rarityweightmod.cfg:
[General]
## Enable or disable the mod entirely.
# Default: true
Enabled = true
## Spawn mode:
## Volume_Offline - targets BoxCount boxes, limited by spawn volumes (all players need mod)
## All_Offline - forces BoxCount boxes with compensation loop (all players need mod)
## AutoLevel_Online - auto-scales to level extract limit, host-only
# Default: Volume_Offline
Mode = Volume_Offline
## Target box count per level — used by Volume_Offline and All_Offline only.
# Acceptable values: 1-20
# Default: 3
BoxCount = 3
[Display]
## Show HUD info in top-left corner.
# Default: true
ShowHUD = true
## Show color-coded brackets around cosmetic boxes.
# Default: true
ShowBoxMarkers = true
[Hotkeys]
## These are hidden from REPOConfig — rebind in-game via Settings panel (F5).
## Format: <KeyCode>
# Default: F5
OpenSettingsKey = F5
# Default: F6
ToggleBoxMarkersKey = F6
[RarityWeights]
## Weights are ratios. Example: 60:25:12:3 gives ~60% Common, ~25% Uncommon, ~12% Rare, ~3% UltraRare.
## Setting all four equal gives 25% chance per tier.
# Default: 60
CommonWeight = 60
# Default: 25
UncommonWeight = 25
# Default: 12
RareWeight = 12
# Default: 3
UltraRareWeight = 3
📦 Installation
- Install BepInExPack REPO
- Place
RarityWeightMod.dllinBepInEx/plugins/ - Launch the game
- Press F5 in-game to configure
📜 Changelog
See CHANGELOG.md
📄 Dependencies
- BepInExPack_REPO >= 5.4.23
🧩 Compatibility
Patches ValuableDirector.SpawnCosmeticWorldObject, CosmeticWorldObjectLevelLoopsClampedGet, CosmeticWorldObjectLevelLoopsGet, and CosmeticWorldObject.Start. Does not modify EnemyDirector, LevelGenerator, or any other system.
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 panelToggleBoxMarkersKey(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.cswithCosmeticWorldObjectStartPatchandCosmeticBoxTracker - 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, addedAutoLevel_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_Onlinewith clear online/offline labels
Fixed
AutoLevel_Onlinecorrectly readscosmeticWorldObjectsLevelLoopandcosmeticWorldObjectsLevelLoopsMaxat runtime fromValuableDirectorinstance- Extract limit on client side now matches spawned box count when using
AutoLevel_Online(host-only mod) - Counter reset now also clears
AutoLevelLimiton level start
Technical
CosmeticWorldObjectLevelLoopsClampedGetPostfix stores raw game limit inBoxSpawnTracker.AutoLevelLimitbefore overriding loop countCosmeticWorldObjectLevelLoopsGetPostfix forces chance gate to pass untilAutoLevelLimit + 1boxes have spawned- Removed
ChanceRate_Onlinebranch 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
SetupHostentry