List of Triggers


This is a '''full list of conditions''' usable in event and decision scripting.

Conditions are pieces of script that ask simple logical questions, and return a yes/no answer. These are used in various situations, usually to determine whether or not the prerequisites are met for a certain action to occur.

For example: trigger = { is_greater_power = yes } This example displays a trigger for an event. Events can fire only when their trigger requirements are met. This hypothetical event has a very simple trigger, it asks only one thing: is the country in question a great power? If it returns true (i.e. the country is in fact a great power) then they trigger is satisfied and the event may fire. Using Boolean commands and some clever scripting, commands can be used to create very complex sets of requirements. They are used in several different parts of event and decision scripting.

Commands are used for: The "potential" and "allow" sections of decision scripting to determine when they may be presented to the player as an option The "trigger" and "MTTH" (Mean Time to Happen) sections of event scripting to determine when they are eligible to fire and the chances of this happening *The "limit" section of effect (within either events or decisions) scripting to determine what the limits of an effect's reach are

Not all commands are useful in all situations. Commands are usually relevant to specific situations.

For example, the command: religion = protestant This command is applicable only when a pop is in question, and it therefore non-functional when applied to province, state, national level scripts. Keep the limits of commands in mind when scripting.

The list below is a comprehensive collection of these commands. Enjoy, and get to modding!

Boolean Operators

These are boolean operators. There are only three of them in Victoria 2, but they are extremely useful. Like any command, they can return true or false, but they are special in that they consist entirely of ''other'' commands. This makes them highly versatile. Expect to use these more than any other commands.

AND operator returns true only when every included statement returns true. AND = { ai = no civilized = yes } This "and" operator will return true only if the country in question is not controlled by the ai (that is, it is player controlled), and it is civilized.

OR operator returns true when any of the included commands returns true. OR = { government = democracy prestige = 50 } This "or" operator will return true if the country in question is either a democracy or has 50 (or more) prestige.

NOT operator will return true if the body resolves to false. NOT = { num_of_allies = 3 } This "not" operator will be satisfied only if the country does not have 3 or more allies; or, in more plain terms, if the country has 2 allies or less. Thus we can see that the "not" command is very useful in combination with any numerically-based command.

NOTE: If you include multiple statements within the same NOT operator, it returns true if ALL of the statements evaluate to false, and it returns false if just ONE or more statements evaluates to true. It is essentially the same as an AND operator, only the logic works with false statements instead of true statements.

General Conditions

Country Scope

These commands are useful at the country scope. They are applicable whenever the script is referring to a country.

Province Scope

Pop Scope