Documentation/Engine/Units/trailer configuration

From SCS Modding Wiki
< Documentation‎ | Engine‎ | Units
Revision as of 14:24, 21 May 2019 by Smarty (talk | contribs)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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. Units of this type are usually found in /def/vehicle/trailer_owned/<brand.model>/configurations/


Name Type Default Value Description
name string Full name of the configuration for UI display.
icon string Path relative to /material/ui/accessory/ to the icon for the accessory, omitting the file extension. For example, icon: "truck_name/fancy_doodad" would point to /material/ui/accessory/truck_name/fancy_doodad.mat.
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 — Configurations with blank equivalency attributes will not match.
chassis array<string> Array of paths to chassis definitions for the trailer configuration (e.g. chassis[]: "/def/vehicle/trailer_owned/"). The expected unit type is accessory_chassis_data.
body_sets array<owner_ptr> (trailer_body_set) Array of compatible trailer_body_sets 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.

Related Units