Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
4 days ago
Downloads
1.5K
Size
186KB
ADDatHost Valheim hosting
€1

LoxWagon

Turn Haldor's merchant wagon into a functional lox-drawn expedition wagon.

LoxWagon makes the large merchant wagon buildable and usable as a proper Plains-era transport wagon. Hitch it to a tamed lox, ride the lox normally, and haul a large cargo inventory behind you on an articulated four-wheel chassis.

Alpha 0.7.7: Singleplayer stabilization build. Includes the placement-preview duplication fix, a default cargo mass scale of 0.30, and the supplied color release icon. The 0.7.5 snow session showed no snow-update exceptions. Duplicate prevention and hitch persistence still require save/reload testing. Multiplayer remains under test.

Features

  • Uses the vanilla Haldor merchant wagon design at runtime. No Iron Gate game assets are distributed with this mod.
  • Hitch to a tamed Lox and drive by riding the lox with its normal saddle.
  • 1,200 base maximum HP, with normal repair and damage behavior.
  • 32-slot cargo hold in an 8 x 4 inventory.
  • Four-wheel articulated chassis with approximately:
    • +/-32 degrees of front steering yaw
    • +/-18 degrees of front pitch articulation
    • rear chassis roll locked for stability
  • Visible cargo progression as occupied inventory slots increase.
  • Fully loaded stage at 31-32 occupied slots with a taut lox-hide cargo cover and tie-downs.
  • Two forward-facing passenger seats on the raised front bench and one backward-facing seat on the existing rear rim.
  • Widely spaced shafts that flare outward from the wagon mounts.
  • Four proportionally scaled lox hides, with varied orientations and natural overhang, over the full-load tarp.
  • Cargo weight contributes directly to chassis mass using the configured scale. Cargo scales 0.1, 0.2, 0.3 and 0.6 have been tested by the author; 0.3 is the selected default.
  • Uses normal Valheim durability, repair, destruction, storage, and network systems wherever practical.

Build recipe

Build the wagon with the Hammer. No crafting station is required.

  • 40 Fine Wood
  • 20 Core Wood
  • 80 Iron Nails
  • 4 Barrel Hoops
  • 12 Lox Pelts
  • 8 Linen Thread
  • 10 Tar
  • 4 Iron
  • 20 Leather Scraps

Materials are recovered through normal dismantling behavior.

Using the wagon

  1. Build the wagon with the Hammer.
  2. Bring a tamed lox to the front shafts.
  3. Aim anywhere along either shaft, or at the central hitch, and press Use to attach a nearby tamed lox.
  4. Mount the lox with its normal saddle and ride normally.
  5. Access the wagon inventory from the cargo interaction area.
  6. Passengers can use either front bench seat or the backward-facing rear seat.
  7. Interact with either shaft or the central hitch again to detach the lox.

The wagon is lox-drawn by default. Optional player pulling can be enabled in the configuration below.

Cargo visuals

Visible cargo is based on inventory occupancy, not individual item type. As more slots are occupied, additional fixed-size crates and barrels appear in the wagon bed. At 31-32 occupied slots, the full expedition load and lox-hide cover appear.

The visible cargo is cosmetic and does not add separate physics colliders. Actual cargo weight comes from the inventory mass system.

Requirements

  • Valheim 1.0.16
  • BepInExPack Valheim 5.4.2351
  • Jotunn 2.30.2

When installed through r2modman or Thunderstore Mod Manager, the required package dependencies are declared in manifest.json and should install automatically.

Configuration

The articulated four-wheel chassis is now standard behavior. No diagnostic toggle is required.

BepInEx/config/greypoint.loxwagon.cfg contains:

[Wagon]
AllowHumanPulling = false
BaseChassisMass = 65
CargoMassScale = 0.30
  • AllowHumanPulling: when enabled, the hitch uses player pulling instead of lox hitching. Off by default.
  • BaseChassisMass: empty wagon mass, distributed across the articulated assembly.
  • CargoMassScale: direct inventory-weight-to-mass multiplier. Total mass = BaseChassisMass + inventory weight × CargoMassScale. Default 0.30; no additional vanilla 0.1 multiplier.

Restart Valheim after changing settings. Use matching versions and settings on the server and participating clients.

Upgrading

Existing configuration values are preserved. The 0.7.3 calculation unintentionally multiplied the configured cargo scale by vanilla's 0.1 factor. The same configured value now produces ten times the cargo contribution.

With BaseChassisMass 65 and 13,440 inventory weight:

CargoMassScale Total assembly mass
0.10 1,409
0.30 (default) 4,097

Restart all peers after updating. Old 0.7.3 saves contain only an attached boolean, not the lox identity: reattach once after upgrading. Hitches created in 0.7.4 store the target identity for ownership handoff and reload restoration.

From 0.6.1

The old Diagnostics.HumanPullTest and Diagnostics.ArticulatedChassisTest entries are removed automatically. Existing base-mass and cargo-mass settings are retained. Player pulling starts disabled under its new name; enable Wagon.AllowHumanPulling if wanted. There is no longer a rigid Cart-chassis option. Existing wagons receive the new maximum health when loaded, but their saved current HP is retained; repair them normally to reach full health.

Multiplayer status

LoxWagon uses a networked wagon root and synchronizes the articulated child chassis through the wagon's ZDO rather than creating a separate network object for every wheel.

