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

LiamRiordan

The Rambling KR Player
70 Badges
Aug 4, 2008
2.184
137
  • 500k Club
  • Stellaris: Nemesis
  • Stellaris: Apocalypse
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Holy Fury
  • The Showdown Effect
  • Warlock: Master of the Arcane
  • War of the Roses
  • Hearts of Iron IV: Colonel
  • Stellaris: Humanoids Species Pack
  • Stellaris: Lithoids
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44 Deluxe Edition
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Steel Division: Normandy 44
  • Crusader Kings II: Rajas of India
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Necroids
  • Age of Wonders: Planetfall Sign Up
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV
  • Stellaris: Distant Stars
  • Stellaris: Federations
  • Hearts of Iron IV: Field Marshal
  • Semper Fi
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Dungeonland
  • Darkest Hour
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
Hey folks, I'm trying to code an event chain and I'm having a problem getting some events to either kick in properly or only kick in when they're supposed to.

Here is the code:
Code:
event = {
    id = 8000000
    picture = "Ecole_imperiale"
    country = RUS
    style = 2
    
    trigger = {
        alliance = { country = CAN country = RUS }
        flag = RUS_TSAR
        exists = U07 #United Kingdom
            NOT = {
                exists = ENG
                exists = SCO
                exists = U16 #England
                exists = U17 #Wales
            }
        }
    name = "The Tsar visits Buckingham Palace"
    desc = "With the liberation of the United Kingdom, our English allies have regained their homeland!  This is a great victory for the Entente Cordial!  Our glorious Tsar took this opportunity to cement relations between the British and Russian Empires, paving the way for peace and stability from the chaos and anarchy that so nearly destroyed us after the Weltkrieg.  The Tsar personally met Edward VII and promised both economic and military support to the British Empire through these times of recovery."
    
    date = { day = 1 month = january year = 1936 }
    offset = 40
    deathdate = { day = 30 month = december year = 1966 }
    
    action_a = {
        name = "This is only the first step."
        command = { type = guarantee which = U07 where = RUS }
        command = { type = set_relation which = U07 value = 200 }
        command = { type = guarantee which = RUS where = U07 }
        command = { type = set_relation which = GER value = -80 }
        command = { type = trigger which = 8000001 }
        }
    }

event = {
    id = 8000001
    picture = "Ecole_imperiale"
    country = U07
    style = 2
    random = no
    
    trigger = {
        alliance = { country = U07 country = RUS }
        event = 8000000
        }
    
    name = "Russian Assistance"
    desc = "With the signing of the economic and military support between the British and Russian Empires, the ports of Britain began to flood with Russian supplies!  This will allow our military to reorganize at a greater speed than normal!  We should be back up to strength in no time!"
    
    date = { day = 1 month = january year = 1936}
    deathdate = { day = 30 month = december year = 1966 }
    
    action_a = {
        name = "Let the supplies flow!"
        command = { type = money value = 500 }
        command = { type = supplies value = 2500 }
        command = { type = energypool value = 1000 }
        command = { type = metalpool value = 1000 }
        command = { type = oilpool value = 500 }
        command = { type = dissent value = -2 }
        }
    }

