REPO_JP-EnergyCrystalAutoRefill icon

EnergyCrystalAutoRefill

Host-only mod. When a player attempts to charge while the energy crystals are depleted, the system spends savings and refills the energy crystals.【ホストのみの導入でOK】エナジークリスタルが切れた状態で充電しようとすると、貯金を消費してエナジークリスタルが補充されるMOD

By REPO_JP
Last updated a day ago
Total downloads 205
Total rating 1 
Categories Mods Server-side
Dependency string REPO_JP-EnergyCrystalAutoRefill-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

EnergyCrystalAutoRefill

Auto-refill the Charging Station when it is depleted and a player tries to charge an item.

Features

  • Only triggers when the Charging Station is depleted and a chargeable battery item is inside the charge area.
  • Forced chat 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 and refills power.
    • Announces current savings after refill.
  • Cooldown after a refill:
    • Cooldown persists even if the station becomes not-depleted after refill.
    • If someone tries during cooldown while the station is depleted, a cooldown message is forced once.

Configuration

Located in the BepInEx config file.

  • EnableMod (default: true)
    • Enable or disable this mod.
  • CostPerRefill (default: 20, range: 0 to 100)
    • Cost per refill in k$.
  • EnergyCrystalsToAdd (default: 5, range: 1 to 10)
    • How many power crystals worth to add per refill.
  • CooldownSeconds (default: 10, range: 1 to 300)
    • Cooldown seconds after a refill.

Behavior Notes

  • No action when the 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/countdown, the sequence cancels silently.

パワークリスタルが枯渇している状態でプレイヤーが充電しようとした場合にのみ、自動で補充を行います。

機能

  • パワークリスタルが枯渇していて、充電対象が充電エリア内にある場合のみ動作します。
  • 強制チャットのフロー:
    • 補充コスト(k$)を告知します。
    • カウントダウン開始前に残高を確認します。
    • 5秒待機します。
    • 5, 4, 3, 2, 1 とカウントダウンします。
    • まだ枯渇していて、まだ充電しようとしているかを再確認します。
    • 残高を消費して補充します。
    • 補充後の残高を告知します。
  • 補充後クールダウン:
    • 補充で枯渇解除されてもクールダウンは維持します。
    • クールダウン中に枯渇+充電試行が発生した場合、クールダウン通知を1回だけ強制チャットします。

設定

BepInEx の config にあります。

  • EnableMod (初期値: true)
    • MODの有効無効
  • CostPerRefill (初期値: 20, 範囲: 0~100)
    • 1回の補充コスト(k$)
  • EnergyCrystalsToAdd (初期値: 5, 範囲: 1~10)
    • 1回の補充量(パワークリスタル量)
  • CooldownSeconds (初期値: 10, 範囲: 1~300)
    • 補充後クールダウン秒

挙動メモ

  • パワークリスタルが枯渇していない場合は一切動作しません。
  • 残高不足の場合は不足を告知し、残高増加後に一度抜いて再投入するまで処理を開始しません。
  • 待機/カウントダウン中にアイテムが抜かれたり枯渇条件が解消された場合は無言でキャンセルします。