1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
5 <meta name=
"Author" content=
"Marcin Grzegorczyk">
6 <meta name=
"Description" content=
"Structure of OpenTTD (OTTD) landscape arrays">
7 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
8 <title>OpenTTD Landscape Internals
</title>
13 <h3><a name=
"Landscape">Landscape
</a></h3>
15 For a graphical representation of the tile-layout have a look at
16 <a href=
"landscape_grid.html">Landscape grid
</a> page.
18 <p>Nine attributes (counting
"<span style=
"font-weight: bold;">type
</span>" and
19 "<span style=
"font-weight: bold;">height
</span>") hold the information about a tile.
<BR>
20 These attributes are referred to as
21 "<span style=
"font-weight: bold;">type
</span>",
22 "<span style="font-weight: bold;
">height</span>",
23 "<span style=
"font-weight: bold;">m1
</span>",
"<span style=
"font-weight: bold;">m2
</span>",
24 "<span style=
"font-weight: bold;">m3
</span>",
"<span style=
"font-weight: bold;">m4
</span>",
25 "<span style=
"font-weight: bold;">m5
</span>",
"<span style=
"font-weight: bold;">m6
</span>"
26 and
"<span style="font-weight: bold;
">m7</span>".
<br>
27 The most important value is the class of a tile, stored in the upper
4 bits
28 of the
<span style=
"font-weight: bold;">type
</span> attribute.
31 Frequently repeating patterns:
33 <li><span style=
"font-weight: bold;">type
</span>
38 <table border=
"1" style=
"width: 30em;">
39 <tr bgcolor=
"#CCCCCC"><td colspan=
"2">The tile type.
</td></tr>
40 <tr><td style=
"width: 5em;"><tt>00</tt></td><td>Ground
</td></tr>
41 <tr><td><tt>01</tt></td><td>Railway tracks
</td></tr>
42 <tr><td><tt>02</tt></td><td>Roads
</td></tr>
43 <tr><td><tt>03</tt></td><td>Town building
</td></tr>
44 <tr><td><tt>04</tt></td><td>Trees
</td></tr>
45 <tr><td><tt>05</tt></td><td>Station tiles
</td></tr>
46 <tr><td><tt>06</tt></td><td>Water
</td></tr>
47 <tr><td><tt>07</tt></td><td>Void
</td></tr>
48 <tr><td><tt>08</tt></td><td>Industries
</td></tr>
49 <tr><td><tt>09</tt></td><td>Tunnel / bridge
</td></tr>
50 <tr><td><tt>0A
</tt></td><td>Objects
</td></tr>
54 <table border=
"1" style=
"width: 30em;">
55 <tr bgcolor=
"#CCCCCC"><td colspan=
"2">Presence and direction of bridge above.
</td></tr>
56 <tr><td style=
"width: 5em;"><tt>00</tt></td><td>no bridge
</td></tr>
57 <tr><td><tt>01</tt></td><td>Axis X (North-East)
</td></tr>
58 <tr><td><tt>02</tt></td><td>Axis Y (South-West)
</td></tr>
61 <a name=
"tropic_zone"></a>
63 <table border=
"1" style=
"width: 30em;">
64 <tr bgcolor=
"#CCCCCC"><td colspan=
"2">Only meaningful in tropic climate. It contains the definition of the available zones
</td></tr>
65 <tr><td style=
"width: 5em;"><tt>00</tt></td><td>normal
</td></tr>
66 <tr><td><tt>01</tt></td><td>desert
</td></tr>
67 <tr><td><tt>02</tt></td><td>rain forest
</td></tr>
69 In any other climate these
2 bits are theoretically free of use, however using them does not seem useful.
72 <li><span style=
"font-weight: bold;">m1
</span>
75 <a name=
"WaterClass"></a>
77 <table border=
"1" style=
"width: 30em;">
78 <tr bgcolor=
"#CCCCCC"><td colspan=
"2">The type of water that is on a tile.
79 <tr><td style=
"width: 5em;"><tt>00</tt></td><td align=left
>Sea
</td></tr>
80 <tr><td><tt>01</tt></td><td align=left
>Canal
</td></tr>
81 <tr><td><tt>02</tt></td><td align=left
>River
</td></tr>
82 <tr><td><tt>03</tt></td><td align=left
>Invalid, i.e. no water on this tile
</td></tr>
84 Some tiles, such as houses, reuse these bits of other purposes.
87 <a name=
"OwnershipInfo"></a>
89 <table border=
"1" style=
"width: 30em;">
90 <tr bgcolor=
"#CCCCCC"><td colspan=
"2">The owner of a tile can be either companies (human or AI) or
"Game entities".
91 <tr><td style=
"width: 5em;"><tt>00.
.0E
</tt></td><td align=left
>Normal companies
</td></tr>
92 <tr><td><tt>0F
</tt></td><td align=left
>a town owns the tile
</td></tr>
93 <tr><td><tt>10</tt></td><td align=left
>nobody owns the tile
</td></tr>
94 <tr><td><tt>11</tt></td><td align=left
>"water" owns the tile
</td></tr>
95 <tr><td><tt>FF
</tt></td><td align=left
>spectator in MP or in scenario editor
</td></tr>
97 Some tiles, such as houses and industries, reuse these bits of other purposes.
101 <li><span style=
"font-weight: bold;">m4:
</span><br>
102 <a name=
"RoadType"></a>
103 Road roadtype. Used for all tiles with road (road, station, tunnelbridge).
106 Bits
5.
.0: Road roadtype,
0x3F for no road.
110 <li><span style=
"font-weight: bold;">m8:
</span><br>
111 <a name=
"TramType"></a>
112 Tram roadtype. Used for all tiles with road (road, station, tunnelbridge).
115 Bits
11.
.6: Tram roadtype,
0x3F for no tram.
119 <li><span style=
"font-weight: bold;">m8:
</span><br>
122 <a name=
"RailType"></a>
123 Bits
5.
.0: Railtype. Used for all tiles with rail (road, rail, station, tunnelbridge).
127 <li><span style=
"font-weight: bold;">m7:
</span><br>
128 Animation frame/state. Used for houses, industries, objects and stations.
132 <p>OTTD's class-specific periodic tile processing routine is called once every +
256 ticks for each tile.
</p>
134 <table border=
1 cellpadding=
3>
135 <tr bgcolor=
"#0099FF">
136 <th align=left
><font color=
"#FFFFFF">Class
</font></th>
137 <th align=left
><font color=
"#FFFFFF">Meaning
& details of encoding
</font></th>
139 <tr bgcolor=
"#CCCCCC">
140 <td align=left
><strong><a name=
"Class0"><tt> 0 </tt></a></strong></td>
141 <td align=left
> <strong>Ground
</strong></td>
144 <td valign=top nowrap
> </td>
147 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the tile (normally
<tt>10</tt>)
</li>
148 <li>m2: see fields
</li>
149 <li>m3 bits
7.
.5: type of hedge on NE border of the tile
</li>
150 <li>m3 bits
3.
.0: see fields
</li>
151 <li>m3 bit
4: set if the tile is covered with snow
</li>
152 <li>m4 bits
7.
.5: type of hedge on the SW border of the tile (
1 through
6, or
0=none)
</li>
153 <li>m4 bits
4.
.2: same as
7.
.5, but for the SE border
</li>
154 <li>m5 bits
7.
.5: update counter, incremented on every periodic processing for tile types,
155 other than
<tt>03</tt>,
<tt>07</tt>,
<tt>0B
</tt>,
<tt>10</tt> and above.
<BR>
156 on wraparound, the tile is updated (for fields, the type of fields in m3 is increased, for other types the tile type in m5 is increased).
<BR>
157 For snow and desert, these bits are not used, tile is updated on every periodic processing.
</li>
158 <li>m5 bits
4.
.2: tile type:
161 <td nowrap valign=top
><tt>0</tt> </td>
162 <td align=left
>bare land / grass
</td>
166 <td nowrap valign=top
><tt>1</tt> </td>
167 <td align=left
>rough land (density must be
3)
</td>
171 <td nowrap valign=top
><tt>2</tt> </td>
172 <td align=left
>rocks (density must be
3)
</td>
176 <td nowrap valign=top
><tt>3</tt> </td>
177 <td align=left
>fields (density must be
3)
179 <li>m2: index into the array of industries (farms), INVALID_INDUSTRY (
0xFFFF) if farm has been removed
</li>
180 <li>m3 bits
3.
.0: field type (legal values:
0 through
9)
</li>
186 <td nowrap valign=top
><tt>4</tt> </td>
187 <td align=left
>snow
</td>
191 <td nowrap valign=top
><tt>5</tt> </td>
192 <td align=left
>desert (density must be
1 or
3)
</td>
196 <li>m5 bits
1.
.0: density:
199 <td nowrap valign=top
><tt>0</tt> </td>
209 <td nowrap valign=top
><tt>1</tt> </td>
214 <td>2/
4 snow;
</td>
219 <td nowrap valign=top
><tt>2</tt> </td>
229 <td nowrap valign=top
><tt>3</tt> </td>
230 <td>full grass;
</td>
231 <td>rough land;
</td>
232 <td>rocks;
</td>
233 <td>fields;
</td>
234 <td>full snow;
</td>
239 <li>m6 bits
4.
.2: type of hedge on NW border of the tile
</li>
244 <tr bgcolor=
"#CCCCCC">
245 <td valign=top nowrap
><strong><a name=
"Class1"><tt> 1</tt></a></strong></td>
246 <td><strong>Railway tracks
</strong></td>
249 <td valign=top nowrap
> </td>
252 <li>m1 bit
7: Ship docking tile status (for half-tile with water)
</li>
253 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the tile
</li>
254 <li>m2: see signals
</li>
255 <li>m3 bits
7.
.4: see signals
</li>
256 <li>m8 bits
5.
.0 =
<a name=
"TrackType">track type
</a>:
259 <td><tt>0</tt> </td>
260 <td>conventional railway
</td>
264 <td><tt>1</tt> </td>
265 <td>electrified railway
</td>
269 <td><tt>2</tt> </td>
274 <td><tt>3</tt> </td>
279 <li>m4 bits
7.
.4: see signals
</li>
280 <li>m4 bits
3.
.0: Ground type (values with fences are not valid for depots and checkpoints)
283 <td nowrap valign=top
><tt>0</tt> </td>
284 <td align=left
>on bare land
</td>
288 <td nowrap valign=top
><tt>1</tt> </td>
289 <td align=left
>on grass, no fences
</td>
293 <td nowrap valign=top
><tt>2</tt> </td>
294 <td align=left
>fence on the NW side
</td>
298 <td nowrap valign=top
><tt>3</tt> </td>
299 <td align=left
>fence on the SE side
</td>
303 <td nowrap valign=top
><tt>4</tt> </td>
304 <td align=left
>fences on the NW and SE sides
</td>
308 <td nowrap valign=top
><tt>5</tt> </td>
309 <td align=left
>fence on the NE side
</td>
313 <td nowrap valign=top
><tt>6</tt> </td>
314 <td align=left
>fence on the SW side
</td>
318 <td nowrap valign=top
><tt>7</tt> </td>
319 <td align=left
>fences on the NE and SW sides
</td>
323 <td nowrap valign=top
><tt>8</tt> </td>
324 <td align=left
>fence on the E side (track in the W corner)
</td>
328 <td nowrap valign=top
><tt>9</tt> </td>
329 <td align=left
>fence on the W side (track in the E corner)
</td>
333 <td nowrap valign=top
><tt>A
</tt> </td>
334 <td align=left
>fence on the S side (track in the N corner)
</td>
338 <td nowrap valign=top
><tt>B
</tt> </td>
339 <td align=left
>fence on the N side (track in the S corner)
</td>
343 <td nowrap valign=top
><tt>C
</tt> </td>
344 <td align=left
>on snow or desert
</td>
348 <td nowrap valign=top
><tt>D
</tt> </td>
349 <td align=left
>on grass with fence and shore or water on the free halftile
</td>
353 <td nowrap valign=top
><tt>E
</tt> </td>
354 <td align=left
>higher part on foundation with snow, lower without snow
</td>
358 <li>m5 bit
7 clear: railway track
360 <li>m5 bits
5.
.0: track layout: bit set = track present:
363 <td nowrap valign=top
>bit
0:
</td>
364 <td align=left
>in the X direction
</td>
368 <td nowrap valign=top
>bit
1:
</td>
369 <td align=left
>in the Y direction
</td>
373 <td nowrap valign=top
>bit
2:
</td>
374 <td align=left
>in the north corner (direction W-E)
</td>
378 <td nowrap valign=top
>bit
3:
</td>
379 <td align=left
>in the south corner (direction W-E)
</td>
383 <td nowrap valign=top
>bit
4:
</td>
384 <td align=left
>in the west corner (direction N-S)
</td>
388 <td nowrap valign=top
>bit
5:
</td>
389 <td align=left
>in the east corner (direction N-S)
</td>
393 <li>m5 bit
6 set = with signals:
<BR>
394 There are at most
4 signals on a tile. The signals
0.
.3 belong to the directions:
398 <td>Track
<tt>0</tt> (X)
</td>
399 <td>Track
<tt>1</tt> (Y)
</td>
400 <td>Track
<tt>2</tt> (north)
</td>
401 <td>Track
<tt>3</tt> (south)
</td>
402 <td>Track
<tt>4</tt> (west)
</td>
403 <td>Track
<tt>5</tt> (east)
</td>
407 <td align=left
>Signal
<tt>0</tt> </td>
417 <td align=left
>Signal
<tt>1</tt> </td>
427 <td align=left
>Signal
<tt>2</tt> </td>
437 <td align=left
>Signal
<tt>3</tt> </td>
447 <li>m2 bit
7: Signal
0 and
1: set = semaphore signals, clear = light signals
</li>
448 <li>m2 bit
3: Signal
2 and
3: set = semaphore signals, clear = light signals
</li>
449 <li>m2 bits
6.
.4: type of signal
0 and
1 (same values as m2 bits
2.
.0)
</li>
450 <li>m2 bits
2.
.0: type of signal
2 and
3
453 <td nowrap=
"nowrap" valign=
"top"><tt>000</tt>:
</td>
454 <td align=
"left">normal signals
</td>
458 <td nowrap=
"nowrap" valign=
"top"><tt>001</tt>:
</td>
459 <td align=
"left">pre-signals
</td>
463 <td nowrap=
"nowrap" valign=
"top"><tt>010</tt>:
</td>
464 <td align=
"left">exit-signals
</td>
468 <td nowrap=
"nowrap" valign=
"top"><tt>011</tt>:
</td>
469 <td align=
"left">combo-signals
</td>
473 <td nowrap=
"nowrap" valign=
"top"><tt>100</tt>:
</td>
474 <td align=
"left">pbs signals
</td>
478 <td nowrap=
"nowrap" valign=
"top"><tt>101</tt>:
</td>
479 <td align=
"left">no-entry signals
</td>
484 <li>m3 bits
7.
.4: bit set = signal
3.
.0 present
</li>
485 <li>m4 bits
7.
.4: bit clear = signal
3.
.0 shows red
</li>
488 <li>m2 bits
8.
.10: track reserved for pbs
491 <td><tt>0</tt> </td>
492 <td>not reserved
</td>
495 <td><tt>1</tt> </td>
499 <td><tt>2</tt> </td>
503 <td><tt>3</tt> </td>
504 <td>north corner (W-E)
</td>
507 <td><tt>4</tt> </td>
508 <td>south corner (W-E)
</td>
511 <td><tt>5</tt> </td>
512 <td>west corner (N-S)
</td>
515 <td><tt>6</tt> </td>
516 <td>east corner (N-S)
</td>
520 <li>m2 bit
11: opposite track is reserved, too
</li>
523 <li>m5 bit
7 set, bit
6 set: railway depot
525 <li>m2: Depot index
</li>
526 <li>m5 bits
1.
.0: exit towards
529 <td><tt>0</tt> </td>
534 <td><tt>1</tt> </td>
539 <td><tt>2</tt> </td>
544 <td><tt>3</tt> </td>
549 <li>m5 bit
4: pbs reservation state
</li>
556 <tr bgcolor=
"#CCCCCC">
557 <td valign=top nowrap
><strong><a name=
"Class2"><tt> 2</tt></a></strong></td>
558 <td><strong>Roads
</strong></td>
561 <td valign=top nowrap
> </td>
564 <li>m2: Index into the array of towns (owning town for town roads; closest town otherwise, INVALID_TOWN if there is no town or we are creating a town)
</li>
565 <li>m3 bits
7.
.4:
<a href=
"#OwnershipInfo">owner
</a> of road type
1 (tram); OWNER_NONE (
<tt>10</tt>) is stored as OWNER_TOWN (
<tt>0F
</tt>)
566 <li>m4 bits
5.
.0:
<a href=
"#RoadType">Roadtype
</a></li>
567 <li>m7 bit
5 set = on snow or desert
</li>
568 <li>m8 bits
11.
.6:
<a href=
"#TramType">Tramtype
</a></li>
569 <li>m5 bits
7 clear: road or level-crossing
574 <td><tt>0</tt> </td>
575 <td>on bare land
</td>
578 <td><tt>1</tt> </td>
582 <td><tt>2</tt> </td>
586 <td><tt>3</tt> </td>
587 <td>with streetlights
</td>
590 <td><tt>5</tt> </td>
594 <td><tt>6</tt> </td>
595 <td>on grass with road works
</td>
598 <td><tt>7</tt> </td>
599 <td>paved with road works
</td>
603 <li>m5 bit
6 clear: road
605 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the road type
0 (normal road)
</li>
606 <li>m7 bits
3.
.0: counter for the roadworks
</li>
607 <li>m5 bits
3.
.0: road layout road type
0 (normal road): bit set = road piece present:
610 <td align=left
>bit
0:
</td>
614 <td align=left
>bit
1:
</td>
618 <td align=left
>bit
2:
</td>
622 <td align=left
>bit
3:
</td>
627 <li>m3 bits
0.
.3: road layout road type
1 (tram)
</li>
628 <li>m5 bits
5.
.4: bits to disallow vehicles to go a specific direction
631 <td align=left
>bit
0:
</td>
632 <td>set = disallow driving in south-west or south-east direction
</td>
635 <td align=left
>bit
1:
</td>
636 <td>set = disallow driving in north-west or north-east direction
</td>
642 <li>m5 bit
6 set: level crossing
644 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the railway track
</li>
645 <li>m5 bit
5: set if crossing lights are on
</li>
646 <li>m5 bit
4: pbs reservation state
</li>
647 <li>m5 bit
0: direction
650 <td align=left
><tt>0</tt> </td>
651 <td align=left
>road in the X direction, rail in Y
</td>
654 <td align=left
><tt>1</tt> </td>
655 <td align=left
>road in the Y direction, rail in X
</td>
659 <li>m7 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the road type
0 (normal road)
</li>
660 <li>m8 bits
5.
.0:
<a href=
"#TrackType">railway track type
</a></li>
665 <li>m5 bit
7 set, bit
6 clear: road depot
667 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the depot
</li>
668 <li>m2: Depot index
</li>
669 <li>m5 bits
1.
.0: exit towards:
672 <td><tt>0</tt> </td>
677 <td><tt>1</tt> </td>
682 <td><tt>2</tt> </td>
687 <td><tt>3</tt> </td>
692 <li>m7 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the road type
0 (normal road)
</li>
699 <tr bgcolor=
"#CCCCCC">
700 <td valign=top nowrap
><strong><a name=
"Class3"><tt> 3</tt></a></strong></td>
701 <td><strong>Town building
</strong></td>
704 <td valign=top nowrap
> </td>
707 <li>m1 : Random bits
<a href=
"#newhouses">(newhouses)
</a> </li>
708 <li>m2 : index into the array of towns
</li>
711 <li> set : House is complete
713 <li>m5 : Age of house in years, clamped at
255</li>
716 <li> clear : House is in construction
718 <li>m5 bits
7.
.5 : free
</li>
719 <li>m5 bits
4.
.3 : construction stage
</li>
720 <li>m5 bits
2.
.0 : construction counter
</li>
724 <li>m3 bit
6 : bit
8 of house type (m4), allowing
512 different types.
</li>
725 <li>m3 bit
5 : free
</li>
726 <li>m3 bits
4.
.0 : triggers activated
<a href=
"#newhouses">(newhouses)
</a></li>
727 <li>m4 :
<a href=
"landscape_externals.html">town building type
</a> (with m3[
6] bit)
</li>
728 <li>m5 : see m3 bit
7</li>
731 <li>If
<a href=
"#newhouses">newhouses
</a> is activated
733 <li>bits
7.
.2 : Periodic processing time remaining
</li>
736 <li>Standard behaviour
738 <li>bits
7.
.2 : lift position (for houses type
04 and
05)
</li>
745 <li>If
<a href=
"#newhouses">newhouses
</a> is activated
747 <li>Current animation frame
</li>
750 <li>Standard behaviour (only for houses type
04 and
05)
752 <li>bits
7.
.4 : free
</li>
753 <li>bits
3.
.1 : lift destination. Values can be
0.
.6, except
1.
<br>
754 So the building has
6 effective floors. This is due to the fact that the first floor is
2 'normal' floors high.
<br>
755 One 'normal' floor has a height of
6 lift positions.
757 <li>bit
0 : Lift has destination when set
</li>
763 <small><a name=
"newhouses"></a>Newhouses is the name englobing a newGRF feature developed by TTDPatch devs (mainly Csaboka).
<br>
764 It allows the replacement of the properties as well as the graphics of houses in the game.
<br>
765 To distinguish between the standard behaviour and the newGRF one, HouseID (m4 + m3[
6]) is tested for anything above
110.
<br>
766 110 is the count of standard houses. So above
110 means there is a new definition of at least one house
</small>
770 <tr bgcolor=
"#CCCCCC">
771 <td valign=top nowrap
><strong><a name=
"Class4"><tt> 4 </tt></a></strong></td>
772 <td><strong>Trees
</strong></td>
775 <td valign=top nowrap
> </td>
778 <li>m1 bits
6.
.5: water class (sea or land)
</li>
779 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> (normally
<tt>10</tt>)
</li>
780 <li>m2 bits
8.
.6: ground
784 <td align=left
><tt>0</tt> </td>
789 <td align=left
><tt>1</tt> </td>
790 <td>on rough land (density must be
3)
</td>
794 <td align=left
><tt>2</tt> </td>
795 <td>on snow or desert
</td>
799 <td align=left
><tt>3</tt> </td>
800 <td>on shore (density must be
3)
</td>
804 <td align=left
><tt>4</tt> </td>
805 <td>on snow with rough land underneath
</td>
809 <li>m2 bits
5.
.4: ground density
</li>
810 <li>m2 bits
3.
.0: update counter, incremented on every periodic processing.
<br>
811 on wraparound the growth status is updated (or, if it's
<tt>3</tt>, a random action is taken)
</li>
812 <li>m3 bits
7.
.0: type of trees:
815 <td nowrap valign=top
><tt>00</tt>..
<tt>0B
</tt> </td>
816 <td align=left
>temperate climate trees
</td>
820 <td nowrap valign=top
><tt>0C
</tt>..
<tt>13</tt> </td>
821 <td align=left
>sub-arctic climate trees
</td>
825 <td nowrap valign=top
><tt>14</tt>..
<tt>1A
</tt> </td>
826 <td align=left
>rainforest trees
</td>
830 <td nowrap valign=top
><tt>1B
</tt> </td>
831 <td align=left
>cactus plants
</td>
835 <td nowrap valign=top
><tt>1C
</tt>..
<tt>1F
</tt> </td>
836 <td align=left
>sub-tropical climate, non-rainforest, non-desert trees
</td>
840 <td nowrap valign=top
><tt>20</tt>..
<tt>28</tt> </td>
841 <td align=left
>toyland trees
</td>
844 <small>Note: the actually displayed set of trees depends on both type and number of trees
</small>
846 <li>m5 bits
7.
.6: number of trees minus one
</li>
847 <li>m5 bits
2.
.0: growth status:
850 <td><tt>0</tt>..
<tt>2</tt> </td>
851 <td>one of trees is growing
</td>
854 <td><tt>3</tt> </td>
855 <td>all trees are fully grown
</td>
858 <td><tt>4</tt>..
<tt>6</tt> </td>
859 <td>one of trees is withering
</td>
867 <tr bgcolor=
"#CCCCCC">
868 <td valign=top nowrap
><strong><a name=
"Class5"><tt> 5</tt></a></strong></td>
869 <td><strong>Station tiles
</strong></td>
872 <td valign=top nowrap
> </td>
875 <li>m1 bit
7: Ship docking tile status (for buoys)
</li>
876 <li>m1 bits
6.
.5: water class for buoys, water part of docks and for airport tiles
</li>
877 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the station
</li>
878 <li>m2: index into the array of stations
</li>
879 <li>m3 bits
7.
.4: persistent random data for railway stations/waypoints and airports)
</li>
880 <li>m3 bits
7.
.4:
<a href=
"#OwnershipInfo">owner
</a> of tram tracks (road stop)
</li>
881 <li>m4: custom station id;
0 means standard graphics
</li>
882 <li>m4:
<a href=
"#RoadType">Roadtype
</a> for road stops
</li>
883 <li>m5: graphics index (range from
0.
.255 for each station type):
886 <td nowrap valign=top
><tt>00</tt>..
<tt>07</tt> </td>
887 <td align=left
>railway station
890 <td><tt>00</tt>..
<tt>01</tt> </td>
891 <td align=left
>open platform
</td>
894 <td><tt>02</tt>..
<tt>03</tt> </td>
895 <td align=left
>open platform with station building
</td>
898 <td><tt>04</tt>....
<tt>07</tt> </td>
899 <td align=left
>roofed platform
</td>
902 <td colspan=
2>bit
0: clear = in X direction, set = in Y direction
</td>
909 <td nowrap valign=top
><tt>00</tt>..
<tt>01</tt></td>
910 <td align=left
>waypoints
913 <td><tt>00</tt> </td>
914 <td align=left
>in X direction
</td>
917 <td><tt>01</tt> </td>
918 <td align=left
>in Y direction
</td>
925 <td nowrap valign=top
><tt>00</tt>..
<tt>FF
</tt></td>
926 <td align=left
>all airports
</td>
930 <td nowrap valign=top
><tt>00</tt>..
<tt>05</tt> </td>
931 <td align=left
>road stops
934 <td><tt>00</tt> </td>
935 <td align=left
>exit towards NE
</td>
938 <td><tt>01</tt> </td>
939 <td align=left
>exit towards SE
</td>
942 <td><tt>02</tt> </td>
943 <td align=left
>exit towards SW
</td>
946 <td><tt>03</tt> </td>
947 <td align=left
>exit towards NW
</td>
950 <td><tt>04</tt> </td>
951 <td align=left
>drive through X
</td>
954 <td><tt>05</tt> </td>
955 <td align=left
>drive through Y
</td>
962 <td nowrap valign=top
><tt>00</tt>..
<tt>05</tt> </td>
963 <td align=left
>ship dock
966 <td><tt>00</tt> </td>
967 <td align=left
>SW coast part
</td>
970 <td><tt>01</tt> </td>
971 <td align=left
>NW coast part
</td>
974 <td><tt>02</tt> </td>
975 <td align=left
>NE coast part
</td>
978 <td><tt>03</tt> </td>
979 <td align=left
>SE coast part
</td>
982 <td><tt>04</tt> </td>
983 <td align=left
>X direction water part
</td>
986 <td><tt>05</tt> </td>
987 <td align=left
>Y direction water part
</td>
994 <li>m6 bits
5.
.3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint)
</li>
995 <li>m6 bit
2: pbs reservation state for railway stations/waypoints
</li>
997 <li>m7 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of road (road stops)
</li>
998 <li>m7: animation frame (railway stations/waypoints, airports)
</li>
999 <li>m8 bits
11.
.6:
<a href=
"#TramType">Tramtype
</a></li>
1000 <li>m8 bits
5.
.0:
<a href=
"#TrackType">track type
</a> for railway stations/waypoints
</li>
1005 <tr bgcolor=
"#CCCCCC">
1006 <td valign=top nowrap
><strong><a name=
"Class6"><tt> 6 </tt></a></strong></td>
1007 <td><strong>Water
</strong></td>
1010 <td valign=top nowrap
> </td>
1013 <li>m1 bit
7: Ship docking tile status
</li>
1014 <li>m1 bits
6.
.5 : Water class (sea, canal or river)
1015 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> (for sea, rivers, and coasts normally
<tt>11</tt>)
</li>
1016 <li>m2: Depot index (for depots only)
</li>
1017 <li>m4: Random data for canal or river tiles
</li>
1021 <td nowrap valign=top
><tt>00</tt> </td>
1022 <td align=left
>water, canal or river
</td>
1026 <td nowrap valign=top
><tt>01</tt> </td>
1027 <td align=left
>coast or riverbank
</td>
1031 <td nowrap valign=top
><tt>10</tt>..
<tt>1B
</tt> </td>
1032 <td align=left
>canal locks
1035 <td nowrap valign=top
><tt>10</tt> </td>
1036 <td align=left
>middle part, (SW-NE direction)
</td>
1039 <td nowrap valign=top
><tt>11</tt> </td>
1040 <td align=left
>middle part, (NW-SE direction)
</td>
1043 <td nowrap valign=top
><tt>12</tt> </td>
1044 <td align=left
>middle part, (NE-SW direction)
</td>
1047 <td nowrap valign=top
><tt>13</tt> </td>
1048 <td align=left
>middle part, (SE-NW direction)
</td>
1051 <td nowrap valign=top
><tt>14</tt> </td>
1052 <td align=left
>lower part, (SW-NE direction)
</td>
1055 <td nowrap valign=top
><tt>15</tt> </td>
1056 <td align=left
>lower part, (NW-SE direction)
</td>
1059 <td nowrap valign=top
><tt>16</tt> </td>
1060 <td align=left
>lower part, (NE-SW direction)
</td>
1063 <td nowrap valign=top
><tt>17</tt> </td>
1064 <td align=left
>lower part, (SE-NW direction)
</td>
1067 <td nowrap valign=top
><tt>18</tt> </td>
1068 <td align=left
>upper part, (SW-NE direction)
</td>
1071 <td nowrap valign=top
><tt>19</tt> </td>
1072 <td align=left
>upper part, (NW-SE direction)
</td>
1075 <td nowrap valign=top
><tt>1A
</tt> </td>
1076 <td align=left
>upper part, (NE-SW direction)
</td>
1079 <td nowrap valign=top
><tt>1B
</tt> </td>
1080 <td align=left
>upper part, (SE-NW direction)
</td>
1087 <td nowrap valign=top
><tt>80</tt>..
<tt>83</tt> </td>
1088 <td align=left
>ship depots
1091 <td nowrap valign=top
><tt>80</tt> </td>
1092 <td align=left
>ship depot, NE part (X direction)
</td>
1095 <td nowrap valign=top
><tt>81</tt> </td>
1096 <td align=left
>ship depot, SW part (X direction)
</td>
1099 <td nowrap valign=top
><tt>82</tt> </td>
1100 <td align=left
>ship depot, NW part (Y direction)
</td>
1103 <td nowrap valign=top
><tt>83</tt> </td>
1104 <td align=left
>ship depot, SE part (Y direction)
</td>
1115 <tr bgcolor=
"#CCCCCC">
1116 <td valign=top nowrap
><strong><a name=
"Class7"><tt> 7 </tt></a></strong></td>
1117 <td><strong>Void
</strong></td>
1120 <td valign=top nowrap
> </td>
1121 <td>Tiles of this class form an invisible, one tile wide border at the south (bottom) edges of the map,
<br>
1122 so as to protect several algorithms from the consequences of a wraparound at the edges.
1126 <tr bgcolor=
"#CCCCCC">
1127 <td valign=top nowrap
><strong><a name=
"Class8"><tt> 8</tt></a></strong></td>
1128 <td><strong>Industries
</strong></td>
1131 <td valign=top nowrap
> </td>
1134 <li>m1 bit
7: clear = under construction
1136 <li>m1 bits
6.
.5 : Water class (sea, canal, river or land)
1137 <li>m1 bits
3.
.2: construction counter, for buildings under construction incremented on every periodic tile processing
</li>
1138 <li>m1 bits
1.
.0: stage of construction (
<tt>3</tt> = completed), incremented when the construction counter wraps around
<br>
1139 the meaning is different for some animated tiles which are never under construction (types
<tt>01</tt>,
<tt>1E
</tt>..
<tt>20</tt>,
<tt>30</tt>,
<tt>58</tt>; see above)
</li>
1142 <li>m2: index into the array of industries
</li>
1143 <li>m3: random bits (NewGRF)
</li>
1144 <li>m4: animation loop
</li>
1145 <li>m5: type (plus m6 bit
2):
<br>
1146 <small>(note: this is not the same as the industry type, which is stored in the array of industries)
</small>
1150 <td nowrap valign=top
><tt>00</tt>..
<tt>06</tt> </td>
1151 <td align=left
>coal mine
1154 <td nowrap valign=top
><tt>00</tt> </td>
1155 <td align=left
>wheel tower when not animated
</td>
1158 <td nowrap valign=top
><tt>01</tt> </td>
1159 <td align=left
>wheel tower when animated
<br>
1160 animation state in m7 bits
5.
.0; m7 bit
6 set = sound already generated
</td>
1167 <td nowrap valign=top
><tt>07</tt>..
<tt>0A
</tt> </td>
1168 <td align=left
>power station
1171 <td nowrap valign=top
><tt>08</tt> </td>
1172 <td align=left
>chimney
</td>
1175 <td nowrap valign=top
><tt>0A
</tt> </td>
1176 <td align=left
>transformer; animation progress in m7(valid range
<tt>0</tt>..
<tt>7</tt>)
</td>
1183 <td nowrap valign=top
><tt>0B
</tt>..
<tt>0F
</tt> </td>
1184 <td align=left
>sawmill
</td>
1188 <td nowrap valign=top
><tt>10</tt>..
<tt>11</tt> </td>
1189 <td align=left
>forest
1192 <td nowrap valign=top
><tt>11</tt> </td>
1193 <td align=left
>trees cut down
</td>
1200 <td nowrap valign=top
><tt>12</tt>..
<tt>17</tt> </td>
1201 <td align=left
>oil refinery
</td>
1205 <td nowrap valign=top
><tt>18</tt>..
<tt>1C
</tt> </td>
1206 <td align=left
>oil rig
</td>
1210 <td nowrap valign=top
><tt>1D
</tt>..
<tt>20</tt> </td>
1211 <td align=left
>oil wells
1214 <td nowrap valign=top
><tt>1D
</tt> </td>
1215 <td align=left
>not animated
</td>
1218 <td nowrap valign=top
><tt>1E
</tt>..
<tt>20</tt> </td>
1219 <td align=left
>various stages of animation; progress of animation in m7
</td>
1226 <td nowrap valign=top
><tt>21</tt>..
<tt>26</tt> </td>
1227 <td align=left
>farm
</td>
1231 <td nowrap valign=top
><tt>27</tt>..
<tt>2A
</tt> </td>
1232 <td align=left
>factory (temperate climate)
</td>
1236 <td nowrap valign=top
><tt>2B
</tt>..
<tt>2E
</tt> </td>
1237 <td align=left
>printing works
</td>
1241 <td nowrap valign=top
><tt>2F
</tt>..
<tt>33</tt> </td>
1242 <td align=left
>copper ore mine
1245 <td nowrap valign=top
><tt>2F
</tt> </td>
1246 <td align=left
>wheel tower when not animated
</td>
1249 <td nowrap valign=top
><tt>30</tt> </td>
1250 <td align=left
>wheel tower when animated; animation state in m7 bits
5.
.0; m7 bit
6 set = sound already generated
</td>
1253 <td nowrap valign=top
><tt>31</tt> </td>
1254 <td align=left
>chimney
</td>
1261 <td nowrap valign=top
><tt>34</tt>..
<tt>39</tt> </td>
1262 <td align=left
>steel mill
</td>
1266 <td nowrap valign=top
><tt>3A
</tt>..
<tt>3B
</tt> </td>
1267 <td align=left
>bank (temperate climate)
</td>
1271 <td nowrap valign=top
><tt>3C
</tt>..
<tt>3F
</tt> </td>
1272 <td align=left
>food processing plant
</td>
1276 <td nowrap valign=top
><tt>40</tt>..
<tt>47</tt> </td>
1277 <td align=left
>paper mill
</td>
1281 <td nowrap valign=top
><tt>48</tt>..
<tt>58</tt> </td>
1282 <td align=left
>gold mine
1285 <td nowrap valign=top
><tt>4F
</tt> </td>
1286 <td align=left
>wheel tower when not animated
</td>
1289 <td nowrap valign=top
><tt>58</tt> </td>
1290 <td align=left
>wheel tower when animated; animation state in m7 bits
5.
.0; m7 bit
6 set = sound already generated
</td>
1296 <td nowrap valign=top
><tt>59</tt>..
<tt>5A
</tt> </td>
1297 <td align=left
>bank (sub-arctic or sub-tropical climate)
</td>
1301 <td nowrap valign=top
><tt>5B
</tt>..
<tt>63</tt> </td>
1302 <td align=left
>diamond mine
</td>
1306 <td nowrap valign=top
><tt>64</tt>..
<tt>73</tt> </td>
1307 <td align=left
>iron ore mine
</td>
1311 <td nowrap valign=top
><tt>74</tt></td>
1312 <td align=left
>fruit plantation
</td>
1316 <td nowrap valign=top
><tt>75</tt></td>
1317 <td align=left
>rubber plantation
</td>
1321 <td nowrap valign=top
><tt>76</tt>..
<tt>77</tt> </td>
1322 <td align=left
>water supply
</td>
1326 <td nowrap valign=top
><tt>78</tt></td>
1327 <td align=left
>water tower
</td>
1331 <td nowrap valign=top
><tt>79</tt>..
<tt>7C
</tt> </td>
1332 <td align=left
>factory (sub-tropical climate)
</td>
1336 <td nowrap valign=top
><tt>7D
</tt>..
<tt>80</tt> </td>
1337 <td align=left
>lumber mill
</td>
1341 <td nowrap valign=top
><tt>81</tt>..
<tt>82</tt> </td>
1342 <td align=left
>candyfloss forest
1345 <td nowrap valign=top
><tt>82</tt> </td>
1346 <td align=left
>candyfloss 'trees' cut down
</td>
1353 <td nowrap valign=top
><tt>83</tt>..
<tt>86</tt> </td>
1354 <td align=left
>sweet factory
</td>
1358 <td nowrap valign=top
><tt>87</tt>..
<tt>88</tt> </td>
1359 <td align=left
>battery farm
1362 <td nowrap valign=top
><tt>88</tt> </td>
1363 <td align=left
>batteries 'reaped'
</td>
1370 <td nowrap valign=top
><tt>89</tt></td>
1371 <td align=left
>cola wells
</td>
1375 <td nowrap valign=top
><tt>8A
</tt>..
<tt>8D
</tt> </td>
1376 <td align=left
>toy shop
</td>
1380 <td nowrap valign=top
><tt>8E
</tt>..
<tt>93</tt> </td>
1381 <td align=left
>toy factory
1384 <td nowrap valign=top
><tt>8F
</tt> </td>
1385 <td align=left
>Animated part; animation state in m7 (valid range
<tt>00</tt>..
<tt>31</tt>)
<br>
1386 Tile animation is started (m4 zeroed) on the periodic processing.
<br>
1387 While the animation is in progress, m4 holds the number
1388 of animation cycles that have already taken place.
<br>
1389 when this number reaches
8 the animation is stopped.
</td>
1396 <td nowrap valign=top
><tt>94</tt>..
<tt>9B
</tt> </td>
1397 <td align=left
>plastic fountains (various stages of cyclic animation)
</td>
1401 <td nowrap valign=top
><tt>9C
</tt>..
<tt>9F
</tt> </td>
1402 <td align=left
>fizzy drink factory
</td>
1406 <td nowrap valign=top
><tt>A0
</tt>..
<tt>A3
</tt> </td>
1407 <td align=left
>bubble generator
1410 <td nowrap valign=top
><tt>A1
</tt> </td>
1411 <td align=left
>generators
</td>
1414 <td nowrap valign=top
><tt>A2
</tt> </td>
1415 <td align=left
>bubble capture facility; animation state in m7 (valid range
<tt>00</tt>..
<tt>27</tt>)
</td>
1422 <td nowrap valign=top
><tt>A4
</tt>..
<tt>A6
</tt> </td>
1423 <td align=left
>toffee quarry
1426 <td nowrap valign=top
><tt>A5
</tt> </td>
1427 <td align=left
>animated part; animation state in m3 (valid range
<tt>00</tt>..
<tt>45</tt>)
</td>
1434 <td nowrap valign=top
><tt>A7
</tt>..
<tt>AE
</tt> </td>
1435 <td align=left
>sugar mine
1438 <td nowrap valign=top
><tt>AE
</tt> </td>
1439 <td align=left
>animated part; animation state in m3 (valid range
<tt>00</tt>..
<tt>5F
</tt>)
</td>
1445 <td nowrap valign=top
><tt>AF
</tt>..
<tt>1FF
</tt> </td>
1446 <td align=left
>NewGRF industries industry
</td>
1450 <li>m6 bits
5.
.3: random triggers (NewGRF)
</li>
1451 <li>m6 bit
2: bit
8 of type (see m5)
</li>
1452 <li>m7: animation frame
</li>
1457 <tr bgcolor=
"#CCCCCC">
1458 <td valign=top nowrap
><strong><a name=
"Class9"><tt> 9</tt></a></strong></td>
1459 <td><strong>Tunnel / bridge
</strong></td>
1462 <td valign=top nowrap
> </td>
1465 <li>m1 bit
7: Ship docking tile status (for aqueducts)
</li>
1466 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a></li>
1467 <li>m3 bits
7.
.4:
<a href=
"#OwnershipInfo">owner
</a> of tram
</li>
1468 <li>m4:
<a href=
"#RoadType">Roadtype
</a></li>
1469 <li>m5 bit
4: pbs reservation state for railway
</li>
1470 <li>m5 bits
7 clear: tunnel entrance/exit
</li>
1471 <li>m5 bit
7 set: bridge ramp
1473 <li>m6 bits
5.
.2:
<a name=
"BridgeType">bridge type
</a>:
1476 <th align=left
>Type
</th>
1477 <th align=left
>Max. speed (mph)
</th>
1478 <th align=left
>Description
</th>
1482 <td nowrap valign=top
><tt>0</tt> </td>
1483 <td align=center
>20</td>
1484 <td align=left
>wooden
</td>
1488 <td nowrap valign=top
><tt>1</tt> </td>
1489 <td align=center
>30</td>
1490 <td align=left
>concrete
</td>
1494 <td nowrap valign=top
><tt>2</tt> </td>
1495 <td align=center
>40</td>
1496 <td align=left
>girder, steel
</td>
1500 <td nowrap valign=top
><tt>3</tt> </td>
1501 <td align=center
>50</td>
1502 <td align=left
>suspension, concrete
</td>
1506 <td nowrap valign=top
><tt>4</tt> </td>
1507 <td align=center
>60</td>
1508 <td align=left
>suspension, steel
</td>
1512 <td nowrap valign=top
><tt>5</tt> </td>
1513 <td align=center
>70</td>
1514 <td align=left
>suspension, steel
</td>
1518 <td nowrap valign=top
><tt>6</tt> </td>
1519 <td align=center
>100</td>
1520 <td align=left
>cantilever, steel
</td>
1524 <td nowrap valign=top
><tt>7</tt> </td>
1525 <td align=center
>130</td>
1526 <td align=left
>cantilever, steel
</td>
1530 <td nowrap valign=top
><tt>8</tt> </td>
1531 <td align=center
>150</td>
1532 <td align=left
>cantilever, steel
</td>
1536 <td nowrap valign=top
><tt>9</tt> </td>
1537 <td align=center
>160</td>
1538 <td align=left
>girder, steel
</td>
1542 <td nowrap valign=top
><tt>A
</tt> </td>
1543 <td align=center
>200</td>
1544 <td align=left
>tubular, steel
</td>
1548 <td nowrap valign=top
><tt>B
</tt> </td>
1549 <td align=center
>320</td>
1550 <td align=left
>tubular, steel
</td>
1554 <td nowrap valign=top
><tt>C
</tt> </td>
1555 <td align=center
>380</td>
1556 <td align=left
>tubular, silicon
</td>
1562 <li>m5 bits
3.
.2: transport type
1565 <td><tt>0</tt> </td>
1570 <td><tt>1</tt> </td>
1575 <td><tt>2</tt> </td>
1580 <li>m5 bits
1.
.0: direction onto the bridge / out of the tunnel
1583 <td><tt>0</tt> </td>
1588 <td><tt>1</tt> </td>
1593 <td><tt>2</tt> </td>
1598 <td><tt>3</tt> </td>
1603 <li>m7 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of road
</li>
1604 <li>m7 bit
5 set = on snow or desert
</li>
1605 <li>m8 bits
11.
.6:
<a href=
"#TramType">Tramtype
</a></li>
1606 <li>m8 bits
5.
.0:
<a href=
"#TrackType">track type
</a> for railway
</li>
1611 <tr bgcolor=
"#CCCCCC">
1612 <td valign=top nowrap
><strong><a name=
"ClassA"><tt> A
</tt></a></strong></td>
1613 <td><strong><tt>Objects
</tt></strong></td>
1616 <td valign=top nowrap
> </td>
1619 <li>m1 bits
6.
.5 : Water class (sea, canal, river or land)
</li>
1620 <li>m1 bits
4.
.0:
<a href=
"#OwnershipInfo">owner
</a> of the object (for lighthouses and transmitters normally
<tt>10</tt>)
</li>
1621 <li>m2: index into the array of objects, bits
0 to
15 (upper bits in m5)
</li>
1622 <li>m3: random bits
</li>
1623 <li>m5: index into the array of objects, bits
16 to
23 (lower bits in m2)
</li>
1624 <li>m7: animation counter
</li>
1629 <td colspan=
2>Classes
<tt>B
</tt> through
<tt>F
</tt> are reserved. The presence
1630 of a tile in one of the reserved classes will crash OTTD.
</td>
1636 Original Copyright
© 2003 by Marcin Grzegorczyk for TTDLX.
<br>
1637 Transport Tycoon and Transport Tycoon Deluxe are Copyright
© by Chris Sawyer.
<br>
1638 All the other trademarks are the property of their respective owners.
<br>