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.
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.
By Meone101201
| Date uploaded | 5 months ago |
| Version | 1.1.0 |
| Download link | Meone101201-InfiniteItemBatteryMod-1.1.0.zip |
| Downloads | 25690 |
| Dependency string | Meone101201-InfiniteItemBatteryMod-1.1.0 |
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.2305README
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: ONor⬜ Infinite Battery: OFFon 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, andDrain - Drone support: explicitly supports
ItemDroneto 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 entirelyUpdate()— auto-drain logic runs here; battery is forced to 100% if it drops belowDrain()— continuous drain calls are blocked
ItemDrone:
StateSearching()— ensures battery stays at 100% while searching for targetsStateBeamDeployed()— ensures battery stays at 100% while beam is activeStateAttached()— 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.dllinBepInEx/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.
CHANGELOG
Changelog
v1.1.0 (2026-06-01)
Added
- Drone support: Now explicitly supports ItemDrone (drones with time-based battery drain)
- Enhanced battery protection: Added patches for drone state machines to prevent NoBattery state
- Patches for
ItemDrone.StateSearching,ItemDrone.StateBeamDeployed, andItemDrone.StateAttached
Technical
- Uses Harmony Traverse to access private
itemBatteryfield in ItemDrone - Postfix patches on drone states ensure battery never depletes during operation
- Maintains backward compatibility with all existing battery-powered items
v1.0.0 (2026-05-29)
Added
- Initial release
- Enabled toggle: enable or disable via in-game REPOConfig UI (ON/OFF selector)
- Hotkey: configurable key (default F6) to toggle mod on/off in real-time
- HUD overlay: displays current state on screen for 2.5 seconds after toggling, with fade-out
- Green
♾ Infinite Battery: ON - Red
⬜ Infinite Battery: OFF
- Green
- RemoveFullBar block: prevents all battery bar removal on any item
- AutoDrain block: prevents continuous battery drain in Update loop
- Drain block: prevents Drain() calls from reducing battery
Technical
- Targets:
ItemBattery.RemoveFullBar(Prefix),ItemBattery.Update(Postfix),ItemBattery.Drain(Prefix) - Hotkey uses
stringconfig entry parsed toUnityEngine.KeyCodeat runtime - HUD rendered via
OnGUIwith shadow layer and alpha fade - Affects all items using
ItemBatterycomponent - Host-side: battery state syncs to all clients via Photon RPC