- 1 Introduction
- 2 Properties
- 3 Description
- 4 Example
Industry tiles work similarly to town buildings, except that they are not stand-alone; they are always part of an industry.
Defining industry tiles follows the same schema as houses do: to start using an ID, you first need to define it by setting property 8 for it. If you try to reference an ID (either via action0 or via action3) that isn't defined, your request is ignored, but not reported as an error, either. This means that if you want to conditionally define an ID, all you need to do is skipping the action0 that sets property8, and everything else gets skipped automatically.
Industry tile IDs are unique within each grf file. The per-GRF ID is specified as a byte, which means no GRF can define more than 256 tile IDs. You should use your industry tile IDs sparingly. Variational action 2 variable 43 for industry tiles can help you limiting tile consumption to 2 or 3 per industry. Avoid using tile FFh, so the tileID can be turned into an extended byte (in Action 3) in the distant future without breaking your NewGRF.
|08||B||0.6 2.5||Substitute building type|
|09||B||0.6 2.5||Industry tile override|
|0A,0B,0C||W||0.6 2.5||Tile acceptance|
|0D||B||0.6 2.5||Land shape flags|
|0E||B||0.6 2.5||Callback flags|
|0F||W||0.6 2.5||Animation information|
|10||B||0.6 2.5||Animation speed.|
|11||B||0.6 2.5||Triggers for callback 25|
|12||B||0.6 2.5||Special flags|
Substitute tile type (08)
This tile type will be used instead of your new one if your definition isn't available for any reason. Valid values are 00h-AEh. 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.
Industry tile override (09)
Works like the house override property for houses.
Tile acceptance (0A, 0B, 0C)
These three words define what cargoes the tile accepts, and how much of them. The low byte defines the type of the cargo according to the current climate, while the high byte defines the degree of acceptance in 1/8 units. If you don't need all three cargo types, just zero out the high byte of the extra properties.
GRFv≥7 From GRF version 7 and above, the meaning of the low byte changes: instead of a climate-dependent cargo slot number, you have to give a climate-independent cargo ID. If your GRF has a cargo translation table, then this ID is the index in that table; otherwise, it's the cargo bit. Acceptance of cargoes not currently present will automatically be disabled.
Land shape flags (0D)
This property defines which slopes the tile can be built on.
Industry tiles are never built on steep slopes unless callback 2F is enabled, but bits 0..4 are ignored in that case.
Bit 5 can be used to allow tiles of land industries built on water or vice versa. It effectively disables the land/water check code for the tile. If you need to customize the behavior further, you can use callback 2F to decide what kind of water/land is allowed.
- PLEASE NOTE
- Be careful when setting this property. If you fail to set it correctly, your industry may end up building on a hillside, which is probably not what you want. The easiest way is to set bit 4 for middle tiles, bit 0 for the tiles along the SE edge, bit 1 for those along the SW edge and so on.
Callback flags (0E)
|0||1||use callback 26 to decide the next animation frame|
|1||2||use callback 27 to decide animation speed|
|2||4||2.5||use callback 2B to decide amount of acceptance|
|3||8||2.5||use callback 2C to decide accepted types|
|4||10||use callback 2F to check if a slope is suitable|
|5||20||use callback 30 to decide if default foundations need to be drawn|
|6||40||2.5||use callback 3C to allow or deny autosloping below the tile|
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.
Triggers for callback 25 (11)
Call callback 25 when:
Currently no trigger provides additional information in var 18.
Special flags (12)
|0||1||Callback 26 needs random bits|