

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: https://discord.gg/vPJtKhYAFe
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.
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.
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 keyUpgradeAPI.Set(UpgradeType type, int level);
UpgradeAPI.Set(string typeName, int level);
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:
StatsManager.dictionaryOfDictionaries[typeName])"energy", "jump")playerUpgrade* dictionariesThis makes the API compatible with:
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.
UpgradeNet handles RPC and dispatchUpgradeManager applies local and networked changesUpgradeAPI