• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Index

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
4.048
496
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
For the previous version of this thread, see https://forum.paradoxplaza.com/forum/threads/commands-and-triggers-list.459110/. Many thanks to Third Angel for creating and maintaining the original thread for years.

This post is divided into several sections:
Orange is for additions in patch 1.3.

Thanks to Havard for making the original list for EU2, Third Angel for updating it to FTG up to the December 2017 beta patch, and chefkoch for helping Third Angel.
 
Last edited:
  • 2Like
  • 2
Reactions:
Commands
Commands

Diplomatic commands :


command = { type = alliance which = aaa }
Adds nation with tag aaa to military alliance of the country affected by the event. Note that this will only happen if the country receiving the event is alliance leader or unallied, and country aaa is unallied.

command = { type = dynastic which = aaa }
Creates a royal marriage to nation with tag aaa.

command = { type = vassal which = aaa }
Makes country aaa a vassal of the receiving country. This will not work if the receiving country is already a vassal of country aaa, but it will if both countries are at war with each other.

command = { type = breakvassal which = aaa }
Breaks vassalage with liege country aaa (-1 works towards any suzerain). Also note that if a vassalage is broken in event, a new vassalisation for that tag cannot be created by an event triggered from that same event.

command = { type = breakoverlord which = aaa }
Breaks vassalage with vassal country aaa.

command = { type = inherit which = aaa }
Inherits country aaa. All provinces go to the country receiving the event, provinces controlled by other countries remain controlled by them only if at war with the inheriting country (each inherited province gives 0.25 badboy point, military units are inherited too).

command = { type = annex which = aaa }
Annexes country aaa. Provinces controlled by other countries go to the controller (each annexed province gives 1 badboy point, military units are destroyed).

command = { type = independence which = aaa }
Creates country aaa as a vassal. This will release a country and give them all the provinces specified in revolt.txt as "minimum" that the country receiving the event owns; which = -1 will release a random country whose provinces you own when the event fires.

command = { type = free which = aaa }
Creates country aaa but NOT as a vassal. This will release a country and give them all the provinces specified in revolt.txt as "minimum" that the country receiving the event owns; which = -1 will release a random country whose provinces you own when the event fires.


command = { type = relation which = aaa value = x }
Modifies diplomatic relation with country aaa with value x.

command = { type = casusbelli which = x value = y }
Gains casus belli against country x for y months.

command = { type = war which = aaa }
Declares war on country aaa.

command = { type = cedeprovince which = aaa value = x }
Cedes province x to country aaa; value = -1 will cede a random province.

command = { type = control which = x value = aaa }
Gives control of province x to country aaa. Works only if at war with country aaa, unless it's REB. value = -1 can be used to change control of an owned province back to this country.

command = { type = giveaccess which = aaa }
Grants military access to country aaa.

command = { type = cancelaccess which = aaa }
Cancels military access through country aaa.

command = { type = revokeaccess which = aaa }
Cancels military access granted to country aaa.

command = { type = givetrade which = aaa }
Creates a trade agreement with country aaa.

command = { type = revoketrade which = aaa }
Cancels a trade agreement with country aaa.

command = { type = elector which = aaa value = x }
Changes the number of votes for country aaa, 0 removes it as an elector.

command = { type = flagname which = "x" }
Changes the graphic flag and shields of the country receiving the event. It is important that the new graphic files are named flag_TAGx.bmp, shield_TAGx.bmp and smallshield_TAGx.bmp. All three files must be present. To change back, use which = "".

command = { type = countryname value = "x" }
Changes the displayed name of the country receiving the event; x may be either the name itself or a reference to a localization string.




Commands for leaders or monarchs :

command = { type = wakemonarch which = x }
Activates monarch with id x (no longer dormant).

command = { type = sleepmonarch which = x }
Deactivates monarch with id x (makes dormant). Note: Does not work if the monarch is living.

