-
Notifications
You must be signed in to change notification settings - Fork 7
Cargo
To configure a car's cargo carrying capability, you can use the fields Cargo Class and Cargo Capacity on the TrainCarSetup script. The cargo class can either be set to one of the pre-defined classes, which are used by the default car types, or to a custom class, which allows you to define the allowable cargo in detail (see below). The cargo capacity field defines the number of "units" of cargo that can be carried - this is relative to the amount that a default car could carry. The table below shows the mass of 1 unit of each cargo:
(Click here to expand)
- Coal: 56000 kg
- IronOre: 62000 kg
- CrudeOil: 26000 kg
- Logs: 42000 kg
- Boards: 35000 kg
- Plywood: 28000 kg
- Wheat: 49000 kg
- Corn: 51000 kg
- Pigs: 13000 kg
- Cows: 16000 kg
- Chickens: 9000 kg
- Sheep: 12000 kg
- Goats: 11000 kg
- Bread: 15000 kg
- DairyProducts: 31000 kg
- MeatProducts: 26000 kg
- CannedFood: 34000 kg
- CatFood: 29000 kg
- Diesel: 26000 kg
- Gasoline: 25000 kg
- Methane: 23000 kg
- SteelRolls: 52000 kg
- SteelBillets: 38000 kg
- SteelSlabs: 43000 kg
- SteelBentPlates: 41000 kg
- SteelRails: 46000 kg
- ScrapMetal: 42000 kg
- ElectronicsIskar: 35000 kg
- ElectronicsKrugmann: 35000 kg
- ElectronicsAAG: 35000 kg
- ElectronicsNovae: 35000 kg
- ElectronicsTraeg: 35000 kg
- ToolsIskar: 37000 kg
- ToolsBrohm: 37000 kg
- ToolsAAG: 37000 kg
- ToolsNovae: 37000 kg
- ToolsTraeg: 37000 kg
- Furniture: 34000 kg
- ClothingObco: 31000 kg
- ClothingNeoGamma: 31000 kg
- ClothingNovae: 31000 kg
- ClothingTraeg: 31000 kg
- Pipes: 40000 kg
- NewCars: 22000 kg
- ImportedNewCars: 24000 kg
- Tractors: 6000 kg
- Excavators: 12000 kg
- Acetylene: 19000 kg
- Medicine: 34000 kg
- Passengers: 6000 kg
- CryoOxygen: 22000 kg
- CryoHydrogen: 22000 kg
- Argon: 24000 kg
- Nitrogen: 22000 kg
- SpentNuclearFuel: 52000 kg
- Ammunition: 31000 kg
- Alcohol: 23000 kg
- Ammonia: 25000 kg
- SodiumHydroxide: 23000 kg
- Biohazard: 8000 kg
- ChemicalsIskar: 30000 kg
- ChemicalsSperex: 30000 kg
- Tanks: 41000 kg
- MilitaryTrucks: 16000 kg
- MilitarySupplies: 35000 kg
- EmptySunOmni: 6000 kg
- EmptyIskar: 6000 kg
- EmptyObco: 6000 kg
- EmptyGoorsk: 6000 kg
- EmptyKrugmann: 6000 kg
- EmptyBrohm: 6000 kg
- EmptyAAG: 6000 kg
- EmptySperex: 6000 kg
- EmptyNovae: 6000 kg
- EmptyTraeg: 6000 kg
- EmptyChemlek: 6000 kg
- EmptyNeoGamma: 6000 kg
The simplest case for job-enabled rolling stock is to set the Cargo Class to one of the built-in classes. However, using this method, you won't be able to change the default cargo models that are placed on the car when loaded, or change the types of cargo that can be carried. The solution to this is to set Cargo Class to Custom and to add one or more Cargo Model Setup scripts to the car root.
On the car pictured above, we've added support for two cargo types for this car. The top cargo references a custom cargo type named "TestCargo" - see below for how to create custom cargo types. It is set up to spawn a custom model for this load, in this case the object "cans_load" from the scene. Cargo models are spawned at the position of the car's [interior] child or at the origin if no interior is set. Your cargo model objects should not be parented to your car model, they must be separate objects. The lower cargo setup uses the base game cargo Chickens with the base game cargo prefab C_FlatcarSteelRolls. If you set up a cargo type with no Model and no Base Model, then when that cargo is loaded onto the car, there will be no additional visual effect (other than the info plates). This is similar to how the default boxcars work.
(Click to expand)
Hopper
- C_HopperCoal
- C_HopperIronOre
- C_HopperWheat
- C_HopperCorn
Gondola
C_GondolaScrapMetalFlatcar
- C_FlatcarWoodBoards02
- C_FlatcarWoodPlywood
- C_FlatcarSteelRolls
- C_FlatcarSteelBillets01
- C_FlatcarSteelSheets
- C_FlatcarSteelBentPlates
- C_FlatcarSteelRails
- C_FlatcarFarmTractor
- C_FlatcarExcavatorNew
- C_FlatcarISOTankYellow2_Explosive
- C_FlatcarISOTankYellow2_Oxydizing
- C_FlatcarISOTankYellow2_Asphyxiating
- C_FlatcarISOTankYellow2_Asphyxiating
- C_FlatcarStakesLogs
- C_FlatcarPipes01
- C_FlatcarPipes02
- C_FlatcarPipes03
- C_FlatcarPipes04
- C_FlatcarPipes05
Flatcar shipping containers
- C_FlatcarContainerIskar
- C_FlatcarContainerKrugmann
- C_FlatcarContainerAAG
- C_FlatcarContainerWhite
- C_FlatcarContainerNovae
- C_FlatcarContainerNovaeOld
- C_FlatcarContainerTraeg
- C_FlatcarContainerRed
- C_FlatcarContainerIskar
- C_FlatcarContainerBrohm
- C_FlatcarContainerRed
- C_FlatcarContainerAAG
- C_FlatcarContainerWhite
- C_FlatcarContainerNovae
- C_FlatcarContainerNovaeOld
- C_FlatcarContainerTraeg
- C_FlatcarContainerRed
- C_FlatcarContainerIskar
- C_FlatcarContainerSperex
- C_FlatcarContainerGoorsk
- C_FlatcarContainerObco
- C_FlatcarContainerNeoGamma
- C_FlatcarContainerNovae
- C_FlatcarContainerNovaeOld
- C_FlatcarContainerTraeg
- C_FlatcarContainerRed
- C_FlatcarContainerSunOmni
- C_FlatcarContainerWhite
- C_FlatcarContainerSunOmniAC
- C_FlatcarContainerWhiteAC
- C_FlatcarContainerSunOmniAC
- C_FlatcarContainerWhiteAC
- C_FlatcarContainerSunOmni
- C_FlatcarContainerWhite
- C_FlatcarContainerSunOmni
- C_FlatcarContainerWhite
- C_FlatcarContainerChemlekAC
- C_FlatcarContainerWhiteAC
- C_FlatcarContainerOrange3a2
- C_FlatcarContainerSunOmni
- C_FlatcarContainerSunOmniAC
- C_FlatcarContainerWhite
- C_FlatcarContainerWhiteAC
- C_FlatcarContainerIskar
- C_FlatcarContainerKrugmann
- C_FlatcarContainerBrohm
- C_FlatcarContainerRed
- C_FlatcarContainerAAG
- C_FlatcarContainerWhite
- C_FlatcarContainerSperex
- C_FlatcarContainerNovae
- C_FlatcarContainerNovaeOld
- C_FlatcarContainerTraeg
- C_FlatcarContainerRed
- C_FlatcarContainerGoorsk
- C_FlatcarContainerObco
- C_FlatcarContainerNeoGamma
- C_FlatcarContainerChemlekAC
Autorack
- C_AutorackCarsLocal1
- C_AutorackCarsLocal2
- C_AutorackCarsLocal3
- C_AutorackCarsLocal4
- C_AutorackCarsLocal1
- C_AutorackCarsLocal2
- C_AutorackCarsLocal3
- C_AutorackCarsLocal4
Nuclear Flask
C_NuclearFlaskContainerTanker Placards
- C_CarTank_Flammable
- C_CarTank_Flammable
- C_CarTank_Explosive
- C_CarTank_Toxic_Corrosive
- C_CarTank_Corrosive
- C_CarTank_Explosive
- C_CarTank_Explosive
Miltary Boxcar
C_CarBoxcarMilitary_ExplosiveMilitary Flatcar
- C_FlatcarContainerMilitary4_1
- C_FlatcarTankMilitary
- C_FlatcarTruckMilitary
- C_FlatcarContainerMilitary1
- C_FlatcarContainerMilitary2
- C_FlatcarContainerMilitary3
- C_FlatcarContainerMilitary3_2
- C_FlatcarContainerMilitary3a
- C_FlatcarContainerMilitary3a_2
Creating a pack of custom cargo is similar to creating a train car. However, custom cargo definitions are purely code based and thus don't appear in scenes, only in your project assets. To create a new pack, right click in the project assets panel and select Create -> CCL -> Custom Cargo Pack. This will create a cargo asset in the current folder which you can rename as you wish. Select the new asset to bring it up in the Inspector window.
Once all the parameters are set as you wish, click the Export button to bring up the folder selection window. Navigate to the DVCustomCarLoader mod folder, open the Cargo folder, and create or select a folder to hold your cargo pack. The exporter will write a cargo.json file to the selected folder, and the cargo will then be usable in game with custom cars (currently not available for base game cars).

