EnergyCrystalAutoRefill

版本 v4.0.0·更新於 2026-05-10

【Host Only MOD】Automatically refills depleted energy crystals by spending savings when a player tries to charge an item.エナジークリスタル切れの狀態で充電しようとすると貯金を消費して自動補充します

模組介紹 作者原文

EnergyCrystalAutoRefill

COMPATIBLE WITH COSMETICS UPDATE V0.4.0.

This mod is a host-only mod that automatically refills depleted Charging Station energy crystals by spending savings when a player tries to charge an item.

Features

  • Works with host installation only.
  • Triggers only when the Charging Station is depleted and a chargeable item is placed in the charge area.
  • Spends run savings and refills the Charging Station automatically.
  • Refills the configured number of energy crystals accurately.
  • Limits forced public chat to the nearest players around the charged item, up to 3 players.
  • Keeps the original refill flow:
  • Announces refill cost in k$.
  • Checks savings before starting the countdown.
  • Waits 5 seconds.
  • Counts down 5, 4, 3, 2, 1.
  • Rechecks that the station is still depleted and the item is still trying to charge.
  • Spends savings.
  • Refills the Charging Station.
  • Announces current savings after refill.
  • Keeps cooldown after refill.
  • Sends a cooldown notice only once when someone tries to charge during cooldown while the station is depleted.

Configuration

The config file is created under BepInEx/config.

| Setting | Description | Default | Minimum | Maximum |

|---|---|---:|---:|---:|

| EnableMod | Enables or disables this mod. | true | false | true |

| CostPerRefill | Cost per refill in k$. | 10 | 0 | 100 |

| PowerCrystalsToAdd | Number of energy crystals to add per refill. | 1 | 1 | 10 |

| CooldownSeconds | Cooldown seconds after a refill. | 10 | 1 | 300 |

Behavior Notes

  • The mod does nothing when the Charging Station is not depleted.
  • If savings are insufficient, it announces the shortage and requires the item to be removed and inserted again after savings increase.
  • If the item is removed or the depleted condition is resolved during the wait or countdown, the sequence cancels silently.
  • Forced public chat is intentionally limited to nearby players to avoid excessive chat spam in large groups.
  • The chat limit only affects forced chat output. It does not change the refill result.

For Developers

  • The refill process is executed only by the host or in singleplayer.
  • The refill amount is calculated as accurate energy crystal units for R.E.P.O. v0.4.0 Charging Station behavior.
  • The charged item position is used as the distance origin for selecting forced chat speakers.
  • The nearest valid players inside the truck are selected, up to 3 players.
  • The refill sequence keeps a lock to avoid duplicate refill execution and duplicate forced chat during the same process.

※Mod created by AI

EnergyCrystalAutoRefill

COSMETICS UPDATE V0.4.0対応済み.

REPOが好きな日本人のための日本人のみのREPOのDiscordサーバーあります!

參加は以下のリンクから!

このMODは、ホスト専用の、プレイヤーが充電しようとした時にエナジークリスタル切れの充電所へ貯金を消費して自動補充するMODです。

機能

  • ホストのみの導入で動作します。
  • 充電所が枯渇していて、充電可能なアイテムが充電エリア內にある場合のみ動作します。
  • ラン中の貯金を消費して充電所を自動補充します。
  • 設定したエナジークリスタル數ぶんを正確に補充します。
  • 強制公開チャットの対象を、充電対象アイテムに近い最大3人までに制限します。
  • 既存の補充フローを維持します。
  • 補充コスト(k$)を告知
  • カウントダウン開始前に殘高確認
  • 5秒待機
  • 5, 4, 3, 2, 1 のカウントダウン
  • まだ枯渇していて、まだ充電しようとしているか再確認
  • 貯金を消費
  • 充電所を補充
  • 補充後の殘高を告知
  • 補充後クールダウンを維持します。
  • クールダウン中に枯渇狀態で充電しようとした場合、クールダウン通知を1回だけ送信します。

設定項目

Configファイルは BepInEx/config 配下に作成されます。

| 設定値名 | 設定內容説明 | 初期値 | 設定可能最小値 | 設定可能最大値 |

|---|---|---:|---:|---:|

| EnableMod | MODの有効無効 | true | false | true |

| CostPerRefill | 1回の補充コスト(k$) | 10 | 0 | 100 |

| PowerCrystalsToAdd | 1回で補充するエナジークリスタル數 | 1 | 1 | 10 |

| CooldownSeconds | 補充後のクールダウン秒數 | 10 | 1 | 300 |

挙動メモ

  • 充電所が枯渇していない場合は動作しません。
  • 殘高不足の場合は不足を告知し、殘高増加後に一度アイテムを抜いて再投入するまで処理を開始しません。
  • 待機中またはカウントダウン中にアイテムが抜かれたり、枯渇條件が解消された場合は無言でキャンセルします。
  • 大人數プレイ時のチャット連打を避けるため、強制公開チャットの対象は近くのプレイヤーに限定しています。
  • チャット対象制限は発言者の制限のみです。補充結果には影響しません。

開発者向け

  • 補充処理はホストまたはシングルプレイ時のみ実行されます。
  • 補充量は R.E.P.O. v0.4.0 の充電所挙動に合わせ、正確なエナジークリスタル単位で計算されます。
  • 強制チャット対象の距離基準には充電対象アイテムの位置を使用します。
  • トラック內にいる有効なプレイヤーから近い順に最大3人を選択します。
  • 同一補充処理中の重複補充や重複発言を避けるため、補充シーケンスにロックを入れています。

※AI生成MOD

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
EnergyCrystalAutoRefill-4.0.0.zip
檔案大小
111.4 KiB