• 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.897
62
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • 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
  • Mount & Blade: Warband
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Heir to the Throne
  • 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
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
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?
 
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.
 
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.
 
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.
 
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:
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.
 
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.
 
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?