GameMessageType (Civ5 Type)

From Civilization Modding Wiki
Revision as of 14:44, 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 GameMessageType 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 GameMessageType corresponds to the constants defined in the GameMessageTypes Lua enumeration.


Lua: the GameMessageTypes enumeration

Firaxis provides a Lua enumeration named GameMessageTypes. 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
"GAMEMESSAGE_NETWORK_READY" 0
"GAMEMESSAGE_VERIFY_VERSION" 1
"GAMEMESSAGE_VERSION_NACK" 2
"GAMEMESSAGE_VERSION_WARNING" 3
"GAMEMESSAGE_GAME_TYPE" 4
"GAMEMESSAGE_ID_ASSIGNMENT" 5
"GAMEMESSAGE_FILE_INFO" 6
"GAMEMESSAGE_PICK_YOUR_CIV" 7
"GAMEMESSAGE_CIV_CHOICE" 8
"GAMEMESSAGE_CONFIRM_CIV_CLAIM" 9
"GAMEMESSAGE_CLAIM_INFO" 10
"GAMEMESSAGE_CIV_CHOICE_ACK" 11
"GAMEMESSAGE_CIV_CHOICE_NACK" 12
"GAMEMESSAGE_CIV_CHOSEN" 13
"GAMEMESSAGE_INTERIM_NOTICE" 14
"GAMEMESSAGE_INIT_INFO" 15
"GAMEMESSAGE_MAPSCRIPT_CHECK" 16
"GAMEMESSAGE_MAPSCRIPT_ACK" 17
"GAMEMESSAGE_LOAD_GAME" 18
"GAMEMESSAGE_PLAYER_ID" 19
"GAMEMESSAGE_SLOT_REASSIGNMENT" 20
"GAMEMESSAGE_PLAYER_INFO" 21
"GAMEMESSAGE_GAME_INFO" 22
"GAMEMESSAGE_REASSIGN_PLAYER" 23
"GAMEMESSAGE_PITBOSS_INFO" 24
"GAMEMESSAGE_LAUNCHING_INFO" 25
"GAMEMESSAGE_INIT_GAME" 26
"GAMEMESSAGE_INIT_PLAYERS" 27
"GAMEMESSAGE_AUTH_REQUEST" 28
"GAMEMESSAGE_AUTH_RESPONSE" 29
"GAMEMESSAGE_SYNCH_START" 30
"GAMEMESSAGE_PLAYER_OPTION" 31
"GAMEMESSAGE_EXTENDED_GAME" 32
"GAMEMESSAGE_AUTO_MOVES" 33
"GAMEMESSAGE_TURN_COMPLETE" 34
"GAMEMESSAGE_PUSH_MISSION" 35
"GAMEMESSAGE_AUTO_MISSION" 36
"GAMEMESSAGE_DO_COMMAND" 37
"GAMEMESSAGE_PUSH_ORDER" 38
"GAMEMESSAGE_POP_ORDER" 39
"GAMEMESSAGE_DO_TASK" 41
"GAMEMESSAGE_RESEARCH" 42
"GAMEMESSAGE_CONVERT" 43
"GAMEMESSAGE_CHAT" 44
"GAMEMESSAGE_PING" 45
"GAMEMESSAGE_SIGN" 46
"GAMEMESSAGE_LINE_ENTITY" 47
"GAMEMESSAGE_SIGN_DELETE" 48
"GAMEMESSAGE_LINE_ENTITY_DELETE" 49
"GAMEMESSAGE_LINE_GROUP_DELETE" 50
"GAMEMESSAGE_PAUSE" 51
"GAMEMESSAGE_MP_KICK" 52
"GAMEMESSAGE_MP_RETIRE" 53
"GAMEMESSAGE_CLOSE_CONNECTION" 54
"GAMEMESSAGE_NEVER_JOINED" 55
"GAMEMESSAGE_MP_DROP_INIT" 56
"GAMEMESSAGE_MP_DROP_VOTE" 57
"GAMEMESSAGE_MP_DROP_UPDATE" 58
"GAMEMESSAGE_MP_DROP_RESULT" 59
"GAMEMESSAGE_MP_DROP_SAVE" 60
"GAMEMESSAGE_TOGGLE_TRADE" 61
"GAMEMESSAGE_IMPLEMENT_OFFER" 62
"GAMEMESSAGE_CHANGE_WAR" 63
"GAMEMESSAGE_LIBERATE_PLAYER" 66
"GAMEMESSAGE_CHOOSE_ELECTION" 67
"GAMEMESSAGE_DIPLO_VOTE" 68
"GAMEMESSAGE_APPLY_EVENT" 69
"GAMEMESSAGE_CONTACT_CIV" 70
"GAMEMESSAGE_DIPLO_CHAT" 71
"GAMEMESSAGE_SEND_OFFER" 72
"GAMEMESSAGE_RENEGOTIATE" 73
"GAMEMESSAGE_RENEGOTIATE_ITEM" 74
"GAMEMESSAGE_EXIT_TRADE" 75
"GAMEMESSAGE_KILL_DEAL" 76
"GAMEMESSAGE_UPDATE_POLICIES" 77
"GAMEMESSAGE_CLEAR_TABLE" 78
"GAMEMESSAGE_POPUP_PROCESSED" 79
"GAMEMESSAGE_DIPLOMACY_FROM_UI" 80
"GAMEMESSAGE_HOT_JOIN_NOTICE" 81
"GAMEMESSAGE_HOT_DROP_NOTICE" 82
"GAMEMESSAGE_POPUP" 83
"GAMEMESSAGE_EVENT_TRIGGERED" 84
"GAMEMESSAGE_LAUNCH_SPACESHIP" 85
"GAMEMESSAGE_ADVANCED_START_ACTION" 86
"GAMEMESSAGE_MINOR_CIV_QUEST_NO_INTEREST" 87
"GAMEMESSAGE_MINOR_CIV_QUEST_COMPLETED" 88
"GAMEMESSAGE_MINOR_CIV_INTRUSION" 89
"GAMEMESSAGE_MINOR_CIV_ENTER_TERRITORY" 90
"GAMEMESSAGE_BARBARIAN_RANSOM" 91
"GAMEMESSAGE_PLAYER_HURRY" 96
"GAMEMESSAGE_MOD_NET_MESSAGE" 97
"GAMEMESSAGE_SWAP_UNITS" 98
"GAMEMESSAGE_SWAP_ORDER" 124
"GAMEMESSAGE_AVOID_GROWTH" 127


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 = GameMessageTypes.GAMEMESSAGE_NETWORK_READY
local id = GameMessageTypes["GAMEMESSAGE_NETWORK_READY"]


Used by

Game.SelectedCitiesGameNetMessage(GameMessageType message, TaskType data2, int data3, BuildingType data4, bool option, bool alt, bool shift, bool ctrl)
Game.SelectionListGameNetMessage(GameMessageType message, int data2 = -1, BuildActionType data3 = -1, UnitID data4 = -1, int flags = 0, bool alt = false, bool shift = false)



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.