belugas@6029: pasky@464: belugas@6029: pasky@464: belugas@6029: belugas@6029: belugas@6029: belugas@6029: OpenTTD Landscape Internals belugas@6029: pasky@464: pasky@464: pasky@464: belugas@6029:

Landscape

belugas@6184:

Seven attributes (counting "type_height") hold the informations about a tile.
belugas@6029: These attributes are referred to as belugas@6029: "type_height", belugas@5803: "m1", "m2", belugas@5803: "m3", "m4", belugas@6029: "m5" and "m6".
belugas@5803: The most important value is the class of a tile, stored in the upper 4 bits belugas@6184: of the type_height attribute. The lower 4 bits are used to encode the height and belugas@6184: slope data. belugas@6184:

belugas@6184: belugas@6184: Special Attribute : m6. There are 4 bits of it that are used accross multiple tile classes
belugas@6184: belugas@6184:

belugas@6029: For a graphical representation of the tile-layout have a look at belugas@6029: Landscape grid page. belugas@6029:

pasky@464: belugas@6180: The owner of a tile, as frequently associated with attribute m1, belugas@6029: can be either players (human or AI) or "Game entities". belugas@6029: They are identified using: belugas@6184: belugas@6029: belugas@6029: belugas@6029: belugas@6029: belugas@6029: belugas@6029: belugas@6180:
00  current player
01..08  AI or network players
0F  a town owns the tile
10  nobody owns the tile
11  "water" owns the tile
FF  spectator in MP or in scenario editor
pasky@464: belugas@6029:

OTTD's class-specific periodic tile processing routine is called once every +256 ticks for each tile.

