You are viewing a potentially older version of this package. View all versions.
The_Land_of_Death-CartTrain-1.3.1 icon

CartTrain

Host-only cart trains with vanilla-client support. Snap large carts into a physically tethered train without requiring other players to install the mod.

Date uploaded 3 days ago
Version 1.3.1
Download link The_Land_of_Death-CartTrain-1.3.1.zip
Downloads 1108
Dependency string The_Land_of_Death-CartTrain-1.3.1

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

CartTrain

CartTrain is a host-only R.E.P.O. mod that connects large carts into a single-file train. Only the lobby host installs it; vanilla players can join normally and see the carts move through the game's existing cart synchronization.

How to use

Push the front of one large cart into the handle end of another. When the leading cart's handle and the following cart's front are nearly touching and the carts face roughly the same direction, they snap together automatically. A physical spring tether runs from the leading cart's real handle point to the following cart's front and maintains a one-metre gap, while virtual track guidance keeps the follower centered and aligned on the route taken by its leader.

Each active joint has a solid light-red tether visual. It follows the real handle-to-front anchors, hangs with a small natural sag, and disappears when the carts detach. The visual does not change the underlying cart physics.

Each handle can connect to one following cart, and each front can connect to one leading cart. A three-cart train is therefore Cart 1 handle to Cart 2 front, followed by Cart 2 handle to Cart 3 front.

While actively grabbing a large cart, the host can press X to isolate that cart. Its connection to the cart ahead and its connection to the cart behind are both removed. The host's CartTrain HUD appears above the inventory slots for five seconds whenever the host begins grabbing a cart.

The host can also release a cart by pulling it away from the train. Vanilla players do not have CartTrain input code, so grabbing a connected follower for the configured short delay releases its incoming tether automatically. This prevents the host's train physics from fighting a vanilla player's grab.

If a connected cart leaves the ground and begins falling, the host automatically removes both of that cart's links. A short delay and downward-speed threshold prevent ordinary ramps, slopes, and small bumps from breaking the train.

Configuration

After launching the game once with the mod installed, edit:

BepInEx/config/GrimDinosaurs.CartTrain.cfg

  • AutomaticSnapDistance: how close the front/back connection points must be before snapping; defaults to 0.45 metres.
  • ConnectedGap: spacing between connected cart bodies; defaults to 1 metre.
  • MaximumSnapAngle: prevents sideways or backwards carts from linking accidentally.
  • MaximumFollowSpeed: maximum follower movement speed.
  • MaximumTurnSpeed: maximum follower turn speed.
  • TetherSpring and TetherDamper: physical front-to-back tether tuning.
  • PathStrength, PathDamping, and RotationStrength: virtual track guidance tuning.
  • DetachKey: key used to detach both sides of the cart you are grabbing; defaults to X.
  • ConnectedCartCollisions: allows directly connected carts to collide; defaults to true.
  • PullDisconnectStretch: extra stretch that triggers pull-to-release; defaults to 0.3 metres beyond the normal tether length.
  • VanillaGrabDisconnectDelay: delay before a follower grabbed by a vanilla player releases from its leader; defaults to 0.6 seconds.
  • DisconnectWhenFalling: enables automatic fall safety; defaults to true.
  • FallDisconnectDelay: unsupported falling time before disconnection; defaults to 0.25 seconds.
  • FallSpeedThreshold: required downward speed; defaults to 1.5 metres per second.

Host-only multiplayer

Only the lobby host should install CartTrain. Version 1.3.0 does not send any custom CartTrain Photon RPCs, so vanilla clients do not need the mod and do not receive missing-RPC errors. The host owns all connection state and follower physics; R.E.P.O.'s existing cart networking synchronizes cart movement to the other players.

Vanilla players see and interact with the carts, but they do not see the light-red tether or CartTrain HUD and cannot use the X keybind. Those custom visuals and controls exist only on the host's game.

Installation

Install on the lobby host with a Thunderstore-compatible mod manager, or place CartTrain.dll in the host's:

R.E.P.O/BepInEx/plugins/GrimDinosaurs-CartTrain/

Current status

Version 1.3.1 automatically isolates a genuinely falling cart so it cannot pull the rest of the train over an edge. Version 1.3.0 introduced host-only compatibility. Link state, HUD, tether visuals, and custom controls remain local to the host; vanilla clients receive only normal game cart movement.

Changelog

1.3.1

  • Automatically disconnects a falling cart from both sides.
  • Requires no ground support, sufficient downward speed, and a short continuous fall delay.
  • Added configurable fall detection thresholds to avoid false releases on ramps and bumps.

1.3.0

  • Converted CartTrain to host-only operation with vanilla-client support.
  • Removed every custom CartTrain RPC and remote snapshot broadcast.
  • Kept link state, physics, HUD, tether visuals, and controls local to the host.
  • Added automatic release after a vanilla player grabs a connected follower for a short configurable delay.
  • Made the mod inactive on non-host players if they install it unnecessarily.

1.2.8

  • Fixed rear carts failing to pull-release because the spring prevented enough measured stretch.
  • Detects a short sustained pull away using the local grabber's applied force and relative cart velocity.
  • Allows the host to honor the deliberate pull request without rechecking the unreachable stretch threshold.

1.2.7

  • Added automatic pull-to-release for grabbed carts.
  • Breaks the incoming tether after 0.3 metres of extra stretch by default.
  • Synchronizes pull-release requests through the multiplayer host.
  • Keeps X as the control for isolating the held cart on both sides.

