


RarityWeightMod is a R.E.P.O. mod that controls how many cosmetic boxes spawn per level and the rarity weight of each tier.
BepInEx/config/com.yourname.rarityweightmod.cfg to change settingsVolume mode sets the spawn loop to run up to BoxCount times, then stops naturally when no spawn volumes remain. The actual number of boxes may be lower than BoxCount if the level does not have enough available cosmetic spawn volumes.
All mode uses a compensation window of up to BoxCount × 3 - 1 attempts to retry when an internal spawn fails, similar to how CosmeticBoxConfig by khalil works. This makes it more likely to reach the configured target even on smaller levels.
Rarity is selected using a weighted random roll across all four tiers. The weight values are ratios — 60:25:12:3 and 6:2.5:1.2:0.3 produce identical results. Setting all four to the same value gives equal 25% chance per tier.
After running the mod once, edit:
BepInEx/config/com.yourname.rarityweightmod.cfg
[General]
## Enable or disable the mod entirely.
## false = vanilla behavior, no patches applied.
# Default: true
Enabled = true
## Spawn mode:
## Volume - spawn up to BoxCount boxes, limited by available spawn volumes in the level
## All - force BoxCount boxes using compensation loop (BoxCount × 3 - 1 attempts)
## Changes apply on the next level load.
# Setting type: SpawnMode
# Default: Volume
Mode = Volume
## Number of cosmetic boxes to target per level.
## 1-20 = target box count
## Changes apply on the next level load.
# Acceptable values: 1-20
# Default: 3
BoxCount = 3
[RarityWeights]
## Rarity weights are ratios, not percentages.
## Example: 60:25:12:3 gives ~60% Common, ~25% Uncommon, ~12% Rare, ~3% UltraRare.
## Setting all four to the same value gives equal 25% chance per tier.
# Acceptable values: 0-100
# Default: 60
CommonWeight = 60
# Acceptable values: 0-100
# Default: 25
UncommonWeight = 25
# Acceptable values: 0-100
# Default: 12
RareWeight = 12
# Acceptable values: 0-100
# Default: 3
UltraRareWeight = 3
RarityWeightMod.dll in your BepInEx/plugins/ folderSemiFunc.RunIsLevel()This mod patches ValuableDirector.SpawnCosmeticWorldObject, CosmeticWorldObjectLevelLoopsClampedGet, and CosmeticWorldObjectLevelLoopsGet. It does not modify EnemyDirector, LevelGenerator, or any other system. Monster counts and other level generation logic are unaffected.