REPOUpgradeAPI

v1.1.0·Updated 2026-05-11

Small-scale API for manipulating player upgrade stats.

About this mod Author’s original text

🇺🇸 REPOUpgradeAPI – Player Upgrade Sync API (Dependency Mod)

This API was originally created for my personal mod projects,

but separating it as a standalone module made development easier,

so I decided to publish it in case others find it useful.

If you need to reach me, I'm available in the R.E.P.O Modding Server on Discord:

REPOUpgradeAPI is a lightweight framework that provides a clean and safe way to synchronize player upgrades across host and clients.

It handles RPC dispatching, synchronization logic, and UI refresh internally,

so mods can focus only on calling simple API methods.

🔧 Basic Usage

using REPOUpgradeAPI;

public class ExampleMod: BaseUnityPlugin

{

void Start()

{

// Increase Jump upgrade by +1

UpgradeAPI.Add(UpgradeType.Jump, 1);

// Set Sprint upgrade to level 3

UpgradeAPI.Set(UpgradeType.Sprint, 3);

}

}

Only UpgradeAPI.Add() and UpgradeAPI.Set() are needed.

All networking, syncing, and local UI updates are handled internally.

📂 API Summary

● Add

UpgradeAPI.Add(UpgradeType type, int delta);

UpgradeAPI.Add(string typeName, int delta);

  • UpgradeType … vanilla-like safe enum (Energy, Health, Jump, …)
  • string typeName … Stat dictionary name or internal key

● Set

UpgradeAPI.Set(UpgradeType type, int level);

UpgradeAPI.Set(string typeName, int level);

🧩 Type Name / Dictionary Name Support

Besides the enum, REPOUpgradeAPI also supports direct dictionary names from StatsManager:

// Directly touch the underlying StatsManager dictionary:

UpgradeAPI.Add("playerUpgradeHealth", 1);

UpgradeAPI.Add("playerUpgradeStaminaRegen", 1);

UpgradeAPI.Add("playerUpgradeUnstableCore", 1);

Internally, the API:

  • First tries to treat the string as a full dictionary name

(StatsManager.dictionaryOfDictionaries[typeName])

  • Then falls back to legacy short keys (e.g. "energy", "jump")
  • Finally, it tries to dynamically map to playerUpgrade* dictionaries

This makes the API compatible with:

  • Vanilla upgrades
  • New upgrades added by game updates
  • Custom upgrades added by other mods (as long as they expose a dictionary)

🧪 Debug / Introspection Helpers

For debugging or exploring new keys, the API can dump upgrade dictionaries:

// Log all playerUpgrade* dictionaries in StatsManager

UpgradeAPI.LogAllUpgradeDictionaries();

// Enumerate dictionary names (e.g. "playerUpgradeHealth", "playerUpgradeUnstableCore",...)

foreach (var key in UpgradeAPI.ListUpgradeKeys())

Logger.LogInfo($"Key: {key}");

These names can then be passed directly into UpgradeAPI.Add/Set.

⚙ Internal Features

  • UpgradeNet handles RPC and dispatch
  • UpgradeManager applies local and networked changes
  • RPC registration is done automatically via Harmony (dependency mod)
  • Works in both singleplayer (local-only) and multiplayer (via RPC)
  • Internal architecture is hidden from mod developers – you only call UpgradeAPI

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
REPOUpgradeAPI-1.1.0.zip
File size
119.9 KiB