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

Mr_B0narpte

Field Marshal
12 Badges
Mar 15, 2009
4.720
352
  • Arsenal of Democracy
  • Cities in Motion
  • Darkest Hour
  • For The Glory
  • Hearts of Iron III
  • Rome Gold
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Pride of Nations
  • Rise of Prussia
  • Hearts of Iron IV Sign-up
I'm trying to make events for several countries that builds infrastructure for them (provided they are controlled by the AI.) I want the events to happen once every year, until the infra reaches 200%. I know I could make lots of events that cover each year but that would just clutter the events file and make it hard to detect certain errors. I tried using the "persistent = yes" and "offset = 360" but that didn't work. Here is my generic event if anyone can help:

event = {
id = XXXXX
random = no
country = XXXX
# should this be included? persistent = yes

name = "AI infrastructure"
desc = "XXX"
style = 0
picture = "226"

trigger = {
owned = { province = XXX data = -1 }
control = { province = XXX data = -1 }
ai = yes
NOT = {
province_building = { province = XX building = infrastructure size = 2.0 } }
}
}

date = { day = 1 month = january year = 1936 }
# should this be included? offset = 360
deathdate = { day = 30 month = december year = 1950 }

action_a = {
name = "Thankyou."
command = { type = construct which = infrastructure where = XXX value = 10 }
}
}
 
Shouldn't this be
NOT = {
province_building = { province = XX building = infrastructure size = 200 } }
}
}