unfucking the mod

This commit is contained in:
trashmasteruni 2026-01-06 14:25:21 +01:00
parent cbe3fbcda2
commit d887392b56
1167 changed files with 26982 additions and 13 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,885 @@
#############
# Diarchy Scripted Triggers
#############
##################################################
# General Triggers
character_hates_scope_due_to_strife_guts_trigger = {
# We've got to share a direct liege for strife to be valid.
exists = liege
exists = $TARGET$.liege
liege = $TARGET$.liege
# And $TARGET$ must have accumulated enough strife to aggravate me (which we modulate up or down a little with some traits).
$TARGET$.strife_opinion >= strife_harm_threshold_value
# Finally, there has to be at least _some_ love lost.
opinion = {
target = $TARGET$
value < 0
}
}
# This is hooked up to the is_diarch_valid rule, invalidating them if it returns false, referenced by Code.
is_diarch_valid_trigger = {
# Basics.
is_alive = yes
OR = {
# We always want adults...
is_adult = yes
# ... _unless_ this is junior emperor, they're always children.
liege ?= { has_diarchy_parameter = diarchy_type_is_junior_emperorship }
}
# Event blocks.
OR = {
is_ai = no
NOT = { has_character_flag = cannot_be_diarch }
}
trigger_if = {
limit = {
exists = liege
}
# Being in a diarchy yourself will disable you, outside of co-rulerships.
trigger_if = {
limit = {
NOT = {
liege = { has_diarchy_active_parameter = diarchy_is_co_rulership }
}
}
# If you're in an entrenched regency for some reason, you can't manage a regency yourself.
NOT = { has_diarchy_parameter = diarchy_type_is_entrenched_regency }
# You need to be mentally & physically sound, to some degree.
regency_for_personal_reasons_trigger = no
}
# Diarchy-specific checks.
## Viziers.
trigger_if = {
limit = {
liege = {
has_diarchy_parameter = diarchy_is_vizierate
NOT = { government_has_flag = government_is_celestial }
}
}
# Must match their liege's gender preference.
diarch_matches_liege_faith_gender_preference_trigger = yes
# Viziers aren't big land-owners.
## Not in this way, at least.
highest_held_title_tier <= tier_barony
}
# If you have somehow managed to get invited to/start an activity outside of your realm (e.g., you're the spouse in a grand wedding), then yeah, you forfeit your position.
## ... unless you're a co-ruler.
trigger_if = {
limit = {
NOT = {
liege = { has_diarchy_active_parameter = diarchy_is_co_rulership }
}
}
# We cannot be at war with our liege.
NOT = { is_at_war_with = liege }
NAND = {
# Is it redundant to check twice?
## Yes.
### Do the machine spirits demand this thoroughness of us?
#### Also yes.
##### Do not ask why the God-Machine commands it, merely be glad that it commanded it of you.
is_travelling = yes
exists = current_travel_plan
# We check your liege so that you can attend business within the realm easily.
## Schemes are their own special lil guys so we take care of them separately.
trigger_if = {
limit = {
exists = scope:owner
exists = scope:target
}
travel_would_cause_regency_trigger = { REALM_HOLDER = scope:owner.liege }
}
## Else, we're an ordinary, gods-fearing root scope, so use that.
trigger_else = {
travel_would_cause_regency_trigger = { REALM_HOLDER = liege }
}
}
}
}
tgp_is_ceremonial_liege_trigger = no
}
# This is hooked up to the is_diarch_able rule, referenced by Code.
is_diarch_able_trigger = {
# You can't possibly manage someone else's realm from prison.
is_imprisoned = no
# You need to be mentally & physically sound, to some degree.
## Mostly, this will invalidate, but it won't for co-rulerships so we just disable them here.
regency_for_personal_reasons_trigger = no
# You'd clearly be preoccupied.
trigger_if = {
limit = { exists = involved_activity }
save_temporary_scope_as = diarch_temp
involved_activity.activity_location.county.holder = {
NOR = {
this = scope:diarch_temp.liege
NOT = {
any_liege_or_above = { this = scope:diarch_temp.liege }
}
}
}
}
# If you're in a diarchy for any other reason, you need to chill.
NOT = { has_active_diarchy = yes }
}
# And *this* needs to be added to guest activity intents to keep diarchs from showing up to the same parties as their liege.
bannable_serving_diarch_trigger = {
liege ?= {
NOR = {
is_landless_adventurer = yes
has_diarchy_type = grand_secretariat
}
}
OR = {
# Diarchs with official responsibilities can't come out to play.
is_diarch = yes
is_designated_diarch = yes
# Assumed diarchs don't get to either if they're the AI, as the player might be planning around them & the AI may have designated to avoid people after if it'd known they were going to welch.
## Assumed-diarch players can make an intelligent choice on whether they want to go to events or not.
AND = {
is_ai = yes
is_diarchy_successor = yes
}
}
}
diarch_has_situational_loyalty_trigger = {
diarch_loyalty > diarch_loyalty_visibly_disloyal_threshold
diarch_loyalty < diarch_loyalty_visibly_loyal_threshold
}
diarch_callable_in_internal_war_trigger = {
OR = {
# CBs where the liege doesn't (necessarily) control an internal attacker.
using_cb = peasant_war
using_cb = populist_war
# All other internal CBs.
primary_attacker = {
any_liege_or_above = { this = scope:actor }
}
}
}
diarch_matches_liege_faith_gender_preference_trigger = {
OR = {
# Female preference.
AND = {
is_female = yes
liege.faith = { has_doctrine = doctrine_gender_female_dominated }
}
# Male preference.
AND = {
is_male = yes
liege.faith = { has_doctrine = doctrine_gender_male_dominated }
}
# Equality.
liege.faith = { has_doctrine = doctrine_gender_equal }
}
}
##################################################
# Setup Triggers
basic_eligible_for_diarchy_trigger = {
highest_held_title_tier >= tier_county
is_landed_or_landless_administrative = yes
has_active_diarchy = no
NOT = { government_has_flag = government_is_landless_adventurer } # Laamps don't use diarchs
}
regency_for_personal_reasons_trigger = {
custom_tooltip = {
text = regency_for_personal_reasons_trigger.tt.cannot_govern_by_themselves
OR = {
AND = {
is_adult = no
NOT = {
liege = { has_diarchy_parameter = diarchy_type_is_junior_emperorship }
}
}
is_incapable = yes
has_character_modifier = isolating_modifier
}
}
}
imprisonment_would_cause_regency_trigger = {
custom_tooltip = {
text = imprisonment_would_cause_regency_trigger.tt.imprisoned_abroad
is_imprisoned = yes
# Doesn't count if your gaoler is your vassal.
save_temporary_scope_as = liege_temp
NOT = {
any_vassal_or_below = { this = scope:liege_temp.imprisoner }
}
}
}
travel_would_cause_regency_trigger = {
trigger_if = {
limit = { exists = current_travel_plan }
OR = {
# Travelling one-way.
AND = {
exists = current_travel_plan
# Make sure that we _aren't_ going bilaterally.
NOT = { current_travel_plan.final_destination_province = current_travel_plan.departure_location }
# Then check that we're actually going outside of the realm.
current_travel_plan.final_destination_province.county.holder ?= {
NOR = {
any_liege_or_above = { this = $REALM_HOLDER$ }
this = $REALM_HOLDER$
}
}
}
# Travelling in a circle.
AND = {
exists = current_travel_plan
# Make sure that we _are_ going bilaterally.
current_travel_plan.final_destination_province = current_travel_plan.departure_location
# Check the next destination province instead.
## We put a break in to check if there _is_ a county because you might be travelling through the ocean.
current_travel_plan.next_destination_province.county ?= {
holder = {
NOR = {
any_liege_or_above = { this = $REALM_HOLDER$ }
this = $REALM_HOLDER$
}
}
}
}
}
}
}
can_leave_diarchy_trigger = {
trigger_if = {
limit = { is_imprisoned = yes }
imprisonment_would_cause_regency_trigger = no
}
is_travelling = no
regency_for_personal_reasons_trigger = no
}
regent_would_remain_loyal_after_death_trigger = {
is_ai = yes
diarch_loyalty_score_type_regency_value >= diarch_loyalty_visibly_loyal_threshold
}
##################################################
# Character Interactions
diarch_cannot_be_disabled_trigger = {
custom_description = {
text = diarch_interactions_tt_is_able
subject = $DIARCH$
$DIARCH$ = { is_diarch_able_trigger = yes }
}
}
diarch_legal_meddling_claimable_title_trigger = {
custom_description = {
text = "you_must_not_have_a_claim_on_the_title"
NOT = {
any_claimant = { this = $ACTOR$ }
}
}
custom_description = {
text = "character_interactions_not_rel_head_title"
is_head_of_faith = no
}
custom_tooltip = {
text = title_must_be_county_tier.tt
tier = tier_county
}
# This is mostly here to stop people from not claiming titles because they have valid titles that are _outside_ the sub-realm.
custom_tooltip = {
text = title_must_be_same_realm.tt
holder = {
any_liege_or_above = { this = $ACTOR$.liege }
}
}
}
diarch_syphon_treasury_embezzlement_modifiers_trigger = {
OR = {
has_county_modifier = syphon_treasury_massive_sum_modifier
has_county_modifier = syphon_treasury_large_sum_modifier
has_county_modifier = syphon_treasury_medium_sum_modifier
has_county_modifier = syphon_treasury_small_sum_modifier
}
}
diarch_shift_privileges_valid_target_title_trigger = {
NOR = {
has_county_modifier = shift_privileges_monopolies_sold_modifier
has_county_modifier = shift_privileges_scutage_exemptions_modifier
has_county_modifier = shift_privileges_conflicting_deeds_modifier
}
}
diarch_swing_scales_valid_shared_hof_trigger = {
# You must share a HoF to be able to petition one.
custom_tooltip = {
text = swing_scales_currency_interaction.tt.no_shared_hof
exists = scope:actor.faith.religious_head
exists = scope:recipient.faith.religious_head
scope:actor.faith.religious_head = scope:recipient.faith.religious_head
}
# And opinions've gotta line up.
trigger_if = {
limit = { exists = scope:actor.faith.religious_head }
# They must like you.
custom_tooltip = {
text = swing_scales_currency_interaction.tt.hof_needs_to_like_you_more
scope:actor.faith.religious_head = {
opinion = {
target = scope:actor
value >= high_positive_opinion
}
}
}
# And not like scope:recipient too much.
custom_tooltip = {
text = swing_scales_currency_interaction.tt.hof_needs_to_like_them_less
scope:actor.faith.religious_head = {
opinion = {
target = scope:recipient
value <= medium_positive_opinion
}
}
}
# Plus scope:recipient can't have anything over them.
custom_tooltip = {
text = swing_scales_currency_interaction.tt.hof_refuses_to_cross_recipient
NOT = {
scope:recipient = { has_strong_hook = scope:actor.faith.religious_head }
}
}
}
}
diarch_liege_wants_to_stiff_regent_trigger = {
OR = {
has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:recipient }
opinion = {
target = scope:recipient
value <= very_high_negative_opinion
}
}
}
cannot_release_former_regent_whilst_old_regent_holds_power_trigger = {
$PRISONER$ = {
trigger_if = {
limit = {
has_variable = imprisoned_by_diarch
exists = $PRISONER$.liege
$REGENT$ = { is_diarch_of_target = $PRISONER$.liege }
}
custom_tooltip = {
text = overthrow_regent_scheme_interaction.tt.cannot_release
NOR = {
var:imprisoned_by_diarch = $PRISONER$.imprisoner
var:imprisoned_by_diarch ?= $PRISONER$.liege.diarch
}
}
}
}
}
interaction_actor_is_liege_with_vizierate_trigger = {
scope:recipient.liege ?= scope:actor
scope:actor = { has_diarchy_active_parameter = diarchy_is_vizierate }
}
is_valid_basic_candidate_for_vizier_trigger = {
is_diarch_valid_trigger = yes
diarch_matches_liege_faith_gender_preference_trigger = yes
}
# I don't have a problem, I can quit scripted triggers any time I want.
## But more seriously: mostly just here for brevity/not wanting to re-do script after I had to add a second scripted trigger targeting top lieges.
character_has_co_emperorship_trigger = {
OR = {
has_diarchy_parameter = diarchy_type_is_co_emperorship
has_diarchy_parameter = diarchy_type_is_junior_emperorship
}
}
liege_has_co_emperorship_trigger = {
liege ?= { character_has_co_emperorship_trigger = yes }
}
top_liege_has_co_emperorship_trigger = {
liege ?= { character_has_co_emperorship_trigger = yes }
}
appointment_interactions_recipient_is_suitable_co_emperor_trigger = {
scope:actor = { top_liege_has_co_emperorship_trigger = yes }
OR = {
scope:recipient = { is_diarch_of_target = scope:secondary_recipient.top_liege }
scope:secondary_recipient = { is_diarch_of_target = scope:actor.top_liege }
}
# Don't get the bonus just because we're promoting our courtiers in our realm.
trigger_if = {
limit = {
scope:target != scope:actor.primary_title
}
scope:target.holder != scope:actor
}
}
may_appoint_co_emperors_trigger = {
highest_held_title_tier >= tier_empire
has_realm_law = acclamation_succession_law
OR = {
is_roman_emperor_trigger = yes
culture = { has_cultural_parameter = unlock_co_emperors }
}
}
may_appoint_co_monarchs_trigger = {
highest_held_title_tier >= tier_kingdom
government_has_flag = may_elevate_co_monarch
NOR = {
has_realm_law = japanese_regency_succession_law
has_realm_law = meritocratic_regency_succession_law
}
}
valid_junior_emperor_candidate_trigger = {
is_adult = no
is_close_or_extended_family_of = $LIEGE$
is_imprisoned = no
OR = {
is_courtier_of = $LIEGE$
is_vassal_of = $LIEGE$
}
# Prevent weird governments from taking place.
NOR = {
government_has_flag = government_is_republic
government_has_flag = government_is_theocracy
government_has_flag = government_is_landless_adventurer
}
}
valid_co_emperor_candidate_trigger = {
is_adult = yes
is_imprisoned = no
save_temporary_scope_as = co_emperor_temp
custom_tooltip = {
text = valid_co_emperor_candidate_liege_trigger
top_liege = $LIEGE$
}
custom_tooltip = {
text = valid_co_emperor_candidate_family_trigger
OR = {
is_close_or_extended_family_of = $LIEGE$
AND = {
house ?= {
OR = {
is_powerful_family = yes
is_dominant_family = yes
}
}
scope:co_emperor_temp = house.house_head
any_held_title = { is_noble_family_title = yes }
}
}
}
NOR = {
has_trait = blind
has_trait = eunuch
has_trait = incapable
# Prevent weird governments from taking place.
government_has_flag = government_is_republic
government_has_flag = government_is_theocracy
government_has_flag = government_is_landless_adventurer
}
}
valid_co_monarch_candidate_trigger = {
is_adult = yes
is_child_of = $LIEGE$
is_imprisoned = no
trigger_if = {
limit = { is_ruler = no }
is_courtier_of = $LIEGE$
}
trigger_else = { is_vassal_of = $LIEGE$ }
# Gender restrictions.
custom_tooltip = {
text = valid_co_monarch_candidate_trigger.tt.gender_wrong_for_co_rule
OR = {
AND = {
is_female = yes
$LIEGE$ = {
OR = {
has_realm_law = female_only_law
has_realm_law = female_preference_law
}
}
}
AND = {
is_male = yes
$LIEGE$ = {
OR = {
has_realm_law = male_only_law
has_realm_law = male_preference_law
}
}
}
$LIEGE$ = { has_realm_law = equal_law }
}
}
# Prevent weird governments from taking place.
NOR = {
government_has_flag = government_is_republic
government_has_flag = government_is_theocracy
government_has_flag = government_is_landless_adventurer
}
}
governor_can_be_called_as_ally_in_expedition_war_basic_trigger = {
scope:actor.liege ?= { has_diarchy_parameter = unlock_diarch_requests_military_expedition_interaction }
scope:recipient = {
liege ?= scope:actor.liege
# Must be a governor.
government_has_flag = government_is_special_administrative
}
}
liege_can_maim_co_ruler_without_killing_them_trigger = {
culture = {
OR = {
has_cultural_parameter = can_blind_prisoners
has_cultural_parameter = can_castrate_prisoners
}
}
}
liege_should_systematically_maim_co_ruler_trigger = {
OR = {
AND = {
has_diarchy_active_parameter = diarchy_is_co_rulership
liege_can_maim_co_ruler_without_killing_them_trigger = yes
diarch ?= scope:recipient
}
AND = {
liege ?= { has_diarchy_active_parameter = diarchy_is_co_rulership }
liege_can_maim_co_ruler_without_killing_them_trigger = yes
is_diarch_of_target = scope:recipient
}
}
}
valid_kingdom_for_diarch_to_demand_as_despotate_trigger = {
tier = tier_kingdom
is_landless_type_title = no
# Weird formatting for the sake of cleaner tooltips.
trigger_if = {
limit = { is_title_created = no }
is_title_created = no
}
trigger_else = { holder = scope:recipient }
scope:recipient = { completely_controls = scope:target }
NOT = {
scope:recipient.capital_county = { target_is_de_jure_liege_or_above = scope:target }
}
}
is_in_scapegoating_diarchy_visibility_trigger = {
custom_tooltip = {
text = is_in_scapegoating_diarchy_visibility_trigger.tt.explanation
subject = scope:actor
OR = {
AND = {
scope:recipient = { $PARAMETER_TYPE$ = unlock_scapegoat_counterpart_interaction }
scope:actor = { is_diarch_of_target = scope:recipient }
}
AND = {
scope:actor = { $PARAMETER_TYPE$ = unlock_scapegoat_counterpart_interaction }
scope:recipient = { is_diarch_of_target = scope:actor }
}
}
}
}
ai_diarch_would_maim_execute_superior_if_got_chance_trigger = {
OR = {
opinion = {
target = $LIEGE$
value <= -1
}
has_trait = callous
has_trait = sadistic
has_trait = ambitious
has_trait = arrogant
}
NOR = {
has_trait = compassionate
has_trait = content
}
}
##################################################
# Succession Triggers
diarch_candidate_shares_relationship_with_lesser_consort_trigger = {
# Grab the right scope.
save_temporary_scope_as = char_temp
# Now check.
any_relation = {
type = $RELATION$
is_consort_of = scope:char_temp.liege
OR = {
NOT = { exists = scope:char_temp.liege.primary_spouse }
this != scope:char_temp.liege.primary_spouse
}
}
}
diarch_candidate_shares_relationship_with_child_trigger = {
# Grab the right scope.
save_temporary_scope_as = char_temp
# Now check.
any_relation = {
type = $RELATION$
is_adult = yes
is_child_of = scope:char_temp.liege
is_courtier_of = scope:char_temp.liege
}
}
diarch_candidate_shares_minority_status_with_trigger = {
# For performance purposes, let's do the most obvious check first.
any_liege_or_above = {
NOT = { $QUALITY$ = scope:char_temp.$QUALITY$ }
}
# Grab the right scope.
save_temporary_scope_as = char_temp
liege = {
# Ok, now make sure we connect to at least one suitable character.
## Yes we're putting a whole trigger in the scripted parameter.
### No one will believe you if you try to tell them of my crimes.
$TRIGGER_OR_TARGET$ = { $QUALITY$ = scope:char_temp.$QUALITY$ }
}
}
##################################################
# Important Actions
action_regent_imprison_suitable_char_covassals_trigger = {
opinion = {
target = root
value <= very_high_negative_opinion
}
save_temporary_scope_as = char_temp
# Could you take the interaction?
root = {
is_character_interaction_valid = {
interaction = diarch_imprison_interaction
recipient = scope:char_temp
}
}
}
action_regent_imprison_suitable_char_rivals_trigger = {
save_temporary_scope_as = char_temp
root = {
is_character_interaction_valid = {
interaction = diarch_imprison_interaction
recipient = scope:char_temp
}
}
}
action_shift_privileges_suitable_char_trigger = {
save_temporary_scope_as = char_temp
# Make sure we've got equal or higher diplo and so might get away with a cheeky forgery.
diplomacy <= root.diplomacy
# And we don't want to spam with little guys, especially as they're more expensive to use prestige on.
OR = {
highest_held_title_tier >= tier_duchy
# But don't block this out entirely within duchies.
liege.highest_held_title_tier = tier_duchy
}
# Could you take the interaction?
root = {
is_character_interaction_valid = {
interaction = diarch_shift_privileges_interaction
recipient = scope:char_temp
}
}
}
action_legal_meddling_suitable_char_trigger = {
max_military_strength < root.eighty_percent_of_max_military_strength
NOR = {
has_any_good_relationship_with_character_trigger = { CHARACTER = root }
root = { has_truce = prev }
is_allied_to = root
}
}
action_legal_meddling_suitable_title_trigger = {
diarch_legal_meddling_claimable_title_trigger = { ACTOR = root }
root = {
# Could you take the interaction?
is_character_interaction_valid = {
interaction = diarch_legal_meddling_interaction
recipient = scope:char_temp
}
}
}
##################################################
# Decisions
diarch_coup_valid_conspiracy_culmination_vassals_trigger = {
OR = {
is_powerful_vassal_of = $LIEGE$
house ?= { is_powerful_family = yes }
}
is_imprisoned = no
}
diarch_coup_attempt_is_valid_trigger = {
# Diarchy checks.
is_diarch = yes
$LIEGE$ = { has_diarchy_active_parameter = regents_can_try_to_overthrow_present_lieges }
## Liege must be physically present to overthrow. You can't coup them whilst they're abroad.
$LIEGE$ = {
is_imprisoned = no
is_travelling = no
is_at_war = no
custom_tooltip = {
text = custom.not_attending_activity
NOT = { exists = involved_activity }
}
age >= 5
}
# Support checks.
## Have you gathered enough support from the realm's powerful vassals and/or councillors?
custom_tooltip = {
text = diarch_attempt_to_overthrow_liege.tt.majority_powerful_vassal_support
subject = root
has_variable_list = coup_pv_supporters_list
any_in_list = {
variable = coup_pv_supporters_list
count >= pv_overthrow_threshold_value
# Double check they're still valid.
diarch_coup_valid_conspiracy_culmination_vassals_trigger = { LIEGE = $LIEGE$ }
}
}
# As a speed-bump, we check how long this diarchy has been on for.
OR = {
# Either, you've been a diarch for a good long ways.
years_as_diarch >= 8
# Or, you haven't been but everyone is kinda used to the concept of a diarch.
AND = {
years_as_diarch >= 4
$LIEGE$ = { years_in_diarchy >= 10 }
}
# OR, you've laid the groundwork for such a coup already
custom_tooltip = {
text = diarch_attempt_to_overthrow_liege_bypass
has_character_flag = laid_coup_groundwork_flag
}
}
# And finally, for ease of sanity, your liege must be of a certain size.
$LIEGE$.sub_realm_size >= minor_realm_size
}
diarch_coup_attempt_is_valid_showing_failure_only_trigger = {
# Diarch must be able to act.
diarch_cannot_be_disabled_trigger = { DIARCH = $DIARCH$ }
# Plus standard checks.
is_available_adult = yes
# Filter this out in advance, else we risk trying to enter a duel later, only to find we're already engaged in one.
custom_description = {
text = ENGAGED_IN_SINGLE_COMBAT
NOT = { exists = var:engaged_in_single_combat }
}
# Liege must have _something_ at the highest tier that isn't a HoF title.
custom_tooltip = {
text = diarch_attempt_to_overthrow_liege.tt.liege_cant_hold_only_hof_highest_title
liege = {
any_held_title = {
tier = prev.highest_held_title_tier
is_head_of_faith = no
}
}
}
}
diarch_coup_attempt_grabbable_kingdom_trigger = {
highest_held_title_tier >= tier_empire
any_held_title = {
diarch_coup_attempt_grabbable_kingdom_guts_trigger = { TARGET = $TARGET$ }
}
}
diarch_coup_attempt_grabbable_kingdom_guts_trigger = {
tier = tier_kingdom
is_head_of_faith = no
any_de_jure_county = {
holder = {
any_liege_or_above = { this = $TARGET$ }
}
}
}
diarch_coup_attempt_grabbable_capital_and_duchies_trigger = {
is_head_of_faith = no
is_landless_type_title = no
OR = {
AND = {
tier = tier_county
this.duchy = $TARGET$.primary_title.title_capital_county.duchy
}
this = $TARGET$.primary_title.title_capital_county.duchy
}
}
##################################################
# Mandates
diarch_loyalty_due_to_hook_trigger = {
$LIEGE$ = {
OR = {
has_hook_of_type = {
target = $DIARCH$
type = loyalty_hook
}
has_hook_of_type = {
target = $DIARCH$
type = predecessor_loyalty_hook
}
}
}
}
diarch_wants_to_engage_with_mandates_trigger = {
save_temporary_scope_value_as = {
name = diarch_loyalty
value = $DIARCH$.diarch_loyalty_score_type_regency_value
}
OR = {
scope:diarch_loyalty >= diarch_loyalty_visibly_loyal_threshold
scope:diarch_loyalty <= diarch_loyalty_visibly_disloyal_threshold
}
}
##################################################
# Events
character_has_regency_diarchy_trigger = {
exists = diarch
OR = {
has_diarchy_active_parameter = diarchy_type_is_temporary_regency
has_diarchy_active_parameter = diarchy_type_is_entrenched_regency
}
}

View file

@ -0,0 +1,330 @@
# Example:
#
# example_trigger = {
# is_country_type = default
# free_leader_slots > 0
# }
#
#
# In a script file:
#
# trigger = {
# example_trigger = yes
# }
#
has_unelectable_trait_trigger = {
OR = {
has_trait = disinherited
has_trait = gallivanter
is_eunuch_trigger = yes
has_trait = crusader_king #Avoid realm merging after Crusade.
has_trait = devoted
has_trait = order_member
AND = {
has_trait = bastard #If landed, he might still be electable on the grounds of being an Elector.
is_ruler = no
}
}
}
has_unelectable_government_trigger = {
OR = {
government_has_flag = government_is_theocracy
government_has_flag = government_is_mercenary
government_has_flag = government_is_holy_order
}
}
this_is_martial_society_trigger = {
faith = {
NOR = {
has_doctrine = tenet_pacifism
has_doctrine = tenet_dharmic_pacifism
}
}
OR = {
government_has_flag = government_is_clan
government_has_flag = government_is_tribal
government_has_flag = government_is_mercenary
government_has_flag = government_is_holy_order
faith = {
OR = {
has_doctrine_parameter = great_holy_wars_active
has_doctrine_parameter = great_holy_wars_active_if_reformed
has_doctrine_parameter = cheaper_holy_wars_active
}
}
culture = {
has_cultural_tradition = tradition_tgp_bushido
}
}
}
this_is_diplomatic_society_trigger = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_republic
government_has_flag = government_is_theocracy
}
OR = {
faith = { has_doctrine = tenet_communal_identity }
faith = { has_doctrine = tenet_alexandrian_catechism }
faith = { has_doctrine = tenet_legalism }
}
}
this_is_spiritual_society_trigger = {
faith = {
NOR = {
has_doctrine = tenet_false_conversion_sanction
has_doctrine = tenet_hedonistic
has_doctrine = tenet_carnal_exaltation
has_doctrine = tenet_exaltation_of_pain
has_doctrine = tenet_pursuit_of_power
}
OR = {
has_doctrine = tenet_inner_journey
has_doctrine = tenet_asceticism
has_doctrine = tenet_literalism
has_doctrine = tenet_esotericism
has_doctrine = tenet_astrology
has_doctrine = tenet_monasticism
}
}
}
ere_elective_politician_titles_trigger = { #Used in Byzantine Elective to determine AI behavior.
OR = {
has_council_position = councillor_chancellor
has_council_position = councillor_marshal
has_council_position = councillor_steward
has_council_position = councillor_spymaster
has_council_position = councillor_court_chaplain
}
}
parent_for_elective_succession_trigger = { #This trigger is used to prevent grandchildren from being selectable when their parent is still available as a candidate.
this != scope:holder #Not the current ruler.
dynasty = scope:holder.dynasty
is_child_of = scope:holder
OR = {
is_female = no
scope:title = {
NOT = { has_title_law = male_only_law }
}
}
OR = {
is_female = yes
scope:title = {
NOT = { has_title_law = female_only_law }
}
}
OR = { #Candidate should not be a landless Courtier that is about to inherit a Theocracy or Republic
AND = {
is_available_quick = {
ruler = yes
advanced_ruler = yes
}
has_unelectable_government_trigger = no
}
NOT = {
any_heir_title = {
holder ?= {
has_unelectable_government_trigger = yes
}
}
}
}
OR = { #If the title controls the faith, candidates must be of the same faith.
scope:holder = {
NAND = {
exists = faith.religious_head
this = faith.religious_head
}
}
faith = scope:holder.faith
}
has_unelectable_trait_trigger = no
has_unelectable_government_trigger = no
}
feudal_elective_potential_landed_candidate_trigger = {
save_temporary_scope_as = potential_candidate
has_same_government = scope:holder
#Either the candidate is in the realm, or the title is independent, or the realm of the title does NOT have protected inheritance.
OR = {
any_liege_or_above = {
this = scope:holder
}
scope:holder = { top_liege = this }
scope:holder = {
exists = liege
NOT = {
any_liege_or_above = {
has_realm_law_flag = titles_cannot_leave_realm_on_succession
NOR = {
this = scope:potential_candidate
target_is_vassal_or_below = scope:potential_candidate
}
}
}
}
}
OR = { #If the title controls the faith, candidates must be of the same faith.
scope:holder = {
NAND = {
exists = faith.religious_head
this = faith.religious_head
}
}
this.faith = scope:holder.faith
}
has_unelectable_trait_trigger = no
has_unelectable_government_trigger = no
}
feudal_elective_potential_landless_claimant_candidate_trigger = {
save_temporary_scope_as = potential_candidate
#Either the candidate is in the realm, or is landless, or the title is independent, or the realm of the title does NOT have protected inheritance.
OR = {
any_liege_or_above = {
this = scope:holder
}
is_ruler = no
scope:holder = { top_liege = this }
scope:holder = {
exists = liege
NOT = {
any_liege_or_above = {
has_realm_law_flag = titles_cannot_leave_realm_on_succession
NOR = {
this = scope:potential_candidate
target_is_vassal_or_below = scope:potential_candidate
}
}
}
}
}
NOT = { #Landless characters should not be heirs to Theocracies/Republics.
any_heir_title = {
holder ?= {
has_unelectable_government_trigger = yes
}
}
}
OR = { #If the title controls the faith, candidates must be of the same faith.
scope:holder = {
NAND = {
exists = faith.religious_head
this = scope:holder.faith.religious_head
}
}
faith = scope:holder.faith
}
has_unelectable_trait_trigger = no
has_unelectable_government_trigger = no
}
feudal_elective_potential_landless_dynastic_candidate_trigger = {
save_temporary_scope_as = potential_candidate
#Either the candidate is in the realm, or is landless, or the title is independent, or the realm of the title does NOT have protected inheritance.
OR = {
any_liege_or_above = {
this = scope:holder
}
is_ruler = no
scope:holder = { top_liege = this }
scope:holder = {
exists = liege
NOT = {
any_liege_or_above = {
has_realm_law_flag = titles_cannot_leave_realm_on_succession
NOR = {
this = scope:potential_candidate
target_is_vassal_or_below = scope:potential_candidate
}
}
}
}
}
NOT = { #Landless characters should not be heirs to Theocracies/Republics.
any_heir_title = {
holder ?= {
has_unelectable_government_trigger = yes
}
}
}
OR = { #If the title controls the faith, candidates must be of the same faith.
scope:holder = {
NAND = {
exists = faith.religious_head
this = scope:holder.faith.religious_head
}
}
faith = scope:holder.faith
}
#Grandkid block
trigger_if = {
limit = {
NOR = {
#Check to see that you're not the product of incest
AND = {
exists = mother
exists = father
mother = {
relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = prev.father }
}
}
#Let's make the incredibly bold assumption that if incest is completely allowed we'll just default to check the child instead of parents
scope:holder.faith = {
has_doctrine_parameter = consanguinity_unrestricted_incest
}
}
}
# We don't want grandkids to show as candidates if their parent is eligable and still alive
NOR = {
mother ?= {
is_alive = yes
parent_for_elective_succession_trigger = yes
}
father ?= {
is_alive = yes
parent_for_elective_succession_trigger = yes
}
}
}
#if incest is allowed, check if you're the child of the holder since you can be both their kid and grandkid at the same time...
trigger_else_if = {
limit = {
OR = {
mother ?= {
is_alive = yes
}
father ?= {
is_alive = yes
}
}
}
parent_for_elective_succession_trigger = yes
}
trigger_else = {
#Your parents are dead and you're eligible for title inheritance. Congrats.
}
has_unelectable_trait_trigger = no
has_unelectable_government_trigger = no
}
byzantine_elective_deformed_candidate_trigger = {
OR = {
has_trait = disfigured
has_trait = blind
is_eunuch_trigger = yes
has_trait = dwarf
has_trait = clubfooted
has_trait = inbred
}
}

View file

@ -0,0 +1,96 @@

should_apply_tribal_development_penalty_trigger = {
government_has_flag = government_is_tribal
NOR = {
any_liege_or_above = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
}
}
any_vassal_or_below = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
}
}
any_neighboring_top_liege_realm_owner = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
}
tier_difference = {
target = prev
value < -1
}
}
scope:county ?= {
holder ?= {
any_neighboring_realm_same_rank_owner = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
}
}
}
}
}
}
faith_qualifies_for_west_african_pagan_feudalisation_trigger = {
faith = {
# Unreformed West African Pagans are our targets.
OR = {
religion = religion:akom_religion
religion = religion:west_african_religion
religion = religion:west_african_bori_religion
religion = religion:west_african_orisha_religion
religion = religion:west_african_roog_religion
}
custom_tooltip = {
text = faith_qualifies_for_west_african_pagan_feudalisation_trigger.tt
has_doctrine_parameter = unreformed
}
}
}
should_use_temple_character_background_trigger = {
trigger_if = {
limit = { is_landed = yes }
OR = {
government_has_flag = government_is_theocracy
has_government = mandala_government
}
}
trigger_else = {
OR = {
has_trait = order_member
has_council_position = councillor_court_chaplain
government_has_flag = government_is_theocracy
is_clergy = yes
}
}
}
has_mandala_culture_trigger = {
culture = {
OR = {
has_cultural_pillar = heritage_austronesian
has_cultural_pillar = heritage_tai
has_cultural_pillar = heritage_mon_khmer
has_cultural_pillar = heritage_viet
has_cultural_pillar = heritage_indo_aryan
has_cultural_pillar = heritage_burman
}
}
}
has_mandala_faith_trigger = {
custom_description = {
text = "hof_interaction_unreformed_faith"
NOT = {
faith = { has_doctrine_parameter = unreformed }
}
}
#faith = { has_doctrine = doctrine_polytheist }
}

View file

@ -0,0 +1,880 @@
should_use_tribal_realm_palace_graphics_trigger = {
government_has_flag = government_is_tribal
culture = {
has_graphical_india_culture_group_trigger = no
has_graphical_mena_culture_group_trigger = no
has_graphical_steppe_culture_group_trigger = no
has_graphical_african_culture_group_trigger = no
}
}
has_graphical_mena_culture_group_trigger = {
has_building_gfx = mena_building_gfx
}
has_graphical_india_culture_group_trigger = {
OR = {
has_building_gfx = indian_building_gfx
has_building_gfx = southeast_asian_building_gfx
}
}
has_graphical_east_asia_culture_group_trigger = {
OR = {
has_building_gfx = chinese_building_gfx
has_building_gfx = japanese_building_gfx
}
}
has_graphical_east_asia_or_southeast_asia_group_trigger = {
OR = {
has_building_gfx = chinese_building_gfx
has_building_gfx = japanese_building_gfx
has_building_gfx = southeast_asian_building_gfx
}
}
has_graphical_mediterranean_culture_group_trigger = {
OR = {
has_building_gfx = mediterranean_building_gfx
has_building_gfx = byzantine_building_gfx
}
}
has_graphical_western_culture_group_trigger = {
has_building_gfx = western_building_gfx
}
has_graphical_norse_culture_group_trigger = {
has_building_gfx = norse_building_gfx
}
has_graphical_african_culture_group_trigger = {
has_building_gfx = african_building_gfx
}
has_graphical_steppe_culture_group_trigger = {
has_building_gfx = steppe_building_gfx
}
has_graphical_iberian_culture_group_trigger = {
has_building_gfx = iberian_building_gfx
}
has_graphical_iranian_culture_group_trigger = {
has_building_gfx = iranian_building_gfx
}
has_graphical_chinese_culture_group_trigger = {
has_building_gfx = chinese_building_gfx
}
has_graphical_japanese_culture_group_trigger = {
has_building_gfx = japanese_building_gfx
}
graphical_wilderness_desert_trigger = {
OR = {
terrain = desert
terrain = desert_mountains
terrain = oasis
AND = {
terrain = hills
OR = {
geographical_region = world_africa
geographical_region = world_middle_east_arabia
}
}
}
}
graphical_wilderness_forest_pine_trigger = {
OR = {
terrain = taiga
AND = {
terrain = forest
OR = {
geographical_region = world_europe_north
geographical_region = world_steppe
}
}
}
}
graphical_wilderness_forest_trigger = {
OR = {
terrain = forest
terrain = farmlands
}
}
graphical_wilderness_mountains_trigger = {
terrain = mountains
}
graphical_wilderness_steppe_trigger = {
OR = {
terrain = steppe
AND = {
terrain = hills
OR = {
geographical_region = world_steppe
geographical_region = world_middle_east_persia
geographical_region = world_middle_east_jerusalem
}
}
}
}
graphical_drylands_trigger = {
terrain = drylands
}
graphical_wilderness_wetlands_trigger = {
OR = {
terrain = wetlands
terrain = floodplains
}
}
graphical_wilderness_jungle_trigger = {
OR = {
terrain = jungle
AND = {
terrain = hills
geographical_region = graphical_india
NOT = { geographical_region = world_tibet }
}
}
}
graphical_plains_trigger = {
terrain = plains
}
graphical_wilderness_ocean_trigger = {
is_sea_province = yes
}
graphical_hills_trigger = {
terrain = hills
}
### Scripted illustrations
# This doesn't really evaluate anything, it just saves the scope out for later things to use
title_illustration_save_province_temporary = {
trigger_if = {
limit = { tier = tier_barony }
title_province = {
save_temporary_scope_as = province
}
}
trigger_else_if = {
limit = {
tier > tier_county
NOT = {
any_in_de_jure_hierarchy = { tier = tier_county }
}
}
}
trigger_else = {
title_capital_county.title_province = {
save_temporary_scope_as = province
}
}
always = yes
}
#has_indian_culture_trigger = {
has_graphical_india_region_trigger = {
trigger_if = {
limit = {
exists = capital_province
}
capital_province = {
geographical_region = graphical_india
}
}
trigger_else_if = {
limit = {
NOT = { exists = capital_province }
}
trigger_if = {
limit = { exists = host.capital_province }
host.capital_province = {
geographical_region = graphical_india
}
}
trigger_else_if = {
limit = {
exists = liege.capital_province
}
liege.capital_province = {
geographical_region = graphical_india
}
}
trigger_else_if = {
limit = {
exists = location.province_owner.capital_province
}
location.province_owner.capital_province = {
geographical_region = graphical_india
}
}
trigger_else = { always = yes }
}
trigger_else = { always = yes }
}
has_graphical_east_asia_region_trigger = {
trigger_if = {
limit = {
exists = capital_province
}
capital_province = {
OR = {
geographical_region = graphical_east_asia
geographical_region = world_steppe_east
}
}
}
trigger_else_if = {
limit = {
NOT = { exists = capital_province }
}
trigger_if = {
limit = { exists = host.capital_province }
host.capital_province = {
OR = {
geographical_region = graphical_east_asia
geographical_region = world_steppe_east
}
}
}
trigger_else_if = {
limit = {
exists = liege.capital_province
}
liege.capital_province = {
OR = {
geographical_region = graphical_east_asia
geographical_region = world_steppe_east
}
}
}
trigger_else_if = {
limit = {
exists = location.province_owner.capital_province
}
location.province_owner.capital_province = {
OR = {
geographical_region = graphical_east_asia
geographical_region = world_steppe_east
}
}
}
trigger_else = { always = yes }
}
trigger_else = { always = yes }
}
#has_mediterranean_culture_trigger = {
has_graphical_mediterranean_region_trigger = {
trigger_if = {
limit = {
exists = capital_province
}
capital_province = {
geographical_region = graphical_mediterranean
}
}
trigger_else_if = {
limit = {
NOT = { exists = capital_province }
}
trigger_if = {
limit = { exists = host.capital_province }
host.capital_province = {
geographical_region = graphical_mediterranean
}
}
trigger_else_if = {
limit = {
exists = liege.capital_province
}
liege.capital_province = {
geographical_region = graphical_mediterranean
}
}
trigger_else_if = {
limit = {
exists = location.province_owner.capital_province
}
location.province_owner.capital_province = {
geographical_region = graphical_mediterranean
}
}
trigger_else = { always = yes }
}
trigger_else = { always = yes }
}
#has_mena_culture_trigger = {
has_graphical_mena_region_trigger = {
trigger_if = {
limit = {
exists = capital_province
}
capital_province = {
OR = {
geographical_region = graphical_mena
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
AND = {
prev = {
government_has_flag = government_is_clan
}
OR = {
geographical_region = world_steppe_west
geographical_region = world_siberia
}
}
}
}
}
trigger_else_if = {
limit = {
NOT = { exists = capital_province }
}
trigger_if = {
limit = { exists = host.capital_province }
host.capital_province = {
OR = {
geographical_region = graphical_mena
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
AND = {
province_owner = {
government_has_flag = government_is_clan
}
OR = {
geographical_region = world_steppe_west
geographical_region = world_siberia
}
}
}
}
}
trigger_else_if = {
limit = {
exists = liege.capital_province
}
liege.capital_province = {
OR = {
geographical_region = graphical_mena
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
AND = {
province_owner = {
government_has_flag = government_is_clan
}
OR = {
geographical_region = world_steppe_west
geographical_region = world_siberia
}
}
}
}
}
trigger_else_if = {
limit = {
exists = location.province_owner.capital_province
}
location.province_owner.capital_province = {
OR = {
geographical_region = graphical_mena
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
AND = {
province_owner = {
government_has_flag = government_is_clan
}
OR = {
geographical_region = world_steppe_west
geographical_region = world_siberia
}
}
}
}
}
trigger_else = { always = yes }
}
trigger_else = { always = yes }
}
has_graphical_scandinavia_region_trigger = {
trigger_if = {
limit = {
exists = capital_province
}
capital_province = {
geographical_region = world_europe_north
}
}
trigger_else_if = {
limit = {
NOT = { exists = capital_province }
}
trigger_if = {
limit = { exists = host.capital_province }
host.capital_province = {
geographical_region = world_europe_north
}
}
trigger_else_if = {
limit = {
exists = liege.capital_province
}
liege.capital_province = {
geographical_region = world_europe_north
}
}
trigger_else_if = {
limit = {
exists = location.province_owner.capital_province
}
location.province_owner.capital_province = {
geographical_region = world_europe_north
}
}
trigger_else = { always = yes }
}
trigger_else = { always = yes }
}
#has_western_culture_trigger = {
has_graphical_western_region_trigger = {
trigger_if = {
limit = {
exists = capital_province
}
capital_province = {
NOR = {
geographical_region = graphical_india
geographical_region = graphical_mediterranean
geographical_region = graphical_mena
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
geographical_region = world_steppe_east
geographical_region = world_asia
}
}
}
trigger_else_if = {
limit = {
NOT = { exists = capital_province }
}
trigger_if = {
limit = { exists = host.capital_province }
host.capital_province = {
NOR = {
geographical_region = graphical_india
geographical_region = graphical_mediterranean
geographical_region = graphical_mena
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
geographical_region = world_steppe_east
geographical_region = world_asia
}
}
}
trigger_else_if = {
limit = {
exists = liege.capital_province
}
liege.capital_province = {
NOR = {
geographical_region = graphical_india
geographical_region = graphical_mediterranean
geographical_region = graphical_mena
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
geographical_region = world_steppe_east
geographical_region = world_asia
}
}
}
trigger_else_if = {
limit = {
exists = location.province_owner.capital_province
}
location.province_owner.capital_province = {
NOR = {
geographical_region = graphical_india
geographical_region = graphical_mediterranean
geographical_region = graphical_mena
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
geographical_region = world_steppe_east
geographical_region = world_asia
}
}
}
trigger_else = { always = yes }
}
trigger_else = { always = yes }
}
#Has graphical region Iberia trigger
has_graphical_iberia_region_trigger = {
trigger_if = {
limit = {
exists = capital_province
}
capital_province = {
geographical_region = world_europe_west_iberia
}
}
trigger_else_if = {
limit = {
NOT = { exists = capital_province }
}
trigger_if = {
limit = { exists = host.capital_province }
host.capital_province = {
geographical_region = world_europe_west_iberia
}
}
trigger_else_if = {
limit = {
exists = liege.capital_province
}
liege.capital_province = {
geographical_region = world_europe_west_iberia
}
}
trigger_else_if = {
limit = {
exists = location.province_owner.capital_province
}
location.province_owner.capital_province = {
geographical_region = world_europe_west_iberia
}
}
trigger_else = { always = yes }
}
trigger_else = { always = yes }
}
#Has graphical region Iran trigger
has_graphical_iran_region_trigger = {
trigger_if = {
limit = {
exists = capital_province
}
capital_province = {
OR = {
geographical_region = world_middle_east_persia
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
}
}
}
trigger_else_if = {
limit = {
NOT = { exists = capital_province }
}
trigger_if = {
limit = { exists = host.capital_province }
host.capital_province = {
OR = {
geographical_region = world_middle_east_persia
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
}
}
}
trigger_else_if = {
limit = {
exists = liege.capital_province
}
liege.capital_province = {
OR = {
geographical_region = world_middle_east_persia
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
}
}
}
trigger_else_if = {
limit = {
exists = location.province_owner.capital_province
}
location.province_owner.capital_province = {
OR = {
geographical_region = world_middle_east_persia
geographical_region = world_steppe_tarim
geographical_region = world_steppe_central
}
}
}
trigger_else = { always = yes }
}
trigger_else = { always = yes }
}
steppe_building_gfx_use_mena_trigger = {
AND = {
culture ?= { has_building_gfx = steppe_building_gfx }
OR = {
#western steppe should only be mena if you are clan
NOR = {
geographical_region = world_steppe_west
geographical_region = world_europe
geographical_region = world_asia_minor
geographical_region = world_india
geographical_region = world_burma
geographical_region = world_tibet
geographical_region = world_asia
geographical_region = world_steppe_east
}
AND = {
faith.religion = religion:islam_religion
OR = {
geographical_region = world_steppe_west
geographical_region = world_asia_minor
}
}
}
}
}
steppe_building_gfx_use_indian_trigger = {
AND = {
culture ?= { has_building_gfx = steppe_building_gfx }
OR = {
#western steppe should only be mena if you are clan
geographical_region = world_india
geographical_region = world_burma
geographical_region = world_tibet
geographical_region = world_asia_southeast
}
}
}
steppe_building_gfx_use_mediterranean_trigger = {
AND = {
culture ?= { has_building_gfx = steppe_building_gfx }
OR = {
geographical_region = world_europe_south_east
geographical_region = world_europe_south_italy
geographical_region = world_europe_west_iberia
geographical_region = world_asia_minor
}
}
}
steppe_building_gfx_use_iranian_trigger = {
AND = {
OR = {
geographical_region = world_steppe_central
geographical_region = world_middle_east_persia
}
culture ?= { has_building_gfx = steppe_building_gfx }
}
}
steppe_building_gfx_use_western_trigger = {
AND = {
OR = {
geographical_region = world_europe_north
geographical_region = world_europe_west
}
culture ?= { has_building_gfx = steppe_building_gfx }
}
}
steppe_building_gfx_use_east_asian_trigger = {
AND = {
culture ?= { has_building_gfx = steppe_building_gfx }
OR = {
geographical_region = world_asia
geographical_region = world_steppe_east
}
NOT = { geographical_region = world_asia_southeast }
}
}
steppe_building_gfx_use_japanese_trigger = {
AND = {
culture ?= { has_building_gfx = steppe_building_gfx }
geographical_region = world_asia_japan
}
}
steppe_building_gfx_use_southeast_asian_trigger = {
AND = {
culture ?= { has_building_gfx = steppe_building_gfx }
geographical_region = world_asia_southeast
}
}
high_tier_throne_room_trigger = {
OR = {
AND = {
tgp_is_ceremonial_regent_trigger = no # Not 'actual' ruler
primary_title ?= { tier >= tier_kingdom }
}
tgp_is_ceremonial_liege_trigger = yes
}
has_graphical_$REGION$_region_trigger = yes
}
high_tier_throne_room_spouse_trigger = {
OR = {
primary_spouse ?= {
high_tier_throne_room_trigger = { REGION = $REGION$ }
has_graphical_$REGION$_region_trigger = yes
}
AND = {
betrothed ?= {
high_tier_throne_room_trigger = { REGION = $REGION$ }
has_graphical_$REGION$_region_trigger = yes
}
}
AND = {
liege.diarch ?= this
liege ?= {
high_tier_throne_room_trigger = { REGION = $REGION$ }
has_graphical_$REGION$_region_trigger = yes
}
}
}
}
byzantine_governor_trigger = {
is_landed = yes
government_allows = administrative
liege ?= {
OR = {
is_roman_emperor_primary_title_trigger = yes
AND = {
culture = {
OR = {
has_cultural_pillar = heritage_byzantine
has_cultural_pillar = heritage_caucasian
}
}
primary_title.tier >= tier_empire
}
}
}
}
byzantine_governor_close_family_trigger = {
location = prev.location
is_landed = yes
government_has_flag = government_is_special_administrative
exists = top_liege
top_liege = {
OR = {
is_roman_emperor_primary_title_trigger = yes
AND = {
culture = {
OR = {
has_cultural_pillar = heritage_byzantine
has_cultural_pillar = heritage_caucasian
}
}
primary_title.tier >= tier_empire
}
}
}
}
east_asian_governor_trigger = {
is_landed = yes
government_allows = administrative
top_liege ?= {
OR = {
primary_title = title:h_china
primary_title.de_jure_liege = title:h_china
AND = {
culture_has_east_asian_heritage_pillar_trigger = yes
primary_title.tier >= tier_empire
}
}
}
}
east_asian_governor_close_family_trigger = {
location = prev.location
is_landed = yes
government_has_flag = government_is_special_administrative
top_liege ?= {
OR = {
primary_title = title:h_china
primary_title.de_jure_liege = title:h_china
AND = {
culture_has_east_asian_heritage_pillar_trigger = yes
primary_title.tier >= tier_empire
}
}
}
}
has_graphical_chinese_region_trigger = {
trigger_if = {
limit = { exists = capital_province }
capital_province = { geographical_region = world_asia_china }
}
trigger_else_if = {
limit = { exists = host.capital_province }
host.capital_province = { geographical_region = world_asia_china }
}
trigger_else_if = {
limit = { exists = liege.capital_province }
liege.capital_province = { geographical_region = world_asia_china }
}
trigger_else_if = {
limit = { exists = location.province_owner.capital_province }
location.province_owner.capital_province = { geographical_region = world_asia_china }
}
trigger_else = { always = yes }
}
has_graphical_japanese_region_trigger = {
trigger_if = {
limit = { exists = capital_province }
capital_province = { geographical_region = world_asia_japan }
}
trigger_else_if = {
limit = { exists = host.capital_province }
host.capital_province = { geographical_region = world_asia_japan }
}
trigger_else_if = {
limit = { exists = liege.capital_province }
liege.capital_province = { geographical_region = world_asia_japan }
}
trigger_else_if = {
limit = { exists = location.province_owner.capital_province }
location.province_owner.capital_province = { geographical_region = world_asia_japan }
}
trigger_else = { always = yes }
}
has_graphical_korean_region_trigger = {
trigger_if = {
limit = { exists = capital_province }
capital_province = { geographical_region = world_asia_korea }
}
trigger_else_if = {
limit = { exists = host.capital_province }
host.capital_province = { geographical_region = world_asia_korea }
}
trigger_else_if = {
limit = { exists = liege.capital_province }
liege.capital_province = { geographical_region = world_asia_korea }
}
trigger_else_if = {
limit = { exists = location.province_owner.capital_province }
location.province_owner.capital_province = { geographical_region = world_asia_korea }
}
trigger_else = { always = yes }
}

View file

@ -0,0 +1,952 @@
##################################################
# Landless Adventurer Camp Scripted Triggers
##################################################
##################################################
# Interaction Triggers
maa_regiments_valid_for_cheap_reinforcement_trigger = {
maa_current_troops_count < maa_max_troops_count
NOR = {
is_unit_type = heavy_cavalry
is_unit_type = camel_cavalry
maa_regiments_cost_more_to_reinforce_per_soldier_trigger = yes
}
}
maa_regiments_cost_more_to_reinforce_per_soldier_trigger = {
regiment_owner = { government_has_flag = government_is_landless_adventurer }
OR = {
is_unit_type = elephant_cavalry
is_unit_type = siege_weapon
}
}
maa_regiments_valid_to_refill_trigger = {
maa_current_troops_count < maa_max_troops_count
trigger_if = {
limit = {
scope:actor = { government_has_flag = government_is_landless_adventurer }
is_unit_type = elephant_cavalry
}
scope:actor.domicile ?= { has_domicile_parameter = camp_reinforce_elephant_regiments_anywhere }
}
}
any_laamp_portion_at_sea_trigger = {
OR = {
current_travel_plan ?= {
is_travel_with_domicile = yes
current_location = {
OR = {
is_sea_province = yes
is_river_province = yes
}
}
}
any_army = {
location = {
OR = {
is_sea_province = yes
is_river_province = yes
}
}
}
}
}
character_is_valid_for_harrying_of_the_north_trigger = {
title:k_england.holder ?= { owns_story_of_type = story_cycle_harrying_of_the_north }
trigger_if = {
limit = { is_ruler = yes }
OR = {
this = title:k_england.holder
any_liege_or_above = { this = title:k_england.holder }
}
}
trigger_else = {
domicile ?= {
domicile_location = {
county ?= {
holder = {
OR = {
this = title:k_england.holder
any_liege_or_above = { this = title:k_england.holder }
}
}
}
}
}
}
OR = {
character_is_valid_anglo_saxon_for_harrying_of_the_north_trigger = yes
character_is_valid_norman_for_harrying_of_the_north_trigger = yes
}
}
character_is_valid_anglo_saxon_for_harrying_of_the_north_trigger = {
culture = {
OR = {
this = culture:anglo_saxon
any_parent_culture_or_above = { this = culture:anglo_saxon }
}
NOR = {
this = culture:norman
any_parent_culture_or_above = { this = culture:norman }
}
}
}
character_is_valid_norman_for_harrying_of_the_north_trigger = {
culture = {
OR = {
this = culture:norman
any_parent_culture_or_above = { this = culture:norman }
}
NOR = {
this = culture:anglo_saxon
any_parent_culture_or_above = { this = culture:anglo_saxon }
}
}
}
disable_interaction_for_hereward_trigger = {
trigger_if = {
limit = { scope:recipient = character:90028 }
custom_tooltip = {
text = owns_a_story_trigger
scope:actor = {
NOR = {
owns_story_of_type = story_cycle_harrying_of_the_north
any_liege_or_above = { owns_story_of_type = story_cycle_harrying_of_the_north }
}
}
}
}
}
disable_interaction_for_hasan_trigger = {
trigger_if = {
limit = { scope:recipient = character:41702 }
custom_tooltip = {
text = owns_a_story_trigger
scope:recipient = { owns_story_of_type = story_hasan }
}
}
}
laamp_request_likely_marriable_woman_trigger = {
is_available_quick = {
female = yes
adult = yes
}
can_marry_trigger = yes
}
laamp_request_likely_marriable_man_trigger = {
is_available_quick = {
female = no
adult = yes
}
can_marry_trigger = yes
}
##################################################
# Transition Triggers
is_valid_for_laampdom = {
save_temporary_scope_as = potential_laamp_temp
trigger_if = {
limit = {
NAND = {
is_ai = no
government_allows = administrative
top_liege = this
is_landed = no
}
}
custom_tooltip = {
text = adventurer_not_nf_head_trigger_tt
NOT = {
any_held_title = { is_noble_family_title = yes }
}
}
is_landless_ruler = no # Admin gov vassals should not become laamps
}
trigger_if = {
limit = { is_ai = yes }
trigger_if = {
limit = {
NOT = { exists = scope:allow_imprisoned_landless }
}
is_imprisoned = no # Must be free
}
is_adult = yes # Old enough to venture forth
age < 60 # Young enough to venture forth
health >= fine_health # Healthy enough to venture forth
OR = {
highest_skill_value >= decent_skill_rating
prowess >= decent_skill_rating
}
# Can't be completely unwilling to go outside.
OR = {
ai_boldness >= low_negative_ai_value
ai_energy >= low_negative_ai_value
}
NOR = {
has_trait = content # Too chill to adventure
has_trait = craven # Too scared to adventure
has_trait = lazy # Too lazy to adventure
}
# Block admin members of noble families
NOT = {
house ?= {
any_house_member = {
any_held_title = { is_noble_family_title = yes }
}
}
}
}
}
ep3_laamp_interesting_enough_to_be_a_laamp_trigger = {
OR = {
has_trait_rank = { # Prettier
trait = beauty_good
character > $COMPARISON$
}
has_trait_rank = { # Cleverer
trait = intellect_good
character > $COMPARISON$
}
has_trait_rank = { # Dencher
trait = physique_good
character > $COMPARISON$
}
AND = { # Strong people are just more interesting
has_trait = strong
NOT = {
$COMPARISON$ = { has_trait = strong }
}
}
sum_of_all_skills_value > $COMPARISON$.sum_of_all_skills_value # Skillful people are interesting
prowess >= high_skill_rating # Good fighters are interesting
prestige_level > $COMPARISON$.prestige_level # Famous people are interesting
piety_level > $COMPARISON$.piety_level # Religious people are interesting
AND = { # People with nicknames are just more interesting
has_any_nickname = yes
$COMPARISON$ = { has_any_nickname = no }
}
has_character_modifier = bp2_tool_of_fate_modifier # Destiny's child is interesting
has_trait = reincarnation # Reincarnies are interesting
has_trait = immortal
is_twin_of = $COMPARISON$ # Twins are interesting
}
}
playable_relative_trigger = {
is_available_quick = {
ai = yes
advanced_ruler = yes
}
house = root.house
}
ep3_laamp_interesting_sibling_trigger = {
is_available_quick = {
ai = yes
landed = no
advanced_ruler = no
}
NOT = {
any_consort = {
is_ruler = yes
}
}
is_valid_for_laampdom = yes # Age, health, personality
ep3_laamp_interesting_enough_to_be_a_laamp_trigger = { COMPARISON = $COMPARISON$ }
}
ep3_purchase_land_valid_county_trigger = {
holder.top_liege = scope:recipient
NOR = {
scope:recipient.capital_county ?= this
scope:recipient.primary_title ?= this
}
}
ep3_negotiate_settlement_valid_county_trigger = {
OR = {
holder = scope:actor
trigger_if = {
limit = {
scope:actor = { government_has_flag = government_is_special_administrative }
}
holder = { target_is_liege_or_above = scope:actor }
}
}
NOR = {
holder.capital_county ?= this
holder.primary_title ?= this
}
}
ep3_adventurer_invasion_allowed_for_character_trigger = {
has_ep3_dlc_trigger = yes
government_has_flag = government_is_landless_adventurer
is_landed = no
}
ep3_adventurer_invasion_allowed_for_character_display_regardless_trigger = {
has_ep3_dlc_trigger = yes
is_at_war = no
}
ep3_adventurer_landless_allowed_against_character_trigger = {
is_landed = yes
# Players vs. AI filtering.
OR = {
# Can always target the AI.
is_ai = yes
# Cannot target a player unless they completely control at least two duchies.
any_sub_realm_duchy = {
count >= 2
save_temporary_scope_as = player_controlled_duchy
# Custom description to suppress errors.
custom_description = {
text = SUPPRESS
scope:defender = { completely_controls = scope:player_controlled_duchy }
}
}
}
# Scope:defender cannot be liege of attacker.
scope:defender = {
this != scope:attacker.liege
}
}
ep3_adventurer_invasion_sponsorship_applies_trigger = {
var:adventurer_invasion_supporter ?= { ep3_adventurer_sponsorship_valid_trigger = yes }
var:adventurer_invasion_target ?= scope:defender
}
ep3_adventurer_landless_should_invalidate_trigger = {
OR = {
NOT = {
any_in_list = {
list = target_titles
any_in_de_jure_hierarchy = {
tier = tier_county
is_landless_type_title = no
holder = { target_is_same_character_or_above = scope:defender }
}
}
}
scope:attacker = { is_landed = yes }
}
}
ep3_adventurer_sponsorship_valid_trigger = {
scope:attacker.var:adventurer_invasion_supporter ?= {
var:adventurer_invasion_target ?= scope:defender
NOR = {
this = scope:defender
top_liege = scope:defender.top_liege
is_allied_to = scope:defender
is_spouse_of = scope:defender
AND = {
is_close_family_of = scope:defender
opinion = {
target = scope:defender
value >= -25
}
}
has_relation_friend = scope:defender
has_relation_lover = scope:defender
any_character_war = {
primary_attacker = scope:attacker.var:adventurer_invasion_supporter
primary_defender = scope:defender
}
}
in_diplomatic_range = scope:defender
}
}
##################################################
# Contract Triggers
# Can this employer ever offer this contract?
## This is basically an is_valid_showing_failures_only, so we deliberately break out into lots of unnecessarily small sections for nicer tooltipping.
valid_laamp_basic_trigger = {
custom_description = {
text = adventurer_not_famous_or_patron_trigger_tt
object = $EMPLOYER$
value = $EMPLOYER$.highest_held_title_tier
OR = {
$EMPLOYER$.highest_held_title_tier <= tier_county
AND = {
$EMPLOYER$.highest_held_title_tier <= tier_duchy
$EMPLOYER$ = { government_has_flag = government_is_nomadic }
}
$EMPLOYER$.highest_held_title_tier <= $LAAMP$.prestige_level
$EMPLOYER$ = { is_contact_of = $LAAMP$ }
}
}
$EMPLOYER$ = {
# Players shouldn't get tangled up in contracts, ever.
is_ai = yes
# Plus some standard stuff.
is_alive = yes
is_adult = yes
NOT = { government_has_flag = government_is_herder }
}
$EMPLOYER$ = { is_incapable = no }
# Laamps shouldn't offer contracts in their local area, ever.
$EMPLOYER$ = {
OR = {
employer = $LAAMP$
NOT = { government_has_flag = government_is_landless_adventurer }
}
}
# Don't offer to work with those who've wronged us.
## No one we're at war with.
$EMPLOYER$ = {
NOT = { is_at_war_with = $LAAMP$ }
}
## Rivals are cheap to avoid.
$EMPLOYER$ = {
NOT = { has_relation_rival = $LAAMP$ }
}
## Expulsion
$EMPLOYER$ = {
custom_tooltip = {
text = adventurer_expelled_trigger_tt
NOR = {
reverse_has_opinion_modifier = {
target = $LAAMP$
modifier = demanded_eviction_opinion
}
any_liege_or_above = {
reverse_has_opinion_modifier = {
target = $LAAMP$
modifier = demanded_eviction_opinion
}
}
}
}
}
$LAAMP$ = { government_has_flag = government_is_landless_adventurer }
$LAAMP$ = {
trigger_if = {
limit = { is_at_war = no }
is_commanding_army = no
}
}
# If we're looking at the player, make sure there's no uhh... weird legacies between us.
$LAAMP$ = {
trigger_if = {
limit = { is_ai = no }
NOR = {
has_any_major_negative_opinion_against_character_trigger = { CHARACTER = $EMPLOYER$ }
$EMPLOYER$ = {
has_any_major_negative_opinion_against_character_trigger = { CHARACTER = $LAAMP$ }
}
}
}
}
}
# triggers that prevent you from only accepting the contract
valid_laamp_basic_accept_only_trigger = {
is_imprisoned = no
}
# Should this employer be putting this out for tender?
## Naturally, if they're being becrimed, we don't care about this.
employer_has_treasury_to_offer_job_trigger = {
trigger_if = {
limit = { is_ai = no }
scope:employer.treasury_or_gold >= 50
}
}
# Does it make sense that this employer offers this contract to start with?
## So we don't penalise you if their circumstances change beyond your control, but _also_ so that there aren't local job listings going up in Middlesex for someone currently pilgrimaging in Jerusalem.
valid_laamp_sensible_start_trigger = {
scope:employer = {
is_available_quick = {
travel = no
in_army = no
imprisoned = no
}
}
trigger_if = {
limit = {
any_character_task_contract = {
count >= 1
task_contract_employer = scope:employer
}
}
always = no
}
}
# Prevent inappropriate characters, like the Byzantine Emperor or the Sunni Caliph, from giving contracts that'd seem beneath them.
## This isn't a comment on whether they _would_ (or even did) put out such things, more just trying to preserve verisimilitude.
rule_out_dramatic_laamp_employers_trigger = {
scope:employer = {
NOR = {
faith.religious_head ?= this
highest_held_title_tier >= tier_empire
}
}
}
# We do not spawn contracts in the Sahara without the right CulTrad.
lock_contracts_from_spawning_in_sahara_trigger = {
OR = {
NOT = {
location = { geographical_region = custom_sahara_proper }
}
culture = { has_cultural_tradition = tradition_saharan_nomads }
}
}
# How far do we have to travel (or to where) before we start spawning more contracts to play with?
player_adventurer_sufficient_distance_for_contract_spawn_trigger = {
is_ai = no
save_temporary_scope_as = char_temp
OR = {
# Either we've moved to a neighbouring kingdom that we've not been to recently.
AND = {
location.kingdom = { save_temporary_scope_as = kingdom_temp }
NOT = {
is_target_in_variable_list = {
name = laamp_recently_visited_kingdoms
target = scope:kingdom_temp
}
}
}
# Or we've travelled some distance.
trigger_if = {
limit = { exists = scope:char_temp.current_travel_plan }
"location.squared_distance(scope:char_temp.current_travel_plan.departure_location)" >= squared_distance_medium
}
}
}
# Would this employer have some trait that means they don't want to see/don't trust strangers?
laamp_task_contract_employer_not_antisocial_trigger = {
scope:employer = {
NOR = {
has_trait = shy
has_trait = paranoid
has_trait = cynical
}
}
}
# Would this employer have someone executed or hurt without (what passes for in-period as) a fair trial?
laamp_task_contract_employer_would_resort_to_violence_trigger = {
scope:employer = {
NOT = { has_trait = compassionate }
}
}
# Would this employer happily tell a lie or manipulate someone if they at least had a good reason?
laamp_task_contract_employer_would_resort_to_deceit_trigger = {
scope:employer = {
NOT = { has_trait = honest }
}
}
# Would this employer go grubbing for money they're owed?
laamp_task_contract_employer_would_chase_money_trigger = {
scope:employer = {
NOR = {
has_trait = generous
has_trait = improvident
# Compassionates avoid this unless they're also greedy.
AND = {
has_trait = compassionate
NOT = { has_trait = greedy }
}
}
}
}
# Check to see if it's appropriate to apply a county modifier — basically, don't let barons putting out contracts apply modifiers to players.
contract_employer_can_apply_county_modifier_trigger = {
OR = {
highest_held_title_tier >= tier_county
liege = { is_ai = yes }
}
}
# Could this potential rival be removed without unexpectedly affecting a player?
laamp_base_0011_valid_potential_rival_trigger = {
# Exempt players.
NOT = {
this = { is_ai = no }
}
}
# Search for counties that could be affected by the modifiers we apply at the conclusion of the contract.
laamp_base_1001_valid_neighbouring_county_trigger = {
holder = root.task_contract_employer
county_control < full_county_control
}
laamp_base_2001_valid_mayor_trigger = {
highest_held_title_tier = tier_barony
government_has_flag = government_is_republic
NOT = { is_close_or_extended_family_of = scope:employer }
}
laamp_base_3001_valid_neighbours_trigger = {
NOR = {
# Don't collect intelligence on people we trust.
has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $EMPLOYER$ }
is_allied_to = $EMPLOYER$
# Or on people we're currently at war with — it's a little late for court whispers.
is_at_war_with = $EMPLOYER$
}
is_adult = yes
is_incapable = no
is_imprisoned = no
}
# used in task contracts triggered from council tasks to check if employer and their liege or councillor are valid to issue a contract for you
# COUNCILLOR_TYPE = councillor type name
# COUNCIL_TASK_TYPE = council task type name
council_task_contract_valid_employer_trigger = {
trigger_if = {
limit = {
NOT = { exists = scope:laamp }
}
save_temporary_scope_as = laamp
}
valid_laamp_basic_trigger = {
EMPLOYER = scope:employer
LAAMP = scope:laamp
}
custom_tooltip = {
text = councillor_leaving_court_message_title
scope:employer = {
OR = {
AND = {
cp:$COUNCILLOR_TYPE$ ?= {
is_performing_council_task = $COUNCIL_TASK_TYPE$
}
valid_laamp_basic_trigger = {
EMPLOYER = scope:employer.cp:$COUNCILLOR_TYPE$
LAAMP = scope:laamp
}
}
AND = {
is_performing_council_task = $COUNCIL_TASK_TYPE$
valid_laamp_basic_trigger = {
EMPLOYER = scope:employer.liege
LAAMP = scope:laamp
}
}
}
}
}
}
##################################################
# Travel Triggers
is_laamp_exiled_from_province_trigger = {
$PROVINCE$.county.holder = {
is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = $LAAMP$ }
}
}
is_laamp_exiled_from_holder_or_liege_trigger = {
OR = {
AND = {
save_temporary_scope_as = char_temp
$LAAMP$ = {
has_opinion_modifier = {
target = scope:char_temp
modifier = demanded_eviction_opinion
}
}
}
AND = {
any_liege_or_above = {
save_temporary_scope_as = char_temp
$LAAMP$ = {
has_opinion_modifier = {
target = scope:char_temp
modifier = demanded_eviction_opinion
}
}
}
}
}
}
##################################################
# Event Triggers
# Do we want this character to occur in events around camp more frequently?
is_valid_active_event_recurrer_trigger = {
is_ai = yes
is_courtier_of = $LIEGE$
is_healthy = yes
OR = {
has_any_court_position = yes
is_close_or_extended_family_of = $LIEGE$
is_consort_of = $LIEGE$
has_important_relationship_with_character_trigger = { CHARACTER = $LIEGE$ }
}
}
valid_laamp_contract_foe_trigger = {
# Make sure they're at home if possible.
NOR = {
is_travelling = yes
is_commanding_army = yes
is_imprisoned = no
}
# Good sensible restrictions on mutual relationships.
OR = {
has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:employer_ref }
# Ensure a bit of mild dislike.
reverse_opinion = {
target = scope:employer_ref
value <= -25
}
opinion = {
target = scope:employer_ref
value <= -25
}
}
NOR = {
# Filter out anything that might look odd.
has_any_good_relationship_with_character_trigger = { CHARACTER = scope:employer_ref }
# Plus don't include anything connected to a player.
save_temporary_scope_as = char_temp
any_player = {
OR = {
this = scope:char_temp
is_close_or_extended_family_of = scope:char_temp
is_consort_of = scope:char_temp
has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:char_temp }
has_any_good_relationship_with_character_trigger = { CHARACTER = scope:char_temp }
}
}
}
# And check their location is valid.
location = {
# Which means making sure that they're not located too far away from our contractor.
"squared_distance(root.task_contract_taker.location)" <= squared_distance_large
# And that they're not located in the exact same province, else travel logic'll break.
this != scope:employer_ref.location
}
}
has_any_landed_title_trigger = {
any_held_title = {
NOR = {
is_noble_family_title = yes
is_landless_type_title = yes
has_variable = adventurer_creation_reason
}
}
}
# Toggle on tally logging for laamp events, so we can see how often they're firing for a single run test.
enable_debug_laamp_event_logging_toggle_trigger = { always = no }
# Can the AI create a new laamp without threatening performance?
## Beware of expanding this past the soft-cap figure of around ~200: code estimations were made with this number in mind, so the more we let slip the net, the more they'll start to degrade performance.
### YOU HAVE BEEN WARNED.
ai_can_valid_to_create_laamp_trigger = {
save_temporary_scope_as = char_temp
OR = {
# General checking.
NOT = { has_global_variable_list = laamps_tally }
global_variable_list_size = {
name = laamps_tally
value < max_desired_laamps_value
}
# Player-relevant.
any_player = {
OR = {
is_close_or_extended_family_of = scope:char_temp
is_consort_of = scope:char_temp
has_important_relationship_with_character_trigger = { CHARACTER = scope:char_temp }
is_allied_in_war = scope:char_temp
is_allied_to = scope:char_temp
is_at_war_with = scope:char_temp
}
}
# Encourage legitimists.
AND = {
any_claim = { tier >= tier_kingdom }
global_variable_list_size = {
name = laamps_tally
value < {
value = max_desired_laamps_value
multiply = 1.25
}
}
}
}
}
##################################################
# Decisions Triggers
# We want to refer to this in two places, is_shown and is_valid, within its decision so that we can explain where it's come from.
can_access_reject_inheritance_decision_trigger = {
OR = {
has_trait = content
has_perk = carefree_perk
has_government = landless_adventurer_government
}
}
# Would this character lose opinion with you if you declared "screw that" to your family's titular duties?
would_judge_new_gallivanters_trigger = {
NOR = {
# Traits that innately get it.
has_trait = gallivanter
has_trait = content
# Traits that probably get it if the situation merits it.
calc_true_if = {
amount >= 2
has_trait = compassionate
has_trait = lazy
has_trait = humble
has_trait = eccentric
}
}
is_adult = yes
}
butcher_animals_decision_available_dogs_trigger = {
OR = {
custom_tooltip = {
text = butcher_animals_decision.tt.dog.you
has_character_modifier = dog_story_modifier
}
custom_tooltip = {
text = butcher_animals_decision.tt.dog.courtier
any_courtier = { has_character_modifier = dog_story_modifier }
}
domicile = { has_domicile_building = baggage_train_kennel }
}
# Only show the cooldown flag if we already have it, so make our tooltips neater.
trigger_if = {
limit = { has_character_flag = recently_ate_dogs }
custom_tooltip = {
text = butcher_animals_decision.tt.recently_ate_dogs
NOT = { has_character_flag = recently_ate_dogs }
}
}
}
butcher_animals_decision_available_cats_trigger = {
OR = {
custom_tooltip = {
text = butcher_animals_decision.tt.cat.you
has_character_modifier = cat_story_modifier
}
custom_tooltip = {
text = butcher_animals_decision.tt.cat.courtier
any_courtier = { has_character_modifier = cat_story_modifier }
}
}
# Only show the cooldown flag if we already have it, so make our tooltips neater.
trigger_if = {
limit = { has_character_flag = recently_ate_cats }
custom_tooltip = {
text = butcher_animals_decision.tt.recently_ate_cats
NOT = { has_character_flag = recently_ate_cats }
}
}
}
butcher_animals_decision_available_horses_trigger = {
OR = {
custom_tooltip = {
text = butcher_animals_decision.tt.horse.you
has_character_modifier = horse_story_modifier
}
domicile = { has_domicile_building = baggage_train_ample_steeds }
}
# Only show the cooldown flag if we already have it, so make our tooltips neater.
trigger_if = {
limit = { has_character_flag = recently_ate_horses }
custom_tooltip = {
text = butcher_animals_decision.tt.recently_ate_horses
NOT = { has_character_flag = recently_ate_horses }
}
}
}
butcher_animals_decision_available_elephants_trigger = {
domicile = { has_domicile_building = proving_grounds_elephantry_reserve }
# Only show the cooldown flag if we already have it, so make our tooltips neater.
trigger_if = {
limit = { has_character_flag = recently_ate_elephants }
custom_tooltip = {
text = butcher_animals_decision.tt.recently_ate_elephants
NOT = { has_character_flag = recently_ate_elephants }
}
}
}
laamp_youth_cultural_tradition_trigger = {
has_global_variable_list = laamps_tally
global_variable_list_size = {
name = laamps_tally
value < {
value = max_desired_laamps_value
add = 10
}
}
culture = {
OR = {
has_cultural_parameter = much_more_likely_to_be_laamps
has_cultural_parameter = more_likely_to_be_laamps
}
}
any_close_or_extended_family_member = {
is_ruler = yes
}
is_lowborn = no
is_ruler = no
is_ai = yes
OR = {
AND = {
exists = liege
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = liege }
}
AND = {
is_male = yes
faith_dominant_gender_male_or_equal = yes
}
AND = {
is_female = yes
faith_dominant_gender_female_or_equal = yes
}
}
trigger_if = {
limit = {
exists = liege
}
liege = {
is_landless_adventurer = no
is_ai = yes
}
}
NOT = {
any_heir_title = { }
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,160 @@

#########################
# Triggers for Titles
#########################
# has_mythical_founder_trigger - Does the title have a mythical or semi-mythical founder?
has_mythical_founder_trigger = {
OR = {
AND = { # Charles Martell (?)
OR = {
this = title:k_france
this = title:e_france
}
current_date > 1000.1.1
}
OR = { # Alexander
this = title:k_thessalonika
this = title:k_hellas
this = title:k_egypt
AND = {
OR = {
this = title:k_persia
this = title:e_persia
}
NOR = {
root.faith.religion = religion:islam_religion
root.faith.religion = religion:zoroastrianism_religion
}
}
this = title:k_anatolia
}
this = title:k_poland # Lech
this = title:k_bohemia # Czech
OR = { # Rus
this = title:k_white_rus
this = title:k_ruthenia
this = title:e_russia
}
OR = { # Arthur
this = title:k_england
this = title:e_britannia
}
AND = {
OR = { # Belisarius
this = title:k_italy
this = title:k_romagna
this = title:k_sardinia
this = title:k_naples
this = title:e_italy
}
root.faith = faith:orthodox
}
OR = { # Romulus
this = title:k_italy
this = title:k_romagna
this = title:k_sardinia
this = title:e_italy
this = title:h_roman_empire
this = title:h_eastern_roman_empire
}
OR = { # Ardashir
this = title:k_persia
this = title:e_persia
}
AND = { # Pharaohs
this = title:k_egypt
NOT = { root.faith.religion = religion:islam_religion }
}
AND = { # Visigothic Kings
OR = {
this = title:k_castille
this = title:k_aragon
this = title:k_navarra
this = title:k_andalusia
this = title:k_portugal
this = title:e_spain
}
NOT = { root.faith.religion = religion:islam_religion }
}
AND = { # Abd al-Rahman
OR = {
this = title:k_castille
this = title:k_aragon
this = title:k_navarra
this = title:k_andalusia
this = title:k_portugal
this = title:e_spain
}
root.faith.religion = religion:islam_religion
}
AND = { # Zenobia
OR = {
this = title:k_syria
this = title:k_mesopotamia
}
NOT = { root.faith.religion = religion:islam_religion }
}
}
}
has_too_many_held_duchies_trigger = {
highest_held_title_tier >= tier_kingdom
any_held_title = {
count >= 3
title_counts_towards_too_many_duchies_trigger = yes
}
}
title_counts_towards_too_many_duchies_trigger = {
tier = tier_duchy
is_titular = no
}
# this = title
# VASSAL = Vassal to check tier against
# LIEGE = Liege of vassal
title_lost_from_realm_on_foreign_ruler_succession_trigger = {
tier > $VASSAL$.highest_held_title_tier
exists = holder # Ignoring titles that will be created by confederate partition, cause that be magic and unlikely to make a warning anyway
holder = {
NOR = {
this = $LIEGE$
target_is_liege_or_above = $LIEGE$
government_has_flag = government_is_special_administrative # Ignoring because admin counts do not take it with them, but immediately resign it when they inherit a governorship
}
}
}
# Would this character ever be travelling outside of their palace walls at random for the purposes of events?
## We don't care about personality, only whether it'd be immersion breaking in principle to run into this person at random/to have an event trigger where you are randomly wandering.
character_title_allows_off_screen_wandering_trigger = {
NOR = {
# No administrative or clan emperors.
AND = {
highest_held_title_tier >= tier_empire
OR = {
government_has_flag = government_is_special_administrative
government_has_flag = government_is_clan
}
}
# No administrative kings.
AND = {
highest_held_title_tier = tier_kingdom
government_has_flag = government_is_special_administrative
}
# No religious heads.
faith.religious_head ?= this
}
}
county_held_or_vassal_to_target_trigger = {
holder ?= {
OR = {
this = $TARGET$
target_is_liege_or_above = $TARGET$
}
}
}

View file

@ -0,0 +1,991 @@

###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
faith != root.faith
}
primary_defender = {
is_at_war_with = root
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
faith != root.faith
}
primary_defender = {
is_at_war_with = root
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 = {
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 = {
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 = {
NOT = {
# Diarchs can join against other vassals.
this ?= $WARRIOR$.diarch
# Confederation members can join the confederation leader's defensive wars
AND = {
is_confederation_member = yes
$WARRIOR$ = {
is_member_of_confederation = $JOINER$.confederation
}
}
}
}
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) -- Unless you have the Nomadic Contract Right
custom_description = {
text = cannot_call_liege_to_war
$JOINER$ = {
trigger_if = {
limit = {
target_is_vassal_or_below = $WARRIOR$
$WARRIOR$ = {
vassal_contract_has_flag = vassal_contract_liege_forced_war_override
}
}
always = yes
}
trigger_else_if = {
limit = {
$JOINER$ = {
NOT = {
target_is_vassal_or_below = $WARRIOR$
}
}
}
always = yes
}
trigger_else = {
always = no
}
}
}
}
war_declarer_needs_hook_on_liege = {
scope:actor = {
top_liege != this
liege != scope:recipient
NAND = {
government_allows = administrative
liege = { government_allows = administrative }
}
NOT = {
vassal_contract_has_flag = vassal_contract_war_override
}
OR = {
AND = {
liege = scope:recipient.liege
liege = { has_realm_law_flag = vassal_internal_wars_banned }
}
liege = { has_realm_law_flag = vassal_all_wars_banned }
AND = {
has_realm_law = japanese_bureaucracy_2
NOT = { government_allows = administrative }
}
}
}
}
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
government_has_flag = government_is_nomadic
government_has_flag = government_is_steppe_admin
faith = { has_doctrine_parameter = conquest_cb_enabled }
culture = { has_cultural_parameter = can_use_conquest_cbs }
AND = {
government_has_flag = government_is_japan_feudal
has_realm_law = imperial_expansion_law
}
}
}
can_be_warrior_trigger = {
is_available_quick = {
adult = yes
imprisoned = no
incapable = no
}
tgp_is_ceremonial_liege_trigger = no
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
}
# Japan Onna-musha
trigger_if = {
limit = {
#not for admin
$ARMY_OWNER$ = {
NOT = {
government_allows = administrative
}
culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars }
}
culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars }
}
AND = {
$ARMY_OWNER$ = { is_at_war_as_defender = yes }
OR = {
is_spouse_of = $ARMY_OWNER$
AND = {
is_close_family_of = $ARMY_OWNER$
is_married = no
}
}
}
}
}
}
can_be_knight_trigger = {
is_available_quick = {
ai = yes
hostage = no
}
can_be_warrior_trigger = { ARMY_OWNER = $ARMY_OWNER$ }
trigger_if = { # Admin governors cannot be knights
limit = {
$ARMY_OWNER$ = { government_allows = administrative }
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
}
trigger_if = {
limit = {
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
}
this != liege.diarch
}
}
# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are.
can_be_commander_basic_trigger = {
is_available_quick = {
alive = yes
adult = yes
incapable = no
hostage = no
}
NAND = {
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
highest_held_title_tier < tier_hegemony
}
}
# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are.
can_be_commander_now_trigger = {
is_available_quick = {
alive = yes
adult = yes
imprisoned = no
travel = no
}
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
}
custom_description = {
text = ALREADY_IN_ACTIVITY
NOR = {
exists = involved_activity
has_variable = homage_liege_scope
has_character_flag = meditation_character_flag
has_character_flag = local_shrine_rite
has_character_flag = petition_liege_character_flag
has_character_flag = holding_court_character_flag
is_being_visited_on_tour_strict = yes
}
}
}
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_cb = mpo_gok_onslaught_cb
}
}
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 = {
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 = {
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 = {
de_jure_liege ?= {
exists = holder
OR = {
capital_vassal = {
title_province = {
geographical_region = $TARGET_REGION$
}
}
AND = {
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
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_special_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 = {
trigger_if = { # Conquerors go for neighbors, no need to go overseas
limit = {
has_trait = conqueror
is_ai = yes
}
always = no
}
trigger_else_if = {
limit = {
has_fp1_dlc_trigger = yes
}
can_use_viking_invasion_cbs_dlc_trigger = yes
OR = {
#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.
capital_province = {
NOT = { geographical_region = world_europe_north }
}
#Players are under no restrictions.
is_ai = no
}
}
trigger_else = {
has_fp1_dlc_trigger = no
can_use_viking_invasion_cbs_dlc_trigger = yes
}
}
can_use_viking_invasion_cbs_dlc_trigger = {
culture = { has_innovation = innovation_longboats }
faith = { has_doctrine = tenet_warmonger }
any_sub_realm_county = { is_coastal_county = yes }
trigger_if = {
limit = { is_ai = yes }
prestige >= 75
OR = {
top_liege = this
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 = { top_liege != this }
}
scope:attacker = {
NOT = { character_is_land_realm_neighbor = scope:defender }
}
scope:defender = { top_liege = this }
}
trigger_else = {
always = no
}
}
herders_and_tributary_constraints = {
trigger_if = {
limit = { exists = scope:defender }
scope:defender = {
save_temporary_scope_as = recipient # done for is_a_herder_defender_tt
NOR = {
custom_tooltip = {
text = is_a_herder_defender_tt # herders can't fight
government_has_flag = government_is_herder
}
is_tributary_of_suzerain_or_above = scope:attacker # can't fight your tributaries or your tributaries' tributaries
}
# You cannot attack your Confederation buddies tributaries
trigger_if = {
limit = {
suzerain != this
scope:attacker = { is_confederation_member = yes }
suzerain = { is_confederation_member = yes }
}
NOT = { scope:attacker.confederation = suzerain.confederation }
}
}
scope:attacker = { # Tributaries cannot attack their Suzerain or Suzerain's Confederation buddies
NOR = {
is_tributary_of_suzerain_or_above = scope:defender # can't attack your own suzerain
trigger_if = {
limit = {
suzerain != this
scope:defender = { is_confederation_member = yes }
suzerain = { is_confederation_member = yes }
}
# if you have a suzerain who's part of a confederation, you may not attack any of its members
scope:defender.confederation = suzerain.confederation
}
}
}
#Mandala Vassals shouldn't attack their Liege's Tributaries
trigger_if = {
limit = {
scope:attacker = {
is_independent_ruler = no
liege ?= { government_has_flag = government_is_mandala }
}
}
NOT = {
scope:defender = { is_tributary_of = scope:attacker.liege }
}
}
}
}
feudal_clan_tribal_conquest_constraints = {
OR = {
AND = {
tier = tier_county
title_province = {
OR = {
has_holding_type = tribal_holding
has_holding_type = nomad_holding
has_holding_type = herder_holding
}
}
}
AND = {
tier > tier_county
any_in_de_jure_hierarchy = {
tier = tier_county
title_province = {
OR = {
has_holding_type = tribal_holding
has_holding_type = nomad_holding
has_holding_type = herder_holding
}
}
}
}
}
scope:attacker = {
NOR = {
government_has_flag = government_is_tribal
government_has_flag = government_is_nomadic
}
short_term_gold < 200
OR = {
AND = {
government_has_flag = government_is_special_administrative
short_term_gold < 700
this != top_liege
}
any_sub_realm_county = {
title_province = {
OR = {
has_holding_type = tribal_holding
has_holding_type = nomad_holding
has_holding_type = herder_holding
}
}
}
}
}
}

View file

@ -0,0 +1,738 @@

##################################################
# General Triggers
fp2_should_use_iberian_graphics_trigger = {
culture = { has_building_gfx = iberian_building_gfx }
}
fp2_character_any_involvement_iberian_struggle_trigger = {
has_fp2_dlc_trigger = yes
OR = {
fp2_character_involved_in_struggle_trigger = yes
fp2_character_interloper_in_struggle_trigger = yes
}
}
fp2_character_involved_in_struggle_trigger = {
has_fp2_dlc_trigger = yes
any_character_struggle = {
involvement = involved
is_struggle_type = iberian_struggle
}
}
fp2_character_interloper_in_struggle_trigger = {
has_fp2_dlc_trigger = yes
any_character_struggle = {
involvement = interloper
is_struggle_type = iberian_struggle
}
}
fp2_character_uninvolved_in_struggle_trigger = {
has_fp2_dlc_trigger = yes
exists = struggle:iberian_struggle
fp2_character_interloper_in_struggle_trigger = no
fp2_character_involved_in_struggle_trigger = no
}
eligible_for_fp2_dynasty_legacies_trigger = {
has_fp2_dlc_trigger = yes
dynasty = {
OR = {
dynast = {
OR = {
any_character_struggle = {
involvement = involved
is_struggle_type = iberian_struggle
}
culture = {
has_cultural_pillar = heritage_iberian
}
capital_province ?= {
geographical_region = world_europe_west_iberia
}
}
}
}
}
}
is_toledo_ownership_valid_trigger = {
title:c_toledo.holder = {
OR = {
this = root
liege = root
top_liege = root
}
faith = {
portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church }
}
}
}
##################################################
# Cultural & Regional Triggers
culture_valid_for_ritualised_best_friends_trigger = {
culture = { has_cultural_parameter = strong_hooks_and_stress_effects_best_friends }
}
valid_ritualised_best_friendship_two_way_trigger = {
$ACTOR_FRIEND$ = {
# Check that they have the appropriate cultural parameter...
culture_valid_for_ritualised_best_friends_trigger = yes
# ... and that they've still got a best friend...
any_relation = {
type = best_friend
this = $RECIPIENT_FRIEND$
# ... who also still has the cultural parameter.
culture_valid_for_ritualised_best_friends_trigger = yes
}
}
}
valid_ritualised_best_friendship_one_way_trigger = {
$ACTOR_FRIEND$ = {
# Check that they have the appropriate cultural parameter...
culture_valid_for_ritualised_best_friends_trigger = yes
# ... and that they've got a best friend...
any_relation = {
type = best_friend
# ... who also still has the cultural parameter.
culture_valid_for_ritualised_best_friends_trigger = yes
}
}
}
##################################################
# Illustration Triggers
##################################################
# Interaction Triggers
has_any_best_friend_synergy_bonus_modifier_trigger = {
OR = {
has_character_modifier = fp2_single_synergy_diplomacy_modifier
has_character_modifier = fp2_single_synergy_martial_modifier
has_character_modifier = fp2_single_synergy_stewardship_modifier
has_character_modifier = fp2_single_synergy_intrigue_modifier
has_character_modifier = fp2_single_synergy_learning_modifier
has_character_modifier = fp2_double_synergy_diplomacy_diplomacy_modifier
has_character_modifier = fp2_double_synergy_diplomacy_martial_modifier
has_character_modifier = fp2_double_synergy_diplomacy_stewardship_modifier
has_character_modifier = fp2_double_synergy_diplomacy_intrigue_modifier
has_character_modifier = fp2_double_synergy_diplomacy_learning_modifier
has_character_modifier = fp2_double_synergy_martial_diplomacy_modifier
has_character_modifier = fp2_double_synergy_martial_martial_modifier
has_character_modifier = fp2_double_synergy_martial_stewardship_modifier
has_character_modifier = fp2_double_synergy_martial_intrigue_modifier
has_character_modifier = fp2_double_synergy_martial_learning_modifier
has_character_modifier = fp2_double_synergy_stewardship_diplomacy_modifier
has_character_modifier = fp2_double_synergy_stewardship_martial_modifier
has_character_modifier = fp2_double_synergy_stewardship_stewardship_modifier
has_character_modifier = fp2_double_synergy_stewardship_intrigue_modifier
has_character_modifier = fp2_double_synergy_stewardship_learning_modifier
has_character_modifier = fp2_double_synergy_intrigue_diplomacy_modifier
has_character_modifier = fp2_double_synergy_intrigue_martial_modifier
has_character_modifier = fp2_double_synergy_intrigue_stewardship_modifier
has_character_modifier = fp2_double_synergy_intrigue_intrigue_modifier
has_character_modifier = fp2_double_synergy_intrigue_learning_modifier
has_character_modifier = fp2_double_synergy_learning_diplomacy_modifier
has_character_modifier = fp2_double_synergy_learning_martial_modifier
has_character_modifier = fp2_double_synergy_learning_stewardship_modifier
has_character_modifier = fp2_double_synergy_learning_intrigue_modifier
has_character_modifier = fp2_double_synergy_learning_learning_modifier
}
}
purchase_truce_interaction_recipient_can_de_jure_war_actor_trigger = {
scope:recipient = {
OR = {
has_cb_on = {
target = scope:actor
cb = de_jure_cb
}
has_cb_on = {
target = scope:actor
cb = individual_county_de_jure_cb
}
has_cb_on = {
target = scope:actor
cb = individual_duchy_de_jure_cb
}
}
}
}
fp2_struggle_contract_assistance_war_winning_trigger = {
trigger_if = {
limit = {
scope:recipient = { is_attacker_in_war = prev }
}
attacker_war_score >= offer_assistance_interaction_already_winning_value
}
trigger_else = { defender_war_score >= offer_assistance_interaction_already_winning_value }
}
fp2_struggle_contract_assistance_war_losing_trigger = {
trigger_if = {
limit = {
scope:recipient = { is_attacker_in_war = prev }
}
defender_war_score >= offer_assistance_interaction_already_losing_value
}
trigger_else = { attacker_war_score >= offer_assistance_interaction_already_losing_value }
}
fp2_struggle_contract_assistance_war_outnumbering_trigger = {
trigger_if = {
limit = {
scope:recipient = { is_attacker_in_war = prev }
}
war_attacker_total_strength_halved_value > war_defender_total_strength_value
}
trigger_else = { war_defender_total_strength_halved_value > war_attacker_total_strength_value }
}
fp2_struggle_contract_assistance_war_outnumbered_trigger = {
trigger_if = {
limit = {
scope:recipient = { is_attacker_in_war = prev }
}
war_defender_total_strength_halved_value > war_attacker_total_strength_value
}
trigger_else = { war_attacker_total_strength_halved_value > war_defender_total_strength_value }
}
fp2_struggle_contract_assistance_war_outnumbered_minor_trigger = {
trigger_if = {
limit = {
scope:recipient = { is_attacker_in_war = prev }
}
war_defender_total_strength_value > war_attacker_total_strength_value
}
trigger_else = { war_attacker_total_strength_value > war_defender_total_strength_value }
}
fp2_struggle_contract_assistance_war_insufficient_trigger = {
trigger_if = {
limit = {
scope:recipient = { is_attacker_in_war = prev }
}
scope:actor.max_military_strength < war_defender_total_strength_tenth_value
}
trigger_else = { scope:actor.max_military_strength < war_attacker_total_strength_tenth_value }
}
##################################################
# Religious Triggers
##################################################
# Achievement Triggers
##################################################
# Decision Triggers
##### Struggle Ending #####
### Common
# Checks a de jure kingdom of Hispania is completely controlled
fp2_struggle_ending_hold_de_jure_kingdom_trigger = {
title:e_spain ?= {
any_in_de_jure_hierarchy = {
tier = tier_kingdom
any_in_de_jure_hierarchy = {
tier = tier_county
}
holder = root
root = {
completely_controls = prev
}
}
}
}
# Checks less than half of Iberia owned
fp2_struggle_ending_percent_iberia_trigger = {
any_county_in_region = {
region = world_europe_west_iberia
percent < fp2_struggle_compromise_owned_percent_decimal_value
holder.top_liege = root
}
}
# Checks no more than half of Iberia is owned by another
fp2_struggle_ending_other_percent_iberia_trigger = {
struggle:iberian_struggle = {
NOT = {
any_involved_ruler = {
exists = primary_title # Max figured out that is_independent_ruler causes errors if you are unlanded
this != root
top_liege = this
primary_title = { is_mercenary_company = no }
any_county_in_region = {
region = world_europe_west_iberia
percent > fp2_struggle_compromise_involved_percent_decimal_value
holder.top_liege = prev
}
}
}
}
}
# Checks duchy is held by an independent ruler who owns at least half of it
fp2_struggle_ending_compromise_independent_duchy_trigger = {
tier = tier_duchy
# Is created
exists = holder
OR = {
# Is not the heartland of an existing kingdom
title_capital_county != de_jure_liege.title_capital_county
# Capital duke doesn't control kingdom, edge case
AND = {
exists = de_jure_liege.holder
holder != de_jure_liege.holder
}
}
# Is ruled by an independent duke
holder = {
top_liege = this
save_temporary_scope_as = duchy_holder
primary_title = {
is_mercenary_company = no
OR = {
tier = tier_duchy
tier = tier_kingdom
}
}
}
OR = {
this = holder.primary_title
holder.primary_title.tier = tier_kingdom
}
# Duke rules at least half the de jure duchy
any_direct_de_jure_vassal_title = {
percent >= 0.5
holder.top_liege = scope:duchy_holder
}
}
# Checks duchy should be split from de jure kingdom
fp2_struggle_ending_compromise_split_duchy_trigger = {
tier = tier_duchy
# Has not been tampered with already
NOT = { is_in_list = duchy_kingdom }
# Is not created
NOT = { exists = holder }
# Is not heartland of an existing kingdom
title_capital_county != de_jure_liege.title_capital_county
save_temporary_scope_as = duchy
# Less than half is owned by de jure kingdom, if created
trigger_if = {
limit = { exists = scope:duchy.de_jure_liege.holder }
any_direct_de_jure_vassal_title = {
percent < 0.5
holder.top_liege = scope:duchy.de_jure_liege.holder.top_liege
}
}
trigger_else = { always = no }
}
# Checks titular duchy should be made into de jure kingdom
fp2_struggle_ending_compromise_titular_trigger = {
# Has not been tampered with already
NOT = { is_in_list = duchy_kingdom }
# Is created
exists = holder
# Is ruled by an independent duke
holder = {
top_liege = this
primary_title = {
is_mercenary_company = no
tier = tier_duchy
}
}
# Titular duke holds at least half of any de jure duchy of Hispania
title:e_spain = {
any_in_de_jure_hierarchy = {
tier = tier_duchy
any_direct_de_jure_vassal_title = {
percent >= 0.5
holder.top_liege = scope:special_duchy.holder
}
}
}
}
# Should title be created by ststus quo decision?
fp2_struggle_ending_compromise_create_title_trigger = {
NOR = {
this = title:e_spain
exists = holder
is_in_list = assigned_title
# Only if no other same rank rulers in title (e.g. multiple kings under empire)
any_direct_de_jure_vassal_title = {
exists = holder
holder != scope:new_owner_temp
}
}
}
# Checks two cultures were Involved in the struggle that ended in Conciliation
fp2_struggle_conciliation_special_cultural_rules_trigger = {
has_global_variable = fp2_struggle_conciliation_ending
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = $C1$.culture
}
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = $C2$.culture
}
}
# Checks two faiths were Involved in the struggle that ended in Conciliation
are_holy_wars_disabled_by_struggle_conciliation_trigger = {
has_global_variable = fp2_struggle_conciliation_ending
any_in_global_list = {
variable = fp2_struggle_ending_faith_list
this = scope:attacker.faith
}
any_in_global_list = {
variable = fp2_struggle_ending_faith_list
this = scope:defender.faith
}
}
# Checks if characters were both involved in struggle
fp2_struggle_conciliation_recipient_actor_involved_trigger = {
has_global_variable = fp2_struggle_conciliation_ending
AND = {
scope:actor.capital_province = { geographical_region = world_europe_west_iberia }
scope:recipient.capital_province = { geographical_region = world_europe_west_iberia }
# Offer comes from an Involved culture/faith character
OR = {
any_in_global_list = {
variable = fp2_struggle_ending_faith_list
this = scope:actor.faith
}
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = scope:actor.culture
}
}
# Recipient is from an Involved culture/faith
OR = {
any_in_global_list = {
variable = fp2_struggle_ending_faith_list
this = scope:recipient.faith
}
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = scope:recipient.culture
}
}
}
}
# Checks if character was involved in struggle
fp2_struggle_conciliation_scope_uninvolved_trigger = {
has_global_variable = fp2_struggle_conciliation_ending
OR = {
NOR = {
any_in_global_list = {
variable = fp2_struggle_ending_faith_list
this = $SCOPE$.faith
}
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = $SCOPE$.culture
}
}
NOT = {
$SCOPE$.capital_province = { geographical_region = world_europe_west_iberia }
}
}
}
fp2_struggle_compromise_transfer_duchy_trigger = {
tier = tier_duchy
save_temporary_scope_as = transfer_duchy
# Duchy is completely controlled by its capital's holder's top_liege
exists = title_capital_county.holder.top_liege
title_capital_county.holder.top_liege = { completely_controls = scope:transfer_duchy }
# De jure liege does not control duchy
trigger_if = {
limit = { exists = kingdom.holder }
kingdom != scope:transfer_duchy.title_capital_county.holder.top_liege.capital_county.kingdom
}
# Is controlled by a kingdom tier
trigger_else = { title_capital_county.holder.top_liege.primary_title.tier >= tier_kingdom }
# Duchy is connected de_jure to holders kingdom
any_de_jure_county = {
any_title_to_title_neighboring_and_across_water_county = {
exists = kingdom.holder
kingdom.holder = scope:transfer_duchy.title_capital_county.holder.top_liege
}
}
}
fp2_struggle_council_toledo_attendee_trigger = {
OR = {
has_trait = education_learning_3
has_trait = education_learning_4
has_trait = education_learning_5
}
}
fp2_struggle_council_toledo_decision_trigger = {
is_toledo_ownership_valid_trigger = yes
is_at_war = no
}
fp2_struggle_secure_iberian_foothold_iberian_kingdom_trigger = {
tier = tier_kingdom
de_jure_liege = title:e_spain
root = { completely_controls = prev }
save_temporary_scope_as = iberian_kingdom_temp
}
fp2_struggle_secure_iberian_foothold_faith_trigger = {
fp2_struggle_secure_iberian_foothold_faith_percent_value >= fp2_struggle_secure_iberian_foothold_faith_target_percent_value
}
fp2_struggle_secure_iberian_foothold_outsider_kingdom_trigger = {
any_de_jure_county = {
any_title_to_title_neighboring_and_across_water_county = {
NOT = { empire = title:e_spain }
kingdom.holder = root
}
}
}
fp2_struggle_iberian_reclamation_should_vassalize_trigger = {
any_character_struggle = { is_struggle_type = iberian_struggle }
any_held_title = { tier < scope:attacker.primary_title.tier }
any_realm_county = {
count = all
duchy = { is_in_list = target_titles }
any_county_struggle = { is_struggle_type = iberian_struggle }
}
}
fp2_struggle_any_realm_county_in_hispania_trigger = {
any_realm_county = { target_is_de_jure_liege_or_above = title:e_spain }
}
fp2_iberian_reclamation_vassalize_iberian_trigger = {
tier = tier_county
holder = {
any_character_struggle = {
involvement = involved
is_struggle_type = iberian_struggle
}
liege = scope:defender
this != scope:defender
capital_county = {
any_county_struggle = { is_struggle_type = iberian_struggle }
}
}
}
fp2_iberian_reclamation_involved_county_trigger = {
any_realm_county = {
any_county_struggle = { is_struggle_type = iberian_struggle }
}
}
fp2_iberian_reclamation_vassalize_vassal_trigger = {
primary_title.tier >= tier_county
primary_title.tier < scope:attacker.primary_title.tier
any_character_struggle = { is_struggle_type = iberian_struggle }
capital_county = {
duchy = { is_in_list = target_titles }
}
any_sub_realm_county = {
count = all
duchy = { is_in_list = target_titles }
any_county_struggle = { is_struggle_type = iberian_struggle }
}
}
fp2_struggle_enforce_truce_war_leader_trigger = {
custom_tooltip = {
text = fp2_enforce_truce_war_with_not_involved_tt
any_character_struggle = {
involvement = involved
}
}
custom_tooltip = {
text = fp2_enforce_truce_tier_difference_tt
tier_difference = {
target = scope:actor
value <= 0
}
}
NOR = {
this = scope:recipient
this = scope:actor
}
custom_tooltip = {
text = fp2_enforce_truce_liege_or_independent_tt
OR = {
scope:recipient = { top_liege = this }
scope:recipient.top_liege = scope:actor.top_liege
top_liege = this
top_liege = scope:actor.top_liege
}
}
}
fp2_bargain_fealty_war_outnumbered_trigger = {
war_attacker_total_strength_halved_value > scope:recipient.max_military_strength
}
fp2_bargain_fealty_war_losing_trigger = {
attacker_war_score >= fp2_bargain_fealty_interaction_already_losing_value
}
# We use a hard trigger so that this can be easily adjusted without overwriting the rest of the fp2_interactions file by modders.
struggle_can_access_unlocks_bargain_fealty_interaction_trigger = {
# Just uhh, use an OR if you add something else.
is_struggle_type = iberian_struggle
}
##################################################
# Multi-File Event Triggers
fp2_lyonese_monk_0002_papal_hof_trigger = {
OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion }
exists = faith.religious_head
faith.religious_head_title = title:k_papal_state
}
fp2_lyonese_monk_0002_valid_character_configuration_trigger = {
OR = {
has_trait = scholar
has_trait = theologian
has_trait = lifestyle_mystic
AND = {
is_ai = no
learning >= very_high_skill_rating
has_lifestyle = learning_lifestyle
}
}
}
fp2_lyonese_monk_0002_valid_court_trigger = {
# Must have the Pope as a HoF.
fp2_lyonese_monk_0002_papal_hof_trigger = yes
# Filter out anyone not able to be at home when the monk comes a'knockin'.
is_physically_able = yes
# Must be into bookish discussions.
## Narratively, this is what attracts them to your court.
## Mechanically, this is how players can opt in for the chain so it's not completely random.
fp2_lyonese_monk_0002_valid_character_configuration_trigger = yes
# Remove non-playables.
NOR = {
government_has_flag = government_is_theocracy
government_has_flag = government_is_republic
}
# Plus, for various reasons, we don't want Lyon _itself_.
NOT = {
any_held_title = { this = title:c_lyon }
}
}
fp2_lyonese_monk_0000_valid_for_events_trigger = {
fp2_lyonese_monk_0000_out_of_realm_trigger = no
fp2_lyonese_monk_0000_out_of_freedom_trigger = no
fp2_lyonese_monk_0000_out_of_popes_trigger = no
fp2_lyonese_monk_0000_out_of_faith_trigger = no
}
fp2_lyonese_monk_0000_out_of_realm_trigger = {
scope:acolyte = {
OR = {
is_alive = no
is_imprisoned = yes
AND = {
is_landed_or_landless_administrative = no
NOT = {
host = scope:acolyte_host
# Make an exception if you're in prison, since that should give a different event.
scope:acolyte_host = { is_imprisoned = no }
}
}
AND = {
is_landed_or_landless_administrative = yes
NOT = {
any_liege_or_above = { this = scope:acolyte_host }
}
}
}
}
}
fp2_lyonese_monk_0000_out_of_freedom_trigger = { is_imprisoned = yes }
fp2_lyonese_monk_0000_out_of_popes_trigger = {
NOT = { exists = scope:story.var:base_faith.religious_head }
}
fp2_lyonese_monk_0000_out_of_faith_trigger = {
OR = {
scope:acolyte.faith.religious_head != scope:story.var:base_faith.religious_head
scope:acolyte_host.faith.religious_head != scope:story.var:base_faith.religious_head
}
}
fp2_does_this_player_care_about_the_fate_of_iberia = {
this != root
OR = {
location = {
OR = { # Is in region
geographical_region = world_europe_west
geographical_region = world_africa_north
geographical_region = world_europe_south_italy
}
}
struggle:iberian_struggle = { is_culture_involved_in_struggle = prev.culture }
}
}
fp2_eligible_for_yearly_events_trigger = {
has_fp2_dlc_trigger = yes
OR = {
any_character_struggle = {
involvement = involved
is_struggle_type = iberian_struggle
}
culture = {
has_cultural_pillar = heritage_iberian
}
capital_province ?= {
geographical_region = world_europe_west_iberia
}
}
}
fp2_purchase_truce_interaction_soft_requirements_trigger = {
OR = {
always = no
any_character_struggle = {
involvement = involved
has_struggle_phase_parameter = unlocks_truce_purchasing_interaction
}
has_perk = defensive_negotiations_perk
culture = { has_cultural_parameter = unlocks_purchase_truce }
}
}

