Difference between revisions of "Action0/Vehicles/Planes"

From GRFSpecs
Jump to navigationJump to search
m (13 revisions)
(table and style)
Line 1: Line 1:
 
'''''Action 0 properties for planes'''''
 
 
 
=Action 0 - Properties for planes=
 
=Action 0 - Properties for planes=
   
 
Defining properties of planes.
 
Defining properties of planes.
   
  +
=Properties=
{maketoc}
 
   
  +
{| |-
-=Properties=-
 
  +
!Number!!Version!!Size!!Description
 
  +
|-
||Number|Version|Size|Description
 
  +
|08|| ||B||Sprite (FF for new graphics)
 
  +
|-
08| |B|Sprite (FF for new graphics)
 
  +
|09|| ||B||Is helicopter? 2=no, 0=yes
 
  +
|-
09| |B|Is helicopter? 2=no, 0=yes
 
  +
|0A|| ||B||Is large? 0=no, 1=yes (i.e. can't safely land on small airports)
 
  +
|-
0A| |B|Is large? 0=no, 1=yes (i.e. can't safely land on small airports)
 
  +
|0B|| ||B||Cost factor
 
  +
|-
0B| |B|Cost factor
 
  +
|0C|| ||B||Speed in mph*8
 
  +
|-
0C| |B|Speed in mph*8
 
  +
|0D|| ||B||Acceleration
 
  +
|-
0D| |B|Acceleration
 
  +
|0E|| ||B||Running cost factor
 
  +
|-
0E| |B|Running cost factor
 
  +
|0F|| ||W||Passenger capacity
 
  +
|-
0F| |W|Passenger capacity
 
  +
|11|| ||B||Mail capacity
 
  +
|-
11| |B|Mail capacity
 
  +
|12|| ||B||Sound effect
 
  +
|-
12| |B|Sound effect
 
  +
|13||6||D||Bit mask of cargo types available for refitting, see column 2 (Bit Value) in [[CargoTypes]]
 
  +
|-
13|6|D|Bit mask of cargo types available for refitting, see column 2 (Bit Value) in [[CargoTypes]]
 
  +
|14||6||B||Callback flags bit mask, see below
 
  +
|-
14|6|B|Callback flags bit mask, see below
 
  +
|15||(a)||B||Refit cost, using 1/32 of the default refit cost base
 
  +
|-
15|(a)|B|Refit cost, using 1/32 of the default refit cost base
 
  +
|16||(b)||B||Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])
 
  +
|-
16|(b)|B|Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])
 
  +
|17||(c)||B||Miscellaneous vehicle flags
 
  +
|-
17|(c)|B|Miscellaneous vehicle flags
 
  +
