ScalerCore
Scaling library for shrink and grow mods in R.E.P.O. Handles physics, audio, NavMesh, animation, colliders, and sync. Enemies, players, valuables, items, carts, doors. Vehicles stay drivable and pocke
Screenshots 1 screenshots
About this mod Author’s original text
ScalerCore
A scaling library for R.E.P.O. modders. Handles the hard parts of scaling game objects -- physics, audio, animation, colliders, NavMesh, multiplayer sync -- so you don't have to.
A note from Vippy
After way too long of a break, I'm finally back and working on these again:D Every one of my mods just got a full pass: bugs fixed, reports read, a few things I'd always meant to do. New builds and fixes land in Vippy's Discord before they hit, so come hang out. Thanks for sticking around.
v1.0.0: the API is stable. Growth is a first-class direction now, not just shrinking: enemies, players, and props grow as well as shrink, with the audio, reach, mass, and physics that sells the size. Grown enemies cap their physical footprint so they still fit the level, voices pitch with an intelligibility floor, and grown players hold items at arm's length. The public surface (ScaleManager, ScaleOptions, IScaleHandler) is stable for the 1.x line.
If you're building a mod that changes the size of things (shrink rays, growth potions, whatever), ScalerCore gives you a clean API and takes care of the edge cases.
This is a library, not a standalone mod. End users don't need to interact with it directly. If you're a player, you probably got here because a mod like ShrinkerGun: COMPRESSOR depends on it.
For modders building size-changing mechanics. If you're looking for a shrink ray, check out ShrinkerGun: COMPRESSOR which is built on ScalerCore.
Installation
Reference the API at compile time via NuGet (runtime stays, so exclude it from your output to avoid double-loading the DLL):
Then declare the runtime dependency: add Vippy-ScalerCore- to your manifest.json, and a hard dependency in your plugin:
[BepInDependency("Vippy.ScalerCore", BepInDependency.DependencyFlags.HardDependency)]
(Prefer a direct DLL reference? You can still ` ScalerCore.dll with Private="false"`. The NuGet package just adds the typed API and IntelliSense.)
ScalerCore automatically attaches ScaleController components to all enemies, players, valuables, items, carts, vehicles, cosmetic boxes, dead Semibot heads, the shop radio, and doors at runtime via Harmony patches. You don't need to add them yourself.
Quick Start
using ScalerCore;
// Shrink with default options (40% scale)
ScaleManager.Apply(targetGameObject);
// Shrink with custom options
var opts = ScaleOptions.Default;
opts.Factor = 0.5f;
opts.Duration = 60f;
ScaleManager.Apply(targetGameObject, opts);
// Restore with animation
ScaleManager.Restore(targetGameObject);
// Restore instantly (for bonk/damage reactions)
ScaleManager.RestoreImmediate(targetGameObject);
// Check state
bool tiny = ScaleManager.IsScaled(targetGameObject);
ScaleManager.Apply is host-authoritative. The host calls it, and RPCs propagate to all clients automatically. Late-joining players receive the current state on connect.
How It Works
ScalerCore attaches a ScaleController (a MonoBehaviourPunCallbacks) to every enemy, player, valuable, item, and door. On the first scale operation, the controller:
- Resolves a handler via ScaleHandlerRegistry based on what the object is
- Applies the target scale with a smooth animation (back-out easing for players, linear interpolation for objects)
- Adjusts physics (mass, grab force, collider radius), audio pitch, and NavMesh speed
- Syncs state to all clients via Photon RPCs
- Force-applies the target scale every LateUpdate to fight game code that resets localScale
Built-in handlers cover enemies, players, valuables, items, carts, and doors.
Custom Handlers
Implement IScaleHandler and register it with a predicate:
using ScalerCore;
using ScalerCore.Handlers;
public class MyBossHandler: IScaleHandler
{
public void Setup(ScaleController ctrl)
{
// Cache components, set ScaleTarget if the visual root
// is different from the physics root
}
public void OnScale(ScaleController ctrl)
{
// Called when the object is scaled down
}
publi
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- 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.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- 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.
Install these first, or the mod will not work: