BuildingClassType (Civ5 Type)

From Civilization Modding Wiki
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


ID.png The BuildingClassType pseudo-type is actually a regular integer. Pseudo-types do not exist in Lua, they only serve a documentation purpose on the wiki!
  • DB.png Integers labeled as BuildingClassType corresponds to the ID column of the BuildingClasses XML table.


XML: the BuildingClasses table

Here are the ID and Type columns found in this table.

ID Type
0 BUILDINGCLASS_COURTHOUSE
0 BUILDINGCLASS_CATHEDRAL
1 BUILDINGCLASS_SEAPORT
1 BUILDINGCLASS_MOSQUE
2 BUILDINGCLASS_STABLE
2 BUILDINGCLASS_PAGODA
3 BUILDINGCLASS_WATERMILL
3 BUILDINGCLASS_RECYCLING_CENTER
4 BUILDINGCLASS_CIRCUS
4 BUILDINGCLASS_BOMB_SHELTER
5 BUILDINGCLASS_FORGE
5 BUILDINGCLASS_CONSTABLE
6 BUILDINGCLASS_WINDMILL
6 BUILDINGCLASS_POLICE_STATION
7 BUILDINGCLASS_HYDRO_PLANT
7 BUILDINGCLASS_INTELLIGENCE_AGENCY
8 BUILDINGCLASS_SOLAR_PLANT
8 BUILDINGCLASS_ALHAMBRA
9 BUILDINGCLASS_MINT
9 BUILDINGCLASS_CN_TOWER
10 BUILDINGCLASS_OBSERVATORY
10 BUILDINGCLASS_HUBBLE
11 BUILDINGCLASS_MONASTERY
11 BUILDINGCLASS_LEANING_TOWER
12 BUILDINGCLASS_GARDEN
12 BUILDINGCLASS_MOSQUE_OF_DJENNE
13 BUILDINGCLASS_LIGHTHOUSE
13 BUILDINGCLASS_NEUSCHWANSTEIN
14 BUILDINGCLASS_HARBOR
14 BUILDINGCLASS_PETRA
15 BUILDINGCLASS_COLOSSEUM
15 BUILDINGCLASS_TERRACOTTA_ARMY
16 BUILDINGCLASS_THEATRE
16 BUILDINGCLASS_GREAT_FIREWALL
17 BUILDINGCLASS_STADIUM
18 BUILDINGCLASS_MONUMENT
19 BUILDINGCLASS_TEMPLE
19 BUILDINGCLASS_AMPHITHEATER
20 BUILDINGCLASS_OPERA_HOUSE
21 BUILDINGCLASS_MUSEUM
22 BUILDINGCLASS_BROADCAST_TOWER
23 BUILDINGCLASS_BARRACKS
23 BUILDINGCLASS_SHRINE
24 BUILDINGCLASS_ARMORY
25 BUILDINGCLASS_MILITARY_ACADEMY
26 BUILDINGCLASS_ARSENAL
27 BUILDINGCLASS_WALLS
28 BUILDINGCLASS_CASTLE
29 BUILDINGCLASS_MILITARY_BASE
30 BUILDINGCLASS_GRANARY
31 BUILDINGCLASS_HOSPITAL
32 BUILDINGCLASS_MEDICAL_LAB
33 BUILDINGCLASS_WORKSHOP
34 BUILDINGCLASS_FACTORY
35 BUILDINGCLASS_NUCLEAR_PLANT
36 BUILDINGCLASS_SPACESHIP_FACTORY
37 BUILDINGCLASS_MARKET
38 BUILDINGCLASS_BANK
39 BUILDINGCLASS_STOCK_EXCHANGE
40 BUILDINGCLASS_LIBRARY
41 BUILDINGCLASS_UNIVERSITY
42 BUILDINGCLASS_PUBLIC_SCHOOL
43 BUILDINGCLASS_LABORATORY
44 BUILDINGCLASS_PALACE
45 BUILDINGCLASS_HEROIC_EPIC
46 BUILDINGCLASS_NATIONAL_EPIC
47 BUILDINGCLASS_CIRCUS_MAXIMUS
48 BUILDINGCLASS_NATIONAL_TREASURY
49 BUILDINGCLASS_NATIONAL_COLLEGE
50 BUILDINGCLASS_IRONWORKS
51 BUILDINGCLASS_OXFORD_UNIVERSITY
52 BUILDINGCLASS_HERMITAGE
53 BUILDINGCLASS_PYRAMID
54 BUILDINGCLASS_GREAT_LIBRARY
55 BUILDINGCLASS_STONEHENGE
56 BUILDINGCLASS_HANGING_GARDEN
57 BUILDINGCLASS_COLOSSUS
58 BUILDINGCLASS_GREAT_LIGHTHOUSE
59 BUILDINGCLASS_ORACLE
60 BUILDINGCLASS_GREAT_WALL
61 BUILDINGCLASS_HAGIA_SOPHIA
62 BUILDINGCLASS_ANGKOR_WAT
63 BUILDINGCLASS_NOTRE_DAME
64 BUILDINGCLASS_MACHU_PICHU
65 BUILDINGCLASS_CHICHEN_ITZA
66 BUILDINGCLASS_KREMLIN
67 BUILDINGCLASS_FORBIDDEN_PALACE
68 BUILDINGCLASS_SISTINE_CHAPEL
69 BUILDINGCLASS_HIMEJI_CASTLE
70 BUILDINGCLASS_PORCELAIN_TOWER
71 BUILDINGCLASS_TAJ_MAHAL
72 BUILDINGCLASS_BIG_BEN
73 BUILDINGCLASS_BRANDENBURG_GATE
74 BUILDINGCLASS_LOUVRE
75 BUILDINGCLASS_EIFFEL_TOWER
76 BUILDINGCLASS_STATUE_OF_LIBERTY
77 BUILDINGCLASS_CRISTO_REDENTOR
78 BUILDINGCLASS_PENTAGON
79 BUILDINGCLASS_UNITED_NATIONS
80 BUILDINGCLASS_SYDNEY_OPERA_HOUSE
81 BUILDINGCLASS_AQUEDUCT
82 BUILDINGCLASS_STONE_WORKS


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.BuildingClasses.BUILDINGCLASS_CATHEDRAL.ID
local id = GameInfo["BuildingClasses"].["BUILDINGCLASS_CATHEDRAL"].ID
local id = GameInfo.BuildingClasses{Type="BUILDINGCLASS_CATHEDRAL"}().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_BUILDING_CATHEDRAL.

