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

Details

Date Uploaded
Downloads
138
Size
37KB

Contact / 联系我

If you have any questions, feel free to contact me ↓ Email: [email protected] QQ: 670155978

如有任何问题,请与我联系 ↓ 邮箱:[email protected] QQ:670155978


ForceJoin

Client-side mod for R.E.P.O. (BepInEx 5 / Harmony). Extra dependency: LateJoinSimple 0.9.1.

When you join a room in progress, the game can kick you back to the main menu because the host's prefabs never arrived locally, or leave you stuck on the loading screen because the module-sync counter never advances. ForceJoin patches those exact failure points on the joining client only — the host does not need it.

Features

  • Prefab fallback. When the host streams its prefab list, every path is guaranteed to exist in the local MultiplayerPool.ResourceCache: the real asset is used when available, otherwise an inert placeholder prefab stands in. PrefabsLoad can no longer throw, so the "missing prefab → leave room" path is cut off at the source.
  • Pre-instantiation check. A second confirmation runs before any networked instantiation, covering objects that never go through the host's bulk list.
  • Null-safe instantiation. If an instantiation still returns null, a placeholder instance takes its place, so downstream transform / GetComponent calls do not hit a null reference.
  • Module-copy tolerance. "Module copy is not ready" is swallowed and falls back to on-the-spot instantiation instead of aborting level generation.
  • No kick on missing prefab. The final step that sends the client back to the menu is intercepted.
  • Module-sync watchdog. This is the main switch for the stuck-loading screen. While the client waits for modules to spawn, ForceJoin first re-runs ConnectionSetup() on every local module the host's RPC never reached, then — if the counter is still short after a grace period (8 s by default) — forces the count to the target and releases the wait. Modules the host never sent are filled in as far as the local data allows.
  • Disconnect logging. The disconnect cause is printed once, so you can tell "kicked" apart from "host closed the room / timeout".
  • No disk writes. Nothing under the game folder is modified; the only file produced is its own BepInEx config.

Configuration

Edit BepInEx/config/Aartyns.REPO.ForceJoin.cfg after the first launch.

Section Setting Default Description
General FillMissingPrefabs true Fill missing prefabs with placeholders
General SuppressInstantiateKick true Intercept the instantiate-failure kick and module-copy errors
General SwallowGenerationFailed false Swallow GenerationFailed (dangerous, diagnostics only)
General Verbose true Log filled prefab paths and disconnect causes
ModuleSpawn ForceModuleSpawn true Main switch: re-run ConnectionSetup and force-release a stalled module sync
ModuleSpawn ForceGraceSeconds 8 Seconds to wait before forcing the release; raise it on very large maps

Installation

  1. Install BepInEx 5 for R.E.P.O. If the game folder has no BepInEx yet, launch the game once so the structure is created.
  2. Install LateJoinSimple 0.9.1 as well — it is already declared in manifest.json, so a Thunderstore install pulls it automatically; for manual installs, put it into BepInEx/plugins/ yourself.
  3. Drop ForceJoin.dll into any subfolder of BepInEx/plugins/.
  4. The host does not need this mod, but the host and the joining client must run the same LateJoinSimple version.

Notes

  • Joining client only. It changes nothing on the host side and nothing on disk.
  • Room-level failures are out of reach for any client mod: closed room, full room, changed password, host left, Photon region or version mismatch. Those fail before you ever join.
  • A missing level-module prefab cannot be recovered. If the two sides run different level mods, the placeholder is an empty shell — the floor cell exists but the room is empty, so part of the map may be missing.
  • Decoration, prop and enemy prefabs are recoverable: only that object is lost, and the next level re-syncs from whatever the host sends.
  • Force-releasing a stalled module sync costs you the modules the host never sent, so corners, doors or fall-through surfaces may be incomplete in a room joined mid-level. That limit comes from the vanilla protocol, not from the mod.
  • Log check after launching: [ForceJoin] loaded v1.0.2, 8 patches applied / 0 failed. If it says 0 applied / 0 failed, the old dll is still in place. When the watchdog fires you will see re-ran ConnectionSetup for N local modules or module sync stalled, forced release.

ForceJoin(中文)

R.E.P.O. 客机侧兜底模组(BepInEx 5 / Harmony)。前置依赖:LateJoinSimple 0.9.1。

