Difference between revisions of "Action0/Airport Tiles"
Planetmaker (talk | contribs) |
(→Animation triggers via callback 152 (11): added new animation trigger) |
||
(15 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | == Introduction == |
||
+ | {{ottdp|1.1|ottdrev=r19204}} |
||
− | '''''Action 0 properties for airport tiles''''' |
||
− | |||
− | =Action 0 - Properties for airport tiles= |
||
− | |||
− | Defining properties of airport tiles |
||
− | |||
− | This feature is available as of OpenTTD > r19204 |
||
− | |||
− | {maketoc} |
||
− | |||
Airport tiles work like industry tiles and similarly to town buildings, except that they are not stand-alone. This means an airport tile can't stand alone, it's always part of an airport. |
Airport tiles work like industry tiles and similarly to town buildings, except that they are not stand-alone. This means an airport tile can't stand alone, it's always part of an airport. |
||
− | + | == Properties == |
|
+ | {| |- |
||
− | ||Number|Version|Size|Description |
||
+ | !Number!!Version!![[GRFActionsDetailed|Size]]!!Description |
||
+ | |- |
||
+ | |08||{{ottdp|1.1|ottdrev=r19204}}||B||Substitute airport tile type |
||
+ | |- |
||
+ | |09||{{ottdp|1.1|ottdrev=r19204}}||B||Airport tile override |
||
+ | |- |
||
+ | |0E||{{ottdp|1.1|ottdrev=r19204}}||B||Callback flags |
||
+ | |- |
||
+ | |0F||{{ottdp|1.1|ottdrev=r19204}}||W||Animation information |
||
+ | |- |
||
+ | |10||{{ottdp|1.1|ottdrev=r19204}}||B||Animation speed. |
||
+ | |- |
||
+ | |11||{{ottdp|1.1|ottdrev=r19204}}||B||Animation triggers |
||
+ | |} |
||
+ | == Descriptions == |
||
− | 08| |B|Substitute airport tile type |
||
− | + | === Substitute tile type (08) === |
|
− | |||
− | 0E| |B|Callback flags |
||
− | |||
− | 0F| |W|Animation information |
||
− | |||
− | 10| |B|Animation speed. |
||
− | |||
− | 11| |B|Animation triggers|| |
||
− | |||
− | -=Comments=- |
||
− | |||
− | ==Substitute tile type (08)== |
||
This tile type will be used instead of your new one if your definition isn't available for any reason. Assigning this property copies the properties of the old type just like it does with houses. If this tile's action 3 appears before this property is set, the action 3 will have no effect. |
This tile type will be used instead of your new one if your definition isn't available for any reason. Assigning this property copies the properties of the old type just like it does with houses. If this tile's action 3 appears before this property is set, the action 3 will have no effect. |
||
− | ==Airport tile override (09)== |
+ | === Airport tile override (09) === |
Works like the house override property for houses and industry tiles. |
Works like the house override property for houses and industry tiles. |
||
− | ==Callback flags (0E)== |
+ | === Callback flags (0E) === |
+ | {| |- |
||
− | ||Bit|value|meaning |
||
+ | !Bit!!value!!version!!meaning |
||
+ | |- |
||
+ | |0||1||{{ottdp|1.1|ottdrev=r19204}}||use [[Callbacks#Next animation frame (1A/26/141/153/158) |callback 153]] to decide the next animation frame |
||
+ | |- |
||
+ | |1||2||{{ottdp|1.1|ottdrev=r19204}}||use [[Callbacks#Length of animation frame (20/27/142/154/15A) |callback 154]] to decide animation speed |
||
+ | |- |
||
+ | |2||4||{{ottdp}}||(reserved) |
||
+ | |- |
||
+ | |3||8||{{ottdp}}||(reserved) |
||
+ | |- |
||
+ | |4||10||{{ottdp|1.1|ottdrev=r19204}}||use callback xx to check if a slope is suitable (not yet implemented) |
||
+ | |- |
||
+ | |5||20||{{ottdp|1.1|ottdrev=r19204}}||use [[Callbacks#Decide drawing default foundations (30/14E/150) |callback 150]] to decide if default foundations need to be drawn |
||
+ | |- |
||
+ | |6||40||{{ottdp|1.1|ottdrev=r19204}}||use callback xx to allow or deny autosloping below the tile (not yet implemented) |
||
+ | |} |
||
+ | Please note that callback 152 doesn't have a bit here. To use [[Callbacks#Animation control (1B/25/140/152/159) |callback 152]], simply set the wanted bits in property 11 and it will work as intended. |
||
− | 0|1|use callback 153 to decide the next animation frame |
||
+ | === Animation information (0F) === |
||
− | 1|2|use callback 154 to decide animation speed |
||
− | |||
− | 2|4|(unused) |
||
− | |||
− | 3|8|(unused) |
||
− | |||
− | 4|10|use callback xx to check if a slope is suitable (not yet implemented) |
||
− | |||
− | 5|20|use callback 150 to decide if default foundations need to be drawn |
||
− | |||
− | 6|40|use callback xx to allow or deny autosloping below the tile (not yet implemented)|| |
||
− | |||
− | Please note that callback 153 doesn't have a bit here. To use callback 153, simply set the wanted bits in property 11 and it will work as intended. |
||
− | |||
− | ==Animation information (0F)== |
||
The low byte specifies the number of animation frames minus one, so 00 means 1 frame, 01 means 2 frames etc. The maximum number of frames is 256, although you can have some problems if your animation exceeds FD (253) frames. The high byte must be 0 for non-looping animations and 01 for looping animations. Every other value is reserved for future use. In addition, if the whole word contains FFFF, animation is turned off for this tile (this is the default value). |
The low byte specifies the number of animation frames minus one, so 00 means 1 frame, 01 means 2 frames etc. The maximum number of frames is 256, although you can have some problems if your animation exceeds FD (253) frames. The high byte must be 0 for non-looping animations and 01 for looping animations. Every other value is reserved for future use. In addition, if the whole word contains FFFF, animation is turned off for this tile (this is the default value). |
||
− | ==Animation speed (10)== |
+ | === Animation speed (10) === |
The meaning is the same as for house property 1B, but the lower limit is 0 instead of 2, so the fastest possible animation changes frames every game tick (27ms). The default value is 2. |
The meaning is the same as for house property 1B, but the lower limit is 0 instead of 2, so the fastest possible animation changes frames every game tick (27ms). The default value is 2. |
||
− | ==Animation triggers via callback |
+ | === Animation triggers via [[Callback:_Animation_control |callback 152]] (11) === |
− | |||
− | This shares some flags with industry tiles and others with stations. Call callback 153 when: |
||
− | |||
− | ||Bit|Value|Meaning |
||
− | |||
− | 0|1|airport was just constructed |
||
+ | This shares some flags with industry tiles and others with stations. Call [[Callback:_Animation_control|callback 152]] when: |
||
− | 1|2|the tile is processed in the periodic processing loop |
||
+ | {| |- |
||
− | 2|4|new cargo arrives at the station (for all airport tiles the same) |
||
+ | !Bit!!Value!!Version!!Meaning!!Var 18 |
||
+ | |- |
||
+ | |0||1||{{ottdp|1.1|ottdrev=r19204}}||airport was just constructed|| |
||
+ | |- |
||
+ | |1||2||{{ottdp|1.1|ottdrev=r19204}}||the tile is processed in the periodic processing loop|| |
||
+ | |- |
||
+ | |2||4||{{ottdp|1.1|ottdrev=r19204}}||new cargo arrives at the station (for all airport tiles the same)||<ref name="cargotype">Bits 8..15 of var 18 contain the triggering cargo type. If your GRF has a cargo translation table, the cargo type will be an index in that table, or FFh if the cargo isn't in the table. If you don't have a cargo translation table, the cargo type will simply be the climate-dependent cargo type number.</ref> |
||
+ | |- |
||
+ | |3||8||{{ottdp|1.1|ottdrev=r19204}}||a cargo type gets removed from the station (for all airport tiles the same)||<ref name="cargotype"/> |
||
+ | |- |
||
+ | |4||10||{{ottdp|1.1|ottdrev=r19204}}||every 250 ticks (for all airport tiles the same)|| |
||
+ | |- |
||
+ | |5||20||{{ottdp|1.9}}||Triggered when an airplane (not a helicopter!) lands at airport (single tile only)|| |
||
+ | |} |
||
+ | <references/> |
||
− | 3|8|a cargo type gets removed from the station (for all airport tiles the same) |
||
+ | == Example == |
||
− | 4|10|every 250 ticks (for all airport tiles the same)|| |
Latest revision as of 22:48, 22 December 2019
Introduction
1.1 Airport tiles work like industry tiles and similarly to town buildings, except that they are not stand-alone. This means an airport tile can't stand alone, it's always part of an airport.
Properties
Number | Version | Size | Description |
---|---|---|---|
08 | 1.1 | B | Substitute airport tile type |
09 | 1.1 | B | Airport tile override |
0E | 1.1 | B | Callback flags |
0F | 1.1 | W | Animation information |
10 | 1.1 | B | Animation speed. |
11 | 1.1 | B | Animation triggers |
Descriptions
Substitute tile type (08)
This tile type will be used instead of your new one if your definition isn't available for any reason. Assigning this property copies the properties of the old type just like it does with houses. If this tile's action 3 appears before this property is set, the action 3 will have no effect.
Airport tile override (09)
Works like the house override property for houses and industry tiles.
Callback flags (0E)
Bit | value | version | meaning |
---|---|---|---|
0 | 1 | 1.1 | use callback 153 to decide the next animation frame |
1 | 2 | 1.1 | use callback 154 to decide animation speed |
2 | 4 | (reserved) | |
3 | 8 | (reserved) | |
4 | 10 | 1.1 | use callback xx to check if a slope is suitable (not yet implemented) |
5 | 20 | 1.1 | use callback 150 to decide if default foundations need to be drawn |
6 | 40 | 1.1 | use callback xx to allow or deny autosloping below the tile (not yet implemented) |
Please note that callback 152 doesn't have a bit here. To use callback 152, simply set the wanted bits in property 11 and it will work as intended.
Animation information (0F)
The low byte specifies the number of animation frames minus one, so 00 means 1 frame, 01 means 2 frames etc. The maximum number of frames is 256, although you can have some problems if your animation exceeds FD (253) frames. The high byte must be 0 for non-looping animations and 01 for looping animations. Every other value is reserved for future use. In addition, if the whole word contains FFFF, animation is turned off for this tile (this is the default value).
Animation speed (10)
The meaning is the same as for house property 1B, but the lower limit is 0 instead of 2, so the fastest possible animation changes frames every game tick (27ms). The default value is 2.
Animation triggers via callback 152 (11)
This shares some flags with industry tiles and others with stations. Call callback 152 when:
Bit | Value | Version | Meaning | Var 18 |
---|---|---|---|---|
0 | 1 | 1.1 | airport was just constructed | |
1 | 2 | 1.1 | the tile is processed in the periodic processing loop | |
2 | 4 | 1.1 | new cargo arrives at the station (for all airport tiles the same) | [1] |
3 | 8 | 1.1 | a cargo type gets removed from the station (for all airport tiles the same) | [1] |
4 | 10 | 1.1 | every 250 ticks (for all airport tiles the same) | |
5 | 20 | 1.9 | Triggered when an airplane (not a helicopter!) lands at airport (single tile only) |
- ↑ 1.0 1.1 Bits 8..15 of var 18 contain the triggering cargo type. If your GRF has a cargo translation table, the cargo type will be an index in that table, or FFh if the cargo isn't in the table. If you don't have a cargo translation table, the cargo type will simply be the climate-dependent cargo type number.