pasky@464: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6184: belugas@6180: belugas@6029: belugas@6180: belugas@6029: belugas@6029: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6180: belugas@6029: belugas@6029: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6180: belugas@6180: belugas@6029: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: pasky@464: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6180: belugas@6180: belugas@6029: pasky@464: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6184: belugas@6184: belugas@6029: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029: belugas@6180: belugas@6029: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6029:
ClassMeaning & details of encoding
0  Ground
  belugas@6029:
    belugas@6180:
  • m1: owner of the tile (normally 10)
  • frosch@8457:
  • m2: see fields
  • frosch@8457:
  • m3 bits 3..0: see fields
  • belugas@6180:
  • m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)
  • belugas@6180:
  • m4 bits 4..2: same as 7..5, but for the SE border
  • belugas@6029:
  • m5 bits 7..5: update counter, incremented on every periodic processing for tile types, belugas@6029: other than 03, 07, 0B, 10 and above.
    belugas@6029: 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).
    belugas@6180: For snow and desert, these bits are not used, tile is updated on every periodic processing.
  • frosch@8457:
  • m5 bits 4..2: tile type: belugas@6180: belugas@6180: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
    0  bare land / grass
    1  rough land (density must be 3)
    2  rocks (density must be 3)
    3  fields (density must be 3) frosch@8457:
      frosch@8457:
    • m2: index into the array of industries (farms), INVALID_INDUSTRY (0xFFFF) if farm has been removed
    • frosch@8457:
    • m3 bits 3..0: field type (legal values: 0 through 9)
    • frosch@8457:
    frosch@8457:
    4  snow
    5  desert (density must be 1 or 3)
    frosch@8457:
  • frosch@8457:
  • m5 bits 1..0: density: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: belugas@6180: belugas@6180:
    0  bare land1/4 snow
    1  1/3 grass2/4 snow; 1/2 desert
    2  2/3 grass3/4 snow
    3  full grass; rough land; rocks; fields; full snow; full desert
    belugas@6029:
  • belugas@6184:
  • m6 bits 7..6 : Possibility of a bridge above, in the direction specified
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • belugas@6029:
belugas@6029:
1Railway tracks
  belugas@6029:
    frosch@8457:
  • m1: owner of the tile
  • frosch@8457:
  • m2: see waypoint and signals
  • frosch@8457:
  • m3 bits 7..4: see signals
  • frosch@8457:
  • m3 bits 3..0 = track type: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
    0  conventional railway
    1  electrified railway
    2  monorail
    3  maglev
    frosch@8457:
  • frosch@8457:
  • m4 bits 7..4: see signals
  • frosch@8457:
  • m4 bits 3..0: Ground type (values with fences are not valid for depots and checkpoints) frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: smatz@8524: smatz@8524: smatz@8524: smatz@8524: smatz@8524: frosch@8457:
    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
    frosch@8457:
  • belugas@6029:
  • m5 bit 7 clear: railway track belugas@6029:
      belugas@6180:
    • m5 bits 5..0: track layout: bit set = track present: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029:
      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)
      belugas@6029:
    • frosch@8457:
    • m5 bit 6 set = with signals:
      frosch@8457: There are at most 4 signals on a tile. The signals 0..3 belong to the directions: belugas@6029: belugas@6180: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
      Track 0 (X) Track 1 (Y) Track 2 (north) Track 3 (south) Track 4 (west) Track 5 (east)
      Signal 0 westsouth
      Signal 1 eastnorth
      Signal 2 south-westnorth-westwestsouth
      Signal 3 north-eastsouth-easteastnorth
      frosch@8457:
        rubidium@9790:
      • m2 bit 7: Signal 0 and 1: set = semaphore signals, clear = light signals
      • rubidium@9790:
      • m2 bit 3: Signal 2 and 3: set = semaphore signals, clear = light signals
      • rubidium@9790:
      • m2 bits 6..4: type of signal 0 and 1 (same values as m2 bits 2..0)
      • rubidium@9790:
      • m2 bits 2..0: type of signal 2 and 3 frosch@8457: frosch@8457: rubidium@9790: frosch@8457: frosch@8457: frosch@8457: frosch@8457: rubidium@9790: frosch@8457: frosch@8457: frosch@8457: frosch@8457: rubidium@9790: frosch@8457: frosch@8457: frosch@8457: frosch@8457: rubidium@9790: frosch@8457: frosch@8457: rubidium@9790: rubidium@9790: rubidium@9790: rubidium@9790: rubidium@9790: rubidium@9790: rubidium@9790: rubidium@9790: rubidium@9790: rubidium@9790: frosch@8457:
        000: normal signals
        001: pre-signals
        010: exit-signals
        011: combo-signals
        100: pbs signals
        101: no-entry signals
        frosch@8457:
      • frosch@8457: frosch@8457:
      • m3 bits 7..4: bit set = signal 3..0 present
      • frosch@8457:
      • m4 bits 7..4: bit clear = signal 3..0 shows red
      • frosch@8457:
      frosch@8457:
    • rubidium@9784:
    • m2 bits 8..10: track reserved for pbs rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784: rubidium@9784:
      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)
      rubidium@9784:
    • rubidium@9784:
    • m2 bit 11: opposite track is reserved, too
    • frosch@8457:
    frosch@8457:
  • frosch@8457:
  • m5 bit 7 set, bit 6 clear: checkpoint frosch@8457:
      frosch@8457:
    • m2: index into the array of waypoints.
    • frosch@8457:
    • m5 bit 0: frosch@8457: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: belugas@6180: frosch@8457: belugas@6180: belugas@6180: belugas@6029:
      0  in X direction
      1  in Y direction
      belugas@6029:
    • rubidium@9784:
    • m5 bit 4: pbs reservation state
    • belugas@6029:
    frosch@8457:
  • frosch@8457:
  • m5 bit 7 set, bit 6 set: railway depot frosch@8457:
      frosch@8457:
    • m5 bits 1..0: exit towards frosch@8457: belugas@6180: frosch@8457: frosch@8457: belugas@6180: belugas@6180: belugas@6180: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: belugas@6180: belugas@6180:
      0  NE
      1  SE
      2  SW
      3  NW
      belugas@6180:
    • rubidium@9784:
    • m5 bit 4: pbs reservation state
    • belugas@6029:
    belugas@6029:
  • belugas@6184:
  • m6 bits 7..6 : Possibility of a bridge above, in the direction specified
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • belugas@6029:
belugas@6029:
2Roads
  belugas@6180:
    smatz@10340:
  • 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)
  • frosch@8457:
  • m3 bit 7 set = on snow or desert
  • frosch@8457:
  • m7 bits 7..5: present road types frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
    bit 0  normal road
    bit 1  tram
    bit 2  reserved
    frosch@8457:
  • frosch@8457:
  • m5 bits 7 clear: road or level-crossing belugas@6180:
      belugas@6180:
    • m3 bits 6..4: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
      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
      belugas@6180:
    • frosch@8457:
    • m5 bits 3..0: owner of road type 1 (tram); OWNER_NONE (10) is stored as OWNER_TOWN (0F) frosch@8457:
    • m7 bits 4..0: owner of road type 2 (reserved) frosch@8457:
    • m5 bit 6 clear: road frosch@8457:
        frosch@8457:
      • m1: owner of the road type 0 (normal road)
      • frosch@8457:
      • m3 bits 3..0: counter for the roadworks
      • frosch@8457:
      • m4 bits 3..0: road layout road type 0 (normal road): bit set = road piece present: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
        bit 0: NW piece
        bit 1: SW piece
        bit 2: SE piece
        bit 3: NE piece
        frosch@8457:
      • frosch@8457:
      • m4 bits 7..4: road layout road type 1 (tram)
      • frosch@8457:
      • m6 bits 5..2: road layout road type 2 (reserved)
      • frosch@8457:
      • m5 bits 5..4: bits to disallow vehicles to go a specific direction frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
        bit 0: set = disallow driving in south-west or south-east direction
        bit 1: set = disallow driving in north-west or north-east direction
        frosch@8457:
      • frosch@8457:
      belugas@6180:
    • frosch@8457:
    • m5 bit 6 set: level crossing frosch@8457:
        frosch@8457:
      • m1: owner of the railway track
      • frosch@8457:
      • m3 bits 3..0: railway track type
      • frosch@8457:
      • m4 bit 6: direction frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
        0  road in the X direction, rail in Y
        1  road in the Y direction, rail in X
        frosch@8457:
      • frosch@8457:
      • m4 bit 5: set if crossing lights are on
      • frosch@8457:
      • m4 bits 4..0: owner of the road type 0 (normal road)
      • rubidium@9784:
      • m5 bit 4: pbs reservation state
      • frosch@8457:
      rubidium@6682:
    • belugas@6180:
    belugas@6180:
  • rubidium@6682:
  • m5 bit 7 set, bit 6 clear: road depot belugas@6180:
      belugas@6180:
    • m1: owner of the depot
    • frosch@8457:
    • m5 bits 3..0: exit towards: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
      0  NE
      1  SE
      2  SW
      3  NW
      frosch@8457:
    • belugas@6180:
    belugas@6180:
  • belugas@6184:
  • m6 bits 7..6 : Possibility of a bridge above, in the direction specified
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • belugas@6180:
belugas@6180:
3Town building
  belugas@6029:
    maedhros@6332:
  • m1 : Random bits (newhouses)
  • frosch@8457:
  • m2 : index into the array of towns
  • maedhros@6332:
  • m3 bit 7 : belugas@6029:
      maedhros@6332:
    • set : House is complete maedhros@6332:
        frosch@10360:
      • m5 : Age of house in years, clamped at 255
      • maedhros@6332:
      maedhros@6332:
    • maedhros@6332:
    • clear : House is in construction maedhros@6332:
        maedhros@6332:
      • m5 bits 7..5 : free
      • maedhros@6332:
      • m5 bits 4..3 : construction stage
      • maedhros@6332:
      • m5 bits 2..0 : construction counter
      • maedhros@6332:
      maedhros@6332:
    • maedhros@6332:
    frosch@8457:
  • m3 bit 6 : bit 8 of house type (m4), allowing 512 different types.
  • frosch@8681:
  • m3 bit 5 : bit 6 of current animation frame (see m6)
  • frosch@8457:
  • m3 bits 4..0 : triggers activated (newhouses)
  • maedhros@6332:
  • m4 : town building type (with m3[6] bit)
  • maedhros@6332:
  • m5 : see m3 bit 7
  • maedhros@6332:
  • m6 : maedhros@6332:
      maedhros@6332:
    • If newhouses is activated maedhros@6332:
        frosch@8681:
      • bits 7..2 : Current animation frame (bits 5..0); bit 6 in m3
      • maedhros@6332:
      maedhros@6332:
    • maedhros@6332:
    • Standard behaviour maedhros@6332:
        maedhros@6332:
      • bits 7..2 : lift position (for houses type 04 and 05)
      • maedhros@6332:
      maedhros@6332:
    • maedhros@6332:
    • bits 1..0 : tropic zone specifier
    • belugas@6029:
    belugas@6029:
  • maedhros@6332:
  • m7 : maedhros@6332:
      maedhros@6332:
    • If newhouses is activated maedhros@6332:
        maedhros@6332:
      • Periodic processing time remaining
      • maedhros@6332:
      maedhros@6332:
    • maedhros@6332:
    • Standard behaviour (only for houses type 04 and 05) maedhros@6332:
        maedhros@6332:
      • bits 7..4 : free
      • maedhros@6332:
      • bits 3..1 : lift destination. Values can be 0..6, except 1.
        maedhros@6332: So the building has 6 effective floors. This is due to the fact that the first floor is 2 'normal' floors high.
        maedhros@6332: One 'normal' floor has a height of 6 lift positions. maedhros@6332:
      • maedhros@6332:
      • bit 0 : Lift has destination when set
      • maedhros@6332:
      maedhros@6332:
    • maedhros@6332:
    maedhros@6332:
  • belugas@6029:
