• 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.
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 = 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.

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 }
Have a conquistador appear in province x.

command = { type = explorer which = x }
Have an explorer appear in province x.

command = { type = ADM which = x value = y }
Modifies the ADM value of the regent with x for y months. Note: When changed by -1 the effect of this command is not shown in the event effect text or mouseover.

command = { type = MIL which = x value = y }
Modifies the MIL value of the regent with x for y months. Note: When changed by -1 the effect of this command is not shown in the event effect text or mouseover.

command = { type = DIP which = x value = y }
Modifies the DIP value of the regent with x for y months. Note: When changed by -1 the effect of this command is not shown in the event effect text or mouseover.



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.

command = { type = addcore_national which = x }
Makes x a national core province and removes it as claim or casusbelli province.

command = { type = addcore_claim which = x }
Makes x a claim core province and removes it as casusbelli province.

command = { type = addcore_casusbelli which = x }
Makes x a casusbelli core 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 }
Starts a revolt in province x. There is no guarantee that a fort in the province will fall into rebel hands.

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).

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).

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.



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 = setflag which = [flag name] }
Sets the specified user country flag (flag is set to 'yes'). The flag can be triggered upon with the flag trigger.

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

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
 
Last edited:
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 personnal 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.

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.



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)

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.

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..



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.

flag = flag name
Checks if the country flag with the specified name is set.

exists = aaa
Is true if country aaa exists.

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

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.

random = x
The event will only have x% chance to fire every time the event is checked.
 
Last edited:
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.

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


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.



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



Offset mechanics and trigger checking:

Many theories have been elaborated in the past ten years. Thanks to MichaelM, it seems that we now know the truth, hopefully he will correct me if I am (again) wrong: the offset is only used for the first check happening between startdate and startdate + offset, after that it is not taken into account at all and the event is re-checked between 16 and 76 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
 
Last edited:
Cheat codes

The old EU2 FAQ is still up to date, although I'm unsure about the events IDs, 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


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:
This deserves to be stickied. Nice work, Third Angel!
 
random = x
The event will only have x% chance to fire every time the event is checked.

"Every time the event is checked" means every time that it reaches offset, correct?

So if an event can happen from Jan. 1 1419 to Jan. 8 1419 with an offset of 1 day and a trigger of random = 50, it has a 50% chance to happen every single day, or 1-(0.5)^8 chance of happening at all?
 
"Every time the event is checked" means every time that it reaches offset, correct?

So if an event can happen from Jan. 1 1419 to Jan. 8 1419 with an offset of 1 day and a trigger of random = 50, it has a 50% chance to happen every single day, or 1-(0.5)^8 chance of happening at all?
How the offset works has always been a mysterious matter, I'm still waiting for answers myself.

Now about the random trigger, the way I understand it, it is mostly useful to use in combination with other triggers like this for instance:
Code:
trigger = {
	OR = {
		AND = {
			relation = { country = aaa data = 100 }
			random = 20
		}
		AND = {
			relation = { country = aaa data = 125 }
			random = 40
		}
		AND = {
			relation = { country = aaa data = 150 }
			random = 60
		}
		AND = {
			relation = { country = aaa data = 175 }
			random = 80
		}
		relation = { country = aaa data = 200 }
	}
}
Here, the better the relation with country aaa, the more likely the event is to fire.


it didnt work if the leader was already active - it does now
Yes, which is why the note has been put in red:

command = { type = sleepleader which = x }
Deactivates (makes dormant) leader with id x. This will also work on leaders for other countries. Note: Does not work if the leader is living.
 
So that people know it has been changed in FTG and not just an oversight from me when writing the list. I have edited my first post to make it clearer, hopefully.
 
Last edited:
i presume then with command below


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

the following is correct
command = { type = populationpercent which = 370 value = -10
loses 10 % of current population in Veneto

and

command = { type = populationpercent which = 370 value = -100
loses 100% of current population

if so , then this command is very dangerous and should have a limited number for value
 
The populationpercent command, like the old population command, cannot reduce a city below _PROV_COLONIAL_CITY_POP_ (1000) inhabitants or a colony below _PROV_MIN_COLONY_POP_ (10) inhabitants. It is not possible to destroy a city completely.
 
Could you clarify a few points, which seem to be in the game files?

Can the command "gainmanufactory" have a value of "-1"?

Do the following commands not exist? cash, addcore, removecore, infantry, artillery, cavalry, monarch

What values can tags take, besides XXX. Like, could they be -1, -2, etc?
 
Last edited:
Could you clarify a few points, which seem to be in the game files?
...
Do the following triggers not exist? cash, addcore, removecore, infantry, artillery, cavalry, monarch...

Cash? Woudln´t that be the
treasury = x
trigger?

And "addcore" is the command to add a core since EU2 and not trigger. The trigger was core = X and has now been split into 3 triggers when I read that list right.