Europa Universalis 2 Event Manual
2001-11-06, Henrik Fåhraeus, (c) Paradox Entertainment
In EU 2, it is possible to implement complicated events by using a custom script language. The events can be set to happen for a certain country at or between certain dates, with optional condition triggers.
Events are separated into major and flavour events. Although they are scripted exactly the same way, the convention is to place minor events, such as scientists and cultural personalities, in the flavour event files whereas ma 15215d310p jor events go in the major event files. This is just a convention; the event files can be called anything as long as they are included in DB\EVENTS.TXT (whose name is also a convention - it is just included in all of the scenario .EUG files).
Major events should be scripted in the files called:
(Where XXX is the country tag.)
Flavour events should be scripted in the files called:
(Where XXX is the country tag.)
The random events reside in two files:
DB\EVENTS\RANDOMEVENTS.TXT
and
Some events affect all countries in the world. These are stored in:
DB\EVENTS\HUGEEVENTS.TXT
and
DB\EVENTS\RELIGIOUSEVENTS.TXT
The texts for the events reside in the file called:
This is a comma-separated resource file containing all the in-game text.
event =
random = no
country = CHI
name = "EVENTNAME3704"
desc = "EVENTHIST3704"
style = 1
date =
offset = 150
deathdate =
action_a =
command =
command =
}
action_b ={
name = "ACTIONNAME3704B"
command =
command =
command =
}
action_c ={
name = "ACTIONNAME3704C"
command =
command =
command =
}
action_d
name = "ACTIONNAME3704D"
command =
command =
command =
}
This is an empty event that will do nothing, but it will happen sometime from Oct 1, 1773 and 150 days forward. We will now go through each of the commands outlined in the example, in order.
Every event in the game must have a unique id. It is very important that there are no id conflicts. The number of possible ids is 256^4 (4,294,967,296). 1-15000 is reserved by Paradox.
id = 0300
The trigger condition statement is optional. If left out the event will happen on the dates specified, or if directly triggered by another event.
trigger =
It is also possible to set several conditions for the trigger.
trigger =
In this case, all three conditions must be true; the default Boolean operator is AND. However, it is also possible to use OR and NOT.
trigger =
owned =
owned =
NOT =
This trigger is true if province 110 OR 86 OR 47 is owned by the country this event affects AND event 3301 has NOT happened.
atwar yes / no
Checks if the country is at war.
religion = catholic / counterreform / protestant / reformed / orthodox / sunni / shiite /
confucian / buddhist / hindu / pagan
Checks the religion of the country.
event = xxxx
Checks if event with id xxxx has happened.
leader = xxxx
Checks if leader with id xxxx is alive.
monarch = xxxx
Checks if monarch with id xxxx is alive.
owned =
Checks if province x is owned by country aaa (if data = -1 then it is for the country receiving the event)
control =
Checks if province x is controlled (owned or occupied) by country aaa (if data = -1 then it is for the country receiving the event)
core =
Checks if province x is a core province of country aaa (if data = -1 then it is for the country receiving the event)
continent = europe / america / asia / africa / oceania
Checks on which continent the capital of the country getting the event lies.
exist = aaa
Checks if country aaa exists. (Where aaa is the three letter tag of the country.)
alliance =
Checks if a domestic policy slider is at value x or higher. (Use NOT to negate.)
stability = x
Checks if stability is at x or higher. (-3 to 3)
land = x
Checks if the land tech level is at x or higher. (0 to 60)
naval = x
Checks if the naval tech level is at x or higher. (0 to 60)
infra = x
Checks if the infra tech level is at x or higher. (0 to 10)
trade = x
Checks if the trade tech level is at x or higher. (0 to 10)
discovered = reg
Checks if region reg has been discovered by the Europeans.
cot = x
Checks if there is a centre of trade in province x.
year = x
Checks if the year is x. This is equivalent to using the date statement. See section 3.8.
This directive tells whether the event should be random or not. For country events, this is usually no.
random = no
This 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.
country = CHI
An alternative to using the country statement, this means that the event should happen for whoever owning a certain province.
province = 357
This specifies the name of the event that appears in the event window. This is language specific and thus kept in the file text.csv.
name = "EVENTNAME3704"
This is the main event text that appears in the event window. This is language specific and thus kept in the file text.csv.
name = "EVENTHIST3704"
This specifies the look of the event window depending on the time period when the event appears. (1=15th century, 5=19th.)
style = 1
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.
date =
This is an 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.
offset = 3000
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 or may be triggered by another event.
deathdate
The action statements are the responses to the event offered to the player. Sometimes it is appropriate with a single one, "Ok", other times there may be up to four different responses. Action statements always contain a name statement and any number of command statements.
action_a ={ # Ok
name = "ACTIONNAME3704A"
command =
This is a simple ok action. The name statement points to a text in text.csv. Even an action that does nothing must contain a command statement.
Some general rules and problems with commands:
Commands that modify province values are ignored if the province belongs to a country different than the one affected by the event.
Commands that affect countries that do not exist are ignored.
It is not directly possible to make a country independent. Revolts must be used.
It is not possible to force a declaration of war.
It is not possible to adjust relations with all countries of a certain religion with one command.
The list of valid commands:
command =
Invests x gold in infra research. May also be negative.
command =
Invests x gold in trade research. May also be negative.
command =
Invests x gold in land research. May also be negative.
command =
Invests x gold in naval research. May also be negative.
command =
Adds x gold to the treasury. May also be negative.
command =
Adds x to the stability. May also be negative.
command =
Adjust victory points with x.
command =
Adjust the size of the state loans.
command =
Raises inflation with x percents. May also be negative.
command =
Adds x diplomats. May also be negative.
command =
Adds x colonists. May also be negative.
command =
Adds x merchants. May also be negative.
command =
Adds x missionaries. May also be negative.
command =
Add x to manpower pool. (Does not raise the maximum manpower-use provincemanpower for that.) May also be negative.
command =
Declare war on nation with tag aaa.
command =
Change technology group of the country. (Affects the research speed.) And yes, there should be a "t" in front of orthodox.
command =
Grants independence to country with tag aaa.
command =
Triggers event xxxx immediately.
command =
Starts a revolt in province x. (-1 is a random province, -2 is the capital.) There is no guarantee that a fort in the province will fall into rebel hands.
command =
Starts a colonial revolt (i.e. if set to -1 it will only happen in cities with <700 inhabitants) in province x.
command =
Starts a religious revolt in province x. (-1 is a random province, -2 is the capital.)
command =
Religion in province x (-1 is a random province, -2 is the capital) changes from the state religion to some other religion (heretical, if possible).
command =
Religion in province in province x (-1 is a random province, -2 is the capital) changes to the state religion.
command =
Creates a royal marriage to nation with tag aaa.
command =
Adds nation with tag aaa to military alliance of the country affected by the event.
command =
Inherit country with tag aaa (political annexation).
command =
Have a conquistador appear in province x (-1 is a random province, -2 is the capital.)
command =
Have an explorer appear in province x (-1 is a random province, -2 is the capital.)
command =
Monarch with id x becomes ruler. Same as wakemonarch.
command =
Leader with id x becomes active. Same as wakeleader.
command =
Activate leader with id x. (No longer dormant.)
command =
Deactivate leader with id x. (Make dormant.) Note that if the leader is already alive, he will not die.
command =
Activate monarch with id x. (No longer dormant.)
command =
Deactivate monarch with id x. (Make dormant.)
command =
Deactivate event with id x.
command =
Change tag to aaa. Used for example when Castile or Aragon becomes Spain.
command =
Move capital to province x.
command =
Make x a core province.
command =
Remove x as core province.
command =
Add a centre of trade to province x.
command =
Add culture_name to the state cultures.
command =
Remove culture_name from the state cultures.
command =
Set game flag x to true.
0 = Tordesillas
1 = Reformation
2 = Calvin
3 = Council of Trent
4 = Edict of Tolerance.
5 = French Tricolor
6 = English Union Jack
command =
Changes the state religion. Has no other effects.
command =
Changes the province religion in province x (-1 is a random province, -2 is the capital.)
command =
Changes the province culture in province x (-1 is a random province, -2 is the capital.) For valid names, look in db\province.csv (culture_name = -1 means the state culture.)
command =
Raises the nation's revoltrisk for x months with y percents. May also be negative.
command =
Modify the revolt risk in province x with value y indefinitely, until lowered by another event, or until the province is in the hands of another nation (this also applies to nations changing tags).
command =
Modifies the ADM value of the regent with x for y months. (Yes, a little backwards syntax.)
command =
Modifies the MIL value of the regent with x for y months. (Yes, a little backwards syntax.)
command =
Modifies the DIP value of the regent with x for y months. (Yes, a little backwards syntax.)
command =
Modifies a domestic policy slider with value x.
command =
command =
Have y men desert in province x (-1 is a random province, -2 is the capital.)
command =
Modify fortress level in province x (-1 is a random province, -2 is the capital) with y.
command =
Modify population level in province x (-1 is a random province, -2 is the capital) with y.
command =
Add y infantry in province x (-1 is a random province, -2 is the capital).
command =
Add y cavalry in province x (-1 is a random province, -2 is the capital).
command =
Add y artillery in province x (-1 is a random province, -2 is the capital).
command =
Add y warships in province x (-1 is a random province, -2 is the capital). Ignored if there is no port.
command =
Add y galleys in province x (-1 is a random province, -2 is the capital). Ignored if there is no port.
command =
Add y cargo ships in province x (-1 is a random province, -2 is the capital). Ignored if there is no port.
command =
Modify the province tax in province x (-1 is a random province, -2 is the capital) with y. Be aware that the province tax also affects the supply value of the province.
command =
Modify the manpower in province x (-1 is a random province, -2 is the capital) with y.
command =
Increases the income from iron, copper or gold in province y by x. Ignored if the province has another type of trade goods.
command =
Add natives to province x with aggression value y (1-9).
command =
Secede province x to country aaa.
command =
Gain casus belli against country x for y months.
command =
Gain a building/upgrade in province x (-1 is a random province, -2 is the capital.)
command =
Lose a building in province x (-1 is a random province, -2 is the capital.)
command =
Gain a manufactory in province x (-1 is a random province, -2 is the capital.)
command =
Lose a manufactory in province x (-1 is a random province, -2 is the capital.)
|