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

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:
yeah this is more or less what i had realised, i've pretty much given up on the idea - i've only modded single events before and i've had huge trouble getting some of them to work, so....

as to lossing cores - i'm not so sure how that one would be handled, some proviences when lost were not particulaly missed, whereas others would be claimed for centurys afterwards (ie Henry viii was still claiming to be king of france well over 100 years after England had had any sort of real claim on France)