Difference between revisions of "Action0/Vehicles/RoadVehicles"

From GRFSpecs
Jump to navigationJump to search
m (12 revisions)
(PR #13090)
 
(40 intermediate revisions by 8 users not shown)
Line 1: Line 1:
  +
<div style="float:right; padding-left:12px; background:none;">{{NFONavVehicles}}</div>
   
  +
== Introduction ==
'''''Action 0 properties for road vehicles'''''
 
 
=Action 0 - Properties for road vehicles=
 
   
 
Defining properties of road vehicles.
 
Defining properties of road vehicles.
   
  +
== Properties ==
{maketoc}
 
   
  +
{| |-
-=Properties=-
 
  +
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description!!Available for articulated parts
  +
|-
  +
|05||B||{{ottdp|1.10|no}}||Roadtype / tramtype (see below)||should be same as front
  +
|-
  +
|08||B||{{ottdp|0.6|2.0}}||Speed in mph*3.2||no
  +
|-
  +
|09||B||{{ottdp|0.6|2.0}}||Running cost factor||should be zero
  +
|-
  +
|0A||D||{{ottdp|0.6|2.0}}||Running cost base, see below||should be zero
  +
|-
  +
|0E||B||{{ottdp|0.6|2.0}}||Sprite ID (FF for new graphics)||yes
  +
|-
  +
|0F||B||{{ottdp|0.6|2.0}}||Capacity||yes
  +
|-
  +
|10||B||{{ottdp|0.6|2.0}}||Cargo type, see [[CargoTypes]]<br/>
  +
{{grfTill|7}} For GRF version 7 and below: Type B 'cargo slot'<br/>
  +
{{grfFrom|8}} For GRF version 8 and above: Type A '(translated) cargo bit'<br/>
  +
{{ottd|15.0}} Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.
  +
||yes
  +
|-
  +
|11||B||{{ottdp|0.6|2.0}}||Cost factor||should be zero
  +
|-
  +
|12||B||{{ottdp|0.6|2.0}}||Sound effect: 17/19/1A for regular, 3C/3E for toyland<br/>{{ottdp|1.6|no|ottdrev=r27507}} Since OpenTTD r27507 also custom sound effects from Action11 are allowed here.||no
  +
|-
  +
|13||B||{{ottdp|1.1|2.0}} {{grfFrom|2}}||Power in 10 hp, see below||should be zero
  +
|-
  +
|14||B||{{ottdp|1.1|2.0}} {{grfFrom|2}}||Weight in 1/4 tons, see below||should be zero
  +
|-
  +
|15||B||{{ottdp|0.7|2.0}} {{grfFrom|2}}||Speed in mph*0.8, see below||no
  +
|-
  +
|16||D||{{ottdp|0.6|2.0}} {{grfFrom|2}}||Bit mask of cargo types available for refitting (not refittable if 0 or unset), see column 2 (bit values) in [[CargoTypes]]. <b>Obsoleted by properties 24/25</b>||yes
  +
|-
  +
|17||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below||yes
  +
|-
  +
|18||B||{{ottdp|1.1|2.5|ttdprev=alpha 30}}||Coefficient of tractive effort||should be zero
  +
|-
  +
|19||B||{{ottdp|1.1|2.5|ttdprev=alpha 30}}||Coefficient of air drag||should be zero
  +
|-
  +
|1A||B||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||Refit cost, using 25% of the [[BaseCosts|purchase price cost base]]||yes
  +
|-
  +
|1B||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])||no
  +
|-
  +
|1C||B||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Miscellaneous vehicle flags||partly ("tram" should be same as front)
  +
|-
  +
|1D||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Refittable cargo classes, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 28]]||yes
  +
|-
  +
|1E||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Non-refittable cargo classes, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 29]]||yes
  +
|-
  +
|1F||D||{{ottdp|0.6|2.5|ttdprev=r1210|ottdrev=r7191}}||Long format introduction date||no
  +
|-
  +
|20||B*||{{ottdp|0.7|no|ottdrev=r13831}}||Sort the purchase list||no
  +
|-
  +
|21||B||{{ottdp|1.1|no|ottdrev=r21240}}||Visual effect||yes
  +
|-
  +
|22||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period||yes
  +
|-
  +
