It could be done with events, but it would be a LOT of events..
The events would be province specific.
group 1: fire for owner of province, checks to see if it is already a core.
If its a core, then it fires a simple event that sets a flag.
Copy the event for every 5 year jump, with year specific flags.
Keep in mind that though the event is province specific, any flags that are created by the event go to the province owner.
group 2: fire for owner of province, checks to see if it is already a core and if it has the necessary collection of flags.
Wipping up a simple program (I write in C) to mass produce events for every 5 year jump and for every province is not difficult.
Consider, however, that such a system would create ~80 flags for each province. If your a continent spanning empire, you will have over a thousand flags just for the gaining of cores.
In C, setting thousands of variables isnt a problem. But I dont know how it would work in EU2's engine, nor do I know if it would slow it down.
And that does NOT include a system for loosing cores if you lost the province after you gained a core on it.
(though, perhaps that makes sense.. and if one includes a BB and/or religion condition on it.. *contemplates* )
The events would be province specific.
group 1: fire for owner of province, checks to see if it is already a core.
If its a core, then it fires a simple event that sets a flag.
Copy the event for every 5 year jump, with year specific flags.
Keep in mind that though the event is province specific, any flags that are created by the event go to the province owner.
Code:
# id = 777bbbcccc
###### 777 = just a prefix
######### bbb = province number
############ cccc = year
id = 777400[COLOR="YellowGreen"]1450[/COLOR]
trigger = {
NOT = { core = { province = 400 data = -1 } }
}
random = no
province = 400
name = "We hold province #400"
desc = "We hold province #400"
style = 1
date = { day = 1 month = august year = [COLOR="YellowGreen"]1450[/COLOR] }
action_a ={
name = "yay.."
command = { type = setflag which = [provincialcores400[COLOR="YellowGreen"]1450][/COLOR] }
command = { type = treasury value = 1 } #Im generous.
}
}
id = 777400[COLOR="YellowGreen"]1455[/COLOR]
trigger = {
NOT = { core = { province = 400 data = -1 } }
}
random = no
province = 400
name = "We hold province #400"
desc = "We hold province #400"
style = 1
date = { day = 1 month = august year = [COLOR="YellowGreen"]1455[/COLOR] }
action_a ={
name = "yay.."
command = { type = setflag which = [provincialcores400[COLOR="YellowGreen"]1455[/COLOR]] }
command = { type = treasury value = 1 }#Im generous.
}
}
id = 777400[COLOR="YellowGreen"]1460[/COLOR]
trigger = {
NOT = { core = { province = 400 data = -1 } }
}
random = no
province = 400
name = "We hold province #400"
desc = "We hold province #400"
style = 1
date = { day = 1 month = august year = [COLOR="YellowGreen"]1460[/COLOR] }
action_a ={
name = "yay.."
command = { type = setflag which = [provincialcores400[COLOR="YellowGreen"]1460 [/COLOR]}
command = { type = treasury value = 1 }#Im generous.
}
}
...
Duplicated for every 5 years.
group 2: fire for owner of province, checks to see if it is already a core and if it has the necessary collection of flags.
Code:
id = 777400[COLOR="#ff8c00"]1451[/COLOR]
trigger = {
flag = [provincialcores4001420] # 400 = the province
flag = [provincialcores4001425] # 1425 = the year
flag = [provincialcores4001430]
flag = [provincialcores4001435]
flag = [provincialcores4001440]
flag = [provincialcores4001445]
flag = [provincialcores4001450]
NOT = { core = { province = 400 data = -1 } }
}
random = no
province = 400
name = "We've held province #400 for 30 years"
desc = "We've held province #400 for 30 years.. more or less"
style = 1
date = { day = 1 month = august year = [COLOR="DarkOrange"]1451[/COLOR] }
action_a ={
name = "yay.."
command = { type = addcore which = 400 }
}
}
id = 777400[COLOR="#ff8c00"]1456[/COLOR]
trigger = {
flag = [provincialcores4001425]
flag = [provincialcores4001430]
flag = [provincialcores4001435]
flag = [provincialcores4001440]
flag = [provincialcores4001445]
flag = [provincialcores4001450]
flag = [provincialcores4001455]
NOT = { core = { province = 400 data = -1 } }
}
random = no
province = 400
name = "We've held province #400 for 30 years"
desc = "We've held province #400 for 30 years.. more or less"
style = 1
date = { day = 1 month = august year = [COLOR="#ff8c00"]1456[/COLOR] }
action_a ={
name = "yay.."
command = { type = addcore which = 400 }
}
}
id = 777400[COLOR="#ff8c00"]1461[/COLOR]
trigger = {
flag = [provincialcores4001430]
flag = [provincialcores4001435]
flag = [provincialcores4001440]
flag = [provincialcores4001445]
flag = [provincialcores4001450]
flag = [provincialcores4001455]
flag = [provincialcores4001460]
NOT = { core = { province = 400 data = -1 } }
}
random = no
province = 400
name = "We've held province #400 for 30 years"
desc = "We've held province #400 for 30 years.. more or less"
style = 1
date = { day = 1 month = august year = [COLOR="#ff8c00"]1461[/COLOR] }
action_a ={
name = "yay.."
command = { type = addcore which = 400 }
}
}
Wipping up a simple program (I write in C) to mass produce events for every 5 year jump and for every province is not difficult.
Consider, however, that such a system would create ~80 flags for each province. If your a continent spanning empire, you will have over a thousand flags just for the gaining of cores.
In C, setting thousands of variables isnt a problem. But I dont know how it would work in EU2's engine, nor do I know if it would slow it down.
And that does NOT include a system for loosing cores if you lost the province after you gained a core on it.
(though, perhaps that makes sense.. and if one includes a BB and/or religion condition on it.. *contemplates* )
Last edited: