Europa Universalis IV

Europa Universalis IV

View Stats:
Collins Oct 24, 2023 @ 3:11am
Modding: event not triggering
I attempted to create a province_event similar to the Synthetic province occupation event, but the event I made fails to trigger. Through the console I tried commands "event" and "testevent" and even though the conditions are met, no occupied province flips to my desired tag
EDIT: without the console.
Any ideas? Has it something to do with the casus belli? I'd figure it doesn't...

My event file:

namespace = myhorde province_event = { id = myhorde.1 title = "myhorde.1.t" desc = "myhorde.1.d" picture = SYNTHETICS_eventPicture is_triggered_only = yes trigger = { owner = { NOT = { tag = MGE } } controller = { tag = MGE } } immediate = { hidden_effect = { cede_province = MGE add_core = MGE set_base_tax = 2 set_base_production = 2 set_base_manpower = 2 } } option = { name = "myhorde.1.a" } }
Last edited by Collins; Oct 24, 2023 @ 3:12am
< >
Showing 1-7 of 7 comments
grotaclas Oct 24, 2023 @ 4:23am 
How are you triggering the event? You have "is_triggered_only = yes", so it doesn't happen randomly. IIRC the synthetics event is triggered through an on_action
RCMidas Oct 24, 2023 @ 4:23am 
Just to be sure, you've fully created the nation for the tag MGE as well, yes? Nothing missing from it?
Collins Oct 24, 2023 @ 4:29am 
Originally posted by grotaclas:
How are you triggering the event? You have "is_triggered_only = yes", so it doesn't happen randomly. IIRC the synthetics event is triggered through an on_action
I did a copy-paste initially, and the synths do have the same trigger condition
is_triggered_only = yes
Collins Oct 24, 2023 @ 4:31am 
Originally posted by RCMidas:
Just to be sure, you've fully created the nation for the tag MGE as well, yes? Nothing missing from it?
That is the tag for the Mongol empire, and in testing the event with a custom nation the tag D00 also worked with a manual console triggering of the event.
I am at a loss, as other mods like the 1356 start date have similar events with similar triggers for example ai Timurids expansion in persia.
grotaclas Oct 24, 2023 @ 4:40am 
Originally posted by Collins:
Originally posted by grotaclas:
How are you triggering the event? You have "is_triggered_only = yes", so it doesn't happen randomly. IIRC the synthetics event is triggered through an on_action
I did a copy-paste initially, and the synths do have the same trigger condition
is_triggered_only = yes
Yes. That means that the event is not triggered automatically. Instead there is some other code which triggers the event. Search for the event id of the synthetics event in all the game files and you will learn more.
The same applies to the modded events if they have is_triggered_only.

BTW: you should make sure that your event doesn't fully annex a country which has subjects. Otherwise they become your subjects and at least in some circumstances, this doesn't end the war and you will be at war with your new subjects and this can crash the game. At least that's what I have seen with the synthetics.
Collins Oct 24, 2023 @ 5:39am 
Originally posted by grotaclas:
Originally posted by Collins:
I did a copy-paste initially, and the synths do have the same trigger condition
is_triggered_only = yes
Yes. That means that the event is not triggered automatically. Instead there is some other code which triggers the event. Search for the event id of the synthetics event in all the game files and you will learn more.
The same applies to the modded events if they have is_triggered_only.

BTW: you should make sure that your event doesn't fully annex a country which has subjects. Otherwise they become your subjects and at least in some circumstances, this doesn't end the war and you will be at war with your new subjects and this can crash the game. At least that's what I have seen with the synthetics.

Thank you, I was unsure what that condition did, but I commented it out and the event triggered!
grotaclas Oct 24, 2023 @ 5:48am 
Originally posted by Collins:
Thank you, I was unsure what that condition did, but I commented it out and the event triggered!
This is probably not the best solution. This makes it an MTTH event and I think it gets a default MTTH of 1 month. So it doesn't trigger immediately and it might not trigger at all. And AFAIK the game checks the trigger every 20 days for each province which could have a performance impact
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Oct 24, 2023 @ 3:11am
Posts: 7