Skip to content
WhistleWiz edited this page Mar 3, 2024 · 6 revisions

Cargo Configuration

In the car type script, you will find a dropdown named Cargo Types. You can define which cargo can be transported by your car within it.

Each cargo transported can have any number of models, including 0. If a cargo has no models (similar to the vanilla boxcars), no cargo icon will be drawn over it in the job papers.

image

Note

An amount of 1 equals the cargo transported in one of the vanilla cars. You can check the Derail Valley Wiki for how much each cargo weights, and other useful information.

Rolling Stock Cargo Models

A cargo model is setup in a similar way to the cars themselves. Create a prefab and add your models into it, then add a [colliders] child and set it up just like a car would be. Check the colliders page for information about setup.

Important

The root of the prefab will be spawned at the root of the car, so ensure there is no position, rotation or scale applied to it.

Custom Cargo Types

CCL cars accept any custom cargo type added with the Custom Cargo mod. When selecting the cargo type, pick custom and type the ID of the custom cargo you wish to use.

image

Tip

You can include custom cargo even if you do not have the mod for it. CCL will simply skip it when loading your car.

Cargo Tools

To help with cargo setup, CCL provides some tools. You can access them through the CCL tab in the menu bar.

You can drag and drop a cartype into the first option of the tools to start, or select a cartype and click Get Selected.

Set Cargo

In this option, you can pick all cargo transported by a certain car type in the game and automatically assign it to your car.

  • Add to existing cargo – adds the cargo types to your existing cargo setup.
  • Overwrite existing cargo – replaces the cargo setup with the cargo types shown.
  • Clear cargo – erases the current cargo setup.
  • Add containers – adds all container type cargo to the existing setup (some food, chemicals, clothing, electronics, furniture, tooling and empty containers).

Set Prefabs

This option allows you to automatically assign prefabs to the cargo setup of the car. You must specify the path to the folder containing the prefabs, and it will include ALL prefabs in that folder AND any subfolders.

The prefabs are compared by name. If the cargo contains the name of the cargo ID, it is counted. The exception to this are containers, which only compare the brand. As such:

Prefab name Cargo name(s)
Cargo_Tractors Tractors
Prefab_Obco ClothingObco, EmptyObco
Steel -
SteelBillets SteelBillets
  • Auto assign prefabs – adds the prefabs. If Add to empty only is checked, it will only add prefabs to cargo types that have no models yet.
  • Clear all models – empties all models assigned to cargo.