maedhros@6332: Newhouses is the name englobing a newGRF feature developped by TTDPatch devs (mainly Csaboka).
maedhros@6332: It allows the replacement of the properties as well as the graphics of houses in the game.
maedhros@6332: To distinguish between the standard behaviour and the newGRF one, HouseID (m4 + m3[6]) is tested for anything above 110.
maedhros@6332: 110 is the count of standard houses. So above 110 means there is a new definition of at least one house
belugas@6029:
4 Trees
  belugas@6029:
    belugas@6184:
  • m1: owner (normally 10)
  • frosch@8457:
  • m2 bits 7..6: ground density frosch@8457:
  • m2 bits 5..4: ground belugas@6184: belugas@6180: belugas@6184: frosch@8459: frosch@8459: belugas@6184: belugas@6180: belugas@6184: frosch@8459: frosch@8459: belugas@6184: belugas@6184: belugas@6184: frosch@8459: frosch@8459: frosch@8459: frosch@8459: frosch@8459: frosch@8459: frosch@8459: belugas@6184: belugas@6184:
    0  on grass
    1  on rough land (density must be 3)
    2  on snow or desert
    3  on shore (density must be 3)
    belugas@6184:
  • belugas@6184:
  • m2 bits 3..0: update counter, incremented on every periodic processing.
    belugas@6184: on wraparound the growth status is updated (or, if it's 3, a random action is taken)
  • belugas@6184:
  • m3 bits 7..0: type of trees: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184:
    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
    belugas@6184: Note: the actually displayed set of trees depends on both type and number of trees belugas@6184:
  • belugas@6184:
  • m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)
  • belugas@6184:
  • m4 bits 4..2: type of hedge on the SE border of the tile (1 through 6, or 0=none)
  • belugas@6184:
  • m5 bits 7..6: number of trees minus one
  • belugas@6184:
  • m5 bits 2..0: growth status: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184:
    0..2 one of trees is growing 
    3 all trees are fully grown 
    4..6 one of trees is withering 
    belugas@6184:
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • belugas@6029:
belugas@6029:
5Station tiles
  belugas@6180:
    belugas@6180:
  • m1: owner of the station
  • belugas@6180:
  • m2: index into the array of stations
  • belugas@6180:
  • m3 bits 7..4: persistent random data for newstations
  • frosch@8457:
  • m3 bits 3..0: track type for railway stations
  • frosch@8457:
  • m3 bits 2..0: present road types for road stops
  • peter1138@8471:
  • m3 bits 1..0: water class for buoys and water part of docks
  • belugas@6180:
  • m4: custom station id; 0 means standard graphics
  • rubidium@7272:
  • m5: graphics index (range from 0..255 for each station type): belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: rubidium@7272: rubidium@7272: belugas@6180: belugas@6029: belugas@6180: frosch@8457: frosch@8457: belugas@6180: pasky@464: belugas@6180: rubidium@7272: belugas@6180: belugas@6180: belugas@6029:
    00..07  railway station belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    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
    belugas@6180:
    00..8Fall airports
    00..05  road stops: belugas@6180: belugas@6180: rubidium@7272: frosch@8457: belugas@6180: belugas@6180: rubidium@7272: frosch@8457: belugas@6180: belugas@6180: rubidium@7272: frosch@8457: belugas@6180: belugas@6180: rubidium@7272: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: belugas@6180: belugas@6180:
    00  exit towards NE
    01  exit towards SE
    02  exit towards SW
    03  exit towards NW
    04  drive through X
    05  drive through Y
    belugas@6180:
    00..05  ship dock belugas@6180: belugas@6180: rubidium@7272: belugas@6180: belugas@6180: belugas@6180: rubidium@7272: belugas@6180: belugas@6180: belugas@6180: rubidium@7272: belugas@6180: belugas@6180: belugas@6180: rubidium@7272: belugas@6180: belugas@6180: belugas@6180: rubidium@7272: belugas@6180: belugas@6180: belugas@6180: rubidium@7272: belugas@6180: belugas@6180: belugas@6180:
    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
    belugas@6180:
    belugas@6029:
  • frosch@8457:
  • m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy)
  • rubidium@7272:
  • m6 bit 2: 1 when a drive through road stop is built over a town owned road, otherwise 0
  • rubidium@9784:
  • m6 bit 2: pbs reservation state for railway stations
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • peter1138@8955:
  • m7: animation frame
  • belugas@6029:
