Event Triggers
From VickyWiki
Trigger operators and commands are combined in an Event trigger in order to determine when an event should take place.
Trigger Operators
Trigger operators are used to create logical constructs in order to use multiple Trigger Conditions with one trigger command.
AND Example
trigger = {
event = 1500
control = { province = 1697 data = AUS } # Mexico City
}
The trigger above will only be valid if both conditions are met. In other words, if both the event with the id of 1500 as occurred and Austria controls the province which is numbered 1697, then the trigger will be satisfied. If you want the event to trigger if any one of the conditions is met then an OR operator is required.
OR Example
trigger = {
OR = {
war = { country = GER country = ENG }
war = { country = GER country = FRA }
}
}
By using an OR operator the event will trigger if any one of the conditions which have been given are met. In the example above, Germany must be at war with either England or France in order for the event to be triggered.
The third operator, NOT, is used to check if the condition has not been met.
NOT Example
trigger = {
NOT = {
war = { country = ENG country = USA }
war = { country = ENG country = CSA }
}
}
What is important to notice here is that the trigger shown above is only valid if all of the listed conditions are false (untrue). In this example the trigger is valid if Great Britain is at peace with both the USA and the CSA.
Trigger Conditions
ai
ai = [yes/no]
Checks if the receiving country is AI controlled or not. Valid conditions include either yes or no. If the country which the trigger is testing is AI controlled, an ai = yes trigger will evaluate as true. If the country is human controlled, then an ai = yes trigger will evaluate as false.
alliance
alliance = { country = [tag 1] country = [tag 2] }
This trigger condition tests whether two countries which are active in the current scenario are allied. If the country with [tag 1] is allied to the country with [tag 2] then the trigger will evaluate as true.
atwar
atwar = [yes/no/country tag]
This trigger condition tests to determine if the specific country which is receiving the event, or a different given country, is currently involved in a war. If the country which is being tested is currently involved in any wars, then the trigger will evaluate as false.
campaign
campaign = [yes/no/country tag]
Is true if there is an ongoing political campaign in the receiving, or a specified, country.
civilized
civilized = [yes/no/country tag]
Is true if the receiving, or a specified, country is civilized or not.
claim_buildings
claim_buildings = [prov id]
Is true if there are claim buildings in the same area (state) as the province.
colonialnation
colonialnation = [yes/no/country tag]
Is true if the receiving, or a specified, country has claim buildings or colonies anywhere in the world.
constitution
constitution = { country = [tag] type = [democracy/ constitutional_monarchy/ monarchy/ presidential_dictatorship/ proletarian_dictatorship] }
Is true if the country has the specified constitution. No country field means 'this country'.
control
control = { province = [province id] data = [country tag/-1] }
Is true if the province specified is controled by the country specified. Data = -1 or no data field means 'this country'.
culture
culture = { country = [tag] type = [culture type ] }
Is true if the specified country...
desperation
desperation = { country = [tag] data = X }
Is true if X% or more of national provinces are occupied (controlled) by foreigners. See also the occupied trigger.
dominion
dominion = { country = [tag 1] country = [tag 2] }
Is true if the country with tag 1 is a dominion of the country with tag 2.
event
event = [event id]
Is true if the specified event has happened.
exists
exists = [country tag]
Is true if the specified country exists.
flag
flag = { name = [flag name] value = [flag value] }
Is true if the specified global flag exists and is set to greater than or equal to the defined flag value. The flag value may be an integer value or yes/no. See below for more info on flags.
garrison
garrison = { country = [country tag] province = [province id] size = x }
Is true if the country specified has a garrison of x divisions or more in the province specified.
government
government = { country = [tag] type = [ruling party ideology] }
Is true if the country has a government with the defined ruling party ideology. No country field means 'this country'.
great_war
great_war = [yes/no]
Is true if there is a Great War going on.
greater_prestige
greater_prestige = { country = tag1 country = tag2 }
Is true if the country with tag 1 has a greater prestige than the country with tag 2.
hi_tax_lo
hi_tax_lo = [yes/no]
Is true if high strata tax is higher than the low strata tax.
invention
invention = [invention id]
Is true if the specified invention is known.
is_GP
is_GP = [yes/no/country tag]
Is true if the receiving, or the specified, country is a Great Power.
is_dominion
is_dominion = [country tag]
Is true if the specified country is a dominion.
is_satellite
is_satellite = [country tag]
Is true if the specified country is a satellite.
leader
leader = [leader id]
Is true if the commander specified is active.
local_flag
local_flag = { name = [flag name] value = [flag value] }
Is true if the specified flag exists for the current country and is greater than or equal to the defined flag value. The flag value may be an integer value or yes/no. See below for more info on flags.
minorities
minorities = [yes/no]
Checks if there are cultural minorities in the country.
occupied
occupied = { country = [tag] data = X }
Is true if X% or more of owned provinces are occupied (controlled) by foreigners. See also the desperation trigger.
owned
owned = { province = [province id] data = [country tag/-1] }
Is true if the province specified is owned by the country specified. Data = -1 or no data field means 'this country'.
peace_treaty
peace_treaty = { country = [tag] country [tag] }
Is true if the two countries have signed a peace treaty within the past five years and have not subsequently gone to war again.
pending_revolution
pending_revolution = [yes/no]
Is true if militancy is high enough for a revolution to occur.
police_budget
police_budget = x
Is true if the crime fighting budget is at X% or more of your total budget.
policy
policy = { country = [tag] type = [policy type] }
Is true if the specified country has the given government policy as part of its ruling government issues, such as interventionism, laissez_faire, jingoism, etc.
pop_majority
pop_majority = [ideology]
Is true if if the majority of POPs are of a certain ideology.
prestige
prestige = X
Is true if the receiving country's prestige is X or higher.
random
random = x
Gives a random chance (in %) for the event to trigger. Note that the 'random = yes/no' declaration is set to no when using this. See also section 3.3 Random below.
reform
reform = { type = [reform type] level = [appropriate word] }
Is true if the reform type is at the specified level...
relation
relation = { country = [country tag] data = x }
Is true if the relations to the specified country is x or better.
religion
religion = { country = [country tag] type = [religion type] }
Is true if the specified country has the specified state religion.
revanchism
revanchism = { country = [country tag] data = X }
Is true if X% or more of your national provinces are owned by foreigners.
ruling_party
ruling_party = [party id]
Is true if the country is ruled by the specified political party.
satellite
satellite = { country = [tag 1] country = [tag 2] }
Is true if the the country with tag 1 is a satellite of the country with tag 2.
slavery
slavery = [yes/no]
Is true if there are slaves in the country.
stronger_army
stronger_army = { country = [tag 1] country = [tag 1] }
Is true if the the country with tag 1 has a more powerful army than the country with tag 2.
stronger_navy
stronger_navy = { country = [tag 1] country = [tag 1] }
Is true if the the country with tag 1 has a more powerful navy than the country with tag 2.
technology
technology = [tech id]
Is true if the specified tech is known.
uncolonized
uncolonized = [province id]
Is true if the specified province has no owner.
war
war = { country = [tag 1] country = [tag 2] }
Is true if country with tag 1 and country with tag 2 are at war.
war_exhaustion
war_exhaustion = { country = [country tag] value = [1-10] }
Is true if war exhaustion is equal to or greater than the value specified (1 is 10%, 2 is 20% etc).
won_war
won_war = { country = [tag 1] country = [tag 2] }
Is true if country with tag 1 has won a war agains country with tag 2.
year
year = [date]
True if game date is at or after the specified year.

