Difference between revisions of "Documentation/Engine/Units/accessory trailer body data"

From SCS Modding Wiki
Jump to navigation Jump to search
(New article, including new empty cargo model attribute for 1.39)
 
(Attributes)
 
Line 32: Line 32:
 
|float
 
|float
 
|
 
|
|The mass of the body accessory in kilograms.
+
|The mass of the body accessory in kilograms (empty, without cargo).
 
|-
 
|-
 
|detail_model
 
|detail_model

Latest revision as of 17:34, 14 October 2020

The accessory_trailer_body_data unit class is used to define ownable trailer body accessories, including body dimensions, volume, mass, and visual data. Units of this type are usually defined in /def/vehicle/trailer_owned/<brand.model>/body/*.sii.

Attributes

Many common attributes are inherited from accessory_data.

Name Type Default Value Description
size float3 Interior dimensions (cargo area) of the body in meters. (width, height, length)
total_size float3 Overall exterior dimensions of the trailer in meters. (width, height, length)
volume float The cargo volume in meters cubed (m3).
body_type token The trailer body type (e.g. flatbed, dryvan, etc).
mass float The mass of the body accessory in kilograms (empty, without cargo).
detail_model string Path to the detailed mesh model descriptor (.pmd). This is used only for vehicles used by player. Additionally they are used in vehicle previews & browser windows.
model string Path to the model descriptor (.pmd). If only a single LOD is used, it should be set up as model, and the other attributes (detail_model, lods) should not be defined. Presently it is typical to use only this for owned trailers.
lods array<string> Paths to the reduced level-of-detail model descriptors (.pmd), in order of increasing viewing distance (decreasing model complexity).
collision string Path to the collision descriptor (.pmc).
variant token Variant to be used from detail_model, model, and lods.
look token Look to be used from detail_model, model, and lods.
empty_cargo_model string Path to an accessory_cargo_data definition to be hooked up when the trailer is empty. (Added in 1.39)