Changes

Jump to navigation Jump to search

Documentation/Engine/Units/accessory rim data

3,493 bytes added, 04:41, 12 February 2017
Ready for review. :)
The '''accessory_rim_data''' unit class is used to define wheels (rims), hubs, nuts and covers for the [[Documentation/Engine/Game_data/Player_trucks_definitions|player's vehicle]]. It defines the path to the visible model, the look used, whether it is paintable, and horizontal offset of the tire from its default position. Units of this type are typically found in:

* '''/def/vehicle/f_cover/*.sii''' (front hub covers for playable trucks) &rarr; Valid unit names are <code>*.fcover</code>
* '''/def/vehicle/f_disc/*.sii''' (front wheels for playable trucks) &rarr; Valid unit names are <code>*.fdisc</code>
* '''/def/vehicle/f_hub/*.sii''' (front hubs for playable trucks) &rarr; Valid unit names are <code>*.fhub</code>
* '''/def/vehicle/f_nuts/*.sii''' (front nuts for playable trucks) &rarr; Valid unit names are <code>*.fnuts</code>
* '''/def/vehicle/r_cover/*.sii''' (rear hub covers for playable trucks) &rarr; Valid unit names are <code>*.rcover</code>
* '''/def/vehicle/r_disc/*.sii''' (rear wheels for playable trucks) &rarr; Valid unit names are <code>*.rdisc</code>
* '''/def/vehicle/r_hub/*.sii''' (rear hubs for playable trucks) &rarr; Valid unit names are <code>*.rhub</code>
* '''/def/vehicle/r_nuts/*.sii''' (rear nuts for playable trucks) &rarr; Valid unit names are <code>*.rnuts</code>

== Attributes ==
Many common attributes are inherited from [[Documentation/Engine/Units/accessory_data|'''accessory_data''']]. Required attributes are '''bolded'''.
{|class="wikitable"
!Name
![[Documentation/Engine/Units#Attribute_types|Type]]
!Default Value
!Description
|-
|'''model'''
|string
|
|Path to the descriptor (.pmd) of a valid rim model. Valid rim models have ''left'' and ''right'' variants.
|-
|look
|token
|default
|Selects the look to be used.
|-
|tire_shift
|float
|0.0
|The distance in meters the tire model is shifted toward the vehicle centerline (+X for the ''left'' variant, -X for the ''right'' variant). This should only be defined for accessories of the fdisc and rdisc type.
|-
|paintable
|boolean
|false
|When true, enables the color picker on the garage, truck browser, etc screens. The paint color is applied to pieces of the '''model''' whose materials use the [[Documentation/Tools/SCS_Blender_Tools/Supported_shaders#paint|paint]] flavor.
{{Note|Unlike other accessories, rim accessories do not inherit the paint color(s) of the vehicle they belong to. Each instance may have its own paint color.}}
|-
|default_color
|float3
|(1.0, 1.0, 1.0)
|Sets the default color for the rim accessory.
|}

== Related Classes ==
*[[Documentation/Engine/Units/accessory_wheel_data|accessory_wheel_data]]

== Raw Unit Definition ==
<pre style="max-height:300px;overflow:auto"> "accessory_rim_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"
},
"model":{
"type": "string"
},
"look":{
"type": "token"
},
"tire_shift":{
"type": "float"
},
"paintable":{
"type": "bool"
},
"default_color":{
"type": "float3"
}
}
},</pre>
309
edits

Navigation menu