I've tried and haven't had any luck with it.
Thanks.
Here's another conundrum I'm trying to figure out. I'm trying to create a decision (actually a few to fit different situations) that allow independent dukes and counts to pledge allegiance to a bigger neighbor of the same religion. I'm not going to go crazy on this, so don't worry, but I want to set up the situation where for example, the Count of Toulouse becomes vassal to the King of Aragon at the time of the Albigensian Crusade, and the Andalusian Emirates can pledge allegiance to Mauretania through a similar mechanism. In both cases, you need to be 'friends' with your prospective overlord (+40 relations).
But I'm trying to get the basic decision going, and this is what I have:
Code:
decisions = {
pledge_allegiance = {
potential = {
independent = yes
}
allow = {
any_neighbor_province = {
liege = {
religion = ROOT
}
}
}
effect = {
set_defacto_liege = PREV
prestige = 100
}
ai_will_do = {
factor = 100
}
} #closing pledge_allegiance decision
} #closing file fealty_decisions.txt
I'm not sure if I'm doing something that isn't valid, but the decision does not even appear when I start up as say an independent Duke of Aquitaine. I'll keep working at it, but anyone with any ideas would have my greatest admiration.

I took the code from various events and files, including the vassalage effect from cb_types.txt.
I have in mind to have these decisions available if you are not your liege's de jure vassal, have bad relations, and wish to break off the relationship. In those cases, it's rather a case of paying homage to a powerful monarch and then when his less than inspiring son takes the throne seeing your interests elsewhere. It could also be applied to say Mongol vassalage of petty kingdoms and the defection of much of central Italy to the papacy in the early XII century.