I'm trying to write a targeted decision that allows me to grant vice-royalties to republics. I've been able to tweak existing files in the "governments" and "laws" folder that allow republics to grant vice-royalties, but only to feudal rulers. I think I have all the scopes and conditions down, but I don't know what to put as the effect.
This is my first time trying to write a targeted decision, so if you notice any mistakes I would appreciate if you could point them out, thanks!
Code:
targetted_decisions = {
Grant_Viceroyalty = {
filter = sub_realm
ai_target_filter = sub_realm
from_potential = {
OR = {
has_law = vice_royalty_2
has_law = vice_royalty_1
}
}
potential = {
is_vassal_or_below = FROM
}
allow = {
any_demesne_title = {
can_be_given_away = yes
higher_tier_than = COUNT
is_titular = no
is_landless_type_title = no
}
effect = {
}
revoke_allowed = {
always = no
}
ai_will_do = {
factor = 0
}
}
This is my first time trying to write a targeted decision, so if you notice any mistakes I would appreciate if you could point them out, thanks!