Changes

Jump to navigation Jump to search

Documentation/Engine/Units/trailer configuration

2,048 bytes added, 14:14, 21 May 2019
Created page with "The '''trailer_configuration''' unit class is used to collect the chassis of a given configuration for an ownable trailer, define which body set(s) are valid for that configur..."
The '''trailer_configuration''' unit class is used to collect the chassis of a given configuration for an ownable trailer, define which body set(s) are valid for that configuration, and define which configurations are “equivalent” for the purposes of trailer configuration.

== Attributes ==
{|class="wikitable"
!Name
![[Documentation/Engine/Units#Attribute_types|Type]]
!Default Value
!Description
|-
|'''name'''
|string
|
|Full name of the configuration for UI display.
|-
|icon
|string
|
|Path relative to <code>/material/ui/accessory/</code> to the icon for the accessory, omitting the file extension. For example, <code>icon: "truck_name/fancy_doodad"</code> would point to <code>/material/ui/accessory/truck_name/fancy_doodad.mat</code>.
|-
|'''chain_type'''
|token
|
|Defines the chain type (e.g. single, double, rmdouble, etc)
|-
|equivalency
|token
|
|Trailer configurations with matching '''equivalency''' tokens can be switched during gameplay using the Trailer Configuration menu. This must be set explicitly &mdash; Configurations with blank equivalency attributes will not match.
|-
|'''chassis'''
|array&lt;string&gt;
|
|Array of paths to chassis definitions for the trailer configuration (e.g. <code>chassis[]: "/def/vehicle/trailer_owned/scs.box/chassis/ch_45_f.sii"</code>). The expected unit type is [[Documentation/Engine/Units/accessory_chassis_data|accessory_chassis_data]].
|-
|'''body_sets'''
|array&lt;owner_ptr&gt; ([[Documentation/Engine/Units/trailer_body_set|trailer_body_set]])
|
|Array of compatible '''trailer_body_set'''s with this configuration. This array is usually automatically gathered from a sub-folder with the same name as the base configuration file (name of the file to first dot, so configuration "single3.sii" or "single3.mymod.sii" should have body sets in folder "/def/vehicle/trailer_owned/<brand.model>/configurations/single3"). Body sets can also be defined and linked explicitly within the configuration definition. Each trailer configuration must have at least one valid body set.
|}
309
edits

Navigation menu