OpenTTD Source: GameCreationSettings Struct Reference

OpenTTD Source 15.0-RC2

Data Fields
GameCreationSettings Struct Reference

Settings related to the creation of games. More...

`#include <settings_type.h>`

## Data Fields
uint32_t | generation_seed
| noise seed for world generation
TimerGameCalendar::Year | starting_year
| starting date
TimerGameCalendar::Year | ending_year
| scoring end date
uint8_t | map_x
| X size of map.
uint8_t | map_y
| Y size of map.
uint8_t | land_generator
| the landscape generator
uint8_t | oil_refinery_limit
| distance oil refineries allowed from map edge
uint8_t | snow_line_height
| the configured snow line height (deduced from "snow_coverage")
uint8_t | snow_coverage
| the amount of snow coverage on the map
uint8_t | desert_coverage
| the amount of desert coverage on the map
uint8_t | heightmap_height
| highest mountain for heightmap (towards what it scales)
uint8_t | tgen_smoothness
| how rough is the terrain from 0-3
uint8_t | tree_placer
| the tree placer algorithm
uint8_t | heightmap_rotation
| rotation director for the heightmap
uint8_t | se_flat_world_height
| land height a flat world gets in SE
uint8_t | town_name
| the town name generator used for town names
LandscapeType | landscape
| the landscape we're currently in
BorderFlags | water_borders
| bitset of the borders that are water
BorderFlagPresets | water_border_presets
| presets for map border options
uint16_t | custom_town_number
| manually entered number of towns
uint16_t | custom_industry_number
| manually entered number of industries
uint8_t | variety
| variety level applied to TGP
uint8_t | custom_terrain_type
| manually entered height for TGP to aim for
uint8_t | custom_sea_level
| manually entered percentage of water in the map
uint8_t | min_river_length
| the minimum river length
uint8_t | river_route_random
| the amount of randomicity for the route finding
uint8_t | amount_of_rivers
| the amount of rivers

## Detailed Description

Settings related to the creation of games.

Definition at line 378 of file settings_type.h.

## Field Documentation

## ◆ amount_of_rivers

uint8_t GameCreationSettings::amount_of_rivers

the amount of rivers

Definition at line 405 of file settings_type.h.

Referenced by CreateRivers(), GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnClick(), and GenerateLandscapeWindow::OnDropdownSelect().

## ◆ custom_industry_number

uint16_t GameCreationSettings::custom_industry_number

manually entered number of industries

Definition at line 399 of file settings_type.h.

Referenced by GetNumberOfIndustries(), GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnDropdownSelect(), and GenerateLandscapeWindow::OnQueryTextFinished().

## ◆ custom_sea_level

uint8_t GameCreationSettings::custom_sea_level

manually entered percentage of water in the map

Definition at line 402 of file settings_type.h.

Referenced by GenerateLandscapeWindow::GetWidgetString(), HeightMapNormalize(), GenerateLandscapeWindow::OnDropdownSelect(), and GenerateLandscapeWindow::OnQueryTextFinished().

## ◆ custom_terrain_type

uint8_t GameCreationSettings::custom_terrain_type

manually entered height for TGP to aim for

Definition at line 401 of file settings_type.h.

Referenced by GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnDropdownSelect(), GenerateLandscapeWindow::OnQueryTextFinished(), and TGPGetMaxHeight().

## ◆ custom_town_number

uint16_t GameCreationSettings::custom_town_number

manually entered number of towns

Definition at line 398 of file settings_type.h.

Referenced by GetDefaultTownsForMapSize(), GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnDropdownSelect(), and GenerateLandscapeWindow::OnQueryTextFinished().

## ◆ desert_coverage

uint8_t GameCreationSettings::desert_coverage

the amount of desert coverage on the map

Definition at line 388 of file settings_type.h.

Referenced by CalculateDesertLine(), GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnClick(), GenerateLandscapeWindow::OnInvalidateData(), and GenerateLandscapeWindow::OnQueryTextFinished().

## ◆ ending_year

TimerGameCalendar::Year GameCreationSettings::ending_year

scoring end date

Definition at line 381 of file settings_type.h.

Referenced by AfterLoadGame().

## ◆ generation_seed

uint32_t GameCreationSettings::generation_seed

noise seed for world generation

Definition at line 379 of file settings_type.h.

