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.
AutoReturnToLobby
【Host Only MOD】Automatically returns to lobby from loading stacks and adds HOME long-hold emergency return.ロードスタック自動ロビー復帰とHOME長押し緊急復帰を追加します
By REPO_JP
| Last updated | a day ago |
| Total downloads | 334 |
| Total rating | 1 |
| Categories | Mods Server-side AI Generated Quality Of Life |
| Dependency string | REPO_JP-AutoReturnToLobby-4.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.2100OrigamiCoder-ReturnToLobby
Adds a menu button for host to return to lobby with current players.
Preferred version: 1.0.4README
COMPATIBLE WITH R.E.P.O. v0.4.3.
AutoReturnToLobby
This mod is a host-only emergency recovery mod that automatically returns the room to the lobby when a loading stack is detected, and also lets the host manually trigger the same recovery by holding HOME.
It is meant to be used together with OrigamiCoder's ReturnToLobby. When triggered, it calls the same action as pressing Yes on ReturnToLobby's return-to-lobby popup, then runs an extra hard reload fallback to recover from loading-stack states.
Why this mod exists
A common long-standing problem in R.E.P.O. is that a room can get stuck during loading when another player joins right before or right after a level transition begins. This can happen especially around late joins, and it can leave the host unable to continue normally while the room remains trapped in a broken loading state.
With the default settings, this mod detects the vanilla loading-stuck warning and automatically returns the room to the lobby menu after a short countdown. Even outside loading, the host can also hold HOME to manually trigger the same emergency return sequence.
This is intended to be a practical fix for one of the larger persistent multiplayer problems: getting the room out of a broken loading state without requiring everyone to restart the game.
Features
- Automatically detects the vanilla loading-stuck warning.
- Automatically runs forced ReturnToLobby recovery after a configurable delay.
- Hold HOME to manually start the same emergency lobby return.
- The progress UI appears after the configured display delay.
- The progress timer starts from the moment the UI appears.
- When the bar reaches 100%, the ReturnToLobby yes action is executed.
- The progress UI is drawn in front of the screen.
- The recovery path can destroy remaining Photon network objects and force the Reload scene to break out of loading stacks.
Install
- Install BepInEx.
- Install MenuLib.
- Install ReturnToLobby by OrigamiCoder.
- Place this mod DLL into the BepInEx/plugins folder.
- Start the game once to generate the config file.
Usage
Loading-stuck recovery is enabled by default. When the vanilla loading-stuck warning appears, this mod starts its own countdown and executes the forced ReturnToLobby recovery after the configured delay.
Manual recovery is also available. Hold HOME to start the progress UI. By default, the progress bar appears after 2 seconds. From the moment the UI appears, it takes 5 seconds to reach 100%. When it reaches 100%, the room is forced back toward the lobby through the same recovery sequence.
Notes for players
Only the host needs this mod to return the room to lobby. Participants do not need this mod for the host-triggered recovery to work.
The mod intentionally does not restrict execution by lobby, shop, level, or arena state. It is designed as an emergency recovery tool that can be triggered whenever the required game managers exist and the user is host or in singleplayer.
During hard recovery, a temporary Photon warning about missing PhotonViews or late RPCs may appear. This can happen because the mod intentionally destroys old network objects before forcing the reload fallback.
Configuration
General
| Setting | Description | Default | Min | Max |
|---|---|---|---|---|
| Enabled | Enables this mod. | true | - | - |
| HoldKey | Key to hold before the progress UI starts. | Home | - | - |
| DisplayDelaySeconds | Seconds before showing the progress bar. | 2 | 0 | 30 |
| RequiredProgressSeconds | Seconds required after the progress UI appears. | 5 | 0.1 | 60 |
| CooldownSeconds | Cooldown seconds after execution. | 3 | 0 | 60 |
| TransitionLockSeconds | Seconds to block repeated execution after one trigger. | 20 | 0 | 120 |
Recovery
| Setting | Description | Default | Min | Max |
|---|---|---|---|---|
| EnableHardReloadFallback | Forces the Reload scene after the ReturnToLobby yes action. | true | - | - |
| HardReloadDelaySeconds | Seconds to wait before hard reload fallback. | 0.25 | 0 | 10 |
| HardReloadRepeatCount | Hard reload retry count. | 2 | 1 | 10 |
| HardReloadRepeatIntervalSeconds | Seconds between hard reload retries. | 1.25 | 0.1 | 10 |
| DestroyNetworkObjectsBeforeReload | Destroys Photon network objects before forced lobby-menu reload. | true | - | - |
AutoLoadingStuckReturn
| Setting | Description | Default | Min | Max |
|---|---|---|---|---|
| Enabled | Automatically runs the same forced ReturnToLobby sequence after the vanilla loading-stuck UI appears. | true | - | - |
| DelayAfterStuckUISeconds | Seconds to wait after the vanilla loading-stuck UI appears before executing. | 5 | 0 | 120 |
| ShowCountdown | Shows an additional countdown while auto ReturnToLobby is waiting. | true | - | - |
| LogAutoReturn | Writes logs when auto loading-stuck return starts and executes. | true | - | - |
UI
| Setting | Description | Default | Min | Max |
|---|---|---|---|---|
| ShowProgressBar | Shows the progress bar after the display delay. | true | - | - |
| ProgressBarWidth | Width of the progress bar. | 520 | 120 | 2000 |
| ProgressBarHeight | Height of the progress bar. | 28 | 8 | 120 |
| ProgressBarVerticalPosition | Normalized vertical position from top to bottom. | 0.72 | 0 | 1 |
| TitleFontSize | Title font size. | 22 | 8 | 64 |
| PercentFontSize | Percent font size. | 18 | 8 | 64 |
Log
| Setting | Description | Default | Min | Max |
|---|---|---|---|---|
| LogExecution | Writes a log when the lobby return is executed. | true | - | - |
| LogFailure | Writes throttled failure logs. | true | - | - |
| LogFallback | Writes a log when hard reload fallback runs. | true | - | - |
Technical details
This mod does not reimplement the normal ReturnToLobby button logic.
It locates the installed ReturnToLobby plugin through BepInEx Chainloader and calls its private ReturnLobbyClick method through reflection.
After the yes action is invoked, the mod can run a hard reload fallback.
That fallback sets the current RunManager level back to the lobby menu, clears several transition flags, optionally calls NetworkManager.instance.DestroyAll(), saves the current stats, and requests the Reload scene through Photon when in multiplayer as host.
The automatic loading-stack feature monitors LoadingUI.stuckActive through reflection.
When the vanilla loading-stuck UI becomes active, this mod starts its own countdown and executes the same recovery path when the countdown reaches 100%.
※Mod created by AI
R.E.P.O. v0.4.3対応済み.
AutoReturnToLobby
REPOが好きな日本人のための日本人のみのREPOのDiscordサーバーあります! 参加は以下のリンクから! https://discord.gg/h5ATY4m5bZ
このMODは、ホスト専用の緊急復帰MODです。 ローディングスタックを検知した時に自動で部屋をロビーへ戻し、HOMEキー長押しでも同じ復帰処理を手動実行できます。
OrigamiCoder氏のReturnToLobbyと一緒に使う前提です。 実行時はReturnToLobbyのポップアップでYesを押した時と同じ処理を呼び出し、その後にロードスタック対策用の強制Reload復旧を追加で行います。
制作理由
途中参加で、ローディングの直前または直後に参加者が増えることで、ローディング中にスタックしてしまう問題が多発していました。 この状態になると、ホスト側でも通常の進行ができなくなり、部屋がロード中のまま止まる大きな問題になっていました。
このMODは、初期設定ではREPO標準のロードスタック警告を検知し、短いカウントダウン後に自動で一旦ロビーメニューへ帰還します。 ローディング中でなくても、ホストがHOMEキーを長押しし続けることで、同じ緊急復帰処理を手動実行できます。
ずっと存在していた大きなローディングスタック問題を、ゲームを再起動せずに部屋単位で復旧しやすくするための解決MODです。
機能
- REPO標準のロードスタック警告を自動検知
- 警告表示後、設定秒数後に同じ強制ReturnToLobby復帰を自動実行
- HOMEキー長押しで緊急ロビー復帰を手動開始
- 設定した表示待機秒数の後にプログレスバーを表示
- UI表示時点を0秒として進捗を開始
- 100%到達時にReturnToLobbyのYes処理を実行
- プログレスバーを画面最前面に描画
- Photonネットワークオブジェクト破棄とReloadシーン強制により、ロードスタックからの復帰を補助
導入方法
- BepInExを導入
- MenuLibを導入
- OrigamiCoder氏のReturnToLobbyを導入
- このMODのDLLをBepInEx/pluginsフォルダへ配置
- 一度ゲームを起動してConfigを生成
使い方
ロードスタック自動復帰は初期設定で有効です。 REPO標準のロードスタック警告が表示された時点から、このMOD側のカウントダウンを開始し、設定秒数後に強制ReturnToLobby復帰を実行します。
手動復帰も使用できます。 HOMEキーを長押しします。 初期設定では、2秒後にプログレスバーが表示されます。 UIが表示された時点から5秒で100%になります。 100%になると、同じ復帰処理で部屋をロビーへ戻します。
プレイヤー向け注意点
部屋をロビーへ戻す処理はホスト側で実行します。 参加者側にこのMODは必須ではありません。
このMODは、ロビー、ショップ、レベル、アリーナなどの状態別制限を意図的に入れていません。 必要なゲーム管理インスタンスが存在し、ホストまたはシングルプレイであれば、いつでも緊急復帰を試行する設計です。
強制復旧時には、一時的にPhotonViewやRPC関連の警告が出る場合があります。 これは古いネットワークオブジェクトを破棄してからReloadを強制するために発生することがあります。
設定項目
General
| 設定値名 | 設定内容説明 | 初期値 | 最小値 | 最大値 |
|---|---|---|---|---|
| Enabled | このMODを有効化します | true | - | - |
| HoldKey | プログレスUI開始前に長押しするキー | Home | - | - |
| DisplayDelaySeconds | プログレスバーを表示するまでの秒数 | 2 | 0 | 30 |
| RequiredProgressSeconds | プログレスバー表示後、実行までに必要な秒数 | 5 | 0.1 | 60 |
| CooldownSeconds | 実行後のクールダウン秒数 | 3 | 0 | 60 |
| TransitionLockSeconds | 一度実行した後に再実行を防ぐ秒数 | 20 | 0 | 120 |
Recovery
| 設定値名 | 設定内容説明 | 初期値 | 最小値 | 最大値 |
|---|---|---|---|---|
| EnableHardReloadFallback | ReturnToLobbyのYes処理後にReloadシーンを強制します | true | - | - |
| HardReloadDelaySeconds | Yes処理後に強制Reloadするまでの秒数 | 0.25 | 0 | 10 |
| HardReloadRepeatCount | 強制Reloadの試行回数 | 2 | 1 | 10 |
| HardReloadRepeatIntervalSeconds | 強制Reload再試行の間隔秒数 | 1.25 | 0.1 | 10 |
| DestroyNetworkObjectsBeforeReload | 強制ロビーメニュー復帰前にPhotonネットワークオブジェクトを削除します | true | - | - |
AutoLoadingStuckReturn
| 設定値名 | 設定内容説明 | 初期値 | 最小値 | 最大値 |
|---|---|---|---|---|
| Enabled | REPO標準のロードスタックUI表示後に同じ強制ReturnToLobby処理を自動実行します | true | - | - |
| DelayAfterStuckUISeconds | 標準ロードスタックUI表示後に実行まで待つ秒数 | 5 | 0 | 120 |
| ShowCountdown | 自動ReturnToLobby待機中に追加カウントダウンを表示します | true | - | - |
| LogAutoReturn | ロードスタック自動復帰の開始時と実行時にログを出力します | true | - | - |
UI
| 設定値名 | 設定内容説明 | 初期値 | 最小値 | 最大値 |
|---|---|---|---|---|
| ShowProgressBar | 表示待機後にプログレスバーを表示します | true | - | - |
| ProgressBarWidth | プログレスバーの横幅 | 520 | 120 | 2000 |
| ProgressBarHeight | プログレスバーの高さ | 28 | 8 | 120 |
| ProgressBarVerticalPosition | 上から下への正規化Y位置 | 0.72 | 0 | 1 |
| TitleFontSize | タイトル文字サイズ | 22 | 8 | 64 |
| PercentFontSize | 進捗文字サイズ | 18 | 8 | 64 |
Log
| 設定値名 | 設定内容説明 | 初期値 | 最小値 | 最大値 |
|---|---|---|---|---|
| LogExecution | ロビー戻り実行時にログを出力します | true | - | - |
| LogFailure | 抑制付き失敗ログを出力します | true | - | - |
| LogFallback | 強制Reload実行時にログを出力します | true | - | - |
技術詳細
このMODは、通常のReturnToLobbyボタン処理を再実装していません。
BepInEx Chainloaderから導入済みのReturnToLobbyを探し、privateメソッドの ReturnLobbyClick をReflectionで呼び出します。
Yes処理を呼び出した後、強制Reload fallbackを実行できます。
このfallbackでは、現在のRunManagerの戻り先をロビーメニューへ補正し、複数の遷移フラグを解除し、必要に応じて NetworkManager.instance.DestroyAll() を呼び出し、ホストのマルチプレイ中はPhoton経由でReloadシーンを要求します。
ロードスタック自動復帰機能では、LoadingUI.stuckActive をReflectionで監視します。
REPO標準のロードスタックUIが有効になったら、このMOD側のカウントダウンを開始し、100%到達時に同じ復帰処理を実行します。
※AI生成MOD