Open main menu

Changes

Documentation/Engine/Units/accessory cargo data

2,475 bytes added, 01:47, 13 February 2017
Draft.
The '''accessory_cargo_data''' unit class configures visible cargo models for [[Documentation/Engine/Game_data#Trailer_definitions|trailers]] and can be used to bind animations if the model is skinned. Units of this type are found in '''/def/vehicle/trailer/<trailer_name>/'''.

== Attributes ==
Many common attributes are inherited from [[Documentation/Engine/Units/accessory_data|'''accessory_data''']].
{|class="wikitable"
!Name
![[Documentation/Engine/Units#Attribute_types|Type]]
!Default Value
!Description
|-
|detail_model
|string
|
|Path to the high level-of-detail mesh.
|-
|model
|string
|
|Path to the standard level-of-detail mesh. 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.
|-
|lods
|string array
|
|Paths to the reduced level-of-detail meshes, in order of increasing viewing distance (decreasing model complexity).
|-
|collision
|string
|
|Path to the collision mesh (.pmc).
|-
|variant
|token
|default
|Selects the variant to be used for all models/collisions defined.
{{Note|All models defined for this '''accessory_cargo_data''' must have this variant name.}}
|-
|look
|token
|default
|Selects the look to be used for all models defined.
{{Note|All models defined for this '''accessory_cargo_data''' must have this look name.}}
|-
|animations
|owner_ptr_array
|null
|Points to units of the type ''anim_idle'' or ''anim_random'' in order to assign dynamic animations to skinned cargo models.
|}

== Raw Unit Definition ==
<pre style="max-height:300px;overflow:auto"> "accessory_cargo_data":{
"superclass":"accessory_data",
"attrs":{
"name":{
"type": "string"
},
"short_name":{
"type": "string"
},
"icon":{
"type": "string"
},
"info":{
"type": "string_array"
},
"price":{
"type": "s64"
},
"unlock":{
"type": "uint"
},
"suitable_for":{
"type": "string_array"
},
"conflict_with":{
"type": "string_array"
},
"defaults":{
"type": "string_array"
},
"require":{
"type": "token_array"
},
"detail_model":{
"type": "string"
},
"model":{
"type": "string"
},
"lods":{
"type": "string_array"
},
"collision":{
"type": "string"
},
"variant":{
"type": "token"
},
"look":{
"type": "token"
},
"animations":{
"type": "owner_ptr_array"
}
}
},</pre>
309
edits