docs/landscape.html
For a graphical representation of the tile-layout have a look at Landscape grid page.
Nine attributes (counting "type" and "height") hold the information about a tile.
These attributes are referred to as "type", "height", "m1", "m2", "m3", "m4", "m5", "m6" and "m7".
The most important value is the class of a tile, stored in the upper 4 bits of the type attribute.
Frequently repeating patterns:
| The tile type. | | 00 | Ground | | 01 | Railway tracks | | 02 | Roads | | 03 | Town building | | 04 | Trees | | 05 | Station tiles | | 06 | Water | | 07 | Void | | 08 | Industries | | 09 | Tunnel / bridge | | 0A | Objects |
Bits 3..2:
| Presence and direction of bridge above. | | 00 | no bridge | | 01 | Axis X (North-East) | | 02 | Axis Y (South-West) |
| Only meaningful in tropic climate. It contains the definition of the available zones | | 00 | normal | | 01 | desert | | 02 | rainforest |
In any other climate these 2 bits are theoretically free of use, however using them does not seem useful.
| The type of water that is on a tile. | | 00 | Sea | | 01 | Canal | | 02 | River | | 03 | Invalid, i.e. no water on this tile |
Some tiles, such as houses, reuse these bits of other purposes.
| The owner of a tile can be either companies (human or AI) or "Game entities". | | 00..0E | Normal companies | | 0F | a town owns the tile | | 10 | nobody owns the tile | | 11 | "water" owns the tile | | FF | spectator in MP or in scenario editor |
Some tiles, such as houses and industries, reuse these bits of other purposes.
m4:
Road roadtype. Used for all tiles with road (road, station, tunnelbridge).
m8:
Tram roadtype. Used for all tiles with road (road, station, tunnelbridge).
m8:
m7:
Animation frame/state. Used for houses, industries, objects and stations.
OTTD's class-specific periodic tile processing routine is called once every +256 ticks for each tile.
| Class | Meaning & details of encoding |
|---|---|
| 0 | Ground |
| 0 | bare land / grass | | 1 | rough land (density must be 3) | | 2 | rocks (density must be 3) | | 3 | fields (density must be 3)
| | 4 | snow | | 5 | desert (density must be 1 or 3) |
| 0 | bare land | | | | 1/4 snow | | | 1 | 1/3 grass | | | | 2/4 snow; | 1/2 desert | | 2 | 2/3 grass | | | | 3/4 snow | | | 3 | full grass; | rough land; | rocks; | fields; | full snow; | full desert |
| | 1 | Railway tracks | | |
| 0 | conventional railway | | 1 | electrified railway | | 2 | monorail | | 3 | maglev |
| 0 | on bare land | | 1 | on grass, no fences | | 2 | fence on the NW side | | 3 | fence on the SE side | | 4 | fences on the NW and SE sides | | 5 | fence on the NE side | | 6 | fence on the SW side | | 7 | fences on the NE and SW sides | | 8 | fence on the E side (track in the W corner) | | 9 | fence on the W side (track in the E corner) | | A | fence on the S side (track in the N corner) | | B | fence on the N side (track in the S corner) | | C | on snow or desert | | D | on grass with fence and shore or water on the free halftile | | E | higher part on foundation with snow, lower without snow |
| bit 0: | in the X direction | | bit 1: | in the Y direction | | bit 2: | in the north corner (direction W-E) | | bit 3: | in the south corner (direction W-E) | | bit 4: | in the west corner (direction N-S) | | bit 5: | in the east corner (direction N-S) |
| | Track 0 (X) | Track 1 (Y) | Track 2 (north) | Track 3 (south) | Track 4 (west) | Track 5 (east) | | Signal 0 | | | | west | | south | | Signal 1 | | | | east | | north | | Signal 2 | south-west | north-west | west | | south | | | Signal 3 | north-east | south-east | east | | north | |
- m2 bit 7: Signal 0 and 1: set = semaphore signals, clear = light signals
- m2 bit 3: Signal 2 and 3: set = semaphore signals, clear = light signals
- m2 bits 6..4: type of signal 0 and 1 (same values as m2 bits 2..0)
- m2 bits 2..0: type of signal 2 and 3
| 000: | normal signals | | 001: | pre-signals | | 010: | exit-signals | | 011: | combo-signals | | 100: | pbs signals | | 101: | no-entry signals |
- m3 bits 7..4: bit set = signal 3..0 present
- m4 bits 7..4: bit clear = signal 3..0 shows red
| 0 | not reserved | | 1 | X direction | | 2 | Y direction | | 3 | north corner (W-E) | | 4 | south corner (W-E) | | 5 | west corner (N-S) | | 6 | east corner (N-S) |
m2 bit 11: opposite track is reserved, too
m5 bit 7 set, bit 6 set: railway depot
| 0 | NE | | 1 | SE | | 2 | SW | | 3 | NW |
| | 2 | Roads | | |
| 0 | on bare land | | 1 | on grass | | 2 | paved | | 3 | with streetlights | | 5 | tree-lined | | 6 | on grass with road works | | 7 | paved with road works |
| bit 0: | NW piece | | bit 1: | SW piece | | bit 2: | SE piece | | bit 3: | NE piece |
- m3 bits 0..3: road layout road type 1 (tram)
- m5 bits 5..4: bits to disallow vehicles to go a specific direction
| bit 0: | set = disallow driving in south-west or south-east direction | | bit 1: | set = disallow driving in north-west or north-east direction |
| 0 | road in the X direction, rail in Y | | 1 | road in the Y direction, rail in X |
- m7 bits 4..0: [owner](#OwnershipInfo) of the road type 0 (normal road)
- m8 bits 5..0: [railway track type](#TrackType)
| 0 | NE | | 1 | SE | | 2 | SW | | 3 | NW |
| | 3 | Town building | | |
m1 : Random bits (newhouses)
m2 : index into the array of towns
m3 bit 7 :
set : House is complete
clear : House is in construction
m3 bit 6 : free
m3 bit 5 : The house is protected from the town upgrading it
m3 bits 4..0 : triggers activated (newhouses)
m4 : free
m5 : see m3 bit 7
m6 :
If newhouses is activated
Standard behaviour
m6: bits 1..0: animated tile state
m7 :
If newhouses is activated
Standard behaviour (only for houses type 04 and 05)
m8 bits 15..12 : free
m8 bits 11..0 : town building type
Newhouses is the name englobing a newGRF feature developed by TTDPatch devs (mainly Csaboka).
It allows the replacement of the properties as well as the graphics of houses in the game.
To distinguish between the standard behaviour and the newGRF one, HouseID is tested for anything above 110.
110 is the count of standard houses. So above 110 means there is a new definition of at least one house |
| 4 | Trees |
| |
| 0 | on grass | | 1 | on rough land (density must be 3) | | 2 | on snow or desert | | 3 | on shore (density must be 3) | | 4 | on snow with rough land underneath |
| 00..0B | temperate climate trees | | 0C..13 | sub-arctic climate trees | | 14..1A | rainforest trees | | 1B | cactus plants | | 1C..1F | sub-tropical climate, non-rainforest, non-desert trees | | 20..28 | toyland trees |
Note: the actually displayed set of trees depends on both type and number of trees
| 0..2 | one of trees is growing | | 3 | all trees are fully grown | | 4..6 | one of trees is withering |
| | 5 | Station tiles | | |
| 0 | on bare land | | 1 | on grass | | 2 | paved |
| 00..07 | railway station
| 00..01 | open platform | | 02..03 | open platform with station building | | 04....07 | roofed platform | | bit 0: clear = in X direction, set = in Y direction |
| | 00..01 | waypoints
| 00 | in X direction | | 01 | in Y direction |
| | 00..FF | all airports | | 00..05 | road stops
| 00 | exit towards NE | | 01 | exit towards SE | | 02 | exit towards SW | | 03 | exit towards NW | | 04 | drive through X | | 05 | drive through Y |
| | 04..05 | road waypoints
| 04 | drive through X | | 05 | drive through Y |
| | 00..05 | ship dock
| 00 | SW coast part | | 01 | NW coast part | | 02 | NE coast part | | 03 | SE coast part | | 04 | X direction water part | | 05 | Y direction water part |
|
| | 6 | Water | | |
| 0 | water, canal or river | | 1 | coast or riverbank | | 2 | canal lock
| 0 | Middle part | | 1 | Lower part | | 2 | Upper part |
| 0 | NE raised | | 1 | SE raised | | 2 | SW raised | | 3 | NW raised |
| | 3 | depot
| 0 | X direction (NE-SW) | | 1 | Y direction (NW-SE) |
| 0 | North part | | 1 | South part |
|
|
| 7 | Void |
| | Tiles of this class form an invisible, one tile wide border at the south (bottom) edges of the map,
so as to protect several algorithms from the consequences of a wraparound at the edges. |
| 8 | Industries |
| |
m1 bit 7: clear = under construction
m2: index into the array of industries
m3: random bits (NewGRF)
m4: animation loop
m5: type (plus m6 bit 2):
(note: this is not the same as the industry type, which is stored in the array of industries)
| 00..06 | coal mine
| 00 | wheel tower when not animated |
| 01 | wheel tower when animated
animation state in m7 bits 5..0; m7 bit 6 set = sound already generated |
| | 07..0A | power station
| 08 | chimney | | 0A | transformer; animation progress in m7(valid range 0..7) |
| | 0B..0F | sawmill | | 10..11 | forest
| 11 | trees cut down |
| | 12..17 | oil refinery | | 18..1C | oil rig | | 1D..20 | oil wells
| 1D | not animated | | 1E..20 | various stages of animation; progress of animation in m7 |
| | 21..26 | farm | | 27..2A | factory (temperate climate) | | 2B..2E | printing works | | 2F..33 | copper ore mine
| 2F | wheel tower when not animated | | 30 | wheel tower when animated; animation state in m7 bits 5..0; m7 bit 6 set = sound already generated | | 31 | chimney |
| | 34..39 | steel mill | | 3A..3B | bank (temperate climate) | | 3C..3F | food processing plant | | 40..47 | paper mill | | 48..58 | gold mine
| 4F | wheel tower when not animated | | 58 | wheel tower when animated; animation state in m7 bits 5..0; m7 bit 6 set = sound already generated |
| | 59..5A | bank (sub-arctic or sub-tropical climate) | | 5B..63 | diamond mine | | 64..73 | iron ore mine | | 74 | fruit plantation | | 75 | rubber plantation | | 76..77 | water supply | | 78 | water tower | | 79..7C | factory (sub-tropical climate) | | 7D..80 | lumber mill | | 81..82 | candyfloss forest
| 82 | candyfloss 'trees' cut down |
| | 83..86 | sweet factory | | 87..88 | battery farm
| 88 | batteries 'reaped' |
| | 89 | cola wells | | 8A..8D | toy shop | | 8E..93 | toy factory
| 8F | Animated part; animation state in m7 (valid range 00..31)
Tile animation is started (m4 zeroed) on the periodic processing.
While the animation is in progress, m4 holds the number of animation cycles that have already taken place.
when this number reaches 8 the animation is stopped. |
| | 94..9B | plastic fountains (various stages of cyclic animation) | | 9C..9F | fizzy drink factory | | A0..A3 | bubble generator
| A1 | generators | | A2 | bubble capture facility; animation state in m7 (valid range 00..27) |
| | A4..A6 | toffee quarry
| A5 | animated part; animation state in m3 (valid range 00..45) |
| | A7..AE | sugar mine
| AE | animated part; animation state in m3 (valid range 00..5F) |
| | AF..1FF | NewGRF industries industry |
| | 9 | Tunnel / bridge | | |
| Type | Max. speed (mph) | Description |
|---|---|---|
| 0 | 20 | wooden |
| 1 | 30 | concrete |
| 2 | 40 | girder, steel |
| 3 | 50 | suspension, concrete |
| 4 | 60 | suspension, steel |
| 5 | 70 | suspension, steel |
| 6 | 100 | cantilever, steel |
| 7 | 130 | cantilever, steel |
| 8 | 150 | cantilever, steel |
| 9 | 160 | girder, steel |
| A | 200 | tubular, steel |
| B | 320 | tubular, steel |
| C | 380 | tubular, silicon |
| 0 | railway | | 1 | road | | 2 | water |
| 0 | NE | | 1 | SE | | 2 | SW | | 3 | NW |
| | A | Objects | | |
| | Classes B through F are reserved. The presence of a tile in one of the reserved classes will crash OTTD. |
Original Copyright © 2003 by Marcin Grzegorczyk for TTDLX.
Transport Tycoon and Transport Tycoon Deluxe are Copyright © by Chris Sawyer.
All the other trademarks are the property of their respective owners.