Referenced by _GenerateWorld(), AfterNewGRFScan::AfterNewGRFScan(), GenerateWorld(), int_noise(), NetworkRestartMap(), AfterNewGRFScan::OnNewGRFsScanned(), ServerNetworkAdminSocketHandler::SendWelcome(), StartNewGameWithoutGUI(), StartupOneEngine(), and StateGameLoop().

## ◆ heightmap_height

uint8_t GameCreationSettings::heightmap_height

highest mountain for heightmap (towards what it scales)

Definition at line 389 of file settings_type.h.

Referenced by GenerateWorld(), GenerateLandscapeWindow::GetWidgetString(), GreyscaleToMapHeights(), GenerateLandscapeWindow::OnClick(), GenerateLandscapeWindow::OnInvalidateData(), and GenerateLandscapeWindow::OnQueryTextFinished().

## ◆ heightmap_rotation

uint8_t GameCreationSettings::heightmap_rotation

rotation director for the heightmap

Definition at line 392 of file settings_type.h.

Referenced by GenerateLandscapeWindow::GetWidgetString(), GreyscaleToMapHeights(), LoadTownData(), GenerateLandscapeWindow::OnClick(), and GenerateLandscapeWindow::OnDropdownSelect().

## ◆ land_generator

uint8_t GameCreationSettings::land_generator

the landscape generator

Definition at line 384 of file settings_type.h.

Referenced by CheckIfIndustryTileSlopes(), CreateNewIndustryHelper(), GenerateLandscape(), GenerateWorld(), GenerateLandscapeWindow::OnClick(), GenerateLandscapeWindow::OnInvalidateData(), and ValidateSettings().

## ◆ landscape

LandscapeType GameCreationSettings::landscape

the landscape we're currently in

Definition at line 395 of file settings_type.h.

Referenced by AddAcceptedCargoOfHouse(), AfterLoadGame(), CalculateRefitMasks(), ChangeIndustryProduction(), CheckIndustryCloseDownProtection(), CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), CmdPlantTree(), DoCreateTown(), DrawRoadAsSnowOrDesert(), FinaliseEngineArray(), FindSpring(), GenerateLandscape(), GenerateStationName(), GenerateTrees(), GetClimateMaskForLandscape(), GetCompanyRailTypes(), GetCompanyRoadTypes(), GetGlobalVariable(), GetIndustryGamePlayProbability(), GetMaxTreeSpriteSize(), GetRailTypes(), GetRandomTreeType(), GetRoadTypes(), GetScaledIndustryGenerationProbability(), GetSmallMapVegetationPixels(), GetTerrainType(), GfxLoadSprites(), Vehicle::HandleBreakdown(), HeightMapSineTransform(), IndustriesChangeInfo(), Engine::IsEnabled(), ObjectSpec::IsEverAvailable(), IsValidRiverTerminusTile(), LoadSpriteTables(), MakeTreeTypeButtons(), Gamelog::Mode(), CreateScenarioWindow::OnClick(), GenerateLandscapeWindow::OnInvalidateData(), CreateScenarioWindow::OnPaint(), PlaceTreesRandomly(), ResetIndustries(), ResetNewGRFData(), ServerNetworkAdminSocketHandler::SendWelcome(), SetNewLandscapeType(), SetYearEngineAgingStops(), SplitGroundSpriteForOverlay(), StartupOneEngine(), Gamelog::TestMode(), TownHouseChangeInfo(), TryBuildTownHouse(), and TryMakeRiverTerminus().

## ◆ map_x

uint8_t GameCreationSettings::map_x

X size of map.

Definition at line 382 of file settings_type.h.

Referenced by GenerateLandscapeWindow::GetWidgetString(), CreateScenarioWindow::GetWidgetString(), HeightMapCoastLines(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), and CreateScenarioWindow::OnDropdownSelect().

## ◆ map_y

uint8_t GameCreationSettings::map_y

Y size of map.

Definition at line 383 of file settings_type.h.

Referenced by GenerateLandscapeWindow::GetWidgetString(), CreateScenarioWindow::GetWidgetString(), HeightMapCoastLines(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), and CreateScenarioWindow::OnDropdownSelect().

## ◆ min_river_length

uint8_t GameCreationSettings::min_river_length

the minimum river length

Definition at line 403 of file settings_type.h.