belugas@6029:
6 Water
  belugas@6180:
    frosch@8457:
  • m1: owner (for sea, rivers, and coasts normally 11)
  • peter1138@8471:
  • m3 bits 1..0 : Water class (sea, canal or river) frosch@8457:
  • m4: Random data for canal or river tiles
  • belugas@6180:
  • m5: tile type: belugas@6180: belugas@6180: belugas@6180: peter1138@8471: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    00  water, canal or river
    01  coast or riverbank
    10..1B  canal locks belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    10  middle part, (SW-NE direction)
    11  middle part, (NW-SE direction)
    12  middle part, (NE-SW direction)
    13  middle part, (SE-NW direction)
    14  lower part, (SW-NE direction)
    15  lower part, (NW-SE direction)
    16  lower part, (NE-SW direction)
    17  lower part, (SE-NW direction)
    18  upper part, (SW-NE direction)
    19  upper part, (NW-SE direction)
    1A  upper part, (NE-SW direction)
    1B  upper part, (SE-NW direction)
    belugas@6180:
    80..83  ship depots belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    80  ship depot, NE part (X direction)
    81  ship depot, SW part (X direction)
    82  ship depot, NW part (Y direction)
    83  ship depot, SE part (Y direction)
    belugas@6180:
    belugas@6180:
  • belugas@6184:
  • m6 bits 7..6 : Possibility of a bridge above, in the direction specified
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • belugas@6180:
belugas@6029:
7 Void
 Tiles of this class form an invisible, one tile wide border at the south (bottom) edges of the map,
