Open main menu

Documentation/Engine/Units/accessory rim data

< Documentation‎ | Engine‎ | Units
Revision as of 19:04, 17 February 2017 by Smarty (talk | contribs) (Using new 'UnitDef' template)

The accessory_rim_data unit class is used to define wheels (rims), hubs, nuts and covers for the 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) → Valid unit names are *.fcover
  • /def/vehicle/f_disc/*.sii (front wheels for playable trucks) → Valid unit names are *.fdisc
  • /def/vehicle/f_hub/*.sii (front hubs for playable trucks) → Valid unit names are *.fhub
  • /def/vehicle/f_nuts/*.sii (front nuts for playable trucks) → Valid unit names are *.fnuts
  • /def/vehicle/r_cover/*.sii (rear hub covers for playable trucks) → Valid unit names are *.rcover
  • /def/vehicle/r_disc/*.sii (rear wheels for playable trucks) → Valid unit names are *.rdisc
  • /def/vehicle/r_hub/*.sii (rear hubs for playable trucks) → Valid unit names are *.rhub
  • /def/vehicle/r_nuts/*.sii (rear nuts for playable trucks) → Valid unit names are *.rnuts

Attributes

Many common attributes are inherited from accessory_data. Required attributes are bolded.

Name 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 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


Raw Unit Definition

  "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"
    }
   }
  },