GameDefines (Civ5 Type)

From Civilization Modding Wiki
Revision as of 15:18, 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).


Purpose

This object exposes all the constants defined in the GlobalDefines.xml and GlobalAIDefines.xml files. Example:

local startYear = GameDefines["START_YEAR"]
local startYear = GameDefines.START_YEAR

This tables does reflect the changes made by mods.


Built-in fields

Besides of the constants defined in the datatables, there are also a few built-in constants.

Players counts

MAX_PLAYERS

The maximum number of players in a game. 64 by default. See PlayerID for more informations.

MAX_CIV_PLAYERS

The maximum number of non-barbarian players in a game. 63 by default. See PlayerID for more informations.

MAX_MAJOR_CIVS

The maximum number of major civilizations in a game. 22 by default. See PlayerID for more informations.

MAX_MINOR_CIVS

The maximum number of city states in a game. 41 by default. See PlayerID for more informations.


Teams counts

MAX_PLAYERS

The maximum number of teams in a game. 64 by default. See TeamID for more informations.

MAX_CIV_PLAYERS

The maximum number of non-barbarian teams in a game. 63 by default. See TeamID for more informations.


Tutorial index

Tutorial

When zero, no tutorial is active. Otherwise, it is an index code for the active tutorial.
  • 1 movement and exploration
  • 2 founding cities
  • 3 improving cities
  • 4 combat and conquest
  • 5 diplomacy



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.