Open main menu

Documentation/Engine/Units/dynamic cargo data

< Documentation‎ | Engine‎ | Units
Revision as of 09:40, 25 November 2024 by HynekPerina (talk | contribs) (type in bold text)

The dynamic cargo data unit class includes all needed data related to dynamic cargo loading feature. Units of this type are found in /def/vehicle/trailer/<trailer_name>/, typically in the same file as accessory cargo data. Such accessory cargo data typically only contains a pointer to dynamic cargo data.

For debugging purposes, it is better to not leave this unit nameless. But choose the name carefully to avoid conflicts! The naming convention for SCS cargoes is dyn.cargo.data.<cargo_name>, where you substitute <cargo_name> for the cargo that you're adding. For example dyn.cargo.data.potatoes_b.

Attributes

Many attributes can be omitted. From 1.52 there are now two types of dynamic cargo (un)loading:

  • Particles - the dynamic cargo (un)loading of grainhoppers added in 1.51. For this type the other required attributes are trailer_particle, world_particle, and material_path. For dynamic cargo data to be considered correct, you must be able to load it (world_particle), unload it (trailer_particle), and display a material on the cargo pile mesh inside the trailer (material_path).
  • Mover - the dynamic cargo (un)loading of logger trailers added in 1.52. This type ignores all the particle attributes, the only attributes that are considered (but not required) are loading_sound and unloading_sound_default, which is the sound emitted when the log loader places a pile of logs into the trailer.

Key - x = required for ALL dynamic cargo data. x' - required only for dynamic cargo data of the 'particles' type.

Name Type Required Description
type enum x The type of the dynamic cargo data, currently only two are allowed (see above).
  • particles
  • mover
trailer_particle string x' Unit name of the particle effect (particle_set) that is emitted from the trailer during dynamic cargo UNLOADING.
trailer_particle_night string Unit name of the particle effect that is emitted from the trailer during dynamic cargo UNLOADING. (Night variant)
impact_particle string Unit name of the particle effect that is emitted at the place where the loading particle effect (world_particle) touches the trailer.
impact_particle_night string Unit name of the particle effect that is emitted at the place where the loading particle effect (world_particle) touches the trailer. (Night variant)
world_particle string x' Unit name of the particle effect that is emitted from a cargo particle hookup in the map during dynamic cargo LOADING.
world_particle_night string Unit name of the particle effect that is emitted from a cargo particle hookup in the map during dynamic cargo LOADING. (Night variant)
loading_sound string Path to the sound emitted from the trailer at the spot where the stream of cargo touches the pile of cargo during loading phase/when the log loader mover places a pile of logs inside the trailer.
unloading_sound_default string Path to the sound emitted from the trailer at the spot where the stream of cargo exits the trailer during unloading phase/when the log loader mover takes out a pile of logs from the trailer.
material_path string x' Path to the material used for the mesh representing the pile of cargo inside the trailer.
cargo_slope_angle float The angle of repose of the cargo when it is loaded into the trailer. In other words how steep the pile of cargo will be when loading. Default value: 25.0.