VariationalAction2/Towns

From GRFSpecs

Jump to: navigation, search

Contents

Introduction

Variables

VariableSizeVersionContent
40BSupported by OpenTTD Supported by TTDPatchLarger town effect on this town
41W (B)Supported by OpenTTD Supported by TTDPatchTown index[1]
82WSupported by OpenTTD Supported by TTDPatchPopulation
94, 96, 98, 9A, 9CWSupported by OpenTTD Supported by TTDPatchSquare of town zone radii for the town zones 0 ... 4
B6WSupported by OpenTTD Supported by TTDPatchnumber of buildings
  1. In OpenTTD this variable is word-sized, in TTDPatch this variable is byte-sized.

These are accessed by using a type 82/86/8A action 2 for stations, town buildings, or industries.

For other 80+x variables confer the TTD town structure.

Description

Larger town effect (40)

This returns how the "largertowns" / "economy.larger_towns" setting affects this town:

ValueMeaning
0largertowns is enabled, but it won't allow this town to grow larger than usual
1largertowns is enabled, and it allows to grow this town larger
2largertowns is disabled, so no towns are allowed to grow larger

Town index (41)

This returns the index of the town in the town array. You can use this value to treat some towns specially. (For example, the first town on the map can be considered the capital and you can allow a Parliament to be built there, but nowhere else)

TTDPatch only: This variable has a value between 0 and 69 (inclusive).

Population (82)

Returns the population of the town, but at most 65535.

Town zone radii (94, 96, 98, 9A, 9C)

Squares of radii of 5 town zones where variable 94 refers to the outermost zone 0 and variable 9C to the inner most zone 4.

Number of buildings (B6)

Returns the number of buildings the town possesses.

Example

Personal tools
advertisement