R.E.P.O.
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
Downloads
575
Size
7.7KB

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」的关卡,原版关卡逻辑不变
  • 敌人首刷点会退化为「就近任选一个可用点」,对玩法影响很小
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.