Changes

Jump to navigation Jump to search

Documentation/Engine/Units/accessory truck data

16 bytes added, 14:15, 20 June 2017
no edit summary
The '''accessory_truck_data''' unit class defines basic information, cameras, fallback rules, and required accessories for the [[Documentation/Engine/Game_data/Player_trucks_definitions|player's truck]]. Units of this type are defined in '''/def/vehicle/truck/<makebrand.model>/data.sii'''.
== Attributes ==
|-
|'''info'''
|string_arrayarray&lt;string&gt;
|
|Two '''info''' members are typically defined for '''accessory_truck_data''':
<syntaxhighlight lang="cpp">
info[]: "@@brand_peterbilt@@" // The truck brand
|-
|require
|token_arrayarray&lt;token&gt;
|
|Accessory types which should be required, regardless of the vehicle configuration, should be defined in '''accessory_truck_data'''. For more information, see [[Documentation/Engine/Units/accessory_data|accessory_data]].
|-
|'''fallback'''
|string_arrayarray&lt;string&gt;
|
|Each member contains a specially-formatted string which defines an accessory type (token) and the relative path to an SII file with a safe fallback accessory defined. So a fallback rule for <code>chassis</code> may look like <code>fallback[]: "chassis<nowiki>|</nowiki>4x2.sii"</code> which would call on ''/def/vehicle/truck/<make.model>/chassis/4x2.sii'' if there is ever a problem with the vehicle's currently assigned chassis accessory that makes it invalid or unloadable.

Navigation menu