• 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.
Code:
trigger = {
        AND = {
            local_flag = { which = economic_growth when = 1 value = 11 }
            local_flag = { which = economic_growth when = -1 value = 20 }
            #NOT = { local_flag = { which = economy_recession } }
        }
    }
[code]
This means the event will fire only if local_flag economic_growth is set for this country and its value is >= 11 AND <= 20. It looks correct to me. Are you sure you're setting economic_growth to a proper value in another event?

However, if you cannot event get this to fire via console, perhaps the problem is another one:
[LIST]
[*]is this event in a new event file? new event files must be added to a savegame/scenario in order to use them
[*]perhaps there's an extra } before this event that "closes" the file so no event are read after that
[/LIST]

Thanks for all the good feedback and tips. I was able to confirm I'm setting the local flag value properly, as well as that I had properly added the new file to the scenario and that there weren't any additional {} hanging around. The problem was that the actions cannot have a trigger in them. SInce all the actions had a trigger on them, they wouldn't appear, making the event not fire properly, even in console.

Code:
    action = {
        name = "Recession from Depression Text"
        trigger = { local_flag = economy_depression }
        command = { type = peacetime_ic_mod value = 10 when = 0 }
 
Thanks for all the good feedback and tips. I was able to confirm I'm setting the local flag value properly, as well as that I had properly added the new file to the scenario and that there weren't any additional {} hanging around. The problem was that the actions cannot have a trigger in them. SInce all the actions had a trigger on them, they wouldn't appear, making the event not fire properly, even in console.
To be more precise, the problem is not having an event with all actions having a trigger. That perfectly ok. The problem is that all triggers were false, so no actions could be taken, so the event cannot fire. If the triggers are correct then it is working properly.
 
Welcome to my Saturday's event problem! Today we have a "secedeprovince" failure:

event = {
id = 2147483623
random = no
country = BUL
style = 2
picture = "italianinfantry"

trigger = {
ispuppet = BUL
alliance = { country = GRE country = BUL }
alliance = { country = SER country = BUL }
alliance = { country = URU country = BUL }
}

name = "The treaty of Tirana"
desc = "Due to our defeat in the last war, we've got to renounce to all the gains we made!"

date = { day = 1 month = january year = 1940 }
offset = 1
deathdate = { day = 29 month = december year = 1970 }

action = {
ai_chance = 100
name = "Vae victis!"
command = { type = secedeprovince which = 364 value = GRE }
command = { type = removecore which = 364 }
command = { type = secedeprovince which = 363 value = GRE }
command = { type = removecore which = 363 }
command = { type = secedeprovince which = 307 value = URU }
command = { type = removecore which = 307 }
command = { type = secedeprovince which = 331 value = SER }
command = { type = removecore which = 331 }
command = { type = secedeprovince which = 328 value = SER }
command = { type = removecore which = 328 }
command = { type = secedeprovince which = 333 value = SER }
command = { type = removecore which = 333 }
command = { type = secedeprovince which = 334 value = SER }
command = { type = removecore which = 334 }
}
}

The event correctly fires.
Greece, Serbia and URU (Royal Romania in Kaiserrich) exist.
Bulgaria owns the provinces, and are cores too.
The cores are correctly removed, but the provinces still remain owned by Bulgaria.
Bulgaria, Greece, Serbia, Romania are all my puppets and we are in the same alliance
 
  • 1Like
Reactions:
Hi, I'd like to ask for some help. I was making an event to regulate the army of a country from my AAR [Soviet Intervention Force] since it grew up to whooping 18 divisions, haha so, I made the following event but the issue I'm having is...well, the event is triggering everyday no matter what, I'd like it to keep the offset at 1 so any time their army grows beyond 5 it activates... but right now it is activating daily even without reaching their limit...

I hope someone has advice for this ^^ thanks!

event = {
id = 5565808
country = UA1
persistent = yes

trigger = {
army = { size = 6 type = 0 when = 1 where = 0 which = 0 }
}

date = { day = 5 month = august year = 1957 }
offset = 1
deathdate = { day = 5 month = august year = 1960 }

name = "Army Limits"
desc = "..."

action = {
name = "Delete"
command = { type = demobilize which = land when = 0 where = 1 value = 5 }
}
}
 
I suggest using this instead:
trigger = {
army = { size = 6 type = 0 when = 0 where = 0 which = 1 }
}

date = { day = 5 month = august year = 1957 }
offset = 5
deathdate = { day = 5 month = august year = 1960 }

when = 0 -> only built divisions, which is probably causing the problem
which = 1 + offset = 5 -> better performances
 
  • 1
Reactions:
Hello, once again here, :p

I was checking up some events in the New World Order 2 mod and I came around an interesting one that made me wonder some things...

action = {
name = EVT_8002928_A # Kai-shek lives!
ai_chance = 70
command = { type = domestic which = democratic value = -1 }
command = { type = domestic which = political_left value = -1 }
command = { type = domestic which = freedom value = -2 }
command = { type = dissent value = -5 }
command = { type = headofstate which = 55204 } # Chiang Kai-shek
}

action = {
name = EVT_8002928_B # Kai-shek is dead but China upholds its alliance with USA
ai_chance = 20
command = { type = dissent value = 20 }
command = { type = domestic which = democratic value = -1 }
command = { type = domestic which = political_left value = 1 }
command = { type = domestic which = freedom value = -2 }
command = { type = sleepminister which = 55002 } # Chiang Kai-shek
command = { type = sleepminister which = 55007 } # Chiang Kai-shek
command = { type = sleepminister which = 55011 } # Chiang Kai-shek
command = { type = sleepminister which = 55204 } # Chiang Kai-shek
command = { type = sleepminister which = 55205 } # Chiang Kai-shek
command = { type = sleepminister which = 55206 } # Chiang Kai-shek
command = { type = sleepminister which = 55207 } # Chiang Kai-shek
}

action = {
name = EVT_8002928_C # Kai-shek is dead and China turns back on USA!
ai_chance = 10
command = { type = trigger which = 8002929 }
command = { type = leave_alliance }
command = { type = alliance which = SOV }
command = { type = dissent value = 20 }
command = { type = domestic which = political_left value = 3 }
command = { type = sleepminister which = 55002 } # Chiang Kai-shek
command = { type = sleepminister which = 55007 } # Chiang Kai-shek
command = { type = sleepminister which = 55011 } # Chiang Kai-shek
command = { type = sleepminister which = 55204 } # Chiang Kai-shek
command = { type = sleepminister which = 55205 } # Chiang Kai-shek
command = { type = sleepminister which = 55206 } # Chiang Kai-shek
command = { type = sleepminister which = 55207 } # Chiang Kai-shek
command = { type = sleepevent which = 8002930 }
}
}

