


注意:中文在前,English below
CosmeticBoxConfig 是一个 R.E.P.O. 模组(Mod),可配置每个关卡中的化妆品箱子(Cosmetic Box)的实际生成数量,且完全在游戏原有的生成体积(spawn volume)规则内运作。
BepInEx/config/cosmetic.box.config.cfg 修改设置Fixed 模式强制化妆品概率门通过,直到实际生成了 BoxCount 个箱子,之后强制后续概率门失败,避免超额生成。使用一个较小的补偿窗口(最多 BoxCount × 3 - 1 次尝试)在内部生成失败时重试,仍保持在原版生成体积允许范围内。如果其他 Mod 或游戏更新从内部拒绝了生成,最终数量可能低于目标值;在正常的原版生成体积可用时,补偿尝试应能达到配置目标。
Random 模式只强制第一个实际箱子生成,之后恢复游戏原生概率。如果关卡没有可用的原版化妆品生成体积,游戏仍然不会生成箱子。
首次运行后编辑:
BepInEx/config/cosmetic.box.config.cfg
[General]
## Spawn mode:
## Random - 至少有 1 个实际化妆品箱子(当原版生成体积可用时);后续概率门使用原版概率
## Fixed - 目标为 BoxCount 个实际化妆品箱子(当原版生成体积可用时),带补偿尝试
## 更改在下一关加载时生效,不会在关卡中间改变
# Setting type: SpawnMode
# Default: Random
Mode = Random
## Fixed 模式下的目标箱子数量。
## 0 = 无化妆品箱子。
## 1-20 = 目标实际箱子数量,受原版生成体积可用性限制。
## Random 模式下此值无效。更改在下一关加载时生效。
# Acceptable values: 0-20
# Default: 1
BoxCount = 1
CosmeticBoxConfig.dll 放入 BepInEx/plugins/ 文件夹如果游戏未安装在项目默认路径,构建时覆盖 RepoGamePath:
dotnet build -c Release -p:RepoGamePath="D:\Games\REPO"
该 Mod 只对 ValuableDirector.SetupHost 中的化妆品生成逻辑进行补丁,不修改 EnemyDirector、LevelGenerator 或其他系统。不会影响怪物数量或其他关卡生成逻辑。
English
CosmeticBoxConfig is a R.E.P.O. mod that configures cosmetic box spawns per level within the game's original spawn-volume rules.
BepInEx/config/cosmetic.box.config.cfg to change settingsFixed mode forces the cosmetic chance gate until BoxCount actual boxes have spawned, then forces later chance checks to fail to avoid extra boxes. It uses a small compensation window (up to BoxCount × 3 - 1 attempts) to retry when an internal spawn attempt fails, while staying within the original spawn volume limits. If another mod or game update rejects spawns internally, the result may fall below the target; with normal vanilla spawn volumes available, the compensation attempts should reach the configured target.
Random mode forces only the first actual box, then returns to the game's native probability. If the level has no available original cosmetic spawn volume, the game will still spawn no box.
After running the mod once, edit:
BepInEx/config/cosmetic.box.config.cfg
[General]
## Spawn mode:
## Random - At least 1 actual cosmetic box when an original spawn volume is available; remaining rolls use vanilla probability.
## Fixed - Targets BoxCount actual cosmetic boxes when original spawn volumes are available, with compensation attempts.
## Changes apply on the next level load, not mid-level.
# Setting type: SpawnMode
# Default: Random
Mode = Random
## Fixed mode cosmetic boxes.
## 0 = 0 cosmetic boxes.
## 1-20 = target actual cosmetic box count, limited by original spawn-volume availability.
## Ignored in Random mode. Changes apply on the next level load.
# Acceptable values: 0-20
# Default: 1
BoxCount = 1
CosmeticBoxConfig.dll in your BepInEx/plugins/ folderIf your game is not installed at the project default path, override RepoGamePath when building:
dotnet build -c Release -p:RepoGamePath="D:\Games\REPO"
This mod only patches cosmetic box spawn logic in ValuableDirector.SetupHost. It does not modify EnemyDirector, LevelGenerator, or any other system. Monster counts and other level generation logic are unaffected.