admin gov works

This commit is contained in:
Magpie490 2025-02-20 11:52:45 +00:00
parent 051293284c
commit 6ef778b2b5
32 changed files with 6304 additions and 103 deletions

View file

@ -0,0 +1,379 @@
###TRIGGER LIST
#is_busy_in_events_unlocalised - already in an involved event chain
#is_in_pseudo_activity_trigger - character is involved in a pseudo-activity
#has_contagious_deadly_disease_trigger
#is_healthy
#is_available
#is_available_ai
#is_available_adult
#is_available_healthy_adult
#is_available_ai_adult
#is_available_healthy_ai_adult
#is_capable_adult
#is_capable_adult_ai
#liege_is_boss_trigger
#can_select_lifestyle_focus
#can_marry
#can_become_concubine
#is_busy_in_events_localised
# For flags that will never be seen by the player and thus don't need to be localised.
is_busy_in_events_unlocalised = {
OR = {
has_character_flag = is_in_diplomacy_foreign_special_event
has_character_flag = is_in_diplomacy_family_special_event
has_character_flag = is_in_diplomacy_majesty_special_event
has_character_flag = is_in_martial_special_event
has_character_flag = is_in_stewardship_domain_special_event
has_character_flag = is_in_stewardship_duty_special_event
has_character_flag = is_in_stewardship_wealth_special_event
has_character_flag = is_in_intrigue_special_event
has_character_flag = is_in_learning_special_event
has_character_flag = is_in_task_contract_event_chain
}
}
# For flags that *may* be seen by the player, and thus need to be cloaked in a custom description to look nice.
is_busy_in_events_localised = {
custom_description = {
text = "yearly_1010_abducted"
NOT = { has_character_flag = yearly_1010_abducted }
}
custom_description = {
text = "yearly_1010_abductor"
NOT = { has_character_flag = yearly_1010_abductor }
}
}
has_contagious_deadly_disease_trigger = {
OR = {
has_trait = bubonic_plague
has_trait = smallpox
has_trait = typhus
has_trait = consumption
has_trait = measles
has_trait = dysentery
}
}
is_healthy = {
custom_tooltip = {
text = not_poor_health_tt
health >= fine_health
}
NOR = {
has_trait = infirm
has_trait = incapable
has_trait = wounded_2
has_trait = wounded_3
}
has_contagious_deadly_disease_trigger = no
}
basic_is_available_ai = {
is_alive = yes
is_imprisoned = no
is_ai = yes
is_incapable = no
has_contagious_deadly_disease_trigger = no
}
is_available_allow_travelling = {
is_alive = yes
is_in_army = no
is_imprisoned = no
is_incapable = no
has_contagious_deadly_disease_trigger = no
custom_description = {
text = ALREADY_IN_ACTIVITY
NOR = {
exists = involved_activity
has_variable = homage_liege_scope
has_character_flag = meditation_character_flag
has_character_flag = petition_liege_character_flag
has_character_flag = holding_court_character_flag
is_being_visited_on_tour_strict = yes
}
}
custom_description = {
text = ALREADY_PLANNING_ACTIVITY
NOT = { has_character_flag = planning_an_activity }
}
# Variable set within the adventure inspiration events
NOT = { has_variable = gone_adventuring }
}
is_available = {
is_travelling = no
is_available_allow_travelling = yes
}
is_available_travelling = {
is_alive = yes
is_in_army = no
is_imprisoned = no
is_incapable = no
is_travelling = yes
has_contagious_deadly_disease_trigger = no
NOT = { has_variable = gone_adventuring }
is_busy_in_events_unlocalised = no
}
is_available_travelling_adult = {
is_adult = yes
is_available_travelling = yes
}
is_available_travelling_ai_adult = {
is_adult = yes
is_ai = yes
is_available_travelling = yes
}
is_physically_able = {
is_alive = yes
is_imprisoned = no
is_incapable = no
}
is_physically_able_ai = {
is_ai = yes
is_alive = yes
is_imprisoned = no
is_incapable = no
}
is_physically_able_adult = {
is_adult = yes
is_physically_able = yes
}
is_physically_able_ai_adult = {
is_ai = yes
is_adult = yes
is_physically_able_adult = yes
}
is_available_ai = {
is_ai = yes
is_available = yes
}
is_available_child = {
is_adult = no
is_available = yes
}
is_available_child_allow_travel = {
is_adult = no
is_available_allow_travelling = yes
}
is_available_ai_child = {
is_adult = no
is_available = yes
is_ai = yes
}
is_available_healthy_child = {
is_available_child = yes
is_healthy = yes
}
is_available_healthy_ai_child = {
is_available_healthy_child = yes
is_ai = yes
}
is_available_adult = {
is_adult = yes
is_available = yes
}
is_available_ai_adult = {
is_available_adult = yes
is_ai = yes
}
is_available_healthy_adult = {
is_available_adult = yes
is_healthy = yes
}
is_available_healthy_ai_adult = {
is_available_healthy_adult = yes
is_ai = yes
}
is_available_adult_or_is_commanding = {
OR = {
is_commanding_army = yes
is_available_adult = yes
}
}
is_available_at_peace = {
is_at_war = no
is_available = yes
is_busy_in_events_unlocalised = no
}
is_available_at_peace_adult = {
is_at_war = no
is_available_adult = yes
is_busy_in_events_unlocalised = no
}
is_available_at_peace_ai_adult = {
is_available_at_peace_adult = yes
is_ai = yes
}
is_available_at_peace_adult_lenient = {
is_at_war = no
is_available_adult = yes
}
# Meaning you may be at war, but you're still located in your capital.
is_available_even_at_war_adult = {
is_available_adult = yes
is_busy_in_events_unlocalised = no
}
is_capable_adult = {
is_adult = yes
is_incapable = no
}
is_capable_adult_ai = {
is_ai = yes
is_adult = yes
is_incapable = no
}
can_select_lifestyle_focus = {
is_capable_adult = yes
is_playable_character = yes
}
is_not_hostile_towards_root = {
NOR = {
is_a_faction_member = yes
any_scheme = {
hostile_scheme_trigger = yes
scheme_target_character = root
}
is_at_war_with = root
}
}
player_target_available_for_personal_scheme_ongoing_events_trigger = {
$TARGET$ = {
trigger_if = {
limit = {
is_ai = no
$OWNER$ = { is_ruler = no }
}
is_at_war = no
}
trigger_else = {
always = yes
}
}
}
basic_is_valid_for_yearly_events_trigger = {
is_playable_character = yes
is_imprisoned = no
is_incapable = no
NOT = { exists = involved_activity }
OR = {
is_travelling = no
is_landless_adventurer = yes
}
is_busy_in_events_unlocalised = no
}
is_valid_for_narrow_yearly_events = {
is_at_war = no
is_commanding_army = no
basic_is_valid_for_yearly_events_trigger = yes
}
is_valid_for_narrow_yearly_events_adult = {
is_adult = yes
is_valid_for_narrow_yearly_events = yes
}
is_within_diplo_range = {
capital_province ?= {
save_temporary_scope_as = my_capital
$CHARACTER$.capital_province ?= {
squared_distance = {
target = scope:my_capital
value < 200000
}
}
}
}
# This trigger checks if a character is a landless adventurer
is_landless_adventurer = {
government_has_flag = government_is_landless_adventurer
is_landed = no
is_ruler = yes
}
# This trigger checks if a character is a governor in an admin realm (implying they are landed)
is_governor = {
ghas_government = administrative_government
is_landed = yes
is_independent_ruler = no
highest_held_title_tier >= tier_duchy
}
# Checks if a character is a landless house_head within an admin realm
is_landless_administrative = {
has_government = administrative_government
is_landed = no
is_house_head = yes
has_domicile = yes
}
# Checks if a character is either landed or an unlanded house head within an admin realm
is_landed_or_landless_administrative = {
OR = {
is_landed = yes
is_landless_administrative = yes
}
}
# Checks if a character is either landed, a landless house head within an admin realm, or a landless adventurer
is_playable_character = {
OR = {
is_landed = yes
is_landless_administrative = yes
is_landless_adventurer = yes
}
}
roman_restoration_is_valid_roman_empire_trigger = {
is_ai = no
OR = {
has_title = title:e_byzantium
has_title = title:e_roman_empire
}
OR = {
religion = religion:christianity_religion #Either Christian
religion = religion:hellenism_religion #Or Hellenic
}
NOT = { has_ep3_dlc_trigger = yes }
}
is_eunuch_trigger = {
OR = {
has_trait = eunuch_1
has_trait = beardless_eunuch
}
}