The mod remains under controlled multiplayer testing, but the following cases still need broader validation before the mod should be treated as fully server-hardened:

  • ownership handoff while hitched
  • client disconnect/reconnect while attached
  • hitch restoration after server restart or world reload
  • simultaneous claims on the same passenger seat under latency

For multiplayer testing, install the same LoxWagon version on the server and every client.

Installation

r2modman / Thunderstore Mod Manager

Search for LoxWagon in the Valheim community and install it with dependencies.

For testing before the listing reaches the mod-manager cache, import the Thunderstore package ZIP as a local mod.

Manual installation

  1. Install BepInExPack Valheim and Jotunn.
  2. Place LoxWagon.dll under Valheim/BepInEx/plugins/.
  3. Keep only one copy of LoxWagon.dll installed.

Compatibility

  • BeastsOfBurden: not required. LoxWagon contains compatibility guards intended to prevent BeastsOfBurden from taking over this custom wagon while leaving ordinary carts alone.
  • HUDCompass: not required. LoxWagon identifies itself as Wagon through the normal Vagon component.

Current limitations

  • Multiplayer ownership transfer and reload-time hitch restoration remain active test areas.
  • Passenger seat occupancy uses native-style proximity checks rather than an atomic network reservation.
  • Extreme cross-slopes and one-wheel-up terrain have not been exhaustively tested.

About this build

0.7.7 activates the inactive wagon placement preview inside Valheim’s native network-suppression window. Previously, delayed activation could initialize a real ZDO after that window closed, leaving saved duplicates. Existing duplicates are not deleted automatically. All passenger seats and visuals are unchanged.

0.7.5 corrects the attachment-state hash reference to ZDOVars.s_attachJointHash, using a direct compiler-checked reference. The 0.7.4 reflection lookup incorrectly expected that field on Vagon and prevented the controller from initializing. All three passenger seats are now play-tested and locked; their source is unchanged. Subsequent 0.7.5 testing confirmed attachment and a snow session without the earlier snow-update exceptions. This does not establish multiplayer stability.

The hitch target is stored separately from the local joint. A former owner releases only its local constraint; the next owner restores it after the lox and chassis are ready. The wagon follows the lox owner's authority so both bodies are simulated by one peer. Child chassis pose and velocity are published for handoff. Target streaming temporarily removes the local joint while retaining hitch intent. Explicit detach, death, a broken live joint or unsafe attachment still releases the hitch.

LoxWagon no longer runs vanilla's non-owner detach loop. Attaching a wagon does not call vanilla's global DetachAll, and ordinary carts cannot use that routine to detach expedition wagons. Remote hitch ropes resolve the stored target without a physics joint.

The replacement keel no longer opts into vanilla sled snow logic, which assumes a vanilla Chair exists. Ordinary wheel/keel contact remains; no sled snow-flattening behavior is added.

The inactive generated prefab persists between world scenes. Registration replaces only this mod's tracked entries, validates all recipe ItemDrops, and invalidates the ObjectDB build-piece cache. This addresses a stale-reference path seen after world exit/rejoin; it does not mask unrelated mods' registration failures.

Cargo placement, fur, cover and lashings remain unchanged from 0.7.3. The two front seat anchors, bench, shafts and accepted lox attachment offset are unchanged. The rear seat adds an interaction/attachment point only, without changing the model. Maximum health remains 1,200; base mass 65; cargo default 0.30. Existing configuration values are preserved; set CargoMassScale to 0.3 manually if you want the new default on an existing installation.

Release thumbnail

The release icon is the supplied 256×256 color PNG exported by the in-game renderer. The in-game thumbnail itself is unchanged.

Singleplayer acceptance checks

  • Select, move, cancel and switch away from the Hammer wagon preview without placing. Save, quit and reload: no extra wagons should appear.
  • Build one wagon and reload twice: the count should increase by exactly one and then remain constant.
  • Save while hitched, quit and reload near the lox: the hitch should restore after both objects load. Detach, save and reload: it should stay detached.
  • Check inventory contents and all three seats after reload.
  • Previously saved duplicates are not automatically deleted or merged. Use a known starting wagon count when testing.

The snow-session log still contains missing LoxChest shader-property errors without a caller stack. Their origin is unresolved; this release does not claim to fix them or suppress them.

Significant portions of the code, debugging workflow, validation tooling, and documentation were developed with assistance from OpenAI ChatGPT. The Thunderstore listing should therefore include the AI Generated category.

Building from source

Game assemblies are not bundled. Supply the managed assemblies from your target Valheim installation and BepInEx/core, plus a .NET SDK compiler.

python scripts/build.py --game-managed /path/to/valheim_Data/Managed --bepinex-core /path/to/BepInEx/core --csc /path/to/sdk/Roslyn/bincore/csc.dll --dotnet /path/to/dotnet
python validation/check_game_members.py --dotnet /path/to/dotnet --game-managed /path/to/valheim_Data/Managed --bepinex-core /path/to/BepInEx/core
python validation/check_network.py --dotnet /path/to/dotnet
python validation/check_release.py
python validation/check_geometry.py
python validation/check_tarp.py
python scripts/package_release.py

The packaging script creates one dist/LoxWagon-0.7.7.zip containing the DLL, current documentation, manifest, icon, source and validation tools. Update plugin/manifest versions, README and changelog for each release, then rebuild before packaging. The validation scripts require NumPy and SciPy. They check the shipped layout against the generated C# data, all rotated cargo bounds, support stages, cover clearance and hide mapping. They do not replace in-game rendering and handling tests.

DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro