RoundStartEnergyReset
Automatically refills the Charging Station energy crystals (used to charge weapons) and stamina at round start. 开局自动补满基地充电站能量晶体和体力。RoundStartEnergyReset - 开局自动回满能量
A simple client-side mod for R.E.P.O. that automatically refills the Charging Station energy crystals (used to charge weapons in the truck) and stamina to max at the start of each round/level.
一个适用于 R.E.P.O. 的客户端模组,在每局/关卡开始时自动将基地充电站的能量晶体(用于给武器充电的能量条)和体力补满。
Features / 功能
- ✅ Automatically refills Charging Station energy (ChargingStation.chargeTotal) and stamina when a new round starts
- ✅ Works in both singleplayer and multiplayer (affects only you)
- ✅ Lightweight - no configuration needed, just install and play
- ✅ Clean and minimal logging
- ✅ Client-side only, no host required
- ✅ 每局开始时自动将基地充电站能量(给武器充电的能量条)和体力补满
- ✅ 支持单人模式和多人模式
- ✅ 轻量级 - 无需配置,安装即玩
- ✅ 无控制台刷屏 - 日志简洁
Installation / 安装
Method 1: Mod Manager (Recommended)
- Install a mod manager like Gale or r2modman
- Search for "RoundStartEnergyReset" and install it
- Launch the game via the mod manager
Method 2: Manual
- Install BepInExPack for R.E.P.O.
- Run the game once to generate BepInEx folders
- Download the mod zip and extract
RoundStartEnergyReset.dllintoBepInEx/plugins/ - Launch the game
方法一:使用模组管理器(推荐)
- 安装 Gale 或 r2modman 模组管理器
- 搜索 "RoundStartEnergyReset" 并安装
- 通过模组管理器启动游戏
方法二:手动安装
- 安装 BepInExPack for R.E.P.O.
- 运行一次游戏以生成 BepInEx 文件夹
- 下载模组压缩包,将
RoundStartEnergyReset.dll解压到BepInEx/plugins/目录 - 启动游戏
How it works / 工作原理
This mod uses Harmony to patch GameDirector.SetStart() - the method called by the game when a new level/round initializes. At round start, it does two things:
- Sets
PlayerController.EnergyCurrenttoEnergyStart(refills stamina) - Sets
ChargingStation.chargeTotalto max (refills the Charging Station energy crystals in the truck/base, used to charge weapons)
Backup: It also patches PlayerController.Start() to ensure stamina is max when the player first spawns.
本模组使用 Harmony 补丁技术拦截 GameDirector.SetStart()(游戏在关卡/回合初始化时调用的方法)。在回合开始时:
- 将
PlayerController.EnergyCurrent设置为EnergyStart(补满体力) - 将
ChargingStation.chargeTotal补满至最大值(恢复基地充电站能量,用于给武器充电)
备用机制:同时补丁了 PlayerController.Start(),确保玩家首次生成时体力为满。
Source Code / 源码
https://github.com/your-username/RoundStartEnergyReset
Changelog / 更新日志
1.3.0
- Fixed: Charging station energy now properly refills to normal max (chargeTotal=100, chargeFloat=1.0) instead of an unrealistic 999999
- Found game's default maximum values by analyzing assembly IL: chargeTotal is clamped to [0, 100], chargeFloat=1.0 = full bar
- Also updates
chargeFloatandchargeSegmentCurrentso the charge bar display actually shows full - Added
ChargingStation.Start()prefix patch for initial max charge
1.2.0
- Changed: Now refills Charging Station energy crystals (
ChargingStation.chargeTotal) instead of base hand energy (SpectateCamera.headEnergy) - Direct compile-time access to fields via BepInEx publicizer
1.1.0
- Fixed: Now refills the base hand energy bar (headEnergy) instead of weapon battery
- Added automatic runtime field detection via reflection (tries PlayerController, PlayerAvatar, and more)
- Removed ItemBattery refill (user preference - only refills player's innate energy now)
1.0.0
- Initial release
- Stamina refill on round start via GameDirector.SetStart
- Fallback on PlayerController.Start
- ItemBattery weapon refill (removed in 1.1.0)
Credits / 致谢
- R.E.P.O. Modding Wiki - For modding documentation
- BepInEx - Mod loader framework
- Harmony - Runtime patching library