event = {
    id = 8000002
    picture = "Berlin stock exchange"
    country = GER
    style = 2
    
    trigger = {
        exists = U07
        exists = RUS
        alliance = { country = CAN country = RUS }
        alliance = { country = U07 country = RUS }
        event = 8000001
            NOT = {
                war = { country = U07 country = GER }
                war = { country = RUS country = GER }
                exists = ENG
                exists = FRA
                exists = U16
                exists = U17
                }
            }
        name = "Economy under threat from the Entente!"
        desc = "The Britain and Russia forming large trade networks, and the rest of the British Empire coming back up to strength, we are having trouble forming trade agreements to keep our economy growing.  This is causing a backlash and the possibility of a double dip recession!  We have to act now, lest we face another Black Monday!  What will the Kaiser edict?"
        
        date = { day = 1 month = january year = 1936 }
        offset = 60
        deathdate = { day = 30 month = december year = 1966 }
        
        action = {
            ai_chance = 25
            name = "Lower trade tariffs from our colonies"
            command = { type = money value = -250 }
            command = { type = industrial_modifier which = total value = -2 }
            }
        action = {
            ai_chance = 25
            name = "We are rich!  Pump money into the economy!"
            command = { type = money value = -1000 }
            }
        action = {
            ai_chance = 25
            name = "Invest in our neighbours!"
            command = { type = industrial_modifier which = total value = -2 }
            command = { type = money value = 500 }
            command = { type = relation which = DEN value = 25 }
            command = { type = relation which = HOL value = 25 }
            command = { type = relation which = CZE value = 25 }
            command = { type = relation which = AUS value = 25 }
            command = { type = trigger which = 8000003 }
            command = { type = trigger which = 8000004 }
            command = { type = trigger which = 8000005 }
            command = { type = trigger which = 8000006 }
            }
        action = {
            ai_chance = 25
            name = "Condemn Britain and Russia!"
            command = { type = industrial_modifier which = total value = -8 }
            command = { type = relation which = U07 value = -50 }
            command = { type = relation which = RUS value = -50 }
            command = { type = trigger which = 8000007 }
            command = { type = trigger which = 8000008 }
            }
        }
        
event = {
    id = 8000003
    picture = "Berlin stock exchange"
    country = DEN
    style = 2
    random = no
    
    date = { day = 1 month = january year = 1936 }
    deathdate = { day = 30 month = december year = 1966 }
    
    name = "The Germans invest in our economy!"
    desc = "The German economic minister has just announced that they plan to open more trade opportunities for us, and invest in our own economy!  As a sign of friendship and economic stability.  What could go wrong?"
        
        action = {
            command = { type = industrial_modifier which = total value = 8 }
            command = { type = relation which = GER value = 35 }
            }
        }
        
event = {
    id = 8000004
    picture = "Berlin stock exchange"
    country = HOL
    style = 2
    random = no
    
    date = { day = 1 month = january year = 1936 }
    deathdate = { day = 30 month = december year = 1966 }
    
    name = "The Germans invest in our economy!"
    desc = "The German economic minister has just announced that they plan to open more trade opportunities for us, and invest in our own economy!  As a sign of friendship and economic stability.  What could go wrong?"
        
        action = {
            command = { type = industrial_modifier which = total value = 8 }
            command = { type = relation which = GER value = 35}
            }
        }
        
event = {
    id = 8000005
    picture = "Berlin stock exchange"
    country = CZE
    style = 2
    random = no
    
    date = { day = 1 month = january year = 1936 }
    deathdate = { day = 30 month = december year = 1966 }
    
    name = "The Germans invest in our economy!"
    desc = "The German economic minister has just announced that they plan to open more trade opportunities for us, and invest in our own economy!  As a sign of friendship and economic stability.  What could go wrong?"
        
        action = {
            command = { type = industrial_modifier which = total value = 8 }
            command = { type = relation which = GER value = 35}
            }
        }

event = {
    id = 8000006
    picture = "Berlin stock exchange"
    country = AUS
    style = 2
    random = no
    
    date = { day = 1 month = january year = 1936 }
    deathdate = { day = 30 month = december year = 1966 }
    
    name = "The Germans invest in our economy!"
    desc = "The German economic minister has just announced that they plan to open more trade opportunities for us, and invest in our own economy!  As a sign of friendship and economic stability.  What could go wrong?"
        
        action = {
            command = { type = industrial_modifier which = total value = 8 }
            command = { type = relation which = GER value = 35}
            }
        }
        
event = {
    id = 80000007
    picture = "Berlin stock exchange"
    country = U07
    style = 2
    random = no
    
    name = "The Germans condemn us!"
    desc = "The Germans appear to be feeling the pressure now that we are trading with the Russians and our imperial assets, this is causing the German economy to weaken and put us in a stronger position in the world!  We must prepare for military action sooner than we thought due to this diplomatic incident."
        
        date = { day = 1 month = january year = 1936 }
        deathdate = { day = 30 month = december year = 1966 }
        
        action = {
            command = { type = relation which = GER value = -75 }
            }
    }

