Landscape

Seven attributes hold the information about a tile. These attributes are type_height, m0, m1, m2, m3, m4, m5 and m7.

The attribute type_height contains the height of a tile stored in its lower 4 bits. The slope of a tile is computed combining its height with the heights of its neighbours. The higher bits of type_height may contain additional information depending on the climate; currently, the higher 2 bits contain the zone information in the tropical climate.

type_height (8)
7654-3210
zz00-hhhh

The zones currently defined for the tropical climate are the following.

Value Meaning
00 Normal
01 Desert
02 Rain forest

Tile contents

The attributes m0m7 define the contents of a tile proper, ie, what is built on the tile. Generally speaking, the higher bits of m0 determine the kind of object that is on the tile (its "class"). Also, the lower 2 bits of m0 record whether there is a bridge over the tile, for tile classes that allow this. m1 contains the owner of the tile and, for tile classes representing an indexed object, m2 contains the index of this object into the corresponding array. The values of m3, m4, m5 and m7 are highly dependent on the object class.

The following table describes the full encoding used in storing objects into the tile structure; the possible values for each field are described below.

Legend: XX class mark; 00 free; XX abused for different purposes

Object type m0 (8) m1 (8) m2 (16) m3 (8) m4 (8) m5 (8) m7 (8)
Bits 7654-3210 7654-3210 FEDC-BA98-7654-3210 7654-3210 7654-3210 7654-3210 7654-3210
Void 0000-0000 0000-0000 0000-0000-0000-0000 0000-0000 0000-0000 0000-0000 0000-0000
Ground Fields 0000-00/\ 010[ownr] [-industry-index--] [##]-[ft] [h][-h]00 [h][-h]00 0000-0000
Clear 0000-00/\ 100[ownr] 0000-0000-0000-0000 [##]-[gt] 0000-00%% 0000-0000
Trees 0000-0000 110[ownr] [number-] [-types-]
Objects 0001-00/\ 0~~[ownr] [--object-index---] [random-] 0000-0000 [-type--] [-frame-]
Water 0010-00/\ 0~~[ownr] 0000-0000-0000-0000 [random-] 0000-0000 [-type--] 0000-0000
0011-0000
Railway Track 0100-00/\ 000[ownr] 0000-[!!]-00[-pcs-] [gf]-[tt] [signal1] 0000-[tt] [signal2]
Bridgehead 010[ownr] [bt]-[!!]-0![-pcs-] <>0g-[tt] [ss]-[tt]
Tunnelhead 100[ownr] 0000-[!!]-00[-pcs-] <>0g-[tt] [signal1] [tunnel1] [tunnel2]
Road Road 0101-00/\ 000[ownr] [---town-index----] ^v0g-XXXX [l1]-[l0] X[p]-[o1] XXXX-[rw]
Bridgehead 010[ownr] <>0g-XXXX X000-[o1] XXXX-[bt]
Tunnelhead 100[ownr] <>0g-XXXX [l1]-[l0] [tunnel1] [tunnel2]
Level crossing 0110-00/\ 000[ownr] [---town-index----] 000g-[tt] !:x0-0000 X[p]-[o1] [r][own0]
Aqueduct 010[ownr] 0000-0000-0000-0000 <>0g-0000 0000-0000 0000-0000 0000-0000
Tunnel 100[ownr] 0000-0000-0000-0000 <>0g-0000 0000-0000 [tunnel1] [tunnel2]
Railway depot 0110-0000 110[ownr] [---depot-index---] 000g-[tt] 0000-0000 000!-00<> 0000-0000
Road depot 111[ownr] 000g-0000 0000-00<> [r]0-0000
Station Railway 0111-000! 0~~[ownr] [--station-index--] [rd]-[tt] [custom-] [-graph-] [-frame-]
Waypoint 0111-001!
Lorry 0111-0100 [o1]-XXXX [r][own0]
Bus 0111-0110
Oilrig 0111-1000 0000-0000 0000-0000
Dock 0111-1010
Buoy 0111-1100
Airport 0111-1110 [rd]-0000 [-frame-]
Industry 1000-XXXX X~~0-XXXX [-industry-index--] [random-] [-anim--] XXXX-XXXX [-frame-]
House 11XX-XXXX XXXX-XXXX [---town-index----] XX0X-XXXX XXXX-XXXX XXXX-XXXX XXXX-XXXX
Bits 7654-3210 7654-3210 FEDC-BA98-7654-3210 7654-3210 7654-3210 7654-3210 7654-3210

Field values

Bridge above

Whether there is a bridge above the tile, and its direction.

Value Meaning
00 No bridge
01 Bridge along X axis
10 Bridge along Y axis

Direction

Value Meaning
0 NE
1 SE
2 SW
3 NW

Owner

Owner of the tile or piece of road.

Value Meaning
00…0E Companies
0F Town
10 Nobody
11 Water

Update counter

An update counter is used in tiles that are to remain in a certain state for a period of time and then change. The counter is increased on every periodic processing of the tile, and the corresponding action is taken when the counter reaches a preset value or wraps around.

Ground and density

Ground type (grass, snow, desert, …) and density for clear or tree tiles.

Value Meaning Densities
0000 Grass 0—3
0001 Shore N/A
0010 Roughland N/A
0011 Rocks N/A
0100 Desert 1, 3
1000 Snow 0—3
1010 Snow-covered roughland 0—3
1011 Snow-covered rocks 0—3

Hedge

Hedge on the border of a tile. It can take the values 1 through 6, or 0 for none.

Trees

Both the number and type of trees fields jointly determine the set of trees actually displayed at a tile. The lower 3 bits of the number field represent the growth status of the trees (0…2 for growing; 3 for fully grown; 4…7 for withering).

Water tile types

Value Meaning
00 Water, canal or river
01 Coast or riverbank
10 Canal lock, middle part, SW-NE
11 Canal lock, middle part, NW-SE
12 Canal lock, middle part, NE-SW
13 Canal lock, middle part, SE-NW
14 Canal lock, lower part, SW-NE
15 Canal lock, lower part, NW-SE
16 Canal lock, lower part, NE-SW
17 Canal lock, lower part, SE-NW
18 Canal lock, upper part, SW-NE
19 Canal lock, upper part, NW-SE
1A Canal lock, upper part, NE-SW
1B Canal lock, upper part, SE-NW
80 Ship depot, X direction, NE part
81 Ship depot, X direction, SW part
82 Ship depot, Y direction, NW part
83 Ship depot, Y direction, SE part

Object types

Value Meaning
00 Transmitter
01 Lighthouse
02 Company statue
03 Company-owned land
80…93 Company headquarters
(5 sets of 4 tiles each)

Bridge types

Value Max. speed (mph) Meaning
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

Track types

Value Meaning
0 Conventional railway
1 Electrified railway
2 Monorail
3 Maglev

Track layout

Bit Track present
01 X direction
02 Y direction
04 North corner (WE)
08 South corner (WE)
10 West corner (NS)
20 East corner (NS)

PBS track reservations

Value Reserved track
0 None
1 X direction
2 Y direction
3 North corner (WE)
4 South corner (WE)
5 West corner (NS)
6 East corner (NS)
8 Opposite track also reserved

Ground and fence for railway tracks

Value Meaning
0 Bareland
1 Grass, no fence
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
9 Fence on the W side
A Fence on the S side
B Fence on the N side
C Snow or desert
D Grass with fence and shore or water on the free halftile
E Higher part on foundation with snow, lower without snow

Signals

Value Meaning
     000 No signals
     001 Normal signals
     010 Pre-signals
     011 Exit-signals
     100 Combo-signals
     101 PBS signals
     110 PBS one-way signals
    1    First signal present
   1     Second signal present
  1      First signal is green
 1       Second signal is green
1        Semaphore signals

Present road types

Bit Meaning
001 Normal road
010 Tramway
100 Reserved

Ground and pavement for roads

Value Meaning
0 On bareland
1 On grass
2 Paved
3 Paved, with streetlights
5 Paved, tree-lined
6 On grass, with road works
7 Paved, with roadworks

Road layout

Bit Road piece present
1 NW piece
2 SW piece
4 SE piece
8 NE piece

Tunnels

Object type m6 (8) m7 (8)
Bits 7654-3210 7654-3210
Railway tunnel 00!!-[tt] [signal-]
Road tunnel 1000-[o1] [r][own0]

Industries

Houses

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 (m4+m3[6]) is tested for anything above 110. 110 is the count of standard houses, so anything above 110 means that there is a new definition of at least one house.