This event will fire if the Papacy is destroyed, and none of the default Papal provinces are available for some reason.
It will convert any eligible bishopric into a new papacy.
By the way, this event uses a new trick... it is normally not possible to do a province CRC check inside a province event, but by wrapping this CRC inside the owner CRC it appears to work
No event text as this can only be received by the AI anyway.
It will convert any eligible bishopric into a new papacy.
Code:
province_event = { #Restoration of Papacy
id = 23236
picture = "event_religion"
trigger = {
condition = { type = ai }
condition = { type = not value = { type = exists value = PAPA } }
condition = { type = owner
condition = { type = form_of_goverment value = ecclestical }
condition = { type = religion value = catholic }
condition = { type = not value = { type = kingdom } } # Bugged if king-level becomes Pope
condition = { type = not value = { type = trait value = excommunicated } }
condition = { type = not value = { type = trait value = heretic } }
condition = { type = not value = { type = atwar } }
condition = { type = province province = 333 #Roma
condition = { type = or
condition = { type = not value = { type = religion value = { catholic } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = ruler_religion value = catholic } }
condition = { type = not value = { type = trait value = excommunicated } }
condition = { type = not value = { type = trait value = heretic } }
condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
condition = { type = not value = { type = has_province_effect value = { looted = yes } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { malaria = yes } } }
condition = { type = not value = { type = has_province_effect value = { small_pox = yes } } }
condition = { type = not value = { type = has_province_effect value = { typhoid_fever = yes } } }
}
}
condition = { type = province province = 222 #Avignon
condition = { type = or
condition = { type = not value = { type = religion value = { catholic } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = ruler_religion value = catholic } }
condition = { type = not value = { type = trait value = excommunicated } }
condition = { type = not value = { type = trait value = heretic } }
condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
condition = { type = not value = { type = has_province_effect value = { looted = yes } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { malaria = yes } } }
condition = { type = not value = { type = has_province_effect value = { small_pox = yes } } }
condition = { type = not value = { type = has_province_effect value = { typhoid_fever = yes } } }
}
}
condition = { type = province province = 90 #Aachen
condition = { type = or
condition = { type = not value = { type = religion value = { catholic } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = ruler_religion value = catholic } }
condition = { type = not value = { type = trait value = excommunicated } }
condition = { type = not value = { type = trait value = heretic } }
condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
condition = { type = not value = { type = has_province_effect value = { looted = yes } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { malaria = yes } } }
condition = { type = not value = { type = has_province_effect value = { small_pox = yes } } }
condition = { type = not value = { type = has_province_effect value = { typhoid_fever = yes } } }
}
}
condition = { type = province province = 171 #Valencia
condition = { type = or
condition = { type = not value = { type = religion value = { catholic } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = ruler_religion value = catholic } }
condition = { type = not value = { type = trait value = excommunicated } }
condition = { type = not value = { type = trait value = heretic } }
condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
condition = { type = not value = { type = has_province_effect value = { looted = yes } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { malaria = yes } } }
condition = { type = not value = { type = has_province_effect value = { small_pox = yes } } }
condition = { type = not value = { type = has_province_effect value = { typhoid_fever = yes } } }
}
}
condition = { type = province province = 23 #Salisbury
condition = { type = or
condition = { type = not value = { type = religion value = { catholic } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = ruler_religion value = catholic } }
condition = { type = not value = { type = trait value = excommunicated } }
condition = { type = not value = { type = trait value = heretic } }
condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
condition = { type = not value = { type = has_province_effect value = { looted = yes } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { malaria = yes } } }
condition = { type = not value = { type = has_province_effect value = { small_pox = yes } } }
condition = { type = not value = { type = has_province_effect value = { typhoid_fever = yes } } }
}
}
condition = { type = province province = 448 #Salzburg
condition = { type = or
condition = { type = not value = { type = religion value = { catholic } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = ruler_religion value = catholic } }
condition = { type = not value = { type = trait value = excommunicated } }
condition = { type = not value = { type = trait value = heretic } }
condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
condition = { type = not value = { type = has_province_effect value = { looted = yes } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { malaria = yes } } }
condition = { type = not value = { type = has_province_effect value = { small_pox = yes } } }
condition = { type = not value = { type = has_province_effect value = { typhoid_fever = yes } } }
}
}
condition = { type = province province = 774 #Jerusalem
condition = { type = or
condition = { type = not value = { type = religion value = { catholic } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = ruler_religion value = catholic } }
condition = { type = not value = { type = trait value = excommunicated } }
condition = { type = not value = { type = trait value = heretic } }
condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
condition = { type = not value = { type = has_province_effect value = { looted = yes } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { malaria = yes } } }
condition = { type = not value = { type = has_province_effect value = { small_pox = yes } } }
condition = { type = not value = { type = has_province_effect value = { typhoid_fever = yes } } }
}
}
}
condition = { type = capital }
condition = { type = religion value = catholic }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { revolt = yes } } }
condition = { type = not value = { type = has_province_effect value = { looted = yes } } }
condition = { type = not value = { type = has_province_effect value = { heretic = yes } } }
condition = { type = not value = { type = has_province_effect value = { bubonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { pneumonic_plague = yes } } }
condition = { type = not value = { type = has_province_effect value = { malaria = yes } } }
condition = { type = not value = { type = has_province_effect value = { small_pox = yes } } }
condition = { type = not value = { type = has_province_effect value = { typhoid_fever = yes } } }
}
mean_time_to_happen = {
months = 12
}
action_a = { # Become Pope
effect = { type = create_tag value = PAPA }
effect = { type = add_improvement value = tilefactory }
effect = { type = add_improvement value = church }
effect = { type = add_improvement value = large_church }
effect = { type = add_advance value = stonepit }
effect = { type = add_advance value = brickwork_structures }
effect = { type = add_advance value = basilican_structures }
effect = { type = add_advance value = romanesque_vaulting }
effect = { type = ruler_piety value = 250 }
effect = { type = clergy_loyalty value = 0.3}
effect = { type = clergy_power value = 0.4}
}
}
By the way, this event uses a new trick... it is normally not possible to do a province CRC check inside a province event, but by wrapping this CRC inside the owner CRC it appears to work
No event text as this can only be received by the AI anyway.