event = {
    id = 8000008
    picture = "Berlin stock exchange"
    country = RUS
    style = 2
    random = no
    
    name = "The Germans condemn us!"
    desc = "The Germans appear to be feeling the pressure now that we are trading with the British and our imperial assets, this is causing the German economy to weaken and put us in a stronger position in the world!  We must prepare for military action sooner than we thought due to this diplomatic incident."
    
        date = { day = 1 month = january year = 1936 }
        deathdate = { day = 30 month = december year = 1966 }
        
        action = {
            command = { type = relation which = GER value = -75 }
            }
    }

There are some issues during some quick and dirty testing in BETA 4.

When I claim, and then annex UoB as Russia at the game start, I then join Canada. Almost immediately events no. 8000003 to 8000008 all fire. Despite what I believe to have coded that they need event 800002 to trigger them if the fourth choice is chosen. This is while the United Kingdom doesn't even exist. Will I need to put "exists = U07" in all of them? I can understand why 8000000 isn't bothering to fire since it needs the Tsar flag up, not bothered gone into a full game to do that yet.

This chain is for Kaiserreich, and is meant to be a solidification chain between Britain and Russia, while Germany feels the pinch and reacts. Are my triggers wrong?
 
That fixed nearly all the problems, the event 8000008 where the Germans condemn Russia, fires without its parent event 8000002 triggering.
 
No. An event without date, offset and deathdate can fire only when triggered. Be sure to have removed them.
They're removed. But last event still bugs.

Code:
event = {
    id = 8000000
    picture = "Ecole_imperiale"
    country = RUS
    style = 2
    
    trigger = {
        alliance = { country = CAN country = RUS }
        flag = RUS_TSAR
        exists = U07 #United Kingdom
            NOT = {
                exists = ENG
                exists = SCO
                exists = U16 #England
                exists = U17 #Wales
            }
        }
    name = "The Tsar visits Buckingham Palace"
    desc = "With the liberation of the United Kingdom, our English allies have regained their homeland!  This is a great victory for the Entente Cordial!  Our glorious Tsar took this opportunity to cement relations between the British and Russian Empires, paving the way for peace and stability from the chaos and anarchy that so nearly destroyed us after the Weltkrieg.  The Tsar personally met Edward VII and promised both economic and military support to the British Empire through these times of recovery."
    
    date = { day = 1 month = january year = 1936 }
    offset = 40
    deathdate = { day = 30 month = december year = 1966 }
    
    action_a = {
        name = "This is only the first step."
        command = { type = guarantee which = U07 where = RUS }
        command = { type = set_relation which = U07 value = 200 }
        command = { type = guarantee which = RUS where = U07 }
        command = { type = set_relation which = GER value = -80 }
        command = { type = trigger which = 8000001 }
        }
    }

event = {
    id = 8000001
    picture = "Ecole_imperiale"
    country = U07
    style = 2
    random = no
    
    name = "Russian Assistance"
    desc = "With the signing of the economic and military support between the British and Russian Empires, the ports of Britain began to flood with Russian supplies!  This will allow our military to reorganize at a greater speed than normal!  We should be back up to strength in no time!"
    
        action_a = {
        name = "Let the supplies flow!"
        command = { type = money value = 500 }
        command = { type = supplies value = 2500 }
        command = { type = energypool value = 1000 }
        command = { type = metalpool value = 1000 }
        command = { type = oilpool value = 500 }
        command = { type = dissent value = -2 }
        }
    }