command = { type = wakeleader which = x }
Activates leader with id x (no longer dormant). This will also work on leaders for other countries.

command = { type = sleepleader which = x }
Deactivates leader with id x (makes dormant). This will also work on leaders for other countries and for living leaders.

command = { type = conquistador which = x [value = y] }
Have a conquistador appear in province x with 500 men. If value is present, it specifies the maximum stats of the leader (up to value/2 for siege). If value is not present, the leader will be 3/2/2/0.

command = { type = explorer which = x [value = y] }
Have an explorer appear in province x with 1 ship. If value is present, it specifies the maximum stats of the leader. If value is not present, the leader will be 3/2/2.

command = { type = general [value = y] }
Creates a random general and assigns him to a random army. If value is present, it specifies the maximum stats of the leader (up to value/2 for siege). If value is not present, the leader will be 3/2/2/0.

command = { type = admiral [value = y] }
Creates a random admiral and assigns him to a random fleet. If value is present, it specifies the maximum stats of the leader. If value is not present, the leader will be 3/2/2.

command = { type = privateer which = x [value = y] }
Creates a random privateer in province x with 1 ship. If value is present, it specifies the maximum stats of the leader. If value is not present, the leader will be 3/2/2.


command = { type = ADM which = x value = y }
Modifies the ADM value of the regent with x for y months.

command = { type = MIL which = x value = y }
Modifies the MIL value of the regent with x for y months.

command = { type = DIP which = x value = y }
Modifies the DIP value of the regent with x for y months.



Commands for countries :

command = { type = country which = aaa }
Changes tag to aaa.

command = { type = technology which = techgroup_name }
Changes tech-group for a country.

command = { type = religion which = religion_name }
Changes the state religion. Has no other effects.

command = { type = add_countryculture which = culture_name }
Adds culture_name to the state cultures.

command = { type = remove_countryculture which = culture_name }
Removes culture_name from the state cultures.

command = { type = manpower value = x }
Adds x to manpower pool. (Does not raise the maximum manpower-use provincemanpower for that.) May also be negative.

command = { type = badboy value = x }
Changes the badboy value with x.

command = { type = capital which = x }
Moves capital to province x. Random values are permitted as targets.

command = { type = addcore_national which = x }
Makes x a national core province and removes it as claim or casusbelli province. which = -1 can be used to target a random owned province.

command = { type = addcore_claim which = x }
Makes x a claim core province and removes it as casusbelli province. which = -1 can be used to target a random owned province.

command = { type = addcore_casusbelli which = x }
Makes x a casusbelli core province. which = -1 can be used to target a random owned province.

command = { type = removecore_national which = x }
Removes x as national, claim or casusbelli core province.

command = { type = removecore_claim which = x }
Removes x as claim or casusbelli core province.

command = { type = removecore_casusbelli which = x }
Removes x as casusbelli core province.

command = { type = discover which = x }
Makes x a known province (-1 for a random province adjacent to an already known one).



Commands for domestic affairs :

command = { type = domestic which = aristocracy/ centralization/ innovative/ mercantilism/ land/ offensive/ quality/ serfdom value = x }
Modifies a domestic policy slider with value x.

command = { type = land value = x }
Invests x gold in land research. May also be negative.

command = { type = naval value = x }
Invests x gold in naval research. May also be negative.

command = { type = stability value = x }
Adds x to the stability. May also be negative.

command = { type = trade value = x }
Invests x gold in trade research. May also be negative.

command = { type = infra value = x }
Invests x gold in infra research. May also be negative.

command = { type = treasury value = x }
Adds x gold to the treasury. May also be negative.

command = { type = inflation value = x }
Changes inflation rate with x percents. May also be negative.

command = { type = loansize which = x }
Adjusts the size of the state loans.



Commands for provinces :

command = { type = population which = x value = y }
Modifies population level in province x with y.

command = { type = populationpercent which = x value = y }
Modifies the population level in province x with y %.

command = { type = provincetax which = x value = y }
Modifies the province tax in province x with y. Be aware that the province tax also affects the supply value of the province.

command = { type = provincemanpower which = x value = y }
Modifies the manpower in province x with y.

command = { type = cityname which = x value = "y" }
Changes the name of the city in province x.

command = { type = provincereligion which = x value = religion_name }
Changes the province religion in province x.

command = { type = provinceculture which = x value = culture_name }
Changes the province culture in province x.

command = { type = cityculture which = x value = culture_name }
Changes the city sprite in province x.

command = { type = alt_provincereligion which = x value = religion_name }
Changes the province religion in province x. This will work even if the province is not owned by the country receiving the event, and even if not owned by any country.

command = { type = goods which = x value = y }
Changes the goods produced in province x.

command = { type = terrain which = x value = y }
Changes the terrain in province x.

command = { type = conversion which = x }
Religion in province x changes to the state religion.

command = { type = heretic which = x }
Religion in province x changes from the state religion.

command = { type = hre which = x value = yes / no }
Adds or removes province x as a part of the Holy Roman Empire.

command = { type = cot which = x }
Adds a centre of trade to province x.

command = { type = removecot which = x }
Removes the CoT in province x, even if x is not a province of the country receiving the event.

command = { type = mine which = x value = y }
Adds y production to mine in province x. This work only if province x produces gold.

command = { type = natives which = x value = y }
Changes the aggression level of any natives in province x to value y (range 0 (none) to 9 (furious)).

command = { type = nativeattack which = x }
Provokes a native attack in province x.



Commands for revolts :

command = { type = revolt which = x [value = y] }
Starts a revolt in province x (optionally specifying rebel faction y). There is no guarantee that a fort in the province will fall into rebel hands. If no faction is specified, peasant rebels "REB" will be used. If the province is randomized and the rebel faction is specified, only provinces that are valid for that faction will be randomly chosen.

command = { type = province_revoltrisk which = x value = y }
Modifies 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 - i.e. revoltrisk is unaltered if the nation changes tags. Province revoltrisk can not be negative - no matter mow much you lower it, it will stop at zero.

command = { type = colonialrevolt which = x }
Starts a colonial revolt in province x (i.e. only in a colony outside Europe). The game will automatically choose the best colonial faction for the specified province; e.g. it might choose USR American Rebels if the colonial revolt happens to England in the late 18th century.

command = { type = religiousrevolt which = x }
Starts a religious revolt in province x (i.e. only in a province that does not have the state religion of the country receiving the event). The game will automatically choose the best religious faction for the specified province.

command = { type = revoltrisk which = x value = y }
Raises the nation's revoltrisk for x months with y percents. May also be negative. If which is omitted, default is 12 months.

command = { type = disbandrebels which = x }
Removes any rebels of any faction in province x.



Different buildings commands :

command = { type = gainbuilding which = x value = shipyard/ barrack/ bailiff/ courthouse/ cityrights }
Gains a building in province x.

command = { type = losebuilding which = x value = shipyard/ barrack/ bailiff/ courthouse }
Loses a building in province x.

command = { type = gainmanufactory which = x value = navalequipment/ luxury/ goods/ refinery/ weapons }
Gains a manufactory in province x.

command = { type = losemanufactory which = x }
Loses a manufactory in province x.

command = { type = fortress which = x value = y }
Changes fortress level in province by x with y. The fortress command is not limited by landtech.

command = { type = fortresslevel which = x value = y }
Sets the fortress in province x to level y.



Different units commands :

command = { type = diplomats value = x }
Adds x diplomats. May also be negative.

command = { type = colonists value = x }
Adds x colonists. May also be negative.

command = { type = merchants value = x }
Adds x merchants. May also be negative.

command = { type = missionaries value = x }
Adds x missionaries. May also be negative.

