Skip to content

Vehicles & Cargo Visuals

Vehicles use CargoTransportAgent.

Basic Setup

Add CargoTransportAgent to a vehicle object and assign a CargoRoute.

Important fields:

  • Route
  • Start Stop Index
  • Move Speed
  • Rotation Speed
  • Stop Distance
  • Stop Work Time
  • Inventory Capacity
  • Load Amount Per Cargo

Loading Cargo

Each route stop has a Load Mode.

None : Do not load cargo at this stop.

Load Listed Cargo : Only load cargo entries from Cargo To Load.

Load Cargo Wanted By Next Stops : Load cargo that future stops request.

Cargo To Load

Each load rule contains:

  • Cargo
  • Max Load Amount
  • Loaded Cargo Visual Prefab

Max Load Amount is the maximum amount of that cargo the vehicle should carry. If the node has less than the max amount, the vehicle loads the available amount.

Note

Load Amount Per Cargo on the vehicle is also part of the load limit. The loaded amount is limited by available cargo, free vehicle capacity, max load amount, and load amount per cargo.

Unloading Cargo

Each route stop can unload cargo in two ways:

  • Unload Cargo Wanted By Node
  • Cargo To Unload

Cargo To Unload entries include:

  • Cargo
  • Unload Percent

Use unload percent when a stop should unload only part of the cargo carried by the vehicle.

Cargo Visual Mode

CargoTransportVisualMode controls how cargo visuals appear.

None : Hide loaded cargo visuals.

Trail Behind : Place cargo visuals behind the vehicle, useful for train wagons.

Attach To Root : Attach cargo visuals to the vehicle root, useful for ships and planes.

Visual Prefab Priority

When cargo is loaded, the visual prefab is selected in this order:

  1. Cargo To Load > Loaded Cargo Visual Prefab
  2. Route stop Loaded Cargo Visual Prefab
  3. Vehicle Fallback Loaded Cargo Visual Prefab