event = {
    id = 8000002
    picture = "Berlin stock exchange"
    country = GER
    style = 2
    
    trigger = {
        exists = U07
        alliance = { country = CAN country = RUS }
        alliance = { country = U07 country = RUS }
        event = 8000001
            NOT = {
                war = { country = U07 country = GER }
                war = { country = RUS country = GER }
                exists = ENG
                exists = FRA
                exists = U16
                exists = U17
                }
            }
        name = "Economy under threat from the Entente!"
        desc = "The Britain and Russia forming large trade networks, and the rest of the British Empire coming back up to strength, we are having trouble forming trade agreements to keep our economy growing.  This is causing a backlash and the possibility of a double dip recession!  We have to act now, lest we face another Black Monday!  What will the Kaiser edict?"
        
        date = { day = 1 month = january year = 1936 }
        offset = 60
        deathdate = { day = 30 month = december year = 1966 }
        
        action = {
            ai_chance = 25
            name = "Lower trade tariffs from our colonies"
            command = { type = money value = -250 }
            command = { type = industrial_modifier which = total value = -2 }
            }
        action = {
            ai_chance = 25
            name = "We are rich!  Pump money into the economy!"
            command = { type = money value = -1000 }
            }
        action = {
            ai_chance = 25
            name = "Invest in our neighbours!"
            command = { type = industrial_modifier which = total value = -2 }
            command = { type = money value = 500 }
            command = { type = relation which = DEN value = 25 }
            command = { type = relation which = HOL value = 25 }
            command = { type = relation which = CZE value = 25 }
            command = { type = relation which = AUS value = 25 }
            command = { type = trigger which = 8000003 }
            command = { type = trigger which = 8000004 }
            command = { type = trigger which = 8000005 }
            command = { type = trigger which = 8000006 }
            }
        action = {
            ai_chance = 25
            name = "Condemn Britain and Russia!"
            command = { type = industrial_modifier which = total value = -8 }
            command = { type = relation which = U07 value = -50 }
            command = { type = relation which = RUS value = -50 }
            command = { type = trigger which = 8000007 }
            command = { type = trigger which = 8000008 }
            }
        }
        
event = {
    id = 8000003
    picture = "Berlin stock exchange"
    country = DEN
    style = 2
    random = no
        
    name = "The Germans invest in our economy!"
    desc = "The German economic minister has just announced that they plan to open more trade opportunities for us, and invest in our own economy!  As a sign of friendship and economic stability.  What could go wrong?"
        
        action = {
            command = { type = industrial_modifier which = total value = 8 }
            command = { type = relation which = GER value = 35}
            }
        }
        
event = {
    id = 8000004
    picture = "Berlin stock exchange"
    country = HOL
    style = 2
    random = no
        
    name = "The Germans invest in our economy!"
    desc = "The German economic minister has just announced that they plan to open more trade opportunities for us, and invest in our own economy!  As a sign of friendship and economic stability.  What could go wrong?"
        
        action = {
            command = { type = industrial_modifier which = total value = 8 }
            command = { type = relation which = GER value = 35}
            }
        }
        
event = {
    id = 8000005
    picture = "Berlin stock exchange"
    country = CZE
    style = 2
    random = no
        
    name = "The Germans invest in our economy!"
    desc = "The German economic minister has just announced that they plan to open more trade opportunities for us, and invest in our own economy!  As a sign of friendship and economic stability.  What could go wrong?"
        
        action = {
            command = { type = industrial_modifier which = total value = 8 }
            command = { type = relation which = GER value = 35}
            }
        }

event = {
    id = 8000006
    picture = "Berlin stock exchange"
    country = AUS
    style = 2
    random = no
        
    name = "The Germans invest in our economy!"
    desc = "The German economic minister has just announced that they plan to open more trade opportunities for us, and invest in our own economy!  As a sign of friendship and economic stability.  What could go wrong?"
        
        action = {
            command = { type = industrial_modifier which = total value = 8 }
            command = { type = relation which = GER value = 35}
            }
        }
        
event = {
    id = 80000007
    picture = "Berlin stock exchange"
    country = U07
    style = 2
    random = no
    
    name = "The Germans condemn us!"
    desc = "The Germans appear to be feeling the pressure now that we are trading with the Russians and our imperial assets, this is causing the German economy to weaken and put us in a stronger position in the world!  We must prepare for military action sooner than we thought due to this diplomatic incident."
        
                
        action = {
            command = { type = relation which = GER value = -75 }
            }
    }

event = {
    id = 8000008
    picture = "Berlin stock exchange"
    country = RUS
    style = 2
    random = no
    
    name = "The Germans condemn us!"
    desc = "The Germans appear to be feeling the pressure now that we are trading with the British and our imperial assets, this is causing the German economy to weaken and put us in a stronger position in the world!  We must prepare for military action sooner than we thought due to this diplomatic incident."
    
        action = {
            command = { type = relation which = GER value = -75 }
            }
    }
 
Ran through it twice now, that event 8000008 just comes up randomly on its own, the parent event doesn't even show up at all. I'm at a loss there, I was thinking I did miss the parent event first time and needed to sleep the other events just in case. The United Kingdom doesn't even get the sister event.

ententetsardebug1.png