You are viewing a potentially older version of this package. View all versions.
Vippy-CartFix-1.0.5 icon

CartFix

Loaded carts no longer feel heavy or slow to turn on R.E.P.O. v0.4. Cart mass scales with payload so items stop draining momentum, and in-cart items stay put through slow turns. Host-only; install on the host, all players benefit.

Date uploaded 2 days ago
Version 1.0.5
Download link Vippy-CartFix-1.0.5.zip
Downloads 2644
Dependency string Vippy-CartFix-1.0.5

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

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

Preferred version: 5.4.2305

README

CartFix

Fixes loaded carts in R.E.P.O. feeling heavy, sluggish, and slow to push and turn.

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 Thunderstore, so come hang out. Thanks for sticking around.

Built against the current R.E.P.O. release (v0.4.4.3). 1.0.2 and older will not load on v0.4.

Control clip: empty cart, CartFix toggling mid-way. No visible difference; the mod doesn't touch empty-cart behavior.

Why a loaded cart stalls

An empty cart turns at roughly 4 rad/s. Load it up with 70 valuables and that drops to around 0.4 rad/s. A 10x hit from payload alone. The cart barely corners, feels heavy to push, and takes forever to get back up to speed.

The cause is a mass mismatch. PhysGrabCart.rb.mass sits around 8 kg, and the game overrides it down to 4 kg while someone is actively pushing. 70 small valuables at 0.5 kg each is 35 kg sitting inside a 4 kg cart. Every physics tick, Unity's contact solver hands the payload most of the impulse share, and the items physically resist the velocity CartSteer is trying to write.

Whether this was a deliberate weight mechanic or an oversight isn't clear. Vanilla already halves cart mass during steering, which suggests the cart is supposed to feel light and responsive. The payload drag just wasn't accounted for.

Comparisons

Each clip is a single take with CartFix toggling in the middle. Same cart, same input on both sides of the toggle. Two speeds per scenario; the faster the input, the more obvious the difference becomes.

Back and forth push

Slow Fast

Push, stop, reverse. In vanilla every direction change nearly parks the cart because the payload drags momentum out of each reversal. With CartFix the cart carries the momentum the input is asking for. The gap between input and response widens under load, and the harder you push the more obvious it gets.

Grab and spin

Slow Fast

Rotation while grabbed. Watch the items in the tray. In vanilla the cart rotates around them and they end up against the walls. With CartFix they come along with the rotation.

Basic maneuver

Slow Fast

Normal corridor pushing. Corners tighten, acceleration comes back, and items stay where you put them.

How CartFix fixes it

Two small Harmony patches, each scoped to one specific cart situation.

Mass during an active push. When CartMassOverride fires during a grab, CartFix sums the masses of items currently in the cart's tray and adds twice that (the Load mass factor, see below) to the override. Empty carts still get the vanilla 4. A loaded cart ends up heavier than its own payload, which is what keeps cart momentum from being drained into items on every contact. Steering input itself is untouched; CartSteer writes velocity directly, independent of mass. The same scaling lands on a parked small cart, where vanilla already holds it at 8 so it sits still.

If CartMassOverride ever shows up with something other than vanilla's flat 4 or 8, because semiwork made steering load-aware or another mod changed the number first, CartFix leaves that value alone and prints one warning in the BepInEx log instead of stacking on top.

In-cart adhesion below 1 m/s. Vanilla already lerps in-cart items toward cart velocity once the cart is moving faster than 1 m/s. CartFix adds a softer pull below that threshold so items don't drift into cart walls during slow turns or accel-from-rest. Thrown items keep their momentum. A relative-velocity gate skips items still in flight, and any tick where vanilla already moved the item is skipped outright, so the two pulls never stack.

Nothing else is modified. Weak-grab lifts, door collisions while coasting, empty-cart physics: unchanged.

Host-side only. The underlying game methods only run on the host in multiplayer, so mod effects automatically sync to all players via the existing cart replication. Install on the host, everyone in the lobby benefits.

Install

Host only. Install through Gale or r2modman, or drop CartFix.dll into BepInEx/plugins/. Nobody else in the lobby needs it.

Config

