OpenTTD Source: DifficultySettings Struct Reference

OpenTTD Source 15.3

Data Fields
DifficultySettings Struct Reference

Settings related to the difficulty of the game. More...

`#include <settings_type.h>`

## Data Fields
uint8_t | competitor_start_time
| Unused value, used to load old savegames.
uint8_t | competitor_intelligence
| Unused value, used to load old savegames.
uint8_t | max_no_competitors
| the number of competitors (AIs)
uint16_t | competitors_interval
| the interval (in minutes) between adding competitors
uint8_t | number_towns
| the amount of towns
uint8_t | industry_density
| The industry density.
uint32_t | max_loan
| the maximum initial loan
uint8_t | initial_interest
| amount of interest (to pay over the loan)
uint8_t | vehicle_costs
| amount of money spent on vehicle running cost
uint8_t | competitor_speed
| the speed at which the AI builds
uint8_t | vehicle_breakdowns
| likelihood of vehicles breaking down
uint8_t | subsidy_multiplier
| payment multiplier for subsidized deliveries
uint16_t | subsidy_duration
| duration of subsidies
uint8_t | construction_cost
| how expensive is building
uint8_t | terrain_type
| the mountainousness of the landscape
uint8_t | quantity_sea_lakes
| the amount of seas/lakes
bool | economy
| how volatile is the economy
bool | line_reverse_mode
| reversing at stations or not
bool | disasters
| are disasters enabled
uint8_t | town_council_tolerance
| minimum required town ratings to be allowed to demolish stuff
bool | infinite_money
| whether spending money despite negative balance is allowed

## Detailed Description

Settings related to the difficulty of the game.

Definition at line 121 of file settings_type.h.

## Field Documentation

## ◆ competitor_intelligence

uint8_t DifficultySettings::competitor_intelligence

Unused value, used to load old savegames.

Definition at line 123 of file settings_type.h.

## ◆ competitor_speed

uint8_t DifficultySettings::competitor_speed

the speed at which the AI builds

Definition at line 132 of file settings_type.h.

Referenced by AI::GameLoop().

## ◆ competitor_start_time

uint8_t DifficultySettings::competitor_start_time

Unused value, used to load old savegames.

Definition at line 122 of file settings_type.h.

## ◆ competitors_interval

uint16_t DifficultySettings::competitors_interval

the interval (in minutes) between adding competitors

Definition at line 126 of file settings_type.h.

Referenced by AfterLoadGame(), and OnTick_Companies().

## ◆ construction_cost

uint8_t DifficultySettings::construction_cost

how expensive is building

Definition at line 136 of file settings_type.h.

Referenced by RecomputePrices().

## ◆ disasters

bool DifficultySettings::disasters

are disasters enabled

Definition at line 141 of file settings_type.h.

## ◆ economy

bool DifficultySettings::economy

how volatile is the economy

Definition at line 139 of file settings_type.h.

## ◆ industry_density

uint8_t DifficultySettings::industry_density

The industry density.

See also
  IndustryDensity

Definition at line 128 of file settings_type.h.

Referenced by AfterLoadGame(), IndustryBuildData::EconomyMonthlyLoop(), GenerateIndustries(), GetIndustryGamePlayProbability(), GetNumberOfIndustries(), GetScaledIndustryGenerationProbability(), GenerateLandscapeWindow::GetWidgetString(), GenerateLandscapeWindow::OnClick(), and GenerateLandscapeWindow::OnDropdownSelect().

## ◆ infinite_money

bool DifficultySettings::infinite_money

whether spending money despite negative balance is allowed

Definition at line 143 of file settings_type.h.

Referenced by CheckCompanyHasMoney(), CompanyCheckBankrupt(), StatusBarWindow::DrawWidget(), and GetAvailableMoney().

## ◆ initial_interest

uint8_t DifficultySettings::initial_interest

amount of interest (to pay over the loan)

Definition at line 130 of file settings_type.h.

Referenced by CompanyFinancesWindow::GetWidgetString().

## ◆ line_reverse_mode

bool DifficultySettings::line_reverse_mode

reversing at stations or not

Definition at line 140 of file settings_type.h.

## ◆ max_loan

uint32_t DifficultySettings::max_loan

the maximum initial loan

Definition at line 129 of file settings_type.h.

Referenced by AfterLoadGame(), and RecomputePrices().

## ◆ max_no_competitors

uint8_t DifficultySettings::max_no_competitors

the number of competitors (AIs)

Definition at line 125 of file settings_type.h.

Referenced by AIConfigWindow::DrawWidget(), and OnTick_Companies().

## ◆ number_towns

uint8_t DifficultySettings::number_towns

the amount of towns

Definition at line 127 of file settings_type.h.

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

## ◆ quantity_sea_lakes

uint8_t DifficultySettings::quantity_sea_lakes

the amount of seas/lakes

Definition at line 138 of file settings_type.h.

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

## ◆ subsidy_duration

uint16_t DifficultySettings::subsidy_duration

duration of subsidies

Definition at line 135 of file settings_type.h.

Referenced by Subsidy::AwardTo(), and CreateSubsidy().

## ◆ subsidy_multiplier

uint8_t DifficultySettings::subsidy_multiplier

payment multiplier for subsidized deliveries

Definition at line 134 of file settings_type.h.

Referenced by Subsidy::AwardTo(), and DeliverGoods().

## ◆ terrain_type

uint8_t DifficultySettings::terrain_type

the mountainousness of the landscape

Definition at line 137 of file settings_type.h.

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

## ◆ town_council_tolerance

uint8_t DifficultySettings::town_council_tolerance

minimum required town ratings to be allowed to demolish stuff

Definition at line 142 of file settings_type.h.

Referenced by CheckforTownRating(), CheckIfAuthorityAllowsNewStation(), ClearTile_Town(), CmdBuildAirport(), GetAirportNoiseLevelForDistance(), and Town::MaxTownNoise().

## ◆ vehicle_breakdowns

uint8_t DifficultySettings::vehicle_breakdowns

likelihood of vehicles breaking down

Definition at line 133 of file settings_type.h.

Referenced by Vehicle::NeedsServicing(), and VehicleServiceInDepot().

## ◆ vehicle_costs

uint8_t DifficultySettings::vehicle_costs

amount of money spent on vehicle running cost

Definition at line 131 of file settings_type.h.

Referenced by RecomputePrices().

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

- src/settings_type.h