Difference between revisions of "Documentation/Engine/Units/accessory addon tank data"

From SCS Modding Wiki
Jump to navigation Jump to search
(Attributes)
(Attributes)
 
(4 intermediate revisions by 2 users not shown)
Line 11: Line 11:
 
!Description
 
!Description
 
|-
 
|-
|exterior_model
+
|fuel_tank_size
|string
+
|float
|
+
|0.0
|Path to the model descriptor (.pmd) for the model to be displayed in the exterior view (if applicable).
+
|Fuel tank size in liters. Overrides [[Documentation/Engine/Units/accessory_chassis_data|chassis]] info about fuel tank size, if positive.
 
|-
 
|-
|exterior_model_uk
+
|adblue_tank_size
|string
+
|float
|
+
|0.0
|Path to the model 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'''.
+
|AdBlue/DEF tank size in liters. Overrides [[Documentation/Engine/Units/accessory_chassis_data|chassis]] info about adblue tank size, if positive.
<!--
 
|-
 
|interior_model
 
|string
 
|
 
|Path to the model descriptor (.pmd) for the model to be displayed in the interior view (if applicable).
 
|-
 
|interior_model_uk
 
|string
 
|
 
|Path to the model 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 descriptor (.pmc) for the accessory (if applicable).
 
|-
 
|look
 
|token
 
|default
 
|Name of the look to be used on all descriptors of this accessory.
 
{{Note|All models for an accessory must have the same set of looks.}}
 
|-
 
|variant
 
|token
 
|default
 
|Name of the variant to be used on all descriptors of this accessory.
 
{{Note|All models for an accessory must have the same set of variants.}}
 
<!--
 
|-
 
|hide_in
 
|u32
 
|0
 
|Flag for &ldquo;hiding&ldquo; 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 mirror itself) '''MUST''' be marked as not visible in the mirrors. Previously there was a special mechanism to handle this however the now game exclusively relies on hide_in attribute to handle that. }}
 
-->
 
|-
 
|cables
 
|array<owner_ptr>
 
|
 
|Each member points to a [[Documentation/Engine/Units/trailer_cable_data|trailer_cable_data]] unit
 
 
|}
 
|}
  
== Model ==
+
{{Note|This accessory type is expected at most once on any given truck. While it is technically possible to have more than one tank type accessory (eg under different locator/accessory type name) only the first found is used for value override. Multiple occurence has undefined behavior. }}
A valid trailer cables accessory model must have the following:
 
*Some visible geometry (models cannot contain only locators)
 
*Attachment locators for each member defined in the ''cables'' array, where the truck plug model will be placed. The locator names are defined by each '''trailer_cable_data''' unit's ''locator_prefix'' attribute.
 
 
 
It may additionally make use of the following:
 
*Rest locators for each defined cable where the trailer plug model will be placed when there is no trailer connected (otherwise the cable will not be drawn/simulated when there is no trailer connected). The locator names are defined by each '''trailer_cable_data''' unit's ''rest_locator_prefix'' attribute.
 
*Special part names are displayed only during particular states:
 
**<code>cables_off</code> is displayed only when no trailer is attached
 
**<code>cables_on</code> is displayed only when a trailer is attached
 

Latest revision as of 09:21, 19 November 2021

Note: This article is a work in progress and has yet to be reviewed by SCS staff. Some information may be incomplete or inaccurate.

The accessory_addon_tank_data unit class is used for adding accessory based tank data container. For player trucks, units of this type are usually defined in /def/vehicle/truck/<brand.model>/accessory/tank/*.sii and valid unit names end in .tank. This unit type was added in 1.41.

Attributes

Many common attributes are inherited from accessory_addon_data.

Name Type Default Value Description
fuel_tank_size float 0.0 Fuel tank size in liters. Overrides chassis info about fuel tank size, if positive.
adblue_tank_size float 0.0 AdBlue/DEF tank size in liters. Overrides chassis info about adblue tank size, if positive.

Note: This accessory type is expected at most once on any given truck. While it is technically possible to have more than one tank type accessory (eg under different locator/accessory type name) only the first found is used for value override. Multiple occurence has undefined behavior.