Hi, I'm just getting back into CK2 modding after a hiatus of several years, so I'm very rusty with event/scripting stuff.
I created some new minor titles for my small personal mod, and I think I have them set up and working okay, but I wanted to make sure that they are lost when the holder becomes king/emperor, as they're really only meant for heirs.
Firstly, what is the correct trigger to use here? I'm guessing something like this:
Code:
NOT= {
primary_title = {
OR = {
tier = king
tier = emperor
}
}
}
Secondly, I'd like to set up one of these titles so that an event fires whenever the title is lost (due to the holder dying or becoming king/emperor himself) - I assume that's what the 'lose_effect = {' part is for, but I'd like to know how to set it to fire an event that only fires for people in that realm. I don't want every character in the world being told that some random guy in the kingdom of Burgundy has died.
Ideally it would be nice if the event only fired for every count tier character or above in the top realm (Francia, HRE, Hispania, etc.) the title is related to. Does that make sense?
So, two examples:
A) John is duke of York and holds the minor title of co-king of England, which is a title he holds as heir to the throne because he has been granted it by his father the king. The king dies and John becomes king by primogeniture, and so he should automatically lose the co-king minor title (so I need a trigger for that to happen), and every landed (count or higher) character within de jure Britannia (the empire title) should get an event saying that John is no longer co-king because he has become full/proper king.
B) John is duke of York and holds the minor title of co-king of England, which is a title he holds as heir to the throne because he has been granted it by his father the king. He dies prematurely, before his father, and every landed (count or higher) character within de jure Britannia (the empire title) should get an event saying that John has died and never managed to become king in his own right.
So what I'm after is a kind of template for a news event that only fires for landed feudal characters within de jure Britannia, and only fires under those particular circumstances, which I assume is via the 'lose_effect = {' part.
Thanks, and hope it's pretty simple!