

A library mod for Roadside Research that lets other mods add purchasable upgrade trees to the game's skill webs. Upgrades appear as clickable nodes alongside vanilla skills, cost either money or research points, and persist across sessions automatically.
Install this mod if another mod requires it. UpgradeLib does nothing on its own — it provides the framework that other mods use to add upgrade trees.
Save data is stored per save slot in BepInEx/config/UpgradeLib/.
UpgradeLib.dll in your .csproj[BepInDependency("com.upgradelib.roadsideresearch")] to your plugin classLoad() methodusing BepInEx;
using BepInEx.Unity.IL2CPP;
using UpgradeLib;
[BepInPlugin("com.example.roadsideresearch", "ExampleUpgrade", "1.0.0")]
[BepInDependency("com.upgradelib.roadsideresearch")]
public class Plugin : BasePlugin
{
public override void Load()
{
var tier2 = new UpgradeDefinition
{
Id = "speed_2",
Name = "Speed II",
Description = "Max speed bonus: 20%.",
CostType = CostType.Money,
Cost = 1000f
};
var root = new UpgradeDefinition
{
Id = "speed_1",
Name = "Speed I",
Description = "Max speed bonus: 10%.",
CostType = CostType.Money,
Cost = 500f,
Title = "Speed Upgrades",
Children = { tier2 }
};
UpgradeAPI.RegisterTree(root);
}
}
| Method | Description |
|---|---|
UpgradeAPI.RegisterTree(root) |
Register a new upgrade tree |
UpgradeAPI.RegisterInTree(title, node) |
Add a node to an existing tree |
UpgradeAPI.IsPurchased(id) |
Check if an upgrade is owned |
UpgradeAPI.CanPurchase(id) |
Check if an upgrade is available to buy |
UpgradeAPI.GetAllNodes() |
Get all registered nodes |