SpecialistType (Civ5 Type)

From Civilization Modding Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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


ID.png The SpecialistType 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 SpecialistType corresponds to the ID column of the Specialists XML table.


XML: the Specialists table

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

ID Type
0 SPECIALIST_CITIZEN
1 SPECIALIST_ARTIST
2 SPECIALIST_SCIENTIST
3 SPECIALIST_MERCHANT
4 SPECIALIST_ENGINEER


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.Specialists.SPECIALIST_CITIZEN.ID
local id = GameInfo["Specialists"].["SPECIALIST_CITIZEN"].ID
local id = GameInfo.Specialists{Type="SPECIALIST_CITIZEN"}().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_SPECIALIST_CITIZEN.

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


Used by

CheckBox:RegisterCallback(MouseType arg0, (void func(SpecialistType Inc)) ModUnitFort)
int City:ChangeSpecialistGreatPersonProgressTimes100(SpecialistType index, int change)
int City:GetCultureFromSpecialist(SpecialistType specialist)
int City:GetExtraSpecialistYieldOfType(YieldType index, SpecialistType specialist)
int City:GetFirstSpecialistOrder(SpecialistType specialist)
SpecialistType City:GetProductionSpecialist()
int City:GetSpecialistCount(SpecialistType index)
int City:GetSpecialistGreatPersonProgress(SpecialistType index)
int City:GetSpecialistGreatPersonProgressTimes100(SpecialistType index)
int City:GetSpecialistProductionModifier(SpecialistType specialist)
int City:GetSpecialistProductionTurnsLeft(SpecialistType specialist, int num)
int City:GetSpecialistYield(SpecialistType specialist, YieldType yield)
Deal:RemoveCityTrade(SpecialistType player, int cityID)
Events.UnitDataEdited(int floatVarList, int memberCount, int memberIndex, bool isDebugFSM, SpecialistType specRender, bool isFromLua = nil)
Game.DoFromUIDiploEvent(DiploUIEventType event, PlayerID aIPlayer, SpecialistType button, int againstPlayer, int arg3)
unknown, unknown Matchmaking.JoinMultiplayerGame(SpecialistType server)
bool Modding.CanLoadCloudSave(SpecialistType selected)
unknown, unknown Modding.GetCloudSaveRequirements(SpecialistType selected)
Network.SendDiploVote(SpecialistType votePlayer)
bool Player:CanPrepare(SpecialistType specialist, bool continue)
SpecialistType Player:GetDealMyValue(Deal Deal)
SpecialistType, int Player:GetRecentIntrigueInfo(PlayerID aIPlayer)
int Player:GetSpecialistExtraYield(SpecialistType index1, YieldType index2)
int Player:SpecialistYield(SpecialistType specialist, YieldType yield)
RadioButton:RegisterCallback(MouseType arg0, (void func(SpecialistType void1, int Control)) ModeClicked)
Steam.CopyLastAutoSaveToSteamCloud(SpecialistType i)
table(SpecialistType => FileHeader) Steam.GetCloudSaves()
SpecialistType Steam.GetMaxCloudSaves()
bool Steam.SaveGameToCloud(SpecialistType slot)
TextButton:RegisterCallback(MouseType arg0, (void func(SpecialistType ePlayer)) OnCancelEditPlayerDetails)
table(SpecialistType => unknown) UI.GetReplayFiles()
UI.LoadCurrentDeal(PlayerID player, SpecialistType i)
UI.LoadHistoricDeal(PlayerID player, SpecialistType i)
UI.SaveFileList(table(SpecialistType => bool) FileList, GameType GameType, bool ShowAutoSaves, bool arg3)
bool Unit:CanJoin(Plot plot, SpecialistType specialist)



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.