NML:Tilelayout

From GRFSpecs
Jump to: navigation, search
Block Syntax

A tile layout describes which industry or airport tiles are associated with which position relative to the northernmost (north being the top of the screen) edge of the industry or airport as a whole. A typical example looks like:

 tilelayout small_airport_layout_north {
 	rotation: DIRECTION_NORTH;
 	0, 0: small_airport_tiles_hangar;
 	1, 0: small_airport_tiles_terminal;
 	2, 0: small_airport_tiles_terminal;
 	3, 0: small_airport_tiles_terminal;
 	0, 1: small_airport_tiles_taxi;
 	1, 1: small_airport_tiles_taxi;
 	2, 1: small_airport_tiles_taxi;
 	3, 1: small_airport_tiles_taxi;
 	0, 2: small_airport_tiles_runway;
 	1, 2: small_airport_tiles_runway;
 	2, 2: small_airport_tiles_runway;
 	3, 2: small_airport_tiles_runway;
 }

The actual layout is a list of x-coordinate, y-coordinate: tile; where the x- and y-directions refer to the usual directions: x is top-right (North-East) to bottom-left (South-West) and the y-direction is perpendicular to that; top-left (North-West) to bottom-right (South-East). The value of tile may be one of the following:

  • A number, which refers to an original TTD industry/airport tile.
  • The name of an industry/airport tile in your GRF.
  • The text clear, the tile will then be checked for clearance during construction, but nothing is placed on it.

Airports additionally have to define a rotation which is one of the default directions. Note that only the four main compass directions are valid. Industries may not define a rotation.