local description = GameInfo.BuildingClasses[0].Description
local description = GameInfo["BuildingClasses"][0]["Description"]
local description = GameInfo.BuildingClasses{ID=0}().Description


Used by

int City:GetBuildingYieldChange(BuildingClassType buildingClass, YieldType yield)
int City:GetReligionBuildingClassHappiness(BuildingClassType buildingClass)
int City:GetReligionBuildingClassYieldChange(BuildingClassType buildingClass, YieldType arg1)
City:SetBuildingYieldChange(BuildingClassType buildingClass, YieldType yield, int change)
int Game.GetBuildingClassCreatedCount(BuildingClassType index)
bool Game.IsBuildingClassMaxedOut(BuildingClassType index, int extra)
int Player:GetBuildingClassCount(BuildingClassType buildingClass)
int Player:GetBuildingClassCountPlusMaking(BuildingClassType buildingClass)
int Player:GetBuildingClassMaking(BuildingClassType buildingClass)
int Player:GetPlayerBuildingClassHappiness(BuildingClassType buildingClass)
int Player:GetPlayerBuildingClassYieldChange(BuildingClassType buildingClass, YieldType arg1)
int Player:GetPolicyBuildingClassYieldChange(BuildingClassType buildingClass, YieldType arg1)
int Player:GetPolicyBuildingClassYieldModifier(BuildingClassType buildingClass, YieldType arg1)
bool Player:IsBuildingClassMaxedOut(BuildingClassType buildingClass, int extra)
bool Player:IsProductionMaxedBuildingClass(BuildingClassType buildingClass, bool acquireCity)
Player:RemoveBuildingClass(BuildingClassType buildingClass)
int Team:GetBuildingClassCount(BuildingClassType index)
int Team:GetBuildingClassCountPlusMaking(BuildingClassType unitClass)
int Team:GetBuildingClassMaking(BuildingClassType buildingClass)
bool Team:IsBuildingClassMaxedOut(BuildingClassType index, int extra)



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.