command = { type = INF which = x value = y }
Adds y infantry in province x.

command = { type = CAV which = x value = y }
Adds y cavalry in province x.

command = { type = ART which = x value = y }
Adds y artillery in province x.

command = { type = desertion which = x value = y }
Have y men desert in province x.

command = { type = warships which = x value = y }
Adds y warships in province x.

command = { type = galleys which = x value = y }
Adds y galleys in province x.

command = { type = transports which = x value = y }
Adds y cargo ships in province x.

command = { type = pirates which = x value = y }
Adds y pirate vessels in province x.

command = { type = privateers which = x }
Commission privateers in province x - same effect as "Commission Privateers" button



Other commands :

command = { type = ai which = "filename.ai" }
Changes the AI definition file used for the receiving country. The new AI file must be located in the AI folder with the other files - no path is needed in the event.

command = { type = ai_add which = [any AI preference list] value = [what to add]}
Adds an item to any AI preference list found in AI files, including continent, region, area, ignore, combat, and friendly.

command = { type = ai_rem which = [any AI preference list] value = [what to remove]}
Removes an item from any AI preference list, including continent, region, area, ignore, combat, and friendly.

command = { type = ai_set which = [AI value] value = [value]}
Sets any single AI preference found in AI files. Preferences inside a block can be addressed by dot separation, e.g. command = { type = ai_set which = garrison.strategic value = 1 }


command = { type = setflag which = [flag name] [value = x] }
Sets the specified user country flag (flag is set to 'yes'). The flag can be triggered upon with the flag trigger. If value is a positive integer, it is the number of months for which the flag will be set. The game decrements the value every month until it reaches 0, at which point the flag is considered cleared. If the flag has already been set, setting it again overrides any previous value.

command = { type = clrflag which = [flag name] }
Clears the specified user country flag (flag is set to 'no').

command = { type = flag which = x }
Sets game flag x to true.
0 = Tordesillas
1 = Reformation
2 = Calvin
3 = Council of Trent
4 = Predominance tolerance
5 = Edict of Tolerance
6 = More tolerance
7 = Industrial Revolution

command = { type = trigger which = xxxx }
Triggers event xxxx immediately if the event's triggering conditions are met.

command = { type = sleepevent which = xxxx }
Prevents event xxxx from happening.

command = { type = vp value = x }
Adjusts victory points with x

command = { type = custom_tooltip value = x }
Shows the text with localization key x in the tooltip
 
Last edited:
  • 2
Reactions:
Triggers
Triggers

Diplomatic conditions:

alliance
= { country = aaa country = bbb }
Checks if aaa and bbb are in the same military alliance.

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.

union = { country = aaa country = bbb }
Checks if country aaa is in a personal union with country bbb.


war = { country = aaa country = bbb }
Checks if country aaa is at war with country bbb.

truce = { country = aaa country = bbb }
Checks if there is currently a truce between country aaa and country bbb.

atwar = yes / no
Checks if the country is at war.

isvassal = yes / no
Checks if the country is a vassal of any country.

isoverlord = yes / no
Checks if the country has at least one vassal.

access = aaa
Checks if the country was granted military access by country aaa.

relation = { country = aaa data = x }
Is true if the receiving country has relation x or better with country aaa.



Conditions based on leaders or monarchs:

leader
= xxxx
Is true if leader with id xxxx is alive in any country.

monarch = xxxx
Is true if monarch with id xxxx is ruling the country receiving the event.



Conditions based on countries:

religion
= religion_name
Checks the state religion of the receiving country.

culture = culture_name
Checks if that culture is an accepted one for the receiving country.


technology = techgroup_name
Checks the tech group of the receiving country.

continent = continent_name
Checks on which continent the capital of the receiving country lies.

region = region_name
Checks in which region the capital of the receiving country lies.

area = area_name
Checks in which area the capital of the receiving country lies.