Referenced by CreateRivers().

## ◆ oil_refinery_limit

uint8_t GameCreationSettings::oil_refinery_limit

distance oil refineries allowed from map edge

Definition at line 385 of file settings_type.h.

Referenced by CheckNewIndustry_OilRefinery(), and CheckNewIndustry_OilRig().

## ◆ river_route_random

uint8_t GameCreationSettings::river_route_random

the amount of randomicity for the route finding

Definition at line 404 of file settings_type.h.

## ◆ se_flat_world_height

uint8_t GameCreationSettings::se_flat_world_height

land height a flat world gets in SE

Definition at line 393 of file settings_type.h.

Referenced by _GenerateWorld(), GenerateWorld(), CreateScenarioWindow::GetWidgetString(), CreateScenarioWindow::OnClick(), CreateScenarioWindow::OnPaint(), and CreateScenarioWindow::OnQueryTextFinished().

## ◆ snow_coverage

uint8_t GameCreationSettings::snow_coverage

the amount of snow coverage on the map

Definition at line 387 of file settings_type.h.

Referenced by CalculateSnowLine(), GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnClick(), GenerateLandscapeWindow::OnInvalidateData(), and GenerateLandscapeWindow::OnQueryTextFinished().

## ◆ snow_line_height

uint8_t GameCreationSettings::snow_line_height

the configured snow line height (deduced from "snow_coverage")

Definition at line 386 of file settings_type.h.

Referenced by _GenerateWorld(), AfterLoadGame(), CalculateSnowLine(), GetSnowLine(), HighestSnowLine(), and LowestSnowLine().

## ◆ starting_year

TimerGameCalendar::Year GameCreationSettings::starting_year

starting date

Definition at line 380 of file settings_type.h.

Referenced by AfterLoadGame(), GenerateLandscapeWindow::GetWidgetString(), CreateScenarioWindow::GetWidgetString(), ScenarioEditorToolbarWindow::GetWidgetString(), LoadNewGRF(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), GenerateLandscapeWindow::OnInvalidateData(), CreateScenarioWindow::OnPaint(), ScenarioEditorToolbarWindow::OnPaint(), GenerateLandscapeWindow::OnQueryTextFinished(), CreateScenarioWindow::OnQueryTextFinished(), ServerNetworkAdminSocketHandler::SendWelcome(), SetStartingYear(), StartupOneEngine(), and ToolbarScenDatePanel().

## ◆ tgen_smoothness

uint8_t GameCreationSettings::tgen_smoothness

how rough is the terrain from 0-3

Definition at line 390 of file settings_type.h.

Referenced by GetAmplitude(), GenerateLandscapeWindow::GetWidgetString(), HeightMapNormalize(), GenerateLandscapeWindow::OnClick(), and GenerateLandscapeWindow::OnDropdownSelect().

## ◆ town_name

uint8_t GameCreationSettings::town_name

the town name generator used for town names

Definition at line 394 of file settings_type.h.

Referenced by AfterLoadGame(), CmdFoundTown(), DoCreateTown(), GenerateTownName(), GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnClick(), and GenerateLandscapeWindow::OnDropdownSelect().

## ◆ tree_placer

uint8_t GameCreationSettings::tree_placer

the tree placer algorithm

Definition at line 391 of file settings_type.h.

Referenced by GenerateTrees(), MakeWetlands(), and PlaceTreesRandomly().

## ◆ variety

uint8_t GameCreationSettings::variety

variety level applied to TGP

Definition at line 400 of file settings_type.h.

Referenced by GenerateLandscapeWindow::GetWidgetString(), HeightMapNormalize(), GenerateLandscapeWindow::OnClick(), and GenerateLandscapeWindow::OnDropdownSelect().

## ◆ water_border_presets

BorderFlagPresets GameCreationSettings::water_border_presets

presets for map border options

Definition at line 397 of file settings_type.h.

Referenced by GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnClick(), and GenerateLandscapeWindow::OnDropdownSelect().

## ◆ water_borders

BorderFlags GameCreationSettings::water_borders

bitset of the borders that are water

Definition at line 396 of file settings_type.h.

Referenced by GenerateLandscapeWindow::GetWidgetString(), HeightMapNormalize(), GenerateLandscapeWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), and GenerateLandscapeWindow::OnInvalidateData().

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

- src/settings_type.h