I manually fired it to check it up and I discovered that instead of getting the three different actions as options, I could get one randomly according to that ai_chance. So my question is, if, for example, I wanted to make an economic event for (idk) the results of a five-year plan.
By not putting it as action_a - action_b, etc... Could I make it totally random then?

Something like: (ignore the structure i'll bring as example)
action = {
name = "Success!"
ai_chance = 50 }
action = {
name = "Failure!"
ai_chance = 50 }

Would that be enough for it to, well, be random and out of my choice?
Thanks! ^^
 
It's not action_a/b/c. Look in the event, above the code you posted.
one_action = yes
Check event_commands for rules.
Ohhh that makes a lot of sense, haha. I frequently check that file though I never came aroudn one_action, seems it will be quite useful then. :p
Thanks!
 
Encountered following problem:

I made events for germany (event-id range 990000000+), named the txt file germany2 and put the line in the even.txt file. All events in there work.

Now i made events for japan (event-id range 980000000+), named the txt file japan2 and put the line in the even.txt file. The events in there dont seem to be recognized by the game because they even cant be triggered manually.

If i put an event from japan2.txt into germany2.txt (and change the TAG to GER and event id into the above id range) they trigger normally.

What i am missing here?

DH version is the latest and im using the All in One Mod.
 
I need help with this event.

################################
# Revolte
################################
event = {
id = 990001141
random = no
country = GER
persistent = yes

trigger = {
ideology = nazi
incabinet = 1
incabinet = 187
ai = no
}

decision = {
ideology = nazi
incabinet = 1
incabinet = 187
ai = no
}
decision_trigger =

{
ideology = nazi
incabinet = 1
incabinet = 187
ai = no
}

name = "Revolte anzetteln"
desc = "Wir können nun Revolten anzetteln."
style = 0
picture = "resistance"

date = { day = 1 month = january year = 1933 }
offset = 1
deathdate = { day = 30 month = december year = 1999 }

action_a = {
name = "Dann mal los"
command = { type = money value = -x }
command = { trigger = { country = ENG } type = province_revoltrisk which = -1 value = x }
command = { trigger = { country = ENG } type = revolt which = -1 }
}
}

The x are placeholders.

How do i get this to work in one single event that a random ENG province increases the revolt chance and pops up one rebel unit? Im not used to put all in one event, only in split up ones.

This event shows up but i cant trigger it. What im missing?

Thanks
 
I need help with this event.

################################
# Revolte
################################
event = {
id = 990001141
random = no
country = GER
persistent = yes

trigger = {
ideology = nazi
incabinet = 1
incabinet = 187
ai = no
}

decision = {
ideology = nazi
incabinet = 1
incabinet = 187
ai = no
}
decision_trigger =

{
ideology = nazi
incabinet = 1
incabinet = 187
ai = no
}

name = "Revolte anzetteln"
desc = "Wir können nun Revolten anzetteln."
style = 0
picture = "resistance"

date = { day = 1 month = january year = 1933 }
offset = 1
deathdate = { day = 30 month = december year = 1999 }

action_a = {
name = "Dann mal los"
command = { type = money value = -x }
command = { trigger = { country = ENG } type = province_revoltrisk which = -1 value = x }
command = { trigger = { country = ENG } type = revolt which = -1 }
}
}

The x are placeholders.

How do i get this to work in one single event that a random ENG province increases the revolt chance and pops up one rebel unit? Im not used to put all in one event, only in split up ones.

This event shows up but i cant trigger it. What im missing?

Thanks
First of all, if it's an event then remove the decision and decision_trigger parts.
Offset = 1 it's a bit heavy, I would raise it, but it's not critical.
Are you sure that minister 1 and minister 187 don't share the same position?
The last commands will never work because the event fires for GER so the trigger that country is ENG will never work. Without at least one valid command the event will not work.
 
I am a little confused about secedearea and secederegion. what should I be putting in the area/region name? REGION_EAST_AFRICA or East Africa or East_Africa?
 
I am a little confused about secedearea and secederegion. what should I be putting in the area/region name? REGION_EAST_AFRICA or East Africa or East_Africa?
From the top of my mind "East Africa" (" included since there's a space between words). Not 100% sure. East_Africa might work, perhaps.
 
This doesn't want to activate even after I have used a console command into it. What did I do wrong? The Save Debug just tells me this:
Code:
 WARNING : Invalid String ID [action name];We must sign this treaty. 
 WARNING : Invalid String ID [action name];test
Code:
#The Treaty of Berlin
event = {
    id = 88880602
    random = no
    country = ENG

    trigger = {
        #event = 88880601
        local_flag = UK_defeat
    }
    style = 1
    name = "EVT_88880602_NAME"
    desc = "EVT_88880602_DESC"
    picture ="constitutional"

    date = { day = 1 month = january year = 1914 }
    offset = 30
    deathdate = { day = 1 month = january year = 1924 }
    
    action = {
    ai_chance = 100
    name = "We must sign this treaty."
    command = { type = secedeprovince which = GER value = 1371 when = 2 }
    command = { type = secedeprovince which = GER value = 348 when = 2 }
    command = { type = secedeprovince which = GER value = 429 when = 2 }
    command = { type = secederegion which = GER value = "East Africa" when = 2 }
    command = { type = secederegion which = GER value = "Horn of Africa" when = 2 }
    command = { type = secederegion which = GER value = "West Africa" when = 2 }
    command = { type = secederegion which = GER value = "Central Africa" when = 2 }
    command = { type = secederegion which = GER value = "Indonesia" when = 2 }
    command = { type = secederegion which = GER value = "Asian Pacific" when = 2 }
    command = { type = secederegion which = TUR value = "Egypt" when = 2 }
    command = { type = secederegion which = TUR value = "Sudan" when = 2 }
    command = { type = secedearea which = TUR value = "Anatolian South Coast" when = 2 }
    }
    action = {
        name = "test"
        ai_chance = 0
    }
}