Difference between revisions of "Documentation/Engine/Units/dynamic cargo data"
< Documentation | Engine | Units
Jump to navigation
Jump to search
HynekPerina (talk | contribs) (Create page; add all attributes.) |
(→Attributes) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | 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 [[Documentation/Engine/Units/accessory cargo data|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. | + | 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 [[Documentation/Engine/Units/accessory cargo data|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 == | == Attributes == | ||
− | Many attributes can be omitted. | + | 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. | ||
+ | |||
{|class="wikitable" | {|class="wikitable" | ||
!Name | !Name | ||
Line 8: | Line 17: | ||
!Required | !Required | ||
!Description | !Description | ||
+ | |- | ||
+ | |type | ||
+ | |enum | ||
+ | |x | ||
+ | |The type of the dynamic cargo data, currently only two are allowed (see above). | ||
+ | *particles | ||
+ | *mover | ||
+ | |- | ||
|- | |- | ||
|trailer_particle | |trailer_particle | ||
|string | |string | ||
− | |x | + | |x' |
|[[Documentation/Engine/Units|Unit name]] of the particle effect (particle_set) that is emitted from the trailer during dynamic cargo UNLOADING. | |[[Documentation/Engine/Units|Unit name]] of the particle effect (particle_set) that is emitted from the trailer during dynamic cargo UNLOADING. | ||
|- | |- | ||
Line 31: | Line 48: | ||
|world_particle | |world_particle | ||
|string | |string | ||
− | |x | + | |x' |
|Unit name of the particle effect that is emitted from a cargo particle hookup in the map during dynamic cargo LOADING. | |Unit name of the particle effect that is emitted from a cargo particle hookup in the map during dynamic cargo LOADING. | ||
|- | |- | ||
Line 42: | Line 59: | ||
|string | |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 | |unloading_sound_default | ||
|string | |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 | |material_path | ||
|string | |string | ||
− | |x | + | |x' |
|Path to the material used for the mesh representing the pile of cargo inside the trailer. | |Path to the material used for the mesh representing the pile of cargo inside the trailer. | ||
|- | |- |
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. |