View file

@ -0,0 +1,709 @@
##################################################
### FRANKOKRATIA TRIGGERS
##################################################
ep3_frankokratia_ghw_trigger = {
#There is an emperor of Byzantium
exists = title:e_byzantium.holder
#There is NOT a Latin emperor
NOT = { exists = title:e_latin_empire.holder }
#Byzantine emperor is Christian, but not Catholic
title:e_byzantium.holder.faith = {
NOT = { this = faith:catholic }
OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion }
}
trigger_if = {
limit = {
title:e_byzantium.holder = {
government_has_flag = government_is_special_administrative
}
}
#Byzantine state faith is not Catholic
title:e_byzantium.holder.primary_title = {
state_faith = {
NOT = { this = faith:catholic }
OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion }
}
}
}
trigger_if = {
limit = {
has_game_rule = historicity_frankokratia_default
}
OR = {
exists = global_var:cath_crusade_1
current_date >= 1178.1.1
}
}
trigger_else_if = {
limit = {
has_game_rule = historicity_frankokratia_blocked
}
always = no
}
trigger_else_if = {
limit = {
has_game_rule = historicity_frankokratia_fourth_crusade
}
OR = {
AND = {
current_date < 1178.1.1
exists = global_var:cath_crusade_1
global_var:cath_crusade_1 >= 3
}
AND = {
current_date >= 1178.1.1
exists = global_var:cath_crusade_1
}
}
}
trigger_else = {
#historicity_frankokratia_high game rule has no start date-based restrictions
}
#Byz emperor or By capital is some kind of Greek
OR = {
title:e_byzantium.holder.culture = {
OR = {
this = culture:greek
any_parent_culture_or_above = {
this = culture:greek
}
has_cultural_pillar = heritage_byzantine
}
}
title:e_byzantium.holder.capital_county.culture = {
OR = {
this = culture:greek
any_parent_culture_or_above = {
this = culture:greek
}
has_cultural_pillar = heritage_byzantine
}
}
}
#Looser requirements if we really want it to happen
trigger_if = {
limit = {
current_date >= 1200.1.1
#Latin empire hasn't been made before
NOT = {
has_global_variable = frankokratia_occurred
}
exists = global_var:cath_crusade_1
}
#A target that Mediterranean control could help reach.. and a bit more
ghw_target_title = {
OR = {
title_capital_county.title_province = { geographical_region = world_middle_east_arabia }
title_capital_county.title_province = { geographical_region = world_middle_east_jerusalem }
title_capital_county.title_province = { geographical_region = world_asia_minor }
title_capital_county.title_province = { geographical_region = world_africa_north }
title_capital_county.title_province = { geographical_region = world_europe_west_iberia }
this = title:k_caucasus
this = title:k_pontic_steppe
this = title:k_cyprus
this = title:k_krete
this = title:k_hellas
this = title:k_sardinia
}
}
}
trigger_else = {
#A target that Mediterranean control could help reach
ghw_target_title = {
OR = {
title_capital_county.title_province = { geographical_region = world_middle_east_arabia }
title_capital_county.title_province = { geographical_region = world_middle_east_jerusalem }
title_capital_county.title_province = { geographical_region = world_asia_minor }
title_capital_county.title_province = { geographical_region = world_africa_north }
this = title:k_caucasus
this = title:k_pontic_steppe
this = title:k_cyprus
this = title:k_krete
this = title:k_hellas
}
}
}
}
ep3_frankokratia_transiting_relative_trigger = {
OR = {
is_ruler = no
AND = {
exists = scope:char_temp
highest_held_title_tier <= scope:char_temp.highest_held_title_tier
}
AND = {
exists = root
highest_held_title_tier <= root.highest_held_title_tier
}
highest_held_title_tier < tier_county
NOT = {
faith = faith:catholic
}
is_imprisoned = yes
is_incapable = yes
capital_province = {
NOR = {
geographical_region = world_europe_south_italy
geographical_region = world_europe_west_francia
geographical_region = world_europe_west_germania
geographical_region = world_europe_west_iberia
geographical_region = custom_hungary
geographical_region = custom_west_slavia
kingdom = title:k_croatia
kingdom = title:k_bavaria
}
}
is_vassal_of = title:e_byzantium.holder
is_at_war_with = title:e_byzantium.holder
}
is_ai = yes
}
ep3_frankokratia_story_owner_trigger = {
save_temporary_scope_as = char_temp
faith = faith:catholic
is_playable_character = yes
highest_held_title_tier >= tier_county
highest_held_title_tier <= tier_kingdom
exists = faith.religious_head
faith.religious_head = { is_ai = yes }
scope:char_temp != faith.religious_head
exists = scope:char_temp.faith.great_holy_war
#Not pals with the Byzantine emperor
exists = title:e_byzantium.holder
is_imprisoned = no
is_incapable = no
#Use this to eliminate owners that might lose the story
OR = {
exists = primary_heir
exists = player_heir
}
NOR = {
is_allied_to = title:e_byzantium.holder
top_liege = title:e_byzantium.holder
is_at_war_with = title:e_byzantium.holder
has_truce = title:e_byzantium.holder
has_relation_friend = title:e_byzantium.holder
has_relation_lover = title:e_byzantium.holder
has_relation_soulmate = title:e_byzantium.holder
}
#Needs to be interesteed in working with Latin shipbuilders
capital_province = {
OR = {
geographical_region = world_europe_south_italy
geographical_region = world_europe_west_francia
geographical_region = world_europe_west_germania
geographical_region = world_europe_west_iberia
geographical_region = custom_hungary
geographical_region = custom_west_slavia
kingdom = title:k_croatia
kingdom = title:k_bavaria
}
}
#Needs to be related to a claimant
OR = {
#Close family claimant
any_close_or_extended_family_member = {
OR = {
ep3_frankokratia_claimant_trigger = yes
AND = {
ep3_frankokratia_transiting_relative_trigger = yes
#In-law claimant
any_spouse = {
ep3_frankokratia_claimant_trigger = yes
}
}
}
}
#Close family in-law
any_close_family_member = {
ep3_frankokratia_transiting_relative_trigger = yes
any_spouse = {
ep3_frankokratia_transiting_relative_trigger = yes
any_close_family_member = {
ep3_frankokratia_claimant_trigger = yes
}
}
}
#Spouse claimant
any_spouse = {
OR = {
ep3_frankokratia_claimant_trigger = yes
AND = {
ep3_frankokratia_transiting_relative_trigger = yes
any_close_family_member = {
ep3_frankokratia_claimant_trigger = yes
}
}
}
}
#Courtier claimant
any_courtier_or_guest = {
is_foreign_court_guest = no
ep3_frankokratia_claimant_trigger = yes
}
#friends
any_relation = {
type = friend
ep3_frankokratia_claimant_trigger = yes
}
#soulmates
any_relation = {
type = soulmate
ep3_frankokratia_claimant_trigger = yes
}
#any pool character
any_pool_character = {
province = scope:char_temp.capital_province
ep3_frankokratia_claimant_trigger = yes
}
}
#Should be vaguely Western in culture
culture = {
OR = {
has_cultural_pillar = heritage_goidelic
has_cultural_pillar = heritage_west_germanic
has_cultural_pillar = heritage_brythonic
has_cultural_pillar = heritage_north_germanic
has_cultural_pillar = heritage_iberian
has_cultural_pillar = heritage_latin
has_cultural_pillar = heritage_south_slavic
has_cultural_pillar = heritage_magyar
has_cultural_pillar = heritage_west_slavic
has_cultural_pillar = heritage_central_germanic
has_cultural_pillar = heritage_frankish
}
}
}
ep3_frankokratia_claimant_trigger = {
trigger_if = {
limit = {
exists = scope:char_temp
}
highest_held_title_tier < scope:char_temp.highest_held_title_tier
}
OR = {
has_claim_on = title:e_byzantium
AND = {
title:e_byzantium.holder.capital_county = title:c_byzantion
has_claim_on = title:k_thessalonika
}
AND = {
title:e_byzantium.holder.capital_county = title:c_byzantion
has_claim_on = title:d_thrace
}
AND = {
title:e_byzantium.holder.capital_county = title:c_byzantion
has_claim_on = title:c_byzantion
}
AND = {
is_child_of = title:e_byzantium.holder
title:e_byzantium.holder = {
has_realm_law = equal_law
}
}
AND = {
is_child_of = title:e_byzantium.holder
is_male = yes
title:e_byzantium.holder = {
OR = {
has_realm_law = male_preference_law
has_realm_law = male_only_law
}
}
}
AND = {
is_child_of = title:e_byzantium.holder
is_female = yes
title:e_byzantium.holder = {
OR = {
has_realm_law = female_preference_law
has_realm_law = female_only_law
}
}
}
}
age >= 10
is_imprisoned = no
is_healthy = yes
is_ai = yes
OR = {
has_claim_on = title:e_byzantium
ai_boldness >= 0
ai_greed >= 0
ai_honor <= 0
}
NOR = {
is_vassal_of = title:e_byzantium.holder
is_consort_of = title:e_byzantium.holder
has_relation_soulmate = title:e_byzantium.holder
has_relation_friend = title:e_byzantium.holder
has_relation_best_friend = title:e_byzantium.holder
}
NAND = {
OR = {
is_landed = yes
is_landless_ruler = yes
}
top_liege = title:e_byzantium.holder
}
}
ep3_frankokratia_will_start_trigger = {
NOR = {
has_trait = just
has_trait = humble
has_trait = content
has_trait = lazy
has_trait = craven
has_trait = loyal
}
OR = {
has_trait = greedy
has_trait = eccentric
has_trait = ambitious
has_trait = fickle
has_trait = arbitrary
AND = {
ai_rationality <= 0
ai_boldness >= 0
ai_honor <= 0
ai_energy >= 0
}
}
}
ep3_frankokratia_financier_trigger = {
faith = faith:catholic
is_ai = yes
#Not pals with byz emperor
NOR = {
is_allied_to = title:e_byzantium.holder
is_vassal_of = title:e_byzantium.holder
has_relation_friend = title:e_byzantium.holder
has_relation_lover = title:e_byzantium.holder
has_relation_soulmate = title:e_byzantium.holder
AND = {
exists = faith.religious_head
this = faith.religious_head
}
}
#Gotta have money to be a financier
gold >= 0
#Your capital needs to be somewhere useful
capital_county = {
title_province = {
OR = {
geographical_region = world_europe_south
geographical_region = world_europe_west_iberia
geographical_region = world_europe_west_francia
}
}
is_coastal_county = yes
}
is_at_war = no
}
ep3_frankokratia_financier_sub_trigger = {
highest_held_title_tier >= tier_county
government_has_flag = government_is_republic
ep3_frankokratia_financier_trigger = yes
}
ep3_frankokratia_financier_exists_trigger = {
OR = {
AND = {
exists = title:k_venice.holder
title:k_venice.holder = {
ep3_frankokratia_financier_sub_trigger = yes
}
}
title:e_italy = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
ep3_frankokratia_financier_sub_trigger = yes
}
}
}
title:k_sicily = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
ep3_frankokratia_financier_sub_trigger = yes
}
}
}
title:k_croatia = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
ep3_frankokratia_financier_sub_trigger = yes
}
}
}
title:k_burgundy = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
ep3_frankokratia_financier_sub_trigger = yes
}
}
}
title:k_aquitaine = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
ep3_frankokratia_financier_sub_trigger = yes
}
}
}
title:e_spain = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
ep3_frankokratia_financier_sub_trigger = yes
}
}
}
title:e_italy = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
highest_held_title_tier >= tier_county
highest_held_title_tier < tier_empire
ep3_frankokratia_financier_trigger = yes
}
}
}
title:k_sicily = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
highest_held_title_tier >= tier_county
highest_held_title_tier < tier_empire
ep3_frankokratia_financier_trigger = yes
}
}
}
title:k_croatia = {
any_in_de_jure_hierarchy = {
count >= 1
holder ?= {
highest_held_title_tier >= tier_county
highest_held_title_tier < tier_empire
ep3_frankokratia_financier_trigger = yes
}
}
}
}
}
ep3_frankokratia_valid_joiner_trigger = {
NOR = {
has_character_flag = had_event_frankokratia_0020
this = faith.religious_head
any_liege_or_above = {
this = title:e_byzantium.holder
}
is_allied_to = title:e_byzantium.holder
is_vassal_of = title:e_byzantium.holder
has_truce = title:e_byzantium.holder
has_relation_friend = title:e_byzantium.holder
any_owned_story = {
type = frankokratia_story
}
}
}
ep3_frankokratia_latin_kingdom_available_trigger = {
OR = {
NOT = { exists = holder }
holder = {
this = title:e_byzantium.holder
}
holder = {
is_vassal_or_below_of = title:e_byzantium.holder
NOT = {
is_at_war_with = title:e_byzantium.holder
}
}
}
#At least 2 counties in the kingdom belong to byzantine emperor
any_de_jure_county = {
count >= 2
OR = {
holder = {
this = title:e_byzantium.holder
}
holder = {
is_vassal_or_below_of = title:e_byzantium.holder
NOT = {
is_at_war_with = title:e_byzantium.holder
}
}
}
}
}
ep3_frankokratia_discard_old_lands_trigger = {
NAND = {
primary_title = {
tier <= tier_empire
empire = title:e_byzantium
}
any_sub_realm_county = {
empire = title:e_byzantium
}
}
}
ep3_frankokratia_beneficiary_trigger = {
is_ruler = no
is_imprisoned = no
is_adult = yes
faith = scope:frankokratia_crusader.faith
NOR = {
this = scope:financier
any_heir_title = { }
has_trait = incapable
has_trait = devoted
AND = {
scope:frankokratia_crusader.faith = {
has_doctrine = doctrine_theocracy_temporal
}
has_council_position = councillor_court_chaplain
}
}
OR = { #Either not married, or not married to a ruler.
is_married = no
NOT = {
any_spouse = {
is_ruler = yes
}
}
}
OR = {
AND = {
is_male = yes
age < 50
}
AND = {
is_female = yes
age <= 35
}
any_child = {
count >= 1
is_ruler = no
ep3_frankokratia_beneficiary_gender_soft_trigger = yes
}
}
}
ep3_frankokratia_beneficiary_gender_trigger = {
trigger_if = {
limit = {
scope:frankokratia_crusader = {
OR = {
has_realm_law = male_preference_law
has_realm_law = male_only_law
}
}
}
is_male = yes
}
trigger_else_if = {
limit = {
scope:frankokratia_crusader = {
OR = {
has_realm_law = female_preference_law
has_realm_law = female_only_law
}
}
}
is_female = yes
}
trigger_else = {
scope:frankokratia_crusader = {
has_realm_law = equal_law
}
}
}
ep3_frankokratia_beneficiary_gender_soft_trigger = {
trigger_if = {
limit = {
scope:frankokratia_crusader = {
has_realm_law = male_only_law
}
}
is_male = yes
}
trigger_else_if = {
limit = {
scope:frankokratia_crusader = {
has_realm_law = female_only_law
}
}
is_female = yes
}
trigger_else = {
scope:frankokratia_crusader = {
OR = {
has_realm_law = male_preference_law
has_realm_law = female_preference_law
has_realm_law = equal_law
}
}
}
}
ep3_frankokratia_notification_recipient_trigger = {
OR = {
#Rulers in the Byz region
capital_province = {
county = {
empire = title:e_byzantium
}
}
#Most affected Christians
faith = faith:catholic
faith = faith:orthodox
faith = faith:armenian_apostolic
#Target faith of crusade
faith = scope:defender.faith
#Vassals of crusade defender
liege ?= scope:defender
#Vassals of byz emp
AND = {
exists = title:e_byzantium.holder
liege ?= title:e_byzantium.holder
}
#Byz emp
AND = {
exists = title:e_byzantium.holder
this ?= title:e_byzantium.holder
}
is_in_list = non_christian_franko_leaders
}
}
ep3_orthodox_faith_trigger = {
OR = {
faith = faith:orthodox
faith = faith:coptic
faith = faith:armenian_apostolic
faith = faith:iconoclast
faith = faith:bogomilist
faith = faith:paulician
faith = faith:nestorian
}
}

