OpenTTD Source: ExternalTownData Struct Reference

OpenTTD Source 15.0-beta1

Data Fields
ExternalTownData Struct Reference

Town data imported from JSON files and used to place towns. More...

## Data Fields
TownID | town_id
| The TownID of the town in OpenTTD. Not imported, but set during the founding proceess and stored here for convenience.
std::string | name
| The name of the town.
uint | population
| The target population of the town when created in OpenTTD. If input is blank, defaults to 0.
bool | is_city
| Should it be created as a city in OpenTTD? If input is blank, defaults to false.
float | x_proportion
| The X coordinate of the town, as a proportion 0..1 of the maximum X coordinate.
float | y_proportion
| The Y coordinate of the town, as a proportion 0..1 of the maximum Y coordinate.

## Detailed Description

Town data imported from JSON files and used to place towns.

Definition at line 346 of file genworld.cpp.

## Field Documentation

## ◆ is_city

bool ExternalTownData::is_city

Should it be created as a city in OpenTTD? If input is blank, defaults to false.

Definition at line 350 of file genworld.cpp.

Referenced by LoadTownData(), and TryFoundTownNearby().

## ◆ name

std::string ExternalTownData::name

The name of the town.

Definition at line 348 of file genworld.cpp.

Referenced by LoadTownData(), and TryFoundTownNearby().

## ◆ population

uint ExternalTownData::population

The target population of the town when created in OpenTTD. If input is blank, defaults to 0.

Definition at line 349 of file genworld.cpp.

Referenced by LoadTownData().

## ◆ town_id

TownID ExternalTownData::town_id

The TownID of the town in OpenTTD. Not imported, but set during the founding proceess and stored here for convenience.

Definition at line 347 of file genworld.cpp.

Referenced by LoadTownData(), and TryFoundTownNearby().

## ◆ x_proportion

float ExternalTownData::x_proportion

The X coordinate of the town, as a proportion 0..1 of the maximum X coordinate.

Definition at line 351 of file genworld.cpp.

Referenced by LoadTownData().

## ◆ y_proportion

float ExternalTownData::y_proportion

The Y coordinate of the town, as a proportion 0..1 of the maximum Y coordinate.

Definition at line 352 of file genworld.cpp.

Referenced by LoadTownData().

The documentation for this struct was generated from the following file:

- src/genworld.cpp