Details

Last Updated
last month
First Uploaded
last month
Downloads
15K
Likes
2
Size
21KB
Dependency string
modx-GrabRecharge-2.0.0
Dependants

Categories

Player Grab Recharge

A BepInEx plugin for Unity-based games that allows players to recharge grabbed battery items manually using customizable mod power. Built with Harmony patching and Photon networking support.


Features

  • Manual Battery Recharge: Recharge grabbed batteries using a configurable key.
  • Toggle/Hold Mode: Use toggle or hold input to control recharging.
  • Mod Power System: Recharging consumes mod power and regenerates over time.
  • Visual UI: Optional in-game UI shows current mod power level and cooldowns.
  • Multiplayer Support: Proper PhotonView ownership handling in multiplayer environments.
  • Debug Logging: Toggleable detailed logs for troubleshooting.

Requirements

  • BepInEx 5.x
  • HarmonyLib
  • Photon Unity Networking (PUN2) enabled project
  • TMPro (TextMeshPro) used for in-game UI

Installation

  1. Install BepInEx in your game directory.
  2. Place the compiled PlayerGrabRecharge.dll into the BepInEx/plugins folder.
  3. Launch the game once to generate the configuration file.
  4. Customize settings in BepInEx/config/modx.playergrabrecharge.cfg.

Configuration Options

Setting Description Default
Recharge Key Key to activate recharge Z
Toggle Mode Recharge mode: true = toggle, false = hold false
Recharge Rate Battery charge per second (1-30) 10
Enable Debug Logging Enables verbose logs in console false
Show Charge Bar Show mod power UI on screen true

How It Works

  • When you grab a battery item, a mod power gauge is displayed (if enabled).

  • Hold or toggle the recharge key (Z by default) to charge the battery:

    • Recharge drains mod power.
    • Mod power regenerates over time when idle.
    • If mod power depletes, a cooldown starts before it begins to regen.

Debugging

Enable "Enable Debug Logging" in the config to log:

  • Ownership requests
  • Recharge start/stop triggers
  • Battery life and mod power changes
  • Cooldown and regeneration steps

Compatibility & Multiplayer

  • Fully compatible with Photon Multiplayer.
  • Master client (Host) can only rechrage items.
  • Automatically syncs recharge behavior across clients.

Credits

Developed by modx Powered by BepInEx, Harmony, and Photon PUN2

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.