Changes

Jump to navigation Jump to search

Documentation/Engine/Units/accessory data

1,902 bytes added, 06:43, 18 February 2017
no edit summary
The '''accessory_data''' unit class is the superclass for all ''accessory_*_data'' classes and defines basic UI attributes and compatibility/interactions between accessories. It is generally not used explicitlybecause it doesn't affect the vehicle visually or physically.
== Attributes ==
|string
|
|Condensed name of the accessory for UI display in contexts with limited spaceor where full names are otherwise ill-suited.
|-
|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>.
|-
|info
|string_array
|
|Additional information about the accessory. Few accessory types still use this for UI display (e.g. engine).
|-
|price
|s64
|
|The price of the accessory in the store in the base currency (ETS2 &rarr; EUR, ATS &rarr; USD). If zero, the accessory will not be visible to the player.
|-
|unlock
|uint
|0
|The minimum level the player must achieve before the accessory becomes available in the store.
|-
|suitable_for
|string_array
|
|Each array member specifies a unit name &mdash; or a pattern using wildcards (*) &mdash; which must be present on the vehicle for this accessory to become visible in the store and applicable to the vehicle.
|-
|conflict_with
|string_array
|
|Each array member specifies a unit name &mdash; or a pattern using wildcards (*) &mdash; with which this accessory is incompatible. The conflicting accessories will be removed from the vehicle if this accessory is applied.
|-
|defaults
|string_array
|
|Each array member specifies a path to an accessory definition file which is applied to the vehicle if no other suitable accessory of the same type exists on the vehicle.
|-
|require
|token_array
|
|Each array member specifies an accessory type that must exist on the vehicle while this accessory is installed. For example, if a truck has separate accessories for mudflaps and mudflap hangers, each hanger accessory might declare <code>require[]: mudflaps</code> to disallow a state where the truck has mudflap hangers but no mudflaps. The token is the final segment of each unit name, so matching accessories would have unit names like <code>foo.bar.mudflaps</code>.{{Note|Every ''require''d accessory type should '''always''' have a corresponding accessory of that type in ''defaults''!}}
|}
309
edits

Navigation menu