BaseConfig¶
Part of type
Source: api/tealdef/api/type.d.tl
BaseConfig¶
record global api/tealdef/api/type.d.tl:3468
global record BaseConfig
Base configuration of a single game
Fields
| Name | Type | Description |
|---|---|---|
animal |
Animal |
Defines the properties of an animal |
locations |
Locations |
Town and industry placement at map generation. |
settings |
Settings |
Graphics quality settings (view distances and LOD scaling per quality mode). |
particles |
Particles |
Particle textures. |
water |
Water |
Water textures. |
emission |
Emissions |
Noise and pollution bounds and town noise settings; read with api.res.getBaseConfig().emission. |
scaffold |
{string : {string : {string}}} |
Models for construction sites per era, as a map from era to a map from part (scaffold, crane) to a list of .mdl files. |
costs |
{string : number} |
Named cost values and cost scale factors, as a map from key to number. |
advancedOptions |
AdvancedOptions |
Advanced game options (maintenance effects, subsidies, landmark resources, reforestation). |
economy |
Economy |
Cargo and passenger income scripts and town and industry development settings. |
terrain |
Terrain |
Legacy terrain mesh settings (deprecated). |
environment |
ResName |
Resource name of the environment (see api.res.environmentRep). |
economyId |
ResName |
Resource name of the selected economy (.eco); the base game sets it from the economy entry of the game settings. |
nameId |
ResName |
Resource name of the selected name list; the base game sets it from the nameList entry of the game settings. |
climate |
ResName |
Resource name of the selected climate (.clima), e.g. ::/climates/temperate/temperate.clima; the base game sets it from the climate entry of the game settings. |
trackCatenaryYearFrom |
integer |
Year from which rail electrification (catenary) becomes available (base game 1921). |
busLaneYearFrom |
integer |
Year from which bus lanes become available (base game 1925). |
terrainToolMinStrength |
number |
Minimum strength of the terrain tool (base game 5). |
terrainToolMaxStrength |
number |
Maximum strength of the terrain tool (base game 100). |
enforceMainConnections |
boolean |
|
townDevelopInterval |
number |
Interval between town development updates (base game 60). |
chargeMaintenanceInterval |
number |
Interval at which maintenance is charged (base game 60). |
simulateCargoWeight |
boolean |
Whether the weight of transported cargo is simulated (base game true). |
simPersonDestinationRecomputationProbability |
number |
Probability that a simulated person recomputes its destination (base game 1.0). |
townMajorStreetAngleRange |
number |
Angle range in degrees within which the directions of a town's major streets are randomized (base game 0). |
townConnectionMaxBridgeLength |
number |
Towns are connected by bridges only if the distance is below this value (base game 250). |
maxVehicleCloneAmount |
number |
|
trainAccelerationFactor |
number |
Multiplier for train acceleration (base game 1.0). |
trainBrakeDeceleration |
number |
|
terrainToolMinSize |
number |
Minimum brush size of the terrain tool. |
terrainToolMaxSize |
number |
Maximum brush size of the terrain tool in the game; one size unit covers 4 m² (base game 32). |
terrainToolScale |
number |
Factor applied to the terrain tool brush sizes when they are listed in the construction menu. |
terrainToolMaxSizeEditor |
number |
Maximum brush size of the terrain tool in the map editor; one size unit covers 4 m² (base game 256). |
terrainPainterMinSize |
number |
Minimum brush size of the terrain painter; the game GUI also uses it as the terrain tool minimum. |
terrainPainterMaxSize |
number |
Maximum brush size of the terrain painter in the game; one size unit covers 1 m² (base game 256). |
terrainPainterMaxSizeEditor |
number |
Maximum brush size of the terrain painter in the map editor; one size unit covers 1 m² (base game 256). |
terrainPainterScale |
number |
Factor applied to the terrain painter brush sizes. |
assetBrushMinSize |
number |
Minimum brush size of the asset tools (placing and erasing assets and vegetation). |
assetBrushMaxSize |
number |
Maximum brush size of the asset tools; one size unit covers 1 m² (base game 256). |
assetBrushScale |
number |
Factor applied to the asset brush sizes when they are listed in the construction menu. |
treeCostYearMultipliers |
{integer : number} |
Tree cost multipliers by year, as a map from year to factor; the GUI evaluates it with api.engine.util.construction.getCostMultiplierForYear. |
townInitialMajorStreetAngleRange |
number |
Like townMajorStreetAngleRange (degrees), but only applied when a town is first created (base game 0). |
townCapacityScalingFactor |
number |
Capacity scaling factor passed to the town builder (townBuilder.capacityScalingFactor) when a town is placed. |
sandboxMode |
boolean |
Whether sandbox mode is active; the urbangames_sandbox mod sets it to true. |
noCosts |
boolean |
Whether building and buying is free; the urbangames_no_costs mod sets it to true. |
constructionScript |
ScriptRef |
Script used to build constructions from their modules. |
BaseConfig.AdvancedOptions¶
record api/tealdef/api/type.d.tl:3470
record AdvancedOptions
Advanced gameplay option
Used in the base game: 3 times in 2 files
base/content/game_mechanics/game_mechanics/towns/town_util_parallel.script.tl:33
base/content/game_mechanics/game_mechanics/towns/town_util.tl:449
Fields
BaseConfig.Animal¶
record api/tealdef/api/type.d.tl:3492
record Animal
Configuration for animal spawning
Fields
Functions
BaseConfig.Locations¶
record api/tealdef/api/type.d.tl:3508
record Locations
Configuration for the placement of industry and towns on max generation
Used in the base game: 4 times in 2 files
base/content/gui/gui/map_editor/map_editor.tl:498
base/content/gui/gui/menu/new_game_or_map_settings_page.tl:385
Fields
| Name | Type | Description |
|---|---|---|
town |
TownParamList |
Configuration for town spawning at map generation |
industry |
IndustryParamList |
Configuration for industry spawning at map generation |
makeInitialStreets |
boolean |
Add small streets at the edge of industries |
Functions
new() : Locations api/tealdef/api/type.d.tl:3510
Creates a new object of type Locations
Returns Locations
BaseConfig.Locations.IndustryParamList¶
record api/tealdef/api/type.d.tl:3513
record IndustryParamList
Configuration parameters for industries
Fields
Functions
new() : IndustryParamList api/tealdef/api/type.d.tl:3515
Creates a new object of type IndustryParamList
Returns IndustryParamList
BaseConfig.Locations.TownParamList¶
record api/tealdef/api/type.d.tl:3529
record TownParamList
Configuration parameters for towns
Fields
Functions
new() : TownParamList api/tealdef/api/type.d.tl:3531
Creates a new object of type TownParamList
Returns TownParamList
BaseConfig.Terrain¶
record api/tealdef/api/type.d.tl:3554
record Terrain
Configuration for the terrain mesh (Deprecated)
Fields
| Name | Type | Description |
|---|---|---|
lodErrorMultiplier |
number |
(Deprecated) Only used with legacy terrain, determines the quality of the terrain mesh |
BaseConfig.Economy¶
record api/tealdef/api/type.d.tl:3560
record Economy
Configures cargo relations and industry developement for a single game
Fields
| Name | Type | Description |
|---|---|---|
cargoIncomeScript |
ScriptRef |
A script reference controlling the income of a given cargo given specific parameters |
passengerIncomeScript |
ScriptRef |
A script reference controlling the income of a given passengers given specific parameters |
townDevelopment |
TownDevelopment |
Controls the automatic development of towns |
industryDevelopment |
IndustryDevelopment |
Controls the automatic developement of industries |
Functions
BaseConfig.Economy.TownDevelopment¶
record api/tealdef/api/type.d.tl:3565
record TownDevelopment
Parameters for the town developement
Fields
BaseConfig.Economy.IndustryDevelopment¶
record api/tealdef/api/type.d.tl:3572
record IndustryDevelopment
Parameters for the industry developement
Fields
BaseConfig.Settings¶
record api/tealdef/api/type.d.tl:3600
record Settings
Graphic settings for main quality modes, camera tool and cockpit
Fields
| Name | Type | Description |
|---|---|---|
geometryQualityOptions |
{GeometryQualityOption} |
Quality settings for: |
Functions
new() : Settings api/tealdef/api/type.d.tl:3602
Creates a new graphic settings parameters
Returns Settings
BaseConfig.Settings.GeometryQualityOption¶
record api/tealdef/api/type.d.tl:3605
record GeometryQualityOption
Contains information about graphi quality of a single game
Fields
| Name | Type | Description |
|---|---|---|
viewNearFar |
Vec2f |
Distance im meters of near and far plane |
fogStartEndFarPerc |
Vec2f |
Unused |
lodDistanceScaling |
number |
A factor multiplying all lod distances |
Functions
new() : GeometryQualityOption api/tealdef/api/type.d.tl:3607
Creates a new GeometryQualityOption
Returns GeometryQualityOption
BaseConfig.Water¶
record api/tealdef/api/type.d.tl:3621
record Water
Configures water look and feel
Fields
| Name | Type | Description |
|---|---|---|
textures |
Textures |
Configures water textures |
BaseConfig.Water.Textures¶
record api/tealdef/api/type.d.tl:3623
record Textures
Configures water textures
Fields
| Name | Type | Description |
|---|---|---|
foamNormal |
string |
Normal texture for water foam |
foamDetail |
string |
Extra detail texture for water foam |
foam |
string |
Albedo texture for water foam |
BaseConfig.Particles¶
record api/tealdef/api/type.d.tl:3637
record Particles
Notes
Particle rendering configuration; holds the textures shared by particle effects.
Fields
| Name | Type | Description |
|---|---|---|
textures |
Textures |
Shared particle textures. |
BaseConfig.Particles.Textures¶
record api/tealdef/api/type.d.tl:3638
record Textures
Notes
Shared textures used by particle effects.
Fields
BaseConfig.Emissions¶
record api/tealdef/api/type.d.tl:3648
record Emissions
Notes
Noise and pollution settings for the emission layers and for how noise affects towns.
Details
The base game copies the bounds from /game_mechanics/emission/emission_config.tl
(noise 63-85 dB, pollution 57-80) in its preRunFn. Scripts read it with
api.res.getBaseConfig().emission.
Fields