Difference between revisions of "Documentation/Engine/Units/accessory addon data"
DriveSafely (talk | contribs) |
(Using new 'UnitDef' template) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | The '''accessory_addon_data''' unit class is used for vehicle accessories | + | The '''accessory_addon_data''' unit class is used for vehicle accessories that add a visible component to a vehicle. This is most commonly used for customization of the [[Documentation/Engine/Game_data/Player_trucks_definitions|player's vehicle]]. It defines the paths to the visible models and their configuration (variant, look, excluded views), and the path to the collision mesh if applicable. Units of this type are typically found in '''/def/vehicle/truck/<make.model>/accessory/<type>/*.sii''', but some special accessories which don't directly interact with the player (eg badges which are dependent on the engine/chassis configuration) may also be found in '''def/vehicle/truck/<make.model>/<special_type>/*.sii'''. |
− | |||
== Attributes == | == Attributes == | ||
Line 13: | Line 12: | ||
|string | |string | ||
| | | | ||
− | |Path to the | + | |Path to the descriptor (.pmd) for the model to be displayed in the exterior view (if applicable). |
|- | |- | ||
|exterior_model_uk | |exterior_model_uk | ||
|string | |string | ||
| | | | ||
− | |Path to the | + | |Path to the descriptor (.pmd) for the model to be displayed in the exterior view for left-hand drive vehicles (if applicable). If unset, defaults to '''exterior_model'''. |
|- | |- | ||
|interior_model | |interior_model | ||
|string | |string | ||
| | | | ||
− | |Path to the | + | |Path to the descriptor (.pmd) for the model to be displayed in the interior view (if applicable). |
|- | |- | ||
|interior_model_uk | |interior_model_uk | ||
|string | |string | ||
| | | | ||
− | |Path to the | + | |Path to the descriptor (.pmd) for the model to be displayed in the interior view for left-hand drive vehicles (if applicable). If unset, defaults to '''interior_model'''. |
|- | |- | ||
|coll | |coll | ||
|string | |string | ||
| | | | ||
− | |Path to the collision | + | |Path to the collision mesh (.pmc) for the accessory (if applicable). |
|- | |- | ||
|look | |look | ||
|token | |token | ||
|default | |default | ||
− | | | + | |Selects the look to be used on all models. If unset, defaults to ''default''. |
{{Note|All models for an accessory must have the same set of looks.}} | {{Note|All models for an accessory must have the same set of looks.}} | ||
|- | |- | ||
Line 44: | Line 43: | ||
|token | |token | ||
|default | |default | ||
− | | | + | |Selects the variant to be used on all models. If unset, defaults to ''default''. |
{{Note|All models for an accessory must have the same set of variants.}} | {{Note|All models for an accessory must have the same set of variants.}} | ||
|- | |- | ||
|hide_in | |hide_in | ||
|u32 | |u32 | ||
− | | | + | |0x0 |
|Flag for “hiding“ accessory from being drawn in specific views. Valid values can be calculated [http://eurotrucksimulator2.com/modding_changes_114.php#Hide%20following%20views here]. | |Flag for “hiding“ accessory from being drawn in specific views. Valid values can be calculated [http://eurotrucksimulator2.com/modding_changes_114.php#Hide%20following%20views here]. | ||
− | {{Note|Accessories whose model references textures containing the mirror reflection (e.g. the | + | {{Note|Accessories whose model references textures containing the mirror reflection (e.g. the mirrors itself) '''MUST''' be marked as not visible in the mirrors. Previously there was special mechanism to handle this however the now game exclusively relies on hide_in attribute to handle that. }} |
|} | |} | ||
+ | |||
+ | == Subclasses == | ||
+ | *[[Documentation/Engine/Units/accessory_addon_int_data|accessory_addon_int_data]] (adds toy physics) | ||
+ | *[[Documentation/Engine/Units/accessory_addon_patch_data|accessory_addon_patch_data]] (adds cloth/flag physics) | ||
+ | |||
+ | {{UnitDef|def=<nowiki> "accessory_addon_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" | ||
+ | }, | ||
+ | "exterior_model":{ | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "interior_model":{ | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "exterior_model_uk":{ | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "interior_model_uk":{ | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "coll":{ | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "look":{ | ||
+ | "type": "token" | ||
+ | }, | ||
+ | "variant":{ | ||
+ | "type": "token" | ||
+ | }, | ||
+ | "hide_in":{ | ||
+ | "type": "u32" | ||
+ | } | ||
+ | } | ||
+ | },</nowiki>}} |
Revision as of 19:15, 17 February 2017
The accessory_addon_data unit class is used for vehicle accessories that add a visible component to a vehicle. This is most commonly used for customization of the player's vehicle. It defines the paths to the visible models and their configuration (variant, look, excluded views), and the path to the collision mesh if applicable. Units of this type are typically found in /def/vehicle/truck/<make.model>/accessory/<type>/*.sii, but some special accessories which don't directly interact with the player (eg badges which are dependent on the engine/chassis configuration) may also be found in def/vehicle/truck/<make.model>/<special_type>/*.sii.
Attributes
Many common attributes are inherited from accessory_data.
Name | Type | Default Value | Description |
---|---|---|---|
exterior_model | string | Path to the descriptor (.pmd) for the model to be displayed in the exterior view (if applicable). | |
exterior_model_uk | string | Path to the descriptor (.pmd) for the model to be displayed in the exterior view for left-hand drive vehicles (if applicable). If unset, defaults to exterior_model. | |
interior_model | string | Path to the descriptor (.pmd) for the model to be displayed in the interior view (if applicable). | |
interior_model_uk | string | Path to the descriptor (.pmd) for the model to be displayed in the interior view for left-hand drive vehicles (if applicable). If unset, defaults to interior_model. | |
coll | string | Path to the collision mesh (.pmc) for the accessory (if applicable). | |
look | token | default | Selects the look to be used on all models. If unset, defaults to default.
Note: All models for an accessory must have the same set of looks. |
variant | token | default | Selects the variant to be used on all models. If unset, defaults to default.
Note: All models for an accessory must have the same set of variants. |
hide_in | u32 | 0x0 | Flag for “hiding“ accessory from being drawn in specific views. Valid values can be calculated here.
Note: Accessories whose model references textures containing the mirror reflection (e.g. the mirrors itself) MUST be marked as not visible in the mirrors. Previously there was special mechanism to handle this however the now game exclusively relies on hide_in attribute to handle that. |
Subclasses
- accessory_addon_int_data (adds toy physics)
- accessory_addon_patch_data (adds cloth/flag physics)
Raw Unit Definition
"accessory_addon_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" }, "exterior_model":{ "type": "string" }, "interior_model":{ "type": "string" }, "exterior_model_uk":{ "type": "string" }, "interior_model_uk":{ "type": "string" }, "coll":{ "type": "string" }, "look":{ "type": "token" }, "variant":{ "type": "token" }, "hide_in":{ "type": "u32" } } },