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 }
}
}
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 }
}
}