Lua and UI Reference (Civ5): Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
mNo edit summary
mNo edit summary
Line 19: Line 19:
|valign="top" width="200"|
|valign="top" width="200"|
* [[Map and terrain (Civ5)|Map and terrain]]
* [[Map and terrain (Civ5)|Map and terrain]]
* [[Persistent data storage (Civ5)|Persistent data storage]]
* [[Persisting data (Civ5)|Persisting data]]
|valign="top"|
|valign="top"|
* [http://forums.civfanatics.com/showthread.php?p=11575962 Adding en entry to the DiploCorner menu]
* [http://forums.civfanatics.com/showthread.php?p=11575962 Adding en entry to the DiploCorner menu]

Revision as of 13:04, 22 September 2012

The old version of this page is available here: Lua and UI Reference (old version).

Lua


Articles and tutorials

See also Modding Tutorials.


API

Global Functions

Objects

Static objects
Instances
Data
Events


UI Controls

See also Common UI Properties.

Miscalleneous
Buttons
Containers
Animations


Lua Objects

Those objects are defined in Lua files and can be used through an include statement.


Structures

Those objects are regular Lua tables that only contain named fields but no methods.


Objects identifiers

Those identifiers are regular integers that identify objects.


Constants identifiers

Those identifiers are regular integers associated with the constants defined in Lua enumerations.

Type
Lua Enum
Type
Lua Enum
ActionSubTypes GameTypes
ActivityTypes GenericWorldAnchorTypes
AdvisorTypes InfoCornerID
ButtonPopupTypes InterfaceDirtyBits
ButtonStates KeyEvents
ChatTargetTypes Keys
CityAIFocusTypes LeaderheadAnimationTypes
CityUpdateTypes MajorCivApproachTypes
CombatPredictionTypes MinorCivPersonalityTypes
CommandTypes MinorCivQuestTypes
ContentType MouseEvents
ControlTypes Mouse
CoopWarStates NetErrors
FromUIDiploEventTypes NetKicked
DiploUIStateTypes OrderTypes
DirectionTypes PlotTypes
DisputeLevelTypes PopupPriority
EndGameTypes ResourceUsageTypes
EndTurnBlockingTypes SlotClaim
FaithPurchaseTypes SlotStatus
FlowDirectionTypes SystemUpdateUIType
FogOfWarModeTypes TaskTypes
GameMessageTypes ThreatTypes
GameOptionTypes TradeableItems
GameplayGameStateTypes YieldDisplayTypes
GameStateTypes


Data identifiers

Those identifiers are regular integers that identify the data rows defined in the XML data files.

Type
Xml Table
Lua Enum
Commands
ArtStyleTypes
Automates
Beliefs BeliefTypes
Builds
BuildingClasses
Buildings
Calendars
Civilizations
Climates
Colors
Diplomacy_Responses
Domains DomainTypes
Eras
Features FeatureTypes
Flavors
GameSpeeds
GoodyHuts
HandicapInfos
HurryInfos
Improvements
InterfaceModes InterfaceModeTypes
InvisibleInfos
Civilization_Leaders
MinorCivTraits MinorCivTraitTypes
Missions MissionTypes
MultiplayerOptions
Notifications NotificationTypes
PlayerOptions
PolicyBranchTypes PolicyBranchTypes
Policies
Processes
Projects
UnitPromotions
Religions ReligionTypes
ReplayDataSets
Resources
Routes
Specialists
SpecialUnits
Technologies
Terrains TerrainTypes
UnitAIInfos
UnitClasses
UnitCombatInfos
Units
Victories
VoteSources
Votes
Yields YieldTypes


Categories

Civ5 API

Civ5 Types
Civ5 Methods and Functions
Civ5 Thematic Categories: Terrain
Civ5 Features & Natural wonders API
Civ5 Fog API
Civ5 Goodies API
Civ5 Improvements API
Civ5 Resources API
Civ5 Rivers API
Civ5 Terrain API
Civ5 Terrain Ownership API
Civ5 Yields API
Civ5 Thematic Categories: Development
Civ5 Buildings API
Civ5 Cities API
Civ5 City Production API
Civ5 Culture API
Civ5 Food & Population API
Civ5 Gold API
Civ5 Golden Age API
Civ5 Great People API
Civ5 Happiness API
Civ5 Policies API
Civ5 Religion API
Civ5 Science API
Civ5 Specialists API
Civ5 Thematic Categories: Units
Civ5 Barbarians API
Civ5 Combat API
Civ5 Movement API
Civ5 Unit Experience API
Civ5 Units API
Civ5 Thematic Categories: Diplomacy
Civ5 City States API
Civ5 Diplomacy API
Civ5 Espionnage API
Civ5 Players API
Civ5 Trade API
Civ5 United Nations API
Civ5 Thematic Categories: General
Civ5 Game Settings API
Civ5 Notification API
Civ5 Score API
Civ5 Turns API
Civ5 Victory API


Contributing


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.