One entry, in BepInEx/config/Vippy.CartFix.cfg (REPOConfig shows it in-game too).

Setting Default Range What it does
Load mass factor 2 0 to 5 Extra cart mass per unit of payload mass while steering. 2 keeps the cart at least twice as heavy as its cargo. 0 is vanilla.

Compatibility

Pairs well with CartSpeedSync. CartSpeedSync raises the scripted cart speed cap, CartFix makes a loaded cart actually reach it.

Harmony targets: PhysGrabCart.CartMassOverride (prefix), PhysGrabObjectImpactDetector.FixedUpdate (prefix + postfix). Should coexist with any mod that doesn't patch those two methods. A mod that hands CartMassOverride its own number makes CartFix stand down for that call (one warning in the log).

Come hang out

I'm Vippy. I make R.E.P.O. mods and I read every bug report.

Vippy's Discord Test builds land here before Thunderstore, you get a say in what comes next, and it's the fastest way to get a bug fixed. Come say hi.
GitHub Issues Bug reports and ideas that deserve a paper trail.
R.E.P.O. Modding Server The whole modding scene, not just me.
More of my mods Everything else I've made for R.E.P.O.

Keep the mods coming

Everything I make is free and stays free. Two ways to help if you feel like it, neither one expected:

  • Ko-fi: buy me a coffee and your name goes on the supporters list in my Discord. Every coffee buys another evening on the next update.
  • BisectHosting: hosting a server for Minecraft or anything else your crew plays? Code vippy takes 25% off, and I get a cut at no cost to you. It's where my own servers live.

25% off BisectHosting servers with code vippy

CHANGELOG

Changelog

1.0.5

  • Stand-down guards. If CartMassOverride arrives with anything but vanilla's flat 4 / 8 (a game-side fix, or another mod's prefix), the value passes through untouched and the log says so once. The in-cart pull now skips any tick where vanilla already moved the item, so the two lerps can't stack even if semiwork lowers their 1 m/s threshold.
  • Dropped a redundant GetComponent<PhysGrabCart> per in-cart item per physics tick; currentCart already is one.
  • Cart math lives in Services/CartPhysics.cs with an xunit project (CartFix.Tests) covering it. Debug-only HUD and spawner moved to Dev/DevTools.cs; nothing in the shipped DLL changed there.
  • Plugin version comes from the csproj now and the build writes BuildZip/CartFix.zip with manifest.json synced.
  • README: documents the Load mass factor config (it said "No config" since 1.0.4), install notes, contact links.

1.0.4

  • The load mass factor is a config slider now (0 to 5, default 2, 0 is vanilla). The hardcoded constant worked, but a game rebalance would have needed a rebuild to retune around.

1.0.3

  • Updated: Rebuilt for R.E.P.O. v0.4. The patched methods (PhysGrabCart.CartMassOverride, PhysGrabObjectImpactDetector.FixedUpdate) and every cart field the mod reads are unchanged in v0.4, so a recompile is sufficient and behavior is identical to 1.0.2 on the new game build.

1.0.2

  • Mass scaling is now load-aware. CartMassOverride adds twice the summed mass of items currently in the cart's tray, so an empty cart stays at vanilla 4 and a loaded cart scales proportionally with its payload. Replaces the old flat 6x multiplier, which over-weighted empty carts and under-scaled very heavy loads.
  • Dropped the persistent rb.mass change at PhysGrabCart.Start. That was leaking the mass bonus into weak-grab lifts, door collisions while coasting, and every other cart interaction where no one was actively pushing. Scope is now strictly "during an active push."
  • In-cart adhesion now only kicks in below vanilla's 1 m/s threshold (vanilla handles everything above), and skips items moving fast relative to the cart. Fixes thrown valuables snapping in mid-air over the cart and dropping straight down without their throw momentum.

1.0.1

  • Docs: added before/after comparison GIFs to README (control, back-and-forth, grab-and-spin, basic maneuver). No functional changes.

1.0.0

  • HeavyMass: scales cart Rigidbody mass and CartMassOverride calls. Loaded turn rate returns to roughly empty-cart feel.
  • LerpBoost: items sync to cart velocity every physics tick, including angular contribution. No more drift into cart walls on turns.