countrysize = x
Is true if the receiving country has x provinces or more. Cities and colonies are counted.

badboy = x
Is true if badboy is x or higher.

inflation = x
Is true if inflation is equal or above x (scale is 0 to 1).

treasury = x
Is true if treasury is equal or above x.

manpower = x
Is true if the country has at least x manpower.

diplomats = x
Is true if the country has x diplomats or more.

merchants = x
Is true if the country has x merchants or more.

colonists = x
Is true if the country has x colonists or more.

missionaries = x
Is true if the country has x missionaries or more.


elector = yes / no
Checks if the receiving country is an Elector of the HRE or not.

emperor = yes / no
Checks if the ruler of the receiving country is Holy Roman Emperor or not.

hre = yes / no
Checks if the receiving country's capital province is in the Holy Roman Empire or not.


neighbour = x
Is true if the receiving country is neighbour with country x.

tag = aaa
The event will only fire for this tag, mostly useful for province specific events.

no_dynastic = yes / no
Checks if the receiving country is able to form royal marriages (i.e. it is not in the game's no_dynastic list and its current monarch is not marked "dynastic = no").

knows = x
Is true if the receiving country has diplomatic relations with x (has discovered x's capital).

frontier = yes / no
Is true if the receiving country is a frontier country (i.e. borders an uncolonized province, same as the check for bonus colonists).

num_of_goods = { type = [goods] data = x }
Is true if the country owns at least x provinces that produce this type of goods.

num_of_buildings = { type = [building] data = x }
Is true if the country owns at least x provinces that contain this building.
Valid buildings are: bailiff, courthouse, cityrights, shipyard, barrack, fortress, luxury, weapons, naval, refinery, and goods.

num_of_leaders = { type = [leader] data = x }
Is true if the country has at least x active leaders of this type.
Valid leader types are: general, admiral, conquistador, explorer, privateer, and monarch.

armysize = x
Is true if the country has at least x land troops (counting 10 artillery as 1000 troops).

navysize = x
Is true if the country has at least x ships.

income_monthly = x
Is true if the country has at least x ducats of monthly income.

income_yearly = x
Is true if the country has at least x ducats of yearly income, including 12 months of monthly income plus yearly census tax.

is_production_leader = [goods]
Is true if the country is the world leader of producing this type of goods.



Conditions based on domestic affairs:

domestic
= { type = aristocracy/ centralization/ innovative/ mercantilism/ land/ offensive/ quality/ serfdom value = x }
Checks if a domestic policy slider is at value x or higher. (0 to 10)

land = x
Checks if the land tech level is at x or higher.

naval = x
Checks if the naval tech level is at x or higher.

stability = x
Checks if stability is at x or higher. (-3 to 3)

trade = x
Checks if the trade tech level is at x or higher.

infra = x
Checks if the infra tech level is at x or higher.



Conditions based on provinces:

capital
= x
Checks if province x is the capital of the receiving country.

core_national = { province = x data = aaa }
Is true if province x is a naional core province of country aaa (if data = -1 then it is for the country receiving the event).

core_claim = { province = x data = aaa }
Is true if province x is a claim core province of country aaa (if data = -1 then it is for the country receiving the event).

core_casusbelli = { province = x data = aaa }
Is true if province x is a casusbelli core province of country aaa (if data = -1 then it is for the country receiving the event).

provinceculture = { province = x data = y }
Is true if province x has culture y.

cityculture = { province = x data = y }
Is true if province x uses culture y for its city sprite.

provincereligion = { province = x data = y }
Is true if province x have religion y.

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)

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)

any_owned = continent/region/area
Is true if the receiving country owns any province in the given place.

all_owned = continent/region/area
Is true if the receiving country owns all provinces in the given place.

any_controlled = continent/region/area
Is true if the receiving country controls any province in the given place.

all_controlled = continent/region/area
Is true if the receiving country controls all provinces in the given place.


