Difference between revisions of "Action0/Vehicles/Planes"

From GRFSpecs
Jump to navigationJump to search
m (13 revisions)
(27 intermediate revisions by 7 users not shown)
Line 1: Line 1:
  +
<div style="float:right; padding-left:12px; background:none;">{{NFONavVehicles}}</div>
   
  +
== Introduction ==
'''''Action 0 properties for planes'''''
 
 
=Action 0 - Properties for planes=
 
   
 
Defining properties of planes.
 
Defining properties of planes.
   
  +
== Properties ==
{maketoc}
 
   
  +
{| |-
-=Properties=-
 
  +
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description
  +
|-
  +
|08||B||{{ottdp|0.6|2.0}}||Sprite (FF for new graphics)
  +
|-
  +
|09||B||{{ottdp|0.6|2.0}}||Is helicopter? 2=no, 0=yes
  +
|-
  +
|0A||B||{{ottdp|0.6|2.0}}||Is large? 0=no, 1=yes (i.e. can't safely land on small airports)
  +
|-
  +
|0B||B||{{ottdp|0.6|2.0}}||Cost factor
  +
|-
  +
|0C||B||{{ottdp|0.6|2.0}}||Speed in units of 8 mph, that is: property = (speed in mph) / 8
  +
|-
  +
|0D||B||{{ottdp|0.6|2.0}}||Acceleration in units of 3/8 mph/tick, that is: property = (acceleration in mph/tick) * 8/3 <ref>{{ottd|&lt;1.3.1}} In OpenTTD before r25115 the units for acceleration were messed up. The unit used was about 1 mph/tick, so aircraft accelerated more than twice as fast. Also values bigger than 19 failed.</ref>
  +
|-
  +
|0E||B||{{ottdp|0.6|2.0}}||Running cost factor
  +
|-
  +
|0F||W||{{ottdp|0.6|2.0}}||Primary cargo capacity (passenger or refitted cargo)
  +
|-
  +
|11||B||{{ottdp|0.6|2.0}}||Secondary cargo capacity (mail)
  +
|-
  +
|12||B||{{ottdp|0.6|2.0}}||Sound effect
  +
|-
  +
|13||D||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Bit mask of cargo types available for refitting, see column 2 (Bit Value) in [[CargoTypes]]
  +
|-
  +
|14||B||{{ottdp|0.6|2.5}} {{grfFrom|6}}||Callback flags bit mask, see below
  +
|-
  +
|15||B||{{ottdp|0.6|2.5|ttdprev=alpha 30}}||Refit cost, using 1/32 of the default refit cost base
  +
|-
  +
|16||B||{{ottdp|0.6|2.5|ttdprev=alpha 44}}||Retire vehicle early, this many years before the end of phase 2 (see [[Action0General]])
  +
|-
  +
|17||B||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Miscellaneous vehicle flags
  +
|-
  +
|18||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Refittable cargo classes, see [[Action0Trains#Cargo classes 28 29|train prop. 28]]
  +
|-
  +
|19||W||{{ottdp|0.6|2.5|ttdprev=alpha 58}}||Non-refittable cargo classes, see [[Action0Trains#Cargo classes 28 29|train prop. 29]]
  +
|-
  +
|1A||D||{{ottdp|0.6|2.5|ttdprev=r1210|ottdrev=r7191}}||Long format introduction date
  +
|-
  +
|1B||B*||{{ottdp|0.7|no|ottdrev=r13831}}||Sort the purchase list
  +
|-
  +
|1C||W||{{ottdp|1.2|no|ottdrev=r22713}}||Custom cargo ageing period
  +
|-
  +
|1D||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]]
  +
|-
  +
|1E||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]]
  +
|-
  +
|1F||W||{{ottdp|1.2|no|ottdrev=r23504}}||Aircraft range in tiles. Distance is euclidean, a value of 0 means range is unlimited
  +
|}
   
  +
<references/>
||Number|Version|Size|Description
 
   
  +
== Descriptions ==
08| |B|Sprite (FF for new graphics)
 
   
  +
=== Primary (0F) and secondary (11) cargo capacity ===
09| |B|Is helicopter? 2=no, 0=yes
 
  +
Aircraft can transport up to two cargo types.
  +
The first (primary) cargo type can be changed when refitting the aircraft.
   
  +
The secondary cargo type is always mail, and is only present when the primary cargo type is part of the [[Action0/Cargos#CargoClasses_.2816.29|passenger cargo class]].
0A| |B|Is large? 0=no, 1=yes (i.e. can't safely land on small airports)
 
   
  +
See also the page about [[VehicleRefitting|vehicle refitting]].
0B| |B|Cost factor
 
   
  +
=== Sound effect (12) ===
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 [[Action0Trains#Cargo_classes_28_29_|train prop. 28]]
 
 
19|(c)|W|Non-refittable cargo classes, see [[Action0Trains#Cargo_classes_28_29_|train prop. 29]]
 
 
1A|(d)|D|Long format introduction date
 
 
1B|(e)|B*|Sort the purchase list||
 
 
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||
 
 
-=Comments=-
 
 
==Sound effect (12)==
 
   
 
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
  +
|-
  +
|07||Jet sound 1
  +
|-
  +
|3B||Supersonic
  +
|-
  +
|3D||Jet sound 2
  +
|-
  +
|45||Propeller sound 2
  +
|-
  +
|46||Jet sound 3
  +
|}
   
  +
{{ottdp|1.6|no|ottdrev=r27507}} Since OpenTTD r27507 also custom sound effects from Action11 are allowed here.
06|Propeller sound 1
 
   
  +
{{ottdp|1.11|no|ottdrev=6198a47}} Since OpenTTD g6198a47 this prop can be used to to set custom Action11 sound effects for helicopers. Default sound effects are ignored as before.
07|Jet sound 1
 
   
  +
=== Callbacks (14) ===
3B|Supersonic
 
  +
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)::
   
  +
{| |-
3D|Jet sound 2
 
  +
!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 VarAction2 for callbacks.
45|Propeller sound 2
 
   
  +
=== Refit cost (15) ===
46|Jet sound 3||
 
   
  +
Refit cost, using 1/32 of the default refit cost base. This property can be overridden by callback 15E.
==Callbacks (14)==
 
   
  +
{{ottdp|1.2|no|ottdrev=r23087}} If the refit cost factor is set to zero and bit 4 of the miscellaneous flags (17) is set, auto-refitting is allowed.
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)::
 
   
  +
=== Miscellaneous flags (17) ===
||Bit|Value|Variable 0C value|Callback
 
   
  +
This is a bit mask, with the following bits:
2|4|12|Load amount
 
   
  +
{| |-
3|8|15|Set refitted capacity
 
  +
!Bit!!Value!!Meaning
 
  +
|-
5|20|19|show a suffix after the cargo type name
 
  +
|0||1||reserved, do not use
 
  +
|-
6|40|2D|Select color mapping for vehicle
 
  +
|1||2||Uses two company colors
 
  +
|-
7|80|33|Sound effect callbacks||
 
  +
|2||4||reserved, do not use
 
  +
|-
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.
 
  +
|3||8||reserved, do not use
 
  +
|-
==Miscellaneous flags (17)==
 
  +
|4||10||{{ottdp|1.2|no|ottdrev=r23087}} Auto-refitting is enabled for refits where callback 15E allows it or prop 15 specifies zero cost.
 
  +
|-
This is a bit mask, with the following bits:
 
  +
|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.]]
  +
Note: This also applies to the rotor sprite, if custom rotor sprites are used.
  +
|}
   
  +
=== Long format introduction date (1A) ===
||Bit|Value|Meaning
 
   
  +
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.
0|1|reserved, do not use
 
   
  +
{{ottdp|no|}} In TTDPatch, dates after 2044 will be limited to 2044.
1|2|Uses two company colors||
 
   
==Long format introduction date (1A)==
+
=== Sort vehicle list (1B) ===
  +
See sort vehicle list for [[Action0Trains#Sort vehicle list 1A|trains]] for details.
   
  +
=== Custom cargo ageing period (1C) ===
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 custom cargo ageing period for [[Action0Trains#Custom_cargo_ageing_period_.282B.29|trains]] for details.
   
==Sort vehicle list (1B)==
+
== Example ==
   
  +
To be written
See sort vehicle list for [[Action0Trains#Sort_vehicle_list_1A_|trains]] for details.
 

Revision as of 19:35, 6 December 2020

Introduction

Defining properties of planes.

Properties

Number Size Version Description
08 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Sprite (FF for new graphics)
09 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Is helicopter? 2=no, 0=yes
0A B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Is large? 0=no, 1=yes (i.e. can't safely land on small airports)
0B B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Cost factor
0C B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Speed in units of 8 mph, that is: property = (speed in mph) / 8
0D B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Acceleration in units of 3/8 mph/tick, that is: property = (acceleration in mph/tick) * 8/3 [1]
0E B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Running cost factor
0F W Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Primary cargo capacity (passenger or refitted cargo)
11 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Secondary cargo capacity (mail)
12 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.02.0 Sound effect
13 D Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.52.5 GRFv≥6 Bit mask of cargo types available for refitting, see column 2 (Bit Value) in CargoTypes
14 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.52.5 GRFv≥6 Callback flags bit mask, see below
15 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 30)2.5 Refit cost, using 1/32 of the default refit cost base
16 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)
17 B Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5 Miscellaneous vehicle flags
18 W Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5 Refittable cargo classes, see train prop. 28
19 W Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.5 (alpha 58)2.5 Non-refittable cargo classes, see train prop. 29
1A D Supported by OpenTTD 0.6 (r7191)0.6 Supported by TTDPatch 2.5 (r1210)2.5 Long format introduction date
1B B* Supported by OpenTTD 0.7 (r13831)0.7 Not supported by TTDPatch Sort the purchase list
1C W Supported by OpenTTD 1.2 (r22713)1.2 Not supported by TTDPatch Custom cargo ageing period
1D 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
1E 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
1F W Supported by OpenTTD 1.2 (r23504)1.2 Not supported by TTDPatch Aircraft range in tiles. Distance is euclidean, a value of 0 means range is unlimited
  1. Supported by OpenTTD <1.3.1<1.3.1 In OpenTTD before r25115 the units for acceleration were messed up. The unit used was about 1 mph/tick, so aircraft accelerated more than twice as fast. Also values bigger than 19 failed.

Descriptions

Primary (0F) and secondary (11) cargo capacity

Aircraft can transport up to two cargo types. The first (primary) cargo type can be changed when refitting the aircraft.

The secondary cargo type is always mail, and is only present when the primary cargo type is part of the passenger cargo class.

See also the page about vehicle refitting.

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

Supported by OpenTTD 1.6 (r27507)1.6 Not supported by TTDPatch Since OpenTTD r27507 also custom sound effects from Action11 are allowed here.

Supported by OpenTTD 1.11 (6198a47)1.11 Not supported by TTDPatch Since OpenTTD g6198a47 this prop can be used to to set custom Action11 sound effects for helicopers. Default sound effects are ignored as before.

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 VarAction2 for callbacks.

Refit cost (15)

Refit cost, using 1/32 of the default refit 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 (17) is set, auto-refitting is allowed.

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
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 15 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.

Note: This also applies to the rotor sprite, if custom rotor sprites are used.

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.

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

Sort vehicle list (1B)

See sort vehicle list for trains for details.

Custom cargo ageing period (1C)

See custom cargo ageing period for trains for details.

Example

To be written