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.
CosmeticBoxConfig
Configure cosmetic box spawns per level within original spawn volumes. Fixed mode targets 0-20 actual boxes; Random mode guarantees at least one.
| Last updated | a day ago |
| Total downloads | 2528 |
| Total rating | 1 |
| Categories | Mods Server-side AI Generated |
| Dependency string | khalil-CosmeticBoxConfig-1.0.0 |
| Dependants | 0 other packages depend on this package |
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
CosmeticBoxConfig
注意:中文在前,English below
📖 简介
CosmeticBoxConfig 是一个 R.E.P.O. 模组(Mod),可配置每个关卡中的化妆品箱子(Cosmetic Box)的实际生成数量,且完全在游戏原有的生成体积(spawn volume)规则内运作。
✨ 功能
- 两种模式:Fixed(固定模式)精确控制实际生成的箱子数;Random(随机模式)至少生成 1 个箱子,之后恢复原版概率
- 可配置数量:Fixed 模式下 0–20 个箱子(0 表示无箱子)
- 生成体积安全:仅在游戏原本存在的化妆品生成体积范围内生效,不会强行生成
- 修复第一关最小值:Random 模式在有有效生成体积时确保至少 1 个实际箱子
- BepInEx 配置:编辑
BepInEx/config/cosmetic.box.config.cfg修改设置 - 游戏内配置 UI:模式为枚举选择器,可在游戏 Mod 设置中左右切换 Random/Fixed
- 随机序列友好:补丁后的概率门仍然消耗原始的概率随机值,减少对下游随机序列的偏移影响
⚙️ 工作原理
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
📦 安装
- 安装 BepInExPack REPO
- 将
CosmeticBoxConfig.dll放入BepInEx/plugins/文件夹 - 启动游戏
🛠️ 开发构建
如果游戏未安装在项目默认路径,构建时覆盖 RepoGamePath:
dotnet build -c Release -p:RepoGamePath="D:\Games\REPO"
📜 更新日志
v1.0.0
- 初始发布
- Fixed/Random 双模式实际箱子系统
- 可配置 Fixed 模式 0–20 个箱子
- Random 模式在有生成体积时确保至少 1 个实际箱子
- 概率门 Transpiler + 生成体积安全的稀有度回退
📄 依赖
- BepInExPack_REPO >= 5.4.23
🧩 兼容性
该 Mod 只对 ValuableDirector.SetupHost 中的化妆品生成逻辑进行补丁,不修改 EnemyDirector、LevelGenerator 或其他系统。不会影响怪物数量或其他关卡生成逻辑。
CosmeticBoxConfig
English
📖 About
CosmeticBoxConfig is a R.E.P.O. mod that configures cosmetic box spawns per level within the game's original spawn-volume rules.
✨ Features
- Two modes: Fixed (targets N actual boxes) or Random (at least 1 actual box, then vanilla probability)
- Configurable count: 0–20 boxes in Fixed mode (0 = no boxes)
- Spawn-volume safe: Guarantees are only made within the game's original cosmetic spawn-volume rules when available entries exist
- Fixes level 1 minimum: Random mode ensures at least one actual box when a valid original spawn volume exists
- BepInEx config: Edit
BepInEx/config/cosmetic.box.config.cfgto change settings - In-game config UI: Mode is an enum selector switchable left/right between Random and Fixed in the game's mod settings UI
- Random-sequence friendly: Patched chance gates still consume the original chance-roll random value to reduce downstream random-sequence offsets
⚙️ How It Works
Fixed 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.
🔧 Configuration
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
📦 Installation
- Install BepInExPack REPO
- Place
CosmeticBoxConfig.dllin yourBepInEx/plugins/folder - Launch the game
🛠️ Development Build
If your game is not installed at the project default path, override RepoGamePath when building:
dotnet build -c Release -p:RepoGamePath="D:\Games\REPO"
📜 Changelog
v1.0.0
- Initial release
- Fixed/Random dual-mode actual box system
- Configurable 0–20 Fixed mode box count
- Random mode minimum-one actual box behavior when a spawn volume is available
- Chance-gate transpiler plus spawn-volume-safe rarity fallback
📄 Dependencies
- BepInExPack_REPO >= 5.4.23
🧩 Compatibility
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.