InfiniteItemBatteryMod
All battery-powered items (including drones) never run out. Toggle on/off via in-game UI or hotkey (default F6). Host-side — only host needs this mod.
模組介紹 作者原文
InfiniteItemBatteryMod
📖 About
InfiniteItemBatteryMod is a R.E.P.O. mod that prevents all battery-powered items from running out of battery. Affects every item using the ItemBattery component — guns, drones, flashlights, and anything else with a battery bar.
✨ Features
- Enable/Disable toggle: turn the mod on or off via in-game UI or hotkey
- Hotkey: press the configured key (default F6) to toggle on/off in real-time
- HUD overlay: shows ♾ Infinite Battery: ON or ⬜ Infinite Battery: OFF on screen for 2.5 seconds after toggling
- All items: affects every item with ItemBattery, including drones with time-based battery drain
- Battery stays at 100%: battery never decreases, always shows full bars
- Three-layer protection: blocks RemoveFullBar, autoDrain, and Drain
- Drone support: explicitly supports ItemDrone to prevent NoBattery state
- Host-side: only the host needs this mod — battery state syncs to all clients via Photon RPC
⚙️ How It Works
Patches multiple methods:
ItemBattery:
- RemoveFullBar() — called when a gun fires or an item uses a full bar; blocked entirely
- Update() — auto-drain logic runs here; battery is forced to 100% if it drops below
- Drain() — continuous drain calls are blocked
ItemDrone:
- StateSearching() — ensures battery stays at 100% while searching for targets
- StateBeamDeployed() — ensures battery stays at 100% while beam is active
- StateAttached() — ensures battery stays at 100% while attached to objects
🔧 Configuration
[General]
Enable or disable infinite battery for all items.
false = vanilla behavior.
Default: true
Enabled = true
Hotkey to toggle the mod on/off in-game.
Enter a Unity KeyCode name: F5, F6, F7, Insert, Home, Keypad0, etc.
Default: F6
ToggleKey = F6
🎮 Hotkey Usage
Press F6 (or your configured key) while in-game to toggle infinite battery on/off.
A message will appear on screen showing the current state.
📦 Installation
- Install BepInExPack REPO
- Place InfiniteItemBatteryMod.dll in BepInEx/plugins/
- Launch the game
📜 Changelog
v1.1.0
- Drone support: Now explicitly supports ItemDrone (drones with time-based battery drain)
- Battery stays at 100%: Battery never decreases, always shows full bars
- Enhanced battery protection with patches for drone state machines
- Uses Harmony Traverse to access private fields safely
v1.0.0
- Initial release
- Infinite battery for all items
- Enable/disable toggle via in-game UI (REPOConfig)
- Configurable hotkey (default F6)
- HUD overlay with fade-out showing ON/OFF state
📄 Dependencies
- BepInExPack_REPO >= 5.4.23
🧩 Compatibility
Patches ItemBattery and ItemDrone only. Does not modify EnemyDirector, LevelGenerator, or any other system.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: