Changes

Jump to navigation Jump to search

Documentation/Engine/Units/accessory engine data

437 bytes removed, 07:01, 23 September 2016
Req/opt column to Default Values; Some corrections per Max's guidance (more to come)
The '''accessory_engine_data''' unit type class is used to define the engine characteristics for the [[Documentation/Engine/Game_data/Player_trucks_definitions|player's vehicle]], as well as some upshift and downshift characteristics for automatic transmission gameplay. Units of this type are usually defined in '''/def/vehicle/truck/<make.model>/engine/*.sii'''
== Attributes ==
!Name
![[Documentation/Engine/Units#Attribute_types|Type]]
!Required/OptionalDefault Value
!Description
|-
|info
|string array
|optional
|Three '''info''' members are usually defined for '''accessory_engine_data'''.
<syntaxhighlight lang="cpp">
|torque
|float
|required
|This defines the maximum torque output of the engine in N&middot;m.
|-
|torque_curve
|float2 array
|optionalSee description|This defines the torque output of the engine at various engine speeds, relative to the maximum torque defined in '''torque'''. For exampleIf unset, the default curve is used:
<syntaxhighlight lang="cpp">
torque: 745.7 // 550 lb-ft // Detroit Diesel Curve E4-1061-52-20 torque_curve[]: (300, 0) torque_curve[]: (440, 0.5) // Fiddling with the output around 440 rpm will influence how easily the engine stalls when clutching. torque_curve[]: (8001000, 0.961) // 528 lb-ft at 800 rpm torque_curve[]: (12001300, 1) // 550 lb-ft at 1200 rpm (peak torque) torque_curve[]: (14001900, 0.9977) torque_curve[]: (16002400, 0.974) torque_curve[]: (18002600, 0.45)torque_curve[]: (2000, 0.91)torque_curve[]: (2100, 0.89) // 489.5 lb-ft at 2100 rpm (197 hp, rated power)torque_curve[]: (2300, 0) // High idle (0hp) at 2300 rpm
</syntaxhighlight>
 
The torque output is linearly interpolated between data points. For engine speeds outside the domain of the data points, the output is clamped to the values at the highest/lowest rpm points. The valid range for torque output is 0-1.
|-
|rpm_idle
|float
|required550
|This is the engine speed the virtual engine controller will attempt to maintain with no throttle input.
|-
|rpm_limit
|float
|required2500
|This is the maximum engine speed the virtual engine controller will allow (except if the engine is being driven by the wheels).
|-
|rpm_limit_neutral
|float
|optional2500|This is the maximum engine speed the virtual engine controller will allow if the transmission is in neutral. If unset, this defaults to '''rpm_limit'''.
|-
|rpm_range_low_gear
|float2
|required(700, 1500)
|Defines the downshift and upshift engine speeds in low-range gears.
|-
|rpm_range_high_gear
|float2
|required(1000, 1500)
|Defines the downshift and upshift engine speeds in high-range gears.
|-
|rpm_range_engine_brake
|float2
|optional(1500, 2500)
|Defines the downshift and upshift engine speeds while the engine brake is operating.
|-
|rpm_range_power_boost
|float2
|optional(550, 450)
|Defines the ''change'' to '''rpm_range_low_gear''' and '''rpm_range_high_gear''' at full throttle when adaptive automatic transmission is enabled.
|-
|engine_brake
|float
|optional
|Peak engine braking torque relative to '''torque''', at the maximum engine brake strength.
|-
|engine_brake_downshift
|bool
|optional|When true, automatic transmissions will downshift upon beginning engine brake behavior as long as '''rpm_limit''' is not exceeded. Defaults to false.
|-
|engine_brake_positions
|uint
|optional
|Defines the number of strength levels for the engine brake. The braking torque at each position is based linearly on the number of positions. So for <code>engine_brake_positions: 3</code> the first position will have <sup>1</sup>&frasl;<sub>3</sub> &times; '''engine_brake''' &times; '''torque''', the second position will have <sup>2</sup>&frasl;<sub>3</sub> &times; '''engine_brake''' &times; '''torque''', and the highest position will have '''engine_brake''' &times; '''torque'''.
|-
|volume
|float
|required
|The (four-stroke) volumetric displacement of the engine in liters. It is used in fuel consumption calculations. {{Note|For two-stroke diesel engines, this should be roughly twice the swept volume.}}
|-
|consumption_coef
|float
|optional1.0
|This is used to scale the fuel consumption of the engine relative to the game's calculated value.
|-
|adblue_consumption
|float
|optional0.05|This is used to scale the engine's consumption how many liters of AdBlue (Diesel Exhaust Fluid) relative are consumed per liter of fuel.{{Tip|For older engines which do not use AdBlue, this attribute should be set to the game's default0.}}
|-
|no_adblue_power_limit
|float
|optional
|When the AdBlue tank is empty, the engine's power is scaled by this factor.
|}
309
edits

Navigation menu