This document describes the non-standard addition of the NewGRF new landscape feature to the Official OpenTTD NewGRF Specifications, as implemented in this patchpack.
This feature allows NewGRF custom graphics using Action 1/2/3 for landscape tiles. Currently this includes: rock tiles.
This feature may not necessarily match implementations of additional landscape graphics features in other patches, branches, etc.
This feature as implemented here MAY also be present in other patchpacks.
See the NewGRF additions document for background information on additions to the NewGRF specifications.
The functionality listed below is also supported in a fork of NML, see the associated NML new landscape and NML additions documents for more details.
NewGRFs which use this feature SHOULD use the feature testing mechanism to check whether the new landscape feature and/or feature ID mapping is supported.
NewGRFs which use this feature MUST use the feature ID mapping mechanism to map the non-standard NewGRF road stop feature to a local feature ID.
This feature is indicated by the feature name: new_landscape, version 1.
The feature name to use for feature ID mapping is new_landscape.
Features/properties/variables which require a higher version will indicate the required version. Unless indicated otherwise these will fall back to doing nothing on versions which do not support them.
ID | Landscape type |
---|---|
0 | Rocky tiles |
See the Action 0 Specification for background information.
Properties:Mappable name | Size in bytes | Description |
---|---|---|
newlandscape_enable_recolour | 1 | Enable recolour |
When enabled, in addition to returning a sprite, register 0x100 may be set to the following:
Bits | Meaning |
---|---|
0 - 23 | Recolour sprite to use. Set to 0 for no recolouring. |
24 - 31 | Reserved, set to zero. |
The property length is 1 byte. 0 is disabled (default). 1 is enabled.
See the Action 2 Specification for background information.
New landscape does not use the special sprite layout format.
See the Variational Action 2 Specification for background information.
Variables:Number | Mappable name | Description |
---|---|---|
40 | newlandscape_terrain_type | Terrain type |
41 | newlandscape_tile_slope | Tile Slope |
42 | newlandscape_tile_height | Tile Height |
43 | newlandscape_tile_hash | Tile Hash |
44 | newlandscape_landscape_type | Landscape Type |
60 | newlandscape_land_info_nearby_tiles | Land info of nearby tiles |
This has the same value as bits 0 - 7 of object (feature F) variable 41.
Value | Meaning |
---|---|
0 | Normal |
1 | Desert |
2 | Rainforest |
4 | On or above snowline |
This has the same value as bits 0 - 7 of industry tile (feature 9) variable 60 for this tile.
The height of the lowest corner of the tile (in units of 1).
Hash value derived from the coordinates of the tile, suitable for pseudo-randomising graphics.
This has the same value as industry tile (feature 9) variable 60.
See the Action 3 Specification for background information.
Note that this is not a generic callback, the sprite group must be assigned to an ID in the IDs table.
Action 3 ID | Expected number of sprites | Landscape type |
---|---|---|
0 | 19 | Rocky tiles |
This is indicated by the feature name: new_landscape, version 1