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

Amartus

Captain
34 Badges
Jul 14, 2008
440
12
  • Hearts of Iron Anthology
  • Semper Fi
  • Europa Universalis: Rome
  • Iron Cross
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Deus Vult
  • Darkest Hour
  • Hearts of Iron IV: Together for Victory
  • Knights of Honor
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Ancient Space
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron 4: Arms Against Tyranny
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • 500k Club
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Arsenal of Democracy
  • Rome Gold
I have written this event / event-chain for German reparations payments:

Code:
event = {
	id = 3013061  # German payment of reparations 1
	random = no
	country = GER
	style = 2
	persistent = yes

	trigger = {
		and = {
			day = 1
			month = february
		}
		}

	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers."
	picture = "minister_died"
	
	date = { day = 1 month = january year = 1930 }
	offset = 1
	deathdate = { day = 30 month = december year = 1940 }

	action_a = {
		name = "An unfair obligation indeed!"
		command = { type = money value = -1000 				}
		command = { type = trigger which = 3013062  		}
		command = { type = trigger which = 3013063  		}
		command = { type = trigger which = 3013064  		}
		command = { type = trigger which = 3013065  		}
		command = { type = relation which = BEL value = 2 	}
		command = { type = relation which = ENG value = 2 	}
		command = { type = relation which = FRA value = 2 	}
		command = { type = relation which = USA value = 4 	}
		command = { type = manpowerpool value = -10 		}
		}
	}	
event = {
	id = 3013062   # German payment of reparations 2
	country = BEL

	# Triggered by GER 3013061
   
	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers." 
	style = 2
	picture = "news_paper"   

	action = {
		name = "The cost of the Great War must be repaid." # Excellent!
		command = { type = money value = 200 				}
		command = { type = relation which = GER value = 2 	}
		command = { type = manpowerpool value = -2 			}
	}
}
event = {
	id = 3013063   # German payment of reparations 3
	country = ENG

	# Triggered by GER 3013061
   
	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers." 
	style = 2
	picture = "news_paper"   

	action = {
		name = "The cost of the Great War must be repaid." # Excellent!
		command = { type = money value = 200 				}
		command = { type = relation which = GER value = 2 	}
		command = { type = manpowerpool value = -2 			}
	}
}
event = {
	id = 3013064   # German payment of reparations 4
	country = FRA

	# Triggered by GER 3013061
   
	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers." 
	style = 2
	picture = "news_paper"   

	action = {
		name = "The cost of the Great War must be repaid." # Excellent!
		command = { type = money value = 200 				}
		command = { type = relation which = GER value = 2 	}
		command = { type = manpowerpool value = -2 			}
	}
}
event = {
	id = 3013065   # German payment of reparations 5
	country = USA

	# Triggered by GER 3013061
   
	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers." 
	style = 2
	picture = "news_paper"   

	action = {
		name = "The cost of the Great War must be repaid." # Excellent!
		command = { type = money value = 400 				}
		command = { type = relation which = GER value = 4 	}
		command = { type = manpowerpool value = -4 			}
	}
}

My intention was that every year, on or about the 2nd of February, event 3013061 would fire for the Germans, and then trigger the others to fire as well. However, I am finding at the moment that the event is firing practically every day, and I have not even reached February yet! Can anyone please tell me what I have done wrong?
 
First of all, remove the and in the trigger cause it's redundant. Second, I recommend you to change the offset to something higher (like 360) cause right now it will trigger almost indefinitely every day. And third, try changing the month in date to February.
 
