town_growth_metadata¶
Source: base/tealdef/game_mechanics/towns/town_growth_metadata.d.tl
Notes
Construction metadata (town_growth) for town bonuses of landmarks, and the town level-up notification records.
TownGrowthMetadata¶
record global base/tealdef/game_mechanics/towns/town_growth_metadata.d.tl:3
global record TownGrowthMetadata
Load: local town_growth_metadata = ug_require "::/game_mechanics/towns/town_growth_metadata.tl"
Notes
Accessors for the town_growth construction metadata, which gives the closest town a bonus while the construction stands.
Example
Fields
| Name | Type | Description |
|---|---|---|
constructionDesc |
MetadataAccessor<ConstructionDescMetadata, TownGrowthMetadata.ConstructionDesc> |
Accessor for TownGrowthMetadata.ConstructionDesc in construction definition metadata. used 2× in the base game |
constructionInstance |
MetadataAccessor<ConstructionInstanceMetadata, TownGrowthMetadata.ConstructionInstance> |
Accessor for TownGrowthMetadata.ConstructionInstance in a construction's persistent metadata. used 3× in the base game |
Functions
getKey() : string base/tealdef/game_mechanics/towns/town_growth_metadata.d.tl:17
Call as town_growth_metadata.getKey
Notes
Metadata key of town bonuses.
Returns string: "town_growth"
Used in the base game: 2 times in 2 files
base/content/landmarks/landmark_util.tl:97
base/content/game_mechanics/game_mechanics/towns/towns.script.tl:197
TownGrowthMetadata.ConstructionDesc¶
record base/tealdef/game_mechanics/towns/town_growth_metadata.d.tl:4
record ConstructionDesc
Notes
Town bonuses in a construction definition's metadata. The construction menu shows them.
Used in the base game: 1 time in 1 file
base/content/game_mechanics/game_mechanics/towns/town_growth_metadata.tl:8
Fields
TownGrowthMetadata.ConstructionInstance¶
record base/tealdef/game_mechanics/towns/town_growth_metadata.d.tl:9
record ConstructionInstance
Notes
Town bonuses in the persistent metadata of a built construction. landmark_util.collectTownGrowthMetadata sums them per closest town.
Used in the base game: 1 time in 1 file
base/content/game_mechanics/game_mechanics/towns/town_growth_metadata.tl:9
Fields
TownLevelNotificationInput¶
record global base/tealdef/game_mechanics/towns/town_growth_metadata.d.tl:20
global record TownLevelNotificationInput
Notes
Params of the town level-up notification (town_notification.script).
Fields
| Name | Type | Description |
|---|---|---|
townEntity |
EntityUtil.EntityAndRevision |
Town that reached the new level. |
level |
integer |
New town level; TownUtil.level2name gives its name. |
TownLevelNotificationSimInput¶
record global base/tealdef/game_mechanics/towns/town_growth_metadata.d.tl:25
global record TownLevelNotificationSimInput
Notes
Data the notification's sim update script fills in.
Fields
| Name | Type | Description |
|---|---|---|
townName |
string |
Current name of the town. |