View file

@ -0,0 +1,411 @@
remove_guardian_interaction_visible_ward_trigger = {
OR = {
#If I am the child
this = scope:actor
#The ward has actor as its liege
AND = {
exists = employer
employer = scope:actor
}
#The guardian is actor
any_relation = {
type = guardian
this = scope:actor
}
#The guardian is actor's courtier
any_relation = {
type = guardian
is_courtier_of = scope:actor
}
}
}
remove_guardian_interaction_available_ward_trigger = {
is_busy_in_events_localised = yes
#is_imprisoned = no
}
kick_from_court_validity_trigger = {
is_busy_in_events_localised = yes
NOR = {
is_spouse_of = scope:actor
is_concubine_of = scope:actor
is_close_family_of = scope:actor
has_council_position = councillor_court_chaplain
is_diarch = yes
# Marriage major partners of diarchs.
## Female.
AND = {
is_married = yes
is_female = yes
matrilinear_marriage = yes
any_consort = { is_diarch = yes }
}
## Male.
AND = {
is_married = yes
is_male = yes
patrilinear_marriage = yes
any_consort = { is_diarch = yes }
}
}
}
ask_for_pardon_available_trigger = {
$ACTOR$ = {
is_independent_ruler = no
any_liege_or_above = {
OR = {
has_imprisonment_reason = $ACTOR$
has_banish_reason = $ACTOR$
has_execute_reason = $ACTOR$
has_revoke_title_reason = $ACTOR$
}
}
}
}
title_revocation_standard_valid_showing_failures_only_trigger = {
scope:actor = {
NOR = {
is_at_war_with = scope:recipient
has_truce = scope:recipient
}
custom_description = {
text = "character_interactions_revoke_title_from_ally_without_reason"
object = scope:recipient
OR = {
NOT = {
is_allied_to = scope:recipient
}
has_revoke_title_reason = scope:recipient
}
}
}
scope:recipient = {
is_busy_in_events_localised = yes
NOT = { has_strong_hook = scope:actor }
}
}
title_revocation_standard_can_pick_title_trigger = {
is_contested = no
custom_description = {
text = "revoke_title_not_noble_family_title"
is_noble_family_title = no
}
NOT = {
recent_history = {
type = granted
years = 1
}
}
custom_description = {
text = "character_interactions_not_rel_head_title"
is_head_of_faith = no
}
}
diarch_revocation_has_claim_check_trigger = {
custom_description = {
text = diarch_has_claim_on_revokable_title
object = scope:recipient
scope:actor = {
any_claim = {
exists = holder
holder = scope:recipient
}
}
}
}
title_revocation_is_admin_governor_trigger = {
has_government = administrative_government
is_independent_ruler = yes
save_temporary_scope_as = liege_temp
$VASSAL$ = {
is_landed_or_landless_administrative = yes
target_is_liege_or_above = scope:liege_temp
}
}
title_revocation_is_tyrannical_trigger = {
NOR = {
exists = scope:administrative_revocation
has_revoke_title_reason = $VASSAL$
trigger_if = {
limit = { exists = scope:landed_title }
has_claim_on = scope:landed_title
}
title_revocation_is_admin_governor_trigger = { VASSAL = $VASSAL$ }
faith = {
$VASSAL$ = {
NOT = { vassal_contract_has_flag = religiously_protected}
}
OR = {
AND = {
has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced
faith_hostility_level = {
target = $VASSAL$.faith
value = faith_evil_level
}
}
AND = {
has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal
faith_hostility_level = {
target = $VASSAL$.faith
value >= faith_hostile_level
}
}
}
}
}
}
vassal_revocation_is_tyrannical_trigger = {
NOR = {
exists = scope:administrative_revocation
AND = {
has_government = administrative_government
$VASSAL$ = {
has_government = administrative_government
}
}
has_revoke_title_reason = $VASSAL$
faith = {
OR = {
AND = {
has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced
faith_hostility_level = {
target = $VASSAL$.faith
value = faith_evil_level
}
}
AND = {
has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal
faith_hostility_level = {
target = $VASSAL$.faith
value >= faith_hostile_level
}
}
}
}
}
}
vassal_retraction_standard_valid_showing_failures_only_trigger = {
NOT = {
scope:actor = { is_at_war_with = scope:recipient }
}
scope:recipient = { is_busy_in_events_localised = yes }
trigger_if = {
limit = { exists = scope:secondary_recipient }
scope:secondary_recipient = { is_busy_in_events_localised = yes }
}
scope:recipient = {
NOT = { has_strong_hook = scope:actor }
}
}
diarch_retraction_is_de_jure_liege_trigger = {
custom_description = {
text = "diarch_is_de_jure_liege_of_retractable_vassal"
object = scope:recipient
scope:actor = {
any_held_title = {
any_direct_de_jure_vassal_title = { holder.liege = scope:recipient }
}
}
}
}
is_de_jure_vassal_of_liege_trigger = {
liege = {
save_temporary_scope_as = my_liege
}
primary_title = {
OR = {
de_jure_liege = {
exists = holder
holder = scope:my_liege
}
trigger_if = {
limit = {
tier = tier_duchy
}
de_jure_liege = {
de_jure_liege = {
exists = holder
holder = scope:my_liege
}
}
}
}
}
}
send_poem_positive_poem_lock_trigger = {
OR = {
is_ai = no
NOT = { has_relation_rival = scope:recipient }
NOT = { has_relation_nemesis = scope:recipient }
}
}
send_poem_negative_poem_lock_trigger = {
OR = {
is_ai = no
has_relation_rival = scope:recipient
has_relation_nemesis = scope:recipient
}
}
can_any_traveling_family_members_travel_trigger = {
NOR = {
this = scope:recipient
is_in_pool_at = scope:actor.capital_province
}
is_ruler = no
trigger_if = {
limit = {
exists = scope:recipient.host
is_child_of = scope:recipient.host
is_adult = no
}
NOT = { dynasty = scope:recipient.host.dynasty }
}
}
imprison_neutral_is_valid_showing_failures_only_triggers_trigger = {
scope:recipient = { is_busy_in_events_localised = yes }
scope:actor.liege = {
trigger_if = {
limit = { has_realm_law_flag = imprisonment_toggle_enable }
# TIT-43801
#has_realm_law_flag = imprisonment_toggle_on
NOT = { has_realm_law = tribal_authority_0 }
}
}
scope:actor = { is_imprisoned = no }
custom_description = {
text = cannot_imprison_almohad_leader
subject = scope:recipient
NOT = {
scope:recipient = { has_character_modifier = almohad_leader_modifier }
}
}
}
grant_title_rivalry_trigger = {
is_ai = yes
is_playable_character = yes
top_liege = scope:actor
faith = scope:actor.faith
reverse_opinion = {
target = top_liege
value > -50
}
opinion = {
target = top_liege
value > -50
}
trigger_if = {
limit = {
is_female = yes
faith_dominant_gender_female_or_equal = no
}
scope:recipient = { is_female = yes }
}
trigger_if = {
limit = {
is_male = yes
faith_dominant_gender_male_or_equal = no
}
scope:recipient = { is_male = yes }
}
has_dread_level_towards = {
target = scope:actor
level < 1
}
is_eunuch_trigger = no
NOR = {
this = scope:actor
this = scope:recipient
has_trait = content
has_trait = humble
has_trait = blind
has_trait = devoted
is_close_family_of = scope:recipient
has_any_good_relationship_with_character_trigger = { CHARACTER = scope:actor }
has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor }
}
}
should_prioritise_hostile_action_against_due_to_personal_relations_trigger = {
$ACTOR$ = {
OR = {
has_any_bad_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ }
opinion = {
target = $RECIPIENT$
value <= very_high_negative_opinion
}
}
}
}
should_avoid_hostile_action_against_due_to_personal_relations_trigger = {
$ACTOR$ = {
OR = {
has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ }
is_allied_to = $RECIPIENT$
opinion = {
target = $RECIPIENT$
value >= very_high_positive_opinion
}
# Plus filter out heirs & other family, unless we hate 'em.
AND = {
OR = {
is_close_or_extended_family_of = $RECIPIENT$
any_spouse = { this = $RECIPIENT$ }
is_heir_of = $RECIPIENT$
}
NOR = {
has_any_bad_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ }
exposed_cheating_on_spouse_trigger = { SPOUSE = $RECIPIENT$ }
AND = {
is_ai = yes
opinion = {
target = $RECIPIENT$
value <= low_negative_opinion
}
}
}
}
}
}
}
should_avoid_hostile_action_against_due_to_liege_relations_trigger = {
$ACTOR$ = {
exists = liege
liege = {
OR = {
has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ }
is_allied_to = $RECIPIENT$
opinion = {
target = $RECIPIENT$
value >= very_high_positive_opinion
}
}
}
}
}
is_asking_for_gold_in_ransom_trigger = {
OR = {
scope:extortionate_gold ?= yes
scope:extortionate_current_gold ?= yes
scope:gold ?= yes
scope:current_gold ?= yes
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,493 @@
# Example:
#
# example_trigger = {
# is_country_type = default
# free_leader_slots > 0
# }
#
#
# In a script file:
#
# trigger = {
# example_trigger = yes
# }
#
minor_gold_value_trigger = {
short_term_gold >= minor_gold_value
}
medium_gold_value_trigger = {
short_term_gold >= medium_gold_value
}
major_gold_value_trigger = {
short_term_gold >= major_gold_value
}
has_chosen_murder_execution_type = {
exists = scope:murder_method
}
seduction_target_is_close_trigger = {
scope:target = { is_in_the_same_court_as = scope:owner }
}
scope_is_close_to_root_trigger = {
OR = {
is_in_the_same_court_as = root
is_courtier_of = root
}
}
#Education triggers
has_education_martial_trigger = {
OR = {
has_trait = education_martial_1
has_trait = education_martial_2
has_trait = education_martial_3
has_trait = education_martial_4
has_trait = education_martial_5
}
}
has_education_diplomacy_trigger = {
OR = {
has_trait = education_diplomacy_1
has_trait = education_diplomacy_2
has_trait = education_diplomacy_3
has_trait = education_diplomacy_4
has_trait = education_diplomacy_5
}
}
has_education_learning_trigger = {
OR = {
has_trait = education_learning_1
has_trait = education_learning_2
has_trait = education_learning_3
has_trait = education_learning_4
has_trait = education_learning_5
}
}
has_education_stewardship_trigger = {
OR = {
has_trait = education_stewardship_1
has_trait = education_stewardship_2
has_trait = education_stewardship_3
has_trait = education_stewardship_4
has_trait = education_stewardship_5
}
}
has_education_intrigue_trigger = {
OR = {
has_trait = education_intrigue_1
has_trait = education_intrigue_2
has_trait = education_intrigue_3
has_trait = education_intrigue_4
has_trait = education_intrigue_5
}
}
is_cannibal_trigger = {
OR = {
has_trait = cannibal
any_secret = {
secret_type = secret_cannibal
}
}
}
is_murderer_trigger = {
OR = {
has_trait = murderer
any_secret = {
secret_type = secret_murder
}
}
}
likes_target_trigger = {
opinion = {
target = $CHARACTER$
value > 10
}
}
has_any_lifestyle_focus_trigger = {
OR = {
has_lifestyle = diplomacy_lifestyle
has_lifestyle = martial_lifestyle
has_lifestyle = stewardship_lifestyle
has_lifestyle = intrigue_lifestyle
has_lifestyle = learning_lifestyle
}
}
has_any_lifestyle_trait_trigger = {
OR = {
has_diplomacy_lifestyle_trait_trigger = yes
has_martial_lifestyle_trait_trigger = yes
has_stewardship_lifestyle_trait_trigger = yes
has_intrigue_lifestyle_trait_trigger = yes
has_learning_lifestyle_trait_trigger = yes
}
}
tier_or_related_liege_tier_equal_trigger = {
OR = {
highest_held_title_tier = $TIER$
AND = {
exists = liege
liege = { highest_held_title_tier = $TIER$ }
OR = {
is_close_family_of = this.liege
is_spouse_of = this.liege
}
}
}
}
tier_or_related_liege_tier_greater_or_equal_trigger = {
OR = {
highest_held_title_tier >= $TIER$
AND = {
exists = liege
liege = { highest_held_title_tier >= $TIER$ }
OR = {
is_close_family_of = this.liege
is_spouse_of = this.liege
}
}
}
}
torture_secret_trigger = {
NOT = { is_known_by = scope:actor }
OR = {
is_blackmailable_secret_trigger = { BLACKMAILER = scope:actor PARTICIPANT = $PARTICIPANT$ }
secret_is_always_interesting_trigger = yes
}
NAND = {
exists = secret_target
secret_target = scope:recipient
}
}
has_interesting_portrait_altering_trait_trigger = {
OR = {
has_trait = scarred
has_trait = blind
has_trait = beauty_bad
has_trait = beauty_good
has_trait = hunchbacked
has_trait = dwarf
has_trait = giant
has_trait = spindly
has_trait = scaly
has_trait = albino
has_trait = one_eyed
}
}
is_dangerous_faction_trigger = {
OR = {
AND = {
exists = faction_leader
faction_leader = { is_ai = no } # For now human factions are always dangerous
}
AND = {
faction_is_type = peasant_faction
months_until_max_discontent <= 12
}
AND = {
NOT = { faction_is_type = peasant_faction }
discontent_per_month > 0
}
}
}
basic_allowed_to_imprison_character_trigger = { #Only to be used in is_shown for imprison interaction and similar
save_temporary_scope_as = allowed_imprisoner
$CHARACTER$ = {
OR = {
target_is_liege_or_above = scope:allowed_imprisoner
is_foreign_court_or_pool_guest_of = scope:allowed_imprisoner
AND = {
# EP3 EVICTION
is_landless_adventurer = yes
reverse_has_opinion_modifier = {
target = scope:allowed_imprisoner
modifier = eviction_ignored_opinion
}
}
}
NOT = {
is_imprisoned_by = scope:allowed_imprisoner
}
}
}
advanced_allowed_to_imprison_character_trigger = {
save_temporary_scope_as = allowed_imprisoner
$CHARACTER$ = {
save_temporary_scope_as = allowed_prisoner
is_imprisoned = no
NOT = { is_at_war_with = scope:allowed_imprisoner }
custom_description = {
text = "character_interactions_imprison_recently_ransomed"
object = scope:allowed_prisoner
NOT = {
has_opinion_modifier = {
target = scope:allowed_imprisoner
modifier = ransomed_from_prison
}
}
}
NOT = { has_strong_hook = scope:allowed_imprisoner }
custom_tooltip = {
text = hostage_travelling_tt
NOT = { exists = var:hostage_travelling_to_warden }
}
trigger_if = {
limit = { is_landless_adventurer = yes }
scope:allowed_imprisoner = { is_landed = yes }
reverse_has_opinion_modifier = {
target = scope:allowed_imprisoner
modifier = eviction_ignored_opinion
}
domicile.domicile_location.county ?= { target_is_de_facto_liege_or_above = scope:allowed_imprisoner.primary_title }
}
}
scope:allowed_imprisoner = {
custom_description = {
text = "character_interactions_imprison_ally_without_reason"
object = scope:allowed_prisoner
OR = {
NOT = { is_allied_to = scope:allowed_prisoner }
has_imprisonment_reason = scope:allowed_prisoner
is_spouse_of = scope:allowed_prisoner
}
}
}
}
allowed_to_imprison_character_trigger = {
# We separate these out so that diarchs can imprison characters they aren't liege over.
advanced_allowed_to_imprison_character_trigger = { CHARACTER = $CHARACTER$ }
basic_allowed_to_imprison_character_trigger = { CHARACTER = $CHARACTER$ }
}
can_be_granted_titles_by = { #This is set up with trigger-ifs to allow for nice tooltip printouts in grant title interaction
save_temporary_scope_as = title_grantee
#Gender check
trigger_if = {
limit = {
is_ruler = no #Rulers can always get additional titles
is_theocratic_lessee = no #Theocratic lessees use other gender checks
NOT = { $RULER$ = { has_government = administrative_government } }
NOT = {
$RULER$.faith = {
has_dominant_ruling_gender = scope:title_grantee
}
}
}
trigger_if = {
limit = {
$RULER$ = { government_allows = state_faith }
}
$RULER$.primary_title.state_faith = {
has_dominant_ruling_gender = scope:title_grantee
}
}
trigger_else = {
$RULER$.faith = {
has_dominant_ruling_gender = scope:title_grantee
}
}
}
trigger_if = {
limit = {
is_ruler = no #Rulers can always get additional titles
is_theocratic_lessee = no #Theocratic lessees use other gender checks
$RULER$ = {
has_government = administrative_government
NOT = { has_realm_law = equal_law }
}
}
trigger_if = {
limit = {
$RULER$ = { has_realm_law = male_only_law }
}
scope:title_grantee = { is_female = no }
}
trigger_if = {
limit = {
$RULER$ = { has_realm_law = female_only_law }
}
scope:title_grantee = { is_female = yes }
}
#trigger_else = { always = yes }
}
trigger_else_if = {
limit = {
is_theocratic_lessee = yes
}
liege = $RULER$
#If this is ever visible anywhere, we need to write a custom desc "Theocratic lessees cannot only be given titles by their ruler"
}
trigger_else = {
always = yes
}
}
can_be_granted_theocratic_titles_by = { #This is set up with trigger-ifs to allow for nice tooltip printouts in grant title interaction
save_temporary_scope_as = title_grantee
#Gender check
trigger_if = {
limit = {
$RULER$.faith = { has_doctrine = doctrine_clerical_gender_female_only }
}
is_female = yes
}
trigger_else_if = {
limit = {
$RULER$.faith = { has_doctrine = doctrine_clerical_gender_male_only }
}
is_male = yes
}
trigger_else = { always = yes }
}
activate_disease_data_tracking_trigger = {
always = no #Should be set to no, unless you're gathering data
}
vassal_contract_can_be_modified_trigger = {
custom_description = {
text = vassal_contract_can_be_modified
vassal_contract_has_modifiable_obligations = yes
vassal_contract_is_blocked_from_modification = no
}
}
has_changed_contract_obligation_trigger = {
trigger_if = {
limit = {
scope:recipient = { government_has_flag = government_is_feudal }
}
custom_description = {
text = "modify_vassal_contract_select_different_obligation_level"
list_size = {
name = changed_obligations
value > 0
}
}
}
trigger_else = {
custom_description = {
text = "modify_non_feudal_vassal_contract_select_different_obligation_level"
list_size = {
name = changed_obligations
value > 0
}
}
}
}
recently_converted_faith_trigger = {
OR = {
has_character_flag = converted_by_heresy_0011_event
has_character_flag = converted_by_heresy_0010_event
has_character_flag = converted_by_forced_conversion_interaction
}
}
can_touch_someone_trigger = {
#This is to check if someone is physically capable and not in risk of disease. Remember to always ask for consent!
NOR = {
has_trait = leper
has_trait = scaly #people with eczema and other skin conditions often got the same treatment as lepers
has_trait = smallpox
has_trait = bubonic_plague
has_trait = measles #people with eczema and other skin conditions often got the same treatment as lepers
#circumstancial
has_trait = incapable
has_trait = wounded
has_trait = maimed
has_trait = typhus
# gout happens mostly in the foot, but as someone with inflammatory arthritis, I hate handshakes when my fingers are aching
has_trait = gout_ridden
}
}
is_spouse_or_romantic_partner_of_root = {
OR = {
has_relation_lover = root
is_consort_of = root
has_relation_soulmate = root
}
}
terrible_sum_of_all_skills_trigger = {
sum_of_all_skills_value <= sum_of_all_skills_threshold_terrible
}
poor_sum_of_all_skills_trigger = {
sum_of_all_skills_value <= sum_of_all_skills_threshold_poor
}
average_sum_of_all_skills_trigger = {
sum_of_all_skills_value <= sum_of_all_skills_threshold_average
}
good_sum_of_all_skills_trigger = {
sum_of_all_skills_value <= sum_of_all_skills_threshold_good
}
excellent_sum_of_all_skills_trigger = {
sum_of_all_skills_value <= sum_of_all_skills_threshold_excellent
}
scarred_trait_activation_1 = {
has_trait_xp = {
trait = scarred
track = scarred
value < 50
}
}
scarred_trait_activation_2 = {
AND = {
has_trait_xp = {
trait = scarred
track = scarred
value >= 50
}
has_trait_xp = {
trait = scarred
track = scarred
value < 100
}
}
}
scarred_trait_activation_3 = {
has_trait_xp = {
trait = scarred
track = scarred
value > 99
}
}
has_purchased_truce_with_char = {
has_variable_list = bought_truce_list
any_in_list = {
variable = bought_truce_list
this = $TARGET$
}
}

View file

@ -0,0 +1,444 @@

#Triggers for Shunned and Criminal Secret Types
# SECRET DEVIANT
secret_deviant_is_valid_trigger = {
$OWNER$ = {
NOT = {
has_trait = deviant
}
}
}
secret_deviant_is_shunned_trigger = {
$OWNER$ = {
OR = {
faith = { has_doctrine_parameter = deviancy_shunned }
any_liege_or_above = { faith = { has_doctrine_parameter = deviancy_shunned } }
}
}
}
secret_deviant_is_criminal_trigger = {
$OWNER$ = {
OR = {
faith = { has_doctrine_parameter = deviancy_illegal }
any_liege_or_above = { faith = { has_doctrine_parameter = deviancy_illegal } }
}
}
}
# SECRET DEVIANT - END
# SECRET HOMOSEXUAL
secret_homosexual_is_valid_trigger = {
$OWNER$ = {
NOT = {
has_trait = sodomite
}
is_male = yes #Only for men since it is localized as Sodomite and also because female homosexuality historically hasn't been "a big deal" in most cultures
}
}
secret_homosexual_is_shunned_trigger = {
$OWNER$ = {
OR = {
faith = { has_doctrine_parameter = homosexuality_shunned }
any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_shunned } }
}
}
}
secret_homosexual_is_criminal_trigger = {
$OWNER$ = {
OR = {
faith = { has_doctrine_parameter = homosexuality_illegal }
any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_illegal } }
}
}
}
# SECRET HOMOSEXUAL - END
# SECRET MURDER ATTEMPT
secret_murder_attempt_is_valid_trigger = {
NOT = { $OWNER$ = $TARGET$ } # Murder requires two people
trigger_if = { # If the target is dead, check that the killer isn't the owner since then the attempt isn't really an attempt...
limit = {
$TARGET$ = { is_alive = no }
exists = $TARGET$.killer
}
NOT = {
$TARGET$.killer = $OWNER$
}
}
}
secret_murder_attempt_is_shunned_trigger = {
$TARGET$ = {
save_temporary_scope_as = attempted_murder_target
}
$OWNER$ = {
OR = {
NOT = { exists = liege }
any_liege_or_above = {
NOR = {
this = scope:attempted_murder_target
is_spouse_of = scope:attempted_murder_target
is_close_family_of = scope:attempted_murder_target
}
}
#You are your own liege (independent) or have no liege (pool)
liege = this
}
}
}
secret_murder_attempt_is_criminal_trigger = {
$TARGET$ = {
save_temporary_scope_as = attempted_murder_target
}
$OWNER$ = {
any_liege_or_above = {
NOR = {
this = scope:attempted_murder_target
is_spouse_of = scope:attempted_murder_target
is_close_family_of = scope:attempted_murder_target
}
}
}
}
#SECRET MURDER ATTEMPT - END
# SECRET CANNIBAL
secret_cannibal_is_valid_trigger = {
$OWNER$ = {
NOT = { has_trait = cannibal }
}
}
secret_cannibal_is_shunned_trigger = {
$OWNER$ = { always = no }
}
secret_cannibal_is_criminal_trigger = {
$OWNER$ = {
OR = {
faith = {
NOT = { has_doctrine_parameter = cannibalism_legal }
}
any_liege_or_above = {
faith = {
NOT = { has_doctrine_parameter = cannibalism_legal }
}
}
}
}
}
# SECRET CANNIBAL - END
# SECRET LOVER
secret_lover_is_valid_trigger = {
$TARGET$ = {
save_temporary_scope_as = target
}
$OWNER$ = {
has_relation_lover = scope:target
NOT = { is_consort_of = scope:target }
}
}
#Placed ahead of the Shunned trigger, so that the shunned trigger can refer back to this
secret_lover_is_criminal_trigger = {
$TARGET$ = { save_temporary_scope_as = criminal_partner } #Different name to the scope in the shunned trigger, to prevent issues
$OWNER$ = {
OR = {
#Female adultery criminal
AND = {
is_female = yes
OR = {
faith = { has_doctrine_parameter = adultery_female_crime }
any_liege_or_above = { faith = { has_doctrine_parameter = adultery_female_crime } }
}
}
#Male adultery criminal
AND = {
is_male = yes
OR = {
faith = { has_doctrine_parameter = adultery_male_crime }
any_liege_or_above = { faith = { has_doctrine_parameter = adultery_male_crime } }
}
}
#Sodomy criminal
AND = {
is_male = yes
scope:criminal_partner = { is_male = yes }
OR = {
faith = { has_doctrine_parameter = homosexuality_illegal }
any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_illegal } }
}
}
}
}
}
secret_lover_is_shunned_trigger = {
$TARGET$ = { save_temporary_scope_as = partner }
$OWNER$ = {
save_temporary_scope_as = lover_owner
OR = {
#Female adultery shunned
AND = {
is_female = yes
OR = {
faith = { has_doctrine_parameter = adultery_female_shunned }
any_liege_or_above = { faith = { has_doctrine_parameter = adultery_female_shunned } }
}
}
#Male adultery shunned
AND = {
is_male = yes
OR = {
faith = { has_doctrine_parameter = adultery_male_shunned }
any_liege_or_above = { faith = { has_doctrine_parameter = adultery_male_shunned } }
}
}
#Sodomy shunned
AND = {
is_male = yes
scope:partner = { is_male = yes }
OR = {
faith = { has_doctrine_parameter = homosexuality_shunned }
any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_shunned } }
}
}
#Incest is shunned
relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:partner FAITH = scope:lover_owner.faith }
any_liege_or_above = {
save_temporary_scope_as = liege_or_above
scope:lover_owner = {
relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:partner FAITH = scope:liege_or_above.faith }
}
}
}
#And it doesn't fulfill the criminal conditions
NOT = {
secret_lover_is_criminal_trigger = {
OWNER = scope:lover_owner
TARGET = scope:partner
}
}
}
}
# SECRET LOVER - END
# SECRET MURDER
secret_murder_is_trivial_trigger = {
#Is the murderer important enough to get away with it?
$OWNER$ = { highest_held_title_tier >= tier_county }
#Is it a murder that people might care about?
OR = {
#Independent rulers have little fear in terms of legal consequences for their actions.
$OWNER$ = { is_independent_ruler = yes }
#Otherwise, certain victims are just not worth a strong hook.
$TARGET$ = {
NOR = {
#If landless or a baron, must have no important landed family.
AND = {
OR = {
is_ruler = no
highest_held_title_tier = tier_barony
}
any_close_or_extended_family_member = { highest_held_title_tier >= $OWNER$.primary_title.tier }
}
#Otherwise, characters who are two tiers lower than you arguably aren't nearly as much of a concern (again, providing they lack important family).
AND = {
tier_difference = {
target = $OWNER$
value >= -1
}
#Be a bit harsher with this, as these characters are the most likely to be relatives of the $OWNER$'s piers.
any_close_or_extended_family_member = {
tier_difference = {
target = $OWNER$
value >= -1
}
}
}
}
}
}
}
secret_murder_is_valid_trigger = {
$TARGET$ = {
is_alive = no
killer = $OWNER$
}
}
#Murder attempts again unimportant characters are considered less serious.
secret_murder_is_shunned_trigger = {
$OWNER$ = {
secret_murder_is_trivial_trigger = {
OWNER = $OWNER$
TARGET = $TARGET$
}
}
}
#If any of the get-out-if-imprisonment free clauses don't apply, then the murder is criminal
secret_murder_is_criminal_trigger = {
$OWNER$ = {
NOT = {
$OWNER$ = {
secret_murder_is_trivial_trigger = {
OWNER = $OWNER$
TARGET = $TARGET$
}
}
}
}
}
# SECRET MURDER - END
# SECRET NON-BELIEVER
secret_non_believer_is_valid_trigger = {
$OWNER$ = {
NOT = {
has_character_modifier = known_non_believer
}
}
}
secret_non_believer_is_shunned_trigger = {
$OWNER$ = { is_clergy = no }
}
secret_non_believer_is_criminal_trigger = {
$OWNER$ = { is_clergy = yes }
}
# SECRET NON-BELIEVER - END
# SECRET INCEST
secret_incest_is_valid_trigger = {
$OWNER$ = {
NOT = {
has_trait = incestuous
}
}
}
secret_incest_is_shunned_trigger = {
$OWNER$ = {
OR = {
faith = { NOT = { has_doctrine_parameter = allows_unrestricted_marriage } }
any_liege_or_above = { faith = { NOT = { has_doctrine_parameter = allows_unrestricted_marriage } } }
}
}
}
secret_incest_is_criminal_trigger = {
$OWNER$ = { always = no }
}
# SECRET INCEST - END
# SECRET WITCH
secret_witch_is_valid_trigger = {
$OWNER$ = {
NOT = {
has_trait = witch
}
}
}
secret_witch_is_shunned_trigger = {
$OWNER$ = {
OR = {
faith = { has_doctrine_parameter = witchcraft_shunned }
any_liege_or_above = { faith = { has_doctrine_parameter = witchcraft_shunned } }
}
}
}
secret_witch_is_criminal_trigger = {
$OWNER$ = {
OR = {
faith = { has_doctrine_parameter = witchcraft_illegal }
any_liege_or_above = { faith = { has_doctrine_parameter = witchcraft_illegal } }
}
}
}
# SECRET WITCH - END
# SECRET CRYPTO-RELIGIONIST
# Don't add the crypto-religionist trait if they practice that faith in the open
secret_crypto_religionist_is_valid_trigger = {
$OWNER$ = {
AND = {
exists = secret_faith
NOT = { secret_faith = $OWNER$.faith }
}
}
}
# Same as secret non-believer
secret_crypto_religionist_is_shunned_trigger = {
$OWNER$ = { is_clergy = no }
}
secret_crypto_religionist_is_criminal_trigger = {
$OWNER$ = { is_clergy = yes }
}
# SECRET CRYPTO-RELIGIONIST - END
# SECRET EMBEZZLER
secret_embezzler_is_valid_trigger = {
# Can't embezzle from yourself.
## Well, you can.
### That's honestly even a fairly common white collar crime.
#### You just can't in-game.
##### One rule for the wealthy, another for the rest of us [sigh].
NOT = { $OWNER$ = $TARGET$ }
}
# Embezzler is only criminal if the target is your liege _and_ the amount is very high.
secret_embezzler_is_criminal_trigger = {
$OWNER$ = {
any_secret = {
secret_type = secret_embezzler
secret_target ?= $OWNER$.liege
var:embezzlement_stake >= {
value = $OWNER$.monumental_gold_value
multiply = 1.5
}
}
}
}
# SECRET EMBEZZLER - END
# SECRET COUP_LEADER
secret_coup_plotter_is_valid_trigger = {
# Can't coup yourself
NOT = { $OWNER$ = $TARGET$ }
# Both of y'all must still be admin
$OWNER$ = { has_government = administrative_government }
$TARGET$ = { has_government = administrative_government }
}
secret_coup_plotter_is_criminal_trigger = {
always = yes
}
# SECRET COUP_LEADER - END
secret_raid_estate_is_valid_trigger = {
NOT = { $OWNER$ = $TARGET$ }
}
secret_raid_estate_is_criminal_trigger = {
NOT = {
$OWNER$.var:raid_estate_permission ?= $TARGET$.house
}
}

