BeliefType (Civ5 Type)

From Civilization Modding Wiki
Revision as of 14:36, 19 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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


ID.png The BeliefType 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 BeliefType corresponds to the ID column of the Beliefs XML table.
  • Lua.png The standard (unmodded) values in the ID and Type columns are also stored in the BeliefTypes Lua enumeration.


Lua: the BeliefTypes enumeration

Firaxis provides a Lua enumeration named BeliefTypes. This is just a regular global table. Its keys are the constants' names and the pairs the corresponding values.

  • This specific enumeration contains data from the Beliefs data table.
  • They are stored as key/value pairs: the keys are the strings from the Type column and the values are the integers from the ID column.

Radioactive.png Be careful: this enumeration do not reflect the changes, additions and deletions made by mods. As a result it is advised to rely on GameInfo instead.


Below are the values found in this enumeration.

Key Value
"NO_BELIEF" -1


XML: the Beliefs table

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

ID Type
0 BELIEF_GODDESS_HUNT
1 BELIEF_FERTILITY_RITES
2 BELIEF_GOD_CRAFTSMEN
3 BELIEF_GOD_SEA
4 BELIEF_OPEN_SKY
5 BELIEF_MESSENGER_GODS
6 BELIEF_ONE_WITH_NATURE
7 BELIEF_FEED_WORLD
8 BELIEF_FORMAL_LITURGY
9 BELIEF_STONE_CIRCLES
10 BELIEF_GOD_WAR
11 BELIEF_SWORD_PLOWSHARES
12 BELIEF_GURUSHIP
13 BELIEF_HOLY_WARRIORS
14 BELIEF_SACRED_WATERS
15 BELIEF_GODDESS_LOVE
16 BELIEF_RELIGIOUS_SETTLEMENTS
17 BELIEF_GOD_FESTIVALS
18 BELIEF_ORAL_TRADITION
19 BELIEF_ANCESTOR_WORSHIP
20 BELIEF_DESERT_FOLKLORE
21 BELIEF_SACRED_PATH
22 BELIEF_GODDESS_STRATEGY
23 BELIEF_FAITH_HEALERS
24 BELIEF_MONUMENT_GODS
25 BELIEF_RELIGIOUS_TEXTS
26 BELIEF_RELIQUARY
27 BELIEF_PEACE_LOVING
28 BELIEF_INTERFAITH_DIALOGUE
29 BELIEF_CEREMONIAL_BURIAL
30 BELIEF_CHURCH_PROPERTY
31 BELIEF_TITHE
32 BELIEF_INITIATION_RITES
33 BELIEF_JUST_WAR
34 BELIEF_DEFENDER_FAITH
35 BELIEF_ITINERANT_PREACHERS
36 BELIEF_MESSIAH
37 BELIEF_MISSIONARY_ZEAL
38 BELIEF_HOLY_ORDER
39 BELIEF_RELIGIOUS_UNITY
40 BELIEF_CATHEDRALS
41 BELIEF_MOSQUES
42 BELIEF_PAGODAS
43 BELIEF_MONASTERIES
44 BELIEF_PEACE_GARDENS
45 BELIEF_CHORAL_MUSIC
46 BELIEF_RELIGIOUS_ART
47 BELIEF_LITURGICAL_DRAMA
48 BELIEF_ASCETISM
49 BELIEF_RELIGIOUS_CENTER
50 BELIEF_PAPAL_PRIMACY
51 BELIEF_DANCE_AURORA
52 BELIEF_RELIGIOUS_COMMUNITY
53 BELIEF_DIVINE_INSPIRATION
54 BELIEF_PILGRIMAGE
55 BELIEF_WORLD_CHURCH


Examples

Here is how to use the LUA enumeration to retrieve the ID from the type. Those examples will return and assign the integer value -1.

local id = BeliefTypes.NO_BELIEF
local id = BeliefTypes["NO_BELIEF"]

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.Beliefs.BELIEF_GODDESS_HUNT.ID
local id = GameInfo["Beliefs"].["BELIEF_GODDESS_HUNT"].ID
local id = GameInfo.Beliefs{Type="BELIEF_GODDESS_HUNT"}().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_BELIEF_GODDESS_HUNT.

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


Used by

Game.EnhanceReligion(PlayerID vaticanPlayer, ReligionType religion, BeliefType belief4, BeliefType belief5)
Game.FoundPantheon(int vaticanPlayer, BeliefType belief1)
Game.FoundReligion(PlayerID vaticanPlayer, ReligionType religion, unknown arg2, BeliefType belief2, BeliefType belief3, BeliefType belief3, int arg6, City vaticanCity)
iterator(int, BeliefType) Game.GetAvailableBonusBeliefs()
iterator(int, BeliefType) Game.GetAvailableEnhancerBeliefs()
iterator(int, BeliefType) Game.GetAvailableFollowerBeliefs()
iterator(int, BeliefType) Game.GetAvailableFounderBeliefs()
iterator(int, BeliefType) Game.GetAvailablePantheonBeliefs()
iterator(int, BeliefType) Game.GetBeliefsInReligion()
Network.SendFoundPantheon(PlayerID arg0, BeliefType Belief)
Network.SendFoundReligion(PlayerID arg0, ReligionType CurrentReligion, unknown customName, unknown arg3, unknown arg4, BeliefType arg5, BeliefType arg6, int cityX, int cityY)
BeliefType Player:GetBeliefInPantheon()



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.