NotificationType (Civ5 Type)

From Civilization Modding Wiki
Jump to: navigation, search

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


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


Lua: the NotificationTypes enumeration

Firaxis provides a Lua enumeration named NotificationTypes. 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 Notifications 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
"NOTIFICATION_GENERIC" 0
"NOTIFICATION_TECH" 1
"NOTIFICATION_FREE_TECH" 2
"NOTIFICATION_POLICY" 3
"NOTIFICATION_PRODUCTION" 4
"NOTIFICATION_MET_MINOR" 5
"NOTIFICATION_MINOR" 6
"NOTIFICATION_MINOR_QUEST" 7
"NOTIFICATION_ENEMY_IN_TERRITORY" 8
"NOTIFICATION_CITY_RANGE_ATTACK" 9
"NOTIFICATION_BARBARIAN" 10
"NOTIFICATION_GOODY" 11
"NOTIFICATION_BUY_TILE" 12
"NOTIFICATION_CITY_GROWTH" 13
"NOTIFICATION_CITY_TILE" 14
"NOTIFICATION_DEMAND_RESOURCE" 15
"NOTIFICATION_UNIT_PROMOTION" 16
"NOTIFICATION_WONDER_COMPLETED_ACTIVE_PLAYER" 17
"NOTIFICATION_WONDER_COMPLETED" 18
"NOTIFICATION_WONDER_BEATEN" 19
"NOTIFICATION_GOLDEN_AGE_BEGUN_ACTIVE_PLAYER" 20
"NOTIFICATION_GOLDEN_AGE_ENDED_ACTIVE_PLAYER" 21
"NOTIFICATION_GREAT_PERSON_ACTIVE_PLAYER" 22
"NOTIFICATION_STARVING" 23
"NOTIFICATION_WAR_ACTIVE_PLAYER" 24
"NOTIFICATION_WAR" 25
"NOTIFICATION_PEACE_ACTIVE_PLAYER" 26
"NOTIFICATION_PEACE" 27
"NOTIFICATION_VICTORY" 28
"NOTIFICATION_UNIT_DIED" 29
"NOTIFICATION_CITY_LOST" 30
"NOTIFICATION_CAPITAL_LOST_ACTIVE_PLAYER" 31
"NOTIFICATION_CAPITAL_LOST" 32
"NOTIFICATION_CAPITAL_RECOVERED" 33
"NOTIFICATION_PLAYER_KILLED" 34
"NOTIFICATION_DISCOVERED_LUXURY_RESOURCE" 35
"NOTIFICATION_DISCOVERED_STRATEGIC_RESOURCE" 36
"NOTIFICATION_DISCOVERED_BONUS_RESOURCE" 37
"NOTIFICATION_DIPLO_VOTE" 38
"NOTIFICATION_RELIGION_RACE" 39
"NOTIFICATION_EXPLORATION_RACE" 40
"NOTIFICATION_DIPLOMACY_DECLARATION" 41
"NOTIFICATION_DEAL_EXPIRED_GPT" 42
"NOTIFICATION_DEAL_EXPIRED_RESOURCE" 43
"NOTIFICATION_DEAL_EXPIRED_OPEN_BORDERS" 44
"NOTIFICATION_DEAL_EXPIRED_DEFENSIVE_PACT" 45
"NOTIFICATION_DEAL_EXPIRED_RESEARCH_AGREEMENT" 46
"NOTIFICATION_DEAL_EXPIRED_TRADE_AGREEMENT" 47
"NOTIFICATION_TECH_AWARD" 48
"NOTIFICATION_PLAYER_DEAL" 49
"NOTIFICATION_PLAYER_DEAL_RECEIVED" 50
"NOTIFICATION_PLAYER_DEAL_RESOLVED" 51
"NOTIFICATION_PROJECT_COMPLETED" 52
"NOTIFICATION_REBELS" 53
"NOTIFICATION_FREE_POLICY" 54
"NOTIFICATION_FREE_GREAT_PERSON" 55
"NOTIFICATION_DENUNCIATION_EXPIRED" 56
"NOTIFICATION_FRIENDSHIP_EXPIRED" 57
"NOTIFICATION_RELIGION_FOUNDED_ACTIVE_PLAYER" 58
"NOTIFICATION_RELIGION_FOUNDED" 59
"NOTIFICATION_PANTHEON_FOUNDED_ACTIVE_PLAYER" 60
"NOTIFICATION_PANTHEON_FOUNDED" 61
"NOTIFICATION_FOUND_PANTHEON" 62
"NOTIFICATION_FOUND_RELIGION" 63
"NOTIFICATION_ENHANCE_RELIGION" 64
"NOTIFICATION_RELIGION_ENHANCED_ACTIVE_PLAYER" 65
"NOTIFICATION_RELIGION_ENHANCED" 66
"NOTIFICATION_SPY_CREATED_ACTIVE_PLAYER" 67
"NOTIFICATION_SPY_STOLE_TECH" 68
"NOTIFICATION_SPY_CANT_STEAL_TECH" 69
"NOTIFICATION_CAN_BUILD_MISSIONARY" 70
"NOTIFICATION_OTHER_PLAYER_NEW_ERA" 71
"NOTIFICATION_SPY_EVICTED" 72
"NOTIFICATION_RELIGION_SPREAD" 73
"NOTIFICATION_TECH_STOLEN_SPY_DETECTED" 74
"NOTIFICATION_TECH_STOLEN_SPY_IDENTIFIED" 75
"NOTIFICATION_SPY_WAS_KILLED" 76
"NOTIFICATION_SPY_KILLED_A_SPY" 77
"NOTIFICATION_SPY_REPLACEMENT" 78
"NOTIFICATION_MAYA_LONG_COUNT" 79
"NOTIFICATION_FAITH_GREAT_PERSON" 80
"NOTIFICATION_SPY_PROMOTION" 81
"NOTIFICATION_INTRIGUE_DECEPTION" 82
"NOTIFICATION_SPY_RIG_ELECTION_SUCCESS" 83
"NOTIFICATION_SPY_RIG_ELECTION_FAILURE" 84
"NOTIFICATION_SPY_RIG_ELECTION_ALERT" 85
"NOTIFICATION_SPY_YOU_STAGE_COUP_SUCCESS" 86
"NOTIFICATION_SPY_YOU_STAGE_COUP_FAILURE" 87
"NOTIFICATION_SPY_STAGE_COUP_SUCCESS" 88
"NOTIFICATION_SPY_STAGE_COUP_FAILURE" 89
"NOTIFICATION_INTRIGUE_BUILDING_SNEAK_ATTACK_ARMY" 90
"NOTIFICATION_INTRIGUE_BUILDING_SNEAK_ATTACK_AMPHIBIOUS" 91
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_ARMY_AGAINST_KNOWN_CITY_UNKNOWN" 92
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_ARMY_AGAINST_KNOWN_CITY_KNOWN" 93
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_ARMY_AGAINST_YOU_CITY_UNKNOWN" 94
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_ARMY_AGAINST_YOU_CITY_KNOWN" 95
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_ARMY_AGAINST_UNKNOWN" 96
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_AMPHIB_AGAINST_KNOWN_CITY_UNKNOWN" 97
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_AMPHIB_AGAINST_KNOWN_CITY_KNOWN" 98
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_AMPHIB_AGAINST_YOU_CITY_UNKNOWN" 99
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_AMPHIB_AGAINST_YOU_CITY_KNOWN" 100
"NOTIFICATION_INTRIGUE_SNEAK_ATTACK_AMPHIB_AGAINST_UNKNOWN" 101
"NOTIFICATION_RELIGION_ERROR" 102
"NOTIFICATION_AUTOMATIC_FAITH_PURCHASE_STOPPED" 103
"NOTIFICATION_EXPANSION_PROMISE_EXPIRED" 104
"NOTIFICATION_BORDER_PROMISE_EXPIRED" 105
"NOTIFICATION_TRADE_ROUTE" 106
"NOTIFICATION_TRADE_ROUTE_BROKEN" 107
"NOTIFICATION_RELIGION_SPREAD_NATURAL" 108
"NOTIFICATION_INTRIGUE_CONSTRUCTING_WONDER" 109
"NOTIFICATION_MINOR_BUYOUT" 110
"NUM_NOTIFICATION_TYPES" 111


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 = NotificationTypes.NOTIFICATION_GENERIC
local id = NotificationTypes["NOTIFICATION_GENERIC"]


Used by

Events.NotificationAdded(CityAIFocusType notification, NotificationType notificationType, string toolTip, string summary, int gameValue, TechType extraGameData)
Player:AddNotification(NotificationType notificationType, string description, string title, int x = -1, int y = -1, PlayerID extra1 = -1, int extra2 = -1)



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.