[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.
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.
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?
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: