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

Klein001

First Lieutenant
13 Badges
Nov 6, 2008
217
1
  • Crusader Kings II
  • Deus Vult
  • Europa Universalis III Complete
  • Hearts of Iron III
  • Majesty 2
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
First of all, I have no idea if posting this is wrong, if it is, please let me know, because otherwise i just don't get it(i am somewhat dense that way)

Now then, I am going to attempt to post upon here a list of triggers, scope changes, and effects as well as how to use them, because in all honesty, i can't really tell if the listed triggers in the sticky can only be used as triggers, even if it is useless to post this here, I at least woukd like to have a reference which may be cross checked by others who know what they are doing.

Note: if anything is doubly listed in one area in which it applies as well as another area in which it applies, well, it applies in both areas.

Note: I attribute the general format to whoever posted [THREAD=361849]this[/THREAD]

Note: Anything with an NS by it is something i'm not sure about, if you have information, or can confirm my guesses, then please post in this thread, i'd love to hear from you.

Note: An x in the syntax followed by a # expects a number for it to check, ie if you tell it to check for a double, like 7.4, it will check for 7. Similarly, an x followed by a % expects a percent, 1.0 being 100%, while 0.1 is 10%. a ? denotes the fact that I don't know what kind of value it wants.

TRIGGERS

(taken largely from the thread, "Modding Manual")

"any scope"
Year
Tells the machine what year the event is supposed to happen
Syntax: year = <put the number of the year here>

Month
Tells the machine that the event is supposed to happen in this respective month. My guess is that since dates in the game are written as YYY.MM.DD/YYY.DD.MM (not sure which), the month is probably a number.
Syntax: month = <put number of month here>
is true if month number matches the value

Difficulty NS
Tells the machine that the event is only supposed to happen when the difficulty rating is this. Considering the fact that this isn't a boolean, it is most likely a number.
Syntax: difficulty = <difficulty number or string("")>
is true if difficulty matches query value *the stuff in <>, but without the <>

check_variable
tells the machine to check the referenced variable name. According to the EU3 wiki, the very same trigger has a which field and a value field. So, assuming that the very workings of EU:R are built upon EU3, the syntax is as follows:
Syntax: check_variable = { which = <variable name> value = <value of variable> }
Is true if variable exists and is atleast the value entered (>=) <-*not a smiley

The current date is December 21, 2009, at least where I am. That will be all for today.
December 21, 2009. Boredom is wierd. Have nothing to do except do more of this.

Continued:

Exists
Tells the machine to check to see if the specified country exists. Returns true if it does.
Syntax: exists = <country tag>

is_religion_enabled
tells the machine to check to see if the religion exists. according to johan's 'modding manual' the value it checks for is apparently a boolean, meaning that if you use this, it is best used with another trigger which specifies the religion.
syntax: is_religion_enabled = yes/no
returns true if religion is enabled

Switches:

<tag>
Fairly self explanatory, especially in the context of the syntax, whatever country which is specified by the tag is now the focus of the scope, and anything in the brackets is checked for that country to see if it is true.
Syntax: <tag> = {<put trigger code here>}
returns true if the triggers in the brackets are true

from NS
Not enitrely sure what this is used for, but it's EU3 counterpart is listed as code to tell the machine to switch focus from province to the country which owns that province(I think).
Syntax: from = {triggers}

this NS
Again, not entirely sure about this one either, but, from the ability to assign certain units to 'this', I assume that 'this' applies to the owner.
Syntax: this = {triggers}

<provincenum>
Tells the machine to check the specified province to see if the specified triggers are true, ulike the previous two, i am fairly sure that that is hiw this switch works
Syntax: <provincenum> = {triggers}

Note: any trigger that has < and/or > does not need them, in fact, you actually have to remove them. Also, I hope you will have the intelligence to assume (correctly) that anything with {} that has 'triggers' inside of it won't work! you actually have to type them whole. No offense, anyone, but i've seen people do some stupid stuff in my relatively short time.

Thats all for now!
Hi folks! Another day, another few tens of entries to go, here are today's:

'Inside country'

<trade_goods_name> NS
Looking at the syntax, my only guess, since the trigger 'trade_goods' is for provinces, is that it tells the machine to check and see if the country has the specified number of the specified trade good.
Syntax: <name of trade good, with underscores instead of spaces> = x ?
Unknown

<tech_name> NS, but have some idea
looking at the syntax (man it's hard to type with one hand:wacko:) for the events in the 'techevents.txt' file,the usage of this trigger suggests that the syntax is this:
Syntax: land_tech/naval_tech/civic_tech, etc. = <set the tech level required>
Returns true if the tech level in that area is at least the specified number, for example if you only want the event to trigger if the nation has a land tech level of 20, then the syntax is
Code:
land_tech = 20
of course you need to put in the respective frame work.

<building_name> NS
I know nothing about this, so if you have any information, please let me know


treasury
Tells the machine to check the value of the treasury of the nation
Syntax: treasury = <amount of money in the treasury>
Returns true if the nation has at least that amount of money in the treasury

war
Tells the machine to check if the nation is in a war
Syntax: war = yes/no
returns true if the nation the machine is checking has a war, and terminates or executes depending on the condition specified (i.e. war = yes or no), and the number of other triggers

blockade NS
Tells the machine to check if there is a blockade
Syntax: blockade = <number of province, perhaps?>
don't know much about this one fellas, help please?

war_exhaustion NS
Tells the machine to check if the country has a certain war exhaustion level.
Syntax: war_exhaustion = <war exhaustion level here, unsure if percentage>
Returns true if the war exhaustion is at least at the specified level

I'm going to take a break for now, but before I go, I would like to announce that from now on, I will always update this at least once a week, even if only to say that I'm busy at the moment.
I'm back. Time for some more.

relation
tells the machine to check to see if the country it is evaluating for the event has a certain relation with the specified country.
Syntax: relation = { who = <other country tag> value = <relational value> }
returns true if the relation between the country recieving the event and the specified country is >= the value field.

war_with
tells the machine to check if this nation is in a war with the specified nation.
Syntax: war_with = <tag of other country>
returns true if this nation is in a war with the specified other nation

num_of_religion NS
I imagine, since its EU3 counterpart listed on the EU3 wiki has a religion field and a value field that this trigger is most likely for the same implied function(ie implied through syntax)
Syntax: num_of_religion = { religion = <religion type> value = x # }
Returns true if the specified religion has x or more followers. If you can confirm this, please do.

has_civil_war
seeing the reference in Johan's 'Modding Manual'(not sure if ['] quotes are used or ["] quotes are used), tells me that the value it returns is a boolean. It most likely tells the machine to check if this nation has a civil war going on.
Syntax: has_civil_war = yes/no (yes or no, one or the other)
returns true if this nation has a civil war.

is_civil_war_faction
from what I've seen of it's usage, tells the machine to check if this nation is the civil war faction.
Syntax: is_civil_war_faction = yes/no (yes or no)
returns true if this nation is the civil war faction.(eg for the romans, I imagine it would have to be Roman Rebels, the nation with R02 tag)

manpower
tells the machine to check if this nation has at least x or greater manpower
Syntax: manpower = <amount of manpower>
returns true if this nation has at least the specified amount of manpower.

max_manpower
tells the machine to check if this nation has a cap on its manpower of at least the specified amount
Syntax: max_manpower = <nation's maximum amount of manpower>
returns true if this nation has a maximum manpower limit of at least this much

manpower_percentage NS
I am entirely unsure of it's use
Syntax: manpower_percentage = x ?


land_maintenance
tells the machine to check if this nation's land maintenance costs are at least the specified amount
Syntax: land_maintenance = <amount that nation pays in land maintenance>
returns true if the land maintenance costs are at least that much

naval_maintenance
literally the exact same as land maintenance, except it is the naval version
Syntax: naval_maintenance = <amount nation pays in naval maintenance>
returns true under same conditions as land version

badboy
According to EU3 wiki, this kind of trigger tells the machine to check and see if the nation has a reputation level of x or higher.
Syntax: badboy = x #
is true if nation's reputation is x or higher

num_of_revolts NS
tells the machine to check how many revolts this nation has had.
Syntax: num_of_revolts = x #
I guess it returns true if this nation has had at least this number of revolts. entire entry is pure conjecture.

another break. The list appears to be turning out nicely.
break over. Back to work.

revolt_percentage NS
not sure about this whatsoever
Syntax: revolt_percentage = x

num_of_cities
I have seen how this is used, and it tells the machine to check if this nation has at least the specified number of cities
Syntax: num_of_cities = <number of cities to check for>
returns true if the nation has at least the specified number of cities

revolt_risk NS
tells the machine to check the revolt risk either of or in the nation. unsure
Syntax: revolt_risk = x

pure_revolt_risk
I really don't know about this one.

num_of_ports
checks for exactly what the name implys.
Syntax: num_of_ports = x #

num_of_allies
same as ports
Syntax: num_of_allies = x #

num_of_vassals
I'm not sure how you even get vassals in the first place, but I guess it should be the same as the preceding 2.
Syntax: num_of_vassals = x #

I'll stop for now, might be back tomorrow.

Dateline:
Dec. 21, 2009: started reference.

Dec. 22, 2009: Continued reference, went regular(somewhat)

Evening of Dec. 22, 2009: Was a bad person. Had Disciplinary action.

Dec. 23, 2009: Brooded over poor choices I made which led to disciplinary action. Knew since night before it was my fault. Would like to commend moderators for taking what I believed was what they thought to be proper action. I certainly had that coming.:( Note: I'm not trying to sound sarcastic or anything, I really do mean it. I'm not trying to break rule #2 or #3 intentionally. I really do appreciate the value of having a moderator to keep things under control. The way I see it, without them, it would in my mind be far more difficult for administrators to keep control. I used to play an old mmorpg(massive multiplayer online role playing game), the company which ran it kept player moderators around for the purpose of helping to keep an eye on things. Without such said moderators in the forum provided on the same site, a lot more players would have been able to break the rules and fewer would have been punished. So to that end, I do realize that it is important to have someone like a moderator on a forum.

Dec. 24, 2009: Decided to carry out decision of previous evening to move on, yet prevent such mistakes in the future.
 
Last edited:
A couple of months ago I made a list here but haven't really organised it, nor have I really tested everything. I know a lot of the code in the list either doesn't work at all or was intended for EU3 so has no bearing on EUR, but it gives you an idea of what code works where. I also have a few question marks next to code that we all know works, but I'm too damn lazy to go back and fix it all :p
 
after looking over it, I noticed a great deal of things which i would find useful in an event, but the three that i really want to know about from that list are: 'regiment_reinforcement_speed', create_leader, and create unit. What I would like to know about them, if you are reading this and are not either cheexsta or myself, is 1. wheter or not they work 2. how are they used (if they do work).
 
I'm sure regiment_reinforcement_speed works, I think it might even be in a vanilla file somewhere (I'm away from home now so can't check). The other two I haven't tested, but I'm guessing they're probably left over from EU3.
 
then, with that, I can probably create a merc event, something to save me if I happen to be in dire straits at the moment, but that shall be saved for some other time.
 
You don't need the create_unit code, anyway. Just look at the vanilla file flavor.txt for an existing event that gives free units to Epirus. If you want mercenaries, just add merc_ to the front of the unit's name.

Tested and works :)
 
if the create_unit code is what i think it is, then i will need it to give the band a specialized name, like, if this had been ck, 'the knights of essex', or something
 
Last edited:
btw, what is the syntax for the create_unit code anyway?(assuming it works)
 
I've searched the vanilla EU3 files, as well as some major mods like MMP and WWM, none of them use the code. It doesn't appear in the EU3 modding documentation, either.
 
oh. well ok then.
 
It's Christmas morning, everyone's showering and getting ready for lunch. I'm actually organised enough to be ready for once, so I have time to get into this :D I'll add in yellow some additions you may need to make for clarity.

Year
Tells the machine what year the event is supposed to happen
Syntax: year = <put the number of the year here>
Is true if current year matches or exceeds this value.
Scope: any scope


Month
Tells the machine that the event is supposed to happen in this respective month. My guess is that since dates in the game are written as YYY.MM.DD/YYY.DD.MM (not sure which), the month is probably a number.
Syntax: month = <put number of month here>
Is true if month number matches or exceeds the value.
Scope: any scope
Note: if you want to limit an event to one specific month, you'll need to use a combination of month = x and NOT = { month = y }. For example, to restrict an event to March only, the coding would be:

Code:
month = 2
NOT = { month = 3 }

Difficulty NS
Tells the machine that the event is only supposed to happen when the difficulty rating is this. Considering the fact that this isn't a boolean, it is most likely a number.
Syntax: difficulty = <difficulty number or string("")>
is true if difficulty matches query value *the stuff in <>, but without the <>

check_variable
tells the machine to check the referenced variable name. According to the EU3 wiki, the very same trigger has a which field and a value field. So, assuming that the very workings of EU:R are built upon EU3, the syntax is as follows:
Syntax: check_variable = { which = <variable name> value = <value of variable> }
Is true if variable exists and is atleast the value entered (>=) <-*not a smiley

The current date is December 21, 2009, at least where I am. That will be all for today.
December 21, 2009. Boredom is wierd. Have nothing to do except do more of this.

Continued:

Exists
Tells the machine to check to see if the specified country exists. Returns true if it does.
Syntax: exists = <country tag>

is_religion_enabled
tells the machine to check to see if the religion exists. according to johan's 'modding manual' the value it checks for is apparently a boolean, meaning that if you use this, it is best used with another trigger which specifies the religion.
syntax: is_religion_enabled = yes/no
returns true if religion is enabled

Switches:

<tag>
Fairly self explanatory, especially in the context of the syntax, whatever country which is specified by the tag is now the focus of the scope, and anything in the brackets is checked for that country to see if it is true.
Syntax: <tag> = {<put trigger code here>}
returns true if the triggers in the brackets are true

from NS
Not enitrely sure what this is used for, but it's EU3 counterpart is listed as code to tell the machine to switch focus from province to the country which owns that province(I think).
Syntax: from = {triggers}
'FROM' confuses me a bit sometimes. I do know that you can use it to refer to a country which triggered an event. For example, if ROM receives an event which triggers an event in MAG, using a 'FROM' argument in MAG's event will refer to ROM.

this NS
Again, not entirely sure about this one either, but, from the ability to assign certain units to 'this', I assume that 'this' applies to the owner.
Syntax: this = {triggers}
'THIS' actually refers to whomever receives the event. If it's a country event, 'THIS' refers to the country that receives the event (and 'THIS' can therefore be used in place of a countrytag). If it's a province event, 'THIS' refers to the province. If it's a character event, 'THIS' refers to the character.

For example, in a country_event:
Code:
random_neighbor_country = { war_with = THIS }
Would make a random neighbour country declare war on the country which received the event.


<provincenum>
Tells the machine to check the specified province to see if the specified triggers are true, ulike the previous two, i am fairly sure that that is hiw this switch works
Syntax: <provincenum> = {triggers}
Scope: any scope.
Note: this can also be used as an effect for a specific province.


Note: any trigger that has < and/or > does not need them, in fact, you actually have to remove them. Also, I hope you will have the intelligence to assume (correctly) that anything with {} that has 'triggers' inside of it won't work! you actually have to type them whole. No offense, anyone, but i've seen people do some stupid stuff in my relatively short time.

Thats all for now!
Hi folks! Another day, another few tens of entries to go, here are today's:

'Inside country'

<trade_goods_name> NS
Looking at the syntax, my only guess, since the trigger 'trade_goods' is for provinces, is that it tells the machine to check and see if the country has the specified number of the specified trade good.
Syntax: <name of trade good, with underscores instead of spaces> = x ?
Unknown

<tech_name> NS, but have some idea
looking at the syntax (man it's hard to type with one hand:wacko:) for the events in the 'techevents.txt' file,the usage of this trigger suggests that the syntax is this:
Syntax: land_tech/naval_tech/civic_tech, etc. = <set the tech level required>
Returns true if the tech level in that area is at least the specified number, for example if you only want the event to trigger if the nation has a land tech level of 20, then the syntax is
Code:
land_tech = 20
of course you need to put in the respective frame work.

<building_name> NS
I know nothing about this, so if you have any information, please let me know


treasury
Tells the machine to check the value of the treasury of the nation
Syntax: treasury = <amount of money in the treasury>
Returns true if the nation has at least that amount of money in the treasury
Scope: country.
Note: can also be used as an effect to add/remove the specified amount from the treasury.


war
Tells the machine to check if the nation is in a war
Syntax: war = yes/no
returns true if the nation the machine is checking has a war, and terminates or executes depending on the condition specified (i.e. war = yes or no), and the number of other triggers
Scope: country.

blockade NS
Tells the machine to check if there is a blockade
Syntax: blockade = <number of province, perhaps?>
don't know much about this one fellas, help please?
Scope: country.
Actually checks for a percentage of ports blockaded. blockade = 0.5 would return true if half of your ports are blockaded, for example.

war_exhaustion NS
Tells the machine to check if the country has a certain war exhaustion level.
Syntax: war_exhaustion = <war exhaustion level here, unsure if percentage>
Returns true if the war exhaustion is at least at the specified level
Scope: country.
Is true when country has that war exhaustion number. It is not a percentage.


I'm going to take a break for now, but before I go, I would like to announce that from now on, I will always update this at least once a week, even if only to say that I'm busy at the moment.
I'm back. Time for some more.

relation
tells the machine to check to see if the country it is evaluating for the event has a certain relation with the specified country.
Syntax: relation = { who = <other country tag> value = <relational value> }
returns true if the relation between the country recieving the event and the specified country is >= the value field.
Scope: country.

war_with
tells the machine to check if this nation is in a war with the specified nation.
Syntax: war_with = <tag of other country>
returns true if this nation is in a war with the specified other nation
Scope: country.
Note: can also be used as an effect to declare war on the specified countrytag.

num_of_religion NS
I imagine, since its EU3 counterpart listed on the EU3 wiki has a religion field and a value field that this trigger is most likely for the same implied function(ie implied through syntax)
Syntax: num_of_religion = { religion = <religion type> value = x # }
Returns true if the specified religion has x or more followers. If you can confirm this, please do.
Not sure.

has_civil_war
seeing the reference in Johan's 'Modding Manual'(not sure if ['] quotes are used or ["] quotes are used), tells me that the value it returns is a boolean. It most likely tells the machine to check if this nation has a civil war going on.
Syntax: has_civil_war = yes/no (yes or no, one or the other)
returns true if this nation has a civil war.
Scope: country.

is_civil_war_faction
from what I've seen of it's usage, tells the machine to check if this nation is the civil war faction.
Syntax: is_civil_war_faction = yes/no (yes or no)
returns true if this nation is the civil war faction.(eg for the romans, I imagine it would have to be Roman Rebels, the nation with R02 tag)
Scope: country.

manpower
tells the machine to check if this nation has at least x or greater manpower
Syntax: manpower = <amount of manpower>
returns true if this nation has at least the specified amount of manpower.
Scope: country.

max_manpower
tells the machine to check if this nation has a cap on its manpower of at least the specified amount
Syntax: max_manpower = <nation's maximum amount of manpower>
returns true if this nation has a maximum manpower limit of at least this much
Scope: country.

manpower_percentage NS
I am entirely unsure of it's use
Syntax: manpower_percentage = x ?
Scope: country.
This one checks to see whether the country has a certain percentage of its max manpower. So, if the trigger was manpower_percentage = 0.5, it would return true if the country has at least 50% of its maximum manpower. See missions\misc.txt for a vanilla example.



land_maintenance
tells the machine to check if this nation's land maintenance costs are at least the specified amount
Syntax: land_maintenance = <amount that nation pays in land maintenance>
returns true if the land maintenance costs are at least that much
Scope: country.
This and naval_maintenance is actually done as a percentage, rather than a cost. If the trigger is land_maintenance = 0.5, it returns true if the land maintenance slider is at least half max.

naval_maintenance
literally the exact same as land maintenance, except it is the naval version
Syntax: naval_maintenance = <amount nation pays in naval maintenance>
returns true under same conditions as land version
Scope: country.

badboy
According to EU3 wiki, this kind of trigger tells the machine to check and see if the nation has a reputation level of x or higher.
Syntax: badboy = x #
is true if nation's reputation is x or higher
Scope: country.

num_of_revolts NS
tells the machine to check how many revolts this nation has had.
Syntax: num_of_revolts = x #
I guess it returns true if this nation has had at least this number of revolts. entire entry is pure conjecture.
Scope: country.
I believe it checks if the country has this number of provinces under siege/control (?) by rebels.


another break. The list appears to be turning out nicely.
break over. Back to work.

revolt_percentage NS
not sure about this whatsoever
Syntax: revolt_percentage = x
Scope: country.
Similar to num_of_revolts, but done as a percentage of your total cities. revolt_percentage = 0.5 would return true if at least half of your provinces were under siege or controlled (?) by rebels.

num_of_cities
I have seen how this is used, and it tells the machine to check if this nation has at least the specified number of cities
Syntax: num_of_cities = <number of cities to check for>
returns true if the nation has at least the specified number of cities
Scope: country.

revolt_risk NS
tells the machine to check the revolt risk either of or in the nation. unsure
Syntax: revolt_risk = x
Scope: province.

pure_revolt_risk
I really don't know about this one.
No idea.

num_of_ports
checks for exactly what the name implys.
Syntax: num_of_ports = x #
Scope: country.

num_of_allies
same as ports
Syntax: num_of_allies = x #
Scope: country.

num_of_vassals
I'm not sure how you even get vassals in the first place, but I guess it should be the same as the preceding 2.
Syntax: num_of_vassals = x #
Scope: country.
'Vassal' refers to a country paying tribute.


I'll stop for now, might be back tomorrow.

Dateline:
Dec. 21, 2009: started reference.

Dec. 22, 2009: Continued reference, went regular(somewhat)

Evening of Dec. 22, 2009: Was a bad person. Had Disciplinary action.

Dec. 23, 2009: Brooded over poor choices I made which led to disciplinary action. Knew since night before it was my fault. Would like to commend moderators for taking what I believed was what they thought to be proper action. I certainly had that coming.:( Note: I'm not trying to sound sarcastic or anything, I really do mean it. I'm not trying to break rule #2 or #3 intentionally. I really do appreciate the value of having a moderator to keep things under control. The way I see it, without them, it would in my mind be far more difficult for administrators to keep control. I used to play an old mmorpg(massive multiplayer online role playing game), the company which ran it kept player moderators around for the purpose of helping to keep an eye on things. Without such said moderators in the forum provided on the same site, a lot more players would have been able to break the rules and fewer would have been punished. So to that end, I do realize that it is important to have someone like a moderator on a forum.

Dec. 24, 2009: Decided to carry out decision of previous evening to move on, yet prevent such mistakes in the future.
 
I see. will copy and paste as time allows. (I live in the GMT -6:00 timezone, so it is getting kind of late for me, as I have to attend church services at 8:30)