ImprovementType (Civ5 Type)
This page is a part of the Lua and UI Reference (Civ5).
The ImprovementType 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 Improvements table
Here are the ID and Type columns found in this table.
ID
Type
0
IMPROVEMENT_CITY_RUINS
0
IMPROVEMENT_HOLY_SITE
1
IMPROVEMENT_BARBARIAN_CAMP
1
IMPROVEMENT_POLDER
2
IMPROVEMENT_GOODY_HUT
3
IMPROVEMENT_FARM
4
IMPROVEMENT_MINE
5
IMPROVEMENT_QUARRY
6
IMPROVEMENT_TRADING_POST
7
IMPROVEMENT_LUMBERMILL
8
IMPROVEMENT_PASTURE
9
IMPROVEMENT_FISHING_BOATS
10
IMPROVEMENT_PLANTATION
11
IMPROVEMENT_CAMP
12
IMPROVEMENT_WELL
13
IMPROVEMENT_OFFSHORE_PLATFORM
14
IMPROVEMENT_FORT
15
IMPROVEMENT_LANDMARK
16
IMPROVEMENT_ACADEMY
17
IMPROVEMENT_CUSTOMS_HOUSE
18
IMPROVEMENT_MANUFACTORY
19
IMPROVEMENT_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.Improvements.IMPROVEMENT_HOLY_SITE.ID
local id = GameInfo["Improvements"].["IMPROVEMENT_HOLY_SITE"].ID
local id = GameInfo.Improvements{Type="IMPROVEMENT_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_IMPROVEMENT_HOLY_SITE.
local description = GameInfo.Improvements[0].Description
local description = GameInfo["Improvements"][0]["Description"]
local description = GameInfo.Improvements{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.