character interactions updating (again)
This commit is contained in:
parent
068d323484
commit
568b018fc5
29 changed files with 4043 additions and 1867 deletions
|
|
@ -1,4 +1,9 @@
|
|||
# Be aware that the actual granting of the title happens in code!
|
||||
# Interactions for players granting titles to their vassals.
|
||||
#
|
||||
# Implementation note:
|
||||
# NPC/AI does not invoke 'grant_titles_interaction' or 'grant_governorship_interaction' by traditional means.
|
||||
# Granting titles is instead handled by custom C++ code which picks the appropriate one given character properties.
|
||||
#
|
||||
# Extra custom Grant Titles functionality:
|
||||
# - scope:government_type may be set when a specific government type will be switched to with the title grant (not set = default government type)
|
||||
#
|
||||
|
|
@ -30,9 +35,8 @@ grant_titles_interaction = {
|
|||
is_shown = {
|
||||
scope:puppet_or_actor != scope:recipient
|
||||
scope:puppet_or_actor ?= {
|
||||
NOT = {
|
||||
government_has_flag = cannot_be_vassal_or_liege
|
||||
}
|
||||
is_landless_adventurer = no
|
||||
is_landless_merchant = no
|
||||
}
|
||||
scope:recipient = {
|
||||
OR = {
|
||||
|
|
@ -75,6 +79,7 @@ grant_titles_interaction = {
|
|||
limit = { is_ruler = no }
|
||||
is_imprisoned = no
|
||||
}
|
||||
NOT = { is_imprisoned_by = scope:puppet_or_actor }
|
||||
# DON'T TAKE OTHER PLAYERS' ACCLAIMED KNIGHTS
|
||||
custom_description = {
|
||||
text = grant_title_stealing_acclaimed_knight
|
||||
|
|
@ -142,6 +147,78 @@ grant_titles_interaction = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
# When republics grant titles to other republics
|
||||
trigger_if = {
|
||||
limit = {
|
||||
scope:actor = { government_has_flag = government_is_republic }
|
||||
scope:recipient = { government_has_flag = government_is_republic }
|
||||
scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary
|
||||
}
|
||||
# Republic governors can only hold titles neighboring any existing titles
|
||||
scope:recipient = {
|
||||
# Landed being granted additional land
|
||||
trigger_if = {
|
||||
limit = {
|
||||
is_landed = yes
|
||||
scope:target = { is_noble_family_title = no }
|
||||
}
|
||||
# Grant County
|
||||
trigger_if = {
|
||||
limit = { scope:target.tier = tier_county }
|
||||
republic_can_grant_county_to_landed_trigger = yes
|
||||
}
|
||||
# Grant Duchy+
|
||||
trigger_else = { republic_can_grant_duchy_or_higher_to_landed_trigger = yes }
|
||||
}
|
||||
# Landless being granted land for first time
|
||||
trigger_else = {
|
||||
# Duchy+ must be de jure above selected counties
|
||||
trigger_if = {
|
||||
limit = { scope:target.tier > tier_county }
|
||||
republic_can_grant_duchy_or_higher_to_landless_trigger = yes
|
||||
}
|
||||
# County must be neighbor or de jure below selected titles
|
||||
trigger_else = {
|
||||
custom_tooltip = {
|
||||
text = republic_title_must_be_neighboring_desc
|
||||
trigger_if = {
|
||||
limit = {
|
||||
any_in_list = {
|
||||
list = target_titles
|
||||
count > 1
|
||||
}
|
||||
}
|
||||
any_in_list = {
|
||||
list = target_titles
|
||||
count = all
|
||||
trigger_if = {
|
||||
limit = { tier = tier_barony }
|
||||
de_jure_liege = { is_in_list = target_titles }
|
||||
}
|
||||
trigger_else_if = {
|
||||
limit = { tier = tier_county }
|
||||
OR = {
|
||||
any_title_to_title_neighboring_county = { is_in_list = target_titles }
|
||||
any_in_de_jure_hierarchy = {
|
||||
tier = tier_barony
|
||||
is_in_list = target_titles
|
||||
}
|
||||
}
|
||||
}
|
||||
trigger_else = {
|
||||
any_in_de_jure_hierarchy = {
|
||||
tier = tier_county
|
||||
is_in_list = target_titles
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
can_be_picked_title = {
|
||||
|
|
@ -178,6 +255,16 @@ grant_titles_interaction = {
|
|||
always = no
|
||||
}
|
||||
}
|
||||
trigger_if = {
|
||||
limit = {
|
||||
tier > tier_county
|
||||
scope:recipient = { government_has_flag = government_is_herder }
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = GRANT_TITLES_ITEM_CANT_GIVE_ABOVE_COUNTY_TO_HERDER
|
||||
always = no
|
||||
}
|
||||
}
|
||||
|
||||
trigger_if = {
|
||||
limit = { is_nomad_title = yes }
|
||||
|
|
@ -258,6 +345,7 @@ grant_titles_interaction = {
|
|||
custom_description = {
|
||||
text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch
|
||||
subject = scope:puppet_or_actor.diarch
|
||||
object = scope:puppet_or_actor
|
||||
NAND = {
|
||||
# Only applies if we have an active diarchy.
|
||||
scope:puppet_or_actor = { has_active_diarchy = yes }
|
||||
|
|
@ -303,10 +391,75 @@ grant_titles_interaction = {
|
|||
|
||||
custom_description = {
|
||||
text = grant_titles_interaction_title_being_wagered
|
||||
subject = scope:puppet_or_actor
|
||||
NOT = {
|
||||
scope:target = { has_variable = wagered_county }
|
||||
}
|
||||
}
|
||||
|
||||
# When republics grant titles to other republics
|
||||
trigger_if = {
|
||||
limit = {
|
||||
scope:actor = { government_has_flag = government_is_republic }
|
||||
scope:recipient = { government_has_flag = government_is_republic }
|
||||
scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary
|
||||
}
|
||||
# Republic governors can only hold titles neighboring any existing titles
|
||||
scope:recipient = {
|
||||
# Landed being granted additional land
|
||||
trigger_if = {
|
||||
limit = {
|
||||
is_landed = yes
|
||||
scope:target = { is_noble_family_title = no }
|
||||
}
|
||||
# Grant County
|
||||
trigger_if = {
|
||||
limit = { scope:target.tier = tier_county }
|
||||
republic_can_grant_county_to_landed_trigger = yes
|
||||
}
|
||||
# Grant Duchy+
|
||||
trigger_else = { republic_can_grant_duchy_or_higher_to_landed_trigger = yes }
|
||||
}
|
||||
# Landless being granted land for first time
|
||||
trigger_else = {
|
||||
# Duchy+ must be de jure above selected counties
|
||||
trigger_if = {
|
||||
limit = { scope:target.tier > tier_county }
|
||||
republic_can_grant_duchy_or_higher_to_landless_trigger = yes
|
||||
}
|
||||
# County must be neighbor or de jure below selected titles
|
||||
trigger_else = {
|
||||
custom_tooltip = {
|
||||
text = republic_title_must_be_neighboring_desc
|
||||
trigger_if = {
|
||||
limit = {
|
||||
any_in_list = {
|
||||
list = target_titles
|
||||
count > 0
|
||||
}
|
||||
}
|
||||
OR = {
|
||||
scope:target = {
|
||||
OR = {
|
||||
is_in_list = target_titles
|
||||
any_title_to_title_neighboring_county = { is_in_list = target_titles }
|
||||
trigger_if = {
|
||||
limit = { tier = tier_barony }
|
||||
de_jure_liege = { is_in_list = target_titles }
|
||||
}
|
||||
}
|
||||
}
|
||||
any_in_list = {
|
||||
list = target_titles
|
||||
is_de_jure_liege_or_above_target = scope:target
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto_accept = yes
|
||||
|
|
@ -2301,6 +2454,153 @@ grant_governorship_interaction = {
|
|||
}
|
||||
|
||||
can_be_picked_title = {
|
||||
scope:target = {
|
||||
is_leased_out = no
|
||||
|
||||
scope:recipient = {
|
||||
trigger_if = { # Governors can only be appointed to certain titles
|
||||
limit = {
|
||||
is_governor = yes
|
||||
scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary
|
||||
}
|
||||
custom_tooltip = { # Only one province of highest rank
|
||||
text = only_one_province_of_highest_rank_tt
|
||||
NAND = {
|
||||
highest_held_title_tier = scope:target.tier
|
||||
scope:target.tier >= main_administrative_tier
|
||||
trigger_if = {
|
||||
limit = {
|
||||
scope:target.tier >= tier_duchy
|
||||
}
|
||||
scope:target = { # We make an exception if recipient controls at least one de jure county
|
||||
any_de_jure_county = {
|
||||
count < 1
|
||||
OR = {
|
||||
holder = scope:recipient
|
||||
holder = { is_vassal_or_below_of = scope:recipient }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = admin_must_be_de_jure_or_neighboring
|
||||
any_held_title = {
|
||||
OR = {
|
||||
# The target title is part of your de jure structure
|
||||
is_de_jure_liege_or_above_target = scope:target
|
||||
target_is_de_jure_liege_or_above = scope:target
|
||||
# Or is a neighboring county which de jure duchy is not part of your realm
|
||||
AND = {
|
||||
tier >= tier_county
|
||||
any_title_to_title_neighboring_county = { this = scope:target }
|
||||
scope:target = {
|
||||
tier = tier_county
|
||||
duchy = {
|
||||
OR = {
|
||||
NOT = { exists = holder }
|
||||
holder = {
|
||||
NOR = {
|
||||
is_vassal_or_below_of = scope:puppet_or_actor
|
||||
this = scope:puppet_or_actor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
trigger_if = { # If recipient is landless and only have a family title, target title must be a duchy or above
|
||||
limit = {
|
||||
is_landless_ruler = yes
|
||||
any_held_title = { is_noble_family_title = yes }
|
||||
scope:target.tier < min_appointment_tier
|
||||
}
|
||||
primary_title.tier <= scope:target.tier
|
||||
}
|
||||
trigger_if = { # If recipient is a count, they can get only get counties within the same duchy
|
||||
limit = {
|
||||
highest_held_title_tier = tier_county
|
||||
main_administrative_tier > tier_county
|
||||
is_landed = yes
|
||||
scope:target.tier = tier_county
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = admin_count_grant_only_counties
|
||||
any_held_title = { duchy = scope:target.duchy }
|
||||
}
|
||||
}
|
||||
tgp_is_ceremonial_liege_trigger = no
|
||||
}
|
||||
|
||||
custom_tooltip = {
|
||||
text = GRANT_TITLES_ITEM_CANT_GIVE_ADMIN_PRIMARY
|
||||
this != scope:puppet_or_actor.capital_province.duchy
|
||||
}
|
||||
|
||||
trigger_if = {
|
||||
limit = { is_noble_family_title = yes }
|
||||
custom_tooltip = {
|
||||
text = GRANT_TITLES_ITEM_CANT_GIVE_NOBLE_FAMILY
|
||||
always = no
|
||||
}
|
||||
}
|
||||
trigger_if = {
|
||||
limit = { exists = var:ceremonial_title }
|
||||
custom_tooltip = {
|
||||
text = GRANT_TITLES_ITEM_CANT_GIVE_CEREMONIAL_TITLE
|
||||
always = no
|
||||
}
|
||||
}
|
||||
|
||||
trigger_if = {
|
||||
limit = {
|
||||
list_size:target_titles > 0
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = GRANT_TITLES_ITEM_ADMIN_CANT_GIVE_MORE_THAN_ONE
|
||||
any_in_list = {
|
||||
list = target_titles
|
||||
scope:target ?= this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
trigger_if = {
|
||||
limit = { scope:target = title:k_fashion }
|
||||
NOT = { scope:target = title:k_fashion }
|
||||
}
|
||||
}
|
||||
|
||||
custom_description = {
|
||||
text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch
|
||||
subject = scope:puppet_or_actor.diarch
|
||||
object = scope:puppet_or_actor
|
||||
NAND = {
|
||||
# Only applies if we have an active diarchy.
|
||||
scope:puppet_or_actor = { has_active_diarchy = yes }
|
||||
# Now, prevent us from giving away our diarch's land to invalidate them...
|
||||
scope:target = {
|
||||
any_dejure_vassal_title_holder = { this = scope:puppet_or_actor.diarch }
|
||||
# ... _unless_ we're giving it _to_ the diarch.
|
||||
scope:recipient != scope:puppet_or_actor.diarch
|
||||
# Plus we only care if the title is below our tier.
|
||||
tier < scope:puppet_or_actor.highest_held_title_tier
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
custom_description = {
|
||||
text = grant_titles_interaction_title_being_wagered
|
||||
subject = scope:puppet_or_actor
|
||||
NOT = {
|
||||
scope:target = { has_variable = wagered_county }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto_accept = yes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue