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

DavidBrewster

First Lieutenant
48 Badges
Jun 14, 2018
226
1.145
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Distant Stars
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • Stellaris: Ancient Relics
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Way of Life
  • Victoria 2
  • Europa Universalis IV
  • 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
  • Stellaris: Apocalypse
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis IV: Third Rome
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • 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
  • Hearts of Iron III
  • Magicka
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
[Resolved] - I used any_province instead of any_owned_province.

I need help understanding event triggers and how they work.

Events can include a trigger, but it seems that events will not fire by themselves even when the conditions in that trigger are met. Is that the case? So what then is the point of the trigger in the event? I thought maybe the event trigger could limit when an event could happen, but that also seems to not be the case: if you put an event in one of the "on_action" files, it will fire even when the trigger conditions in the event are not meant.

I'm confused about how all this works and would really like to understand this better.

I've included an example to illustrate my point.

From Paradox's modding stream, I copied the following event (identical except I made the effects simpler) to see if I could figure out event triggers.

Code:
namespace = atlantis

atlantis.1 = {
    type = country_event
    title = "Should work"
    desc = "Should work"
  
    trigger = {
        any_province = {
            trade_goods = fish
        }
    }
  
    immediate = {
        add_treasury = {
            value = 5
        }
    }
  
    option = {
        name = atlantis.1.a"
    }

}

Adding this event by itself did nothing, even when the trigger conditions are met. The event doesn't fire, even if you are in country with fish in one of the provinces.

However, when I also added the event to the monthly country pulse, the event started firing.

Code:
monthly_country_pulse = {

    events = {
        rel_flavor_druidic.10
        dhe_rome.9
        dhe_judea.2
        dhe_judea.3
        dhe_judea.4
        dhe_judea.5
        dhe_judea.7
#Added Atlantis event
        atlantis.1
    }
  
    random_events = {
        595 = 0
        5 = comet.4
    }
  
    on_actions = {
        dictatorship_power_held_pulse
        consul_conspiracy_pulse
        delay = { days = { 1 15 } }
        dictator_rise_pulse
        delay = { days = { 1 15 } }
    }
}

But after adding the event to the monthly pulse, it now triggers even with the event's trigger condition is not met. I.e., the event will fire even for countries that don't have fish in any of their provinces.

Could someone who has figured this help me understand events and how they are triggered?
 
Last edited:
I need help understanding event triggers and how they work.

Could someone who has figured this help me understand events and how they are triggered?

Because any_province means what it says, literally any province on the map. If you want to know if that particular country has fish in any of it's provinces you have to use any_owned_province which will limit the check to provinces owned by that country.
 
Because any_province means what it says, literally any province on the map. If you want to know if that particular country has fish in any of it's provinces you have to use any_owned_province which will limit the check to provinces owned by that country.

Thank you, that fixed it!

So I think I understand now:

To activate events, you need to have something like an on_action that fires them. The triggers in the events themselves are there to limit when the event fires.