1.2.6

  • Added mass-aware critical damping to physical tethers so they do not store and release excessive bounce energy.
  • Cancels inward tether velocity when a manually pulled follower is released.
  • Temporarily limits route correction and turning acceleration after release for a smooth return to formation.

1.2.5

  • Enabled collision between directly connected carts by default.
  • Enabled continuous dynamic collision detection to prevent fast-moving carts from tunneling through each other.
  • Increased Rigidbody position and velocity solver iterations.
  • Increased safe depenetration speed so overlapping carts separate instead of remaining wedged.

1.2.4

  • Added a solid light-red tether visual between every connected cart pair.
  • The visual follows the real handle-to-front anchors with a small natural sag.
  • Kept the visual static and understated, without the previous glow or energy pulse.

1.2.3

  • Anchored the leading side of every joint to the cart's real handlePoint transform.
  • Anchored the other side to the following cart's physical front.
  • Matched recorded-path spacing to the actual handle-to-front geometry.

1.2.2

  • Limited the held-cart HUD to five seconds after grabbing begins.
  • Moved the HUD above the inventory-slot buttons.

1.2.1

  • Added a configurable held-cart detach key, defaulting to X.
  • Detaching isolates the grabbed cart by removing both its front and rear links.
  • Added a HUD showing connection state, train position, and detach instructions.
  • Synchronized detach requests through the multiplayer host.

1.2.0

  • Added a physical SpringJoint tether between each leader's rear and follower's front.
  • Enforced the configured one-metre connector gap.
  • Replaced loose velocity chasing with force-based virtual track guidance.
  • Added lateral correction and recorded-route rotation alignment.
  • Added initial alignment validation to prevent incorrect side connections.
  • Added a v1.1.3 source checkpoint and one-command restore script.

1.1.3

  • Moved cart discovery to a PhysGrabCart.FixedUpdate postfix.
  • Switched authority checks to SemiFunc.IsMasterClientOrSingleplayer().
  • Switched follower motion from forced Rigidbody poses to velocity and angular velocity control.
  • Pauses follower control while a player directly pulls that follower.

1.1.2

  • Fixed large carts not entering the connection registry in single-player when Photon assigns a zero network View ID.
  • Added cart-tracking log messages for easier diagnosis.

1.1.1

  • Removed the synthetic rear button and key interaction.
  • Corrected the cart model's physical front/back orientation.
  • Added automatic front-to-back snapping on contact.
  • Set the connected cart gap to one metre.

1.1.0

  • Added visible rear connection buttons.
  • Added configurable X interaction.
  • Added two-metre connector search and validation.
  • Added directed cart chains with cycle prevention.
  • Added recorded-path following for corners and slopes.
  • Added host-authoritative multiplayer link synchronization.

CHANGELOG

Changelog

1.3.1

  • Added automatic two-sided disconnection when a connected cart is genuinely falling.
  • Added ground-support, downward-speed, and fall-duration checks.
  • Added configurable fall-safety settings.

1.3.0

  • Converted CartTrain to host-only operation so vanilla players can join without installing it.
  • Removed custom CartTrain Photon RPCs and link-state broadcasts.
  • Link physics and custom visuals now exist only on the host.
  • Added delayed automatic release when a vanilla player grabs a connected follower.

1.2.8

  • Fixed pull-to-release when the tether spring prevents the configured distance from being reached.
  • Added grab-force direction and relative-velocity detection for reliable release intent.

1.2.7

  • Added pull-to-release so stretching a grabbed cart disconnects it instead of slinging it forward.
  • Added configurable PullDisconnectStretch, defaulting to 0.3 metres.
  • Added host-authoritative multiplayer synchronization for pull releases.

1.2.6

  • Prevented pulled rear carts from slinging forward when released.
  • Added mass-aware critical tether damping.
  • Added a short smooth-settling period after releasing a pulled follower.

1.2.5

  • Enabled collision between connected carts.
  • Added continuous collision detection to reduce tunneling.
  • Increased solver and depenetration quality to reduce carts becoming stuck together.

1.2.4

  • Added a solid light-red tether visual between connected carts.
  • Tether visuals follow the physical anchors and include a small natural sag.

1.2.3

  • Connections now run from each leading cart's real handle point to the following cart's front.
  • Updated route spacing to account for the actual handle reach.

1.2.2

  • The held-cart HUD now disappears five seconds after grabbing begins.
  • Moved the CartTrain HUD above the inventory-slot buttons.

1.2.1

  • Added configurable X detaching while actively grabbing a large cart.
  • Detaching removes both the held cart's incoming and outgoing links.
  • Added a held-cart HUD with connection status and train position.
  • Added host-authoritative multiplayer detach synchronization.

1.2.0

  • Added physical one-metre front-to-back tethers.
  • Added force-based virtual track constraints and route rotation alignment.
  • Prevented badly aligned carts from snapping.
  • Added a restorable v1.1.3 checkpoint.

1.1.3

  • Adopted SelfMovingCart's proven PhysGrabCart.FixedUpdate attachment pattern.
  • Adopted the game's master-client-or-single-player authority helper.
  • Improved follower physics with Rigidbody velocity control.

1.1.2

  • Fixed automatic snapping in single-player sessions where carts have no network View ID.
  • Added cart-tracking diagnostics.

1.1.1

  • Removed the synthetic rear button and key interaction.
  • Corrected physical front/back detection.
  • Added automatic front-to-back snapping.
  • Added configurable one-metre spacing.

1.1.0

  • First playable CartTrain implementation.
  • Rear-button connection controls and configuration.
  • Recorded-path follower movement.
  • Multiplayer connection synchronization.