BuildActionType (Civ5 Type)
This page is a part of the Lua and UI Reference (Civ5).
The BuildActionType pseudo-type is actually a regular integer. Pseudo-types do not exist in Lua, they only serve a documentation purpose on the wiki!
|
XML: the Builds table
Here are the ID and Type columns found in this table.
ID
Type
0
BUILD_ROAD
0
BUILD_HOLY_SITE
1
BUILD_RAILROAD
1
BUILD_POLDER
2
BUILD_FARM
3
BUILD_MINE
4
BUILD_TRADING_POST
5
BUILD_LUMBERMILL
6
BUILD_PASTURE
7
BUILD_CAMP
8
BUILD_PLANTATION
9
BUILD_QUARRY
10
BUILD_WELL
11
BUILD_OFFSHORE_PLATFORM
12
BUILD_FISHING_BOATS
13
BUILD_FORT
14
BUILD_REMOVE_JUNGLE
15
BUILD_REMOVE_FOREST
16
BUILD_REMOVE_MARSH
17
BUILD_SCRUB_FALLOUT
18
BUILD_REPAIR
19
BUILD_REMOVE_ROUTE
20
BUILD_LANDMARK
21
BUILD_ACADEMY
22
BUILD_CUSTOMS_HOUSE
23
BUILD_MANUFACTORY
24
BUILD_CITADEL
Examples
Here are different ways to query the database to retrieve the ID from the type. Those examples will return and assign the integer value 0. See also GameInfo.
local id = GameInfo.Builds.BUILD_HOLY_SITE.ID
local id = GameInfo["Builds"].["BUILD_HOLY_SITE"].ID
local id = GameInfo.Builds{Type="BUILD_HOLY_SITE"}().ID
Alternatively you could use the ID or the type to retrieve the value of the Description column. Those examples will return and assign the value TXT_KEY_BUILD_HOLY_SITE.
local description = GameInfo.Builds[0].Description
local description = GameInfo["Builds"][0]["Description"]
local description = GameInfo.Builds{ID=0}().Description
Used by
The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.