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.
| Last updated | 9 minutes ago |
| Total downloads | 0 |
| Total rating | 1 |
| Categories | Tools Audio Levels Client-side AI Generated |
| Dependency string | cn_xc-BackroomsCompat-0.1.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.2100README
BackroomsCompat
让 Rogue-Backrooms 在当前版本的游戏里能正常进入的兼容补丁。
解决什么问题
当前版本的游戏在生成关卡时,EnemyDirector.FirstSpawnPointAdd 会直接取 LevelGenerator.Instance.LevelPathTruck.transform:
Vector3.Distance(item.transform.position, LevelPathTruck.transform.position);
而 Backrooms 是自定义关卡,没有卡车路径点(LevelPathTruck == null),于是:
NullReferenceException → level loading failed → leaving to the menu
单人也会这样
另一处修复:空音源刷屏
Backrooms 里部分铰链门的 Sound.Source 是空的/已销毁,Sound.PlayLoop 每帧访问 Source.clip 会抛空引用(实测一局 3400+ 次,日志被撑到 2.4 MB)。
补丁会在这类调用前直接跳过 → 正常音效不受影响,报错归零。
已实测
[Warning:BackroomsCompat] 关卡缺少 LevelPathTruck,已用兜底刷新点:Top
出现这行日志、且关卡正常生成完毕,就说明补丁生效了(实测可进入 Backrooms)。
怎么修
在 EnemyDirector.FirstSpawnPointAdd 前面加一层判断:
LevelPathTruck存在 → 走游戏原生逻辑(原版关卡完全不受影响)- 不存在(Backrooms 这类自定义关卡)→ 用任意可用的
LevelPoint兜底作为首刷点,跳过原生逻辑,避免空引用
日志会打印一次:
关卡缺少 LevelPathTruck,已用兜底刷新点:xxx
安装
把 BackroomsCompat.dll 放进 BepInEx/plugins/(或任意子目录),确保同时装了 Rogue-Backrooms。
依赖
| 依赖 | 说明 |
|---|---|
| BepInEx 5.4.x | 必需 |
| Rogue-Backrooms 1.1.9 | 被兼容的目标模组 |
说明
- 只影响「缺少 LevelPathTruck」的关卡,原版关卡逻辑不变
- 敌人首刷点会退化为「就近任选一个可用点」,对玩法影响很小