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

Cheexsta

Veni, vidi, vici
60 Badges
Dec 22, 2005
2.894
59
  • Europa Universalis IV: Rights of Man
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Victoria 2
Hello all,

I'm trying to set up an event to fire when a faction has control of all of an enemy's provinces. Checking for a single province being controlled is easy, but I can't for the life of me figure out how to make the game check to see if all of a faction's provinces have been captured.

Anyone able to help? Is it even possible?
 

Antimatter

Second Lieutenant
86 Badges
Sep 4, 2005
137
0
  • 500k Club
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Hearts of Iron III Collection
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis: Rome Collectors Edition
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis 4: Emperor
  • Europa Universalis III
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Hearts of Iron II: Armageddon
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
Well, a single province is something along the lines of:

Code:
country_event = {
trigger = {
any_province = {
owned_by = THIS
NOT = { controlled_by = THIS }
}
}
...
}

So for all provinces you just need to check if no province is owned and controlled by the country. So:

Code:
country_event = {
trigger = {
NOT = {
any_province = {
owned_by = THIS
controlled_by = THIS
}
}
}
...
}

I believe something like that would work.
 

Battlecry

Field Marshal
16 Badges
Feb 22, 2007
2.528
4
  • Arsenal of Democracy
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Semper Fi
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Pre-order
  • Hearts of Iron IV Sign-up
If you want the event to fire for the country doing the occupying, as opposed to the one being occupied, you can also do this:

Code:
country_event = {
id = ####

trigger = {
any_country = {
war_with = THIS
NOT = {
any_province = {
controlled_by = owner
}
}
any_province = {
controlled_by = THIS         ###<<This is to ensure that you control at least one of their provinces###
}
}
}


However, ensuring that all their provinces are occupied by the same country (i.e. THIS) is more difficult...I'm not sure it can be done.
 

Antimatter

Second Lieutenant
86 Badges
Sep 4, 2005
137
0
  • 500k Club
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Hearts of Iron III Collection
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis: Rome Collectors Edition
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis 4: Emperor
  • Europa Universalis III
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Hearts of Iron II: Armageddon
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
battlecry said:
If you want the event to fire for the country doing the occupying, as opposed to the one being occupied, you can also do this:

Code:
country_event = {
id = ####

trigger = {
any_country = {
war_with = THIS
NOT = {
any_province = {
controlled_by = owner
}
}
any_province = {
controlled_by = THIS         ###<<This is to ensure that you control at least one of their provinces###
}
}
}


However, ensuring that all their provinces are occupied by the same country (i.e. THIS) is more difficult...I'm not sure it can be done.
I don't think the any_country scope exists in triggers, only in effects (unless it's changed since I last tried it). Assuming it still doesn't exist, you can accomplish something similar by using the event I put above and firing a country_event for the controller.
 

Battlecry

Field Marshal
16 Badges
Feb 22, 2007
2.528
4
  • Arsenal of Democracy
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Semper Fi
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Pre-order
  • Hearts of Iron IV Sign-up
Antimatter said:
I don't think the any_country scope exists in triggers, only in effects (unless it's changed since I last tried it). Assuming it still doesn't exist, you can accomplish something similar by using the event I put above and firing a country_event for the controller.

Edit: If this doesn't work, then I've got a problem. How could you make it so that an event won't fire if any country has such&such flag?

Edit2: Or for that matter, how do you switch scope to any country that's not a neighbour?
 
Last edited:

Antimatter

Second Lieutenant
86 Badges
Sep 4, 2005
137
0
  • 500k Club
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Hearts of Iron III Collection
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis: Rome Collectors Edition
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis 4: Emperor
  • Europa Universalis III
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Hearts of Iron II: Armageddon
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
As far as I can tell, there is no any_country or equivalent in the trigger. Your best bet for converting any events where you tried to use it is to try and move that portion to an effect. I don't know of any other way to do it.
 

Battlecry

Field Marshal
16 Badges
Feb 22, 2007
2.528
4
  • Arsenal of Democracy
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Semper Fi
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Pre-order
  • Hearts of Iron IV Sign-up
Antimatter said:
As far as I can tell, there is no any_country or equivalent in the trigger. Your best bet for converting any events where you tried to use it is to try and move that portion to an effect. I don't know of any other way to do it.

Crap...this is gonna take some time.

Sorry Cheex...ignore my post.
 

Battlecry

Field Marshal
16 Badges
Feb 22, 2007
2.528
4
  • Arsenal of Democracy
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Semper Fi
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Pre-order
  • Hearts of Iron IV Sign-up
Antimatter said:
As far as I can tell, there is no any_country or equivalent in the trigger. Your best bet for converting any events where you tried to use it is to try and move that portion to an effect. I don't know of any other way to do it.

Can the exisits = trigger be used for anything besides a straight tag?