Code:
event = {
	id = 3013061  # German payment of reparations 1
	random = no
	country = GER
	style = 2
	persistent = yes

	trigger = {
		day = 1
		NOT = { day = 2 } 
		
		month = february
		NOT = { month = march }
	}

	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers."
	picture = "minister_died"
	
	date = { day = 1 month = january year = 1930 }
	offset = 1
	deathdate = { day = 30 month = december year = 1940 }

	action_a = {
		name = "An unfair obligation indeed!"
		command = { type = money value = -1000 				}
		command = { type = trigger which = 3013062  		}
		command = { type = trigger which = 3013063  		}
		command = { type = trigger which = 3013064  		}
		command = { type = trigger which = 3013065  		}
		command = { type = relation which = BEL value = 2 	}
		command = { type = relation which = ENG value = 2 	}
		command = { type = relation which = FRA value = 2 	}
		command = { type = relation which = USA value = 4 	}
		command = { type = manpowerpool value = -10 		}
		}
	}	
event = {
	id = 3013062   # German payment of reparations 2
	country = BEL

	# Triggered by GER 3013061
   
	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers." 
	style = 2
	picture = "news_paper"   

	action = {
		name = "The cost of the Great War must be repaid." # Excellent!
		command = { type = money value = 200 				}
		command = { type = relation which = GER value = 2 	}
		command = { type = manpowerpool value = -2 			}
	}
}
event = {
	id = 3013063   # German payment of reparations 3
	country = ENG

	# Triggered by GER 3013061
   
	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers." 
	style = 2
	picture = "news_paper"   

	action = {
		name = "The cost of the Great War must be repaid." # Excellent!
		command = { type = money value = 200 				}
		command = { type = relation which = GER value = 2 	}
		command = { type = manpowerpool value = -2 			}
	}
}
event = {
	id = 3013064   # German payment of reparations 4
	country = FRA

	# Triggered by GER 3013061
   
	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers." 
	style = 2
	picture = "news_paper"   

	action = {
		name = "The cost of the Great War must be repaid." # Excellent!
		command = { type = money value = 200 				}
		command = { type = relation which = GER value = 2 	}
		command = { type = manpowerpool value = -2 			}
	}
}
event = {
	id = 3013065   # German payment of reparations 5
	country = USA

	# Triggered by GER 3013061
   
	name = "Reparations payments."
	desc = "Due to the Treaty of Versailles signed in 1919, Germany was obliged to make reparations payments to the victorious allied powers." 
	style = 2
	picture = "news_paper"   

	action = {
		name = "The cost of the Great War must be repaid." # Excellent!
		command = { type = money value = 400 				}
		command = { type = relation which = GER value = 4 	}
		command = { type = manpowerpool value = -4 			}
	}
}

Haven't tested it, but this should probably alleviate the problem.


Problem is day = X and month = X are "X or later". If you want this to be a useful, historical event as well, you'd probably want to remove that manpower malus and add additional triggers like NOT = { atwar = GER }
 
New question; thanks to Arcangelus and UltimaGecko for their help before.

Code:
trigger = { 
		not = { exists = GER	}
		OR  = {
		not = { exists = U14
			exists = U27
			exists = U30	}
		}
	}

Will this trigger an event on the basis of EITHER "GER" not existing OR of "U14", "U27", AND "U30" not existing, or would I need to throw an "AND =" command in there somewhere for it to fire?
 
Put the 'not = { exists = GER }' inside of the OR. Like this:
Code:
trigger = {
	OR  = {
		not = { exists = GER }
		not = { exists = U14 exists = U27 exists = U30 }
		}
	}

Currently,. the trigger says:
Not exist Germany, or ( NO { exist U14, U27, U30} ).
As probably that isn't clear, that trigger first check if Ger doesn't exist and then check if the U-- doesn't exist. The Or is ignored cause there is only 1 alternative, ao it need that neither of tghouse nations exist to be true. And probably it will give some error in game as the OR use completely useless.
 
Thanks; I will give your correction a go and let you know if it works or not....

It worked perfectly; thanks!

On a related note, if I wanted to modify the event further so that it only triggered if GER OR the others did not exist, and if another event had triggered previously, how would the syntax for that look?

Code:
trigger = {
        AND = {
                event = 3013068
	OR  = {
		not = { exists = GER }
		not = { exists = U14 exists = U27 exists = U30 }
              }
              }
	  }

Would this work?