You are viewing a potentially older version of this package. View all versions.
Baka_Gaijin-CartWeightFix-1.0.1 icon

CartWeightFix

Restores vanilla weight-based drag to player-pulled carts. Fixes OdinHorse side effect where all carts ignore item weight.

Date uploaded 2 weeks ago
Version 1.0.1
Download link Baka_Gaijin-CartWeightFix-1.0.1.zip
Downloads 79
Dependency string Baka_Gaijin-CartWeightFix-1.0.1

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2200 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2200
ValheimModding-Jotunn-2.29.0 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.29.0

README

CartWeightFix

Restores vanilla weight-based drag to player-pulled carts.

The Problem

OdinHorse replaces Vagon.FixedUpdate with a Harmony Prefix (returns false) to support horse-drawn cart attachment. A side effect is that UpdateMass() — the method that sets cart Rigidbody mass from container item weight — never runs. This means all carts (vanilla and horse-drawn) ignore item weight entirely. A cart loaded with 1200 weight moves as if empty.

The Fix

CartWeightFix adds a Harmony Postfix to Vagon.FixedUpdate that re-invokes UpdateMass() for player-pulled and idle carts. Horse-pulled carts are detected (via Tameable component on the connected Rigidbody) and left alone so OdinHorse's physics still govern them.

  • Player-pulled cart: weight-based drag restored (vanilla behavior)
  • Horse-pulled cart: unchanged (OdinHorse governs speed)
  • Idle cart: correct mass for physics interactions

Compatibility

  • Requires BepInEx (included in BepInExPack Valheim)
  • Soft-dependency on OdinHorse — works with or without it. Without OdinHorse the vanilla FixedUpdate runs normally and this plugin is a harmless no-op.
  • Server-side install optional. Cart physics are client-authoritative in Valheim.

Installation

Drop CartWeightFix.dll into BepInEx/plugins/ or install via Thunderstore Mod Manager.

CHANGELOG

Changelog

1.1.0

  • Server-enforced via Jötunn NetworkCompatibility (EveryoneMustHaveMod, Minor strictness): every connecting client must have a matching major.minor version of the mod installed or it is rejected at the connection handshake. This guarantees the cart-weight rule applies to everyone on the server.
  • Adds Jötunn as a dependency.

1.0.1

  • New mod icon.

1.0.0

  • Initial release
  • Restores vanilla UpdateMass() call for player-pulled and idle carts
  • Detects horse-pulled carts via Tameable component and skips them
  • Soft-dependency on OdinHorse (works with or without)