You are viewing a potentially older version of this package. View all versions.
headclef-CharacterStats-1.2.0 icon

CharacterStats

A read-only library that caches player character stats for other mods to use in R.E.P.O.

Date uploaded 13 hours ago
Version 1.2.0
Download link headclef-CharacterStats-1.2.0.zip
Downloads 562
Dependency string headclef-CharacterStats-1.2.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

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

Preferred version: 5.4.2100

README

Character Stats

A lightweight BepInEx library mod for R.E.P.O. that reads and caches all player character stats. Designed as a shared dependency for other mods that need access to upgrade levels.

What This Mod Does

  • Reads all 13 character upgrade stats from the game's StatsManager
  • Caches them in a simple, accessible API for other mods to consume
  • Refreshes automatically after level generation, periodically during a level, and on network sync
  • Does NOT modify any stats — this is a read-only information provider

This mod does nothing on its own. It exists so that other mods (like Increase Tumble Damage) can reliably access player stat data without conflicting with each other.

Public API

Other mods can reference Character Stats.dll and call these static methods:

using static Character_Stats.Character_Stats;

// Get a specific upgrade level for a player (returns 0 if unknown)
int launchLevel = GetUpgradeLevel(steamId, "Launch");

// Get all upgrades for a player (returns a copy; empty dict if unknown)
Dictionary<string, int> upgrades = GetAllUpgrades(steamId);

// Check if stats have been read at least once this level
if (AreStatsReady) { ... }

// Get all tracked player Steam IDs
foreach (var id in GetTrackedPlayers()) { ... }

// Get local player's Steam ID (null if unavailable)
string? myId = GetLocalSteamId();

Available Upgrade Keys

Health, Speed, Map Player Count, Stamina, Extra Jump, Range, Strength, Throw, Launch, Crouch Rest, Tumble Wings, Tumble Climb, Death Head Battery

Timing

Stats are read at these points:

  1. 1 second after level generation completes — gives all mods (leveling, upgrade sharing, etc.) time to apply their upgrades
  2. Every 1 second while in a level — re-reads continuously so values applied after level start (e.g. by Improve) are always reflected, instead of latching a stale snapshot
  3. After ReceiveSyncData — re-reads when network sync overwrites data (e.g., when another mod shares upgrades)
  4. On progress reset — clears cached stats

Values are read directly from the game's live StatsManager dictionaries, so they always match what the game (and stat-applying mods like Improve) actually use.

Requirements

Installation

Character Stats is usually installed automatically as a dependency when you install a mod that needs it (via Thunderstore). To install it manually:

  1. Download the latest release.
  2. Place Character Stats.dll into your BepInEx/plugins folder.
  3. Launch R.E.P.O. — the mod will load and begin reading stats automatically.

For Mod Developers

To use Character Stats as a dependency in your mod:

  1. Reference Character Stats.dll in your .csproj (compile-only, not bundled):
<Reference Include="Character Stats">
  <HintPath>path\to\Character Stats.dll</HintPath>
  <Private>false</Private>
</Reference>
  1. Add the BepInEx dependency attribute:
[BepInDependency("headclef.CharacterStats", BepInDependency.DependencyFlags.HardDependency)]
  1. Add the Thunderstore dependency in your manifest.json:
"dependencies": ["headclef-CharacterStats-1.1.0"]

Project Structure

├── Character Stats.cs              # Plugin entry point & public API
├── Patches/
│   └── StatReaderPatch.cs          # Harmony hooks for reading stats
└── README.md

Building

This project is the base library the other mods compile against. It has no dependencies of its own, but building the whole solution keeps every dependent mod in sync:

dotnet build ../Repo.slnx

License

This project is licensed under the MIT License — see the LICENSE file for details.