|18||(c)||W||Refittable cargo classes, see [[Action0Trains#Cargo_classes_28_29_|train prop. 28]]
 
  +
|-
18|(c)|W|Refittable cargo classes, see [[Action0Trains#Cargo_classes_28_29_|train prop. 28]]
 
  +
|19||(c)||W||Non-refittable cargo classes, see [[Action0Trains#Cargo_classes_28_29_|train prop. 29]]
 
  +
|-
19|(c)|W|Non-refittable cargo classes, see [[Action0Trains#Cargo_classes_28_29_|train prop. 29]]
 
  +
|1A||(d)||D||Long format introduction date
 
  +
|-
1A|(d)|D|Long format introduction date
 
  +
|1B||(e)||B*||Sort the purchase list
 
  +
|}
1B|(e)|B*|Sort the purchase list||
 
   
 
Version codes:
 
Version codes:
   
  +
{| |-
||Code|Version
 
  +
!Code!!Version
  +
|-
  +
|(a)||TTDPatch 2.0.1 alpha 30
  +
|-
  +
|(b)||TTDPatch 2.0.1 alpha 44
  +
|-
  +
|(c)||TTDPatch 2.0.1 alpha 58
  +
|-
  +
|(d)||TTDPatch 2.5 r1210, OpenTTD r7191
  +
|-
  +
|(e)||OpenTTD r13831
  +
|}
   
  +
=Comments=
(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||
 
 
-=Comments=-
 
   
 
==Sound effect (12)==
 
==Sound effect (12)==
Line 70: Line 69:
 
The following sound effects are used by planes (note, the setting is ignored for helicopters):
 
The following sound effects are used by planes (note, the setting is ignored for helicopters):
   
  +
{| |-
||Number|Sound
 
  +
!Number!!Sound
 
  +
|-
06|Propeller sound 1
 
  +
|06||Propeller sound 1
 
  +
|-
07|Jet sound 1
 
  +
|07||Jet sound 1
 
  +
|-
3B|Supersonic
 
  +
|3B||Supersonic
 
  +
|-
3D|Jet sound 2
 
  +
|3D||Jet sound 2
 
  +
|-
45|Propeller sound 2
 
  +
|45||Propeller sound 2
 
  +
|-
46|Jet sound 3||
 
  +
|46||Jet sound 3
  +
|}
   
 
==Callbacks (14)==
 
==Callbacks (14)==
 
 
For planes, the following [[Callbacks|callbacks]] have to be enabled by setting the corresponding bit in property 14 (certain other, not as frequently used callbacks are available without setting a bit here)::
 
For planes, the following [[Callbacks|callbacks]] have to be enabled by setting the corresponding bit in property 14 (certain other, not as frequently used callbacks are available without setting a bit here)::
   
  +
{| |-
||Bit|Value|Variable 0C value|Callback
 
  +
!Bit!!Value!!Variable 0C value!!Callback
 
  +
|-
2|4|12|Load amount
 
  +
|2||4||12||Load amount
 
  +
|-
3|8|15|Set refitted capacity
 
  +
|3||8||15||Set refitted capacity
 
  +
|-
5|20|19|show a suffix after the cargo type name
 
  +
|5||20||19||show a suffix after the cargo type name
 
  +
|-
6|40|2D|Select color mapping for vehicle
 
  +
|6||40||2D||Select color mapping for vehicle
 
  +
|-
7|80|33|Sound effect callbacks||
 
  +
|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.
 
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.
Line 106: Line 108:
 
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|reserved, do not use
 
  +
|0||1||reserved, do not use
 
  +
|-
1|2|Uses two company colors||
 
  +
|1||2||Uses two company colors
  +
|}
   
 
==Long format introduction date (1A)==
 
==Long format introduction date (1A)==
Line 117: Line 121:
   
 
==Sort vehicle list (1B)==
 
==Sort vehicle list (1B)==
 
 
See sort vehicle list for [[Action0Trains#Sort_vehicle_list_1A_|trains]] for details.
 
See sort vehicle list for [[Action0Trains#Sort_vehicle_list_1A_|trains]] for details.

Revision as of 09:36, 13 June 2011

Action 0 - Properties for planes

Defining properties of planes.

Properties

Number Version Size Description
08 B Sprite (FF for new graphics)
09 B Is helicopter? 2=no, 0=yes
0A B Is large? 0=no, 1=yes (i.e. can't safely land on small airports)
0B B Cost factor
0C B Speed in mph*8
0D B Acceleration
0E B Running cost factor
0F W Passenger capacity
11 B Mail capacity
12 B Sound effect
13 6 D Bit mask of cargo types available for refitting, see column 2 (Bit Value) in CargoTypes
14 6 B Callback flags bit mask, see below
15 (a) B Refit cost, using 1/32 of the default refit cost base
16 (b) B Retire vehicle early, this many years before the end of phase 2 (see Action0General)
17 (c) B Miscellaneous vehicle flags
18 (c) W Refittable cargo classes, see train prop. 28
19 (c) W Non-refittable cargo classes, see train prop. 29
1A (d) D Long format introduction date
1B (e) B* Sort the purchase list

Version codes:

Code Version
(a) TTDPatch 2.0.1 alpha 30
(b) TTDPatch 2.0.1 alpha 44
(c) TTDPatch 2.0.1 alpha 58
(d) TTDPatch 2.5 r1210, OpenTTD r7191
(e) OpenTTD r13831

Comments

Sound effect (12)

The following sound effects are used by planes (note, the setting is ignored for helicopters):

Number Sound
06 Propeller sound 1
07 Jet sound 1
3B Supersonic
3D Jet sound 2
45 Propeller sound 2
46 Jet sound 3

Callbacks (14)

For planes, the following callbacks have to be enabled by setting the corresponding bit in property 14 (certain other, not as frequently used callbacks are available without setting a bit here)::

Bit Value Variable 0C value Callback
2 4 12 Load amount
3 8 15 Set refitted capacity
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.

Miscellaneous flags (17)

This is a bit mask, with the following bits:

Bit Value Meaning
0 1 reserved, do not use
1 2 Uses two company colors

Long format introduction date (1A)

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.

Sort vehicle list (1B)

See sort vehicle list for trains for details.