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