ownerchange = { province = x years = y months = m days = d }
Is true if province x has been owned by the current owner for at least y years, m months and d days (not all time fields have to be filled, one is enough).

controlchange = { province = x years = y months = m days = d }
Is true if province x has been controlled by the current controller for at least y years, m months and d days (not all time fields have to be filled, one is enough).

discovered = x
Is true if province x has been discovered by the country receiving the event.

any_discovered = continent/region/area
Is true if the receiving country has discovered any province in the given place.

all_discovered = continent/region/area
Is true if the receiving country has discovered all provinces in the given place.


cot = x
Is true if there is a centre of trade in province x.

fortresslevel = { province = x data = y }
Is true if province x contains a fortress of level y or higher.

provincepopulation = { province = x data = y }
Is true if province x has a population of y or higher.

tradingpost = x
Is true if province x is a trading post.

colony = x
Is true if province x has a population between 10 and 999, and is not a trading post.

colonialcity = x
Is true if province x has a population between 1000 and 4999.

city = x
Is true if province x has a population of at least 5000..

is_hre = x
Is true if province x is part of the Holy Roman Empire.




General conditions:

ai
= yes / no
Checks if the country receiving the event is AI controlled or not.

event = xxxx
Checks if event with id xxxx has happened.

decision = xxxx
Checks if the decision with id xxxx has been taken by this country, or if it is a unique decision, checks whether any country has taken it.

decision = { tag = x data = y }
Checks if the decision with id y has been taken by country x, regardless of whether it is a unique decision.


flag = flag name or integer value
Checks if the country flag with the specified name is set. If used with a number x, checks if global flag x has been set. See the list of global flags in the flag command.

exists = aaa
Is true if country aaa exists.

year = x
Checks if the year is x or later.

month = x
Checks if the month is x or later.

day = x
Checks if the day of the month is x or later.

fantasy = yes / no
Checks if this is a fantasia scenario ("desc = fantasy" in the scenario file).


random = x
The event will only have x% chance to fire every time the event is checked.

aaa = {
conditions​
}
Is true if the conditions are true for country aaa.

someof = {
number = x​
conditions​
}
Is true if at least x of the listed conditions are true.

emperor = {
conditions​
}
Is true if the conditions are true for the Holy Roman Emperor (if there is one).


overlord = {
conditions​
}
Is true if the conditions are true for this country's overlord or senior union partner (if there is one).


any_country = {
conditions​
}
Is true if the conditions are true for ANY country in the world.


any_neighbour = {
conditions​
}
Is true if the conditions are true for any neighboring country (if there is one).


any_vassal = {
conditions​
}
Is true if the conditions are true for any of this country's vassals (if there is at least one).



custom_tooltip = {
tooltip = x​
conditions​
}
Is true if the conditions are true for this country (same as an AND trigger), but when used in a decision, the game will use x as the tooltip and not generate tooltips for any trigger inside the block.
 
Last edited:
  • 1
Reactions:
Notes
Various notes

AI choosing actions:


Note that the number of actions is now only limited by the size of your screen.

Normal: works like it used to work in EU2. With x actions, the first one has 8500/(85+5(x-1)) % chance to be picked, every following action then gets 500/(85+5(x-1)) % chance.

Random: every action has the same chance to be picked. With x actions, there is 100/x % for each action.

Historical: regardless of the number of actions, the first one has 100 % chance to be picked, the following ones have 0 %.


AI chances: if every action has an ai_chance set, the above rules are ignored and each action has (100*ai_chance)/(sum of ai_chances) % to be picked.



Triggers for actions and commands:

Each action and each command may now have a specific trigger that will prevent the entire action or the single command to be displayed if it's not fulfilled.