View file

@ -0,0 +1,503 @@
#################################################
# TRIGGER LIST #
#################################################
mpo_has_greatest_of_khans_nickname_trigger = {
OR = {
has_nickname = nick_genghis_khan
has_nickname = nick_cengiz_khan
has_nickname = nick_yekhe_khagan
has_nickname = nick_dort_yonlug_khagan
has_nickname = nick_tengri_khagan
has_nickname = nick_cihangir
has_nickname = nick_culture_khagan
}
}
mpo_has_gok_mongol_empire_trigger = {
OR = {
has_title = title:e_mongol_empire
custom_tooltip = {
text = gok_title_trigger
exists = global_var:greatest_of_khans_title
any_held_title = {
this = global_var:greatest_of_khans_title
}
}
}
}
mpo_gok_coalition_member_trigger = {
save_temporary_scope_as = foe
in_diplomatic_range = root
is_ai = yes
OR = {
is_landless_nomad = yes
is_landless_adventurer = yes
is_landed = yes
}
NOR = {
this = root
top_liege = root
is_allied_to = root
is_tributary_of_suzerain_or_above = root
top_liege = {
is_tributary_of_suzerain_or_above = root
}
has_relation_friend = root
has_relation_blood_brother = root
opinion = {
target = root
value >= 100
}
highest_held_title_tier < tier_county
government_has_flag = government_is_herder
is_imprisoned_by = root
is_obedient_to = root
}
##Only relatively strong non-nomads will mess with you
trigger_if = {
limit = {
NOT = {
government_has_flag = government_is_nomadic
}
}
OR = {
AND = {
highest_held_title_tier >= tier_duchy
sub_realm_size >= 8
}
is_confederation_member = yes
}
}
##Only house members who dislike you will oppose you
trigger_if = {
limit = {
OR = {
AND = {
exists = house
exists = root.house
house = {
this = root.house
}
}
#also those with direct alliances to root
is_allied_to = root
}
}
opinion = {
target = root
value < 0
}
}
#Lower tier rulers
trigger_if = {
limit = {
highest_held_title_tier < tier_duchy
}
OR = {
NOT = {
has_dread_level_towards = {
target = root
level >= 2
}
}
faith = {
faith_hostility_level = {
target = root.faith
value > faith_astray_level
}
}
opinion = {
target = root
value <= -40
}
is_confederation_member = yes
root = {
any_land_neighboring_realm_with_tributaries_owner = {
this = scope:foe
}
}
}
}
}
mpo_gok_submitting_coward_trigger = {
is_ai = yes
is_confederation_member = no
OR = {
is_tributary_of = root
is_tributary = no
}
is_landed = yes
highest_held_title_tier < tier_duchy
NOT = {
has_relation_rival = root
}
OR = {
is_imprisoned_by = root
government_has_flag = government_is_herder
has_relation_friend = root
AND = {
exists = root.house
house ?= root.house
NOT = {
is_in_list = anti_gok_coalition_members
}
}
opinion = {
target = root
value >= 100
}
ai_boldness <= medium_negative_ai_value
has_dread_level_towards = {
target = root
level >= 2
}
is_tributary_of = root
AND = {
exists = house
exists = root.house
house = {
this = root.house
}
opinion = {
target = root
value >= 0
}
}
}
trigger_if = {
limit = {
current_military_strength > 0
root.current_military_strength > 0
}
current_military_strength < root.current_military_strength
}
NOT = {
any_character_war = {
OR = {
primary_defender = prev
AND = {
primary_attacker = prev
primary_defender = {
top_liege = root
}
}
primary_defender = {
is_ai = no
}
}
}
}
}
mpo_war_of_defiance_notified_player_trigger = {
NOT = {
this = root
}
OR = {
top_liege = root
top_suzerain = root
any_character_situation = {
this = situation:the_great_steppe
}
any_relation = {
type = rival
this = root
}
#Those within same de jure empire
capital_county ?= {
empire = {
any_de_jure_county = {
holder.top_liege = {
this = root
}
}
}
}
capital_county ?= {
empire = {
any_de_jure_county = {
holder.top_suzerain = {
this = root
}
}
}
}
AND = {
exists = root.capital_county
realm_to_title_distance_squared = {
target = root.capital_county
value <= squared_distance_almost_massive
}
}
}
}
gok_desirable_vassal_trigger = {
OR = {
ai_boldness <= low_negative_ai_value
has_trait = loyal
is_obedient_to = scope:gok
has_any_good_relationship_with_character_trigger = { CHARACTER = scope:gok }
AND = {
exists = scope:gok.dynasty
dynasty ?= scope:gok.dynasty
}
is_allied_to = scope:gok
opinion = {
target = scope:gok
value > 20
}
#Dukes from pliant cultures are cool
AND = {
highest_held_title_tier < tier_kingdom
culture = {
OR = {
has_cultural_tradition = tradition_loyal_soldiers
has_cultural_tradition = tradition_pacifism
has_cultural_tradition = tradition_xenophilic
has_cultural_tradition = tradition_modest
has_cultural_tradition = tradition_fp2_malleable_subjects
}
}
}
trigger_if = {
limit = {
faith = scope:gok.faith
}
opinion = {
target = scope:gok
value >= -20
}
}
}
}
mpo_greatest_of_khans_0030_willing_nomad_vassal = {
OR = {
government_has_flag = government_is_nomadic
government_has_flag = government_is_herder
}
OR = {
is_obedient = yes
opinion = {
target = liege
value >= 0
}
has_dread_level_towards = {
target = liege
level >= 1
}
}
NOR = {
is_at_war_with = liege
has_trait = stubborn
culture = {
has_cultural_tradition = tradition_staunch_traditionalists
}
}
}
mpo_greatest_of_khans_0030_dominated_nomad_vassal = {
OR = {
government_has_flag = government_is_nomadic
government_has_flag = government_is_herder
}
OR = {
is_obedient = yes
opinion = {
target = liege
value >= 60
}
has_dread_level_towards = {
target = liege
level >= 2
}
}
NOR = {
is_at_war_with = liege
has_trait = stubborn
culture = {
OR ={
has_cultural_tradition = tradition_staunch_traditionalists
has_cultural_tradition = tradition_quarrelsome
has_cultural_tradition = tradition_isolationist
}
}
}
}
mpo_greatest_of_khans_0030_willing_sedentary_vassal = {
NOR = {
government_has_flag = government_is_nomadic
government_has_flag = government_is_herder
government_has_flag = government_is_theocracy
government_has_flag = government_is_landless_adventurer
}
OR = {
is_obedient = yes
opinion = {
target = liege
value >= 0
}
has_dread_level_towards = {
target = liege
level >= 1
}
}
NOR = {
is_at_war_with = liege
has_trait = stubborn
culture = {
has_cultural_tradition = tradition_staunch_traditionalists
}
}
}
mpo_greatest_of_khans_0030_dominated_sedentary_vassal = {
NOR = {
government_has_flag = government_is_nomadic
government_has_flag = government_is_herder
government_has_flag = government_is_theocracy
government_has_flag = government_is_landless_adventurer
}
OR = {
is_obedient = yes
opinion = {
target = liege
value >= 50
}
has_dread_level_towards = {
target = liege
level >= 2
}
}
NOR = {
is_at_war_with = liege
has_trait = stubborn
culture = {
has_cultural_tradition = tradition_staunch_traditionalists
}
culture = {
has_cultural_tradition = tradition_legalistic
}
}
}
gok_gov_switch_valid_vassal_trigger = {
highest_held_title_tier >= tier_county
is_landed = yes
is_ai = yes
NOT = {
is_at_war_with = root
}
NOT = {
any_liege_or_above = {
is_ai = no
NOT = {
this = root
}
}
}
NOR = {
government_has_flag = government_is_theocracy
government_has_flag = government_is_landless_adventurer
}
}
gok_willing_new_admin_vassal_trigger = {
gok_gov_switch_valid_vassal_trigger = yes
OR = {
mpo_greatest_of_khans_0030_dominated_nomad_vassal = yes
mpo_greatest_of_khans_0030_willing_sedentary_vassal = yes
culture = culture:greek
culture = {
any_parent_culture_or_above = {
this = culture:greek
}
}
culture = culture:han
culture = {
any_parent_culture_or_above = {
this = culture:han
}
}
}
NOR = {
government_has_flag = government_is_special_administrative
government_has_flag = government_is_administrative
government_has_flag = government_is_tribal
}
}
mpo_offer_submission_or_ruin_shown_actor_trigger = {
has_mpo_dlc_trigger = yes
is_landed = yes
any_owned_story = {
OR = {
story_type = story_greatest_of_khans
story_type = story_mongol_invasion
}
}
}
mpo_offer_submission_or_ruin_shown_recipient_trigger = {
NOT = { this = scope:actor }
is_landed = yes
NOT = { government_has_flag = cannot_be_vassal_or_liege }
}
mpo_offer_submission_or_ruin_valid_actor_trigger = {
prestige_level >= 1
trigger_if = {
limit = {
exists = scope:recipient
}
custom_description = {
text = truce_on_recipient_tt
NOT = {
any_truce_target = {
this = scope:recipient
}
}
}
}
}
mpo_offer_submission_or_ruin_valid_recipient_trigger = {
is_independent_ruler = yes
NOT = {
is_at_war_with = scope:actor
}
custom_description = {
text = was_recently_granted_independence
NOT = {
has_opinion_modifier = {
modifier = granted_independence_opinion
target = scope:actor
}
}
}
custom_description = {
text = not_recently_offered_submission
NOT = {
has_character_flag = accepted_gok_submission
}
}
}
#Basically just checking they are tribal (and shouldn't provide siege) or have a unique maa that's interesting to have
#I think this will balance how much siege vs. military strength AI take as GoK
mpo_gok_auto_cultural_maa_trigger = {
OR = {
government_has_flag = government_is_tribal
government_has_flag = government_is_nomadic
culture = {
OR = {
culture_has_archer_cavalry_maa = yes
has_cultural_parameter = unlock_maa_cataphract_archers
}
}
}
}