View file

@ -0,0 +1,56 @@
#Special succession types
#If adding new types to the decision, use a trigger, otherwise they may break if the culture is split.
special_succession_witengamot_trigger = {
culture = { has_cultural_parameter = witenagemot_succession_enabled }
}
special_succession_thing_trigger = {
culture = { has_cultural_parameter = scandinavian_elective_enabled }
}
special_succession_tanistry_trigger = {
culture = {
OR = {
has_cultural_pillar = heritage_brythonic
has_cultural_pillar = heritage_goidelic
}
}
}
special_succession_jirga_trigger = {
culture = { has_cultural_parameter = tribal_elective_enabled }
}
historical_succession_access_single_heir_succession_law_trigger = {
OR = {
has_title = title:k_austria
has_title = title:e_roman_empire
has_title = title:e_byzantium
AND = {
has_title = title:e_france
is_target_in_global_variable_list = {
name = unavailable_unique_decisions
target = flag:flag_reformed_carolingian_empire
}
}
#Add any subsequent exceptions here.
}
NOT = { has_government = administrative_government }
}
historical_succession_access_single_heir_succession_law_youngest_trigger = {
NOT = { has_government = administrative_government }
OR = {
#has_title = title:e_byzantium
#Add any subsequent exceptions here.
}
}
historical_succession_access_single_heir_dynasty_house_trigger = {
NOT = { has_government = administrative_government }
AND = {
has_title = title:d_bohemia
culture = { has_innovation = innovation_table_of_princes }
}
}

View file

@ -0,0 +1,83 @@

### Vassal stance trigger list
# has_same_vassal_stance_as_trigger
has_same_vassal_stance_as_trigger = {
is_independent_ruler = no
save_temporary_scope_as = vassal_temp
$COMPARE$ = {
is_independent_ruler = no
save_temporary_scope_as = compare_temp
}
scope:compare_temp = {
switch = {
trigger = has_vassal_stance
courtly = { scope:vassal_temp = { has_vassal_stance = courtly } }
glory_hound = { scope:vassal_temp = { has_vassal_stance = glory_hound } }
parochial = { scope:vassal_temp = { has_vassal_stance = parochial } }
zealot = { scope:vassal_temp = { has_vassal_stance = zealot } }
minority = { scope:vassal_temp = { has_vassal_stance = minority } }
barons_and_minor_landholders = { scope:vassal_temp = { has_vassal_stance = barons_and_minor_landholders } }
}
}
}
vassal_is_valid_and_follows_directive_trigger = {
is_independent_ruler = no
is_landed = yes
highest_held_title_tier >= tier_county
is_ai = yes
vassal_follows_directive_valid_trigger = { VASSAL = $VASSAL$ LIEGE = $LIEGE$ }
vassal_follows_directive_trigger = { VASSAL = $VASSAL$ LIEGE = $LIEGE$ }
}
vassal_follows_directive_valid_trigger = {
$VASSAL$ = { save_temporary_scope_as = directive_vassal }
$LIEGE$ = { save_temporary_scope_as = directive_liege }
scope:directive_vassal = {
trigger_if = {
limit = {
scope:directive_liege = { has_government = administrative_government }
}
is_vassal_of = scope:directive_liege
}
trigger_else = {
is_vassal_of = scope:directive_liege
}
NOT = { has_relation_rival = scope:directive_liege }
NOT = { is_at_war_with = scope:directive_liege }
NOT = { has_trait = disloyal }
}
}
vassal_follows_directive_trigger = {
$VASSAL$ = { save_temporary_scope_as = directive_vassal }
$LIEGE$ = { save_temporary_scope_as = directive_liege }
scope:directive_vassal = {
OR = {
trigger_if = {
limit = {
has_dlc_feature = roads_to_power
}
custom_tooltip = {
text = has_admin_gov
has_government = administrative_government
}
}
opinion = {
value >= 50
target = scope:directive_liege
}
has_trait = trusting
has_trait = loyal
scope:directive_liege = { has_relation_friend = scope:directive_vassal }
scope:directive_liege = { has_relation_lover = scope:directive_vassal }
scope:directive_liege = { has_strong_hook = scope:directive_vassal }
scope:directive_liege = { has_perk = absolute_control_perk }
scope:directive_liege = { has_perk = honored_to_serve_perk }
scope:directive_liege = { has_realm_law = crown_authority_3 }
scope:directive_liege = { legitimacy_level = 5 }
}
}
}

View file

@ -0,0 +1,869 @@

###TRIGGER LIST
#prisoner_gives_warscore_for_trigger - takes WAR and CHARACTER (primary enemy or one of their top 3 player heirs)
at_war_with_any_coreligionist_trigger = {
any_character_war = {
casus_belli = {
OR = {
primary_attacker = {
is_at_war_with = root
faith = root.faith
}
primary_defender = {
is_at_war_with = root
faith = root.faith
}
}
}
}
}
at_war_with_any_non_coreligionist_trigger = {
any_character_war = {
casus_belli = {
OR = {
primary_attacker = {
is_at_war_with = root
NOT = { faith = root.faith }
}
primary_defender = {
is_at_war_with = root
NOT = { faith = root.faith }
}
}
}
}
}
at_war_only_with_coreligionists_trigger = {
is_at_war = yes
NOT = {
any_character_war = {
casus_belli = {
OR = {
primary_attacker = {
is_at_war_with = root
NOT = { faith = root.faith }
}
primary_defender = {
is_at_war_with = root
NOT = { faith = root.faith }
}
}
}
}
}
}
joiner_not_already_in_another_war_with_any_target_war_participants_trigger = {
###Triggers to make sure the recipient doesn't end up in a war with someone they already have a war with###
# $WARRIOR$ — the already-warring character, actor in call / recipient in offer
# $JOINER$ — the ally, recipient in call / actor in offer
#Set the primary enemy
trigger_if = {
limit = { scope:target = { primary_attacker = $WARRIOR$ } }
scope:target = { primary_defender = { save_temporary_scope_as = primary_enemy } }
}
trigger_else = {
scope:target = { primary_attacker = { save_temporary_scope_as = primary_enemy } }
}
$JOINER$ = {
#recipient can't already be at war with the primary_enemy
custom_description = {
text = "is_already_war_enemy_of_primary_enemy"
subject = $JOINER$
object = scope:primary_enemy
NOT = {
any_war_enemy = { this = scope:primary_enemy }
}
}
#recipient can't already be at war with another enemy in target war
custom_description = {
text = "is_war_enemy_with_another_target_war_enemy"
subject = $JOINER$
NOT = {
any_war_enemy = {
NOT = { this = scope:primary_enemy } #Already handled above
OR = {
AND = {
scope:target = { primary_defender = scope:primary_enemy }
is_defender_in_war = scope:target
}
AND = {
scope:target = { primary_attacker = scope:primary_enemy }
is_attacker_in_war = scope:target
}
}
}
}
}
#recipient can't have a war enemy who is on actor's side in this war
custom_description = {
text = "is_war_enemy_with_my_war_ally"
subject = $JOINER$
NOT = {
any_war_enemy = {
OR = {
AND = {
scope:target = { primary_defender = $WARRIOR$ }
is_defender_in_war = scope:target
}
AND = {
scope:target = { primary_attacker = $WARRIOR$ }
is_attacker_in_war = scope:target
}
}
}
}
}
#recipient can't be on the same side in another war with primary_enemy
custom_description = {
text = "is_war_ally_of_primary_enemy"
subject = $JOINER$
object = scope:primary_enemy
NOT = {
any_character_war = {
OR = {
AND = {
is_defender = $JOINER$
any_war_defender = { this = scope:primary_enemy }
}
AND = {
is_attacker = $JOINER$
any_war_attacker = { this = scope:primary_enemy }
}
}
}
}
}
#recipient can't be on the same side in another war with another enemy in the target war
custom_description = {
text = "is_war_ally_of_another_target_enemy"
subject = $JOINER$
NOT = {
any_war_ally = {
NOT = { this = scope:primary_enemy } #Already handled above
OR = {
AND = {
scope:target = { primary_defender = scope:primary_enemy }
is_defender_in_war = scope:target
}
AND = {
scope:target = { primary_attacker = scope:primary_enemy }
is_attacker_in_war = scope:target
}
}
}
}
}
}
}
can_potentially_call_ally_trigger = {
# Can never call vassals to your own wars (their obligations are met via taxes and levies!)
custom_description = {
text = cannot_call_vassal_to_war
$JOINER$ = {
trigger_if = {
limit = {
# Diarchs can join against other vassals.
NOT = { this ?= $WARRIOR$.diarch }
}
NOT = {
target_is_liege_or_above = $WARRIOR$
}
}
}
}
# Can never call your liege to your own wars (they protect you only from foreign invaders, by being the war target instead of you)
custom_description = {
text = cannot_call_liege_to_war
$JOINER$ = {
NOT = {
target_is_vassal_or_below = $WARRIOR$
}
}
}
}
war_declarer_needs_hook_on_liege = {
scope:actor = {
trigger_if = {
limit = {
is_independent_ruler = no
liege = scope:recipient.liege
NOT = { liege = scope:recipient }
NAND = {
has_government = administrative_government
liege = { has_government = administrative_government }
}
liege = { has_realm_law_flag = vassal_internal_wars_banned }
NOT = {
vassal_contract_has_flag = vassal_contract_war_override
}
}
always = yes
}
trigger_else_if = {
limit = {
is_independent_ruler = no
NOT = { liege = scope:recipient }
NAND = {
has_government = administrative_government
liege = { has_government = administrative_government }
}
liege = { has_realm_law_flag = vassal_all_wars_banned }
NOT = {
vassal_contract_has_flag = vassal_contract_war_override
}
}
always = yes
}
trigger_else = {
always = no
}
}
}
any_liege_or_above_is_participant_trigger = {
save_temporary_scope_as = trigger_war
$CHARACTER$ = {
any_liege_or_above = {
scope:trigger_war = { is_participant = prev }
}
}
}
can_use_conquest_cbs_trigger = {
OR = {
government_has_flag = government_is_tribal
government_has_flag = government_is_clan
faith = { has_doctrine_parameter = conquest_cb_enabled }
culture = { has_cultural_parameter = can_use_conquest_cbs }
}
}
can_be_warrior_trigger = {
is_adult = yes
is_imprisoned = no
NOT = { has_trait = incapable }
OR = {
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ }
AND = {
$ARMY_OWNER$.culture = {
has_cultural_parameter = high_prowess_ignores_knight_restrictions
}
prowess >= 10
}
}
}
can_be_knight_trigger = {
is_hostage = no
trigger_if = { # Admin governors cannot be knights
limit = {
$ARMY_OWNER$ = { has_government = administrative_government }
is_courtier = no
}
primary_title ?= {
tier < tier_duchy
trigger_if = {
limit = { is_noble_family_title = yes }
always = no
}
}
}
trigger_if = {
limit = {
$ARMY_OWNER$.culture = {
has_cultural_parameter = minimum_prowess_for_knights
}
}
prowess >= 12
}
can_be_warrior_trigger = { ARMY_OWNER = $ARMY_OWNER$ }
trigger_if = {
limit = {
OR = {
has_trait = devoted
is_clergy = yes
}
}
OR = {
faith = { has_doctrine_parameter = clergy_can_fight }
culture = { has_cultural_parameter = culture_clergy_can_fight }
AND = {
$ARMY_OWNER$.culture = {
has_cultural_parameter = high_prowess_ignores_knight_restrictions
}
prowess >= 10
}
}
}
OR = {
AND = {
$ARMY_OWNER$.culture = {
has_cultural_parameter = high_prowess_ignores_knight_restrictions
}
prowess >= 10
}
has_trait = order_member # Order Members will fight for their faith even if their faith says no
NOR = {
has_trait = blind
has_court_position = master_assassin_court_position #FP3 addition
}
}
trigger_if = {
limit = {
exists = liege.diarch
}
NOT = { this = liege.diarch }
}
is_ai = yes
}
can_be_commander_basic_trigger = {
is_alive = yes
is_adult = yes
is_hostage = no
NOR = {
has_trait = incapable
AND = {
OR = {
has_trait = devoted
is_clergy = yes
}
NOR = {
has_trait = order_member # Order Members will fight for their faith even if their faith says no
faith = { has_doctrine_parameter = clergy_can_fight }
culture = { has_cultural_parameter = culture_clergy_can_fight }
}
}
}
OR = { # You can always lead your own armies
this = $ARMY_OWNER$
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ }
}
trigger_if = {
limit = { $ARMY_OWNER$ = { is_ai = yes } }
is_ai = yes
}
}
can_be_commander_now_trigger = {
can_be_commander_basic_trigger = { ARMY_OWNER = $ARMY_OWNER$ }
is_imprisoned = no
custom_description = {
text = ALREADY_IN_ACTIVITY
NOR = {
exists = involved_activity
has_variable = homage_liege_scope
has_character_flag = meditation_character_flag
has_character_flag = petition_liege_character_flag
has_character_flag = holding_court_character_flag
is_being_visited_on_tour_strict = yes
}
}
# Must not be currently coming from or going somewhere
is_travelling = no
}
get_valid_commander_list_trigger = {
any_vassal = {
add_to_temporary_list = temp$LIST$
}
any_courtier = {
add_to_temporary_list = temp$LIST$
}
any_in_list = {
list = temp$LIST$
count = all
can_be_commander_now_trigger = { ARMY_OWNER = scope:army_owner }
add_to_temporary_list = $LIST$
}
}
prisoner_gives_warscore_for_trigger = {
save_temporary_scope_as = war_prisoner
#Character getting war score is primary defender
trigger_if = {
limit = { $WAR$.primary_defender = $CHARACTER$ }
$WAR$.primary_attacker = {
OR = {
this = scope:war_prisoner
#player_heir_position = {
#target = scope:war_prisoner
#value <= 3
#}
}
}
}
#Character getting war score is primary attacker
trigger_else_if = {
limit = { $WAR$ = { primary_attacker = $CHARACTER$ } }
$WAR$.primary_defender = {
OR = {
this = scope:war_prisoner
#player_heir_position = {
#target = scope:war_prisoner
#value <= 3
#}
}
}
}
trigger_else = {
always = no
}
}
using_non_ghw_holy_war_cb_trigger = {
OR = {
using_cb = minor_religious_war
using_cb = religious_war
using_cb = major_religious_war
}
}
using_holy_war_cb_trigger = {
OR = {
using_non_ghw_holy_war_cb_trigger = yes
using_cb = undirected_great_holy_war
using_cb = directed_great_holy_war
}
}
using_de_jure_cb_trigger = {
OR = {
using_cb = claim_cb
using_cb = de_jure_cb
using_cb = individual_county_de_jure_cb
using_cb = individual_duchy_de_jure_cb
using_cb = imperial_reconquest_cb
using_cb = dismantle_holy_pretender_cb
using_cb = dismantle_byz_pretender_cb
using_cb = norman_conquest_cb
using_cb = norwegian_invasion_cb
}
}
using_conquest_cb_trigger = {
OR = {
using_cb = county_conquest_cb
using_cb = duchy_conquest_cb
using_cb = ducal_conquest_cb
using_cb = ireland_laudabiliter_conquest_cb
using_cb = mongol_invasion_war
}
}
using_hierarchical_cb_trigger = {
OR = {
using_cb = tribal_subjugation_cb
using_cb = vassalization_cb
}
}
# In case is_civil_war is causing issues.
using_civil_war_cb_trigger = {
OR = {
using_cb = independence_faction_war
using_cb = liberty_faction_war
using_cb = populist_war
using_cb = claimant_faction_war
using_cb = depose_war
using_cb = refused_liege_demand_war
using_cb = nation_fracturing_faction_war
using_cb = peasant_war
}
}
special_invasion_cb_seize_land_in_region_trigger = {
OR = {
AND = { # For Duchies
tier = tier_duchy
OR = {
# Title is in the specified region
capital_vassal = {
title_province = {
geographical_region = $TARGET_REGION$
}
}
# Title is owned by the current holder of the invasion's target kingdom
AND = {
exists = holder
holder = $TARGET_KINGDOM$.holder
kingdom = $TARGET_KINGDOM$
}
}
}
AND = { # For Counties
tier = tier_county
OR = {
# Title is in the specified region
title_province = {
geographical_region = $TARGET_REGION$
}
AND = {
exists = holder
holder = $TARGET_KINGDOM$.holder
kingdom = $TARGET_KINGDOM$
}
}
trigger_if = {
# If our de jure liege is an existing duchy that would have been siezed in the duchy step, do not transfer the county (it has already been transferred).
limit = {
exists = de_jure_liege
de_jure_liege = {
exists = holder
OR = {
capital_vassal = {
title_province = {
geographical_region = $TARGET_REGION$
}
}
AND = {
exists = holder
holder = $TARGET_KINGDOM$.holder
kingdom = $TARGET_KINGDOM$
}
}
}
}
always = no
}
}
}
}
can_join_war_liege_vassal_check_trigger = {
custom_description = {
text = "basic_ally_can_join_because_liege_or_vassals"
subject = $JOINER$
# actor is defender, attackers do not include recipient's liege or vassals
trigger_if = {
limit = {
$WARRIOR$ = { is_defender_in_war = scope:target }
}
$JOINER$ = {
trigger_if = {
limit = {
# Diarchs can join against other vassals.
NOT = { this ?= $WARRIOR$.diarch }
}
NOR = {
any_liege_or_above = {
is_attacker_in_war = scope:target
}
any_vassal_or_below = {
is_attacker_in_war = scope:target
}
}
}
}
}
# actor is attacker, defenders do not include recipient's liege or vassals
trigger_else_if = {
limit = {
$WARRIOR$ = { is_attacker_in_war = scope:target }
}
$JOINER$ = {
NOR = {
any_liege_or_above = {
is_defender_in_war = scope:target
}
any_vassal_or_below = {
is_defender_in_war = scope:target
}
}
}
}
# it's fine, whatever
trigger_else = {
always = yes
}
}
}
pressing_claim_of_character_trigger = {
custom_description = {
subject = this
object = $CHARACTER$
text = pressing_claim_of_character_trigger_text
save_temporary_scope_as = claim_presser
any_character_war = {
primary_attacker = scope:claim_presser
exists = claimant
claimant = $CHARACTER$
}
}
}
is_religious_war = {
OR = {
using_cb = minor_religious_war
using_cb = religious_war
using_cb = major_religious_war
using_cb = excommunication_war
using_cb = undirected_great_holy_war
using_cb = directed_great_holy_war
}
}
conquest_cb_holder_under_target_can_be_vassalized = {
# If there is no holder they can't be vassalized!
holder ?= {
# We can only vassalize characters of a lower tier than us.
highest_held_title_tier < scope:attacker.highest_held_title_tier
# We can't vassalize Governors
NOT = { government_has_flag = government_is_administrative }
# Only (sub)vassals of the defender can be considered for transfer (no poaching vassals from 3rd parties without fighting them!)
target_is_liege_or_above = scope:defender
# *All* of a character's subrealm must be within the target area. If we're attacking for Jerusalem, we don't want to also be stealing parts of Egypt, Syria, etc.
any_sub_realm_county = {
count = all
target_is_de_jure_liege_or_above = scope:target_title
}
}
}
religious_cb_holder_under_target_can_be_vassalized = {
conquest_cb_holder_under_target_can_be_vassalized = yes
# Religious Tolerance Check
scope:attacker.faith = {
OR = {
# For all Faiths, if the attacker views this vassal's faith more favorably than the defender does, they are 'liberated' and become vassals under the attacker.
# For example, if Catholics are crusading against Ash'aris(viewed as Evil), any Messalian vassals (viewed as Hostile) will become vassals under the Catholic attacker.
faith_hostility_level_comparison = {
prev.holder.faith < scope:defender.faith
}
# Pluralist faiths always attempt to preserve vassals if possible, even if the vassal follows an Evil faith.
has_doctrine_parameter = pluralism_pluralistic_holy_wars_preserve_vassals
}
}
}
desirable_for_capture_trigger = {
OR = {
is_playable_character = yes
any_parent = { always = yes }
any_spouse = { is_playable_character = yes }
any_close_family_member = { is_playable_character = yes }
diplomacy >= very_high_skill_rating
martial >= very_high_skill_rating
stewardship >= very_high_skill_rating
intrigue >= very_high_skill_rating
learning >= very_high_skill_rating
has_trait = lifestyle_physician
has_trait = lifestyle_mystic
}
}
can_use_viking_invasion_cbs_trigger = {
OR = {
# Vanilla behaviour.
AND = {
has_fp1_dlc_trigger = no
can_use_viking_invasion_cbs_dlc_trigger = yes
}
# DLC behaviour..
AND = {
has_fp1_dlc_trigger = yes
OR = {
#Players are under no restrictions.
AND = {
is_ai = no
can_use_viking_invasion_cbs_dlc_trigger = yes
}
#If the host has fp1, then we want Scandis to beat each other up and export the losers overseas, not form huge overseas empires themselves.
AND = {
can_use_viking_invasion_cbs_dlc_trigger = yes
top_liege = {
any_realm_county = {
count = all
title_province = {
NOT = { geographical_region = world_europe_north }
}
}
}
}
}
}
}
}
can_use_viking_invasion_cbs_dlc_trigger = {
faith = { has_doctrine = tenet_warmonger }
culture = { has_innovation = innovation_longboats }
any_sub_realm_county = { is_coastal_county = yes }
trigger_if = {
limit = { is_ai = yes }
prestige >= 75
OR = {
is_independent_ruler = yes
primary_title.tier >= tier_kingdom
}
NOT = {
any_liege_or_above = {
NOT = {
faith = { has_doctrine = tenet_warmonger }
}
}
}
}
}
coastal_or_neighboring_county_trigger = {
OR = {
is_coastal_county = yes
any_neighboring_county = {
holder = {
target_is_same_character_or_above = $CHARACTER$
}
}
}
}
# Non-vikings will for the AI just assert it's legal, as the target titles should already have fallen back to only allowing land and sea borders
neighboring_county_or_viking_conquest_trigger = {
OR = {
trigger_if = {
limit = {
$CHARACTER$ = {
can_use_viking_invasion_cbs_trigger = yes
}
}
is_coastal_county = yes
OR = {
$CHARACTER$ = { is_ai = no }
is_neighbor_to_realm = $CHARACTER$
$CHARACTER$ = {
NOT = {
any_sub_realm_title = {
tier = tier_county
NOT = {
is_connected_to = {
target = $CHARACTER$.capital_province.county
}
}
}
}
}
}
}
trigger_else = {
$CHARACTER$ = { is_ai = no }
}
any_neighboring_county = {
holder = {
target_is_same_character_or_above = $CHARACTER$
}
}
}
}
valid_struggle_cb_target_trigger = {
any_neighboring_county = {
holder = { target_is_same_character_or_above = $CHARACTER$ }
}
}
prisoners_of_war_trigger = {
OR = {
scope:defender = {
any_prisoner = {
OR = {
this = scope:war.primary_attacker
scope:war.primary_attacker.primary_title = {
place_in_line_of_succession = {
target = prev
value <= 3
}
}
}
}
}
#Prisoners of attackers
scope:attacker = {
any_prisoner = {
OR = {
this = scope:war.primary_defender
scope:war.primary_defender.primary_title = {
place_in_line_of_succession = {
target = prev
value <= 3
}
}
}
}
}
}
}
# Used for checking if a captured combatant is worth war-score.
character_is_potential_valuable_prisoner = {
OR = {
this = scope:primary_siege_attacker
this = scope:primary_siege_defender
is_heir_of = scope:primary_siege_attacker
is_heir_of = scope:primary_siege_defender
}
}
religious_war_vassals_constraints = {
trigger_if = {
limit = {
scope:attacker = { is_independent_ruler = no }
}
scope:attacker = {
NOT = { character_is_land_realm_neighbor = scope:defender }
}
scope:defender = { is_independent_ruler = yes }
}
trigger_else = {
always = no
}
}
feudal_clan_tribal_conquest_constraints = {
OR = {
AND = {
tier = tier_county
any_county_province = {
has_holding_type = tribal_holding
}
}
AND = {
tier > tier_county
any_in_de_jure_hierarchy = {
tier = tier_county
any_county_province = {
has_holding_type = tribal_holding
}
}
}
}
scope:attacker = {
NOT = { government_has_flag = government_is_tribal }
gold < 200
any_sub_realm_county = {
any_county_province = {
has_holding_type = tribal_holding
}
}
}
}

File diff suppressed because it is too large Load diff