Should look like this for actions (from DoK):
Code:
    action = {
        name = "Good"
        trigger = {
            vassal = { country = BEN country = SLO }
            SLO = { ai = yes }
        }
        command = { type = inherit which = SLO }
        command = { type = addcore_claim which = 248 } #Lucania
        command = { type = addcore_national which = 253 } #Salernum
    }
    action = {
        name = "Good"
        trigger = { #highly unlikely but you never know
            vassal = { country = BEN country = SLO }
            SLO = { ai = no }
        }
        command = { type = trigger which = 350002 } #SLO: Manso di Amalfi
    }
    action = {
        name = "Good"
        trigger = {
            NOT = { exists = SLO }
            OR = {
                owned = { province = 248 data = BEN } #Lucania
                owned = { province = 253 data = BEN } #Salernum
            }
        }
        command = { type = addcore_claim which = 248 } #Lucania
        command = { type = addcore_national which = 253 } #Salernum
        command = { type = trigger which = 142006 } #BEN: Amalfi's attempt in Salerno
    }


and like this for commands (from DoK too):
Code:
        command = {
            trigger = {
                alliance = { country = POI country = AUV }
            }
            type = addcore_claim which = 203 #Berry
        }



Persistent and random events:

random = yes
Random events are, well, random. They have been here ever since EUII was released so I do not think they need further description.
Further description: Both the trigger and all commands in all actions of a random event must be valid twice: when the event is scheduled and when the event is fired. Otherwise the game will choose a different random event.
An invalid command is one that can't be executed (e.g. a religiousrevolt for a country that has no provinces of another religion). For non-random events these commands are simply skipped, but for random events they prevent the event from firing. This is why you never see a random event with an empty action.
However, in 1.3 modders can designate individual commands in random events as "required = no". This allows the game to choose that random event even if that particular command is invalid.
Note that individual commands with failing triggers are NOT considered invalid commands for the purposes of this analysis - if that condition should stop a random event from firing, it should be included in the event's trigger.

weight = x
If used on a random event, specifies that this event should be added to the random event pool x times, making it that much more likely to happen.


persistent = yes
Persistent events on the other hand were added with 1.3, and allow the same event to be triggered again if the deathdate has not been reached and the trigger is still true.
The event ID is written to the history so you can still check whether it has been triggered. A persistent event can trigger for multiple countries on the same day, but not multiple times for the same country on the same day. If you have no date and offset, the event will trigger every day until the deathdate.




Pictures for events:

The style = x line that was deemed useless in EU2 may now be used like this:
Code:
    style = "picture_name"
it will display the 24 bit image called picture_name.bmp stored in the Gfx\Events folder.



Special values for provinces in commands:

-1 or random is used to target a random province
-2 or capital is used to target the capital province of the country receiving the event
-3 or last_random is used to target again the province that was randomly picked in the last command
-4 or random_distinct is used to not target again a province that was already randomly picked in the same action
-5 or random_not_capital is used to not target the capital province of the country receiving the event
-8 or random_distinct_not_capital is used to target a non-capital province that has not already been randomly picked in the same action



You can also target a random province in a specific continent/region/area by adding 1000 to its id number. Id's can be found in \Db\Map\geography.txt. So we'd have:

-1004 for a province in Europe
-1013 for a province in West Africa
-1151 for a province in Quebec

Please note that command adding troops will be ignored if no provinces are owned by the country receiving the event in the specified continent/region/area.

To target a specific geographic area with a special random value (e.g. random distinct in Africa), use a where clause rather than using this method. Note this is not always possible, e.g. -2 always targets the capital regardless of "where".


Special values for countries in commands:

-1 or random is used to target a random country
-3 or last_random is used to target again the country that was randomly picked in the last command
-4 or random_distinct is used to not target again a country that was already randomly picked in the same action
-6 or emperor is used to target the emperor
-7 or random_elector is used to target a random elector
-9 or random_distinct_elector is used to not target again an elector that was already randomly picked in the same action
-10 or overlord is used to target this country's overlord or senior union partner, if there is one
-11 or random_same_religion is used to target a random country with the same religion (counting catholic and counter-reformed catholic as the same religion)
-12 or random_same_religious_group is used to target a random country in the same religious group