View file

@ -0,0 +1,57 @@
settlement_issue_valid_to_continue_default_trigger = {
OR = {
task_contract_location.province_owner = task_contract_taker
task_contract_location.province_owner.top_liege = task_contract_taker
}
task_contract_employer = {
is_alive = yes
OR = {
liege_or_court_owner = root.task_contract_taker
employer = root.task_contract_taker
}
}
}
settlement_issue_valid_to_keep_default_trigger = {
custom_tooltip = {
text = migration_contract_county_ownership_text
OR = {
task_contract_location.province_owner = task_contract_taker
task_contract_location.province_owner.liege = task_contract_taker
task_contract_location.province_owner.top_liege = task_contract_taker
}
}
custom_tooltip = {
text = migration_contract_county_text
task_contract_location.county = { county_control < 90 }
}
}
settlement_issue_valid_to_create_default_trigger = {
any_knight = {
count >= 1
}
any_held_county = {
is_landless_type_title = no
exists = title_province
county_control < 90
NOT = { has_county_modifier = ongoing_settlement_contract }
}
}
mpo_settlement_issue_trigger = {
any_knight = {
count >= 1
}
any_held_county = {
is_landless_type_title = no
exists = title_province
county_control < 90
NOT = { has_county_modifier = ongoing_settlement_contract }
}
NOT = {
any_task_contract = {
has_task_contract_type = nomadic_migration_contract_$NUMBER$
}
}
}

View file

@ -0,0 +1,387 @@
coronation_trigger = {
has_ach_dlc_trigger = yes
is_landed = yes
highest_held_title_tier >= tier_kingdom
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_tribal
AND = {
government_has_flag = government_is_special_administrative
is_independent_ruler = yes
}
government_has_flag = government_is_nomadic
government_has_flag = government_is_clan
AND = {
government_has_flag = government_is_meritocratic
is_independent_ruler = yes
}
AND = {
government_has_flag = government_is_celestial
is_independent_ruler = yes
}
AND = {
government_has_flag = government_is_steppe_admin
is_independent_ruler = yes
}
AND = {
government_is_japanese_trigger = yes
has_title = title:e_japan
tgp_has_ceremonial_liege_title_trigger = yes
}
government_has_flag = government_is_mandala
}
}
coronation_living_officiator_trigger = {
involved_activity = {
has_variable = officiator
var:officiator = {
is_alive = yes
is_imprisoned = no
}
}
}
coronation_has_emperor_law = {
has_realm_law = crowned_emperor
}
coronation_has_king_law = {
has_realm_law = crowned_king
}
has_any_coronation_law = {
OR = {
coronation_has_emperor_law = yes
coronation_has_king_law = yes
}
}
coronation_feast_phase = {
trigger_if = {
limit = {
has_activity_type = activity_coronation
}
has_current_phase = coronation_phase_feast
}
}
coronation_hostile_to_host_trigger = {
OR = {
is_in_guest_subset = { name = detractor }
has_any_bad_relationship_with_character_trigger = { CHARACTER = involved_activity.activity_host }
has_activity_intent = coronation_disrupt_loyalists
}
}
is_important_hof_trigger = {
faith = {
# The HoF actually matters
NOT = { has_doctrine = doctrine_theocracy_temporal }
# And this HoF is relevant to the activity
this = scope:host.faith
}
government_has_flag = government_is_theocracy
any_held_title = { is_head_of_faith = yes }
}
coronation_has_proper_artifact_trigger = {
trigger_if = {
limit = {
coronation_proper_artifact_crown_trigger = yes
coronation_proper_artifact_regalia_trigger = no
}
any_character_artifact = {
artifact_slot_type = helmet
}
}
trigger_else_if = {
limit = {
coronation_proper_artifact_regalia_trigger = yes
coronation_proper_artifact_crown_trigger = no
}
any_character_artifact = {
artifact_slot_type = regalia
}
}
trigger_else = {
any_character_artifact = {
OR = {
artifact_slot_type = helmet
artifact_slot_type = regalia
}
}
}
}
coronation_proper_artifact_crown_trigger = {
faith.religion = {
OR = {
this = religion:baltic_religion
this = religion:bon_religion
this = religion:eastern_orthodox_religion
this = religion:catholic_religion
this = religion:protestant_religion
this = religion:dualism_religion
this = religion:hellenism_religion
this = religion:judaism_religion
this = religion:kushitism_religion
this = religion:siberian_religion
this = religion:tengrism_religion
this = religion:west_african_orisha_religion
this = religion:yazidi_religion
this = religion:zoroastrianism_religion
}
}
}
coronation_proper_artifact_regalia_trigger = {
faith.religion = {
OR = {
this = religion:buddhism_religion
this = religion:finno_ugric_religion
this = religion:hinduism_religion
this = religion:jainism_religion
this = religion:slavic_religion
this = religion:west_african_bori_religion
this = religion:taoism_religion
}
}
}
# Religions that are not included in the triggers above can have both regalia or a crown.
# The list is intentional and includes:
# akom_religion
# basque_paganism_religion
# donyipolism_religion
# germanic_religion
# islam_religion
# magyar_religion
# mundhum_religion
# north_african_religion
# paganism_religion
# qiangic_religion
# taoism_religion
# waaqism_religion
# west_african_roog_religion
# zunism_religion
has_regal_presence_trait_trigger = {
#Done this way to prevent traits blocking event option text
trigger_if = {
limit = {
has_trait = greatest_of_khans
}
has_trait = greatest_of_khans
}
trigger_else_if = {
limit = {
has_trait = chakravarti
}
has_trait = chakravarti
}
trigger_else_if = {
limit = {
has_trait = augustus
}
has_trait = augustus
}
trigger_else_if = {
limit = {
has_trait = golden_lineage
}
has_trait = golden_lineage
}
trigger_else_if = {
limit = {
has_trait = legend
}
has_trait = legend
}
trigger_else_if = {
limit = {
has_trait = golden_lineage
}
has_trait = golden_lineage
}
trigger_else_if = {
limit = {
has_trait = conqueror
}
has_trait = conqueror
}
trigger_else_if = {
limit = {
has_trait = lifestyle_surveyor
}
has_trait = lifestyle_surveyor
}
trigger_else_if = {
limit = {
has_trait = administrator
}
has_trait = administrator
}
trigger_else_if = {
limit = {
has_trait = family_first
}
has_trait = family_first
}
trigger_else_if = {
limit = {
has_trait = august
}
has_trait = august
}
trigger_else_if = {
limit = {
has_trait = overseer
}
has_trait = overseer
}
trigger_else_if = {
limit = {
has_trait = giant
}
has_trait = giant
}
trigger_else_if = {
limit = {
has_trait = arrogant
}
has_trait = arrogant
}
trigger_else_if = {
limit = {
has_trait = gregarious
}
has_trait = gregarious
}
trigger_else_if = {
limit = {
has_trait = ambitious
}
has_trait = ambitious
}
trigger_else_if = {
limit = {
has_trait = just
}
has_trait = just
}
trigger_else_if = {
limit = {
has_trait = calm
}
has_trait = calm
}
trigger_else_if = {
limit = {
has_trait = zealous
}
has_trait = zealous
}
trigger_else_if = {
limit = {
has_trait = strong
}
has_trait = strong
}
trigger_else_if = {
limit = {
has_trait = beauty_good_3
}
has_trait = beauty_good_3
}
trigger_else_if = {
limit = {
has_trait = beauty_good_2
}
has_trait = beauty_good_2
}
trigger_else_if = {
limit = {
has_trait = physique_good_3
}
has_trait = physique_good_3
}
trigger_else = {
has_trait = physique_good_2
}
}
coronation_being_crowned_trigger = {
exists = involved_activity
coronation_living_officiator_trigger = yes
involved_activity.activity_host = {
OR = {
coronation_proper_artifact_crown_trigger = yes
AND = {
coronation_proper_artifact_regalia_trigger = no
any_character_artifact = {
artifact_slot_type = helmet
}
involved_activity = {
has_activity_option = {
category = special_type
option = coronation_type_anointment
}
}
}
}
}
}
coronation_self_crowning_trigger = {
exists = involved_activity
involved_activity.activity_host = {
OR = {
coronation_proper_artifact_crown_trigger = yes
AND = {
coronation_proper_artifact_regalia_trigger = no
any_character_artifact = {
artifact_slot_type = helmet
}
#Doesn't have title regalia
save_temporary_scope_as = host_temp
NOT = {
any_character_artifact = {
artifact_slot_type = regalia
has_variable = artifact_succession_title
var:artifact_succession_title = {
this = scope:host_temp.primary_title
}
}
}
}
}
}
}
coronation_host_east_asian_admin_or_mandala_trigger = {
OR = {
government_has_flag = government_is_celestial
government_has_flag = government_is_meritocratic
government_has_flag = government_is_mandala
government_is_japanese_trigger = yes
}
}
coronation_host_east_asian_trigger = {
OR = {
government_has_flag = government_is_celestial
government_has_flag = government_is_meritocratic
government_is_japanese_trigger = yes
}
}
coronation_host_east_asian_steppe_admin_trigger = {
OR = {
government_has_flag = government_is_celestial
government_has_flag = government_is_meritocratic
government_has_flag = government_is_steppe_admin
government_is_japanese_trigger = yes
}
}

View file

@ -0,0 +1,900 @@

tgp_distant_realm_marriage_trigger = {
$RECIPIENT_SPOUSE$ = {
culture = { has_cultural_parameter = reduced_marriage_acceptance_distant_realms }
top_liege != $ACTOR_SPOUSE$.top_liege
trigger_if = {
limit = { exists = capital_province }
capital_province = { save_temporary_scope_as = from }
}
trigger_else = {
location = { save_temporary_scope_as = from }
}
trigger_if = {
limit = { exists = $ACTOR_SPOUSE$.capital_province }
$ACTOR_SPOUSE$.capital_province = { save_temporary_scope_as = to }
}
trigger_else = {
$ACTOR_SPOUSE$.location = { save_temporary_scope_as = to }
}
"scope:from.squared_distance(scope:to)" > squared_distance_medium
}
}
tgp_dynastic_realm_name_trigger = {
NOT = {
any_ruler = {
any_held_title = {
has_custom_title_name = yes
custom_title_name = $DYNASTY_REALM_NAME$
}
}
}
domicile.domicile_location = {
geographical_region = $DOMICILE_REGION$
}
}
administrative_tier_allows_independence = {
trigger_if = {
limit = {
administrative_counts_can_be_independent = yes
}
highest_held_title_tier >= tier_county
}
trigger_else = { # Administrative/default
highest_held_title_tier >= tier_kingdom
}
}
administrative_counts_can_be_independent = {
OR = {
government_has_flag = government_is_celestial
government_has_flag = government_is_japan_administrative
}
}
tgp_examination_should_spend_treasury_trigger = {
has_treasury = yes
government_allows = replace_gold_cost_by_treasury
}
# Trigger to enable ministry features in script - Made into a scripted trigger for ease of changing it if needed
tgp_has_access_to_ministry_trigger = {
has_title = title:h_china
government_has_flag = government_is_celestial
}
tgp_is_any_minister = {
liege ?= { tgp_has_access_to_ministry_trigger = yes }
OR = {
has_title = title:e_minister_chancellor
has_title = title:e_minister_censor
has_title = title:e_minister_grand_marshal
has_title = title:e_minister_of_personnel
has_title = title:e_minister_of_revenue
has_title = title:e_minister_of_rites
has_title = title:e_minister_of_war
has_title = title:e_minister_of_justice
has_title = title:e_minister_of_works
}
}
tgp_can_be_a_minister_trigger = {
can_be_councillor_basics_trigger = yes
# Has to be celestial or a non-ruler
OR = {
is_ruler = no
government_has_flag = government_is_celestial
}
# Gender is based on laws of the liege
OR = {
AND = {
is_female = yes
$COURT_OWNER$ = {
NOR = {
has_realm_law = male_only_law
has_realm_law = male_preference_law
}
}
}
AND = {
is_male = yes
$COURT_OWNER$ = {
NOR = {
has_realm_law = female_only_law
has_realm_law = female_preference_law
}
}
}
}
# Players are only allowed if they have enough merit or is a councillor already, unless they are friends or disciples/elders
# We do this to prevent the AI from "randomly" requesting the player to be on their council
trigger_if = {
limit = {
is_ai = no
$COURT_OWNER$ = { is_ai = yes }
NOT = { is_councillor_of = $COURT_OWNER$ }
}
OR = {
merit_level >= merit_level_expected_empire_value
has_relation_friend = $COURT_OWNER$
has_relation_disciple = $COURT_OWNER$
has_relation_elder = $COURT_OWNER$
}
}
}
tgp_can_be_grand_marshal_trigger = {
can_be_councillor_basics_trigger = yes
$COURT_OWNER$ ?= {
NOT = { government_has_flag = government_is_nomadic }
}
NAND = {
has_council_position = councillor_court_chaplain
faith = { has_doctrine_parameter = clerical_appointment_fixed }
}
NOR = {
has_council_position = councillor_spouse
AND = {
this = liege.diarch
liege = { has_diarchy_active_parameter = diarchy_is_vizierate }
}
has_trait = devoted
}
# Has to be celestial or a non-ruler
OR = {
is_ruler = no
government_has_flag = government_is_celestial
}
# Has to be able to lead armies
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $COURT_OWNER$ }
}
tgp_is_above_retirement_age_trigger = {
trigger_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_4 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_4
age >= retirement_age_4_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_3 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_3
age >= retirement_age_3_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_2 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_2
age >= retirement_age_2_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_1 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_1
age >= retirement_age_1_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_0 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_0
age >= retirement_age_0_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_5 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_5
always = no
}
}
trigger_else = {
custom_tooltip = {
text = tgp_is_above_retirement_age_law_not_set
always = yes
}
}
}
# Civilian/military triggers
is_civilian_candidate_trigger = {
trigger_if = {
limit = {
has_variable = appointment_trait_override
}
var:appointment_trait_override = trait:education_stewardship_1
}
trigger_else = {
has_trait_with_flag = civilian_province
}
}
is_military_candidate_trigger = {
trigger_if = {
limit = {
has_variable = appointment_trait_override
}
var:appointment_trait_override = trait:education_martial_1
}
trigger_else = {
has_trait_with_flag = military_province
}
}
# Trigger if scoped character is able to join the war(s) of the target character
# $TARGET_GOVERNOR$ - Target governor in need of troops
# $MINISTER_OF_WAR$ - The Minister of War
tgp_celestial_military_governor_can_join_war_trigger = {
save_temporary_scope_as = joining_governor
OR = {
vassal_contract_has_flag = celestial_military_appointment
vassal_contract_has_flag = meritocratic_military_appointment
has_title = title:e_minister_grand_marshal
}
NOR = {
scope:joining_governor = $TARGET_GOVERNOR$
scope:joining_governor = $MINISTER_OF_WAR$
any_war_ally = { this = $TARGET_GOVERNOR$ }
is_at_war_with = $TARGET_GOVERNOR$
is_at_war_with = $MINISTER_OF_WAR$
$TARGET_GOVERNOR$ = {
any_war_enemy = {
OR = {
is_vassal_of = scope:joining_governor
is_liege_or_above_of = scope:joining_governor
is_allied_to = scope:joining_governor
is_tributary_of = scope:joining_governor
is_at_war_with = scope:joining_governor
}
}
}
}
}
should_be_mandala_tributary_trigger = {
OR = {
AND = {
$SUZERAIN$ = { has_government = mandala_government }
$TRIBUTARY$ = { has_government = mandala_government }
}
AND = {
$SUZERAIN$ = { has_government = mandala_government }
$TRIBUTARY$ = {
OR = {
has_government = tribal_government
has_government = wanua_government
}
}
}
}
}
should_be_wanua_tributary_trigger = {
AND = {
$SUZERAIN$ = { has_government = wanua_government }
$TRIBUTARY$ = { has_government = wanua_government }
}
}
is_valid_for_japan_events_trigger = {
OR = {
religion = religion:shintoism_religion
faith = { has_doctrine = special_doctrine_immaterial_harmony }
}
culture = { has_cultural_pillar = heritage_japonic }
}
# Check if a top liege primary title has a ceremonial liege title
tgp_realm_has_ceremonial_liege_trigger = {
custom_tooltip = {
text = tgp_realm_has_ceremonial_liege_tt
exists = top_liege.primary_title.var:administrative_ui_special_title.holder
}
}
# Check if a character is a ceremonial liege, since they have the title but are a vassal
tgp_is_ceremonial_liege_trigger = {
custom_tooltip = {
text = tgp_is_ceremonial_liege_tt
tgp_has_ceremonial_liege_title_trigger = yes
is_independent_ruler = no
}
}
tgp_portrait_liege_or_ceremonial_liege_emperor_trigger = {
# Ceremonial Liege
trigger_if = {
limit = { tgp_realm_has_ceremonial_liege_trigger = yes }
tgp_has_ceremonial_liege_title_trigger = yes
primary_title.holder.top_liege.highest_held_title_tier >= tier_empire
}
# Standard Liege
trigger_else = {
scope:highest_held_title_tier >= tier_empire
is_independent_ruler = yes
}
}
tgp_portrait_liege_or_ceremonial_liege_king_trigger = {
# Ceremonial Liege
trigger_if = {
limit = { tgp_realm_has_ceremonial_liege_trigger = yes }
tgp_has_ceremonial_liege_title_trigger = yes
primary_title.holder.top_liege.highest_held_title_tier = tier_kingdom
}
# Standard Liege
trigger_else = { highest_held_title_tier = tier_kingdom }
}
# Check if a character has a ceremonial liege title (but not if they are actually a ceremonial liege)
tgp_has_ceremonial_liege_title_trigger = {
trigger_if = {
limit = { tgp_realm_has_ceremonial_liege_trigger = yes }
custom_tooltip = {
text = tgp_has_ceremonial_liege_title_tt
has_title = top_liege.primary_title.var:administrative_ui_special_title
}
}
trigger_else = {
custom_tooltip = {
text = tgp_has_ceremonial_liege_title_no_title_tt
always = no
}
}
}
# Used to save temp scope of the ceremonial liege for other triggers
tgp_ceremonial_liege_scope_trigger = {
top_liege = {
save_temporary_scope_as = ruler_temp
primary_title.var:administrative_ui_special_title.holder ?= {
top_liege ?= scope:ruler_temp.top_liege
this = scope:ruler_temp
save_temporary_scope_as = ceremonial_liege_temp
}
}
is_independent_ruler = no
}
# Check if character is part of their realm's ceremonial liege's house
tgp_is_in_ceremonial_house_trigger = {
custom_tooltip = {
text = tgp_is_in_ceremonial_house_tt
exists = house
top_liege.primary_title.var:administrative_ui_special_title.holder.house ?= house
}
}
# Check if two characters are from the same ceremonial house
tgp_shared_ceremonial_house_trigger = {
exists = $COMPARE_1$.house
$COMPARE_2$.house ?= $COMPARE_1$.house
OR = {
$COMPARE_1$ = { tgp_is_in_ceremonial_house_trigger = yes }
$COMPARE_2$ = { tgp_is_in_ceremonial_house_trigger = yes }
}
}
# Check if a character is a ruler over a ceremonial liege
tgp_is_ceremonial_regent_trigger = {
is_independent_ruler = yes
is_landed = yes
tgp_realm_has_ceremonial_liege_trigger = yes
tgp_has_ceremonial_liege_title_trigger = no
}
tgp_should_become_meritocratic_trigger = {
has_tgp_dlc_trigger = yes
OR = {
top_liege = {
OR = {
has_government = meritocratic_government
any_neighboring_and_across_water_top_liege_realm_owner = { government_allows = merit }
}
}
AND = {
OR = {
is_independent_ruler = yes
liege = {
NOT = {
government_has_flag = government_is_administrative
}
}
}
capital_province = {
OR = {
geographical_region = world_asia
geographical_region = world_tibet
geographical_region = world_burma
geographical_region = world_steppe_east
}
}
}
#Becoming admin with creation of meritocratic great yuan
exists = scope:great_yuan_ruler
}
}
tgp_can_become_japan_administrative_trigger = {
top_liege = {
OR = {
government_is_japanese_trigger = yes
has_character_flag = tgp_japan_restore_japanese_government_flag
culture = culture:japanese
culture = {
any_parent_culture_or_above = { this = culture:japanese }
}
}
}
}
tgp_can_become_celestial_trigger = {
top_liege = {
OR = {
has_government = celestial_government
has_title = title:h_china
culture = culture:han
culture = {
any_parent_culture_or_above = { this = culture:han }
}
}
}
}
tgp_mongol_vassal_will_become_admin = {
highest_held_title_tier > tier_barony
primary_title = {
OR = {
target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals
target_is_de_jure_liege_or_above = title:h_china
}
}
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
government_has_flag = government_is_japan_feudal
government_has_flag = government_is_nomadic
}
OR = {
#An admin type
has_trait = governor
faith.religion = religion:confucianism_religion
culture = {
has_cultural_pillar = heritage_chinese
}
culture = {
has_cultural_pillar = heritage_korean
}
#Nomad type
government_has_flag = government_is_nomadic
has_trait = nomadic_philosophy
}
}
tgp_japanese_high_nobility_clothing_trigger = {
tgp_is_ceremonial_liege_trigger = no
trigger_if = {
limit = { has_character_flag = murasaki }
always = yes
}
trigger_else_if = {
limit = { government_has_flag = government_is_japan_feudal }
OR = {
is_independent_ruler = yes
trigger_if = {
limit = { exists = top_liege }
OR = {
is_councillor_of = top_liege
is_spouse_of = top_liege
}
AND = {
is_house_head = yes
has_same_government = top_liege
}
}
}
}
trigger_else_if = {
limit = { government_has_flag = government_is_japan_administrative }
OR = {
highest_held_title_tier >= tier_county
tgp_is_in_ceremonial_house_trigger = yes
}
}
trigger_else = { highest_held_title_tier >= tier_kingdom }
}
tgp_japanese_high_nobility_clothing_family_trigger = {
AND = {
government_has_flag = government_is_japan_administrative
is_lowborn = no
OR = {
highest_held_title_tier >= tier_county
court_owner = { highest_held_title_tier >= tier_county }
}
}
}
tgp_is_chinese_style_emperor_trigger = {
highest_held_title_tier >= tier_empire
is_independent_ruler = yes
government_allows = merit
}
is_valid_for_east_asian_events_trigger = {
culture = {
OR = {
has_cultural_pillar = heritage_japonic
has_cultural_pillar = heritage_chinese
has_cultural_pillar = heritage_korean
}
}
}
is_valid_for_east_asian_events_geo_trigger = {
capital_province = {
OR = {
geographical_region = world_asia_china
geographical_region = world_asia_japan
geographical_region = world_asia_korea
geographical_region = world_asia_southeast
}
}
}
shared_raid_estate_participant_valid_trigger = {
is_adult = yes
is_house_head = yes
is_independent_ruler = no
custom_tooltip = {
text = is_house_head_of_noble_family_tt
any_held_title = { is_noble_family_title = yes }
house.house_head ?= this
}
OR = {
government_allows = administrative
government_is_japanese_trigger = yes
}
tgp_is_ceremonial_liege_trigger = no
}
should_use_asian_maa_graphics = {
OR = {
has_unit_gfx = chinese_unit_gfx
has_unit_gfx = japanese_unit_gfx
has_unit_gfx = indian_unit_gfx
has_unit_gfx = southeast_asian_unit_gfx
has_unit_gfx = mongol_unit_gfx
}
}
eligible_for_elder_trigger = {
merit_level > $DISCIPLE$.merit_level
num_of_relation_disciple < disciples_limit_value
NOT = { has_relation_disciple = $DISCIPLE$ }
$DISCIPLE$ = {
is_adult = yes
}
}
# Treasury budget triggers
prefers_salary_favored_budget_trigger = {
$CHARACTER$ = {
OR = {
top_participant_group:dynastic_cycle ?= { participant_group_type = conservative_movement }
has_title = title:e_minister_of_personnel
AND = {
this = top_liege
OR = {
ai_compassion > 75
ai_honor > 75
}
}
ai_greed >= 0
}
trigger_if = {
limit = { this != top_liege }
NOT = { has_trait = loyal }
}
}
}
prefers_ministry_favored_budget_trigger = {
$CHARACTER$ = {
OR = {
top_participant_group:dynastic_cycle ?= { participant_group_type = advancement_movement }
AND = {
this = top_liege
OR = {
ai_greed < 0
ai_rationality > 75
situation:dynastic_cycle ?= { situation_current_phase = situation_dynastic_cycle_phase_stability_advancement }
}
}
}
trigger_if = {
limit = { this != top_liege }
NOT = { has_trait = loyal }
}
}
}
prefers_military_favored_budget_trigger = {
$CHARACTER$ = {
OR = {
top_participant_group:dynastic_cycle ?= { participant_group_type = expansion_movement }
has_title = title:e_minister_grand_marshal
has_title = title:e_minister_of_war
AND = {
this = top_liege
OR = {
ai_boldness > 90
situation:dynastic_cycle ?= {
OR = {
situation_current_phase = situation_dynastic_cycle_phase_stability_expansion
situation_current_phase = situation_dynastic_cycle_phase_instability_conquest
}
}
}
}
ai_greed < 0
}
trigger_if = {
limit = { this != top_liege }
NOT = { has_trait = loyal }
}
}
}
prefers_hegemon_favored_budget_trigger = {
$CHARACTER$ = {
OR = {
top_participant_group:dynastic_cycle ?= { participant_group_type = pro_hegemon_movement }
has_trait = loyal
AND = {
this = top_liege
ai_greed > 90
}
}
}
}
can_suggest_budget_salary_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_45
has_realm_law = budget_allocation_ministry_25
has_realm_law = budget_allocation_military_20
}
}
}
can_suggest_budget_ministry_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_25
has_realm_law = budget_allocation_ministry_45
has_realm_law = budget_allocation_military_20
}
}
}
can_suggest_budget_military_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_30
has_realm_law = budget_allocation_ministry_20
has_realm_law = budget_allocation_military_40
}
}
}
can_suggest_budget_hegemon_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_30
has_realm_law = budget_allocation_ministry_25
has_realm_law = budget_allocation_military_25
}
}
}
can_suggest_budget_balanced_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_35
has_realm_law = budget_allocation_ministry_30
has_realm_law = budget_allocation_military_25
}
}
}
###
peasant_war_should_escalated_trigger = {
has_variable = peasant_war_escalates
}
tgp_gender_can_be_exam_entrant_trigger = {
trigger_if = {
limit = {
scope:host ?= {
OR = {
has_realm_law = female_only_law
has_realm_law = female_preference_law
}
}
}
OR = {
is_female = yes
AND = {
is_ai = no
is_male = yes
}
}
}
trigger_else_if = {
limit = {
scope:host ?= {
OR = {
has_realm_law = male_only_law
has_realm_law = male_preference_law
}
}
}
OR = {
is_male = yes
AND = {
is_ai = no
is_female = yes
}
}
}
trigger_else = {
always = yes
}
}
tgp_root_gender_can_be_exam_entrant_trigger = {
trigger_if = {
limit = {
root ?= {
OR = {
has_realm_law = female_only_law
has_realm_law = female_preference_law
}
}
}
is_female = yes
}
trigger_else_if = {
limit = {
root ?= {
OR = {
has_realm_law = male_only_law
has_realm_law = male_preference_law
}
}
}
is_female = no
}
trigger_else = {
always = yes
}
}
is_merit_based_official = {
government_has_flag = government_has_merit
OR = {
is_governor_or_admin_count = yes
AND = {
is_councillor = yes
NOT = { has_council_position = councillor_spouse }
liege = {
OR = {
is_landed = yes # to exclude councilors of landless noble family heads
highest_held_title_tier >= tier_empire # for councilors of ministers
}
}
}
}
}
has_highest_merit_rank = {
trigger_if = {
limit = { government_has_flag = government_is_celestial }
merit_level = 9
}
trigger_else = { merit_level = 5 }
}
tgp_is_ceremonial_petition_shown_trigger = {
is_playable_character = yes
has_dlc_feature = royal_court
has_tgp_dlc_trigger = yes
tgp_realm_has_ceremonial_liege_trigger = yes
tgp_has_ceremonial_liege_title_trigger = no
top_liege = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler
top_liege.primary_title.var:administrative_ui_special_title.holder ?= { has_royal_court = yes }
}
tgp_is_ceremonial_petition_valid_trigger = {
has_dlc_feature = royal_court
has_tgp_dlc_trigger = yes
is_at_war = no
tgp_realm_has_ceremonial_liege_trigger = yes
top_liege.primary_title.var:administrative_ui_special_title.holder ?= {
is_available_adult = yes
has_royal_court = yes
NOT = { is_at_war = yes }
}
}
take_vows_available_trigger = {
OR = {
faith = { has_doctrine_parameter = take_vows_active }
AND = {
religion:buddhism_religion ?= religion
faith = { has_doctrine = special_doctrine_immaterial_harmony }
}
}
}
tgp_capital_not_in_chinese_naming_region = {
capital_county.title_province ?= {
NOR = {
geographical_region = tgp_ba_region
geographical_region = tgp_cai_region
geographical_region = tgp_cao_region
geographical_region = tgp_chen_region
geographical_region = tgp_chu_region
geographical_region = tgp_dai_region
geographical_region = tgp_dian_region
geographical_region = tgp_gan_region
geographical_region = tgp_gui_region
geographical_region = tgp_han_region
geographical_region = tgp_huai_region
geographical_region = tgp_jin_region
geographical_region = tgp_jing_region
geographical_region = tgp_lai_region
geographical_region = tgp_liang_region
geographical_region = tgp_lu_region
geographical_region = tgp_min_region
geographical_region = tgp_qi_region
geographical_region = tgp_qian_region
geographical_region = tgp_shu_region
geographical_region = tgp_song_region
geographical_region = tgp_sui_region
geographical_region = tgp_tang_region
geographical_region = tgp_wei_region
geographical_region = tgp_wu_region
geographical_region = tgp_xia_region
geographical_region = tgp_xiang_region
geographical_region = tgp_xing_region
geographical_region = tgp_xu_region
geographical_region = tgp_yang_region
geographical_region = tgp_yin_region
geographical_region = tgp_yong_region
geographical_region = tgp_yue_region
geographical_region = tgp_zhao_region
geographical_region = tgp_zheng_region
geographical_region = tgp_zhou_region
}
}
}

View file

@ -0,0 +1,19 @@
NEOW_is_catholic_or_catholic_adjacent_trigger = {
faith = {
OR = {
faith = faith:roman_catholic
faith = faith:sevillian
faith = faith:celtic
faith = faith:orleaniste
faith = faith:sebastianist
faith = faith:luminarian
faith = faith:penitente
faith = faith:illuminated
faith = faith:fraticelli
faith = faith:cadaverist
faith = faith:teutonic
faith = faith:iberian
}
}
}