This article is a guide to how events are encoded in Europa Universalis II

Introduction Edit

The code for the events are in the "Event files", which (although they don't have any special name conventions) often have a "*.eue" suffix or a "*.txt" suffix.

Let's look at a simple example:

#  Random Revolt
event = {
  id = 94001  # Paradox 1001
  trigger = {
    NOT = { countrysize = 30 } 
  random = yes
  name = "EVENTNAME1" 
  desc = "EVENTHIST1" 
  action_a = {
    name = "OK" 
    command = { type = revolt which = -1 } 

The code "event = {" begins the event and the last "}" ends the event.

The rest of the code (including code not showed in this example) can be divided in the following groups:

  • Comments (that have no influence on the behaviour of the event): "# Random Revolt " and " # Paradox 1001 ".
  • Identity of the event: "id = 94001".
  • Name and description of the event: " name = "EVENTNAME1" " and " desc = "EVENTHIST1" ".
  • Selective directives in the "trigger" clause: "trigger = { NOT = { countrysize = 30 } }".
  • Selective directives outside of the "trigger" clause: "country = MOS" or "province = 362" (none of this type is in the example above).
  • Non selective directives: "random = yes".
  • Actions to be taken when the event is triggered and really happens.

General Categories of Events Edit

When dealing with events it's helpful to categorize them in the following manners:

  • Whether they are random ("random = yes") or not ("random = no").
  • Whether they are meant to happen to both the player and the AI countries, only for AI countries ("ai = yes"), or only for the player ("ai = no").
  • Whether they should happen for a specific country ("country = MOS") or for a specific province ("province = 362") regardless which country the province is owned by.

Directives outside the trigger clause Edit

Comments Edit

Comments begins with a "#". This and the rest of the line is treated as a comment. They don't have any influence on the event.

IDs Edit

Every event must have an identity, given through the "id" clause. The identity must be unique in the game. The events numbered 1 - 100000 are reserved for Paradox (the games vendor). You can use numbers within the 100001 - 4294967296 range. Note that each mod has its own range of event numbers (or, if we are unlucky, they clash with another or Paradox). You must check this before you give id's to your events. The format is:

id = event_number


id = 94001 

Other directives Edit

countrycountry's tagThis statement tells which country the event should affect. This must be set to a valid country tag. If this statement is left out, the event will happen for all countries! The country can be omitted if the event is a random event or if you have other triggers deciding the country affected, like owned or control.
randomyes/noThis directive tells whether the event should be random or not. For country events, this is usually no. Random events are the only event that can happen more than once.
provinceprovince's idAn alternative to using the country statement, this means that the event should happen for whoever owning a certain province.
style1-5This specifies the look of the event window depending on the time period when the event appears. (1=15th century, 5=19th.) Note: Style isn't used in EU2.
date{ day = x month = y year = zzzz }This is the date when the event may first happen. If this directive is used alone (no offset), the event will happen on this exact date if triggers are valid. If triggers are not valid the event will never happen!
offsetxThis is a random offset in days, always used in conjunction with the date statement. It means that the event may happen on any of these days from the time specified in date. If the event has triggers it will start searching for triggers on this date. Note: After the first trigger check after a random number of days the triggers are checked again at intervals defined by the offset. This means that for an 'offset = 360' the event will first check the triggers on a random day the first year after the set date, and then once every year! If a game is saved/reloaded in the middle of an offset, the event is checked at reload (which explains why you so often get certain events on reload).
deathdate{ day = x month = y year = zzzz }This is the deadline of an event, after which it may no longer be triggered. The deathdate statement is only useful if the event has a trigger condition. Events without a deathdate will fire if other triggers are valid on the date specified by the date/offset parameters. If triggers are not valid on that date the event will never fire. If you want the event to keep looking for triggers you need to define a deathdate.

Name and Description Edit

The name is what you get as a header in the event window in the game. The description is the descriptive text below. There are three types of name clauses:

name = "name-text-id"

an example:

name = "EVENTNAME1" 


name = "user-supplied-text"

an example:

name = "Unprovoked Revolt" 

or a special variant:

name = "AI_EVENT" 

When using the "name-text-id" variant you are directing EU2 to get the header text from the "text.csv" file. Which of course must be found there to make it work. E g "name = "EVENTNAME1" " means that there is an entry in that file with the name "EVENTNAME1" that have accompanying text. The second example has the header text directly in the event itself. But this makes it difficult for these who want to translate the text to other languages. The third example is a special directive that - if it's an AI only event - hides the event from the game log. The effects of the event will still happen in the game.

There are two types of desc clauses:

desc = "desc-text-id"

an example:

desc = "EVENTHIST1" 


desc = "user-supplied-text"

an example:

desc = "Revolts were almost part of everyday life for the rulers all over Europe. 
High taxes noblemen cruelties as well as cultural and religious differences
caused unhappiness among the farmers and in the cities and in the most extreme
cases this led to rebellions with sometimes long lasting and drastic effect."

The workings of these are the same as for the first two in the name clause above.

Selective directives in the trigger clause Edit

Overall Edit

aiyes / noChecks if the country receiving the event is AI controlled or not.
eventxxxxChecks if event with id xxxx has happened.
flagflag nameChecks if the country flag with the specified name is set.
yearxChecks if the year is x or later. This is equivalent to using the date statement.

Diplomatic conditions Edit

alliance{ country = aaa country = bbb )Checks if aaa and bbb are in the same military alliance.
atwaryes / noChecks if the country is at war.
dynastic{ country = aaa country = bbb )Checks if aaa and bbb have a royal marriage.
vassal{ country =aaa country = bbb }Checks if country bbb is a vassal of aaa.
war{ country = aaa country = bbb )Checks if country aaa is at war with country bbb.

Religious and cultural conditions Edit

provinceculture{ prov = x data = y }Is true if province x has culture y.
provincereligion{ province = x data = y }Is true if province x has religion y.
religioncatholic / counterreform / protestant / reformed / orthodox / sunni / shiite / confucianism / buddhism / hinduism / paganChecks the state religion of the country.

Based on monarchs and leaders Edit

leaderxxxxIs true if leader with id xxxx is alive.
monarchxxxxIs true if monarch with id xxxx is alive.

Based on countries and provinces Edit

badboyxIs true if badboy is x or higher.
continenteurope / america / asia / africa / oceaniaChecks on which continent the capital of the country getting the event lies.
control{ province = x data = aaa }Is true if province x is controlled by country aaa (if data = -1 then it is for the country receiving the event)
core{ province = x data = aaa }Is true if province x is a core province of country aaa (if data = -1 then it is for the country receiving the event).
cotxIs true if there is a center of trade in province x.
countrysizexIs true if the receiving country owns x provinces or more. Cities and colonies are counted. From 1.07 trading posts no longer count.
discoveredxIs true if province x has been discovered by (any) europeans.
existsaaaIs true if country aaa exists. (Where aaa is the three letter tag of the country.)
neighbourxIs true if the receiving country is neighbor with country x.
owned{ province = x data = aaa }Is true if province x is owned by country aaa (if data = -1 then it is for the country receiving the event)
relation{ country = x value = y }Is true if the receiving country has relations relations y or better with country x.

Based on domestic affairs Edit

domestic{ type = aristocracy / centralization / innovative / mercantilism / land / offensive / quality / serfdom value = x }Checks if a domestic policy slider is at value x or higher. (Use NOT to negate.)
infraxChecks if the infrastructure level is at x or higher. (0 to 10)
landxChecks if the land tech level is at x or higher. (0 to 60)
navalxChecks if the naval tech level is at x or higher. (0 to 60)
stabilityxChecks if the stability level is at x or higher. (-3 to 3)
tradexChecks if the trade tech level is at x or higher. (0 to 10)

Actions Edit

Some of the content from this article has been taken from | Havard's EU editing empire. This text can be edited as a standard GNU FDL documentation, but don't delete his signature.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.