To target a specific geographic area with a special random value (e.g. random distinct in Africa), use a where clause rather than using this method. Note this is not always possible, e.g. -6 always targets the emperor regardless of "where".


Note: for some diplomatic commands like "relation" and "dynastic", the game chooses from "nearby" countries if randomized. -11 and -12 are not subject to these constraints.


Special values for countries in triggers:
Some triggers are of the form "triggername = { country = aaa country = bbb }" or "triggername = { country = aaa data = x }" In these triggers, there are three special values that can be used instead of specifying a country tag:

-1 or this is used to target THIS country
-2 or overlord is used to target this country's overlord or the senior partner in a union, if either exists
-6 or emperor is used to target the emperor

If -2 or -6 fail to resolve (there is no overlord or no emperor), the trigger is considered failed.

The triggers neighbour and access also support -2 and -6 (but -1 makes no sense for them).

Note that province triggers of the form "triggername = { province = x data = y }" generally do NOT support these special values, even when the "data" field is a country tag, except as noted on the individual triggers. Many support -1 but none support -2 or -6. However, the same effect can be trivially achieved by putting the trigger inside an "overlord = { }" or "emperor = { }" block.



"where" targets

Randomized commands may include a where clause to fine-tune the targeting. Keep in mind that this may increase the chances that the command will be invalid.

Valid where types for provinces:
where = continent/region/area
where = coastal
where = neighbour (only for discover)

Valid where types for countries:
where = continent/region/area (checks the country's capital)
where = neighbour




Global events

An event marked "global = yes" will happen for the first country that meets the trigger conditions. But if the host player also meets the trigger conditions, the event will be redirected to the player (this used to be the behavior for events with no designated country or province). Otherwise, if the receiving country is known to the player, the player will receive a notification popup.

An event with no designated country or province will happen for all countries that meet the trigger conditions, but will not be shown in the log unless it is persistent.


Hidden events

An event marked "hidden = yes" which happens to any country (either AI or a network player) will not be shown in the player's log.
This overrides any considerations mentioned in the section above on global events.



Offset mechanics and trigger checking:

The offset is only used for the first check happening between startdate and startdate + offset. After that the event is re-checked between offset/2 and offset days after the last check, until the deathdate is reached.

It might also be useful, for long and complex triggers, to mention that the trigger check algorithm is depth-first from the top.


Spelling:

The game treats "neighbor" and "neighbour" as identical tokens. Same for "is_neighbor" and "is_neighbour", and "any_neighbor" and "any_neighbour".
 
Last edited:
  • 2
Reactions:
Cheat codes
Cheat codes

The old EU2 FAQ is still up to date, although some events IDs may have changed, but new cheats were added in FTG. Here is the list:


showID: displays the province ID the mouse cursor is on and the continent/region/area it belongs to

showXY: displays the coordinates of the mouse cursor


peterthethird: AI will accept all proposals and never break them

torquemada: conversion will always be successful

champlain: colonization will always be successful

fugger: sets inflation to 0

exploration <tag>: shows which provinces are known to a country

climate: color-codes the map by province climates

triggercheck <event id>: color-codes the map by which countries currently satisfy the given event's triggers
triggercheck <event id> <tag>: shows a text breakdown of the given event's triggers as applied to the given country (using the same format as decision trigger mouseover text)

aitarget <tag>: shows which geographical areas are currently being targeted by the given country's AI file

aiattack <tag>: shows which countries are in the given country's AI combat list



drake, gustavus, cromwell and polo cheats now require an amount as parameter

richelieu causes a CTD when trying to split an army that belongs to another country


ai <tag>: more information available, ai_info.txt transfered to Logs folder

info <tag>: more information available
 
Last edited:
  • 2
Reactions: