DiploUIStateType (Civ5 Type)

From Civilization Modding Wiki
Revision as of 14:41, 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 DiploUIStateType pseudo-type is actually a regular integer. Pseudo-types do not exist in Lua, they only serve a documentation purpose on the wiki!
  • Lua.png Integers labeled as DiploUIStateType corresponds to the constants defined in the DiploUIStateTypes Lua enumeration.


Lua: the DiploUIStateTypes enumeration

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


Below are the values found in this enumeration.

Key Value
"NO_DIPLO_UI_STATE" -1
"DIPLO_UI_STATE_DEFAULT_ROOT" 0
"DIPLO_UI_STATE_WAR_DECLARED_BY_HUMAN" 1
"DIPLO_UI_STATE_PEACE_MADE_BY_HUMAN" 2
"DIPLO_UI_STATE_TRADE" 3
"DIPLO_UI_STATE_TRADE_AI_MAKES_OFFER" 4
"DIPLO_UI_STATE_TRADE_AI_ACCEPTS_OFFER" 5
"DIPLO_UI_STATE_TRADE_AI_REJECTS_OFFER" 6
"DIPLO_UI_STATE_TRADE_AI_MAKES_DEMAND" 7
"DIPLO_UI_STATE_TRADE_AI_MAKES_REQUEST" 8
"DIPLO_UI_STATE_TRADE_HUMAN_OFFERS_CONCESSIONS" 9
"DIPLO_UI_STATE_HUMAN_DEMAND" 10
"DIPLO_UI_STATE_BLANK_DISCUSSION_RETURN_TO_ROOT" 11
"DIPLO_UI_STATE_BLANK_DISCUSSION" 12
"DIPLO_UI_STATE_BLANK_DISCUSSION_MEAN_HUMAN" 13
"DIPLO_UI_STATE_BLANK_DISCUSSION_MEAN_AI" 14
"DIPLO_UI_STATE_AI_DECLARED_WAR" 15
"DIPLO_UI_STATE_DISCUSS_HUMAN_INVOKED" 16
"DIPLO_UI_STATE_DISCUSS_AGGRESSIVE_MILITARY_WARNING" 17
"DIPLO_UI_STATE_DISCUSS_I_ATTACKED_YOUR_MINOR_CIV" 18
"DIPLO_UI_STATE_DISCUSS_I_BULLIED_YOUR_MINOR_CIV" 19
"DIPLO_UI_STATE_DISCUSS_YOU_ATTACKED_MINOR_CIV" 20
"DIPLO_UI_STATE_DISCUSS_YOU_KILLED_MINOR_CIV" 21
"DIPLO_UI_STATE_DISCUSS_YOU_BULLIED_MINOR_CIV" 22
"DIPLO_UI_STATE_DISCUSS_PROTECT_MINOR_CIV" 23
"DIPLO_UI_STATE_DISCUSS_YOU_EXPANSION_SERIOUS_WARNING" 24
"DIPLO_UI_STATE_DISCUSS_YOU_EXPANSION_WARNING" 25
"DIPLO_UI_STATE_DISCUSS_YOU_PLOT_BUYING_SERIOUS_WARNING" 26
"DIPLO_UI_STATE_DISCUSS_YOU_PLOT_BUYING_WARNING" 27
"DIPLO_UI_STATE_DISCUSS_WORK_WITH_US" 28
"DIPLO_UI_STATE_DISCUSS_WORK_AGAINST_SOMEONE" 29
"DIPLO_UI_STATE_DISCUSS_COOP_WAR" 30
"DIPLO_UI_STATE_DISCUSS_COOP_WAR_TIME" 31
"DIPLO_UI_STATE_DISCUSS_PLAN_RESEARCH_AGREEMENT" 32
"DIPLO_UI_STATE_DISCUSS_AI_REQUEST_DENOUNCE" 33
"DIPLO_UI_STATE_CAUGHT_YOUR_SPY" 34
"DIPLO_UI_STATE_KILLED_YOUR_SPY" 35
"DIPLO_UI_STATE_KILLED_MY_SPY" 36
"DIPLO_UI_STATE_CONFRONT_YOU_KILLED_MY_SPY" 37
"DIPLO_UI_STATE_STOP_CONVERSIONS" 38
"NUM_DIPLO_UI_STATES" 39


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 0.

local id = DiploUIStateTypes.DIPLO_UI_STATE_DEFAULT_ROOT
local id = DiploUIStateTypes["DIPLO_UI_STATE_DEFAULT_ROOT"]


Used by

Events.AILeaderMessage(PlayerID player, DiploUIStateType diploUIState, string leaderMessage, int animationAction, int data1)



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.