|23||B||{{ottdp|1.2|no|ottdrev=r23164}}||Make vehicle shorter, see [[Action0/Vehicles/Trains#Shorter_train_vehicles_.2821.29|train property 21]]||yes
  +
|-
  +
|24||B n*B||{{ottdp|1.2|no|ottdrev=r23291}}||List of always refittable cargo types, see [[Action0/Vehicles/Trains#List_of_always_refittable_cargo_types_.282C.2C_2D.29|train property 2C]]||yes
  +
|-
  +
|25||B n*B||{{ottdp|1.2|no|ottdrev=r23291}}||List of never refittable cargo types, see [[Action0/Vehicles/Trains#List_of_always_refittable_cargo_types_.282C.2C_2D.29|train property 2D]]||yes
  +
|-
  +
|26||W||{{ottdp|13|no}}||Vehicle variant group, see [[Action0/Vehicles/Trains#Vehicle_variant_group_.282F.29|train property 2F]]
  +
|-
  +
|27||D||{{ottdp|13|no}}||Extra flags, see [[Action0/Vehicles/Trains#Extra_flags_.2830.29|train property 30]]
  +
|-
  +
|28||B||{{ottdp|14|no|ottdrev=g2d73076056}}||Additional callback flags bit mask, see below||yes
  +
|-
  +
|29||W||{{ottdp|15|no|ottdrev=gd2496b6ec4}}||Cargo classes required for refittability, see [[Action0Trains#Cargo_classes (28, 29, 32)|train prop. 32]]||yes
  +
|}
   
  +
== Description ==
||Number|Version|Size|Description|Available for articulated parts
 
   
  +
=== Roadtype or tramtype (05) ===
08| |B|Speed in mph*3.2|no
 
  +
{{ottdp|1.10|no}} Roadtype or tramtype for the vehicle. This is an index into the [[Action0/Global_Settings#Roadtype_translation_table_.2816.29|roadtype]] or [[Action0/Global_Settings#Tramtype_translation_table_.2817.29|tramtype]] translation table.
   
  +
This property:
09| |B|Running cost factor|should be zero
 
  +
* will use property 1C bit 0 (flag 'vehicle is tram') to determine whether to use a roadtype or tramtype table
  +
* requires an appropriate roadtype or tramtype table to be loaded
   
0A| |D|Running cost base, see below|should be zero
+
=== Running cost base (0A) and factor (09) ===
 
0E| |B|Sprite ID (FF for new graphics)|yes
 
 
0F| |B|Capacity|yes
 
 
10| |B|Cargo type, see column 3 (type B) in [[CargoTypes]]|yes
 
 
11| |B|Cost factor|should be zero
 
 
12| |B|Sound effect: 17/19/1A for regular, 3C/3E for toyland|no
 
 
13|2|B|Power in 10 hp, see below|should be zero
 
 
14|2|B|Weight in 1/4 tons, see below|should be zero
 
 
15|2|B|Speed in mph*0.8, see below|no
 
 
16|2|D|Bit mask of cargo types available for refitting (not refittable if 0 or unset), see column 2 (bit values) in [[CargoTypes]]|yes
 
 
17|6|B|Callback flags bit mask, see below|yes
 
 
18|(a)|B|Coefficient of tractive effort|should be zero
 
 
19|(a)|B|Coefficient of air drag|should be zero
 
 
1A|(a)|B|Refit cost, using 25% of the [[BaseCosts|purchase price cost base]]|yes
 
 
1B|(b)|B|Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])|no
 
 
1C|(c)|B|Miscellaneous vehicle flags|partly (&quot;tram&quot; should be same as front)
 
 
1D|(c)|W|Refittable cargo classes, see [[Action0Trains#Cargo_classes_28_29_|train prop. 28]]|yes
 
 
1E|(c)|W|Non-refittable cargo classes, see [[Action0Trains#Cargo_classes_28_29_|train prop. 29]]|yes
 
 
1F|(d)|D|Long format introduction date|no
 
 
20|(e)|B*|Sort the purchase list|no
 
 
21|(f)|B|Visual effect|yes||
 
 
Version codes:
 
 
||Code|Version
 
 
(a)|2.0.1 alpha 30
 
 
(b)|2.0.1 alpha 44
 
 
(c)|2.0.1 alpha 58
 
 
(d)|2.5 r1210, OpenTTD r7191
 
 
(e)|OpenTTD r13831
 
 
(f)|OpenTTD r21240||
 
 
-=Comments=-
 
 
==Running cost base (0A) and factor (09)==
 
   
 
TTD calculates all costs by multiplying a 48-bit base amount with an 8-bit factor. &nbsp;The base amount is changed according to inflation, whereas the factor remains constant.
 
TTD calculates all costs by multiplying a 48-bit base amount with an 8-bit factor. &nbsp;The base amount is changed according to inflation, whereas the factor remains constant.
Line 82: Line 94:
 
For the running costs of road vehicles, the following base amounts are available:
 
For the running costs of road vehicles, the following base amounts are available:
   
  +
{| |-
||Type|Value|in little-endian notation
 
  +
!Type!!Value!!in little-endian notation
 
  +
|-
Road vehicle running cost base|4C48|48 4C 00 00||
 
  +
|Road vehicle running cost base||4C48||48 4C 00 00
  +
|}
   
 
Theoretically, you could use pointers to other [[BaseCosts|base amounts]] available in TTD, but these are the numbers TTD uses for road vehicles.
 
Theoretically, you could use pointers to other [[BaseCosts|base amounts]] available in TTD, but these are the numbers TTD uses for road vehicles.
   
==Cost factor (11)==
+
=== Cost factor (11) ===
   
 
The cost factor is a bit-coded value which determines how expensive a vehicle is. The table below gives you some values to use for finding the right price for your vehicles.
 
The cost factor is a bit-coded value which determines how expensive a vehicle is. The table below gives you some values to use for finding the right price for your vehicles.
   
  +
{| |-
||Cost factor|Price
 
  +
!Cost factor!!Price
  +
|-
  +
|00||$ 0
  +
|-
  +
|01||$ 108
  +
|-
  +
|10||$ 1,750
  +
|-
  +
|20||$ 3,500
  +
|-
  +
|80||$ 14,000
  +
|-
  +
|FF||$ 27,890
  +
|}
   
  +
=== Realistic acceleration properties (13, 14, 15) ===
00|$ 0
 
 
01|$ 108
 
 
10|$ 1,750
 
 
20|$ 3,500
 
 
80|$ 14,000
 
 
FF|$ 27,890||
 
 
==Realistic acceleration properties (13, 14, 15)==
 
 
TTDP uses these properties only if road vehicles are set to realistic acceleration in the NewCurveAndMountainHandling switch. They are ignored otherwise.
 
 
OpenTTD uses these properties always, if they are defined and gives the speed defined here precedence over the one defined in property 08.
 
   
 
Using property 15 to set the speed, it is possible to achieve speeds larger than 80 mph (127 km/h), to which property 08 is limited. When setting property 15, always set property 08 as well, so that the vehicle works reasonably well whether realistic acceleration is turned on or off. If property 15 is not set, the value from property 08 is used instead.
 
Using property 15 to set the speed, it is possible to achieve speeds larger than 80 mph (127 km/h), to which property 08 is limited. When setting property 15, always set property 08 as well, so that the vehicle works reasonably well whether realistic acceleration is turned on or off. If property 15 is not set, the value from property 08 is used instead.
   
  +
{{ttdp|}} TTDPatch uses these properties only if road vehicles are set to realistic acceleration in the NewCurveAndMountainHandling switch. They are ignored otherwise.
==Callbacks (17)==
 
   
  +
{{ottd|}} OpenTTD uses these properties always, if they are defined and gives the speed defined here precedence over the one defined in property 08.
For road vehicles, the following [[Callbacks|callbacks]] have to be enabled by setting the corresponding bit in property 17 (certain other, not as frequently used callbacks are available without setting a bit here):
 
   
  +
=== Callbacks (17, 28) ===
||Bit|Value|Variable 0C value|Callback
 
   
  +
For road vehicles, the following [[callbacks]] have to be enabled by setting the corresponding bit in properties 17 and 28 (certain other, not as frequently used callbacks are available without setting a bit here):
1|2|11|Wagon length
 
   
  +
{| |-
2|4|12|Load amount
 
  +
!Bit!!Value!!Variable 0C value!!Callback
  +
|-
  +
|1||2||11||Wagon length
  +
|-
  +
|2||4||12||Load amount
  +
|-
  +
|3||8||15||Set refitted capacity
  +
|-
  +
|4||10||16||Build articulated vehicle
  +
|-
  +
|5||20||19||show a suffix after the cargo type name
  +
|-
  +
|6||40||2D||Select color mapping for vehicle
  +
|-
  +
|7||80||33||Sound effect callbacks
  +
|-
  +
|8||100||161||{{ottd|14|ottdrev=gf5394ed2ef}}Engine name
  +
|-
  +
|9||200||163||{{ottdp|15|no|ottdrev=gd2496b6ec4}}Custom refit
  +
|}
   
  +
Bit is the bit you have to set, you do this by adding all the values for all the bits. Variable 0C value is what variable 0C will be set to, for checking it in the VarAction2 for callbacks.
3|8|15|Set refitted capacity
 
   
  +
=== Coefficient of tractive effort (18) ===
4|10|16|Build articulated vehicle
 
 
5|20|19|show a suffix after the cargo type name
 
 
6|40|2D|Select color mapping for vehicle
 
 
7|80|33|Sound effect callbacks||
 
 
Bit is the bit you have to set, you do this by adding all the values for all the bits. Variable 0C value is what variable 0C will be set to, for checking it in the variational action 2 for callbacks.
 
 
==Coefficient of tractive effort (18)==
 
   
 
This cofficient sets what fraction of the vehicle weight is equal to the maximum tractive effort. &nbsp;This includes the effect of having some unpowered axles, as well as the coefficient of friction that is available.
 
This cofficient sets what fraction of the vehicle weight is equal to the maximum tractive effort. &nbsp;This includes the effect of having some unpowered axles, as well as the coefficient of friction that is available.
   
For a value of FF, the tractive effort is equal to the vehicle weight, for 80, it is half, and so on. &nbsp;If not set, a default of 4C is used, for a fraction of 0.30, corresponding to Wadh=W and a coefficient of friction of 0.30, which is the value used by the patch before 2.0.1 alpha 19.
+
For a value of FF, the tractive effort is equal to the vehicle weight, for 80, it is half, and so on. &nbsp;If not set, a default of 4C is used, for a fraction of 0.30, corresponding to W<sub>adh</sub>=W and a coefficient of friction of 0.30, which is the value used by the patch before TTDPatch 2.0.1 alpha 19.
   
==Coefficient of air drag (19)==
+
=== Coefficient of air drag (19) ===
   
 
This property sets the air drag coefficient c2 used for the realistic acceleration model, from 01 (no airdrag) to FF (most air drag) in arbitrary units. &nbsp;00 means to use the default value that depends on the top speed (to simulate the fact that high-speed engines are more streamlined).
 
This property sets the air drag coefficient c2 used for the realistic acceleration model, from 01 (no airdrag) to FF (most air drag) in arbitrary units. &nbsp;00 means to use the default value that depends on the top speed (to simulate the fact that high-speed engines are more streamlined).
Line 148: Line 170:
 
The default values are the following:
 
The default values are the following:
   
  +
{| |-
||top speed (mph/1.6)|&lt;16|16|24|32|48|64|96|128|192|256|...
 
  +
!top speed (mph/1.6)!!&lt;16!!16!!24!!32!!48!!64!!96!!128!!192!!256!!...
 
  +
|-
c2|192|128|96|64|48|32|24|16|12|8||
 
  +
|c2||192||128||96||64||48||32||24||16||12||8
  +
|}
   
 
For higher speeds, the series is continued in the same manner.
 
For higher speeds, the series is continued in the same manner.
Line 156: Line 180:
 
Air drag in Newtons will then be c2*v*v with v in m/s, although it is probably futile to attempt to make c2 a realistic number due to the lack of TTd's consistent scaling. &nbsp;If a vehicle doesn't reach its historical top speed, you might try setting prop. 19 one or two higher than the default above, otherwise it's probably a good idea to leave it at the default.
 
Air drag in Newtons will then be c2*v*v with v in m/s, although it is probably futile to attempt to make c2 a realistic number due to the lack of TTd's consistent scaling. &nbsp;If a vehicle doesn't reach its historical top speed, you might try setting prop. 19 one or two higher than the default above, otherwise it's probably a good idea to leave it at the default.
   
==Miscellaneous flags (1C)==
+
=== Refit cost (1A) ===
  +
  +
Refit cost, using 25% of the [[BaseCosts|purchase price cost base]]. This property can be overridden by callback 15E.
  +
  +
{{ottdp|1.2|no|ottdrev=r23087}} If the refit cost factor is set to zero and bit 4 of the miscellaneous flags (1C) is set, auto-refitting is allowed.
  +
  +
=== Miscellaneous flags (1C) ===
   
 
This is a bit mask, with the following bits:
 
This is a bit mask, with the following bits:
   
  +
{| |-
||Bit|Value|Meaning
 
  +
!Bit!!Value!!Meaning
  +
|-
  +
|0||1||Vehicle is a tram/light rail vehicle and requires tram tracks to operate
  +
|-
  +
|1||2||Uses two company colors
  +
|-
  +
|2||4||reserved, do not use
  +
|-
  +
|3||8||reserved, do not use
  +
|-
  +
|4||10||{{ottdp|1.2|no|ottdrev=r23087}} Auto-refitting is enabled for refits where callback 15E allows it or prop 1A specifies zero cost.
  +
|-
  +
|5|| 20||{{ottdp|1.2|no|ottdrev=r23861}} Use cargo multiplier for default cargo. See page about [[VehicleRefitting#Misc._vehicle_flag_5_.27use_of_capacity_multiplier_for_default_cargo.27_set|vehicle refitting]].
  +
|-
  +
|6|| 40||{{ottdp|1.3|no|ottdrev=r24124}} Disable breakdown smoke effect.
  +
|-
  +
|7|| 80||{{ottdp|1.7|no|ottdrev=r27668}} [[Action2/Vehicles#Composing_vehicles_from_multiple_sprites|Compose vehicle from multiple sprites.]]
  +
|}
   
  +
=== Long format introduction date (1F) ===
0|1|Vehicle is a tram/light rail vehicle and requires tram tracks to operate
 
   
  +
Set the vehicle introduction date, in days since the year 0. This takes account of leap years; dividable by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). This property must be set after property 00 to take effect.
1|2|Uses two company colors||
 
   
  +
{{ottdp|no|}} In TTDPatch, dates after 2044 will be limited to 2044.
==Long format introduction date (1F)==
 
   
  +
=== Sort vehicle list (20) ===
Set the vehicle introduction date, in days since the year 0. This takes account of leap years; dividable by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). This property must be set after property 00 to take effect. In TTDPatch, dates after 2044 will be limited to 2044.
 
  +
See sort vehicle list for [[Action0Trains#Sort vehicle list 1A|trains]] for details.
   
==Sort vehicle list (20)==
+
=== Visual effect (21) ===
  +
See the equivalent [[Action0Trains#Visual effects and wagon power 22|train property]] for information about the meaning of all bits. There is no default effect for road vehicles, therefore values of 00..0F will show no visual effect. Bit 7 (disable wagon power) currently has no meaning and should be left at 0.
   
  +
=== Custom cargo ageing period (22) ===
See sort vehicle list for [[Action0Trains#Sort_vehicle_list_1A_|trains]] for details.
 
  +
See custom cargo ageing period for [[Action0Trains#Custom_cargo_ageing_period_.282B.29|trains]] for details.
   
==Visual effect (21)==
+
== Example ==
   
  +
To be written
See the equivalent [[Action0Trains#Visual_effects_and_wagon_power_22_|train property]] for information about the meaning of all bits. There is no default effect for road vehicles, therefore values of 00..0F will show no visual effect. Bit 7 (disable wagon power) currently has no meaning and should be left at 0.
 

Latest revision as of 21:48, 18 November 2024

Introduction

Defining properties of road vehicles.

Properties

Number Size Version Description Available for articulated parts
05 B Supported by OpenTTD 1.101.10 Not supported by TTDPatch Roadtype / tramtype (see below) should be same as front
08 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Speed in mph*3.2 no
09 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Running cost factor should be zero
0A D Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Running cost base, see below should be zero
0E B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Sprite ID (FF for new graphics) yes
0F B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Capacity yes
10 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Cargo type, see CargoTypes

GRFv≤7 For GRF version 7 and below: Type B 'cargo slot'
GRFv≥8 For GRF version 8 and above: Type A '(translated) cargo bit'
Supported by OpenTTD 15.015.0 Since 15.0, a default cargo translation table corresponding to the climate is used if one is not provided.

yes
11 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Cost factor should be zero
12 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Sound effect: 17/19/1A for regular, 3C/3E for toyland
Supported by OpenTTD 1.6 (r27507)1.6 Not supported by TTDPatch Since OpenTTD r27507 also custom sound effects from Action11 are allowed here.
no
13 B Supported by OpenTTD 1.11.1 Supported by TTDPatch 2.02.0 GRFv≥2 Power in 10 hp, see below should be zero
14 B Supported by OpenTTD 1.11.1 Supported by TTDPatch 2.02.0 GRFv≥2 Weight in 1/4 tons, see below should be zero
15 B Supported by OpenTTD 0.70.7 Supported by TTDPatch 2.02.0 GRFv≥2 Speed in mph*0.8, see below no
16 D Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 GRFv≥2 Bit mask of cargo types available for refitting (not refittable if 0 or unset), see column 2 (bit values) in CargoTypes. Obsoleted by properties 24/25 yes
17 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.52.5 GRFv≥6 Callback flags bit mask, see below yes
18 B Supported by OpenTTD 1.11.1 Supported by TTDPatch 2.5 (alpha 30)2.5 Coefficient of tractive effort should be zero
19 B Supported by OpenTTD 1.11.1 Supported by TTDPatch 2.5 (alpha 30)2.5 Coefficient of air drag should be zero
1A B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 30)2.5 Refit cost, using 25% of the purchase price cost base yes
1B B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 44)2.5 Retire vehicle early, this many years before the end of phase 2 (see Action0General) no
1C B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5 Miscellaneous vehicle flags partly ("tram" should be same as front)
1D W Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5 Refittable cargo classes, see train prop. 28 yes
1E W Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5 Non-refittable cargo classes, see train prop. 29 yes
1F D Supported by OpenTTD 0.6 (r7191)0.6 Supported by TTDPatch 2.5 (r1210)2.5 Long format introduction date no
20 B* Supported by OpenTTD 0.7 (r13831)0.7 Not supported by TTDPatch Sort the purchase list no
21 B Supported by OpenTTD 1.1 (r21240)1.1 Not supported by TTDPatch Visual effect yes
22 W Supported by OpenTTD 1.2 (r22713)1.2 Not supported by TTDPatch Custom cargo ageing period yes
23 B Supported by OpenTTD 1.2 (r23164)1.2 Not supported by TTDPatch Make vehicle shorter, see train property 21 yes
24 B n*B Supported by OpenTTD 1.2 (r23291)1.2 Not supported by TTDPatch List of always refittable cargo types, see train property 2C yes
25 B n*B Supported by OpenTTD 1.2 (r23291)1.2 Not supported by TTDPatch List of never refittable cargo types, see train property 2D yes
26 W Supported by OpenTTD 1313 Not supported by TTDPatch Vehicle variant group, see train property 2F
27 D Supported by OpenTTD 1313 Not supported by TTDPatch Extra flags, see train property 30
28 B Supported by OpenTTD 14 (g2d73076056)14 Not supported by TTDPatch Additional callback flags bit mask, see below yes
29 W Supported by OpenTTD 15 (gd2496b6ec4)15 Not supported by TTDPatch Cargo classes required for refittability, see train prop. 32 yes

Description

Roadtype or tramtype (05)

Supported by OpenTTD 1.101.10 Not supported by TTDPatch Roadtype or tramtype for the vehicle. This is an index into the roadtype or tramtype translation table.

This property:

  • will use property 1C bit 0 (flag 'vehicle is tram') to determine whether to use a roadtype or tramtype table
  • requires an appropriate roadtype or tramtype table to be loaded

Running cost base (0A) and factor (09)

TTD calculates all costs by multiplying a 48-bit base amount with an 8-bit factor.  The base amount is changed according to inflation, whereas the factor remains constant.

For the running costs of road vehicles, the following base amounts are available:

Type Value in little-endian notation
Road vehicle running cost base 4C48 48 4C 00 00

Theoretically, you could use pointers to other base amounts available in TTD, but these are the numbers TTD uses for road vehicles.

Cost factor (11)

The cost factor is a bit-coded value which determines how expensive a vehicle is. The table below gives you some values to use for finding the right price for your vehicles.

Cost factor Price
00 $ 0
01 $ 108
10 $ 1,750
20 $ 3,500
80 $ 14,000
FF $ 27,890

Realistic acceleration properties (13, 14, 15)

Using property 15 to set the speed, it is possible to achieve speeds larger than 80 mph (127 km/h), to which property 08 is limited. When setting property 15, always set property 08 as well, so that the vehicle works reasonably well whether realistic acceleration is turned on or off. If property 15 is not set, the value from property 08 is used instead.

Supported by TTDPatch TTDPatch uses these properties only if road vehicles are set to realistic acceleration in the NewCurveAndMountainHandling switch. They are ignored otherwise.

Supported by OpenTTD OpenTTD uses these properties always, if they are defined and gives the speed defined here precedence over the one defined in property 08.

Callbacks (17, 28)

For road vehicles, the following callbacks have to be enabled by setting the corresponding bit in properties 17 and 28 (certain other, not as frequently used callbacks are available without setting a bit here):

Bit Value Variable 0C value Callback
1 2 11 Wagon length
2 4 12 Load amount
3 8 15 Set refitted capacity
4 10 16 Build articulated vehicle
5 20 19 show a suffix after the cargo type name
6 40 2D Select color mapping for vehicle
7 80 33 Sound effect callbacks
8 100 161 Supported by OpenTTD 1414Engine name
9 200 163 Supported by OpenTTD 15 (gd2496b6ec4)15 Not supported by TTDPatchCustom refit

Bit is the bit you have to set, you do this by adding all the values for all the bits. Variable 0C value is what variable 0C will be set to, for checking it in the VarAction2 for callbacks.

Coefficient of tractive effort (18)

This cofficient sets what fraction of the vehicle weight is equal to the maximum tractive effort.  This includes the effect of having some unpowered axles, as well as the coefficient of friction that is available.

For a value of FF, the tractive effort is equal to the vehicle weight, for 80, it is half, and so on.  If not set, a default of 4C is used, for a fraction of 0.30, corresponding to Wadh=W and a coefficient of friction of 0.30, which is the value used by the patch before TTDPatch 2.0.1 alpha 19.

Coefficient of air drag (19)

This property sets the air drag coefficient c2 used for the realistic acceleration model, from 01 (no airdrag) to FF (most air drag) in arbitrary units.  00 means to use the default value that depends on the top speed (to simulate the fact that high-speed engines are more streamlined).

The default values are the following:

top speed (mph/1.6) <16 16 24 32 48 64 96 128 192 256 ...
c2 192 128 96 64 48 32 24 16 12 8

For higher speeds, the series is continued in the same manner.

Air drag in Newtons will then be c2*v*v with v in m/s, although it is probably futile to attempt to make c2 a realistic number due to the lack of TTd's consistent scaling.  If a vehicle doesn't reach its historical top speed, you might try setting prop. 19 one or two higher than the default above, otherwise it's probably a good idea to leave it at the default.

Refit cost (1A)

Refit cost, using 25% of the purchase price cost base. This property can be overridden by callback 15E.

Supported by OpenTTD 1.2 (r23087)1.2 Not supported by TTDPatch If the refit cost factor is set to zero and bit 4 of the miscellaneous flags (1C) is set, auto-refitting is allowed.

Miscellaneous flags (1C)

This is a bit mask, with the following bits:

Bit Value Meaning
0 1 Vehicle is a tram/light rail vehicle and requires tram tracks to operate
1 2 Uses two company colors
2 4 reserved, do not use
3 8 reserved, do not use
4 10 Supported by OpenTTD 1.2 (r23087)1.2 Not supported by TTDPatch Auto-refitting is enabled for refits where callback 15E allows it or prop 1A specifies zero cost.
5 20 Supported by OpenTTD 1.2 (r23861)1.2 Not supported by TTDPatch Use cargo multiplier for default cargo. See page about vehicle refitting.
6 40 Supported by OpenTTD 1.3 (r24124)1.3 Not supported by TTDPatch Disable breakdown smoke effect.
7 80 Supported by OpenTTD 1.7 (r27668)1.7 Not supported by TTDPatch Compose vehicle from multiple sprites.

Long format introduction date (1F)

Set the vehicle introduction date, in days since the year 0. This takes account of leap years; dividable by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). This property must be set after property 00 to take effect.

Not supported by OpenTTD Supported by TTDPatch In TTDPatch, dates after 2044 will be limited to 2044.

Sort vehicle list (20)

See sort vehicle list for trains for details.

Visual effect (21)

See the equivalent train property for information about the meaning of all bits. There is no default effect for road vehicles, therefore values of 00..0F will show no visual effect. Bit 7 (disable wagon power) currently has no meaning and should be left at 0.

Custom cargo ageing period (22)

See custom cargo ageing period for trains for details.

Example

To be written