belugas@6180: so as to protect several algorithms from the consequences of a wraparound at the edges. belugas@6180:
8Industry tile
  belugas@6029:
    belugas@6029:
  • m1 bit 7: clear = under construction belugas@6029:
      frosch@9718:
    • m1 bits 6..5 : Water class (sea, canal, river or land) frosch@8457:
    • m1 bits 3..2: construction counter, for buildings under construction incremented on every periodic tile processing
    • belugas@6029:
    • m1 bits 1..0: stage of construction (3 = completed), incremented when the construction counter wraps around
      belugas@6029: the meaning is different for some animated tiles which are never under construction (types 01, 1E..20, 30, 58; see above)
    • belugas@6029:
    belugas@6029:
  • belugas@6180:
  • m2: index into the array of industries
  • frosch@8457:
  • m3: animation state
  • frosch@8457:
  • m4: animation loop
  • rubidium@7621:
  • m5: type (plus m6 bit 2):
    belugas@6180: (note: this is not the same as the industry type, which is stored in the array of industries) belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: rubidium@7621: rubidium@7621: rubidium@7621: rubidium@7621: belugas@6180:
    00..06  coal mine belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    00  wheel tower when not animated
    01  wheel tower when animated
    belugas@6180: animation state in m3 bits 5..0; m3 bit 6 set = sound already generated
    belugas@6180:
    07..0A  power station belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    08  chimney
    0A  transformer; animation progress in m3(valid range 0..7)
    belugas@6180:
    0B..0F  sawmill
    10..11  forest belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    11  trees cut down
    belugas@6180:
    12..17  oil refinery
    18..1C  oil rig
    1D..20  oil wells belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    1D  not animated
    1E..20  various stages of animation; progress of animation in m3
    belugas@6180:
    21..26  farm
    27..2A  factory (temperate climate)
    2B..2E  printing works
    2F..33  copper ore mine belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    2F  wheel tower when not animated
    30  wheel tower when animated; animation state in m3 bits 5..0; m3 bit 6 set = sound already generated
    31  chimney
    belugas@6180:
    34..39  steel mill
    3A..3B  bank (temperate climate)
    3C..3F  food processing plant
    40..47  paper mill
    48..58  gold mine belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    4F  wheel tower when not animated
    58  wheel tower when animated; animation state in m3 bits 5..0; m3 bit 6 set = sound already generated
    59..5A  bank (sub-arctic or sub-tropical climate)
    5B..63  diamond mine
    64..73  iron ore mine
    74fruit plantation
    75rubber plantation
    76..77  water supply
    78water tower
    79..7C  factory (sub-tropical climate)
    7D..80  lumber mill
    81..82  candyfloss forest belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    82  candyfloss 'trees' cut down
    belugas@6180:
    83..86  sweet factory
    87..88  battery farm belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    88  batteries 'reaped'
    belugas@6180:
    89cola wells
    8A..8D  toy shop
    8E..93  toy factory belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    8F  Animated part; animation state in m3 (valid range 00..31)
    belugas@6180: Tile animation is started (m4 zeroed) on the periodic processing.
    belugas@6180: While the animation is in progress, m4 holds the number belugas@6180: of animation cycles that have already taken place.
    belugas@6180: when this number reaches 8 the animation is stopped.
    belugas@6180:
    94..9B  plastic fountains (various stages of cyclic animation)
    9C..9F  fizzy drink factory
    A0..A3  bubble generator belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    A1  generators
    A2  bubble capture facility; animation state in m3 (valid range 00..27)
    belugas@6180:
    A4..A6  toffee quarry belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    A5  animated part; animation state in m3 (valid range 00..45)
    belugas@6180:
    A7..AE  sugar mine belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180:
    AE  animated part; animation state in m3 (valid range 00..5F)
    belugas@6180:
    AF..1FF  NewGRF industries industry
    belugas@6180:
  • frosch@8457:
  • m6 bits 5..3: random triggers (NewGRF)
  • frosch@8457:
  • m6 bit 2: bit 8 of type (see m5)
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • rubidium@7621:
  • m7: random bits (NewGRF)
  • belugas@6029:
belugas@6029:
9Tunnel / bridge
  belugas@6184:
    frosch@8457:
  • m1: owner
  • frosch@8457:
  • m2 bits 7..4: see bridge ramp
  • frosch@8457:
  • m3 bits 3..0: track type for railway
  • frosch@8457:
  • m3 bits 2..0: present road types for road
  • frosch@8457:
  • m4 bit 7 set = on snow or desert
  • rubidium@9784:
  • m5 bit 4: pbs reservation state for railway
  • frosch@8457:
  • m5 bits 7 clear: tunnel entrance/exit
  • belugas@6184:
  • m5 bit 7 set: bridge ramp belugas@6184:
      belugas@6184:
    • m2 bits 7..4: bridge type: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6180: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6180: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6180: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: belugas@6184: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: belugas@6184:
      Type Max. speed (mph) Description
      0  20wooden
      1  30concrete
      2  40girder, steel
      3  50suspension, concrete
      4  60suspension, steel
      5  70suspension, steel
      6  100cantilever, steel
      7  130cantilever, steel
      8  150cantilever, steel
      9  160girder, steel
      A  200tubular, steel
      B  320tubular, steel
      C  380tubular, silicon
      belugas@6184:
    • belugas@6184:
    belugas@6184:
  • frosch@8457:
  • m5 bits 3..2: transport type frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@10147: frosch@10147: frosch@10147: frosch@10147: frosch@10147: frosch@8457: frosch@8457:
  • m5 bits 1..0: direction onto the bridge / out of the tunnel frosch@8457:
  • 0 railway
    1 road
    2 water
    frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457: frosch@8457:
    0  NE
    1  SE
    2  SW
    3  NW
    frosch@8457:
  • belugas@6184:
  • m6 bits 7..6 : Possibility of a bridge above, in the direction specified
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • belugas@6029:
belugas@6029:
AUnmovables
  belugas@6029:
    frosch@8457:
  • m1: owner of the object (for lighthouses and transmitters normally 10)
  • frosch@8457:
  • m2: see company statue frosch@8457:
  • m5: tile type: belugas@6029: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: frosch@8457: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6180: belugas@6029:
    00  transmitter
    01  lighthouse
    02  company statue frosch@8457:
      frosch@8457:
    • m2: TownID on which the statue is built in
    • frosch@8457:
    frosch@8457:
    03  company-owned land
    80..93  company headquarters (5 sets of 4 tiles each, updated quarterly depending on the company performance)
    belugas@6029:
  • belugas@6184:
  • m6 bits 7..6 : Possibility of a bridge above, in the direction specified
  • belugas@6184:
  • m6 bits 1..0 : Tropic zone definition
  • belugas@6029:
belugas@6029:
Classes B through F are reserved. The presence belugas@6180: of a tile in one of the reserved classes will crash OTTD.
pasky@464: pasky@464: belugas@6029:
belugas@6029: Original Copyright © 2003 by Marcin Grzegorczyk for TTDLX.
belugas@6029: Transport Tycoon and Transport Tycoon Deluxe are Copyright © by Chris Sawyer.
belugas@6029: All the other trademarks are the property of their respective owners.
belugas@6029: pasky@464: pasky@464: