Difference between revisions of "Documentation/Engine/Units/dynamic cargo data"
< Documentation | Engine | Units
Jump to navigation
Jump to search
HynekPerina (talk | contribs) (add new required attribute and dynamic cargo mover (un)loading documentation.) |
(→Attributes) |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
== Attributes == | == Attributes == | ||
Many attributes can be omitted. From 1.52 there are now two types of dynamic cargo (un)loading: | 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). | + | *'''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. | + | *'''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. |
+ | |||
+ | Entries marking legend: | ||
+ | * x - required for ALL dynamic cargo data | ||
+ | * x' - required only for dynamic cargo data of the 'particles' type. | ||
− | |||
{|class="wikitable" | {|class="wikitable" | ||
!Name | !Name |
Latest revision as of 10:06, 25 November 2024
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.
Entries marking legend:
- 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).
|
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. |