You are viewing a potentially older version of this package. View all versions.
KimJongPoon-GeneratorMod-0.2.0 icon

GeneratorMod

Buyable shop upgrade that slowly recharges the truck's energy bar during levels.

Date uploaded a week ago
Version 0.2.0
Download link KimJongPoon-GeneratorMod-0.2.0.zip
Downloads 105
Dependency string KimJongPoon-GeneratorMod-0.2.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

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

Preferred version: 5.4.2305
Zehs-REPOLib-4.3.0 icon
Zehs-REPOLib

Library for adding content to R.E.P.O.

Preferred version: 4.3.0

README

GeneratorMod

Adds a Generator upgrade to the R.E.P.O. shop. Every level of the Generator slowly recharges the truck's energy bar while you're out on a level, so your gear doesn't depend only on the charging station's current stock.

Features

  • New shop upgrade, Generator, that can appear in the upgrade pool on any shop visit
  • Each Generator level adds a steady trickle of charge to the truck's energy bar
  • Only ticks during active levels (not in the lobby, shop, or menus)
  • Stacks with team purchases: levels owned by the players present all contribute
  • Fully configurable price, shop chance, purchase limit, and recharge rate

How it works

  1. Visit the shop. The Generator has a chance to show up in the upgrade pool (10% per visit by default).
  • Currently the item is set to look identical to the Stamina Upgrade item.
  1. Buy it. The default price is $25,000.
  2. During a level, the truck's energy bar fills by 3% per minute for each Generator level by default, up to a full bar.

Configuration

A config file is created the first time you launch the game with the mod installed, in BepInEx/config/. Edit it with a text editor (or r2modman's config editor) and restart the game for changes to apply.

Shop

Setting Default Description
BasePrice 25000 Price of the Generator upgrade in the shop.
ShopChancePercent 10 Chance (in percent) that the Generator is added to the upgrade pool for any one shop visit.
MaxPurchases 1 How many Generator levels the whole team can buy in total.
UseVanillaPriceScaling false If false, the price is always exactly BasePrice. If true, the game's normal upgrade price scaling applies on top.
TemplateItemName Item Upgrade Player Energy Name of the vanilla upgrade item whose box model is copied. Leave this alone unless you know why you're changing it.

Recharge

Setting Default Description
RatePercentPerMinute 3 Percent of a full truck energy bar restored per minute, per Generator level.
HostOnly false If true, only the host (or singleplayer) applies the recharge. Leave false unless clients double-count in multiplayer.
MaxCharge 100 Value that counts as a full bar. Vanilla is 100.

Debug

Setting Default Description
DebugLogging false Logs shop rolls and recharge activity to the BepInEx console. Useful for bug reports.

Requirements

Both install automatically if you use r2modman or the Thunderstore Mod Manager.

Installation

Install through r2modman or the Thunderstore Mod Manager and launch the game from the manager.

Manual install: place GeneratorMod.dll in BepInEx/plugins/GeneratorMod/ alongside REPOLib.

Multiplayer

The host's settings control the recharge. Upgrade levels are saved and synced through REPOLib.

Bug reports

Please include your BepInEx/LogOutput.log and turn on DebugLogging before reproducing the problem.

CHANGELOG

Changelog

0.3.0

Added

  • New custom box art. The Generator upgrade box no longer looks like the stamina upgrade. It now has its own purple design with a generator on the front, a spec sheet, a warning label, a battery gauge and barcodes on the sides, plus worn, distressed edges and fold lines
  • The box art ships as generator_box.png, which sits next to the mod's DLL

Changed

  • The shop box is now a separate retextured copy of the vanilla box, so the vanilla stamina upgrade box is never changed
  • If generator_box.png is missing, or the game changes the box texture, the mod logs a warning and keeps the vanilla look instead of failing

0.2.0

Initial Thunderstore release.

Added

  • Generator upgrade in the shop, registered through REPOLib so levels are saved and synced
  • Each Generator level slowly recharges the truck's energy bar during active levels
  • Configurable shop price, shop chance, purchase limit, and recharge rate
  • Optional debug logging

Changed

  • Recharge now runs as a patch on the charging station's own update loop and adds charge smoothly every frame. The game then derives the bar, segments, and network sync from that value.

Fixed

  • Charge added by the Generator no longer snaps back to its starting value, so the energy bar now actually rises during levels