中途加入别人的房间时,有两种完全不同的失败:一是房主的 prefab 没送到本地,游戏直接把你送回主菜单;二是模块同步计数永远不涨,人卡在加载界面。ForceJoin 只在加入方修补这两处,房主不需要装。

功能

解决cn-小菜中途加入在模组冲突或人数过多及个别模式下造成的加入卡顿,无法载入等问题 提升加入成功率及速度。优先保证能加入房间,但游戏内可能会出现未加载区块及错乱(弊端)会在下一关后全部刷新正常。

  • 缺失 prefab 兜底。 房主下发整批 prefab 路径时,先保证本地 MultiplayerPool.ResourceCache 里每条路径都有对象:有真资源就用真的,没有就塞一个无行为的占位 prefab。PrefabsLoad 不会再抛异常,"缺 prefab → 退出房间"这条路从源头被切断。
  • 实例化前二次确认。 任何一次网络实例化之前再查一遍,覆盖不走房主批量清单的零散物体。
  • 实例化为空时顶上。 万一仍返回 null,用占位实例接管,避免下游 transform / GetComponent 空引用。
  • 模块副本未就绪容错。 吞掉"模块副本未就绪",回落到现场实例化,而不是中断关卡生成。
  • 缺 prefab 不踢人。 把最后一步"缺东西就送回菜单"拦掉。
  • 模块同步看门狗。 这是解决卡加载的主开关:客机等模块生成期间,先给房主 RPC 没覆盖到的本地模块补跑一次 ConnectionSetup();若过了宽限期(默认 8 秒)计数仍不达标,直接把计数顶到目标数放行。房主没发给你的模块,能按本地数据补到多少算多少。
  • 断开原因日志。 断开原因只打印一次,方便区分"被踢"和"房主关房 / 超时"。
  • 不写盘。 游戏目录下的任何文件都不会被改动,唯一产生的是它自己的 BepInEx 配置文件。

配置

首次运行后编辑 BepInEx/config/Aartyns.REPO.ForceJoin.cfg。

Section Setting Default 说明
General FillMissingPrefabs true 缺失 prefab 用占位补齐
General SuppressInstantiateKick true 拦截实例化失败踢人 + 模块副本异常
General SwallowGenerationFailed false 吞掉 GenerationFailed(危险,仅诊断用)
General Verbose true 打印补齐的 prefab 路径与断开原因
ModuleSpawn ForceModuleSpawn true 主开关:模块同步停滞时补跑 ConnectionSetup 并强行放行
ModuleSpawn ForceGraceSeconds 8 停滞多少秒后强行放行,地图很大时可调大

安装

  1. 为 R.E.P.O. 安装 BepInEx 5。游戏目录里还没有 BepInEx 的,先裸启动一次游戏让它生成目录结构。
  2. 同时安装 LateJoinSimple 0.9.1 —— manifest.json 已声明,通过 Thunderstore 安装会自动带走;手动安装需自己放进 BepInEx/plugins/。
  3. 将 ForceJoin.dll 放进 BepInEx/plugins/ 下的任意子目录。
  4. 房主不用装本模组,但房主与加入方的 LateJoinSimple 版本必须一致。

说明

  • 纯客机侧模组,不改房主端,不改磁盘上的任何游戏文件。
  • 房间层问题客户端无解:房间已关、满员、密码变更、房主退出、Photon 区域或版本不匹配 —— 这些在你加入之前就失败了。
  • 缺关卡模块 prefab 救不回来。双方关卡模组不一致时,占位拿到的是空壳,格子有值但房间里什么都没有,地图可能缺一段。
  • 装饰 / 道具 / 敌人类 prefab 能救:只少那个物体,下一关会按房主当时下发的内容重新同步。
  • 强行放行模块同步的代价是丢掉房主没发的那些模块,所以关卡中途加入时,房间的边角、门、坠落面可能不完整。这是原版协议决定的,不是模组能补全的。
  • 启动后日志确认:[ForceJoin] 已加载 v1.0.2,补丁 8 个成功 / 0 个失败。 若显示 0 个成功 / 0 个失败,说明跑的还是旧 dll。看门狗触发时会看到 已补跑 ConnectionSetup 或 模块同步停滞,已强行放行。
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.