Changes

Jump to navigation Jump to search

Documentation/Engine/Units/trailer def

1,768 bytes added, 21:22, 21 June 2017
New article, still WIP.
{{Note| WIP — [[User:Smarty|Smarty]] ([[User talk:Smarty|talk]]) 23:22, 21 June 2017 (CEST)}}

The '''trailer_def''' unit class acts as an intermediary between [[Documentation/Engine/Units/cargo_data|cargo_data]] and [[Documentation/Engine/Units/trailer|trailer]] units. Units of this type are usually defined in '''/def/cargo/<cargo_name>/<trailer_name>.sii''', corresponding to '''def/cargo/<cargo_name>.sii'''. They define which trailer configuration to enable for the cargo, the cargo's mass for that trailer configuration, and how that mass is distributed/placed on the trailer and its slave units.

== Attributes ==
{|class="wikitable"
!Name
![[Documentation/Engine/Units#Attribute_types|Type]]
!Default Value
!Description
|-
|trailer
|string
|
|The unit name of the '''trailer''' unit to be enabled for the cargo. This attribute can safely refer to units which aren't present.
|-
|mass
|float
|
|The mass of the cargo for this trailer configuration in kilograms (kg).
|-
|cog_offset
|array<float3>
|
|Each member defines the offset of the cargo center of gravity from the calculated value for each trailer in the trailer configuration, starting with the ''master'' trailer and iterating through the ''slave'' trailers. (X, Y, Z) corresponds to lateral, vertical, and longitudinal offsets respectively.
|-
|cargo_mass_ratio
|array<float>
|<pre>cargo_mass_ratio:&nbsp;1
cargo_mass_ratio[0]:&nbsp;1</pre>
|Each member defines how much of the cargo mass and forces are borne by each trailer in the trailer configuration, starting with the ''master'' trailer and iterating through the ''slave'' trailers.
|}

== Related Units ==
*[[Documentation/Engine/Units/cargo_data|cargo_data]]
*[[Documentation/Engine/Units/trailer|trailer]]
309
edits

Navigation menu