diff --git a/N3OW/common/buildings/N3OW_standard_economy_buildings.txt b/N3OW/common/buildings/N3OW_standard_economy_buildings.txt new file mode 100644 index 00000000..a94f8d06 --- /dev/null +++ b/N3OW/common/buildings/N3OW_standard_economy_buildings.txt @@ -0,0 +1,442 @@ +################################### +# N3OW Standard Economy Buildings # +################################### + +### tell mines + +tell_mines_01 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_tell_mines_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_1_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_1 + } + character_culture_modifier = { + parameter = quarries_building_bonuses + heavy_infantry_maintenance_mult = -0.01 + pikemen_maintenance_mult = -0.01 + heavy_cavalry_maintenance_mult = -0.01 + men_at_arms_recruitment_cost = -0.01 + } + county_culture_modifier = { + parameter = quarries_building_bonuses + levy_size = 0.01 + } + province_culture_modifier = { + parameter = ancient_miners_quarries_building_bonuses + monthly_income = poor_building_tax_tier_1 + } + + next_building = tell_mines_02 + + type_icon = "icon_building_tell_mines.dds" + + ai_value = { + base = 12 # A little bit higher than normal, they're very handy for further development + ai_tier_1_building_modifier = yes + ai_tier_1_economical_building_preference_modifier = yes + ai_general_building_modifier = yes + directive_to_build_economy_modifier = yes + ai_quarries_improvement_from_culture_modifier = yes + modifier = { + factor = 0 + scope:holder = { + government_has_flag = government_is_republic + } + NOT = { + has_building_or_higher = guild_halls_01 + } + } + } +} + +tell_mines_02 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_tell_mines_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + scope:holder.culture = { + has_innovation = innovation_crop_rotation + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_2_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_2 + } + county_modifier = { + development_growth_factor = 0.025 + } + character_culture_modifier = { + parameter = quarries_building_bonuses + heavy_infantry_maintenance_mult = -0.02 + pikemen_maintenance_mult = -0.02 + heavy_cavalry_maintenance_mult = -0.02 + men_at_arms_recruitment_cost = -0.02 + } + county_culture_modifier = { + parameter = quarries_building_bonuses + levy_size = 0.02 + } + province_culture_modifier = { + parameter = ancient_miners_quarries_building_bonuses + monthly_income = poor_building_tax_tier_2 + } + + next_building = tell_mines_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_economy_modifier = yes + ai_economical_building_preference_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +tell_mines_03 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_tell_mines_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_manorialism + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_3_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_3 + } + county_modifier = { + development_growth_factor = 0.05 + } + character_modifier = { + cultural_head_fascination_mult = 0.005 + } + character_culture_modifier = { + parameter = quarries_building_bonuses + heavy_infantry_maintenance_mult = -0.03 + pikemen_maintenance_mult = -0.03 + heavy_cavalry_maintenance_mult = -0.03 + men_at_arms_recruitment_cost = -0.03 + } + county_culture_modifier = { + parameter = quarries_building_bonuses + levy_size = 0.03 + } + province_culture_modifier = { + parameter = ancient_miners_quarries_building_bonuses + monthly_income = poor_building_tax_tier_3 + } + + next_building = tell_mines_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_economy_modifier = yes + ai_economical_building_preference_modifier = yes + } +} + +tell_mines_04 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_tell_mines_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_manorialism + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_4_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_4 + } + county_modifier = { + development_growth_factor = 0.1 + } + character_modifier = { + cultural_head_fascination_mult = 0.01 + } + character_culture_modifier = { + parameter = quarries_building_bonuses + heavy_infantry_maintenance_mult = -0.04 + pikemen_maintenance_mult = -0.04 + heavy_cavalry_maintenance_mult = -0.04 + men_at_arms_recruitment_cost = -0.04 + } + county_culture_modifier = { + parameter = quarries_building_bonuses + levy_size = 0.04 + } + province_culture_modifier = { + parameter = ancient_miners_quarries_building_bonuses + monthly_income = poor_building_tax_tier_4 + } + + next_building = tell_mines_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_economy_modifier = yes + ai_economical_building_preference_modifier = yes + } +} + +tell_mines_05 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_tell_mines_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_guilds + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_5_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_5 + } + county_modifier = { + development_growth_factor = 0.15 + } + character_modifier = { + cultural_head_fascination_mult = 0.02 + } + character_culture_modifier = { + parameter = quarries_building_bonuses + heavy_infantry_maintenance_mult = -0.05 + pikemen_maintenance_mult = -0.05 + heavy_cavalry_maintenance_mult = -0.05 + men_at_arms_recruitment_cost = -0.05 + } + county_culture_modifier = { + parameter = quarries_building_bonuses + levy_size = 0.05 + } + province_culture_modifier = { + parameter = ancient_miners_quarries_building_bonuses + monthly_income = poor_building_tax_tier_5 + } + + next_building = tell_mines_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_economy_modifier = yes + ai_economical_building_preference_modifier = yes + } +} + +tell_mines_06 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_tell_mines_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_guilds + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_6_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_6 + } + county_modifier = { + development_growth_factor = 0.2 + } + character_modifier = { + cultural_head_fascination_mult = 0.03 + } + character_culture_modifier = { + parameter = quarries_building_bonuses + heavy_infantry_maintenance_mult = -0.06 + pikemen_maintenance_mult = -0.06 + heavy_cavalry_maintenance_mult = -0.06 + men_at_arms_recruitment_cost = -0.06 + } + county_culture_modifier = { + parameter = quarries_building_bonuses + levy_size = 0.06 + } + province_culture_modifier = { + parameter = ancient_miners_quarries_building_bonuses + monthly_income = poor_building_tax_tier_6 + } + + next_building = tell_mines_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_economy_modifier = yes + ai_economical_building_preference_modifier = yes + } +} + +tell_mines_07 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_tell_mines_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_cranes + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_7_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_7 + } + county_modifier = { + development_growth_factor = 0.3 + } + character_modifier = { + cultural_head_fascination_mult = 0.04 + } + character_culture_modifier = { + parameter = quarries_building_bonuses + heavy_infantry_maintenance_mult = -0.07 + pikemen_maintenance_mult = -0.07 + heavy_cavalry_maintenance_mult = -0.07 + men_at_arms_recruitment_cost = -0.07 + } + county_culture_modifier = { + parameter = quarries_building_bonuses + levy_size = 0.07 + } + province_culture_modifier = { + parameter = ancient_miners_quarries_building_bonuses + monthly_income = poor_building_tax_tier_7 + } + + next_building = tell_mines_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_economy_modifier = yes + ai_economical_building_preference_modifier = yes + } +} + +tell_mines_08 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_tell_mines_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_cranes + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_8_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_8 + } + county_modifier = { + development_growth_factor = 0.4 + } + character_modifier = { + cultural_head_fascination_mult = 0.05 + } + character_culture_modifier = { + parameter = quarries_building_bonuses + heavy_infantry_maintenance_mult = -0.08 + pikemen_maintenance_mult = -0.08 + heavy_cavalry_maintenance_mult = -0.08 + men_at_arms_recruitment_cost = -0.08 + } + county_culture_modifier = { + parameter = quarries_building_bonuses + levy_size = 0.08 + } + province_culture_modifier = { + parameter = ancient_miners_quarries_building_bonuses + monthly_income = poor_building_tax_tier_8 + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_economy_modifier = yes + ai_economical_building_preference_modifier = yes + } +} \ No newline at end of file diff --git a/N3OW/common/customizable_localization/00_government_custom_loc.txt b/N3OW/common/customizable_localization/00_government_custom_loc.txt new file mode 100644 index 00000000..289d94e1 --- /dev/null +++ b/N3OW/common/customizable_localization/00_government_custom_loc.txt @@ -0,0 +1,1183 @@ +#As a tribe, if I reform, what government will I get? +GetTribalReformGovernment = { + type = character + + text = { + trigger = { ep3_is_clan_inclined_trigger = yes } + localization_key = tribal_reform_clan + } + text = { + trigger = { ep3_is_clan_inclined_trigger = no } + localization_key = tribal_reform_feudal + } +} + +#What type of authority do I use? +GetGovernmentAuthority = { + type = character + + text = { + trigger = { government_has_flag = government_is_administrative } + localization_key = government_authority_administrative + } + text = { + trigger = { government_has_flag = government_is_tribal } + localization_key = government_authority_tribe + } + text = { + trigger = { always = no } + localization_key = government_authority_crown + fallback = yes + } +} + +GetChamber = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = tent + } + text = { + trigger = { always = no } + localization_key = chamber + fallback = yes + } +} + +GetChamberPlural = { + type = character + parent = GetChamber + suffix = _plural +} + +GetChambersOrTent = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = tent + } + text = { + trigger = { always = no } + localization_key = chamber_plural + fallback = yes + } +} + + +GetRoom = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = tent + } + text = { + trigger = { always = no } + localization_key = room + fallback = yes + } +} + +GetRoomPlural = { + type = character + parent = GetRoom + suffix = _plural +} + +GetCourtyard = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = camp + } + text = { + trigger = { always = no } + localization_key = courtyard_location + fallback = yes + } +} + +## Court + +GetCourt = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = camp + } + text = { + trigger = { always = no } + localization_key = court + fallback = yes + } +} + +GetCourtConcept = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = CAMP + } + text = { + trigger = { always = no } + localization_key = COURT_CONCEPT + fallback = yes + } +} + +GetCourtierGendered = { + type = character + + text = { + trigger = { + liege ?= { has_government = landless_adventurer_government } + is_female = yes + } + localization_key = follower_female + } + text = { + trigger = { + liege ?= { has_government = landless_adventurer_government } + is_male = yes + } + localization_key = follower_male + } + text = { + trigger = { + liege ?= { is_landless_adventurer = no } + is_female = yes + } + localization_key = relation_courtier_female + } + text = { + trigger = { + liege ?= { is_landless_adventurer = no } + is_male = yes + } + localization_key = relation_courtier_male + } +} + +GetCourtier = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = follower + } + text = { + trigger = { always = no } + localization_key = courtier + fallback = yes + } +} + +GetCourtierPlural = { + type = character + parent = GetCourtier + suffix = _plural +} + +GetCourtierConcept = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = FOLLOWER + } + text = { + trigger = { always = no } + localization_key = COURTIER + fallback = yes + } +} + +GetCourtierConceptPlural = { + type = character + parent = GetCourtierConcept + suffix = _PLURAL +} + +GetSubject = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = follower + } + text = { + trigger = { always = no } + localization_key = subject + fallback = yes + } +} + +GetSubjectPlural = { + type = character + parent = GetSubject + suffix = _plural +} + +GetSuccessionHeirMotion = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = succession_heir_leader + } + text = { + trigger = { always = no } + localization_key = succession_heir_throne + fallback = yes + } +} + +GetDungeon = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = stockade + } + text = { + trigger = { always = no } + localization_key = dungeon + fallback = yes + } +} + +GetDungeonPlural = { + type = character + parent = GetDungeon + suffix = _plural +} + +GetDungeonConcept = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = STOCKADE_CONCEPT + } + text = { + trigger = { always = no } + localization_key = DUNGEON_CONCEPT + fallback = yes + } +} + +GetDungeonConceptPlural = { + type = character + parent = GetDungeonConcept + suffix = _plural +} + +GetRealmOrDomicile = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = game_concept_camp + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + is_governor = yes + } + trigger_else = { + liege ?= { is_governor = yes } + } + } + localization_key = game_concept_estate + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + is_landless_administrative = yes + } + trigger_else = { + liege ?= { is_landless_administrative = yes } + } + } + localization_key = game_concept_governorship + } + text = { + trigger = { always = no } + localization_key = realm + fallback = yes + } +} + +GetRealmOrDomicileTooltip = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + is_nomad = yes + } + trigger_else = { + liege ?= { is_nomad = yes } + } + } + localization_key = NOMAD + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = ADVENTURER + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + is_landless_administrative = yes + } + trigger_else = { + liege ?= { is_landless_administrative = yes } + } + } + localization_key = NOBLE_FAMILY + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + primary_title = { is_holy_order = yes } + } + trigger_else = { + liege.primary_title ?= { is_holy_order = yes } + } + } + localization_key = CV_REALM_TYPE_HOLY_ORDER + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + primary_title = { is_mercenary_company = yes } + } + trigger_else = { + liege.primary_title ?= { is_mercenary_company = yes } + } + } + localization_key = CV_REALM_TYPE_MERCENARY + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + this = faith.religious_head + is_landed = no + } + trigger_else = { liege ?= faith.religious_head } + } + localization_key = CV_REALM_TYPE_HOF + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + this = faith.religious_head + is_landed = yes + } + trigger_else = { liege ?= faith.religious_head } + } + localization_key = CV_REALM_TYPE_HOF_LANDED + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + is_governor = yes + } + trigger_else = { + liege ?= { is_governor = yes } + } + } + localization_key = GOVERNORSHIP_TOOLTIP + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + top_liege != this + } + trigger_else = { + liege ?= { top_liege != this } + } + } + localization_key = VASSAL_TOOLTIP + } + text = { + trigger = { always = no } + localization_key = REALM_TOOLTIP + fallback = yes + } +} + +GetRealmOrDomicileConcept = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = CAMP + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + is_landless_administrative = yes + } + trigger_else = { + liege ?= { is_landless_administrative = yes } + } + } + localization_key = ESTATE + } + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + is_governor = yes + } + trigger_else = { + liege ?= { is_governor = yes } + } + } + localization_key = GOVERNORSHIP + } + text = { + trigger = { always = no } + localization_key = activity_filter_realm + fallback = yes + } +} + +GetCourtPosition = { + type = character + + text = { + trigger = { is_landed = no } + localization_key = game_concept_officer + } + text = { + trigger = { always = no } + localization_key = game_concept_court_position + fallback = yes + } +} + +GetCourtPositionPlural = { + type = character + + text = { + trigger = { is_landed = no } + localization_key = game_concept_officers + } + text = { + trigger = { always = no } + localization_key = game_concept_court_positions + fallback = yes + } +} + +GetCourtPositionConceptPlural = { + type = character + + text = { + trigger = { is_landed = no } + localization_key = OFFICER_PLURAL + } + text = { + trigger = { always = no } + localization_key = COURT_POSITION_PLURAL + fallback = yes + } +} + +GetCourtOrOfficerPositionConceptPlural = { + type = character + + text = { + trigger = { is_landed = no } + localization_key = officer_positions + } + text = { + trigger = { always = no } + localization_key = COURT_POSITION_PLURAL + fallback = yes + } +} + +GetCourtOwnerConcept = { + type = character + + text = { + trigger = { is_landed = no } + localization_key = ADVENTURER + } + text = { + trigger = { always = no } + localization_key = LIEGE + fallback = yes + } +} + +GetCourtOwner = { + type = character + + text = { + trigger = { has_government = landless_adventurer_government } + localization_key = court_owner_adventurer + } + text = { + trigger = { always = no } + localization_key = court_owner_liege + fallback = yes + } +} + +GetValidKnightsHeader = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = KNIGHTS_SUBHEADER_LANDLESS_ADVENTURER + } + text = { + trigger = { always = no } + localization_key = KNIGHTS_SUBHEADER + fallback = yes + } +} + +GetDoor = { + type = character + + text = { + trigger = { + trigger_if = { + limit = { is_ruler = yes } + has_government = landless_adventurer_government + } + trigger_else = { + liege ?= { has_government = landless_adventurer_government } + } + } + localization_key = tent_flap + } + text = { + trigger = { always = no } + localization_key = door + fallback = yes + } +} + +GetHuntDesc = { + type = character + + text = { + trigger = { + has_government = landless_adventurer_government + } + localization_key = activity_hunt_desc_adventurer + } + text = { + trigger = { always = no } + localization_key = activity_hunt_desc_regular + fallback = yes + } +} + +GetHuntMasterDesc = { + type = character + + text = { + trigger = { + has_government = landless_adventurer_government + } + localization_key = activity_huntmaster_desc_adventurer + } + text = { + trigger = { always = no } + localization_key = activity_huntmaster_desc_regular + fallback = yes + } +} + +GetHuntMasterTooltipDesc = { + type = character + + text = { + trigger = { + has_government = landless_adventurer_government + } + localization_key = activity_huntmaster_tooltip_desc_adventurer + } + text = { + trigger = { always = no } + localization_key = activity_huntmaster_tooltip_desc_regular + fallback = yes + } +} + +GetServants = { + type = character + + text = { + trigger = { + has_government = landless_adventurer_government + } + localization_key = followers_adventurer + } + text = { + trigger = { always = no } + localization_key = servants_desc_regular + fallback = yes + } +} + +GetFollowerOrVassal = { + type = character + + text = { + trigger = { + has_government = landless_adventurer_government + } + localization_key = follower + } + text = { + trigger = { always = no } + localization_key = vassal + fallback = yes + } +} + +GetFollowerOrVassalPlural = { + type = character + parent = GetFollowerOrVassal + suffix = _plural +} + +GetGameKeepers = { + type = character + + text = { + trigger = { + has_government = landless_adventurer_government + } + localization_key = flushers_adventurer + } + text = { + trigger = { + government_has_flag = government_is_nomadic + } + localization_key = gamekeepers_nomadic + } + text = { + trigger = { always = no } + localization_key = gamekeepers_regular + fallback = yes + } +} + +GetDoorPlural = { + type = character + parent = GetDoor + suffix = _plural +} + +GetGovernmentIcon = { + type = character + + text = { # Holy Order + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = holy_order_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + primary_title ?= { is_holy_order = yes } + } + trigger_else = { + liege.primary_title ?= { is_holy_order = yes } + } + } + } + localization_key = holy_order_icon_concept + } + text = { # Mercenary + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = mercenary_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + primary_title = { is_mercenary_company = yes } + } + trigger_else = { + liege.primary_title ?= { is_mercenary_company = yes } + } + } + } + localization_key = mercenary_icon_concept + } + text = { # Adventurer + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = landless_adventurer_government + } + trigger_else = { + trigger_if = { + limit = { + is_ruler = yes + } + government_has_flag = government_is_landless_adventurer + } + trigger_else = { + liege ?= { government_has_flag = government_is_landless_adventurer } + } + } + } + localization_key = adventurer_icon_concept + } + text = { # Nomad + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = nomad_government + } + trigger_else = { + trigger_if = { + limit = { + is_ruler = yes + } + government_has_flag = government_is_nomadic + } + trigger_else = { + liege ?= { government_has_flag = government_is_nomadic } + } + } + } + localization_key = nomadic_icon_concept + } + text = { # Herder + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = herder_government + } + trigger_else = { + trigger_if = { + limit = { + is_ruler = yes + } + has_government = herder_government + } + trigger_else = { + liege ?= { has_government = herder_government } + } + } + } + localization_key = herder_icon_concept + } + text = { # Celestial + trigger = { + trigger_if = { + limit = { is_alive = no } + has_government = celestial_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_celestial + } + trigger_else = { + liege ?= { government_has_flag = government_is_celestial } + } + } + } + localization_key = celestial_icon_concept + } + text = { # Mandala + trigger = { + trigger_if = { + limit = { is_alive = no } + has_government = mandala_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_mandala + } + trigger_else = { + liege ?= { government_has_flag = government_is_mandala } + } + } + } + localization_key = mandala_icon_concept + } + text = { # Maritime Tribal + trigger = { + trigger_if = { + limit = { is_alive = no } + has_government = wanua_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_wanua + } + trigger_else = { + liege ?= { government_has_flag = government_is_wanua } + } + } + } + localization_key = wanua_icon_concept + } + text = { # Meritocratic + trigger = { + trigger_if = { + limit = { is_alive = no } + has_government = meritocratic_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_meritocratic + } + trigger_else = { + liege ?= { government_has_flag = government_is_meritocratic } + } + } + } + localization_key = meritocratic_icon_concept + } + text = { # Tribal + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = tribal_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_tribal + NOT = { government_has_flag = government_is_wanua } + } + trigger_else = { + liege ?= { + government_has_flag = government_is_tribal + NOT = { government_has_flag = government_is_wanua } + } + } + } + } + localization_key = tribal_icon_concept + } + text = { # Clan + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = clan_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_clan + } + trigger_else = { + liege ?= { government_has_flag = government_is_clan } + } + } + } + localization_key = clan_icon_concept + } + text = { # Japanese Admin + trigger = { + trigger_if = { + limit = { is_alive = no } + has_government = japan_administrative_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + has_government = japan_administrative_government + } + trigger_else = { + liege ?= { has_government = japan_administrative_government } + } + } + } + localization_key = japan_administrative_icon_concept + } + text = { # Admin + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = administrative_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_administrative + } + trigger_else = { + liege ?= { government_has_flag = government_is_administrative } + } + } + } + localization_key = administrative_icon_concept + } + text = { # Republic + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = republic_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_republic + } + trigger_else = { + liege ?= { government_has_flag = government_is_republic } + } + } + } + localization_key = republic_icon_concept + } + text = { # Theocracy + trigger = { + trigger_if = { + limit = { + is_alive = no + } + has_government = theocracy_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + government_has_flag = government_is_theocracy + } + trigger_else = { + liege ?= { government_has_flag = government_is_theocracy } + } + } + } + localization_key = theocracy_icon_concept + } + text = { # Japanese Feudal + trigger = { + trigger_if = { + limit = { is_alive = no } + has_government = japan_feudal_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + has_government = japan_feudal_government + } + trigger_else = { + liege ?= { has_government = japan_feudal_government } + } + } + } + localization_key = japan_feudal_icon_concept + } + text = { # Steppe Admin + trigger = { + trigger_if = { + limit = { is_alive = no } + has_government = steppe_admin_government + } + trigger_else = { + trigger_if = { + limit = { is_ruler = yes } + has_government = steppe_admin_government + } + trigger_else = { + liege ?= { has_government = steppe_admin_government } + } + } + } + localization_key = steppe_admin_icon_concept + } + text = { # Feudal + trigger = { always = no } + localization_key = feudal_icon_concept + fallback = yes + } +} + +GetTribalFeudal = { + type = character + + text = { + trigger = { government_has_flag = government_is_tribal } + localization_key = tribal_government + } + + text = { + localization_key = feudal_government + } +} diff --git a/N3OW/common/customizable_localization/00_hold_court_custom_joe.txt b/N3OW/common/customizable_localization/00_hold_court_custom_joe.txt new file mode 100644 index 00000000..07364164 --- /dev/null +++ b/N3OW/common/customizable_localization/00_hold_court_custom_joe.txt @@ -0,0 +1,315 @@ +get_hold_court_8001_flaw = { # Flavor for reasons they are a bad mayor + type = character + random_valid = yes + + text = { + trigger = { has_trait = lazy } + localization_key = hold_court_8001.desc_lazy + } + + text = { + trigger = { has_trait = greedy } + localization_key = hold_court_8001.desc_greedy + } + + text = { + trigger = { has_trait = arbitrary } + localization_key = hold_court_8001.desc_arbitrary + } + + text = { + trigger = { has_trait = deceitful } + localization_key = hold_court_8001.desc_deceitful + } + + text = { + trigger = { stewardship <= 6 } + localization_key = hold_court_8001.desc_incompetent + } + + text = { + trigger = { age < 25 } + localization_key = hold_court_8001.desc_young + } + + text = { + trigger = { has_trait = infirm } + localization_key = hold_court_8001.desc_infirm + } + + text = { + trigger = { has_trait = incapable } + localization_key = hold_court_8001.desc_incapable + } + + text = { + trigger = { age > 60 } + localization_key = hold_court_8001.desc_old + } + + text = { + trigger = { always = yes } + localization_key = hold_court_8001.desc_fallback + } +} + +get_hold_court_8010_stake = { # Flavor for government type of worried vassal + type = character + + text = { + trigger = { government_has_flag = government_is_republic } + localization_key = hold_court_8010.desc_republic + } + + text = { + trigger = { government_has_flag = government_is_theocracy } + localization_key = hold_court_8010.desc_theocratic + } + + text = { + trigger = { always = yes } + localization_key = hold_court_8010.desc_family + } +} + +get_hold_court_8020_holiness_1 = { # Describe the holiness of the target county + type = character + + text = { + trigger = { + exists = var:holy_site_var + var:holy_site_var = { + any_county_province = { + barony = { + is_holy_site_of = ROOT.faith + title_province = { has_special_building = yes } + } + } + } + } + localization_key = holiness_cathedral_1 + } + + text = { + trigger = { + exists = var:holy_site_var + var:holy_site_var = { + any_county_province = { + barony = { is_holy_site_of = ROOT.faith } + } + } + } + localization_key = holiness_holy_site_1 + } + + text = { + trigger = { always = yes } + localization_key = holiness_fallback_1 + } +} + +get_hold_court_8020_holiness_2 = { # Describe the holiness of the target county + type = character + + text = { + trigger = { + exists = var:holy_site_var + var:holy_site_var = { + any_county_province = { + barony = { + is_holy_site_of = ROOT.faith + title_province = { has_special_building = yes } + } + } + } + } + localization_key = holiness_cathedral_2 + } + + text = { + trigger = { + exists = var:holy_site_var + var:holy_site_var = { + any_county_province = { + barony = { is_holy_site_of = ROOT.faith } + } + } + } + localization_key = holiness_holy_site_2 + } + + text = { + trigger = { always = yes } + localization_key = holiness_fallback_2 + } +} + +get_hold_court_8020_holiness_3 = { # Describe the holiness of the target county + type = character + + text = { + trigger = { + exists = var:holy_site_var + var:holy_site_var = { + any_county_province = { + barony = { + is_holy_site_of = ROOT.faith + title_province = { has_special_building = yes } + } + } + } + } + localization_key = holiness_cathedral_3 + } + + text = { + trigger = { + exists = var:holy_site_var + var:holy_site_var = { + any_county_province = { + barony = { is_holy_site_of = ROOT.faith } + } + } + } + localization_key = holiness_holy_site_3 + } + + text = { + trigger = { + always = yes + } + localization_key = holiness_fallback_3 + } +} + +get_hold_court_8100_parent = { + type = character + + text = { + trigger = { # If male dominated + faith = { + NOT = { has_doctrine = doctrine_gender_male_dominated } + } + } + localization_key = mama + } + + text = { + trigger = { # If female dominated + faith = { + NOT = { has_doctrine = doctrine_gender_female_dominated } + } + } + localization_key = papa + } + + text = { + trigger = { always = yes } + localization_key = hold_court_8100_parent_general + } +} + +get_hold_court_8100_situation = { + type = character + random_valid = yes + + text = { + trigger = { + OR = { + AND = { + faith = { + NOT = { has_doctrine = doctrine_gender_male_dominated } + } + mother ?= { is_alive = no } + } + AND = { + faith = { + NOT = { has_doctrine = doctrine_gender_female_dominated } + } + father ?= { is_alive = no } + } + } + } + localization_key = hold_court_8100_situation_dead + } + + text = { + trigger = { + OR = { + AND = { + faith = { + NOT = { has_doctrine = doctrine_gender_male_dominated } + } + mother ?= { is_imprisoned = yes } + } + AND = { + faith = { + NOT = { has_doctrine = doctrine_gender_female_dominated } + } + father ?= { is_imprisoned = yes } + } + } + } + localization_key = hold_court_8100_situation_jailed + } + + text = { + trigger = { always = yes } + localization_key = hold_court_8100_situation_unknown + } +} + +get_hold_court_8190_ethos = { + type = character + random_valid = yes + + text = { + trigger = { + culture = { has_cultural_pillar = ethos_bellicose } + } + localization_key = hold_court_8190_bellicose + } + + text = { + trigger = { + culture = { has_cultural_pillar = ethos_stoic } + } + localization_key = hold_court_8190_stoic + } + + text = { + trigger = { + culture = { has_cultural_pillar = ethos_bureaucratic } + } + localization_key = hold_court_8190_bureaucratic + } + + text = { + trigger = { + culture = { has_cultural_pillar = ethos_spiritual } + } + localization_key = hold_court_8190_spiritual + } + + text = { + trigger = { + culture = { has_cultural_pillar = ethos_courtly } + } + localization_key = hold_court_8190_courtly + } + + text = { + trigger = { + culture = { has_cultural_pillar = ethos_egalitarian } + } + localization_key = hold_court_8190_egalitarian + } + + text = { + trigger = { + culture = { has_cultural_pillar = ethos_communal } + } + localization_key = hold_court_8190_communal + } +} + diff --git a/N3OW/common/customizable_localization/00_regional_custom_localization.txt b/N3OW/common/customizable_localization/00_regional_custom_localization.txt new file mode 100644 index 00000000..fc3f52db --- /dev/null +++ b/N3OW/common/customizable_localization/00_regional_custom_localization.txt @@ -0,0 +1,4624 @@ +MountedWarriorTerm = { + type = character + + #Faris for muslims + + text = { + localization_key = knight + } +} + + +MountedWarriorTermPlural = { + type = character + + #Faris for muslims + + text = { + localization_key = knights + } +} + + +MountedWarriorAdjective = { + type = character + + #Faris for muslims + + text = { + localization_key = knightly + } +} + +MartialTournamentAdjective = { + type = character + + text = { + trigger = { + government_has_flag = government_is_feudal + capital_province = { + geographical_region = world_europe_west + } + } + localization_key = tournament_jousting + } + text = { + trigger = { + OR = { + government_has_flag = government_is_tribal + faith = { + has_doctrine = pagan_hostility_doctrine + } + capital_province = { + geographical_region = world_europe_north + } + } + } + localization_key = tournament_wrestling + } + text = { + trigger = { + always = no + } + localization_key = tournament_sparring + fallback = yes + } +} + +LevyMenWomen = { + type = character + + #Gender law triggers + + text = { + trigger = { + dummy_male = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + localization_key = levies_men + } + + text = { + trigger = { + dummy_female = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + localization_key = levies_women + } + + text = { + trigger = { + dummy_male = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + dummy_female = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + localization_key = levies_people + } +} + +FortifiedBuilding = { #Castle, Fort, Kasbah etc. + type = character + + text = { + trigger = { + government_has_flag = government_is_landless_adventurer + } + localization_key = encampment + } + + text = { + trigger = { + culture = { has_cultural_pillar = language_arabic } + } + localization_key = kasbah + } + + text = { + trigger = { + culture = { has_cultural_pillar = heritage_indo_aryan } + } + localization_key = durga + } + + text = { + trigger = { + culture = { has_cultural_pillar = language_greek } + } + localization_key = kastron + } + + text = { + trigger = { + government_has_flag = government_is_celestial + is_governor = yes + } + localization_key = compound + } + + text = { + trigger = { government_has_flag = government_is_tribal } + localization_key = stronghold + } + + text = { + trigger = { always = no } + localization_key = castle + fallback = yes + } +} + +ResidenceBuilding = { #Castle, Palace, etc. + type = character + + text = { + trigger = { + government_has_flag = government_is_nomadic + } + localization_key = yurt_residence + } + + text = { + trigger = { + government_has_flag = government_is_tribal + } + localization_key = hall_residence + } + + text = { + trigger = { + government_has_flag = government_is_landless_adventurer + } + localization_key = tent + } + + text = { + trigger = { + government_has_flag = government_is_republic + is_landless_adventurer = no + } + localization_key = mansion + } + + text = { + trigger = { + is_landless_adventurer = no + OR = { + government_has_flag = government_is_theocracy + is_theocratic_lessee = yes + } + } + localization_key = temple + } + + text = { + trigger = { + government_has_flag = government_is_administrative + is_governor = yes + domicile ?= { + domicile_location.county ?= { + holder != root + } + } + } + localization_key = office + } + + text = { + trigger = { + any_held_title = { is_noble_family_title = yes } + is_governor = no + } + localization_key = estate + } + + text = { + trigger = { + is_landless_adventurer = no + NOR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + any_held_title = { is_noble_family_title = yes } + is_theocratic_lessee = yes + } + } + localization_key = castle + } + + text = { + localization_key = residence + fallback = yes + } +} + +ResidenceBuildingPlural = { #Castles, Palaces, etc. + type = character + + text = { + trigger = { + government_has_flag = government_is_nomadic + } + localization_key = yurt_residence_plural + } + + text = { + trigger = { + government_has_flag = government_is_tribal + } + localization_key = hall_residence_plural + } + + text = { + trigger = { + government_has_flag = government_is_landless_adventurer + } + localization_key = camp_plural + } + + text = { + trigger = { + government_has_flag = government_is_republic + is_landless_adventurer = no + } + localization_key = mansions + } + + text = { + trigger = { + is_landless_adventurer = no + OR = { + government_has_flag = government_is_theocracy + is_theocratic_lessee = yes + } + } + localization_key = temples + } + + text = { + trigger = { + government_has_flag = government_is_administrative + is_governor = yes + domicile ?= { + domicile_location.county ?= { + holder != root + } + } + } + localization_key = office_plural + } + + text = { + trigger = { + any_held_title = { is_noble_family_title = yes } + } + localization_key = estate_plural + } + + text = { + trigger = { + is_landless_adventurer = no + NOR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + any_held_title = { is_noble_family_title = yes } + is_theocratic_lessee = yes + } + } + localization_key = castles + } + + text = { + localization_key = residences + fallback = yes + } +} + + +OutdoorsHidingPlace = { #Something you can find in nature / by the road + type = character + + text = { + localization_key = trees + } + + text = { + localization_key = rocks + } +} + +ObjectToClimb = { + type = character + + text = { + trigger = { location = { terrain = desert } } + localization_key = sand_dune + } + text = { + trigger = { + location = { + OR = { + terrain = plains + terrain = mountains + terrain = desert_mountains + terrain = drylands + terrain = steppe + } + } + } + localization_key = boulder + } + text = { + localization_key = tree + } +} + +IndefiniteBodyOfWater = { #Lake, River, Oasis, etc. + type = character + random_valid = yes + + text = { + trigger = { + location = { terrain = oasis } + } + localization_key = body_of_water_an_oasis + } + text = { + trigger = { + location = { is_coastal = yes } + } + localization_key = body_of_water_the_ocean + } + text = { + trigger = { + location = { is_riverside_province = yes } + } + localization_key = body_of_water_a_river + } + text = { + trigger = { + location = { + OR = { + terrain = farmlands + terrain = jungle + terrain = wetlands + } + } + } + localization_key = body_of_water_a_large_pond + } + text = { + trigger = { + location = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + } + localization_key = body_of_water_a_lagoon + } + text = { + trigger = { + location = { + OR = { + terrain = plains + terrain = hills + terrain = forest + terrain = taiga + terrain = steppe + } + } + } + localization_key = body_of_water_a_lake + } + text = { + trigger = { always = no } + # For the areas with no good source of water. + fallback = yes + localization_key = body_of_water_a_watering_hole + } +} + +# As above, but excluding rivers'n'seas. +IndefiniteBodyOfWater_Static = { + type = character + random_valid = yes + + text = { + trigger = { + location = { terrain = oasis } + } + localization_key = body_of_water_an_oasis + } + text = { + trigger = { + location = { + OR = { + terrain = farmlands + terrain = jungle + terrain = wetlands + } + } + } + localization_key = body_of_water_a_large_pond + } + text = { + trigger = { + location = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + } + localization_key = body_of_water_a_lagoon + } + text = { + trigger = { + location = { + OR = { + terrain = plains + terrain = hills + terrain = forest + terrain = taiga + terrain = steppe + } + } + } + localization_key = body_of_water_a_lake + } + text = { + trigger = { always = no } + # For the areas with no good source of water. + fallback = yes + localization_key = body_of_water_a_watering_hole + } +} + +RandomExampleName = { + type = character + + text = { + localization_key = random_example_name_default + } +} + +TerrainTypeCountyScope = { + type = landed_title + + text = { + trigger = { title_province = { terrain = plains } } + localization_key = terrain_plains + } + + text = { + trigger = { title_province = { terrain = farmlands } } + localization_key = terrain_farmlands + } + + text = { + trigger = { title_province = { terrain = hills } } + localization_key = terrain_hills + } + + text = { + trigger = { + title_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + localization_key = terrain_mountains + } + + text = { + trigger = { title_province = { terrain = desert } } + localization_key = terrain_desert + } + + text = { + trigger = { title_province = { terrain = oasis } } + localization_key = terrain_oasis + } + + text = { + trigger = { title_province = { terrain = jungle } } + localization_key = terrain_jungle + } + + text = { + trigger = { title_province = { terrain = forest } } + localization_key = terrain_forest + } + + text = { + trigger = { title_province = { terrain = taiga } } + localization_key = terrain_taiga + } + + text = { + trigger = { title_province = { terrain = wetlands } } + localization_key = terrain_wetlands + } + + text = { + trigger = { title_province = { terrain = steppe } } + localization_key = terrain_steppe + } + + text = { + trigger = { title_province = { terrain = floodplains } } + localization_key = terrain_floodplains + } + + text = { + trigger = { title_province = { terrain = drylands } } + localization_key = terrain_drylands + } +} + +TerrainTypeCountyScopePlural = { + type = landed_title + + text = { + trigger = { title_province = { terrain = plains } } + localization_key = terrain_plains + } + + text = { + trigger = { title_province = { terrain = farmlands } } + localization_key = terrain_farmlands + } + + text = { + trigger = { title_province = { terrain = hills } } + localization_key = terrain_hills + } + + text = { + trigger = { + title_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + localization_key = terrain_mountains + } + + text = { + trigger = { title_province = { terrain = desert } } + localization_key = terrain_deserts + } + + text = { + trigger = { title_province = { terrain = oasis } } + localization_key = terrain_oases + } + + text = { + trigger = { title_province = { terrain = jungle } } + localization_key = terrain_jungles + } + + text = { + trigger = { title_province = { terrain = forest } } + localization_key = terrain_forests + } + + text = { + trigger = { title_province = { terrain = taiga } } + localization_key = terrain_taigas + } + + text = { + trigger = { title_province = { terrain = wetlands } } + localization_key = terrain_wetlands + } + + text = { + trigger = { title_province = { terrain = steppe } } + localization_key = terrain_steppes + } + + text = { + trigger = { title_province = { terrain = floodplains } } + localization_key = terrain_floodplains + } + + text = { + trigger = { title_province = { terrain = drylands } } + localization_key = terrain_drylands + } +} + +TerrainType = { + type = character + + text = { + trigger = { location = { terrain = plains } } + localization_key = terrain_plains + } + + text = { + trigger = { location = { terrain = farmlands } } + localization_key = terrain_farmlands + } + + text = { + trigger = { location = { terrain = hills } } + localization_key = terrain_hills + } + + text = { + trigger = { + location = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + localization_key = terrain_mountains + } + + text = { + trigger = { location = { terrain = desert } } + localization_key = terrain_desert + } + + text = { + trigger = { location = { terrain = oasis } } + localization_key = terrain_oasis + } + + text = { + trigger = { location = { terrain = jungle } } + localization_key = terrain_jungle + } + + text = { + trigger = { location = { terrain = forest } } + localization_key = terrain_forest + } + + text = { + trigger = { location = { terrain = taiga } } + localization_key = terrain_taiga + } + + text = { + trigger = { location = { terrain = wetlands } } + localization_key = terrain_wetlands + } + + text = { + trigger = { location = { terrain = steppe } } + localization_key = terrain_steppe + } + + text = { + trigger = { location = { terrain = floodplains } } + localization_key = terrain_floodplains + } + + text = { + trigger = { location = { terrain = drylands } } + localization_key = terrain_drylands + } +} + +TerrainTypeProvince = { + type = province + + text = { + trigger = { terrain = plains } + localization_key = terrain_plains + } + + text = { + trigger = { terrain = farmlands } + localization_key = terrain_farmlands + } + + text = { + trigger = { terrain = hills } + localization_key = terrain_hills + } + + text = { + trigger = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + localization_key = terrain_mountains + } + + text = { + trigger = { terrain = desert } + localization_key = terrain_desert + } + + text = { + trigger = { terrain = oasis } + localization_key = terrain_oasis + } + + text = { + trigger = { terrain = jungle } + localization_key = terrain_jungle + } + + text = { + trigger = { terrain = forest } + localization_key = terrain_forest + } + + text = { + trigger = { terrain = taiga } + localization_key = terrain_taiga + } + + text = { + trigger = { terrain = wetlands } + localization_key = terrain_wetlands + } + + text = { + trigger = { terrain = steppe } + localization_key = terrain_steppe + } + + text = { + trigger = { terrain = floodplains } + localization_key = terrain_floodplains + } + + text = { + trigger = { terrain = drylands } + localization_key = terrain_drylands + } + + text = { + trigger = { terrain = terraced_hills } + localization_key = terrain_terraced_hills + } +} + +TerrainTypeProvincePrefix = { + type = province + + text = { + trigger = { + OR = { + terrain = plains + terrain = farmlands + terrain = oasis + } + } + localization_key = prefix_verdant + } + + text = { + trigger = { terrain = hills } + localization_key = prefix_rolling + } + + text = { + trigger = { + OR = { + terrain = mountains + terrain = desert_mountains + terrain = jungle + } + } + localization_key = prefix_mighty + } + + text = { + trigger = { + OR = { + terrain = desert + terrain = steppe + terrain = taiga + } + } + localization_key = prefix_endless + } + + text = { + trigger = { + OR = { + terrain = jungle + terrain = forest + } + } + localization_key = prefix_lush + } + + text = { + trigger = { + OR = { + terrain = floodplains + terrain = drylands + terrain = wetlands + } + } + localization_key = prefix_rich + } +} + +Abortifacient = { + type = character + + random_valid = yes + + text = { + localization_key = abortifacient_pennyroyal + weight_multiplier = { + base = 3 + } + #Europe, North Africa, Middle East + trigger = { + location = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_africa_north + } + } + } + } + + text = { + localization_key = abortifacient_catmint + #Europe, Asia, Africa + trigger = { always = yes } + } + + text = { + localization_key = abortifacient_thymbra + #North Africa, Southern Europe, Middle East, Central Asia + trigger = { + location = { + OR = { + geographical_region = world_europe_south + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_steppe + geographical_region = world_africa_north + } + } + } + } + + text = { + localization_key = abortifacient_broadleaf_sage + #Mediterranean + trigger = { + location = { + OR = { + geographical_region = world_europe_south + geographical_region = world_asia_minor + geographical_region = world_africa_north + } + } + } + } + + text = { + localization_key = abortifacient_soapwort + #Europe and Asia + trigger = { + location = { + OR = { + geographical_region = world_europe + geographical_region = world_steppe + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + } + + text = { + localization_key = abortifacient_galingales + #Africa, Asia + trigger = { + location = { + OR = { + geographical_region = world_africa + geographical_region = world_steppe + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast_mainland + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia + } + } + } + } + + text = { + localization_key = abortifacient_bishops_lace + #Christian only + #Europe and Southwest Asia + trigger = { + location = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_minor + geographical_region = world_middle_east + } + } + } + } + + text = { + localization_key = abortifacient_wild_carrot + #Same as Bishop's Lace + #Europe and Southwest Asia + trigger = { + location = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_minor + geographical_region = world_middle_east + } + } + } + } + + text = { + localization_key = abortifacient_bitter_melon + #India, Asia + trigger = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_asia_southeast + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia + } + } + } + } + + text = { + localization_key = abortifacient_nutmeg + #India, Asia + trigger = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia + } + } + } + } + + text = { + localization_key = abortifacient_saffron + #India + trigger = { + location = { geographical_region = world_india } + } + } + + text = { + localization_key = abortifacient_vervain + #Europe + trigger = { + location = { geographical_region = world_europe } + } + } + + #text = { + # localization_key = abortifacient_mugwort + # #lesser chance in Europe, rest of Asia + #} + + text = { + localization_key = abortifacient_herb_of_grace + #Christian only + #Balkans, Anatolia, Mediterranean + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + location = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + geographical_region = world_asia_minor + } + } + } + } + + text = { + localization_key = abortifacient_rue + #Same as herb-of-grace + #Balkans, Anatolia, Mediterranean + trigger = { + location = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + geographical_region = world_asia_minor + } + } + } + } + + text = { + localization_key = abortifacient_tansy + #Europe, Mediterranean + trigger = { + location = { + OR = { + geographical_region = world_europe + geographical_region = world_africa_north + geographical_region = world_asia_minor + } + } + } + } + + text = { + localization_key = abortifacient_ergot + weight_multiplier = { + base = 3 + } + #Europe, Asia + trigger = { + location = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_north_east + geographical_region = world_asia_korea + geographical_region = world_asia_china + geographical_region = world_asia_japan + } + } + } + } +} + + +#Various Venomous Creatures +VenomousCreature = { + type = character + + text = { + localization_key = venomous_creature_rare_spider + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:rare_spider #Very rare, as spiders poisonous enough to kill a man would need to come from VERY far + } + trigger_else = { always = yes } + } + } + + text = { + localization_key = venomous_creature_red_scorpion + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:red_scorpion #India, Nepal + } + trigger_else = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_asia_china + } + } + } + } + } + + text = { + localization_key = venomous_creature_deathstalker + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:deathstalker #North Africa, Middle East and China + } + trigger_else = { + location = { + OR = { + geographical_region = world_africa_north + geographical_region = world_middle_east_jerusalem + geographical_region = world_middle_east_persia + geographical_region = world_asia_china + } + } + } + } + } + + text = { + localization_key = venomous_creature_fat_tail + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:fat_tail #Arabia, Middle East, Egypt, China + } + trigger_else = { + location = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_north_east + geographical_region = world_asia_china + } + } + } + } + } + + text = { + localization_key = venomous_creature_viper + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:viper #Fallback - Everywhere + } + trigger_else = { always = yes } + } + } + + text = { + localization_key = venomous_creature_mamba + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:mamba #Sub-saharan Africa + } + trigger_else = { + location = { geographical_region = world_africa_west } + } + } + } + + text = { + localization_key = venomous_creature_boomslang + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:boomslang #Sub-saharan Africa + } + trigger_else = { + location = { geographical_region = world_africa_west } + } + } + } + + text = { + localization_key = venomous_creature_king_cobra + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:king_cobra #South-east Asia + India + } + trigger_else = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_burma + geographical_region = world_asia_southeast + } + } + } + } + } + + text = { + localization_key = venomous_creature_daboia + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:daboia #India, Southeast Asia + } + trigger_else = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_asia_southeast + } + } + } + } + } + + text = { + localization_key = venomous_creature_saw_scale + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:saw_scale #North Africa, Middle East, Pakistan, India, Southeast Asia + } + trigger_else = { + location = { + OR = { + geographical_region = world_africa_north + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_asia_southeast_mainland + } + } + } + } + } + + text = { + localization_key = venomous_creature_krait + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:krait #North Africa, Middle East, Pakistan, India + } + trigger_else = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_burma + geographical_region = world_asia_southeast + } + } + } + } + } + + text = { + localization_key = venomous_creature_beaked_mammal + trigger = { + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:beaked_mammal #Australia + } + trigger_else = { always = no } + } + } + + text = { + localization_key = venomous_creature_snake + trigger = { + always = no + } + fallback = yes + } +} + +#VenomousCreatureType +VenomousCreatureType = { + type = character + + text = { + localization_key = venomous_creature_scorpion + trigger = { + OR = { + scope:venomous_creature = flag:red_scorpion + scope:venomous_creature = flag:deathstalker + scope:venomous_creature = flag:fat_tail + } + } + } + text = { + localization_key = venomous_creature_spider + trigger = { + scope:venomous_creature = flag:rare_spider + } + } + text = { + localization_key = venomous_creature_thing + trigger = { + scope:venomous_creature = flag:beaked_mammal + } + } + text = { + localization_key = venomous_creature_snake + trigger = { + OR = { + scope:venomous_creature = flag:viper + scope:venomous_creature = flag:mamba + scope:venomous_creature = flag:boomslang + scope:venomous_creature = flag:king_cobra + scope:venomous_creature = flag:daboia + scope:venomous_creature = flag:saw_scale + scope:venomous_creature = flag:krait + } + } + fallback = yes + } +} + +#VenomousCreatureType +VenomousCreatureTypePlural = { + type = character + + text = { + localization_key = venomous_creature_scorpion_plural + trigger = { + OR = { + scope:venomous_creature = flag:red_scorpion + scope:venomous_creature = flag:deathstalker + scope:venomous_creature = flag:fat_tail + } + } + } + text = { + localization_key = venomous_creature_spider_plural + trigger = { + scope:venomous_creature = flag:rare_spider + } + } + text = { + localization_key = venomous_creature_thing_plural + trigger = { + scope:venomous_creature = flag:beaked_mammal + } + } + text = { + localization_key = venomous_creature_snake_plural + trigger = { + OR = { + scope:venomous_creature = flag:viper + scope:venomous_creature = flag:mamba + scope:venomous_creature = flag:boomslang + scope:venomous_creature = flag:king_cobra + scope:venomous_creature = flag:daboia + scope:venomous_creature = flag:saw_scale + scope:venomous_creature = flag:krait + } + } + fallback = yes + } +} + +#VenomousCreatureType +VenomousCreatureAttack = { + type = character + + text = { + localization_key = venomous_creature_sting + trigger = { + OR = { + scope:venomous_creature = flag:red_scorpion + scope:venomous_creature = flag:deathstalker + scope:venomous_creature = flag:fat_tail + scope:venomous_creature = flag:beaked_mammal + } + } + } + text = { + localization_key = venomous_creature_bite + trigger = { + OR = { + scope:venomous_creature = flag:rare_spider + scope:venomous_creature = flag:viper + scope:venomous_creature = flag:mamba + scope:venomous_creature = flag:boomslang + scope:venomous_creature = flag:king_cobra + scope:venomous_creature = flag:daboia + scope:venomous_creature = flag:saw_scale + scope:venomous_creature = flag:krait + } + } + } +} + +#VenomousCreatureAttackPlural +VenomousCreatureAttackPlural = { + type = character + + text = { + localization_key = venomous_creature_stings + trigger = { + OR = { + scope:venomous_creature = flag:red_scorpion + scope:venomous_creature = flag:deathstalker + scope:venomous_creature = flag:fat_tail + scope:venomous_creature = flag:beaked_mammal + } + } + } + text = { + localization_key = venomous_creature_bites + trigger = { + OR = { + scope:venomous_creature = flag:rare_spider + scope:venomous_creature = flag:viper + scope:venomous_creature = flag:mamba + scope:venomous_creature = flag:boomslang + scope:venomous_creature = flag:king_cobra + scope:venomous_creature = flag:daboia + scope:venomous_creature = flag:saw_scale + scope:venomous_creature = flag:krait + } + } + } +} + +VenomousCreatureMovement = { + type = character + + text = { + localization_key = venomous_creature_scutter + trigger = { + OR = { + scope:venomous_creature = flag:red_scorpion + scope:venomous_creature = flag:deathstalker + scope:venomous_creature = flag:fat_tail + scope:venomous_creature = flag:rare_spider + } + } + } + text = { + localization_key = venomous_creature_slither + trigger = { + OR = { + scope:venomous_creature = flag:viper + scope:venomous_creature = flag:mamba + scope:venomous_creature = flag:boomslang + scope:venomous_creature = flag:king_cobra + scope:venomous_creature = flag:daboia + scope:venomous_creature = flag:saw_scale + scope:venomous_creature = flag:krait + } + } + } + text = { + localization_key = venomous_creature_scamper + trigger = { + scope:venomous_creature = flag:beaked_mammal + } + } +} + + +RandomReligiousTextName = { + type = character + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:golden_legend + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + OR = { + location.faith.religion = religion:eastern_orthodox_religion + location.faith.religion = religion:catholic_religion + location.faith.religion = religion:protestant_religion + } + } + #The book is of my religion + trigger_else = { + OR = { + location.faith.religion = religion:eastern_orthodox_religion + location.faith.religion = religion:catholic_religion + location.faith.religion = religion:protestant_religion + } + } + } + } + localization_key = random_religious_text_golden_legend + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:city_of_god + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + OR = { + location.faith.religion = religion:eastern_orthodox_religion + location.faith.religion = religion:catholic_religion + location.faith.religion = religion:protestant_religion + } + } + #The book is of my religion + trigger_else = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + } + } + localization_key = random_religious_text_city_of_god + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:summa_theologica + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + OR = { + location.faith.religion = religion:eastern_orthodox_religion + location.faith.religion = religion:catholic_religion + location.faith.religion = religion:protestant_religion + } + NOT = { location.faith = faith:orthodox } + } + #The book is of my religion + trigger_else = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + NOT = { faith = faith:orthodox } + } + } + localization_key = random_religious_text_summa_theologica + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:sic_et_non + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + OR = { + location.faith.religion = religion:eastern_orthodox_religion + location.faith.religion = religion:catholic_religion + location.faith.religion = religion:protestant_religion + } + NOT = { location.faith = faith:orthodox } + } + #The book is of my religion + trigger_else = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + NOT = { faith = faith:orthodox } + } + } + localization_key = random_religious_text_sic_et_non + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:chrysostomos + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith = faith:orthodox + } + #The book is of my religion + trigger_else = { faith = faith:orthodox } + } + localization_key = random_religious_text_chrysostomos + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:symeon_menologion + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith = faith:orthodox + } + #The book is of my religion + trigger_else = { faith = faith:orthodox } + } + localization_key = random_religious_text_symeon_menologion + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:god_and_christ + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith = faith:orthodox + } + #The book is of my religion + trigger_else = { faith = faith:orthodox } + } + localization_key = random_religious_text_god_and_christ + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:the_small_book_on_theism + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith.religion = religion:islam_religion + } + #The book is of my religion + trigger_else = { faith.religion = religion:islam_religion } + } + localization_key = random_religious_text_the_small_book_on_theism + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:modern_philosophy + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith.religion = religion:islam_religion + } + #The book is of my religion + trigger_else = { faith.religion = religion:islam_religion } + } + localization_key = random_religious_text_modern_philosophy + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:stories_from_holy_book + } + trigger_else = { always = yes } + } + localization_key = random_religious_text_stories_from_holy_book + } + +} + + +RandomEntertainmentTextName = { + type = character + + text = { + trigger = { + scope:entertainment_book_title = flag:beowulf + } + localization_key = random_entertainment_text_beowulf + } + + text = { + trigger = { + scope:entertainment_book_title = flag:niebelungenlied + } + localization_key = random_entertainment_text_niebelungenlied + } + + text = { + trigger = { + scope:entertainment_book_title = flag:song_of_roland + } + localization_key = random_entertainment_text_song_of_roland + } + + text = { + trigger = { + scope:entertainment_book_title = flag:mabinogi + } + localization_key = random_entertainment_text_mabinogi + } + + text = { + trigger = { + scope:entertainment_book_title = flag:travels_to_jerusalem + } + localization_key = random_entertainment_text_travels_to_jerusalem + } + + text = { + trigger = { + scope:entertainment_book_title = flag:east_of_indus + } + localization_key = random_entertainment_text_east_of_indus + } + + text = { + trigger = { + scope:entertainment_book_title = flag:travels_to_byzantium + } + localization_key = random_entertainment_text_travels_to_byzantium + } + + text = { + trigger = { + scope:entertainment_book_title = flag:digenes_akrites + } + localization_key = random_entertainment_text_digenes_akrites + } + + text = { + trigger = { + scope:entertainment_book_title = flag:epigrams + } + localization_key = random_entertainment_text_epigrams + } + + text = { + trigger = { + scope:entertainment_book_title = flag:philogelos + } + localization_key = random_entertainment_text_philogelos + } + + text = { + trigger = { + scope:entertainment_book_title = flag:riddle_poems + } + localization_key = random_entertainment_text_riddle_poems + } +} + + +RandomInformativeTextName = { + type = character + + text = { + trigger = { + scope:informative_book_title = flag:on_the_judgement_of_the_stars + } + localization_key = random_informative_text_on_the_judgement_of_the_stars + } + + text = { + trigger = { + scope:informative_book_title = flag:the_perfect_state + } + localization_key = random_informative_text_the_perfect_state + } + + text = { + trigger = { + scope:informative_book_title = flag:spiritual_medicine + } + localization_key = random_informative_text_spiritual_medicine + } + + text = { + trigger = { + scope:informative_book_title = flag:trotula + } + localization_key = random_informative_text_trotula + } + + text = { + trigger = { + scope:informative_book_title = flag:the_improvement_of_the_moral_qualities + } + localization_key = random_informative_text_the_improvement_of_the_moral_qualities + } + + text = { + trigger = { + scope:informative_book_title = flag:armes_prydein + } + localization_key = random_informative_text_armes_prydein + } + + text = { + trigger = { + scope:informative_book_title = flag:almagest + } + localization_key = random_informative_text_almagest + } + text = { + trigger = { + scope:informative_book_title = flag:anekdota + } + localization_key = random_informative_text_anekdota + } + text = { + trigger = { + scope:informative_book_title = flag:chronographia + } + localization_key = random_informative_text_chronographia + } +} + + +MusicalPerformer = { + type = character + random_valid = yes + + text = { + #Latin + localization_key = music_performer_troubadour + } +} + + +MusicalPerformerPossessive = { + type = character + random_valid = yes + + text = { + #Latin + localization_key = music_performer_troubadour_possessive + } +} + +#NOTE! All of these nouns should work with "a" (not "an") +RegionalGameObject = { + type = character + random_valid = yes + + text = { + localization_key = deck_of_cards + } + + text = { + trigger = { + location = { + geographical_region = world_india + } + } + localization_key = pachisi_board #indian + } + + text = { + localization_key = chess_set + } +} + +CulturalCurse = { + type = character + random_valid = yes + + #Christian + text = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + } + localization_key = curse_by_the_blood + } + text = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } } + localization_key = curse_gods_wounds + } + text = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } } + localization_key = curse_by_gods_nails + } + + #Swedish + text = { + trigger = { + OR = { + culture = { has_name_list = name_list_norwegian } + culture = { has_name_list = name_list_swedish } + } + } + localization_key = curse_helvete + } + text = { + trigger = { culture = { has_name_list = name_list_swedish } } + localization_key = curse_helvetes_javla_skit + } + text = { + trigger = { culture = { has_name_list = name_list_swedish } } + localization_key = curse_skit + } + text = { + trigger = { + OR = { + culture = { has_name_list = name_list_swedish } + culture = { has_name_list = name_list_norse } + } + faith = faith:norse_pagan + } + localization_key = curse_balders_balle + } + + #Norse + text = { + trigger = { culture = { has_name_list = name_list_norse } } + localization_key = curse_skitr + } + + #Scanian + text = { + trigger = { + OR = { + culture = { has_name_list = name_list_danish } + culture = { has_name_list = name_list_swedish } + } + capital_province.duchy = title:d_skane + } + localization_key = curse_jevla_mog + } + text = { + trigger = { + OR = { + culture = { has_name_list = name_list_danish } + culture = { has_name_list = name_list_swedish } + } + capital_province.duchy = title:d_skane + } + localization_key = curse_alahue + } + + #Norwegian + text = { + trigger = { culture = { has_name_list = name_list_norwegian } } + localization_key = curse_fy_fanden + } + text = { + trigger = { culture = { has_name_list = name_list_norwegian } } + localization_key = curse_pokker + } + text = { + trigger = { culture = { has_name_list = name_list_norwegian } } + localization_key = curse_haestkuk + } + + + #German + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_scheisse + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_dreck + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_verdammt + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_gottverdammt + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_zum_teufel + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_himmel_arsch_und_zwirn + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_kreuzdonnerwetter + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_zur_holle + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_was_fur_ein_mist + } + text = { + trigger = { culture = { has_cultural_pillar = language_central_germanic } } + localization_key = curse_was_fur_ein_dreck + } + + + #Dutch + text = { + trigger = { culture = { has_name_list = name_list_dutch } } + localization_key = curse_godver + } + text = { + trigger = { culture = { has_name_list = name_list_dutch } } + localization_key = curse_godverdomme + } + text = { + trigger = { culture = { has_name_list = name_list_dutch } } + localization_key = curse_tering + } + text = { + trigger = { culture = { has_name_list = name_list_dutch } } + localization_key = curse_godgloeiende + } + text = { + trigger = { culture = { has_name_list = name_list_dutch } } + localization_key = curse_kanker + } + text = { + trigger = { culture = { has_name_list = name_list_dutch } } + localization_key = curse_vervloekt + } + + #Polish + text = { + trigger = { culture = { has_name_list = name_list_polish } } + localization_key = curse_niech_mnie_diabli + } + text = { + trigger = { culture = { has_name_list = name_list_polish } } + localization_key = curse_zaraza + } + + #French + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_merde + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_putain + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_fils_de_pute + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_sacrebleu + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_nom_dune_pipe + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_calisse + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_ostie_de_criss_de_tabarnak + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_morbleu + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_diantre + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_peste + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_mortecouille + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_ventre_dieu + } + text = { + trigger = { culture = { has_cultural_pillar = language_french } } + localization_key = curse_puterelle + } + + #Spanish + text = { + trigger = { culture = { has_name_list = name_list_castilian } } + localization_key = curse_maldicion + } + text = { + trigger = { culture = { has_name_list = name_list_castilian } } + localization_key = curse_maldita_sea + } + text = { + trigger = { culture = { has_name_list = name_list_castilian } } + localization_key = curse_mierda + } + text = { + trigger = { culture = { has_name_list = name_list_castilian } } + localization_key = curse_habrase_visto + } + text = { + trigger = { culture = { has_name_list = name_list_castilian } } + localization_key = curse_madre_mia + } + text = { + trigger = { culture = { has_name_list = name_list_castilian } } + localization_key = curse_ay_de_mi + } + + #Italian + text = { + trigger = { culture = { has_name_list = name_list_italian } } + localization_key = curse_cazzo + } + text = { + trigger = { culture = { has_name_list = name_list_italian } } + localization_key = curse_minchia + } + text = { + trigger = { culture = { has_name_list = name_list_italian } } + localization_key = curse_merda + } + text = { + trigger = { culture = { has_name_list = name_list_italian } } + localization_key = curse_vaffanculo + } + + #Russian + text = { + trigger = { culture = { has_name_list = name_list_russian } } + localization_key = curse_proklyatie + } + text = { + trigger = { culture = { has_name_list = name_list_russian } } + localization_key = curse_dyavol + } + text = { + trigger = { culture = { has_name_list = name_list_russian } } + localization_key = curse_vot_dermo + } + + #Lithuanian + text = { + trigger = { culture = { has_name_list = name_list_lithuanian } } + localization_key = curse_rupus_miltai + } + text = { + trigger = { culture = { has_name_list = name_list_lithuanian } } + localization_key = curse_velniai_rautu + } + text = { + trigger = { culture = { has_name_list = name_list_lithuanian } } + localization_key = curse_rupuze + } + + #Han Chinese + text = { + trigger = { culture = { has_name_list = name_list_han } } + localization_key = curse_fu_gu + } + text = { + trigger = { culture = { has_name_list = name_list_han } } + localization_key = curse_yanwang_suoming + } + text = { + trigger = { culture = { has_name_list = name_list_han } } + localization_key = curse_lai_hama + } + + #Fallback (english) + text = { + trigger = { always = no } + fallback = yes + localization_key = curse_curses + } + text = { + trigger = { always = no } + fallback = yes + localization_key = curse_shit + } + +} + +GetOldBook = { + type = character + text = { + trigger = { + culture = { has_cultural_pillar = language_greek } + } + localization_key = old_book_greek + } + text = { + trigger = { + faith.religion = { is_in_family = rf_abrahamic } + NOT = { + culture = { has_cultural_pillar = language_greek } + } + } + localization_key = old_book_abrahamic + } + text = { + trigger = { + faith.religion = { is_in_family = rf_pagan } + } + localization_key = old_book_pagan + } + text = { + trigger = { + faith.religion = { is_in_family = rf_eastern } + } + localization_key = old_book_eastern + } + text = { + trigger = { always = no } + fallback = yes + localization_key = old_book_general + } +} + +get_region_dog_type = { + type = character + random_valid = yes + + # Britain + text = { + trigger = { + current_date >= 1300.1.1 + capital_province = { geographical_region = world_europe_west_britannia } + } + localization_key = dog_type_talbot # Talbot + } + text = { + trigger = { + capital_province = { geographical_region = world_europe_west_britannia } + } + localization_key = dog_type_corgi # Corgi + } + text = { + trigger = { + capital_province = { geographical_region = world_europe_west_britannia } + } + localization_key = dog_type_rache # Rache + } + # Germany + text = { + trigger = { + capital_province = { geographical_region = world_europe_west_germania } + } + localization_key = dog_type_bullenbeisser # Bullenbeisser + } + text = { + trigger = { + capital_province = { geographical_region = world_europe_west_germania } + } + localization_key = dog_type_spitz # Spitz + } + # France + text = { + trigger = { + current_date >= 1100.1.1 + capital_province = { geographical_region = world_europe_west_francia } + } + localization_key = dog_type_chiengris # Chien-gris + } + # Europe + text = { + trigger = { + capital_province = { geographical_region = world_europe_south } + } + localization_key = dog_type_molossian # Molossus + } + text = { + trigger = { + capital_province = { geographical_region = world_europe } + } + localization_key = dog_type_mastiff # Mastiff + } + text = { + trigger = { + capital_province = { geographical_region = world_europe_north } + } + localization_key = dog_type_vallhund # Vallhund + } + text = { + trigger = { + capital_province = { geographical_region = world_europe } + } + localization_key = dog_type_limer # Limer + } + # Steppe + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_europe + geographical_region = world_steppe_west + } + } + } + localization_key = dog_type_alaunt # Alaunt + } + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_europe_north + geographical_region = world_steppe_west + } + } + } + localization_key = dog_type_laika # Laika (Samoyed) + } + # Africa + text = { + trigger = { + capital_province = { geographical_region = world_africa } + } + localization_key = dog_type_basenji # Basenji + } + # Asia + text = { + trigger = { + capital_province = { geographical_region = world_middle_east } + } + localization_key = dog_type_canaan # Canaan + } + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_north + } + } + } + localization_key = dog_type_saluki # Saluki + } + text = { + trigger = { + capital_province = { geographical_region = world_persian_empire } + } + localization_key = dog_type_tazi # Tazi (Afghan) + } + text = { + trigger = { + capital_province = { geographical_region = world_asia_east } + } + localization_key = dog_type_chow_chow # Chow Chow + } + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_asia_north_east + geographical_region = world_asia_sakhalin_hokkaido + geographical_region = world_asia_japan + } + } + } + localization_key = dog_type_hokkaido # Hokkaido + } + text = { + trigger = { + capital_province = { geographical_region = world_asia_korea } + } + localization_key = dog_type_jindo # Jindo + } + text = { + trigger = { + capital_province = { geographical_region = world_asia_philippines } + } + localization_key = dog_type_asong_gubat # Asong Gubat + } + text = { + trigger = { + capital_province = { geographical_region = world_asia_southeast_mainland } + } + localization_key = dog_type_telomian # Telomian + } + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_asia_malaysia + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia + } + } + } + localization_key = dog_type_kinta # Kinta + } + text = { + trigger = { + capital_province = { geographical_region = world_asia_china } + } + localization_key = dog_type_shar_pei # Shar Pei + } + text = { + trigger = { + capital_province = { geographical_region = world_asia_china } + } + localization_key = dog_type_tibetan_mastiff # Tibetan Mastiff + } + text = { + trigger = { + capital_province = { geographical_region = world_asia_japan } + } + localization_key = dog_type_shikoku # Shikoku + } + text = { + trigger = { + capital_province = { geographical_region = world_asia_japan } + } + localization_key = dog_type_akita # Akita + } + # India + text = { + trigger = { + capital_province = { geographical_region = world_india } + } + localization_key = dog_type_desi # Desi + } + # East + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_himalaya + geographical_region = world_steppe_tarim + geographical_region = world_steppe_east + } + } + } + localization_key = dog_type_lion_dog # Lion dog (Chow Chow / Shar Pei) + } + # Generic + text = { + trigger = { always = yes } + localization_key = dog_type_hound # Hound + } +} + +get_region_flower_type = { + type = province + random_valid = yes + + text = { + trigger = { + OR = { + geographical_region = world_india + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_africa_west + geographical_region = world_africa_east + geographical_region = world_asia_southeast + } + } + localization_key = flower_type_hibiscus # Hibiscus + } + text = { + trigger = { + OR = { + geographical_region = world_india + geographical_region = world_africa_west + geographical_region = world_africa_east + geographical_region = world_asia_china + geographical_region = world_asia_japan + } + } + localization_key = flower_type_gardenia # Gardenia + } + text = { + trigger = { + OR = { + geographical_region = world_steppe_east + geographical_region = world_steppe_tarim + geographical_region = world_himalaya + geographical_region = world_india + geographical_region = world_asia_southeast + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + } + } + localization_key = flower_type_lotus # Lotus + } + text = { + trigger = { + OR = { + geographical_region = world_steppe_east + geographical_region = world_steppe_tarim + geographical_region = world_himalaya + geographical_region = world_india + geographical_region = world_asia_china + geographical_region = world_asia_japan + } + } + localization_key = flower_type_chrysanthemum # Chrysanthemum + } + text = { + trigger = { + OR = { + geographical_region = world_india + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe_west + geographical_region = world_asia_japan + geographical_region = world_asia_china + geographical_region = world_asia_southeast + } + } + localization_key = flower_type_jasmine # Jasmine + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + geographical_region = world_africa + } + } + localization_key = flower_type_delphinium # Delphinium + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe_west + geographical_region = world_asia_china + geographical_region = world_asia_japan + } + } + localization_key = flower_type_violet # Violet/Pansy + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe_west + geographical_region = world_asia_china + geographical_region = world_asia_japan + } + } + localization_key = flower_type_peony # Peony + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + } + } + localization_key = flower_type_lavender # Lavender + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + geographical_region = world_india + geographical_region = world_asia_china + geographical_region = world_asia_japan + } + } + localization_key = flower_type_lily # Lily + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + } + } + localization_key = flower_type_geranium # Geranium + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + } + } + localization_key = flower_type_iris # Iris + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe_west + geographical_region = world_africa_north + geographical_region = world_asia_china + geographical_region = world_asia_japan + } + } + localization_key = flower_type_foxglove # Foxglove/Digitalis + } + text = { + trigger = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + } + } + localization_key = flower_type_carnation # Carnation/Dianthus + } + text = { + trigger = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + } + } + localization_key = flower_type_snapdragon # Snapdragon/Antirrhinum + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_africa_north + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_steppe + geographical_region = world_asia_china + geographical_region = world_asia_japan + } + } + localization_key = flower_type_narcissus # Narcissus/Daffodil + } + text = { + trigger = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_steppe + } + } + localization_key = flower_type_crocus # Crocus + } + text = { + trigger = { + OR = { + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_steppe_west + } + } + localization_key = flower_type_tulip # Tulip + } + text = { + trigger = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_steppe + geographical_region = world_asia_china + } + } + localization_key = flower_type_poppy # Poppy + } + # Asia + text = { + trigger = { geographical_region = world_asia_china } + localization_key = flower_type_camellia # Camellia + } + text = { + trigger = { geographical_region = world_asia_china } + localization_key = flower_type_chinese_primrose # Chinese Primrose + } + text = { + trigger = { geographical_region = world_asia_china } + localization_key = flower_type_plum_blossom # Plum Blossom + } + text = { + trigger = { geographical_region = world_asia_japan } + localization_key = flower_type_cherry_blossom # Cherry Blossom + } + text = { + trigger = { geographical_region = world_asia_japan } + localization_key = flower_type_japanese_iridaceae # Japanese Iridaceae + } + text = { + trigger = { geographical_region = world_asia_korea } + localization_key = flower_type_korean_bellflower # Korean Bellflower + } + text = { + trigger = { geographical_region = world_asia_korea } + localization_key = flower_type_korean_rhododendron # Korean Rhododendron + } + text = { + trigger = { geographical_region = world_asia_sakhalin_hokkaido } + localization_key = flower_type_hokkaido_alpine # Hokkaido Alpine + } + text = { + trigger = { geographical_region = world_asia_borneo } + localization_key = flower_type_tropical_rafflesia # Tropical Rafflesia + } + text = { + trigger = { + OR = { + geographical_region = world_asia_borneo + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia + } + } + localization_key = flower_type_nepenthes_pitcher # Nephentese Pitcher + } + text = { + trigger = { geographical_region = world_asia_philippines } + localization_key = flower_type_jade_vine # Jade Vine + } + text = { + trigger = { geographical_region = world_asia_philippines } + localization_key = flower_type_medinilla # Medinilla + } + text = { + trigger = { geographical_region = world_asia_malaysia } + localization_key = flower_type_tiger_orchid # Tiger Orchid + } + text = { + trigger = { geographical_region = world_asia_southeast_mainland } + localization_key = flower_type_telipogon # Telipogon + } + text = { + trigger = { geographical_region = world_asia_southeast_mainland } + localization_key = flower_type_bali_orchid # Bali Orchid + } + text = { + trigger = { geographical_region = world_asia_china } + localization_key = flower_type_weigela # Weigela + } + text = { + trigger = { always = yes } + localization_key = flower_type_rose # Rose + } + text = { + trigger = { always = yes } + localization_key = flower_type_orchid # Orchid + } + text = { + trigger = { always = yes } + localization_key = flower_type_aster # Aster/Daisy + } +} + +get_region_flower_type_plural = { + type = province + random_valid = yes + + text = { + trigger = { + OR = { + geographical_region = world_india + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_africa_west + geographical_region = world_africa_east + } + } + localization_key = flower_type_hibiscus_plural # Hibiscuses + } + text = { + trigger = { + OR = { + geographical_region = world_india + geographical_region = world_africa_west + geographical_region = world_africa_east + } + } + localization_key = flower_type_gardenia_plural # Gardenias + } + text = { + trigger = { + OR = { + geographical_region = world_steppe_east + geographical_region = world_steppe_tarim + geographical_region = world_himalaya + geographical_region = world_india + geographical_region = world_asia_southeast + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + } + } + localization_key = flower_type_lotus_plural # Lotuses + } + text = { + trigger = { + OR = { + geographical_region = world_steppe_east + geographical_region = world_steppe_tarim + geographical_region = world_himalaya + geographical_region = world_india + } + } + localization_key = flower_type_chrysanthemum_plural # Chrysanthemums + } + text = { + trigger = { + OR = { + geographical_region = world_india + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe_west + geographical_region = world_asia_japan + geographical_region = world_asia_china + geographical_region = world_asia_southeast + } + } + localization_key = flower_type_jasmine # Jasmine + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + geographical_region = world_africa + } + } + localization_key = flower_type_delphinium_plural # Delphiniums + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe_west + } + } + localization_key = flower_type_violet_plural # Violets/Pansies + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe_west + } + } + localization_key = flower_type_peony_plural # Peonies + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + } + } + localization_key = flower_type_lavender # Lavender + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + geographical_region = world_india + } + } + localization_key = flower_type_lily_plural # Lilies + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + } + } + localization_key = flower_type_geranium_plural # Geraniums + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe + } + } + localization_key = flower_type_iris_plural # Irises + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_asia_minor + geographical_region = world_steppe_west + geographical_region = world_africa_north + } + } + localization_key = flower_type_foxglove_plural # Foxgloves/Digitalises + } + text = { + trigger = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + } + } + localization_key = flower_type_carnation_plural # Carnations/Dianthuses + } + text = { + trigger = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + } + } + localization_key = flower_type_snapdragon_plural # Snapdragons/Antirrhinums + } + text = { + trigger = { + OR = { + geographical_region = world_europe + geographical_region = world_africa_north + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_steppe + } + } + localization_key = flower_type_narcissus_plural # Narcissuses/Daffodils + } + text = { + trigger = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_steppe + } + } + localization_key = flower_type_crocus_plural # Crocuses + } + text = { + trigger = { + OR = { + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_steppe_west + } + } + localization_key = flower_type_tulip_plural # Tulips + } + text = { + trigger = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa_north + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_steppe + geographical_region = world_asia_china + } + } + localization_key = flower_type_poppy_plural # Poppies + } + # Asia + text = { + trigger = { geographical_region = world_asia_china } + localization_key = flower_type_camellia_plural # Camellias + } + text = { + trigger = { geographical_region = world_asia_china } + localization_key = flower_type_chinese_primrose_plural # Chinese Primroses + } + text = { + trigger = { geographical_region = world_asia_china } + localization_key = flower_type_plum_blossom_plural # Plum Blossoms + } + text = { + trigger = { geographical_region = world_asia_japan } + localization_key = flower_type_cherry_blossom_plural # Cherry Blossoms + } + text = { + trigger = { geographical_region = world_asia_japan } + localization_key = flower_type_japanese_iridaceae # Japanese Iridaceae + } + text = { + trigger = { geographical_region = world_asia_korea } + localization_key = flower_type_korean_bellflower_plural # Korean Bellflowers + } + text = { + trigger = { geographical_region = world_asia_korea } + localization_key = flower_type_korean_rhododendron_plural # Korean Rhododendrons + } + text = { + trigger = { geographical_region = world_asia_sakhalin_hokkaido } + localization_key = flower_type_hokkaido_alpine_plural # Hokkaido Alpines + } + text = { + trigger = { geographical_region = world_asia_borneo } + localization_key = flower_type_tropical_rafflesia_plural # Tropical Rafflesias + } + text = { + trigger = { + OR = { + geographical_region = world_asia_borneo + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia + } + } + localization_key = flower_type_nepenthes_pitcher_plural # Nephentese Pitchers + } + text = { + trigger = { geographical_region = world_asia_philippines } + localization_key = flower_type_jade_vine_plural # Jade Vines + } + text = { + trigger = { geographical_region = world_asia_philippines } + localization_key = flower_type_medinilla_plural # Medinillas + } + text = { + trigger = { geographical_region = world_asia_malaysia } + localization_key = flower_type_tiger_orchid_plural # Tiger Orchids + } + text = { + trigger = { geographical_region = world_asia_southeast_mainland } + localization_key = flower_type_telipogon_plural # Telipogons + } + text = { + trigger = { geographical_region = world_asia_southeast_mainland } + localization_key = flower_type_bali_orchid_plural # Bali Orchids + } + text = { + trigger = { geographical_region = world_asia_china } + localization_key = flower_type_weigela_plural # Weigelas + } + text = { + trigger = { always = yes } + localization_key = flower_type_rose # Rose + } + text = { + trigger = { always = yes } + localization_key = flower_type_orchid # Orchid + } + text = { + trigger = { always = yes } + localization_key = flower_type_aster # Aster/Daisy + } + text = { + trigger = { always = yes } + localization_key = flower_type_rose_plural # Roses + } + text = { + trigger = { always = yes } + localization_key = flower_type_orchid_plural # Orchids + } + text = { + trigger = { always = yes } + localization_key = flower_type_aster_plural # Asters/Daisies + } +} + +get_carvable_surface = { + type = province + + text = { + trigger = { + is_likely_to_contain_trees_trigger = yes + } + localization_key = tree + } + text = { + fallback = yes + trigger = { + always = yes + } + localization_key = rock + } +} + +RegionalFerociousAnimal = { + type = character + random_valid = yes + + #Bear + text = { + trigger = { + trigger_if = { + limit = { exists = var:animal_type } + var:animal_type = flag:bear + } + trigger_else = { + location = { geographical_region = hunt_animal_bear_region } + } + } + localization_key = animal_type_bear + } + #Wolf + text = { + trigger = { + trigger_if = { + limit = { exists = var:animal_type } + var:animal_type = flag:wolf + } + trigger_else = { + location = { + NOR = { + geographical_region = world_africa_west + geographical_region = world_asia_southeast + } + } + } + } + localization_key = animal_type_wolf + } + # Hyena + text = { + trigger = { + trigger_if = { + limit = { exists = var:animal_type } + var:animal_type = flag:hyena + } + trigger_else = { + location = { + OR = { + geographical_region = world_africa + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_asia_china + geographical_region = world_asia_southeast_mainland + } + } + } + } + localization_key = animal_type_hyena + } + #Boar + text = { + trigger = { + trigger_if = { + limit = { exists = var:animal_type } + var:animal_type = flag:boar + } + trigger_else = { + location = { geographical_region = hunt_animal_boar_region } + } + } + localization_key = animal_type_boar + } + #Tiger + text = { + trigger = { + trigger_if = { + limit = { exists = var:animal_type } + var:animal_type = flag:tiger + } + trigger_else = { + location = { hunt_animal_tiger_trigger = yes } + } + } + localization_key = animal_type_tiger + } + #Leopard + text = { + trigger = { + trigger_if = { + limit = { exists = var:animal_type } + var:animal_type = flag:leopard + } + trigger_else = { + location = { hunt_animal_leopard_trigger = yes } + } + } + localization_key = animal_type_leopard + } + #Lion + text = { + trigger = { + trigger_if = { + limit = { exists = var:animal_type } + var:animal_type = flag:lion + } + trigger_else = { + location = { hunt_animal_lion_trigger = yes } + } + } + localization_key = animal_type_lion + } + #Gorilla + text = { + trigger = { + location = { geographical_region = world_africa_east } + } + localization_key = animal_type_gorilla + } + #Fallback - Shape + text = { + trigger = { always = no } + localization_key = animal_type_shape + fallback = yes + } +} + +RegionalOnlyFerociousAnimal = { + type = character + random_valid = yes + + #Bear + text = { + trigger = { + location = { geographical_region = hunt_animal_bear_region } + } + localization_key = animal_type_bear + } + #Wolf + text = { + trigger = { + NOT = { + location = { geographical_region = world_africa_west } + } + } + localization_key = animal_type_wolf + fallback = yes + } + # Hyena + text = { + trigger = { + location = { + OR = { + geographical_region = world_africa + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_asia_china + geographical_region = world_asia_southeast_mainland + } + } + } + localization_key = animal_type_hyena + } + #Boar + text = { + trigger = { + location = { geographical_region = hunt_animal_boar_region } + } + localization_key = animal_type_boar + } + #Tiger + text = { + trigger = { + location = { hunt_animal_tiger_trigger = yes } + } + localization_key = animal_type_tiger + } + #Leopard + text = { + trigger = { + location = { hunt_animal_leopard_trigger = yes } + } + localization_key = animal_type_leopard + } + #Lion + text = { + trigger = { + location = { hunt_animal_lion_trigger = yes } + } + localization_key = animal_type_lion + } + #Gorilla + text = { + trigger = { + location = { geographical_region = world_africa_east } + } + localization_key = animal_type_gorilla + } +} +RegionalOnlyFerociousAnimalPlural = { + parent = RegionalOnlyFerociousAnimal + suffix = "_plural" +} +#this is used with the select_local_farm_animal_effect effect +RegionalFarmAnimal = { + type = character + random_valid = yes + + #Goat + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:goat + } + trigger_else = { always = yes } + + } + localization_key = regional_farm_animal_goat + } + + #Chicken + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:chicken + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_chicken + } + + #Cow + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:cow + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_cow + } + + #Sheep + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:sheep + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_sheep + } + + #Pig + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:pig + } + trigger_else = { + location.faith = { + NOR = { + religion_tag = islam_religion + religion_tag = judaism_religion + } + } + } + } + localization_key = regional_farm_animal_pig + } + + #Yak + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:yak + } + trigger_else = { + location = { + OR = { + geographical_region = world_tibet + geographical_region = ghw_region_mongolia + geographical_region = world_steppe + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + + } + localization_key = regional_farm_animal_yak + } + + #Camel + text = { + trigger = { + #No need to disturb the original implementation + trigger_if = { + limit = { + NOT = { exists = var:local_farm_animal } + } + location = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_north + geographical_region = world_asia_china # Bactrian Camel + } + } + } + trigger_else = { always = no } + + } + localization_key = regional_farm_animal_camel + } + + #Horse + text = { + trigger = { + #No need to disturb the original implementation + trigger_if = { + limit = { + NOT = { exists = var:local_farm_animal } + } + always = yes + } + trigger_else = { + always = no + } + + } + localization_key = regional_farm_animal_horse + } +} + +RegionalFarmAnimalPlural = { + type = character + random_valid = yes + + #Goat + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:goat + } + trigger_else = { always = yes } + + } + localization_key = regional_farm_animal_goat_plural + } + + #Chicken + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:chicken + } + trigger_else = { always = no } # ... "herd of chickens" ain't a thing. + } + localization_key = regional_farm_animal_chicken_plural + } + + #Cow + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:cow + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_cow_plural + } + + #Sheep + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:sheep + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_sheep_plural + } + + #Pig + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:pig + } + trigger_else = { + location.faith = { + NOR = { + religion_tag = islam_religion + religion_tag = judaism_religion + } + } + } + } + localization_key = regional_farm_animal_pig_plural + } + + #Yaks + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:yak + } + trigger_else = { + location = { + OR = { + geographical_region = world_tibet + geographical_region = ghw_region_mongolia + geographical_region = world_steppe + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + + } + localization_key = regional_farm_animal_yak_plural + } +} + +SoundingRegionalFarmAnimal = { + type = character + random_valid = yes + + #Goat + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:goat + } + trigger_else = { always = yes } + + } + localization_key = regional_farm_animal_bleating_goat + } + + #Chicken + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:chicken + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_clucking_chicken + } + + #Cow + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:cow + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_bellowing_cow + } + + #Sheep + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:sheep + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_bleating_sheep + } + + #Pig + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:pig + } + trigger_else = { + location.faith = { + NOR = { + religion_tag = islam_religion + religion_tag = judaism_religion + } + } + } + } + localization_key = regional_farm_animal_snorting_pig + } + + #Yak + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:yak + } + trigger_else = { + location = { + OR = { + geographical_region = world_tibet + geographical_region = ghw_region_mongolia + geographical_region = world_steppe + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + + } + localization_key = regional_farm_animal_grunting_yak + } + + #Camel + text = { + trigger = { + #No need to disturb the original implementation + trigger_if = { + limit = { + NOT = { exists = var:local_farm_animal } + } + location = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_north + geographical_region = world_asia_china # Bactrian Camel + } + } + } + trigger_else = { always = no } + + } + localization_key = regional_farm_animal_grunting_camel + } + + #Horse + text = { + trigger = { + #No need to disturb the original implementation + trigger_if = { + limit = { + NOT = { exists = var:local_farm_animal } + } + always = yes + } + trigger_else = { + always = no + } + + } + localization_key = regional_farm_animal_whinnying_horse + } +} + +RegionalArtilleryType = { + type = character + + text = { + trigger = { culture = { has_innovation = innovation_gunpowder } } + localization_key = regional_artillery_bombard + } + text = { + trigger = { culture = { has_innovation = innovation_trebuchet } } + localization_key = regional_artillery_trebuchet + } + text = { + trigger = { culture = { has_innovation = innovation_mangonel } } + localization_key = regional_artillery_mangonel + } + text = { + trigger = { always = yes } + localization_key = regional_artillery_onager + } +} + +RegionalArtilleryPlural = { + type = character + + parent = RegionalArtilleryType + suffix = "_plural" +} + +RegionalShipType = { + type = character + random_valid = yes + + text = { + trigger = { culture = { has_cultural_pillar = heritage_north_germanic } } + localization_key = regional_ship_knarr + } + text = { + trigger = { artifact_use_northern_unit_visuals_trigger = yes } + localization_key = regional_ship_longship + } + text = { + trigger = { culture = { has_building_gfx = mediterranean_building_gfx } } + localization_key = regional_ship_galley + } + text = { + trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + } + } + } + localization_key = regional_ship_dromon + } + text = { + trigger = { culture = { has_unit_gfx = western_unit_gfx } } + localization_key = regional_ship_cog + } + text = { + trigger = { always = yes } + localization_key = regional_ship_fallback + } +} + +RegionalShipPlural = { + type = character + + parent = RegionalShipType + suffix = "_plural" +} + +RegionalPoxAnimal = { + type = character + random_valid = yes + + #Goat + text = { + localization_key = regional_farm_animal_goat + } + + #Chicken + text = { + localization_key = regional_farm_animal_chicken + } + + #Cow + text = { + localization_key = regional_farm_animal_cow + } + + #Sheep + text = { + localization_key = regional_farm_animal_sheep + } + + #Pig + text = { + trigger = { + faith = { + NOR = { + religion_tag = islam_religion + religion_tag = judaism_religion + } + } + } + localization_key = regional_farm_animal_pig + } + + #Yak + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_tibet + geographical_region = ghw_region_mongolia + geographical_region = world_steppe + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + localization_key = regional_farm_animal_yak + } + + #Monkey + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_africa + geographical_region = world_burma + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + localization_key = animal_monkey + } +} + +WritingInstrument = { + type = character + random_valid = yes + + text = { # Quills, European + trigger = { + trigger_if = { + limit = { + exists = capital_province + } + capital_province = { + geographical_region = world_europe + } + } + trigger_else_if = { + limit = { + exists = liege_or_court_owner.capital_province + } + liege_or_court_owner.capital_province = { + geographical_region = world_europe + } + } + trigger_else_if = { + limit = { exists = location } + location = { geographical_region = world_europe } + } + trigger_else = { + always = no + } + } + localization_key = quill + } + + text = { # Pens, non-European. Made from bamboo, reeds, whatever. Just a bit of wood sharpened to a point and dipped in ink. + localization_key = pen + fallback = yes + } +} + +GetKnightErrantAnimal = { + type = character + + text = { + trigger = { + location = { + geographical_region = world_europe + } + } + localization_key = GetKnightErrantAnimal_swan + } + text = { + trigger = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_burma + geographical_region = ghw_region_caucasus + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + localization_key = GetKnightErrantAnimal_tiger + } + text = { + trigger = { + location = { + geographical_region = world_africa + } + } + localization_key = GetKnightErrantAnimal_lion + } + text = { # Basically everywhere + localization_key = GetKnightErrantAnimal_hart + fallback = yes + } +} + +RegionalWeaponMetal = { + type = character + + text = { + trigger = { + location = { + OR = { + geographical_region = world_india_deccan + geographical_region = world_india_bengal + geographical_region = world_india_rajastan + geographical_region = world_burma + geographical_region = world_asia_thailand + } + } + } + localization_key = metal_wootz_steel + } + text = { + trigger = { + location = { + OR = { + geographical_region = world_middle_east + geographical_region = world_asia_minor + geographical_region = world_africa_north_east + } + } + } + localization_key = metal_damascus_steel + } + text = { + trigger = { + location = { + OR = { + geographical_region = world_europe_east + geographical_region = world_steppe_tarim + geographical_region = world_steppe_west + geographical_region = world_steppe_central + geographical_region = world_steppe_east + geographical_region = world_siberia + geographical_region = world_asia_north_east + geographical_region = world_asia_sakhalin_hokkaido + } + } + } + localization_key = metal_bulat_steel + } + text = { + trigger = { + location = { + OR = { + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + localization_key = metal_bintie_steel + } + text = { + trigger = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + localization_key = metal_steel + } + + text = { + localization_key = metal_iron + fallback = yes + } +} + +RegionalFabric = { + type = character + random_valid = yes + + text = { + trigger = { + location = { + OR = { + geographical_region = world_europe_west + geographical_region = world_europe_north + geographical_region = world_europe_south + geographical_region = world_europe_east + geographical_region = world_asia_china + } + } + } + localization_key = cloth_linen + } + text = { + trigger = { + location = { + OR = { + geographical_region = world_africa_north_east + geographical_region = world_africa_east + geographical_region = world_asia_china + geographical_region = world_asia_philippines + geographical_region = world_asia_borneo + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia + } + } + } + localization_key = cloth_cotton + } + text = { + trigger = { + location = { + NOR = { + geographical_region = world_africa_west + geographical_region = world_africa_east + geographical_region = world_asia + } + } + } + localization_key = cloth_silk + } + text = { + trigger = { + location = { + NOR = { + geographical_region = world_africa_west + geographical_region = world_africa_east + geographical_region = world_asia_east + } + } + } + localization_key = cloth_satin + } + text = { + trigger = { + location = { + NOR = { + geographical_region = world_africa_west + geographical_region = world_africa_east + } + } + } + localization_key = cloth_velvet + } + text = { + trigger = { + location = { + NOR = { + geographical_region = world_africa_west + geographical_region = world_africa_east + geographical_region = world_asia_china + } + } + } + localization_key = cloth_samite + } + text = { + trigger = { + location = { + OR = { + geographical_region = world_europe_west + geographical_region = world_europe_north + geographical_region = world_europe_south + geographical_region = world_europe_east + } + } + NOT = { + religion = religion:judaism_religion + } + } + localization_key = cloth_fustian + } + text = { + trigger = { + location = { + geographical_region = world_europe_west_britannia + } + current_date >= 1200.1.1 + } + localization_key = cloth_worsted_wool + } + + text = { + localization_key = cloth_wool + fallback = yes + } +} + +TerrainStruggleLoc = { + type = character + + text = { + trigger = { + current_season_trigger = { + SEASON = winter + } + } + localization_key = TerrainStruggleWinter + } + text = { + trigger = { + current_season_trigger = { + SEASON = rainy_season + } + } + localization_key = TerrainStruggleRain + } + text = { + trigger = { + current_season_trigger = { + SEASON = summer + } + } + localization_key = TerrainStruggleSun + } +} + +TerrainInspirationLoc = { + type = province + + text = { + trigger = { + terrain = mountains + } + localization_key = TerrainInspirationMountains + } + text = { + trigger = { + terrain = hills + } + localization_key = TerrainInspirationHills + } + text = { + trigger = { + terrain = jungle + } + localization_key = TerrainInspirationJungle + } + text = { + trigger = { + terrain = taiga + } + localization_key = TerrainInspirationTaiga + } + text = { + trigger = { + terrain = wetlands + } + localization_key = TerrainInspirationWetlands + } + text = { + trigger = { + terrain = floodplains + } + localization_key = TerrainInspirationFloodplains + } + text = { + trigger = { + terrain = desert + } + localization_key = TerrainInspirationDesert + } + text = { + trigger = { + terrain = forest + } + localization_key = TerrainInspirationForest + } + text = { + trigger = { + terrain = farmlands + } + localization_key = TerrainInspirationFarmlands + } + text = { + trigger = { + terrain = steppe + } + localization_key = TerrainInspirationSteppe + } + text = { + trigger = { + terrain = drylands + } + localization_key = TerrainInspirationdrylands + } +} + +GetProvinceTricksterSpirit = { + type = province + + text = { + trigger = { + geographical_region = world_asia_sulawesi_maluku + } + localization_key = trickster_spirit_maluku + } + + text = { + trigger = { + geographical_region = world_asia_borneo + } + localization_key = trickster_spirit_borneo + } + + text = { + trigger = { + geographical_region = world_asia_philippines + } + localization_key = trickster_spirit_philippines + } + + text = { + trigger = { + geographical_region = world_asia_indonesia + } + localization_key = trickster_spirit_indonesia + } + + text = { + trigger = { + geographical_region = world_asia_malaysia + } + localization_key = trickster_spirit_malaysia + } + + text = { + trigger = { + geographical_region = world_asia_thailand + culture = { has_cultural_pillar = heritage_tai } + } + localization_key = trickster_spirit_thailand + } + + text = { + trigger = { + geographical_region = world_asia_thailand + NOT = { culture = { has_cultural_pillar = heritage_tai } } + } + localization_key = trickster_spirit_indochina + } + + text = { + trigger = { + geographical_region = world_asia_sakhalin_hokkaido + } + localization_key = trickster_spirit_sakhalin_hokkaido + } + + text = { + trigger = { + geographical_region = world_asia_japan + } + localization_key = trickster_spirit_japan + } + + text = { + trigger = { + geographical_region = world_asia_korea + } + localization_key = trickster_spirit_korea + } + + text = { + trigger = { + geographical_region = world_tibet + } + localization_key = trickster_spirit_tibet + } + + text = { + trigger = { + geographical_region = world_asia_china + } + localization_key = trickster_spirit_china + } + + text = { + trigger = { + geographical_region = world_siberia + } + localization_key = trickster_spirit_siberia + } + + text = { + trigger = { + geographical_region = world_steppe + } + localization_key = trickster_spirit_steppe + } + + text = { + trigger = { + geographical_region = world_africa_east + } + localization_key = trickster_spirit_africa_east + } + + text = { + trigger = { + geographical_region = world_africa_west + } + localization_key = trickster_spirit_africa_west + } + + text = { + trigger = { + geographical_region = world_africa_north + } + localization_key = trickster_spirit_africa_north + } + + text = { + trigger = { + geographical_region = world_india + } + localization_key = trickster_spirit_india + } + + text = { + trigger = { + geographical_region = world_middle_east + } + localization_key = trickster_spirit_middle_east + } + + text = { + trigger = { + geographical_region = world_europe_south_italy + } + localization_key = trickster_spirit_east + } + + text = { + trigger = { + OR = { + geographical_region = world_europe_south_east + geographical_region = world_asia_minor + } + } + localization_key = trickster_spirit_balkans + } + + text = { + trigger = { + geographical_region = world_europe_east + } + localization_key = trickster_spirit_east + } + + text = { + trigger = { + geographical_region = world_europe_north + } + localization_key = trickster_spirit_north + } + + text = { + trigger = { + geographical_region = world_europe_west_iberia + } + localization_key = trickster_spirit_iberia + } + + text = { + trigger = { + geographical_region = custom_netherlands + } + localization_key = trickster_spirit_netherlands + } + + text = { + trigger = { + geographical_region = world_europe_west_francia + } + localization_key = trickster_spirit_francia + } + + text = { + trigger = { + geographical_region = world_europe_west_germania + } + localization_key = trickster_spirit_germania + } + + text = { + trigger = { + geographical_region = world_europe_west_britannia + } + localization_key = trickster_spirit_britannia + } + + text = { + fallback = yes + localization_key = trickster_spirit_default + } +} + +#This is used only in the peasant uprisings, make your own custom loc if you want it in events +RegionalPeasantHeadgear = { + type = character + + text = { + trigger = { + culture = { + has_clothing_gfx = western_clothing_gfx + } + } + localization_key = peasant_headgear_coif + } + + text = { + trigger = { + culture = { + has_clothing_gfx = french_clothing_gfx + } + } + localization_key = peasant_headgear_chaperon + } + + text = { + trigger = { + culture = { + OR = { + has_clothing_gfx = mongol_clothing_gfx + has_clothing_gfx = northern_clothing_gfx + has_clothing_gfx = sami_clothing_gfx + has_clothing_gfx = ugro_permian_clothing_gfx + } + } + } + localization_key = peasant_headgear_fur + } + + text = { + trigger = { + culture = { + has_clothing_gfx = chinese_clothing_gfx #historical reasons, see Red and Yellow Turban uprisings + } + } + localization_key = peasant_headgear_chinese + } + + text = { + trigger = { + culture = { + OR = { + has_clothing_gfx = mena_clothing_gfx + has_clothing_gfx = dde_abbasid_clothing_gfx + has_clothing_gfx = iranian_clothing_gfx + has_clothing_gfx = iberian_muslim_clothing_gfx + } + } + } + localization_key = peasant_headgear_turban + } + + text = { + trigger = { + culture = { + has_clothing_gfx = japanese_clothing_gfx + } + } + localization_key = peasant_headgear_kasa + } + + text = { + trigger = { + culture = { + has_clothing_gfx = west_slavic_clothing_gfx + } + } + localization_key = peasant_headgear_hood + } + + text = { + trigger = { + culture = { + OR = { + has_clothing_gfx = turkic_clothing_gfx + has_clothing_gfx = east_slavic_clothing_gfx + } + } + } + localization_key = peasant_headgear_kalpak + } + + text = { + trigger = { + culture = { + OR = { + has_clothing_gfx = southeast_asian_clothing_gfx + has_clothing_gfx = malay_clothing_gfx + has_clothing_gfx = korean_clothing_gfx + } + } + } + localization_key = peasant_headgear_hat + } + + text = { + trigger = { + culture = { + OR = { + has_clothing_gfx = dde_hre_clothing_gfx + has_clothing_gfx = byzantine_clothing_gfx + } + } + } + localization_key = peasant_headgear_scarf + } + + text = { + localization_key = peasant_headgear_cap + } +} + +RegionalPeasantHeadgearPlural = { + type = character + + parent = RegionalPeasantHeadgear + suffix = "_plural" +} diff --git a/N3OW/common/customizable_localization/00_ruler_transition_loc.txt b/N3OW/common/customizable_localization/00_ruler_transition_loc.txt new file mode 100644 index 00000000..9cda6e91 --- /dev/null +++ b/N3OW/common/customizable_localization/00_ruler_transition_loc.txt @@ -0,0 +1,2149 @@ +## INTRO ## +# Character has given the ghost (Default) +# Character has abandoned his mortal coil (Default) +# Character has passed on (Default) +# Character has left this world (Default) +# Character's spirit has flown to GetHeaven (virtuous/pious) +# Character's soul has finally been cast to GetHell (wicked) +# Character has finally found peace (incapable/wounded) +# Character has bravely fallen in battle (death_battle reason) +# Character rests in Christ (Christianity) +# Character rests in the arms of the Lord (Christianity) +# Character has steadfastly fallen asleep in the Lord (Christianity) +# Character has joined the feast in Valhalla (Norse) +# Character has sailed for river Styx (Hellenic) +# Character has transcended his material form (Eastern) +# Character has crossed the door to the Spirit world (African/Finno-Ugric/Tribal) + +DeathMessageIntro = { + type = character + + random_valid = yes + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_DEFAULT_1 + trigger = { + always = yes + } + weight_multiplier = { + base = 0.1 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_DEFAULT_2 + trigger = { + always = yes + } + weight_multiplier = { + base = 0.1 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_DEFAULT_3 + trigger = { + always = yes + } + weight_multiplier = { + base = 0.1 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_DEFAULT_4 + trigger = { + always = yes + } + weight_multiplier = { + base = 0.1 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_PIOUS + trigger = { + num_sinful_traits = 0 + num_virtuous_traits >= 2 + has_personality_benevolent_trigger = yes + NOT = { + has_trait = excommunicated + } + } + weight_multiplier = { + base = 0.5 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_WICKED + trigger = { + OR = { + AND = { + num_virtuous_traits = 0 + has_personality_malicious_trigger = yes + num_sinful_traits >= 2 + } + has_trait = excommunicated + AND = { + has_trait = kinslayer + NOT = { faith = { has_doctrine = doctrine_kinslaying_accepted } } + } + AND = { + has_trait = deviant + NOT = { faith = { has_doctrine_parameter = deviancy_accepted } } + } + AND = { + has_trait = cannibal + NOT = { + faith = { has_doctrine_parameter = cannibalism_legal } + } + } + AND = { + has_trait = sodomite + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + AND = { + has_trait = incestuous + NOT = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } } + } + AND = { + OR = { + has_trait = adulterer + has_trait = fornicator + } + is_female = no + NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } } + } + AND = { + OR = { + has_trait = adulterer + has_trait = fornicator + } + is_female = yes + NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } } + } + has_trait = murderer + AND = { + has_trait = witch + NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } } + } + } + } + weight_multiplier = { + base = 0.5 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_WOUNDED + trigger = { + OR = { + has_trait = incapable + has_trait = maimed + has_treatable_disease_trigger = yes + has_wounds_trigger = yes + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_CHRISTIANITY_1 + trigger = { + faith.religion = faith:catholic.religion + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_CHRISTIANITY_2 + trigger = { + faith.religion = faith:catholic.religion + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_ISLAM_1 + trigger = { + faith.religion = faith:ashari.religion + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_ISLAM_2 + trigger = { + faith.religion = faith:ashari.religion + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_ISLAM_3 + trigger = { + faith.religion = faith:ashari.religion + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_NORSE_1 + trigger = { + faith.religion = faith:norse_pagan.religion + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_HELLENIC_1 + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_EASTERN_1 + trigger = { + OR = { + faith.religion = faith:vaishnavism.religion + faith.religion = faith:theravada.religion + faith.religion = faith:digambara.religion + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_TRIBAL_1 + trigger = { + OR = { + faith.religion = faith:finnish_pagan.religion + faith.religion = faith:west_african_bori_pagan.religion + government_has_flag = government_is_tribal + } + } + } +} + +DeathMessageReason = { + type = character + + random_valid = yes + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_REASON_1 + trigger = { + always = yes + } + } +} +## OUTRO ## + +# AGE +# Very Young +# Very Old +# Immortal +# Pregnant + +# BODY STATE +# Leper +# Disfigured +# Maimed +# Hunchback +# Giant +# Dwarf +# Strong +# Pretty (young) +# Pretty (old) +# Weak +# Ugly +# Incapable + +# MENTAL STATE +# Lunatic +# Possessed (pos) +# Possessed (neg) +# Depressed +# Genius +# Dumb +# Infirm + +# SCANDALS +# Excommunicated +# Kinslayer +# Deviant +# Cannibal +# Sodomite +# Incestous +# Adulterer +# Fornicator +# Murderer +# Witch + +# ACCOMPLISHMENTS +# Saoshyant +# Restorer of Rome +# Crusader/Crusader King + +# LIFESTYLES +# lifestyle_reveler +# lifestyle_blademaster +# lifestyle_hunter +# administrator +# schemer +# seducer +# scholar +# torturer +# family_first +# lifestyle_mystic +# lifestyle_physician +# lifestyle_gallant +# lifestyle_herbalist + +DeathMessageOutro = { + type = character + + random_valid = yes + # AGE + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_AGE_CHILD + trigger = { + age < 14 + } + weight_multiplier = { + base = 0.5 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_AGE_OLD + trigger = { + age > 50 + age < 100 + } + weight_multiplier = { + base = 0.25 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_AGE_IMMORTAL + trigger = { + age > 100 + } + weight_multiplier = { + base = 0.5 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_AGE_PREGNANT + trigger = { + has_trait = pregnant + } + weight_multiplier = { + base = 0.5 + } + } + # BODY STATE + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_LEPER + trigger = { + has_trait = leper + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_DISFIGURED + trigger = { + has_trait = disfigured + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_MANGLED + trigger = { + has_trait = maimed + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_HUNCHBACK + trigger = { + has_trait = hunchbacked + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_GIANT + trigger = { + has_trait = giant + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_DWARF + trigger = { + has_trait = dwarf + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_STRONG + trigger = { + has_trait = physique_good + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_PRETTY_YOUNG + trigger = { + has_trait = beauty_good + age < 35 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_PRETTY_OLD + trigger = { + has_trait = beauty_good + age >= 35 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_WEAK + trigger = { + has_trait = physique_bad + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_UGLY + trigger = { + has_trait = beauty_bad + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_INCAPABLE + trigger = { + has_trait = incapable + } + } + + # MENTAL STATE + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_LUNATIC + trigger = { + has_trait = lunatic + } + weight_multiplier = { + base = 3 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_POSSESSED_POSITIVE + trigger = { + has_trait = possessed + faith = { has_doctrine = tenet_adorcism } + } + weight_multiplier = { + base = 3 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_POSSESSED_NEGATIVE + trigger = { + has_trait = possessed + NOT = { faith = { has_doctrine = tenet_adorcism } } + } + weight_multiplier = { + base = 3 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_DEPRESSED + trigger = { + has_trait = depressed + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_GENIUS + trigger = { + has_trait = intellect_good + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_DUMB + trigger = { + has_trait = intellect_bad + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_INFIRM + trigger = { + has_trait = infirm + } + weight_multiplier = { + base = 2 + } + } + # SCANDALS + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_EXCOMMUNICATED + trigger = { + has_trait = excommunicated + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_KINSLAYER + trigger = { + has_trait = kinslayer + NOT = { faith = { has_doctrine = doctrine_kinslaying_accepted } } + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_DEVIANT + trigger = { + has_trait = deviant + NOT = { faith = { has_doctrine_parameter = deviancy_accepted } } + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_CANNIBAL + trigger = { + has_trait = cannibal + NOT = { + faith = { has_doctrine_parameter = cannibalism_legal } + } + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_SODOMITE + trigger = { + has_trait = sodomite + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_INCESTUOUS + trigger = { + has_trait = incestuous + NOT = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } } + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_ADULTERER + trigger = { + has_trait = adulterer + OR = { + AND = { + is_female = no + NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } } + } + AND = { + is_female = yes + NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } } + } + } + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_FORNICATOR + trigger = { + has_trait = fornicator + OR = { + AND = { + is_female = no + NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } } + } + AND = { + is_female = yes + NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } } + } + } + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_MURDERER + trigger = { + has_trait = murderer + } + weight_multiplier = { + base = 2 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_WITCH + trigger = { + has_trait = witch + NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } } + } + weight_multiplier = { + base = 2 + } + } + # ACCOMPLISHMENTS + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_ACCOMPLISHMENT_SAOSHYANT + trigger = { + has_trait = saoshyant + } + weight_multiplier = { + base = 100 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_ACCOMPLISHMENT_RESTORER_ROME + trigger = { + has_trait = augustus + is_roman_emperor_excluding_byzantium_trigger = yes + has_character_flag = flag_restorer_of_rome #used for Eulogy. + } + weight_multiplier = { + base = 100 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_ACCOMPLISHMENT_CRUSADER + trigger = { + OR = { + has_trait = faith_warrior + has_trait = crusader_king + } + } + weight_multiplier = { + base = 100 + } + } + # LIFESTYLES + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_DIPLOMAT + trigger = { + has_diplomacy_lifestyle_trait_trigger = yes + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_REVELER + trigger = { + has_trait = lifestyle_reveler + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_BLADEMASTER + trigger = { + has_trait = lifestyle_blademaster + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_HUNTER + trigger = { + has_trait = lifestyle_hunter + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_GENERAL + trigger = { + has_martial_lifestyle_trait_trigger = yes + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_ADMINISTRATOR + trigger = { + has_stewardship_lifestyle_trait_trigger = yes + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_SCHEMER + trigger = { + has_intrigue_lifestyle_trait_trigger = yes + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_SEDUCER + trigger = { + has_trait = seducer + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_SCHOLAR + trigger = { + has_learning_lifestyle_trait_trigger = yes + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_TORTURER + trigger = { + has_trait = torturer + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_FAMILY_FIRST + trigger = { + has_trait = family_first + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_MYSTIC + trigger = { + has_trait = lifestyle_mystic + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_PHYSICIAN + trigger = { + has_trait = lifestyle_physician + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_GALLANT + trigger = { + has_trait = gallant + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_HERBALIST + trigger = { + has_trait = lifestyle_herbalist + } + } + #PERSONALITY + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_MALICIOUS + trigger = { + has_personality_malicious_trigger = yes + } + weight_multiplier = { + base = 0.1 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_BENEVOLENT + trigger = { + has_personality_benevolent_trigger = yes + } + weight_multiplier = { + base = 0.1 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_DOMINANT + trigger = { + has_personality_dominant_trigger = yes + } + weight_multiplier = { + base = 0.1 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_SUBMISSIVE + trigger = { + has_personality_submissive_trigger = yes + } + weight_multiplier = { + base = 0.1 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_APATHETIC + trigger = { + has_personality_submissive_trigger = no + has_personality_dominant_trigger = no + has_personality_benevolent_trigger = no + has_personality_malicious_trigger = no + } + weight_multiplier = { + base = 0.001 + } + } + #SINS/VIRTUES + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_LUSTFUL + trigger = { + has_trait = lustful + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_GLUTTONOUS + trigger = { + has_trait = gluttonous + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_GREEDY + trigger = { + has_trait = greedy + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_LAZY + trigger = { + has_trait = lazy + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_FICKLE + trigger = { + has_trait = fickle + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_WRATHFUL + trigger = { + has_trait = wrathful + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_ARROGANT + trigger = { + has_trait = arrogant + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_CHASTE + trigger = { + has_trait = chaste + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_TEMPERATE + trigger = { + has_trait = temperate + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_GENEROUS + trigger = { + has_trait = generous + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_DILIGENT + trigger = { + has_trait = diligent + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_COMPASSIONATE + trigger = { + has_trait = compassionate + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_PATIENT + trigger = { + has_trait = patient + } + weight_multiplier = { + base = 0.01 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_HUMBLE + trigger = { + has_trait = humble + } + weight_multiplier = { + base = 0.01 + } + } +} + + +# Callous + NOT Gregarious +# Vengeful +# Depressed +# Giant +# Blind and weak/maimed +# Excommunicated +# Berserker +# Cannibal +# Other crime (rumored to have unsavory habits, bad reputation) +# Heir is a Witch/Mystic/Herbalist + +HeirMessageInterface = { + type = character + + random_valid = yes + ############# + # Base # + ############# + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_UNDERAGE + trigger = { + is_adult = no + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_USELESS + trigger = { + NOR = { + diplomacy >= 5 + stewardship >= 5 + intrigue >= 5 + learning >= 5 + martial >= 5 + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_DREAD + trigger = { + dread >= medium_dread + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_GENDER + trigger = { + OR = { + AND = { + is_female = yes + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + } + AND = { + is_female = no + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + } + } + } + } + ############# + # Education # + ############# + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_MILITARY + trigger = { + NOT = { + has_trait = craven + } + martial >= 12 + has_trait = education_martial + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_LEARNING + trigger = { + NOT = { + has_trait = lazy + } + learning >= 12 + has_trait = education_learning + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_STEWARDSHIP + trigger = { + NOT = { + has_trait = gluttonous + } + stewardship >= 12 + has_trait = education_stewardship + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_INTRIGUE + trigger = { + NOT = { + has_trait = honest + } + intrigue >= 12 + has_trait = education_intrigue + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_DIPLOMACY + trigger = { + NOT = { + has_trait = deceitful + } + diplomacy >= 12 + has_trait = education_diplomacy + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_STRONG_AND_SMART + trigger = { + OR = { + has_trait = physique_good + has_trait = strong + } + OR = { + has_trait = intellect_good + has_trait = shrewd + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_WEAK_AND_DUMB + trigger = { + OR = { + has_trait = physique_bad + has_trait = weak + } + OR = { + has_trait = intellect_bad + has_trait = dull + } + } + } + ############# + # Lifestyle # + ############# + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_REVELER + trigger = { + is_adult = yes + has_trait = lifestyle_reveler + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ADMINISTRATOR + trigger = { + is_adult = yes + has_stewardship_lifestyle_trait_trigger = yes + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_SCHOLAR + trigger = { + is_adult = yes + has_learning_lifestyle_trait_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_VARANGIAN + trigger = { + is_adult = yes + has_trait = varangian + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_LUNATIC + trigger = { + has_trait = lunatic + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_POSSESSED_BAD + trigger = { + has_trait = possessed + NOT = { faith = { has_doctrine = tenet_adorcism } } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_POSSESSED_GOOD + trigger = { + has_trait = possessed + faith = { has_doctrine = tenet_adorcism } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_FAIR + trigger = { + is_adult = yes + has_trait = beauty_good + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ADVENTURER + trigger = { + is_adult = yes + has_trait = adventurer + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_UGLY_DECEITFUL + trigger = { + is_adult = yes + has_trait = beauty_bad + has_trait = deceitful + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GLUTTON_GREEDY + trigger = { + is_adult = yes + has_trait = gluttonous + has_trait = greedy + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CYNICAL_JUST + trigger = { + is_adult = yes + has_trait = cynical + has_trait = just + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CONTENT_ARBITRARY + trigger = { + is_adult = yes + has_trait = content + has_trait = arbitrary + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRAVEN_MILITARY_ED + trigger = { + is_adult = yes + has_trait = craven + has_trait = education_martial + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_SHY_CONTENT + trigger = { + is_adult = yes + has_trait = shy + has_trait = content + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ZEALOUS_PARANOID + trigger = { + is_adult = yes + has_trait = zealous + has_trait = paranoid + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ZEALOUS_GENEROUS + trigger = { + is_adult = yes + has_trait = zealous + has_trait = generous + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ARROGANT_BRAVE + trigger = { + is_adult = yes + has_trait = arrogant + has_trait = brave + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CYNICAL_CRUEL + trigger = { + is_adult = yes + has_trait = cynical + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_HUMBLE_STUBBORN + trigger = { + is_adult = yes + has_trait = humble + has_trait = stubborn + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_DECEITFUL_CALLOUS + trigger = { + is_adult = yes + has_trait = deceitful + has_trait = callous + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PATIENT_TRUSTING + trigger = { + is_adult = yes + has_trait = patient + has_trait = trusting + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PARANOID_STRESSED + trigger = { + is_adult = yes + has_trait = paranoid + stress >= medium_stress + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_STUBBORN_COMPASSIONATE + trigger = { + is_adult = yes + has_trait = stubborn + has_trait = compassionate + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_STRONG_BRAVE + trigger = { + is_adult = yes + OR = { + has_trait = strong + has_trait = giant + } + OR = { + has_trait = brave + has_trait = berserker + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_TEMPERATE_LUSTFUL + trigger = { + is_adult = yes + has_trait = temperate + has_trait = lustful + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GENEROUS_JUST + trigger = { + is_adult = yes + has_trait = generous + has_trait = just + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_DILIGENT_GREEDY + trigger = { + is_adult = yes + has_trait = diligent + has_trait = greedy + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRAVEN_HONEST + trigger = { + is_adult = yes + has_trait = craven + has_trait = honest + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_SHY_TRUSTING + trigger = { + is_adult = yes + has_trait = shy + has_trait = trusting + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GREGARIOUS_HONEST + trigger = { + is_adult = yes + has_trait = gregarious + has_trait = honest + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CYNICAL_ARBITRARY + trigger = { + is_adult = yes + has_trait = cynical + OR = { + has_trait = arbitrary + has_trait = fickle + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRUEL_WRATHFUL + trigger = { + is_adult = yes + OR = { + AND = { + has_trait = callous + has_trait = wrathful + } + AND = { + has_trait = callous + has_trait = vengeful + } + has_trait = sadistic + has_trait = torturer + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_WRATHFUL_ZEALOUS + trigger = { + is_adult = yes + AND = { + has_trait = vengeful + has_trait = wrathful + } + has_trait = zealous + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PARANOID_DECEITFUL + trigger = { + is_adult = yes + has_trait = paranoid + has_trait = deceitful + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CALLOUS_LONER + trigger = { + is_adult = yes + has_trait = callous + NOT = { has_trait = gregarious } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_VENGEFUL + trigger = { + is_adult = yes + has_trait = vengeful + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_BLIND_WEAK + trigger = { + is_adult = yes + has_trait = blind + OR = { + has_trait = weak + has_trait = physique_bad + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_EXCOMMUNICATED + trigger = { + is_adult = yes + has_trait = excommunicated + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_BERSERKER + trigger = { + is_adult = yes + has_trait = berserker + NOT = { has_trait = craven } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CANNIBAL + trigger = { + is_adult = yes + has_trait = cannibal + NOT = { + faith = { has_doctrine_parameter = cannibalism_legal } + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRIMINAL + trigger = { + is_adult = yes + AND = { + has_trait = kinslayer + NOT = { faith = { has_doctrine = doctrine_kinslaying_accepted } } + } + AND = { + has_trait = deviant + NOT = { faith = { has_doctrine_parameter = deviancy_accepted } } + } + AND = { + has_trait = sodomite + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + AND = { + has_trait = incestuous + NOT = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } } + } + AND = { + OR = { + has_trait = adulterer + has_trait = fornicator + } + is_female = no + NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } } + } + AND = { + OR = { + has_trait = adulterer + has_trait = fornicator + } + is_female = yes + NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } } + } + has_trait = murderer + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_WITCH + trigger = { + is_adult = yes + AND = { + has_trait = witch + NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } } + } + } + } + ##################### + # Generic Fallbacks # + ##################### + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_COMPASSIONATE + trigger = { + is_adult = yes + has_trait = compassionate + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ARROGANT + trigger = { + is_adult = yes + has_trait = arrogant + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CYNICAL + trigger = { + is_adult = yes + has_trait = cynical + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GREGARIOUS + trigger = { + is_adult = yes + has_trait = gregarious + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ZEALOUS + trigger = { + is_adult = yes + has_trait = zealous + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_AMBITIOUS + trigger = { + is_adult = yes + has_trait = ambitious + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_DILIGENT + trigger = { + is_adult = yes + has_trait = diligent + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_DECEITFUL + trigger = { + is_adult = yes + OR = { + has_trait = deceitful + has_intrigue_lifestyle_trait_trigger = yes + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_SHY + trigger = { + is_adult = yes + has_trait = shy + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_HUMBLE + trigger = { + is_adult = yes + has_trait = humble + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ARBITRARY + trigger = { + is_adult = yes + has_trait = arbitrary + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_TEMPERATE + trigger = { + is_adult = yes + has_trait = temperate + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CHASTE + trigger = { + is_adult = yes + OR = { + has_trait = chaste + has_trait = family_first + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_LUSTFUL + trigger = { + is_adult = yes + OR = { + has_trait = lustful + has_trait = seducer + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CONTENT + trigger = { + is_adult = yes + has_trait = content + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PATIENT + trigger = { + is_adult = yes + has_trait = patient + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_BRAVE + trigger = { + is_adult = yes + has_trait = brave + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_JUST + trigger = { + is_adult = yes + has_trait = just + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GLUTTONOUS + trigger = { + is_adult = yes + has_trait = gluttonous + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CALLOUS + trigger = { + is_adult = yes + has_trait = callous + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRAVEN + trigger = { + is_adult = yes + has_trait = craven + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GREEDY + trigger = { + is_adult = yes + has_trait = greedy + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRUEL + trigger = { + is_adult = yes + has_trait = sadistic + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_TRUSTING + trigger = { + is_adult = yes + has_trait = trusting + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_HONEST + trigger = { + is_adult = yes + has_trait = honest + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_LAZY + trigger = { + is_adult = yes + has_trait = lazy + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GENEROUS + trigger = { + is_adult = yes + has_trait = generous + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_WRATHFUL + trigger = { + is_adult = yes + has_trait = wrathful + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PARANOID + trigger = { + is_adult = yes + has_trait = paranoid + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_STUBBORN + trigger = { + is_adult = yes + has_trait = stubborn + } + } + ################## + # Circumstancial # + ################## + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_PIETY + trigger = { + is_adult = yes + piety_level >= 3 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_PRESTIGE + trigger = { + is_adult = yes + prestige_level >= 5 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_FRIENDS + trigger = { + num_of_relation_friend >= 3 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TYRANT + trigger = { + tyranny >= medium_tyranny + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_RICH + trigger = { + gold >= 5000 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_CHILDREN + trigger = { + any_child = { count >= 8 } + NOR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_RIVALS + trigger = { + num_of_relation_rival >= 3 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_COMBAT_SKILLS + trigger = { + is_adult = yes + OR = { + prowess >= high_skill_rating + has_trait = lifestyle_blademaster + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_POOR_HEALTH + trigger = { + health <= poor_health + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_BASTARD + trigger = { + OR = { + has_trait = bastard + has_trait = legitimized_bastard + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_VIKING + trigger = { + is_adult = yes + has_trait = viking + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_CRUSADER + trigger = { + is_adult = yes + OR = { + has_trait = faith_warrior + has_trait = crusader_king + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_THREE_SKILLS + trigger = { + calc_true_if = { + amount >= 3 + amount < 5 + diplomacy >= 10 + stewardship >= 10 + intrigue >= 10 + learning >= 10 + martial >= 10 + } + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_FIVE_SKILLS + trigger = { + diplomacy >= 10 + stewardship >= 10 + intrigue >= 10 + learning >= 10 + martial >= 10 + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_HEIR_UNIMPRESSIVE + trigger = { + is_adult = yes + piety_level < 3 + prestige_level < 5 + num_of_relation_friend < 3 + gold < 5000 + prowess < high_skill_rating + NOR = { + has_trait = faith_warrior + has_trait = crusader_king + has_trait = viking + has_trait = lifestyle_blademaster + } + } + weight_multiplier = { + factor = 0.001 + } + } +} + +GameOverMessageInterface = { + type = character + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_INTRO_UNLANDED + trigger = { + is_playable_character = no + is_alive = yes + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_INTRO_BARON + trigger = { + primary_title.tier = tier_barony + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_INTRO + } +} + +GameOverMessageInterfaceDuration = { + type = character + + random_valid = yes + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_CENTURIES + trigger = { + years_from_game_start >= 200 + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_CENTURY + trigger = { + years_from_game_start < 200 + years_from_game_start >= 100 + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_DECADES + trigger = { + years_from_game_start < 100 + years_from_game_start >= 20 + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_DECADE + trigger = { + years_from_game_start < 20 + years_from_game_start >= 10 + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_YEARS + trigger = { + years_from_game_start < 10 + years_from_game_start >= 2 + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_YEAR + trigger = { + years_from_game_start < 2 + years_from_game_start > 1 + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_YEAR_SINGLE + trigger = { + years_from_game_start <= 1 + } + } +} + +GameOverMessageInterfaceSplendor = { + type = character + + random_valid = yes + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_MAX_SPLENDOR + trigger = { + dynasty = { dynasty_prestige_level >= max_dynasty_prestige_level } + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_HIGH_SPLENDOR + trigger = { + dynasty = { + dynasty_prestige_level < max_dynasty_prestige_level + dynasty_prestige_level >= high_dynasty_prestige_level + } + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_MEDIUM_SPLENDOR + trigger = { + dynasty = { + dynasty_prestige_level < high_dynasty_prestige_level + dynasty_prestige_level >= medium_dynasty_prestige_level + } + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_LOW_SPLENDOR + trigger = { + dynasty = { + dynasty_prestige_level < medium_dynasty_prestige_level + dynasty_prestige_level >= low_dynasty_prestige_level + } + years_from_game_start > 1 + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_LOW_SPLENDOR_SHORT + trigger = { + dynasty = { + dynasty_prestige_level < medium_dynasty_prestige_level + dynasty_prestige_level >= low_dynasty_prestige_level + } + years_from_game_start <= 1 + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_MIN_SPLENDOR + trigger = { + dynasty = { + dynasty_prestige_level < low_dynasty_prestige_level + dynasty_prestige_level >= min_dynasty_prestige_level + } + } + } +} + +GameOverMessageNotableAchievements = { + type = character + + # Have you ever restored a kingdom/empire/etc.? + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_ROMAN_EMPIRE_DESC + trigger = { + exists = global_var:flag_restored_roman_empire + dynasty = global_var:flag_restored_roman_empire.dynasty + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_DUMNONIA_DESC + trigger = { + exists = global_var:flag_restored_dumnonia + dynasty = global_var:flag_restored_dumnonia.dynasty + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_CAROLINGIAN_DESC + trigger = { + exists = global_var:flag_reformed_carolingian_empire + dynasty = global_var:flag_reformed_carolingian_empire.dynasty + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_HOLY_ROMAN_EMPIRE_DESC + trigger = { + exists = global_var:restore_holy_roman_empire_decision + dynasty = global_var:restore_holy_roman_empire_decision.dynasty + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_OLD_VASCONIA_DESC + trigger = { + exists = global_var:flag_restored_old_vasconia + dynasty = global_var:flag_restored_old_vasconia.dynasty + } + } + + # Have you ever unified a kingdom/empire/etc.? + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_SPANISH_DESC + trigger = { + exists = global_var:unite_the_spanish_thrones_decision + exists = global_var:unite_the_spanish_thrones_decision.dynasty + dynasty = global_var:unite_the_spanish_thrones_decision.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_SLAVS_DESC + trigger = { + exists = global_var:unite_the_slavs_decision + exists = global_var:unite_the_slavs_decision.dynasty + dynasty = global_var:unite_the_slavs_decision.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_SOUTHERN_SLAVS_DESC + trigger = { + exists = global_var:unite_the_southern_slavs_decision + exists = global_var:unite_the_southern_slavs_decision.dynasty + dynasty = global_var:unite_the_southern_slavs_decision.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_WESTERN_SLAVS_DESC + trigger = { + exists = global_var:unite_the_western_slavs_decision + exists = global_var:unite_the_western_slavs_decision.dynasty + dynasty = global_var:unite_the_western_slavs_decision.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_BURGUNDY_DESC + trigger = { + exists = global_var:flag_unified_burgundy_kingdom + exists = global_var:flag_unified_burgundy_kingdom.dynasty + dynasty = global_var:flag_unified_burgundy_kingdom.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_ITALY_DESC + trigger = { + exists = global_var:flag_unified_italian_empire + exists = global_var:flag_unified_italian_empire.dynasty + dynasty = global_var:flag_unified_italian_empire.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_AFRICA_DESC + trigger = { + exists = global_var:unite_africa_decision + exists = global_var:unite_africa_decision.dynasty + dynasty = global_var:unite_africa_decision.dynasty + } + } + + # Have you ever formed/created/founded a kingdom/empire/etc.? + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_PORTUGAL_DESC + trigger = { + exists = global_var:form_portugal_decision + dynasty = global_var:form_portugal_decision.dynasty + } + } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_CANARIAS_DESC + trigger = { + exists = global_var:declare_canarias_decision + dynasty = global_var:declare_canarias_decision.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_BOSNIA_DESC + trigger = { + exists = global_var:flag_founded_kingdom_of_bosnia + dynasty = global_var:flag_founded_kingdom_of_bosnia.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_ARMENIA_DESC + trigger = { + exists = global_var:flag_created_armenian_empire + dynasty = global_var:flag_created_armenian_empire.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_VIET_DESC + trigger = { + exists = global_var:flag_created_dai_viet_empire + dynasty = global_var:flag_created_dai_viet_empire.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_MAJAPAHIT_DESC + trigger = { + exists = global_var:flag_created_majapahit_empire + dynasty = global_var:flag_created_majapahit_empire.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_RYUKYU_DESC + trigger = { + exists = global_var:flag_created_ryukyu_empire + dynasty = global_var:flag_created_ryukyu_empire.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_SIAM_DESC + trigger = { + exists = global_var:flag_created_siam_kingdom + dynasty = global_var:flag_created_siam_kingdom.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_RUM_DESC + trigger = { + exists = global_var:flag_formed_rum_sultanate + dynasty = global_var:flag_formed_rum_sultanate.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_ISRAEL_DESC + trigger = { + exists = global_var:create_israel_kingdom + dynasty = global_var:create_israel_kingdom.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_OUTREMER_DESC + trigger = { + exists = global_var:flag_created_outremer_empire + dynasty = global_var:flag_created_outremer_empire.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_SWITZERLAND_DESC + trigger = { + exists = global_var:flag_formed_switzerland_kingdom + dynasty = global_var:flag_formed_switzerland_kingdom.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_AUSTRIA_DESC + trigger = { + exists = global_var:flag_formed_austria_kingdom + dynasty = global_var:flag_formed_austria_kingdom.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_ARAGON_DESC + trigger = { + exists = global_var:flag_formed_kingdom_of_aragon + dynasty = global_var:flag_formed_kingdom_of_aragon.dynasty + } + } +} diff --git a/N3OW/common/customizable_localization/00_statecraft_lifestyle_custom_loc.txt b/N3OW/common/customizable_localization/00_statecraft_lifestyle_custom_loc.txt new file mode 100644 index 00000000..3ad8ca67 --- /dev/null +++ b/N3OW/common/customizable_localization/00_statecraft_lifestyle_custom_loc.txt @@ -0,0 +1,27 @@ + + +StatecraftGetVassalType = { + type = character + + text = { + trigger = { government_has_flag = government_is_feudal} + localization_key = statecraft_ongoing.4010.nobility + fallback = yes + } + text = { + trigger = { government_has_flag = government_is_clan} + localization_key = statecraft_ongoing.4010.clan + } + text = { + trigger = { government_has_flag = government_is_tribal} + localization_key = statecraft_ongoing.4010.chieftains + } + text = { + trigger = { government_has_flag = government_is_theocracy} + localization_key = statecraft_ongoing.4010.clergy + } + text = { + trigger = { government_has_flag = government_is_republic} + localization_key = statecraft_ongoing.4010.citizenry + } +} diff --git a/N3OW/common/decisions/dlc_decisions/mpo/mpo_decisions.txt b/N3OW/common/decisions/dlc_decisions/mpo/mpo_decisions.txt new file mode 100644 index 00000000..8bb054c2 --- /dev/null +++ b/N3OW/common/decisions/dlc_decisions/mpo/mpo_decisions.txt @@ -0,0 +1,7005 @@ +call_for_confederation_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/mpo_decision_confederation.dds" + } + decision_group_type = major + ai_check_interval = 8 + + desc = call_for_confederation_decision_desc + selection_tooltip = call_for_confederation_decision_tooltip + + is_shown = { + highest_held_title_tier <= tier_duchy + is_playable_character = yes + is_independent_ruler = yes + NOR = { + has_character_flag = forming_confederation + is_confederation_member = yes + } + } + + is_valid = { + is_independent_ruler = yes + highest_held_title_tier <= tier_duchy + is_tributary = no + trigger_if = { + limit = { + government_has_flag = government_is_nomadic + } + OR = { + has_realm_law = nomadic_authority_1 + has_realm_law = nomadic_authority_2 + } + } + trigger_else = { + OR = { + has_realm_law = tribal_authority_0 + has_realm_law = tribal_authority_1 + has_realm_law = tribal_authority_2 + has_realm_law = crown_authority_0 + has_realm_law = crown_authority_1 + } + } + NOR = { + has_trait = conqueror + has_trait = greatest_of_khans + } + OR = { + has_trait = diplomat + has_trait = family_first + confederation_foe_trigger = { CHARACTER = root } + } + #This is just meant to stop player exploits + trigger_if = { + limit = { + is_ai = no + } + custom_tooltip = { + text = recently_took_leave_confederation_decision_tt + NOT = { has_variable = left_confederation } + } + } + } + cooldown = { years = 5 } + + is_valid_showing_failures_only = { + age >= 6 + trigger_if = { + limit = { + is_ai = no + } + NOT = { exists = involved_activity } + NOT = { has_trait = infirm } + is_physically_able = yes + is_travelling = no + } + trigger_else = { + is_imprisoned = no + is_incapable = no + is_alive = yes + is_migrating = no + NOT = { has_trait = infirm } + } + } + + cost = { + prestige = { + value = { + add = 100 + if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = 200 + } + if = { + limit = { + max_military_strength > 0 + any_neighboring_top_liege_realm_owner = { + NOT = { is_allied_to = root } + max_military_strength > 0 + confederation_worthy_foe_strength_ratio_value_root <= 0.5 + } + } + add = -50 + } + if = { + limit = { + max_military_strength > 0 + any_neighboring_top_liege_realm_owner = { + NOT = { is_allied_to = root } + max_military_strength > 0 + confederation_worthy_foe_strength_ratio_value_root <= 0.25 + } + } + add = -50 + } + } + } + piety = { + value = { + add = 250 + } + } + } + + effect = { + custom_tooltip = enables_offer_confederation_tt + custom_tooltip = offer_confederation_members_tt + custom_tooltip = confederation_join_defensive_wars_tt + custom_tooltip = confederation_raiding_attacking_tt + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_modifier_tt + } + custom_tooltip = offer_confederation_5_year_warning_tt + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_restrictions_warning_tt + } + else = { + custom_tooltip = confederation_restrictions_tribe_warning_tt + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_migrating_leaving_warning_tt + } + else = { + custom_tooltip = confederation_leaving_warning_tt + } + trigger_event = mpo_decisions_events.0001 + } + + ai_potential = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + is_independent_ruler = yes + highest_held_title_tier <= tier_duchy + is_tributary = no + is_playable_character = yes + is_confederation_member = no + is_alive = yes + #Culture friends + any_land_neighboring_realm_with_tributaries_owner = { + count >= 2 + culture = root.culture + OR = { + faith = root.faith + AND = { + faith = { + has_doctrine_parameter = unreformed + } + root.faith = { + has_doctrine_parameter = unreformed + } + } + faith = { + faith_hostility_level = { + target = root.faith + value < faith_hostile_level + } + } + } + valid_confederation_member_trigger = { CHARACTER = root } + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + } + + ai_will_do = { + base = 0 + modifier = { + ai_compassion >= low_positive_ai_value + add = 5 + } + modifier = { + ai_honor >= low_positive_ai_value + add = 5 + } + modifier = { + ai_boldness <= low_negative_ai_value + add = 5 + } + modifier = { + ai_sociability >= low_positive_ai_value + add = 5 + } + modifier = { + ai_greed <= low_negative_ai_value + add = 5 + } + modifier = { + ai_energy <= low_negative_ai_value + add = 5 + } + modifier = { + ai_rationality >= low_positive_ai_value + add = 5 + } + modifier = { + ai_compassion <= low_negative_ai_value + add = -5 + } + modifier = { + ai_honor <= low_negative_ai_value + add = -5 + } + modifier = { + ai_boldness >= low_positive_ai_value + add = -5 + } + modifier = { + ai_sociability <= low_negative_ai_value + add = -5 + } + modifier = { + ai_greed >= low_positive_ai_value + add = -5 + } + modifier = { + ai_energy >= low_positive_ai_value + add = -5 + } + modifier = { + ai_rationality <= low_negative_ai_value + add = -5 + } + modifier = { + OR = { + any_land_neighboring_realm_with_tributaries_owner = { + is_confederation_member = no + confederation_worthy_foe_strength_ratio_value_root <= 0.25 + } + any_land_neighboring_realm_with_tributaries_owner = { + is_confederation_member = no + is_tributary = yes + top_suzerain = { + confederation_worthy_foe_strength_ratio_value_root <= 0.25 + } + } + any_land_neighboring_realm_with_tributaries_owner = { + is_confederation_member = no + is_tributary = yes + suzerain ?= { + confederation_worthy_foe_strength_ratio_value_root <= 0.25 + } + } + } + add = 25 + } + modifier = { + confederation_neighboring_foe_trigger = { CHARACTER = root } + add = 30 + } + modifier = { + OR = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + has_trait = greatest_of_khans + has_trait = conqueror + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + } + } + any_land_neighboring_realm_with_tributaries_owner = { + is_tributary = yes + top_suzerain = { + OR = { + has_trait = greatest_of_khans + has_trait = conqueror + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + } + } + } + any_land_neighboring_realm_with_tributaries_owner = { + is_tributary = yes + suzerain ?= { + OR = { + has_trait = greatest_of_khans + has_trait = conqueror + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + } + } + } + } + add = 50 + } + modifier = { + add = 10 + culture = { + OR = { + has_cultural_pillar = ethos_stoic + has_cultural_pillar = ethos_communal + has_cultural_pillar = ethos_egalitarian + } + } + } + modifier = { + add = -20 + culture = { + OR = { + has_cultural_pillar = ethos_bellicose + has_cultural_pillar = ethos_courtly + has_cultural_pillar = ethos_bureaucratic + } + } + } + modifier = { + add = -100 + prestige <= medium_prestige_value # You cannot afford this + } + #Another confederation of your culture already exists + modifier = { + any_in_global_list = { + variable = confederations + has_variable = confederation_culture + var:confederation_culture = root.culture + } + factor = 0.05 + } + #There's already another confederation nearby + modifier = { + any_in_global_list = { + variable = confederations + any_confederation_member = { + in_diplomatic_range = root + } + } + factor = 0.1 + } + } +} + +leave_confederation_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/mpo_decision_confederation.dds" + } + ai_check_interval = 12 + + desc = leave_confederation_decision_desc + selection_tooltip = leave_confederation_decision_tooltip + + is_shown = { + is_confederation_member = yes + } + + is_valid = { + is_confederation_member = yes + is_at_war = no + highest_held_title_tier >= tier_county + } + + is_valid_showing_failures_only = { + trigger_if = { + limit = { + is_ai = no + } + NOT = { exists = involved_activity } + is_physically_able = yes + is_travelling = no + } + trigger_else = { + is_alive = yes + is_imprisoned = no + is_incapable = no + NOT = { exists = involved_activity } + } + } + + cost = { + prestige = { + value = { + add = medium_prestige_value + if = { # Cost increases if Gurkhan is doing well + limit = { + government_has_flag = government_is_nomadic + exists = situation:the_great_steppe + situation:the_great_steppe.situation_top_herd = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + } + multiply = 1.5 + } + if = { # Cost increases if just joined in last couple years + limit = { + has_character_flag = new_confederate + } + multiply = 2 + } + } + } + } + + effect = { + set_variable = { + name = left_confederation + value = root.confederation + years = 5 + } + root.confederation = { + save_scope_as = confederation + every_confederation_member = { + limit = { + NOT = { + this = root + } + } + add_to_list = confederation_members + } + } + show_as_tooltip = { + root.confederation = { + #Your confederation will survive, it has more members + if = { + limit = { + any_confederation_member = { + count >= 2 + NOT = { + this = root + } + } + } + remove_confederation_member = root + } + #Your confederation is toast + else = { + disband_confederation = yes + } + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + show_as_tooltip = { + remove_character_modifier = mpo_confederation_member_modifier + } + } + custom_tooltip = confederates_lose_opinion_tt + + save_scope_as = leaver + trigger_event = { + id = mpo_decisions_events.0002 + days = 1 + } + } + + ai_potential = { + is_confederation_member = yes + is_independent_ruler = no + age >= 12 + is_at_war = no + is_incapable = no + NOR = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + has_trait = greatest_of_khans + has_trait = conqueror + is_gurkhan = yes + } + } + any_land_neighboring_realm_with_tributaries_owner = { + any_owned_story = { + OR = { + story_type = story_mongol_invasion + story_type = story_greatest_of_khans + } + } + } + situation:the_great_steppe = { + any_situation_participant = { + this = root + } + any_situation_participant = { + OR = { + has_trait = greatest_of_khans + has_trait = conqueror + } + } + } + } + + #Will not leave if any confederation member is a good pal + exists = root.confederation + NOT = { + root.confederation = { + any_confederation_member = { + OR = { + has_relation_blood_brother = root + is_allied_to = root + } + } + } + } + } + + ai_will_do = { + base = 0 + # PERKS + modifier = { # Only member of culture + NOT = { + confederation = { + any_confederation_member = { + has_same_culture_as = root + } + } + } + confederation = { + any_confederation_member = { + culture = { + cultural_acceptance = { + target = root.culture + value <= 90 + } + } + save_temporary_scope_as = actor + } + } + save_temporary_scope_as = recipient + add = { + value = offer_vassalage_acceptance_value + multiply = -0.5 + } + } + + # MAIN + modifier = { #Only member of faith, no pluralism. + NOR = { + confederation = { + any_confederation_member = { + faith = root.faith + } + } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + confederation = { + any_confederation_member = { + save_temporary_scope_as = confederate + } + } + + add = { + value = 30 + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:confederate.faith + value >= faith_hostile_level + } + } + } + add = 30 + } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:confederate.faith + value >= faith_evil_level + } + } + } + add = 30 + } + } + } + + modifier = { #Only member of faith, pluralism. + NOT = { + confederation = { + any_confederation_member = { + faith = root.faith + } + } + } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + confederation = { + any_confederation_member = { + save_temporary_scope_as = confederate + } + } + add = { + value = 15 + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:confederate.faith + value >= faith_hostile_level + } + } + } + add = 10 + } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:confederate.faith + value >= faith_evil_level + } + } + } + add = 10 + } + } + } + modifier = { #Just fought against other member of confederation + any_truce_holder = { + is_member_of_confederation = root.confederation + NOT = { + has_purchased_truce_with_char = { TARGET = root } + } + } + add = 50 + } + modifier = { #I fought an independence war against confederation member + root = { + exists = var:independence_war_former_liege + var:independence_war_former_liege = { + is_member_of_confederation = root.confederation + } + } + add = 100 + } + modifier = { #Is wrong government type + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + add = 50 + } + modifier = { #Is wrong government type + NOR = { + government_has_flag = government_is_republic + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + add = -100 + } + modifier = { # Isolationist tradition + confederation = { + any_confederation_member = { + NOT = { + culture = root.culture + } + } + } + root.culture = { + has_cultural_tradition = tradition_isolationist + } + add = 20 + } + modifier = { # Isolationist tradition and all members are other culture + confederation = { + NOT = { + any_confederation_member = { + culture = root.culture + NOT = { + this = root + } + } + } + } + root.culture = { + has_cultural_tradition = tradition_isolationist + } + add = 50 + } + modifier = { # Isolationist tradition + confederation = { + any_confederation_member = { + NOT = { + culture = root.culture + } + } + } + root.culture = { + has_cultural_tradition = tradition_isolationist + } + add = 40 + } + modifier = { #Bankrupt + confederation = { + any_confederation_member = { + gold <= -1 + } + } + add = 10 + } + modifier = { #All Bankrupt + NOT = { + confederation = { + any_confederation_member = { + NOT = { + this = root + } + gold <= -1 + } + } + } + add = 50 + } + modifier = { #Wide difference in rank + highest_held_title_tier <= tier_county + sub_realm_size <= 2 + add = -10 + } + modifier = { #Wide difference in rank + sub_realm_size <= 1 + add = -10 + } + modifier = { # Is the Rightful Liege of recipient + trigger = { + confederation = { + any_confederation_member = { + is_rightful_liege_of = root + } + } + } + add = -20 + } + modifier = { #No adjacency + desc = offer_vassalization_interaction_aibehavior_unconnectedrealm_tt + trigger = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + is_member_of_confederation = root.confederation + suzerain ?= { + is_member_of_confederation = root.confederation + } + } + } + } + } + add = 100 + } + modifier = { #Distant Realm + desc = offer_vassalization_interaction_aibehavior_distantrealm_tt + trigger = { + NOR = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + is_member_of_confederation = root.confederation + suzerain ?= { + is_member_of_confederation = root.confederation + } + } + } + any_confederation_member = { + NOT = { + this = root + } + capital_province = { + squared_distance = { target = root.capital_province value < 100000 } + } + } + } + } + add = 150 + } + modifier = { #Remote Realm. + desc = offer_vassalization_interaction_aibehavior_remoterealm_tt + trigger = { + NOR = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + is_member_of_confederation = root.confederation + suzerain ?= { + is_member_of_confederation = root.confederation + } + } + } + any_confederation_member = { + NOT = { + this = root + } + capital_province = { + squared_distance = { target = root.capital_province value < 200000 } + } + } + } + } + add = 200 + } + #Military strength higher than any member + modifier = { + NOT = { + confederation = { + any_confederation_member = { + NOT = { + this = root + } + max_military_strength > root.max_military_strength + } + } + } + add = 20 + } + #Military strength much higher than any member + modifier = { + NOT = { + confederation = { + any_confederation_member = { + NOT = { + this = root + } + max_military_strength >= { + value = { + value = root.max_military_strength + multiply = 2 + } + } + } + } + } + add = 50 + } + #Military strength lower than another member + modifier = { + confederation = { + any_confederation_member = { + NOT = { + this = root + } + max_military_strength > root.max_military_strength + } + } + add = -20 + } + #Military strength lower than every other member + modifier = { + confederation = { + NOT = { + any_confederation_member = { + NOT = { + this = root + } + max_military_strength < root.max_military_strength + } + } + } + add = -50 + } + + # MINOR + modifier = { #Friend modifier. + trigger = { + confederation = { + any_confederation_member = { + has_relation_friend = root + } + } + } + add = -25 + } + modifier = { #Best Friend modifier. + trigger = { + confederation = { + any_confederation_member = { + has_relation_best_friend = root + } + } + } + add = -50 + } + modifier = { #Lover modifier. + trigger = { + confederation = { + any_confederation_member = { + has_relation_lover = root + } + } + } + add = -10 + } + modifier = { #Soulmate modifier. + trigger = { + confederation = { + any_confederation_member = { + has_relation_soulmate = root + } + } + } + add = -50 + } + modifier = { #Rivalry modifier. + trigger = { + confederation = { + any_confederation_member = { + has_relation_rival = root + } + } + } + add = 200 + } + modifier = { #Nemesis modifier. + trigger = { + confederation = { + any_confederation_member = { + has_relation_nemesis = root + } + } + } + add = 1000 + } + modifier = { #Same Dynasty modifier. + trigger = { + confederation = { + any_confederation_member = { + exists = root.dynasty + dynasty ?= root.dynasty + } + } + } + add = -20 + } + modifier = { #Same House modifier. + trigger = { + confederation = { + any_confederation_member = { + exists = root.house + house ?= root.dynasty + } + } + } + add = -50 + } + + modifier = { #Ageism modifier vs kids. + trigger = { + age >= 16 + NOT = { + confederation = { + any_confederation_member = { + NOT = { + this = root + } + age >= 16 + } + } + } + } + add = 25 + } + modifier = { #Illegitimacy modifier. + trigger = { + confederation = { + any_confederation_member = { + NOT = { + this = root + } + OR = { + AND = { + has_trait = bastard + root = { + faith = { NOT = { has_doctrine = doctrine_bastardry_none } } + } + } + has_trait = denounced + has_trait = disinherited + } + } + } + } + add = 10 + } + + modifier = { # Conqueror/GoK leaves immediately + trigger = { + root = { + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + } + } + } + add = 1000 + } + + modifier = { # Ambitious + trigger = { + root = { + has_trait = ambitious + } + } + add = 50 + } + + modifier = { # Paranoid + trigger = { + root = { + has_trait = paranoid + } + } + add = 20 + } + + modifier = { # Arrogant + trigger = { + root = { + has_trait = arrogant + } + } + add = 25 + } + + modifier = { # Fickle + trigger = { + root = { + has_trait = fickle + } + } + add = 50 + } + + modifier = { # Greedy + trigger = { + root = { + has_trait = greedy + } + } + add = 20 + } + + modifier = { # just + trigger = { + root = { + has_trait = just + } + } + add = -10 + } + + modifier = { # Trusting + trigger = { + root = { + has_trait = trusting + } + } + add = -20 + } + + modifier = { # Content + trigger = { + root = { + has_trait = content + } + } + add = -50 + } + + modifier = { # Craven + trigger = { + root = { + has_trait = craven + } + } + add = -50 + } + + # OPINION INFLUENCE + modifier = { + add = -25 + confederation = { + any_confederation_member = { + NOT = { + this = root + } + root = { + has_dread_level_towards = { + target = prev + level = 1 + } + } + } + } + } + modifier = { + add = -50 + confederation = { + any_confederation_member = { + NOT = { + this = root + } + root = { + has_dread_level_towards = { + target = prev + level = 2 + } + } + } + } + } + modifier = { #Compare Opinion modifier. + confederation = { + any_confederation_member = { + NOT = { + this = root + } + reverse_opinion = { + target = root + value <= -50 + } + } + } + add = 20 + } + modifier = { #Compare Opinion modifier. + confederation = { + any_confederation_member = { + NOT = { + this = root + } + reverse_opinion = { + target = root + value <= -80 + } + } + } + add = 20 + } + modifier = { #Compare Opinion modifier. + confederation = { + any_confederation_member = { + NOT = { + this = root + } + reverse_opinion = { + target = root + value >= 80 + } + } + } + add = -20 + } + modifier = { #Compare Opinion modifier. + confederation = { + any_confederation_member = { + NOT = { + this = root + } + reverse_opinion = { + target = root + value >= 100 + } + } + } + add = -20 + } + + # LOW LEGITIMACY + modifier = { + add = 5 + confederation = { + any_confederation_member = { + NOT = { + this = root + } + has_legitimacy_flag = reduced_vassalization_acceptance + } + } + } + modifier = { + add = 10 + confederation = { + any_confederation_member = { + NOT = { + this = root + } + has_legitimacy_flag = very_reduced_vassalization_acceptance + } + } + } + modifier = { + add = 20 + confederation = { + any_confederation_member = { + NOT = { + this = root + } + has_legitimacy_flag = massively_reduced_vassalization_acceptance + } + } + } + + # HIGH LEGITIMACY + modifier = { + add = -5 + confederation = { + any_confederation_member = { + NOT = { + this = root + } + has_legitimacy_flag = increased_vassalization_acceptance + } + } + } + modifier = { + add = -10 + confederation = { + any_confederation_member = { + NOT = { + this = root + } + has_legitimacy_flag = very_increased_vassalization_acceptance + } + } + } + modifier = { + add = -25 + confederation = { + any_confederation_member = { + NOT = { + this = root + } + has_legitimacy_flag = extra_increased_vassalization_acceptance + } + } + } + + # PRESTIGE + modifier = { + add = 25 + prestige_level >= 4 + } + modifier = { + add = 25 + prestige_level >= 5 + } + + #CULTURE + modifier = { + add = -10 + confederation = { + NOT = { + any_confederation_member = { + NOT = { + culture = root.culture + } + } + } + } + } + modifier = { + add = 50 + confederation = { + NOT = { + any_confederation_member = { + NOT = { + this = root + } + NOR = { + culture = root.culture + culture = { + any_parent_culture_or_above = { + this = root.culture + } + } + root.culture = { + any_parent_culture_or_above = { + this = root.liege.culture + } + } + culture = { + has_same_culture_heritage = root.culture + } + } + } + } + } + } + + #Conquerors have no interest in this + modifier = { + root = { + has_trait = conqueror + } + add = 500 + } + modifier = { + root = { + has_trait = greatest_of_khans + } + add = 500 + } + + # Are you using a hook? + modifier = { + confederation = { + any_confederation_member = { + has_usable_hook = root + } + } + add = -50 + } + + #No threat to confederate against + modifier = { + add = 75 + root = { + NOT = { + confederation_foe_trigger = { CHARACTER = root } + } + } + } + + #Has confederation threat + modifier = { + add = -25 + root = { + confederation_foe_trigger = { CHARACTER = root } + } + } + + #Neighbor is scaring them + modifier = { + add = -50 + root = { + any_land_neighboring_realm_with_tributaries_owner = { + top_suzerain = { + NOR = { + this = liege + this = top_liege + } + confederation_worthy_foe_strength_ratio_value_root <= 0.25 + NOT = { is_allied_to = root } + OR = { + highest_held_title_tier >= tier_kingdom + faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + has_trait = conqueror + has_trait = greatest_of_khans + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + } + } + } + } + } + + #Neighbor is TERRIFYING them + modifier = { + add = -100 + root = { + any_land_neighboring_realm_with_tributaries_owner = { + top_suzerain = { + NOR = { + this = liege + this = top_liege + } + confederation_worthy_foe_strength_ratio_value_root <= 0.1 + NOT = { is_allied_to = root } + OR = { + highest_held_title_tier >= tier_kingdom + faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + has_trait = conqueror + has_trait = greatest_of_khans + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + } + } + } + } + } + + #You have too many vassals + modifier = { + save_temporary_scope_as = actor + scope:actor.confederation = { + any_confederation_member = { + count >= 6 + highest_held_title_tier >= tier_county + } + } + add = { + value = duchy_confederation_vassals_value + multiply = -1 + } + } + + #NOT FROM OFFER CONFEDERATION INTERACTION + modifier = { + confederation = { + has_variable = confederation_culture + var:confederation_culture = { + this = root.culture + } + } + add = -20 + } + modifier = { + confederation = { + has_variable = confederation_culture + var:confederation_culture = { + NOT = { this = root.culture } + } + } + add = 20 + } + + modifier = { + add = -50 + has_trait = loyal + } + modifier = { + add = 50 + has_trait = disloyal + } + modifier = { + has_trait = infirm + add = -10 + } + modifier = { + confederation = { + any_confederation_member = { + NOT = { + this = root + } + is_incapable = yes + } + } + add = 15 + } + #Confederation has only two + modifier = { + confederation = { + any_confederation_member = { + count <= 2 + highest_held_title_tier >= tier_county + } + } + add = 20 + } + #Doing great and doesn't need confederation + modifier = { + war_chest_gold >= war_chest_gold_maximum + add = 25 + } + modifier = { + NOR = { + any_land_neighboring_realm_with_tributaries_owner = { + NOT = { is_allied_to = root } + max_military_strength >= root.max_military_strength + } + any_land_neighboring_realm_with_tributaries_owner = { + is_tributary = yes + suzerain ?= { + NOT = { is_allied_to = root } + max_military_strength >= root.max_military_strength + } + } + any_land_neighboring_realm_with_tributaries_owner = { + is_tributary = yes + top_suzerain = { + NOT = { is_allied_to = root } + max_military_strength >= root.max_military_strength + } + } + } + add = 50 + } + modifier = { + domain_size >= 4 + add = 15 + } + modifier = { + domain_size >= 5 + add = 20 + } + modifier = { + domain_size >= 6 + add = 25 + } + modifier = { + add = -10 + culture = { + OR = { + has_cultural_pillar = ethos_stoic + has_cultural_pillar = ethos_communal + has_cultural_pillar = ethos_egalitarian + } + } + } + modifier = { + add = 10 + culture = { + OR = { + has_cultural_pillar = ethos_bellicose + has_cultural_pillar = ethos_courtly + has_cultural_pillar = ethos_bureaucratic + } + } + } + modifier = { + add = 100 + ai_energy > low_negative_ai_value + ai_boldness > low_negative_ai_value + NOR = { + has_trait = content + has_trait = craven + has_trait = loyal + has_trait = humble + } + NOT = { + has_character_flag = new_confederate + } + } + #Recent AI confederates should really not take this + modifier = { + add = -500 + has_character_flag = new_confederate + } + modifier = { + add = -25 + confederation = { + any_confederation_member = { + is_primary_heir_of = root + } + } + } + modifier = { + add = -50 + confederation = { + any_confederation_member = { + root = { + is_primary_heir_of = prev + } + } + } + } + modifier = { + add = -25 + confederation = { + any_confederation_member = { + any_spouse = { + this = root + } + } + } + } + modifier = { + add = -25 + confederation = { + any_confederation_member = { + is_close_family_of = root + } + } + } + modifier = { + add = -20 + confederation = { + any_confederation_member = { + any_spouse = { + is_close_family_of = root + } + } + } + } + modifier = { + add = -20 + confederation = { + any_confederation_member = { + any_close_family_member = { + any_spouse = { + OR = { + is_close_family_of = root + this = root + } + } + } + } + } + } + } +} + +study_commander_trait_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_concession.dds" + } + decision_group_type = nomad_minor + + ai_check_interval = 72 + + desc = study_commander_trait_decision_desc + selection_tooltip = study_commander_trait_decision_tooltip + + is_shown = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_playable_character = yes + is_available_adult = yes + NOR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_character_flag = study_commander_trait_cooldown + has_character_flag = is_learning_commander_trait + } + number_of_commander_traits < commander_trait_limit + } + + is_valid = { + domicile ?= { + has_domicile_building_or_higher = mass_warfare_yurt_01 + } + } + + cooldown = { years = 10 } # 5 if they don't get one, 10 if they do + + is_valid_showing_failures_only = { + is_at_war = no + } + + effect = { + custom_tooltip = study_commander_trait_decision_effect + trigger_event = { + id = mpo_decisions_events.0200 + } + } + + ai_potential = { + always = yes + } + + ai_will_do = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = brave + has_trait = diligent + has_trait = ambitious + } + } + modifier = { + add = 50 + martial >= high_skill_rating + } + modifier = { + add = 25 + highest_skill = martial + } + modifier = { + add = 25 + has_focus = martial_strategy_focus + } + modifier = { + add = -15 + has_trait = wounded + } + modifier = { + add = -25 + OR = { + has_trait = craven + has_trait = lazy + } + } + + } +} + +mpo_decision_fertility_dance = { + picture = { + reference = "gfx/interface/illustrations/event_scenes/mpo_temple_steppe.dds" + } + sort_order = 60 + decision_group_type = nomad_minor + + desc = mpo_decision_fertility_dance_desc + + selection_tooltip = mpo_decision_fertility_dance_tooltip + + cooldown = { years = 5 } + + is_shown = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_landed = yes + is_available_adult = yes + any_sub_realm_county = { + uses_county_fertility = yes + } + } + + is_valid_showing_failures_only = { + is_at_war = no + is_incapable = no + employs_court_position = court_astrologer_court_position + } + + cost = { + piety = { + add = medium_piety_value + } + } + + effect = { + scope:barony.county = { save_scope_as = fertility_county } + custom_tooltip = { + text = mpo_decision_fertility_dance_effects_tt + trigger_event = mpo_decisions_events.0300 + } + custom_tooltip = mpo_decision_fertility_dance_bonus_tt + if = { + limit = { + domicile ?= { + has_domicile_parameter = nomad_yurt_improved_fertility_dance + } + } + custom_tooltip = mpo_decisions_events.0300.a.tt.yurt + show_as_tooltip = { + scope:fertility_county = { + every_neighboring_county = { + limit = { + OR = { + holder = root + holder = { + government_has_flag = government_is_herder + } + } + } + add_county_modifier = { + modifier = mpo_fertility_dance_county_modifier + years = 2 + } + } + } + } + } + } + + widget = { + controller = create_holy_order + barony_valid = { + trigger_if = { + limit = { exists = this } + is_capital_barony = yes + county = { + uses_county_fertility = yes + } + } + } + } + + ai_check_interval = 12 + + ai_potential = { + is_landed = yes + is_available_adult = yes + is_at_war = no + is_incapable = no + any_sub_realm_county = { + uses_county_fertility = yes + county_fertility <= 25 + } + piety >= medium_piety_value + } + + ai_will_do = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 1.25 + has_trait = diligent + } + modifier = { + factor = 1.5 + has_trait = zealous + } + modifier = { + factor = 0.75 + has_trait = cynical + } + modifier = { + factor = 2 + any_sub_realm_county = { + uses_county_fertility = yes + county_fertility <= 50 + } + } + } +} + +mpo_decision_introduce_heir = { + picture = { + reference = "gfx/interface/illustrations/activity_splash_screens/tour_arrival_tribal_neutral.dds" + } + decision_group_type = nomad_minor + + desc = introduce_heir_decision_desc + selection_tooltip = introduce_heir_decision_tooltip + + cooldown = { years = 5 } + + is_shown = { + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + exists = player_heir + player_heir = { + any_heir_title = { + count >= 1 + } + is_ai = yes + } + } + + is_valid = { + trigger_if = { + limit = { + government_has_flag = government_is_nomadic + } + domicile ?= { + has_domicile_building_or_higher = family_yurt_01 + } + } + trigger_else = { + has_trait = nomadic_philosophy + } + + player_heir = { + custom_description = { + text = player_heir_num_friends_tt + num_of_relation_friend < 3 + } + age >= 12 + OR = { + is_courtier_of = root + is_vassal_of = root + } + opinion = { + target = root + value >= 50 + } + } + custom_tooltip = { + text = mpo_valid_heir_friend_tt + OR = { + any_ally = { + mpo_valid_heir_friend_trigger = { CHARACTER = root } + } + any_vassal = { + is_obedient_to = root + mpo_valid_heir_friend_trigger = { CHARACTER = root } + } + any_relation = { + type = friend + mpo_valid_heir_friend_trigger = { CHARACTER = root } + } + any_relation = { + type = soulmate + mpo_valid_heir_friend_trigger = { CHARACTER = root } + } + any_relation = { + type = blood_brother + mpo_valid_heir_friend_trigger = { CHARACTER = root } + } + } + } + } + + is_valid_showing_failures_only = { + trigger_if = { + limit = { + is_ai = no + } + NOT = { exists = involved_activity } + is_available = yes + } + trigger_else = { + is_alive = yes + is_imprisoned = no + is_incapable = no + NOT = { exists = involved_activity } + } + player_heir = { + is_imprisoned = no + is_alive = yes + NOR = { + has_trait = wounded_2 + has_trait = wounded_3 + has_trait = infirm + has_relation_rival = root + has_relation_nemesis = root + exists = involved_activity + is_at_war_with = root + } + has_contagious_deadly_disease_trigger = no + is_incapable = no + is_a_faction_member = no + } + } + + cost = { + prestige = { + value = { + add = mpo_introduce_heir_prestige_cost + #AI suck + if = { + limit = { + is_ai = yes + } + multiply = 0.5 + } + } + } + piety = { + value = { + add = mpo_introduce_heir_piety_cost + } + if = { + limit = { + is_ai = yes + } + multiply = 0.5 + } + } + } + + effect = { + custom_tooltip = choose_heir_friend_tt + custom_tooltip = heir_friend_obedient_tt + custom_tooltip = heir_friend_ally_tt + custom_tooltip = heir_friend_side_effects_tt + trigger_event = { + id = mpo_decisions_events.0020 + days = 1 + } + show_as_tooltip = { + if = { + limit = { + has_trait = shy + } + add_stress = medium_stress_impact_gain + } + if = { + limit = { + has_trait = callous + } + add_stress = minor_stress_impact_gain + } + if = { + limit = { + has_trait = paranoid + } + add_stress = medium_stress_impact_gain + } + } + } + + ai_check_interval = 18 + + ai_potential = { + exists = player_heir + player_heir = { + age >= 12 + opinion = { + target = root + value >= 50 + } + OR = { + is_courtier_of = root + is_vassal_of = root + } + exists = house + exists = root.house + house = { + this = root.house + } + } + OR = { + any_ally = { + mpo_valid_heir_friend_trigger = { CHARACTER = root } + reverse_opinion = { + target = root + value >= 0 + } + OR = { + has_relation_friend = root + has_relation_best_friend = root + has_relation_blood_brother = root + AND = { + exists = house + exists = root.house + house = { + this = root.house + } + } + culture = root.culture + reverse_opinion = { + target = root + value >= 50 + } + has_relation_soulmate = root + } + } + any_vassal = { + is_powerful_vassal = yes + is_obedient_to = root + mpo_valid_heir_friend_trigger = { CHARACTER = root } + reverse_opinion = { + target = root + value >= 0 + } + OR = { + has_relation_friend = root + has_relation_best_friend = root + has_relation_blood_brother = root + AND = { + exists = house + exists = root.house + house = { + this = root.house + } + } + culture = root.culture + reverse_opinion = { + target = root + value >= 50 + } + has_relation_soulmate = root + is_allied_to = root + } + } + any_relation = { + type = friend + is_obedient_to = root + mpo_valid_heir_friend_trigger = { CHARACTER = root } + reverse_opinion = { + target = root + value >= 0 + } + OR = { + AND = { + exists = house + exists = root.house + house = { + this = root.house + } + } + culture = root.culture + reverse_opinion = { + target = root + value >= 50 + } + has_relation_soulmate = root + is_allied_to = root + is_vassal_of = root + AND = { + exists = root.liege + this = root.liege + } + } + } + } + } + + ai_will_do = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 1 + ai_sociability = 1 + } + modifier = { + opinion = { + target = player_heir + value < 0 + } + add = -25 + } + modifier = { + opinion = { + target = player_heir + value >= 75 + } + add = 25 + } + modifier = { + player_heir = { + num_of_relation_friend < 1 + } + add = 25 + } + modifier = { + player_heir = { + num_of_relation_friend > 1 + } + add = -25 + } + #Weigh up if you are friends with a valid option + modifier = { + OR = { + any_ally = { + mpo_valid_heir_friend_trigger = { CHARACTER = root } + OR = { + has_relation_friend = root + has_relation_best_friend = root + has_relation_blood_brother = root + } + } + any_vassal = { + is_powerful_vassal = yes + is_obedient_to = root + mpo_valid_heir_friend_trigger = { CHARACTER = root } + OR = { + has_relation_friend = root + has_relation_best_friend = root + has_relation_blood_brother = root + } + } + any_relation = { + type = friend + mpo_valid_heir_friend_trigger = { CHARACTER = root } + AND = { + exists = root.liege + this = root.liege + } + } + } + add = 25 + } + #Weigh down if none of the valid options are of culture + modifier = { + NOR = { + any_ally = { + mpo_valid_heir_friend_trigger = { CHARACTER = root } + culture = root.culture + } + any_vassal = { + is_powerful_vassal = yes + is_obedient_to = root + mpo_valid_heir_friend_trigger = { CHARACTER = root } + culture = root.culture + } + any_relation = { + type = friend + mpo_valid_heir_friend_trigger = { CHARACTER = root } + culture = root.culture + } + } + add = -10 + } + #Weigh up if you are house members with a valid option + modifier = { + exists = root.house + OR = { + any_ally = { + mpo_valid_heir_friend_trigger = { CHARACTER = root } + exists = house + house = { + this = root.house + } + } + any_vassal = { + is_powerful_vassal = yes + is_obedient_to = root + mpo_valid_heir_friend_trigger = { CHARACTER = root } + exists = house + house = { + this = root.house + } + } + any_relation = { + type = friend + mpo_valid_heir_friend_trigger = { CHARACTER = root } + exists = house + house = { + this = root.house + } + } + } + add = 10 + } + } +} + + +# Expand the Steppe +# List is as follows: +# +## Western Steppe expansion regions: +# ghw_region_anatolia +# custom_eastern_balkans +# ghw_region_northern_russia +# ghw_region_southern_russia +# custom_hungary +# ghw_region_poland +# ghw_region_baltic +# dlc_mpo_steppe_caucasus_expansion +## Central Steppe expansion regions: +# world_transoxiana +# world_khorasan +# dlc_mpo_steppe_persia_expansion +# dlc_mpo_steppe_siberia_further_expansion +## Eastern Steppe expansion regions: +# world_steppe_tarim + +expand_the_steppe_decision = { + picture = { + reference = "gfx/interface/illustrations/event_scenes/mpo_raid_burning_asian.dds" + } + decision_group_type = nomad_major + ai_check_interval = 8 + + title = expand_the_steppe_decision_generic + + desc = expand_the_steppe_decision_desc + selection_tooltip = expand_the_steppe_decision_tooltip + + widget = { + gui = "decision_view_widget_option_list_generic" + controller = decision_option_list_controller + decision_to_second_step_button = "SELECT_ACTION" + show_from_start = yes + + + # steppe_west potential regions + item = { + value = custom_eastern_balkans + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:custom_eastern_balkans + } + } + } + is_valid = { + custom_tooltip = { + text = custom_eastern_balkans_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = custom_eastern_balkans + } + } + } + any_realm_province = { + geographical_region = custom_eastern_balkans + } + } + } + localization = custom_eastern_balkans + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = ghw_region_northern_russia + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:ghw_region_northern_russia + } + } + } + is_valid = { + custom_tooltip = { + text = custom_northern_russia_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = ghw_region_northern_russia + } + } + } + any_realm_province = { + geographical_region = ghw_region_northern_russia + } + } + } + localization = ghw_region_northern_russia + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = ghw_region_southern_russia + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:ghw_region_southern_russia + } + } + } + is_valid = { + custom_tooltip = { + text = custom_southern_russia_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = ghw_region_southern_russia + } + } + } + any_realm_province = { + geographical_region = ghw_region_southern_russia + } + } + } + localization = ghw_region_southern_russia + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = dlc_mpo_steppe_caucasus_expansion + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:dlc_mpo_steppe_caucasus_expansion + } + } + } + is_valid = { + custom_tooltip = { + text = custom_caucasus_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = dlc_mpo_steppe_caucasus_expansion + } + } + } + any_realm_province = { + geographical_region = dlc_mpo_steppe_caucasus_expansion + } + } + } + localization = dlc_mpo_steppe_caucasus_expansion + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = ghw_region_poland + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:ghw_region_poland + } + } + } + is_valid = { + custom_tooltip = { + text = custom_poland_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = ghw_region_poland + } + } + } + any_realm_province = { + geographical_region = ghw_region_poland + } + } + } + localization = ghw_region_poland + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 2137 + } + } + item = { + value = custom_hungary + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:custom_hungary + } + } + } + is_valid = { + custom_tooltip = { + text = custom_hungary_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = custom_hungary + } + } + } + any_realm_province = { + geographical_region = custom_hungary + } + } + } + localization = custom_hungary + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = ghw_region_anatolia + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:ghw_region_anatolia + } + } + } + is_valid = { + custom_tooltip = { + text = custom_anatolia_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = ghw_region_anatolia + } + } + } + any_realm_province = { + geographical_region = ghw_region_anatolia + } + } + } + localization = ghw_region_anatolia + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = ghw_region_baltic + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:ghw_region_baltic + } + } + } + is_valid = { + custom_tooltip = { + text = custom_baltics_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = ghw_region_baltic + } + } + } + any_realm_province = { + geographical_region = ghw_region_baltic + } + } + } + localization = ghw_region_baltic + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + + # steppe_central potential regions + item = { + value = world_transoxiana + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:world_transoxiana + } + } + } + is_valid = { + custom_tooltip = { + text = custom_transoxiana_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = world_transoxiana + } + } + } + any_realm_province = { + geographical_region = world_transoxiana + } + } + } + localization = world_transoxiana + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = dlc_mpo_steppe_siberia_further_expansion + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:dlc_mpo_steppe_siberia_further_expansion + } + } + } + is_valid = { + custom_tooltip = { + text = custom_siberia_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = dlc_mpo_steppe_siberia_further_expansion + } + } + } + any_realm_province = { + geographical_region = dlc_mpo_steppe_siberia_further_expansion + } + } + } + localization = dlc_mpo_steppe_siberia_further_expansion + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 0 #Tribes of the North + } + } + item = { + value = world_khorasan + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:world_khorasan + } + } + } + is_valid = { + custom_tooltip = { + text = custom_khorasan_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = world_khorasan + } + } + } + any_realm_province = { + geographical_region = world_khorasan + } + } + } + localization = world_khorasan + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = dlc_mpo_steppe_persia_expansion + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:dlc_mpo_steppe_persia_expansion + } + } + } + is_valid = { + custom_tooltip = { + text = custom_persia_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = dlc_mpo_steppe_persia_expansion + } + } + } + any_realm_province = { + geographical_region = dlc_mpo_steppe_persia_expansion + } + } + } + localization = dlc_mpo_steppe_persia_expansion + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + + ## Eastern Steppe + + item = { + value = world_steppe_tarim + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:world_steppe_tarim + } + } + } + is_valid = { + custom_tooltip = { + text = custom_tarim_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = world_steppe_tarim + } + } + } + any_realm_province = { + geographical_region = world_steppe_tarim + } + } + } + localization = world_steppe_tarim + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + } + + is_shown = { + has_mpo_dlc_trigger = yes + + government_has_flag = government_is_nomadic + + any_character_situation = { + situation:the_great_steppe ?= this + } + + OR = { + great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_anatolia } + great_steppe_not_in_sub_region_trigger = { REGION = custom_eastern_balkans } + great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_northern_russia } + great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_southern_russia } + great_steppe_not_in_sub_region_trigger = { REGION = custom_hungary } + great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_poland } + great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_baltic } + great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_caucasus_expansion } + great_steppe_not_in_sub_region_trigger = { REGION = world_transoxiana } + great_steppe_not_in_sub_region_trigger = { REGION = world_khorasan } + great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_persia_expansion } + great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_siberia_further_expansion } + great_steppe_not_in_sub_region_trigger = { REGION = world_steppe_tarim } + } + } + + is_valid = { + is_independent_ruler = yes + highest_held_title_tier >= tier_duchy + + trigger_if = { + limit = { + scope:ghw_region_anatolia = yes + } + completely_controls_region = ghw_region_anatolia + } + trigger_if = { + limit = { + scope:custom_eastern_balkans = yes + } + completely_controls_region = custom_eastern_balkans + } + trigger_if = { + limit = { + scope:ghw_region_northern_russia = yes + } + completely_controls_region = ghw_region_northern_russia + } + trigger_if = { + limit = { + scope:ghw_region_southern_russia = yes + } + completely_controls_region = ghw_region_southern_russia + } + trigger_if = { + limit = { + scope:custom_hungary = yes + } + completely_controls_region = custom_hungary + } + trigger_if = { + limit = { + scope:ghw_region_poland = yes + } + completely_controls_region = ghw_region_poland + } + trigger_if = { + limit = { + scope:ghw_region_baltic = yes + } + completely_controls_region = ghw_region_baltic + } + trigger_if = { + limit = { + scope:dlc_mpo_steppe_caucasus_expansion = yes + } + completely_controls_region = dlc_mpo_steppe_caucasus_expansion + } + + trigger_if = { + limit = { + scope:world_transoxiana = yes + } + completely_controls_region = world_transoxiana + } + trigger_if = { + limit = { + scope:world_khorasan = yes + } + completely_controls_region = world_khorasan + } + trigger_if = { + limit = { + scope:dlc_mpo_steppe_persia_expansion = yes + } + completely_controls_region = dlc_mpo_steppe_persia_expansion + } + trigger_if = { + limit = { + scope:dlc_mpo_steppe_siberia_further_expansion = yes + } + completely_controls_region = dlc_mpo_steppe_siberia_further_expansion + } + trigger_if = { + limit = { + scope:world_steppe_tarim = yes + } + completely_controls_region = world_steppe_tarim + } + } + + cooldown = { years = 5 } + + is_valid_showing_failures_only = { + trigger_if = { + limit = { + is_ai = no + } + NOT = { exists = involved_activity } + NOT = { has_trait = infirm } + is_available = yes + } + trigger_else = { + is_imprisoned = no + is_incapable = no + is_alive = yes + NOT = { has_trait = infirm } + } + } + + cost = { + prestige = { + value = { + add = mpo_expand_steppe_prestige_cost + #AI suck + if = { + limit = { + is_ai = yes + } + multiply = 0.5 + } + } + } + } + + effect = { + # Send a toast to yourself, as a confirmation that the Steppe Expansion happened + send_interface_toast = { + type = steppe_expansion_happened + title = expand_the_steppe_decision_notification_toast + left_icon = root + expanding_steppe_effect = yes + add_legitimacy = 150 + } + hidden_effect = { + # Send a notification to any other player in the Steppe + every_player = { + limit = { + NOT = { this = root } + + any_character_situation = { + situation:the_great_steppe ?= this + } + } + send_interface_message = { + type = steppe_expansion_happened + title = expand_the_steppe_decision_notification_toast + left_icon = root + show_as_tooltip = { + expanding_steppe_effect = yes + } + } + } + } + } + + ai_will_do = { + base = 1 + } +} + +#Diligent overwork for nomads +develop_fertility_decision = { + ai_check_interval = 0 + picture = { + reference = "gfx/interface/illustrations/event_scenes/mpo_hunt_steppe.dds" + } + sort_order = 60 + decision_group_type = nomad_minor + + desc = develop_fertility_decision_desc + + selection_tooltip = develop_fertility_decision_tooltip + + cooldown = { years = 10 } + + is_shown = { + OR = { + has_trait = diligent + has_trait = architect + has_trait = lifestyle_surveyor + } + is_landed = yes + government_has_flag = government_is_nomadic + } + + is_valid_showing_failures_only = { + is_at_war = no + is_adult = yes + } + + effect = { + capital_county ?= { + change_county_fertility = medium_county_fertility_gain + } + send_interface_toast = { + type = event_toast_effect_neutral + title = msg_develop_fertility + left_icon = root + + add_character_modifier = { + modifier = develop_fertility_modifier + years = 10 + } + } + + add_stress = medium_stress_impact_gain + } + + ai_potential = { + OR = { + has_trait = diligent + has_trait = architect + has_trait = lifestyle_surveyor + } + NOT = { + has_trait = temperate + } + } + + ai_will_do = { + base = 100 + + modifier = { + factor = 0 + stress >= 50 + } + } +} + +# New Tier Title for Nomads +nomad_higher_tier_title_decision = { + ai_check_interval = 6 + picture = { + reference = "gfx/interface/illustrations/event_scenes/mpo_steppe_evening.dds" + } + sort_order = 100 + decision_group_type = nomad_major + + cooldown = { years = 10 } + + cost = { + prestige = { + value = 125 + switch = { + trigger = root.highest_held_title_tier + tier_kingdom = { + value = 500 + } + tier_duchy = { + value = 250 + } + tier_county = { + value = 125 + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0.1 + } + } + } + + is_shown = { + government_has_flag = government_is_nomadic + highest_held_title_tier < tier_empire + } + + is_valid = { + is_at_war = no + is_landed = yes + is_independent_ruler = yes + is_confederation_member = no + is_tributary = no + switch = { + trigger = root.highest_held_title_tier + tier_kingdom = { + custom_tooltip = { + text = dominate_title_trigger_dominance_4 + OR = { + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_4 + } + } + } + tier_duchy = { + custom_tooltip = { + text = dominate_title_trigger_dominance_3 + OR = { + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_3 + } + } + } + tier_county = { + custom_tooltip = { + text = dominate_title_trigger_dominance_2 + OR = { + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_2 + } + } + } + } + } + + effect = { + play_music_cue = mx_cue_the_khans_glory + save_scope_as = root_scope + root.primary_title.de_jure_liege ?= { save_scope_as = title_scope } + if = { + limit = { + exists = scope:title_scope.holder + } + hidden_effect = { + scope:title_scope.holder = { save_scope_as = main_defender } + root = { + if = { + limit = { + any_truce_target = { this = scope:main_defender } + } + cancel_truce_both_ways = scope:main_defender + } + } + start_war = { + cb = domination_cb + target = scope:main_defender + target_title = scope:title_scope + } + } + custom_tooltip = domination_war_holder_custom_tooltip + } + else_if = { + limit = { + scope:title_scope ?= { + NOT = { exists = holder } + any_de_jure_county_holder = { + is_landed = yes + NOR = { + top_liege ?= root + top_suzerain ?= root + is_allied_to = root + government_has_flag = government_is_herder + } + is_independent_ruler = yes + } + } + } + hidden_effect = { + scope:title_scope = { + every_de_jure_county_holder = { + limit = { + is_landed = yes + NOR = { + top_liege ?= root + top_suzerain ?= root + is_allied_to = root + government_has_flag = government_is_herder + } + is_independent_ruler = yes + } + add_to_list = war_targets + } + ordered_in_list = { + list = war_targets + order_by = current_military_strength + save_scope_as = main_defender + } + } + root = { + if = { + limit = { + any_truce_target = { this = scope:main_defender } + } + cancel_truce_both_ways = scope:main_defender + } + } + start_war = { + cb = domination_cb + target = scope:main_defender + target_title = scope:title_scope + } + random_character_war = { + limit = { + primary_attacker = root + primary_defender = scope:main_defender + } + every_in_list = { + list = war_targets + limit = { + NOT = { is_participant_in_war = prev } + } + prev = { + add_defender = prev + } + } + } + } + custom_tooltip = domination_war_no_holder_custom_tooltip + } + else_if = { + limit = { + exists = scope:title_scope + } + scope:title_scope ?= { + create_title_and_vassal_change = { + type = created + save_scope_as = change + } + change_title_holder = { + holder = root + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + } + else = { + custom_tooltip = nomad_higher_tier_title_decision_custom_tooltip + } + } + + ai_potential = { + OR = { + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_3 + } + current_military_strength >= 2000 + root.current_military_strength > dominate_title_current_enemy_strength + } + + ai_will_do = { + base = 50 + } +} + +#Transition from Gurkhan to GREATEST KHAN EVER +mpo_become_greatest_of_khans_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/mpo_decision_great_khan.dds" + } + + desc = { + desc = mpo_become_greatest_of_khans_decision_desc + triggered_desc = { + trigger = { + NOR = { + #Playing as Genghis + this = character:125501 + #He came and went without becoming Genghis + exists = global_var:genghis_died + has_game_rule = never_mongol_invasion + } + } + desc = mpo_become_greatest_of_khans_decision_genghis_warning + } + } + + cooldown = { + years = 5 + } + + ai_check_interval = 12 + sort_order = 200 + + decision_group_type = nomad_major + + is_shown = { + government_has_flag = government_is_nomadic + exists = situation:the_great_steppe + any_character_situation = { + this = situation:the_great_steppe + } + is_playable_character = yes + NOR = { + has_trait = greatest_of_khans + any_owned_story = { + story_type = story_greatest_of_khans + } + } + } + + is_valid = { + custom_tooltip = { + text = gok_mongols_disable_warning_tt + NOT = { + has_global_variable = mongol_empire_has_spawned + } + } + custom_tooltip = { + text = greatest_of_khans_disable_warning_tt + NOT = { + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:mpo_become_greatest_of_khans_decision + } + } + } + custom_tooltip = { + text = greatest_of_khans_war_ongoing_tt + NOT = { + exists = global_var:mpo_gok_war_ongoing + } + } + custom_tooltip = { + text = is_nomadic_tt + government_has_flag = government_is_nomadic + } + custom_tooltip = { + text = in_great_steppe_tt + any_character_situation = { + this = situation:the_great_steppe + } + } + is_at_war = no + has_realm_law = nomadic_authority_5 + prestige_level >= 4 + highest_held_title_tier = tier_empire + trigger_if = { # If you are player Temüjin we waive this requirements + limit = { + NOT = { this = character:125501 } + } + OR = { + sub_realm_size >= mpo_greatest_of_khans_target_counties + save_temporary_scope_value_as = { + name = temp_gok_tributaries + value = sub_realm_with_tributaries_size + } + + custom_tooltip = { + text = greatest_of_khans_tributary_req + sub_realm_with_tributaries_size >= mpo_greatest_of_khans_target_counties_tributaries + } + } + custom_tooltip = { + text = greatest_of_khans_vassal_culture_req_tt + OR = { + any_vassal = { + government_has_flag = government_is_nomadic + culture = { + save_temporary_scope_as = culture_1 + } + } + any_tributary = { + government_has_flag = government_is_nomadic + culture = { + save_temporary_scope_as = culture_1 + } + } + } + OR = { + any_vassal = { + government_has_flag = government_is_nomadic + NOT = { + culture = scope:culture_1 + } + culture = { + save_temporary_scope_as = culture_2 + } + } + any_tributary = { + government_has_flag = government_is_nomadic + NOT = { + culture = scope:culture_1 + } + culture = { + save_temporary_scope_as = culture_2 + } + } + } + OR = { + any_vassal = { + government_has_flag = government_is_nomadic + NOR = { + culture = scope:culture_1 + culture = scope:culture_2 + } + culture = { + save_temporary_scope_as = culture_3 + } + } + any_tributary = { + government_has_flag = government_is_nomadic + NOR = { + culture = scope:culture_1 + culture = scope:culture_2 + } + culture = { + save_temporary_scope_as = culture_3 + } + } + } + trigger_if = { + limit = { + is_ai = no + } + OR = { + any_vassal = { + government_has_flag = government_is_nomadic + NOR = { + culture = scope:culture_1 + culture = scope:culture_2 + culture = scope:culture_3 + } + culture = { + save_temporary_scope_as = culture_4 + } + } + any_tributary = { + government_has_flag = government_is_nomadic + NOR = { + culture = scope:culture_1 + culture = scope:culture_2 + culture = scope:culture_3 + } + culture = { + save_temporary_scope_as = culture_4 + } + } + } + OR = { + any_vassal = { + government_has_flag = government_is_nomadic + NOR = { + culture = scope:culture_1 + culture = scope:culture_2 + culture = scope:culture_3 + culture = scope:culture_4 + } + culture = { + save_temporary_scope_as = culture_5 + } + } + any_tributary = { + government_has_flag = government_is_nomadic + NOR = { + culture = scope:culture_1 + culture = scope:culture_2 + culture = scope:culture_3 + culture = scope:culture_4 + } + } + } + } + } + } + #AI cheat a little because they lack intent + trigger_if = { + limit = { + is_ai = no + } + custom_tooltip = { + text = greatest_of_khans_obedience_req_tt + NOT = { + any_powerful_vassal = { + government_has_flag = government_is_nomadic + obedience_target = root + is_obedient = no + is_ai = yes + } + } + } + } + trigger_else = { + NOT = { + any_powerful_vassal = { + is_ai = yes + government_has_flag = government_is_nomadic + has_dread_level_towards = { + target = root + level < 1 + } + AND = { + obedience_target = root + is_obedient = no + is_ai = yes + } + opinion = { + target = root + value <= 50 + } + } + } + } + trigger_if = { + limit = { + is_ai = no + this = character:125501 # Temüjin + has_variable = had_mpo_temujin_flavor_0020 + } + custom_tooltip = { + text = temujin_jamukha_gok_requirement + character:mpo_mongol_1 = { # Jamukha + is_alive = no + } + } + } + } + + is_valid_showing_failures_only = { + is_landed = yes + is_adult = yes + trigger_if = { + limit = { + is_ai = no + } + is_available = yes + } + trigger_else = { + is_imprisoned = no + is_incapable = no + is_alive = yes + NOT = { has_trait = infirm } + } + is_independent_ruler = yes + } + + cost = { + gold = { + value = massive_gold_value + } + prestige = { + value = massive_prestige_value + } + } + + effect = { + + custom_description_no_bullet = { text = mpo_gok_war_of_submission_will_happen_tt } + custom_tooltip = mpo_gok_cravens_wont_fight_tt + custom_tooltip = mpo_gok_obedient_vassals_join_war_tt + add_character_modifier = { + modifier = aspiring_great_khan_modifier + years = 5 + } + + custom_description_no_bullet = { text = mpo_gok_war_of_submission_victory_tt } + custom_tooltip = greatest_of_khans_will_disable_warning_tt + show_as_tooltip = { + add_trait = greatest_of_khans + } + custom_tooltip = greatest_of_khans_prevents_mongol_invasion_tt + custom_tooltip = mpo_gok_war_of_submission_vassals_tt + custom_tooltip = mpo_gok_war_of_submission_truces_tt + gain_heroic_legend_seed_tooltip_effect = yes + + show_as_tooltip = { + custom_tooltip = greatest_of_khans_nickname_tt + add_prestige = monumental_prestige_gain + add_legitimacy = monumental_legitimacy_gain + + custom_tooltip = become_greatest_of_khans_decision_enable_gok_invasion_cb + custom_tooltip = become_greatest_of_khans_decision_gok_armies_tt + if = { + limit = { + culture = culture:mongol + } + custom_tooltip = become_greatest_of_khans_decision_gain_mongol_empire + } + else = { + custom_tooltip = become_greatest_of_khans_decision_gain_gok_empire + } + + if = { + limit = { + NOT = { + has_realm_law = single_heir_succession_kurultai_law + } + } + add_realm_law_skip_effects = single_heir_succession_kurultai_law + } + custom_tooltip = gain_gok_dynasty_modifier_tt + } + + custom_description_no_bullet = { text = mpo_gok_war_of_submission_defeat_tt } + custom_tooltip = mpo_gok_war_of_submission_defeat_imprisonment_tt + custom_tooltip = mpo_gok_war_of_submission_defeat_lose_titles_tt + custom_tooltip = mpo_gok_war_of_submission_defeat_lose_herd_tt + show_as_tooltip = { + add_legitimacy = monumental_legitimacy_loss + if = { + limit = { + government_has_flag = government_is_nomadic + has_realm_law = nomadic_authority_2 + NOT = { + has_realm_law = nomadic_authority_1 + } + } + add_realm_law = nomadic_authority_1 + } + else_if = { + limit = { + government_has_flag = government_is_nomadic + NOT = { + has_realm_law = nomadic_authority_1 + } + } + add_realm_law = nomadic_authority_2 + } + add_prestige_level = -1 + } + + save_scope_as = genghis_khan + + hidden_effect = { + #Make list of rulers who are willing to fight + #All valid nomads in same steppes + situation:the_great_steppe ?= { + every_situation_sub_region = { + limit = { + any_situation_sub_region_participant = { + this = root + } + } + every_situation_sub_region_participant = { + limit = { + mpo_gok_coalition_member_trigger = yes + } + add_to_list = anti_gok_coalition_members + } + } + #Add neighbors one region over if in just one region + if = { + limit = { + any_situation_sub_region = { + count <= 1 + any_situation_sub_region_participant = { + this = root + } + } + } + root = { + every_land_neighboring_realm_with_tributaries_owner = { + limit = { + government_has_flag = government_is_nomadic + mpo_gok_coalition_member_trigger = yes + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_to_list = anti_gok_coalition_members + } + if = { + limit = { + is_tributary = yes + top_suzerain = { + government_has_flag = government_is_nomadic + } + } + top_suzerain = { + add_to_list = anti_gok_coalition_members + } + } + if = { + limit = { + is_tributary = yes + suzerain = { + government_has_flag = government_is_nomadic + } + } + suzerain = { + add_to_list = anti_gok_coalition_members + } + } + + } + } + } + + } + #Find the most powerful ruler in your vicinity + mpo_find_powerful_opponent_for_gurkhan_effect = yes + + #People who hate you too, why not + every_relation = { + type = rival + limit = { + NOT = { + is_in_list = anti_gok_coalition_members + } + is_ruler = yes + mpo_gok_coalition_member_trigger = yes + } + add_to_list = anti_gok_coalition_members + } + + #Make list of neighbors that will submit + every_land_neighboring_realm_with_tributaries_owner = { + limit = { + mpo_gok_submitting_coward_trigger = yes + } + add_to_list = gok_submitters + if = { + limit = { + is_in_list = anti_gok_coalition_members + } + remove_from_list = anti_gok_coalition_members + } + } + } + + #add obedient vassals as war allies + hidden_effect = { + + #Make list of obedient vassals that will join you + every_vassal = { + limit = { + is_obedient = yes + government_has_flag = government_is_nomadic + is_ai = yes + } + add_to_list = obedient_nomad_vassals + } + } + + #Choose strongest coalition member + if = { + limit = { + any_in_list = { + list = anti_gok_coalition_members + current_military_strength > 0 + NOT = { + this = root + } + is_landed = yes + sub_realm_size >= 20 + government_has_flag = government_is_nomadic + is_independent_ruler = yes + } + } + ordered_in_list = { + list = anti_gok_coalition_members + order_by = current_military_strength + limit = { + NOT = { + this = root + } + is_landed = yes + sub_realm_size >= 20 + government_has_flag = government_is_nomadic + is_independent_ruler = yes + } + save_scope_as = primary_coalition_defender + } + } + else_if = { + limit = { + any_in_list = { + list = anti_gok_coalition_members + current_military_strength > 0 + is_landed = yes + sub_realm_size >= 12 + NOT = { + this = root + } + government_has_flag = government_is_nomadic + is_independent_ruler = yes + } + } + ordered_in_list = { + list = anti_gok_coalition_members + order_by = current_military_strength + limit = { + is_landed = yes + NOT = { + this = root + } + sub_realm_size >= 12 + government_has_flag = government_is_nomadic + is_independent_ruler = yes + } + save_scope_as = primary_coalition_defender + } + } + else = { + ordered_in_list = { + list = anti_gok_coalition_members + order_by = sub_realm_size + limit = { + highest_held_title_tier >= tier_duchy + NOT = { + this = root + } + is_independent_ruler = yes + } + save_scope_as = primary_coalition_defender + } + } + #It's possible no one is in list... need to find someone worthy + #In the WHOLE steppe + if = { + limit = { + NOT = { + exists = scope:primary_coalition_defender + } + } + situation:the_great_steppe ?= { + ordered_situation_participant = { + order_by = current_military_strength + limit = { + is_ai = yes + NOR = { + this = root + top_liege = root + } + highest_held_title_tier >= tier_duchy + is_independent_ruler = yes + } + save_scope_as = primary_coalition_defender + add_to_list = anti_gok_coalition_members + } + } + } + #And... root's strongest vassal, I guess + if = { + limit = { + NOT = { + exists = scope:primary_coalition_defender + } + } + ordered_vassal = { + order_by = current_military_strength + limit = { + is_ai = yes + NOT = { is_obedient_to = root } + NOR = { + government_has_flag = government_is_herder + is_imprisoned_by = root + } + is_allied_to = root + NOT = { + this = root + } + } + save_scope_as = primary_coalition_defender + } + } + #This great khan has been very thorough already + #Adding all members of all steppe regions + if = { + limit = { + NOT = { + any_in_list = { + count >= 4 + list = anti_gok_coalition_members + NOT = { + this = scope:primary_coalition_defender + } + } + } + } + situation:the_great_steppe ?= { + every_situation_participant = { + limit = { + is_ai = yes + NOT = { + government_has_flag = government_is_herder + } + NOR = { + is_allied_to = root + this = root + top_liege = root + has_relation_friend = root + has_relation_blood_brother = root + is_imprisoned_by = root + } + } + add_to_list = anti_gok_coalition_members + } + } + } + #Adding all non-loyal vassals + if = { + limit = { + NOT = { + any_in_list = { + count >= 4 + list = anti_gok_coalition_members + NOT = { + this = scope:primary_coalition_defender + } + } + } + } + every_vassal = { + limit = { + is_ai = yes + NOT = { is_obedient_to = root } + NOR = { + government_has_flag = government_is_herder + is_imprisoned_by = root + is_allied_to = root + } + NOT = { + this = root + } + } + add_to_list = anti_gok_coalition_members + } + } + + #Ok... hopefully now there DEFINITELY is a leader for root's enemies and at least a couple enemies to fight + + #hidden setup event + trigger_event = mpo_greatest_of_khans.0100 + } + + ai_potential = { + has_realm_law = nomadic_authority_5 + is_independent_ruler = yes + government_has_flag = government_is_nomadic + #Stronger than all neighbors + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + mpo_gok_coalition_member_trigger = yes + current_military_strength >= root.current_military_strength + } + } + OR = { + realm_size >= 70 + sub_realm_with_tributaries_size >= 120 + #Has an ally that can seriously help + any_ally = { + count >= 1 + OR = { + highest_held_title_tier >= tier_empire + current_military_strength >= root.current_military_strength + } + is_at_war = no + } + #Has strong allies + any_ally = { + count >= 2 + highest_held_title_tier >= tier_kingdom + is_at_war = no + } + any_ally = { + count >= 3 + highest_held_title_tier >= tier_duchy + is_at_war = no + } + #is conqueror already + has_trait = conqueror + #Is ballsy + OR = { + ai_boldness >= high_positive_ai_value + ai_energy >= high_positive_ai_value + ai_greed >= high_positive_ai_value + } + } + health >= poor_health + age <= 50 + } + + ai_will_do = { + base = 0 + #NOT twice as strong as any neighbor or char in steppe region + modifier = { + add = -25 + OR = { + any_land_neighboring_realm_with_tributaries_owner = { + mpo_gok_coalition_member_trigger = yes + #THIS SHOULD CHECK THEIR STRENGTH IS MORE THAN HALF ROOT'S + confederation_worthy_foe_strength_ratio_value_root < 2 + } + situation:the_great_steppe ?= { + any_situation_sub_region = { + any_situation_sub_region_participant = { + this = root + } + any_situation_sub_region_participant = { + NOT = { this = root } + #THIS SHOULD CHECK ROOT'S STRENGTH IS DOUBLE THEIRS + confederation_worthy_foe_strength_ratio_value_root < 2 + } + } + } + } + } + #Three times as strong as any neighbor or char in steppe region + modifier = { + add = 75 + NOR = { + any_land_neighboring_realm_with_tributaries_owner = { + mpo_gok_coalition_member_trigger = yes + #THIS SHOULD CHECK ROOT'S STRENGTH IS TRIPLE THEIRS + confederation_worthy_foe_strength_ratio_value_root < 3 + } + situation:the_great_steppe ?= { + any_situation_sub_region = { + any_situation_sub_region_participant = { + this = root + } + any_situation_sub_region_participant = { + NOT = { this = root } + #THIS SHOULD CHECK ROOT'S STRENGTH IS TRIPLE THEIRS + confederation_worthy_foe_strength_ratio_value_root < 3 + } + } + } + } + } + modifier = { + add = 25 + OR = { + ai_boldness > 0 + ai_energy > 0 + ai_greed > 0 + } + } + modifier = { + add = 25 + ai_boldness > 0 + ai_energy > 0 + ai_greed > 0 + } + modifier = { + add = -50 + OR = { + ai_boldness <= medium_negative_ai_value + ai_energy <= medium_negative_ai_value + ai_greed <= medium_negative_ai_value + } + } + modifier = { + add = 25 + OR = { + ai_boldness >= medium_positive_ai_value + ai_energy >= medium_positive_ai_value + ai_greed >= medium_positive_ai_value + } + } + modifier = { + add = 10 + culture = { + has_cultural_pillar = ethos_bellicose + } + } + modifier = { + add = -10 + culture = { + OR = { + has_cultural_tradition = tradition_isolationist + has_cultural_tradition = tradition_hereditary_hierarchy + has_cultural_tradition = tradition_legalistic + } + } + } + # If young - go for it!!!! + modifier = { + add = 20 + age <= 35 + } + #Want to make it less likely this happens early + modifier = { + add = -25 + current_date <= 1000 + } + #Want to make it more likely this happens if game is getting late and Genghis didn't happen somehow + modifier = { + add = 100 + current_date >= 1250 + } + } +} + +#GREATEST OF KHANS HAS BECOME LORD OF ALL +mpo_gok_world_conquest_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/mpo_decision_great_khan.dds" + } + decision_group_type = nomad_major + desc = mpo_gok_world_conquest_decision_desc + + ai_check_interval = 36 + sort_order = 300 + + is_shown = { + exists = global_var:first_gok.dynasty + exists = global_var:greatest_of_khans_title + has_mpo_dlc_trigger = yes + any_owned_story = { + story_type = story_greatest_of_khans + } + is_playable_character = yes + } + + is_valid = { + NOT = { + current_year >= global_var:gok_empire_crumble_date + } + dynasty = global_var:first_gok.dynasty + global_var:greatest_of_khans_title = { + holder = root + } + is_independent_ruler = yes + custom_tooltip = { + text = is_nomadic_tt + government_has_flag = government_is_nomadic + } + has_realm_law = nomadic_authority_5 + #Legitimace is hamstrung a bit if you don't own legends + trigger_if = { + limit = { + has_dlc_feature = legends + is_ai = no + } + legitimacy_level >= 5 + } + trigger_else_if = { + limit = { + NOT = { has_dlc_feature = legends } + is_ai = yes + } + legitimacy_level >= 3 + } + trigger_else = { + legitimacy_level >= 4 + } + + trigger_if = { + limit = { + is_ai = no + } + prestige_level >= 5 + } + trigger_else = { + prestige_level >= 4 + } + + highest_held_title_tier = tier_empire + + OR = { + sub_realm_size >= mpo_gok_world_conquest_target_counties + save_temporary_scope_value_as = { + name = temp_gok_tributaries + value = sub_realm_with_tributaries_size + } + + custom_tooltip = { + text = gok_world_conquest_tributary_req + sub_realm_with_tributaries_size >= mpo_gok_world_conquest_target_counties_tributaries + } + } + + #AI cheat a little because they lack intent + trigger_if = { + limit = { + is_ai = no + } + custom_tooltip = { + text = greatest_of_khans_obedience_req_tt + NOT = { + any_powerful_vassal = { + government_has_flag = government_is_nomadic + obedience_target = root + is_obedient = no + is_ai = yes + } + } + } + } + trigger_else = { + NOT = { + any_powerful_vassal = { + is_ai = yes + government_has_flag = government_is_nomadic + has_dread_level_towards = { + target = root + level < 1 + } + AND = { + obedience_target = root + is_obedient = no + is_ai = yes + } + opinion = { + target = root + value <= 50 + } + } + } + } + } + + is_valid_showing_failures_only = { + is_at_war = no + is_landed = yes + is_adult = yes + trigger_if = { + limit = { + is_ai = no + } + is_available = yes + } + trigger_else = { + is_imprisoned = no + is_incapable = no + is_alive = yes + NOT = { has_trait = infirm } + } + } + + cost = { + prestige = { + value = 5000 + } + gold = { + value = 5000 + if = { + limit = { is_ai = no } + #Realm size + if = { + limit = { root.realm_size >= 3000 } + multiply = 3 + } + else_if = { + limit = { root.realm_size >= 2500 } + multiply = 2.5 + } + else_if = { + limit = { root.realm_size >= 2000 } + multiply = 2 + } + else_if = { + limit = { root.realm_size >= 1500 } + multiply = 1.5 + } + } + } + } + + effect = { + save_scope_value_as = { + name = gok_empire_crumble_date + value = global_var:gok_empire_crumble_date + } + save_scope_as = actor + save_scope_as = gok + + gok_final_decision_list_setup = yes + + #SHOW GENERAL EFFECTS THAT HAPPEN REGARDLESS OF OPTION CHOICE + + custom_tooltip = gok_reform_never_available_again_tt + + custom_tooltip = gok_reform_invalides_gok_stuff_tt + custom_tooltip = gok_lose_succession_protection_tt + custom_tooltip = gok_avoid_timing_out_tt + + show_as_tooltip = { + gok_world_conquest_generic_rewards_effect = yes + } + custom_tooltip = gok_remain_nomadic_tt + if = { + limit = { + has_dlc_feature = admin_gov + } + custom_tooltip = gok_choose_government_switch_tt + } + else = { + custom_tooltip = gok_choose_government_switch_no_admin_tt + } + #SHOW SUPER NOMADIC EFFECTS + custom_description_no_bullet = { + text = gok_gov_if_super_nomadic_tt + } + custom_tooltip = gok_super_nomad_dread_and_gold_tt + custom_tooltip = gok_counties_become_nomad_counties_tt + custom_tooltip = gok_new_nomad_counties_lose_development_tt + custom_tooltip = gok_other_counties_lose_development_tt + custom_tooltip = gok_non_nomads_become_nomad_tt + custom_tooltip = gok_city_state_creation + + #SHOW GOVERNMENT CHANGE EFFECTS + custom_description_no_bullet = { + text = gok_gov_switch_options_tt + } + show_as_tooltip = { + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + gok_upgrade_realm_and_government_effect = yes + } + #Gain innovations if ya need em + if = { + limit = { + culture = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + } + ordered_realm_county = { + order_by = development_level + limit = { + culture = { + has_cultural_era_or_later = culture_era_early_medieval + save_temporary_scope_as = realm_culture + NOT = { + this = root.culture + } + } + root.culture = { + can_get_innovation_from = scope:realm_culture + + } + } + culture = {save_scope_as = realm_culture_1 } + } + } + if = { + limit = { + culture = { + NOT = { + has_cultural_era_or_later = culture_era_high_medieval + } + } + } + ordered_realm_county = { + order_by = development_level + limit = { + trigger_if = { + limit = { + exists = scope:realm_culture_1 + } + NOT = { + culture = scope:realm_culture_1 + } + } + + culture = { + NOT = { + this = root.culture + } + has_cultural_era_or_later = culture_era_high_medieval + save_temporary_scope_as = realm_culture + } + root.culture = { + can_get_innovation_from = scope:realm_culture + + } + } + culture = { save_scope_as = realm_culture_2 } + } + } + if = { + limit = { + culture = { + NOT = { + has_cultural_era_or_later = culture_era_late_medieval + } + } + } + ordered_realm_county = { + order_by = development_level + limit = { + culture = { + trigger_if = { + limit = { + exists = scope:realm_culture_1 + } + NOT = { + this = scope:realm_culture_1 + } + } + trigger_if = { + limit = { + exists = scope:realm_culture_2 + } + NOT = { + this = scope:realm_culture_2 + } + } + NOT = { + this = root.culture + } + has_cultural_era_or_later = culture_era_late_medieval + save_temporary_scope_as = realm_culture + } + root.culture = { + can_get_innovation_from = scope:realm_culture + + } + } + culture = { save_scope_as = realm_culture_3 } + } + } + if = { + limit = { + exists = scope:realm_culture_1 + exists = scope:realm_culture_2 + exists = scope:realm_culture_3 + } + custom_tooltip = gok_3_innovation_gain + } + else_if = { + limit = { + exists = scope:realm_culture_1 + exists = scope:realm_culture_2 + } + custom_tooltip = gok_2_innovation_gain + } + else_if = { + limit = { + exists = scope:realm_culture_1 + } + custom_tooltip = gok_1_innovation_gain + } + #Fires event that lets you choose new government type + trigger_event = { + id = mpo_greatest_of_khans.0030 + days = 1 + } + } + + ai_potential = { + any_owned_story = { + story_type = story_greatest_of_khans + } + sub_realm_size >= mpo_gok_world_conquest_target_counties + is_independent_ruler = yes + } + + ai_will_do = { + base = 100 + } +} + +settle_people_decision = { + picture = { + reference = "gfx/interface/illustrations/holding_types/city_western.dds" + } + decision_group_type = nomad_major + + ai_check_interval = 36 + + desc = settle_people_decision_desc + selection_tooltip = settle_people_decision_tooltip + + is_shown = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_playable_character = yes + } + + is_valid = { + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + custom_tooltip = { + text = step_away_from_the_steppe_decision_holding_tt + any_sub_realm_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + + is_valid_showing_failures_only = { + is_at_war = no + is_available = yes + } + + cost = { + prestige = { + value = medium_prestige_value + } + } + + effect = { + save_scope_as = nomad_settling_down + domicile.domicile_culture = { save_scope_as = invading_culture } + domicile.domicile_faith = { save_scope_as = invading_faith } + save_scope_value_as = { + name = invading_herd_value + value = domicile.herd + } + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + every_sub_realm_county = { + limit = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + add_to_list = potential_new_capitals + } + every_held_title = { + limit = { + tier = tier_county + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + add_to_list = potential_new_capitals + } + ordered_in_list = { + order_by = development_level + list = potential_new_capitals + save_scope_as = new_capital + } + if = { + limit = { + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + capital_county = { + save_scope_as = new_capital + } + } + if = { + limit = { + exists = scope:new_capital + capital_county != scope:new_capital + } + if = { + limit = { + scope:new_capital.holder != root + } + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = yes + } + scope:new_capital = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + set_realm_capital = scope:new_capital + } + scope:new_capital.duchy = { save_scope_as = nomad_duchy_for_name } + #Should gain target title, if possible + if = { + limit = { + OR = { + scope:new_capital.kingdom.holder ?= root + is_independent_ruler = no + } + } + # Already holds it, or is a vassal + } + else_if = { + limit = { + scope:new_capital.kingdom = { + NOT = { + exists = holder + } + } + } + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = yes + } + scope:new_capital.kingdom = { + save_scope_as = new_primary + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + else = { + #Gain capital duchy, if possible + if = { + limit = { + scope:new_capital.duchy = { + NOT = { + exists = holder + } + } + } + hidden_effect = { + create_title_and_vassal_change = { + type = created + save_scope_as = change_1 + add_claim_on_loss = yes + } + scope:new_capital.duchy = { + change_title_holder = { + holder = root + change = scope:change_1 + } + } + resolve_title_and_vassal_change = scope:change_1 + } + } + #Gain titular kingdom + if = { + limit = { + OR = { + highest_held_title_tier < tier_kingdom + NOT = { + any_held_title = { + tier = tier_kingdom + any_in_de_jure_hierarchy = { + tier = tier_county + holder.top_liege = root + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + } + } + custom_tooltip = overrunning_gain_titular_kingdom_tt + hidden_effect = { + create_dynamic_title = { + tier = kingdom + name = SETTLED_NOMAD_KINGDOM_NAME + adj = SETTLED_NOMAD_KINGDOM_NAME_ADJ + } + scope:new_title = { + save_scope_as = new_primary + set_definitive_form = yes + } + create_title_and_vassal_change = { + type = created + save_scope_as = change_2 + add_claim_on_loss = no + } + scope:new_title = { + set_can_be_named_after_dynasty = yes + change_title_holder = { + holder = root + change = scope:change_2 + } + } + resolve_title_and_vassal_change = scope:change_2 + scope:new_title = { generate_coa = yes } + } + } + } + + #Make this their primary title, if highest tier + hidden_effect = { + if = { + limit = { + exists = scope:new_primary + NOT = { + highest_held_title_tier > scope:new_primary.tier + } + } + set_primary_title_to = scope:new_primary + } + # Destroy kingdoms you no longer have land in + every_held_title = { + limit = { + tier = tier_kingdom + is_titular = no + NOT = { + any_in_de_jure_hierarchy = { + tier = tier_county + holder.top_liege = root + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + root = { + destroy_title = prev + } + } + } + + every_held_title = { + limit = { + tier >= tier_county + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + save_temporary_scope_as = nomadic_county + create_character = { + location = scope:nomadic_county.title_province + template = nomadic_chieftain_character + save_scope_as = new_nomadic_chieftain + } + + if = { + limit = { + root = { + is_independent_ruler = yes + is_tributary = no + } + } + + #Assign the seceding titles to the new nomadic chieftain + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:new_nomadic_chieftain + change = scope:change + take_baronies = yes + } + + #And give the chieftain their independence. + scope:new_nomadic_chieftain = { + becomes_independent = { change = scope:change } + } + resolve_title_and_vassal_change = scope:change + + scope:new_nomadic_chieftain = { + hidden_effect = { + change_government = nomad_government + } + } + } + else_if = { + limit = { + root = { + is_independent_ruler = yes + is_tributary = yes + } + } + + #Assign the seceding titles to the new nomadic chieftain + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:new_nomadic_chieftain + change = scope:change + take_baronies = yes + } + + #And make the chieftain a tributary of root's suzerain + start_tributary_interaction_effect = { + TRIBUTARY = scope:new_nomadic_chieftain + SUZERAIN = root.suzerain + } + + resolve_title_and_vassal_change = scope:change + + scope:new_nomadic_chieftain = { + hidden_effect = { + change_government = nomad_government + } + } + } + else = { + # root = { is_independent_ruler = no }, i.e. a vassal + + #Assign the seceding titles to the new nomadic chieftain + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:new_nomadic_chieftain + change = scope:change + take_baronies = yes + } + + #And make the chieftain vassal of root's liege + scope:new_nomadic_chieftain = { + change_liege = { + liege = root.liege + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + scope:new_nomadic_chieftain = { + hidden_effect = { + change_government = nomad_government + } + } + } + } + + if = { + limit = { + scope:new_capital.title_province ?= { + has_holding_type = tribal_holding + } + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_3 } + } + hidden_effect = { + add_realm_law_skip_effects = tribal_authority_3 + } + } + } + else_if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + change_government = clan_government + if = { + limit = { + NOT = { has_realm_law = crown_authority_3 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_3 + } + } + } + else = { + change_government = feudal_government + + if = { + limit = { + NOT = { has_realm_law = crown_authority_3 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_3 + } + } + } + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + root = { + destroy_title = prev + } + } + } + + if = { + limit = { + any_vassal = { + OR = { + has_government = nomad_government + has_government = herder_government + } + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + custom_tooltip = { + text = step_away_from_the_steppe_decision_vassal_convert + + every_vassal = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + if = { + limit = { + scope:new_capital.title_province = { + has_holding_type = tribal_holding + } + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = tribal_authority_1 + } + } + } + else_if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + change_government = clan_government + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + else = { + change_government = feudal_government + + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + root = { + destroy_title = prev + } + } + } + every_vassal = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + if = { + limit = { + scope:new_capital.title_province = { + has_holding_type = tribal_holding + } + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = tribal_authority_1 + } + } + } + else_if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + change_government = clan_government + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + else = { + change_government = feudal_government + + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + root = { + destroy_title = prev + } + } + } + + every_vassal = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + if = { + limit = { + scope:new_capital.title_province = { + has_holding_type = tribal_holding + } + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = tribal_authority_1 + } + } + } + else_if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + change_government = clan_government + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + else = { + change_government = feudal_government + + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + root = { + destroy_title = prev + } + } + } + } + } + } + } + } + custom_tooltip = { + text = settle_people_decision_usurp_until_domain_limit + hidden_effect = { + while = { + limit = { + domain_size <= domain_limit + any_sub_realm_county = { + holder != root + holder = { is_ai = yes } + OR = { + target_is_de_jure_liege_or_above = root.capital_county.kingdom + any_neighboring_county = { + holder = root + } + } + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + random_sub_realm_county = { + limit = { + holder != root + holder = { is_ai = yes } + OR = { + target_is_de_jure_liege_or_above = root.capital_county.kingdom + any_neighboring_county = { + holder = root + } + } + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + weight = { + base = 1 + modifier = { + add = { + every_neighboring_county = { + limit = { + holder = root + } + add = 100 + } + } + any_neighboring_county = { + holder = root + } + } + modifier = { + add = 10000 + any_neighboring_county = { + this = root.capital_county + } + } + } + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + change_title_holder = { + holder = root + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + } + } + } + + custom_tooltip = { + text = settle_people_decision_culture_shift + hidden_effect = { + capital_county = { + set_county_culture = scope:invading_culture + set_county_faith = scope:invading_faith + } + every_vassal = { + limit = { + culture = root.culture + highest_held_title_tier >= tier_duchy + } + #Convert capital to their culture + capital_county = { + set_county_culture = scope:invading_culture + set_county_faith = scope:invading_faith + } + } + while = { + limit = { + scope:invading_herd_value >= 2500 + any_sub_realm_county = { + NOT = { + culture = scope:invading_culture + } + } + } + random_sub_realm_county = { + limit = { + NOT = { + culture = scope:invading_culture + } + } + weight = { + base = 1 + modifier = { + add = { + every_neighboring_county = { + limit = { + culture = scope:invading_culture + } + add = 100 + } + } + any_neighboring_county = { + culture = scope:invading_culture + } + } + modifier = { + add = 10000 + any_neighboring_county = { + this = root.capital_county + } + } + } + set_county_culture = scope:invading_culture + set_county_faith = scope:invading_faith + } + save_scope_value_as = { + name = invading_herd_value + value = { + add = scope:invading_herd_value + subtract = 2500 + } + } + } + } + } + + custom_tooltip = { + text = step_away_from_the_steppe_decision_vassal_loss + + every_vassal = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + NOT = { + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + becomes_independent = { change = scope:change } + resolve_title_and_vassal_change = scope:change + } + + every_tributary = { + # all tributaries end + end_tributary = yes + } + } + } + + ai_potential = { + NOR = { + has_trait = greatest_of_khans + has_trait = conqueror + } + OR = { + has_trait = content + domicile.herd <= 500 + is_independent_ruler = no + AND = { + culture = { has_cultural_pillar = heritage_magyar } + OR = { + has_title = title:k_hungary + has_title = title:e_carpathia + } + } + NOT = { + any_sub_realm_county = { + title_province = { + has_holding_type = nomad_holding + } + } + } + } + } + + ai_will_do = { + base = 0 + + # different holdings are valued more or less + + modifier = { + add = 100 + any_sub_realm_county = { + count >= 3 + title_province = { + has_holding_type = castle_holding + } + } + } + + modifier = { + add = 10 + any_sub_realm_county = { + count >= 3 + title_province = { + has_holding_type = tribal_holding + } + } + } + + modifier = { + add = 20 + any_sub_realm_county = { + count >= 3 + title_province = { + NOT = { has_holding_type = nomad_holding } + } + } + } + + # development checks + + modifier = { + add = 25 + any_sub_realm_county = { + count >= 3 + root.capital_county != this + title_province = { + NOT = { has_holding_type = nomad_holding } + } + development_level >= root.capital_county.development_level + } + } + + modifier = { + add = 25 + any_held_title = { + count >= 5 + tier = tier_county + title_province = { + NOT = { has_holding_type = nomad_holding } + } + } + } + + # traits + + modifier = { + add = 10 + OR = { + highest_skill = learning + highest_skill = stewardship + } + } + modifier = { + add = 10 + OR = { + has_trait = craven + has_trait = lazy + has_trait = greedy + has_trait = reclusive + } + } + modifier = { + add = -25 + OR = { + highest_skill = martial + has_trait = athletic + } + } + modifier = { + add = -50 + has_trait = ambitious + } + + # Hungarians want to settle + modifier = { + add = 1000 + culture = { has_cultural_pillar = heritage_magyar } + OR = { + has_title = title:k_hungary + has_title = title:e_carpathia + } + } + + # Nomadic Vassals of non-Nomads want to settle down + modifier = { + add = 100 + top_liege != root + NOT = { + top_liege = { + government_has_flag = government_is_nomadic + } + } + } + + # Nomadic Vassals of Nomads do NOT want to settle down + modifier = { + factor = 0 + top_liege != root + top_liege = { + government_has_flag = government_is_nomadic + } + } + + modifier = { + factor = 0 + top_liege = { + government_has_flag = government_is_nomadic + } + highest_held_title_tier >= tier_kingdom + NOR = { + has_title = title:k_hungary + has_title = title:e_carpathia + any_sub_realm_county = { + count >= 10 + title_province = { + OR = { + has_holding_type = castle_holding + has_holding_type = tribal_holding + } + } + } + } + } + } +} + +step_away_from_the_steppe_decision = { + picture = { + reference = "gfx/interface/illustrations/event_scenes/mpo_rural_village_asian.dds" + } + decision_group_type = nomad_minor + + ai_check_interval = 36 + + desc = step_away_from_the_steppe_decision_desc + selection_tooltip = step_away_from_the_steppe_decision_tooltip + + is_shown = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_playable_character = yes + } + + is_valid = { + custom_tooltip = { + text = step_away_from_the_steppe_decision_holding_tt + any_sub_realm_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + + is_valid_showing_failures_only = { + is_at_war = no + is_available = yes + } + + cost = { + prestige = { + value = medium_prestige_value + } + } + + effect = { + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + every_sub_realm_county = { + limit = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + add_to_list = potential_new_capitals + } + every_held_title = { + limit = { + tier = tier_county + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + add_to_list = potential_new_capitals + } + ordered_in_list = { + order_by = development_level + list = potential_new_capitals + save_scope_as = new_capital + } + if = { + limit = { + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + capital_county = { + save_scope_as = new_capital + } + } + if = { + limit = { + exists = scope:new_capital + capital_county != scope:new_capital + } + if = { + limit = { + scope:new_capital.holder != root + } + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = yes + } + scope:new_capital = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + set_realm_capital = scope:new_capital + } + + every_held_title = { + limit = { + tier >= tier_county + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + save_temporary_scope_as = nomadic_county + create_character = { + location = scope:nomadic_county.title_province + template = nomadic_chieftain_character + save_scope_as = new_nomadic_chieftain + } + + if = { + limit = { + root = { + is_independent_ruler = yes + is_tributary = no + } + } + + #Assign the seceding titles to the new nomadic chieftain + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:new_nomadic_chieftain + change = scope:change + take_baronies = yes + } + + #And give the chieftain their independence. + scope:new_nomadic_chieftain = { + becomes_independent = { change = scope:change } + } + resolve_title_and_vassal_change = scope:change + + scope:new_nomadic_chieftain = { + hidden_effect = { + change_government = nomad_government + } + } + } + else_if = { + limit = { + root = { + is_independent_ruler = yes + is_tributary = yes + } + } + + #Assign the seceding titles to the new nomadic chieftain + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:new_nomadic_chieftain + change = scope:change + take_baronies = yes + } + + #And make the chieftain a tributary of root's suzerain + start_tributary_interaction_effect = { + TRIBUTARY = scope:new_nomadic_chieftain + SUZERAIN = root.suzerain + } + + resolve_title_and_vassal_change = scope:change + + scope:new_nomadic_chieftain = { + hidden_effect = { + change_government = nomad_government + } + } + } + else = { + # root = { is_independent_ruler = no }, i.e. a vassal + + #Assign the seceding titles to the new nomadic chieftain + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:new_nomadic_chieftain + change = scope:change + take_baronies = yes + } + + #And make the chieftain vassal of root's liege + scope:new_nomadic_chieftain = { + change_liege = { + liege = root.liege + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + scope:new_nomadic_chieftain = { + hidden_effect = { + change_government = nomad_government + } + } + } + } + + if = { + limit = { + scope:new_capital.title_province ?= { + has_holding_type = tribal_holding + } + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = tribal_authority_1 + } + } + } + else_if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + change_government = clan_government + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + else = { + change_government = feudal_government + + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + root = { + destroy_title = prev + } + } + } + + if = { + limit = { + any_vassal = { + OR = { + has_government = nomad_government + has_government = herder_government + } + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + custom_tooltip = { + text = step_away_from_the_steppe_decision_vassal_convert + + every_vassal = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + if = { + limit = { + scope:new_capital.title_province = { + has_holding_type = tribal_holding + } + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = tribal_authority_1 + } + } + } + else_if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + change_government = clan_government + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + else = { + change_government = feudal_government + + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + root = { + destroy_title = prev + } + } + } + every_vassal = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + if = { + limit = { + scope:new_capital.title_province = { + has_holding_type = tribal_holding + } + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = tribal_authority_1 + } + } + } + else_if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + change_government = clan_government + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + else = { + change_government = feudal_government + + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + root = { + destroy_title = prev + } + } + } + + every_vassal = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + if = { + limit = { + scope:new_capital.title_province = { + has_holding_type = tribal_holding + } + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = tribal_authority_1 + } + } + } + else_if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + change_government = clan_government + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + else = { + change_government = feudal_government + + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + hidden_effect = { + add_realm_law_skip_effects = crown_authority_1 + } + } + } + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + root = { + destroy_title = prev + } + } + } + } + } + } + } + } + + custom_tooltip = { + text = step_away_from_the_steppe_decision_vassal_loss + + every_vassal = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + NOT = { + capital_county = { + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + + # they hate you + add_opinion = { + target = root + modifier = forsook_nomadic_life_opinion + } + + # also, they're leaving + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + becomes_independent = { change = scope:change } + resolve_title_and_vassal_change = scope:change + } + + every_tributary = { + # nomadic and herder tributaries will hate you + if = { + limit = { + OR = { + has_government = nomad_government + has_government = herder_government + } + } + add_opinion = { + target = root + modifier = forsook_nomadic_life_opinion + } + } + + # all tributaries end + end_tributary = yes + } + } + } + + ai_potential = { + NOR = { + has_trait = greatest_of_khans + has_trait = conqueror + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + OR = { + has_trait = content + domicile.herd <= 500 + is_independent_ruler = no + AND = { + culture = { has_cultural_pillar = heritage_magyar } + OR = { + has_title = title:k_hungary + has_title = title:e_carpathia + } + } + NOT = { + any_sub_realm_county = { + title_province = { + has_holding_type = nomad_holding + } + } + } + } + } + + ai_will_do = { + base = 0 + + # different holdings are valued more or less + + modifier = { + add = 100 + any_sub_realm_county = { + count >= 3 + title_province = { + has_holding_type = castle_holding + } + } + } + + modifier = { + add = 10 + any_sub_realm_county = { + count >= 3 + title_province = { + has_holding_type = tribal_holding + } + } + } + + modifier = { + add = 20 + any_sub_realm_county = { + count >= 3 + title_province = { + NOT = { has_holding_type = nomad_holding } + } + } + } + + # development checks + + modifier = { + add = 25 + any_sub_realm_county = { + count >= 3 + root.capital_county != this + title_province = { + NOT = { has_holding_type = nomad_holding } + } + development_level >= root.capital_county.development_level + } + } + + modifier = { + add = 25 + any_held_title = { + count >= 5 + tier = tier_county + title_province = { + NOT = { has_holding_type = nomad_holding } + } + } + } + + # traits + + modifier = { + add = 10 + OR = { + highest_skill = learning + highest_skill = stewardship + } + } + modifier = { + add = 10 + OR = { + has_trait = craven + has_trait = lazy + has_trait = greedy + has_trait = reclusive + } + } + modifier = { + add = -25 + OR = { + highest_skill = martial + has_trait = athletic + } + } + modifier = { + add = -50 + has_trait = ambitious + } + + # Hungarians want to settle + modifier = { + add = 1000 + culture = { has_cultural_pillar = heritage_magyar } + OR = { + has_title = title:k_hungary + has_title = title:e_carpathia + } + } + + # Nomadic Vassals of non-Nomads want to settle down + modifier = { + add = 100 + top_liege != root + NOT = { + top_liege = { + government_has_flag = government_is_nomadic + } + } + } + + # Nomadic Vassals of Nomads do NOT want to settle down + modifier = { + factor = 0 + top_liege != root + top_liege = { + government_has_flag = government_is_nomadic + } + } + + modifier = { + factor = 0 + top_liege = { + government_has_flag = government_is_nomadic + } + highest_held_title_tier >= tier_kingdom + NOR = { + has_title = title:k_hungary + has_title = title:e_carpathia + any_sub_realm_county = { + count >= 10 + title_province = { + OR = { + has_holding_type = castle_holding + has_holding_type = tribal_holding + } + } + } + } + } + } +} + +confederation_kingdom_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/mpo_decision_confederation.dds" + } + decision_group_type = major + ai_check_interval = 12 + desc = confederation_kingdom_decision_desc + + is_shown = { + is_confederation_member = yes + is_landed = yes + is_playable_character = yes + } + + is_valid = { + prestige_level >= 3 + is_independent_ruler = yes + custom_description = { + text = confederation_kingdom_decision_vassal_req + confederation = { + any_confederation_member = { + highest_held_title_tier >= tier_county + count >= 5 + } + } + } + custom_tooltip = { + text = confederation_kingdom_decision_vassal_opinion_req + NOT = { + confederation = { + any_confederation_member = { + this != root + opinion = { + target = root + value < 25 + } + } + } + } + } + custom_tooltip = { + text = confederation_kingdom_decision_vassal_prestige_level_req + NOT = { + confederation = { + any_confederation_member = { + this != root + prestige_level >= root.prestige_level + } + } + } + } + } + + is_valid_showing_failures_only = { + is_available_adult = yes + is_at_war = no + is_tributary = no + custom_tooltip = { + text = confederation_kingdom_decision_vassal_wars_req + NOT = { + confederation = { + any_confederation_member = { + is_at_war = yes + } + } + } + } + } + + cost = { + prestige = { + value = { + add = 0 + if = { + limit = { + government_has_flag = government_is_tribal + } + add = medium_prestige_value + } + } + } + herd = { + value = { + add = 0 + if = { + limit = { + government_has_flag = government_is_nomadic + } + add = medium_herd_value_static + } + } + } + } + + effect = { + custom_tooltip = confederation_kingdom_creation_tt + custom_tooltip = confederation_succession_tt + custom_tooltip = confederation_king_modifier_tt + custom_tooltip = confederation_vassal_modifier_tt + custom_tooltip = confederation_county_modifier_tt + save_scope_as = new_king_ruler + hidden_effect = { + confederation = { + every_confederation_member = { + add_to_list = confederation_vassals + every_tributary = { + limit = { + highest_held_title_tier <= tier_duchy + } + add_to_list = confederation_vassals + } + } + } + primary_title = { + save_scope_as = old_title + } + save_scope_as = confederation_offerer + create_dynamic_title = { + tier = kingdom + name = CONFEDERATION_CULTURE_NAME + adj = CONFEDERATION_CULTURE_NAME_ADJ + pre = article_CONFEDERATION_CULTURE_NAME + } + scope:new_title = { + set_variable = { + name = confederation_culture + value = scope:confederation_offerer.culture + } + } + scope:new_title = { + set_color_from_title = root.capital_county + set_definitive_form = yes + } + + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + scope:new_title = { + set_destroy_on_gain_same_tier = yes + set_no_automatic_claims = yes + set_can_be_named_after_dynasty = no + set_can_use_nomadic_naming = no + change_title_holder = { + holder = root + change = scope:change + } + } + every_in_list = { + list = confederation_vassals + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + every_in_list = { + list = confederation_vassals + limit = { + NOT = { + this = root + } + } + if = { + limit = { + has_government = herder_government + } + every_held_title = { + limit = { + tier = tier_county + title_province = { + has_holding_type = herder_holding + } + } + title_province = { + set_holding_type = nomad_holding + } + } + change_government = nomad_government + } + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + + scope:new_title = { + generate_coa = yes + add_title_law = confederation_elective_succession_law + set_capital_county = root.capital_county + } + set_primary_title_to = scope:new_title + confederation = { + disband_confederation = yes + } + every_in_list = { + list = confederation_vassals + limit = { + this != root + } + trigger_event = mpo_decisions_events.0004 + } + trigger_event = mpo_decisions_events.0005 + } + } + + ai_potential = { + is_confederation_member = yes + } + + ai_will_do = { + base = 100 + } +} + +settle_the_steppe_decision = { + picture = { + reference = "gfx/interface/illustrations/event_story/mpo_steppe_region.dds" + } + decision_group_type = nomad_major + + ai_check_interval = 360 + + desc = settle_the_steppe_decision_desc + selection_tooltip = settle_the_steppe_decision_tooltip + + is_shown = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_playable_character = yes + } + + is_valid = { + is_independent_ruler = yes + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + capital_county = { + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + custom_tooltip = { + text = step_away_from_the_steppe_decision_holding_tt + any_sub_realm_county = { + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + + is_valid_showing_failures_only = { + is_at_war = no + is_available = yes + } + + widget = { + gui = "decision_view_widget_option_list_generic" + controller = decision_option_list_controller + decision_to_second_step_button = "CHOOSE_GOVERNMENT_NEXT_STEP_BUTTON" + show_from_start = yes + + item = { + value = become_tribal_decision + current_description = become_tribal_decision + localization = become_tribal_decision + icon = "gfx/interface/icons/government_types/tribal_government.dds" + ai_chance = { + value = 0 + } + } + + item = { + value = become_feudal_decision + current_description = become_feudal_decision + localization = become_feudal_decision + icon = "gfx/interface/icons/government_types/feudal_government.dds" + is_valid = { + trigger_if = { + limit = { + NOR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + ai_chance = { + value = 100 + } + } + + item = { + value = become_clan_decision + current_description = become_clan_decision + localization = become_clan_decision + icon = "gfx/interface/icons/government_types/clan_government.dds" + is_valid = { + trigger_if = { + limit = { + NOR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + trigger_if = { + limit = { + NOR = { + faith.religion = religion:islam_religion + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_iranian } + culture = { has_cultural_pillar = heritage_turkic } + } + } + faith.religion = religion:islam_religion + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_iranian } + culture = { has_cultural_pillar = heritage_turkic } + } + } + ai_chance = { + value = 100 + } + } + } + + cost = { + gold = { + value = { + if = { + limit = { + scope:become_tribal_decision = yes + } + every_sub_realm_county = { + limit = { + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + add = 5 + } + } + else_if = { + limit = { + OR = { + scope:become_feudal_decision = yes + scope:become_clan_decision = yes + } + } + every_sub_realm_county = { + limit = { + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + add = 25 + } + } + } + } + prestige = { + value = major_prestige_value + } + } + + effect = { + # MPO ACHIEVEMENT Settling In + if = { + limit = { is_ai = no } + add_achievement_global_variable_effect = { + VARIABLE = mpo_settling_in_achievement_unlocked + VALUE = yes + } + } + save_scope_as = nomad_settling_down + domicile.domicile_culture = { save_scope_as = invading_culture } + domicile.domicile_faith = { save_scope_as = invading_faith } + save_scope_value_as = { + name = invading_herd_value + value = domicile.herd + } + save_scope_value_as = { + name = development_herd_value + value = domicile.herd + } + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + + show_as_tooltip = { + if = { + limit= { + scope:become_tribal_decision = yes + } + change_government = tribal_government + } + else_if = { + limit= { + scope:become_feudal_decision = yes + } + change_government = feudal_government + } + else_if = { + limit= { + scope:become_clan_decision = yes + } + change_government = clan_government + } + } + + custom_tooltip = nomad_holdings_convert_tt + custom_tooltip = nomad_vassals_convert_tt + custom_tooltip = buildings_based_on_herd_tt + custom_tooltip = development_based_on_herd_tt + + hidden_effect = { + #Nuke tribal authorities. + if = { + limit = { has_realm_law = nomadic_authority_1 } + remove_realm_law = nomadic_authority_1 + } + if = { + limit = { has_realm_law = nomadic_authority_2 } + remove_realm_law = nomadic_authority_2 + } + if = { + limit = { has_realm_law = nomadic_authority_3 } + remove_realm_law = nomadic_authority_3 + } + if = { + limit = { has_realm_law = nomadic_authority_4 } + remove_realm_law = nomadic_authority_4 + } + if = { + limit = { has_realm_law = nomadic_authority_5 } + remove_realm_law = nomadic_authority_5 + } + if = { + limit = { + scope:become_tribal_decision = yes + } + every_sub_realm_county = { + limit = { + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + title_province = { + set_holding_type = tribal_holding + } + add_to_list = holding_conversion + } + change_government = tribal_government + every_vassal_or_below = { + limit = { + has_government = nomad_government + } + #Nuke tribal authorities. + if = { + limit = { has_realm_law = nomadic_authority_1 } + remove_realm_law = nomadic_authority_1 + } + if = { + limit = { has_realm_law = nomadic_authority_2 } + remove_realm_law = nomadic_authority_2 + } + if = { + limit = { has_realm_law = nomadic_authority_3 } + remove_realm_law = nomadic_authority_3 + } + if = { + limit = { has_realm_law = nomadic_authority_4 } + remove_realm_law = nomadic_authority_4 + } + if = { + limit = { has_realm_law = nomadic_authority_5 } + remove_realm_law = nomadic_authority_5 + } + change_government = tribal_government + if = { + limit = { + NOT = { has_realm_law = tribal_authority_1 } + } + add_realm_law_skip_effects = tribal_authority_1 + } + } + #Start off tribal authorities. + if = { + limit = { + NOT = { has_realm_law = tribal_authority_2 } + } + add_realm_law_skip_effects = tribal_authority_2 + } + } + if = { + limit = { + OR = { + scope:become_feudal_decision = yes + scope:become_clan_decision = yes + } + } + every_sub_realm_county = { + limit = { + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + title_province = { + set_holding_type = castle_holding + } + add_to_list = holding_conversion + random_county_province = { + limit = { + has_holding = no + barony_cannot_construct_holding = no + } + random = { + chance = 50 + modifier = { + add = 50 + this.county = root.capital_county + } + modifier = { + add = 25 + scope:become_feudal_decision = yes + } + modifier = { + add = { + value = scope:invading_herd_value + divide = 1000 + } + } + set_holding_type = city_holding + } + } + random_county_province = { + limit = { + has_holding = no + barony_cannot_construct_holding = no + } + random = { + chance = 50 + modifier = { + add = 50 + this.county = root.capital_county + } + modifier = { + add = 50 + barony = { + is_holy_site_of = root.faith + } + } + modifier = { + add = 25 + scope:become_clan_decision = yes + } + modifier = { + add = { + value = scope:invading_herd_value + divide = 1000 + } + } + set_holding_type = church_holding + } + } + } + if = { + limit = { + scope:become_feudal_decision = yes + } + change_government = feudal_government + } + else_if = { + limit = { + scope:become_clan_decision = yes + } + change_government = clan_government + } + every_vassal_or_below = { + limit = { + has_government = nomad_government + } + #Nuke tribal authorities. + if = { + limit = { has_realm_law = nomadic_authority_1 } + remove_realm_law = nomadic_authority_1 + } + if = { + limit = { has_realm_law = nomadic_authority_2 } + remove_realm_law = nomadic_authority_2 + } + if = { + limit = { has_realm_law = nomadic_authority_3 } + remove_realm_law = nomadic_authority_3 + } + if = { + limit = { has_realm_law = nomadic_authority_4 } + remove_realm_law = nomadic_authority_4 + } + if = { + limit = { has_realm_law = nomadic_authority_5 } + remove_realm_law = nomadic_authority_5 + } + if = { + limit = { + scope:become_feudal_decision = yes + } + change_government = feudal_government + } + else_if = { + limit = { + scope:become_clan_decision = yes + } + change_government = clan_government + } + #Start off crown authorities. + if = { + limit = { + NOT = { has_realm_law = crown_authority_1 } + } + add_realm_law_skip_effects = crown_authority_1 + } + } + #Start off crown authorities. + if = { + limit = { + NOT = { has_realm_law = crown_authority_2 } + } + add_realm_law_skip_effects = crown_authority_2 + } + } + while = { + limit = { + scope:invading_herd_value >= 2000 + } + every_in_list = { + list = holding_conversion + every_county_province = { + generate_building = yes + } + } + save_scope_value_as = { + name = invading_herd_value + value = { + add = scope:invading_herd_value + subtract = 2000 + } + } + } + if = { + limit = { + scope:become_tribal_decision = yes + } + while = { + limit = { + scope:development_herd_value >= 2000 + } + random_sub_realm_county = { + weight = { + base = 1 + modifier = { + add = 9 + this = root.capital_county + } + modifier = { + add = 6 + any_neighboring_county = { + this = root.capital_county + } + } + modifier = { + factor = 1 + is_coastal_county = yes + } + } + change_development_level = 1 + } + save_scope_value_as = { + name = development_herd_value + value = { + add = scope:development_herd_value + subtract = 2000 + } + } + } + } + else = { + while = { + limit = { + scope:development_herd_value >= 1000 + } + random_sub_realm_county = { + weight = { + base = 1 + modifier = { + add = 9 + this = root.capital_county + } + modifier = { + add = 6 + any_neighboring_county = { + this = root.capital_county + } + } + modifier = { + factor = 1 + is_coastal_county = yes + } + } + change_development_level = 1 + } + save_scope_value_as = { + name = development_herd_value + value = { + add = scope:development_herd_value + subtract = 1000 + } + } + } + } + } + + } + + ai_potential = { + NOR = { + has_trait = greatest_of_khans + has_trait = conqueror + } + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + culture = { + has_cultural_tradition = tradition_ruling_caste + } + NOT = { + any_vassal_or_below = { + is_ai = no + } + } + } + + ai_will_do = { + base = 10 + } +} + +become_nomadic_decision = { + picture = { + reference = "gfx/interface/illustrations/event_story/mpo_steppe_region.dds" + } + + desc = become_nomadic_decision_desc + selection_tooltip = become_nomadic_decision_tooltip + + ai_check_interval = 0 + + is_shown = { + has_mpo_dlc_trigger = yes + NOT = { government_has_flag = government_is_nomadic } + is_playable_character = yes + capital_county = { + any_county_situation = { + OR = { + situation:the_great_steppe ?= this + situation:game_rule_extra_nomads_arabs ?= this + situation:game_rule_extra_nomads_sami ?= this + situation:game_rule_extra_nomads_tibet ?= this + situation:game_rule_extra_nomads_sahel ?= this + situation:game_rule_extra_nomads_horn ?= this + } + } + } + } + + is_valid = { + is_independent_ruler = yes + is_landed = yes + has_government = tribal_government + realm_size < 10 + } + + is_valid_showing_failures_only = { + is_at_war = no + is_available = yes + } + + cost = { + prestige = { + value = major_prestige_value + } + } + + effect = { + every_sub_realm_county = { + limit = { + title_province = { + has_holding_type = tribal_holding + } + } + title_province = { + set_holding_type = nomad_holding + } + } + change_government = nomad_government + every_vassal_or_below = { + limit = { + has_government = tribal_government + highest_held_title_tier >= tier_county + } + change_government = nomad_government + } + } + + ai_potential = { + always = no + } + + ai_will_do = { + base = 0 + } +} diff --git a/N3OW/common/on_action/title_on_actions.txt b/N3OW/common/on_action/title_on_actions.txt new file mode 100644 index 00000000..b712a3a8 --- /dev/null +++ b/N3OW/common/on_action/title_on_actions.txt @@ -0,0 +1,4446 @@ +#On actions about titles + +# All on-actions in this file provide scope:transfer_type unless otherwise noted +# scope:transfer_type has the following permutations: +# flag:conquest +# flag:conquest_holy_war +# flag:conquest_claim +# flag:conquest_populist +# flag:inheritance +# flag:abdication +# flag:destroyed +# flag:created +# flag:usurped +# flag:granted +# flag:revoked +# flag:election +# flag:independency +# flag:returned +# flag:leased_out +# flag:lease_revoked +# flag:faction_demand +# flag:swear_fealty +# flag:stepped_down + +# A title is destroyed +# root = the holder before destruction +# scope:landed_title = the title that is being destroyed +# Does *not* provide scope:transfer_type +on_title_destroyed = { + effect = { + # Adjust the size of the laamps tally. + else_if = { + limit = { + # Pre-filter out anything higher or lower. + scope:landed_title = { tier = tier_duchy } + has_global_variable_list = laamps_tally + } + # We don't need to check the list twice, since if they're not in it then removing them from it won't do anything. + remove_list_global_variable = { + name = laamps_tally + target = scope:landed_title + } + } + #Notify folks the latin empire has fallen + else_if = { + limit = { scope:landed_title = title:e_latin_empire } + frankokratia_latin_emp_end_msg_effect = yes + } + #Create byz collapse variable that defines anarchy period + else_if = { + limit = { + scope:landed_title = { + this = title:e_byzantium + } + } + if = { + limit = { + exists = global_var:byz_collapse_counter + } + remove_global_variable = byz_collapse_counter + } + set_global_variable = { + name = byz_collapse_counter + value = { + value = current_year + add = 100 + } + } + # Silk Road prosperity gets hit if Byzantium dies + tgp_silk_road_byzantium_destroyed_effect = yes + } + else_if = { + limit = { + scope:landed_title = title:h_china + } + situation:dynastic_cycle ?= { + if = { + limit = { + situation_top_has_catalyst = catalyst_hegemon_lost_mandate_of_heaven + } + trigger_situation_catalyst = { + catalyst = catalyst_hegemon_lost_mandate_of_heaven + character = root + } + } + } + every_vassal = { + # Because a change in liege isn't triggered when the title being destroyed + if = { + limit = { + government_has_flag = government_is_celestial + highest_held_title_tier >= tier_kingdom + primary_title = { + has_custom_title_name = no + } + tgp_capital_not_in_chinese_naming_region = no + } + if = { + limit = { + is_ai = no + } + trigger_event = { + id = tgp_dynastic_cycle.9000 + days = 1 # so the player gets to choose first + } + } + else = { + trigger_event = { + id = tgp_dynastic_cycle.9000 + days = 2 + } + } + } + } + title:h_china = { + reset_title_name = yes + } + } + else_if = { # Danelaw-England partition calc. + limit = { + # Partition must be active. + exists = global_var:partition_active_danelaw + # And the destroyed title must be one of the two partitioned entities. + OR = { + scope:landed_title = title:k_england + scope:landed_title = title:k_danelaw + } + } + # If k_england has been destroyed, set k_danelaw as the de jure inheritor. + if = { + limit = { scope:landed_title = title:k_england } + title:k_danelaw = { save_scope_as = partition_winner } + # Try to grab the old holder for down the line. + if = { + limit = { + exists = this + is_alive = yes + } + save_scope_as = loser + } + } + # If k_danelaw has been destroyed, set k_england as the de jure inheritor. + if = { + limit = { scope:landed_title = title:k_danelaw } + title:k_england = { save_scope_as = partition_winner } + if = { + limit = { + exists = this + is_alive = yes + } + save_scope_as = loser + } + } + # Either way, trigger the maintenance event. + trigger_event = british_isles.1041 + } + # Safety against invalid house bloc members + else_if = { + limit = { + scope:landed_title = { is_noble_family_title = yes } + exists = house.house_confederation + } + house = { + tgp_leave_house_bloc_effect = { + OPINION = flag:no + TRUCE = flag:no + } + } + } + } +} + +# A title is transferred to a new character +# root = the new holder +# scope:title = the title that changes hands +# scope:previous_holder = previous holder. Might be dead +on_title_gain = { + effect = { + ###################### + # COUNTY-TIER TITLES # + ###################### + if = { + limit = { + scope:title.tier = tier_county + } + + ########### + # MPO - Nomad Title Handling + ########### + if = { + limit = { + scope:title = { + is_nomad_title = yes + exists = title_domicile + } + } + scope:title = { + if = { + limit = { + root = { + any_held_title = { + is_nomad_title = yes + exists = title_domicile + NOT = { this = scope:title } + } + } + } + if = { + limit = { + root = { + any_held_title = { + is_nomad_title = yes + exists = title_domicile + NOT = { this = scope:title } + exists = var:player_domicile_title + } + } + } + root = { + random_held_title = { + limit = { + is_nomad_title = yes + exists = title_domicile + NOT = { this = scope:title } + exists = var:player_domicile_title + } + title_domicile = { + if = { + limit = { + exists = root.dynasty + scope:previous_holder.dynasty ?= root.dynasty + } + change_herd = { + value = scope:title.title_domicile.herd + } + } + } + root = { + destroy_title = scope:title + } + } + } + } + else_if = { + limit = { + exists = var:player_domicile_title + } + root = { + random_held_title = { + limit = { + is_nomad_title = yes + exists = title_domicile + NOT = { this = scope:title } + } + save_scope_as = old_nomad_title_to_clean_up + } + } + title_domicile = { + if = { + limit = { + exists = root.dynasty + scope:previous_holder.dynasty ?= root.dynasty + } + change_herd = { + value = scope:old_nomad_title_to_clean_up.title_domicile.herd + } + } + } + root = { + destroy_title = scope:old_nomad_title_to_clean_up + } + } + else_if = { + limit = { + root = { + any_held_title = { + is_nomad_title = yes + exists = title_domicile + NOT = { this = scope:title } + title_domicile.herd > scope:title.title_domicile.herd + } + } + } + root = { + random_held_title = { + limit = { + is_nomad_title = yes + exists = title_domicile + NOT = { this = scope:title } + title_domicile.herd > scope:title.title_domicile.herd + } + title_domicile = { + if = { + limit = { + exists = root.dynasty + scope:previous_holder.dynasty ?= root.dynasty + } + change_herd = { + value = scope:title.title_domicile.herd + } + } + } + } + destroy_title = scope:title + } + } + else = { + root = { + random_held_title = { + limit = { + is_nomad_title = yes + exists = title_domicile + NOT = { this = scope:title } + } + save_scope_as = old_nomad_title_to_clean_up + } + } + title_domicile = { + if = { + limit = { + exists = root.dynasty + scope:previous_holder.dynasty ?= root.dynasty + } + change_herd = { + value = scope:old_nomad_title_to_clean_up.title_domicile.herd + } + } + } + root = { + destroy_title = scope:old_nomad_title_to_clean_up + } + } + } + if = { + limit = { + exists = global_var:game_has_started + NOT = { + exists = previous_holder + } + } + if = { + limit = { + root = { + OR = { + house.house_head ?= { + this != root + any_held_title = { + is_nomad_title = yes + } + } + dynasty.dynast ?= { + this != root + any_held_title = { + is_nomad_title = yes + } + } + any_close_family_member = { + this != root + any_held_title = { + is_nomad_title = yes + } + } + } + } + } + generate_coa = yes # To lessen confusion thinking titles are the same + } + if = { + limit = { + current_year >= 1300 + } + title_domicile = { + add_domicile_building = yurt_main_02 + add_domicile_building = yurt_main_03 + add_domicile_building = yurt_main_04 + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + } + } + else_if = { + limit = { + current_year >= 1200 + } + title_domicile = { + add_domicile_building = yurt_main_02 + add_domicile_building = yurt_main_03 + add_domicile_building = yurt_main_04 + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + } + } + else_if = { + limit = { + current_year >= 1100 + } + title_domicile = { + add_domicile_building = yurt_main_02 + if = { + limit = { + has_domicile_building = yurt_main_02 + owner ?= { + OR = { + has_realm_law = nomadic_authority_2 + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + } + add_domicile_building = yurt_main_03 + } + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + } + } + else_if = { + limit = { + current_year >= 900 + } + title_domicile = { + add_domicile_building = yurt_main_02 + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + } + } + } + } + + ########### + # MPO - Edge case Nomadic Philosophy handover + ########### + if = { + limit = { + government_has_flag = government_is_nomadic + NOT = { + has_trait = nomadic_philosophy + } + exists = situation:the_great_steppe + any_character_situation = { + this = situation:the_great_steppe + } + } + add_trait = nomadic_philosophy + every_heir = { + limit = { + top_liege ?= root + NOT = { + has_trait = nomadic_philosophy + } + } + add_trait = nomadic_philosophy + } + } + } + ########### + # Nomads switch faith/culture of conquered nomadic counties + ########### + else_if = { + limit = { + scope:title.title_province ?= { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + government_has_flag = government_is_nomadic + exists = domicile + } + if = { + limit = { + has_character_flag = domicile_culture_and_faith_check + OR = { + domicile.domicile_culture != scope:title.culture + domicile.domicile_faith != scope:title.faith + } + } + domicile = { + set_domicile_culture = scope:title.culture + set_domicile_faith = scope:title.faith + } + remove_character_flag = domicile_culture_and_faith_check + } + else = { + if = { + limit = { domicile.domicile_culture != scope:title.culture } + scope:title ?= { + set_variable = { + name = migration_previous_culture + value = culture + } + set_county_culture = root.domicile.domicile_culture + } + } + if = { + limit = { domicile.domicile_faith != scope:title.faith } + scope:title = { set_county_faith = root.domicile.domicile_faith } + } + } + } + else = { + ########### + # Apply Law of the Land title succession law if appropriate + ########### + scope:title = { + add_law_of_the_land_title_succession_law_if_appropriate_effect = yes + } + } + + ########### + # MPO - Siberian permafrost modifier switcharoo + ########### + if = { + limit = { + scope:title.title_province = { + geographical_region = geographical_region:mpo_region_permafrost + } + } + if = { + limit = { + scope:title = { + has_county_modifier = mpo_siberian_permafrost_modifier_bad + } + culture ?= { has_cultural_parameter = permafrost_modifier_mechanic } + } + scope:title = { + remove_county_modifier = mpo_siberian_permafrost_modifier_bad + add_county_modifier = mpo_siberian_permafrost_modifier + } + } + else_if = { + limit = { + scope:title = { + has_county_modifier = mpo_siberian_permafrost_modifier + } + NOR = { + culture ?= { has_cultural_parameter = permafrost_modifier_mechanic } + } + } + scope:title = { + remove_county_modifier = mpo_siberian_permafrost_modifier + add_county_modifier = mpo_siberian_permafrost_modifier_bad + } + } + } + else_if = { + limit = { + OR = { + scope:title = title:c_antiocheia + scope:title = title:c_jerusalem + scope:title = title:c_alexandria + scope:title = title:c_roma + } + } + if = { + limit = { + OR = { + AND = { + is_roman_emperor_trigger = yes + faith = faith:orthodox + faith = { has_doctrine = special_doctrine_ecumenical_christian } + } + any_liege_or_above = { + is_roman_emperor_trigger = yes + faith = faith:orthodox + faith = { has_doctrine = special_doctrine_ecumenical_christian } + } + } + } + trigger_event = roman_restoration.0199 + } + ########### + # Transfer the Samaritan HoF to the realm that holds Jerusalem + ########### + if = { + limit = { + scope:title = title:c_jerusalem + title:d_samaritan.holder ?= { + # Samaritan HoF is not independent + # Samaritan liege is not Samaritan + top_liege.faith != faith:samaritan + top_liege != root + } + # root is at least a king, or their liege is, or their liege's liege is + OR = { + highest_held_title_tier >= tier_kingdom + any_liege_or_above = { + highest_held_title_tier >= tier_kingdom + } + } + } + create_title_and_vassal_change = { + type = created + save_scope_as = title_change + add_claim_on_loss = no + } + if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + title:d_samaritan.holder = { + change_liege = { + liege = root + change = scope:title_change + } + } + } + else = { + title:d_samaritan.holder = { + change_liege = { + liege = root.top_liege + change = scope:title_change + } + } + } + resolve_title_and_vassal_change = scope:title_change + } + } + + ########### + # FP1 - New holder for a county with a stele. + ########### + if = { + limit = { + # Using a scripted effect here so we can look at the same trigger in the grant title interaction + fp1_remove_stele_new_holder_trigger = { + TITLE = scope:title + PREVIOUS_HOLDER = scope:previous_holder + NEW_HOLDER = root + } + has_fp1_dlc_trigger = yes + } + scope:title = { + remove_variable = stele_scope_type + remove_variable = stele_container + remove_variable = stele_carver + remove_variable = stele_commissioner + remove_variable = stele_slot_occupied + remove_county_modifier = fp1_stele_ancestors_strong + remove_county_modifier = fp1_stele_ancestors_weak + remove_county_modifier = fp1_stele_conquest_strong + remove_county_modifier = fp1_stele_conquest_weak + remove_county_modifier = fp1_stele_promotion_strong + remove_county_modifier = fp1_stele_promotion_weak + } + } + ########### + # Non-FP1 - New holder of the county with a runestone + ########### + else_if = { + limit = { + scope:title = { + exists = var:ancestor_to_bury + } + dynasty != scope:previous_holder.dynasty #We only have to change something if the new holder is of a different dynasty + scope:title = { + NOT = { var:ancestor_to_bury.dynasty = root.dynasty } + } + } + scope:title = { + remove_county_modifier = county_raised_runestone_modifier + remove_variable = ancestor_to_bury + } + } + + ########### + # EP3 ADVENTURERS BECOMING LANDED + ########### + if = { + limit = { + scope:title = { is_landless_type_title = no } + any_held_title = { + title_tier = duchy + has_variable = adventurer_creation_reason + } + } + save_scope_as = adventurer + if = { + limit = { + NOR = { + has_trait = adventurer + government_has_flag = government_is_nomadic + } + } + add_trait = adventurer + } + every_courtier = { + set_variable = { + name = former_camp_leader + value = scope:adventurer + } + add_trait = adventurer_follower + } + if = { + limit = { + house = { + has_house_modifier = legacy_adventurer_house_modifier + } + } + add_legitimacy = massive_legitimacy_gain + set_variable = { + name = legacy_adventurers_to_levies + value = 0 + } + every_courtier = { + root = { + change_variable = { name = legacy_adventurers_to_levies add = 25 } + } + } + every_held_title = { + limit = { has_variable = adventurer_creation_reason } + save_scope_as = prev_title + } + spawn_army = { + levies = var:legacy_adventurers_to_levies + location = capital_province + name = remnants_adventurer_army + } + remove_variable = legacy_adventurers_to_levies + } + destroy_laamp_effect = { ADVENTURER = scope:adventurer } + # EP3 - Ensure NF holders are Admin + if = { + limit = { + scope:title = { is_noble_family_title = yes } + NOT = { government_has_flag = government_is_administrative } + } + change_government = administrative_government + } + } + } + ##################### + # DUCHY-TIER TITLES # + ##################### + else_if = { + limit = { + scope:title.tier = tier_duchy + } + + # Special Legitimacy gain for being elected (This is present in two places in this on_action) + if = { + limit = { + scope:title = { + has_order_of_succession = election + } + has_legitimacy = yes + } + save_scope_value_as = { + name = title_tier_minus_2 + value = { + value = scope:title.tier + subtract = 2 + } + } + send_interface_toast = { + type = msg_legitimacy_gain + title = legitimacy_gain_toast + left_icon = root + right_icon = scope:title + add_legitimacy = { + value = { + value = major_legitimacy_gain + multiply = scope:title_tier_minus_2 + } + } + } + } + + # Transfer title-bound artifacts with the title it's associated with (This is present in two places in this on_action) + if = { + limit = { + scope:previous_holder ?= { + any_character_artifact = { + has_variable = artifact_succession_title #Is this an artifact that should follow a title? + var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? + var:artifact_succession_title = scope:title #Scope title is the artifact title + } + } + } + scope:previous_holder = { + every_character_artifact = { + limit = { + has_variable = artifact_succession_title #Is this an artifact that should follow a title? + var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? + var:artifact_succession_title = scope:title #Scope title is the artifact title + } + if = { + limit = { + OR = { + scope:transfer_type = flag:conquest + scope:transfer_type = flag:conquest_holy_war + scope:transfer_type = flag:conquest_claim + scope:transfer_type = flag:conquest_populist + scope:transfer_type = flag:abdication + scope:transfer_type = flag:usurped + scope:transfer_type = flag:revoked + scope:transfer_type = flag:faction_demand + } + } + set_owner = { + target = root + history = { + type = conquest + actor = scope:previous_holder + recipient = root + location = scope:previous_holder.location + } + } + } + else = { + set_owner = { + target = root + history = { + type = inherited + recipient = root + } + } + } + } + } + } + + if = { + limit = { + government_has_flag = government_is_landless_adventurer + } + # EP3 ADVENTURERS TELEPORT TO THEIR CAMP + trigger_event = { + id = title_event.9911 + days = 1 + } + } + + # EP3 ADVENTURER TITLE BEING INHERITED BY A LANDED RULER + if = { + limit = { + scope:title = { + has_variable = adventurer_creation_reason + } + any_held_title = { + NOT = { has_variable = adventurer_creation_reason } + } + } + every_held_title = { + limit = { has_variable = adventurer_creation_reason } + save_scope_as = landless_adventurer_title + root = { destroy_title = scope:landless_adventurer_title } + } + } + # Have we been given a fair shake as a laamp, but we're sucking? + else_if = { + limit = { + has_government = landless_adventurer_government + is_ai = yes + scope:previous_holder = { is_ai = yes } + primary_title = { + any_past_holder = { count >= 4 } + } + NOR = { + # If the heir is sufficiently impressive, then we'll keep 'em around. + prestige_level >= 2 + # Legitimists are always worthwhile. + has_realm_law = camp_purpose_legitimists + # Reserve successful mercenary outfits. + AND = { + max_military_strength >= 1500 + # Allow absolute decimations to destroy mercs from time to time. + current_military_strength <= 150 + } + # Or those currently fighting alongside/against players. + AND = { + is_at_war = yes + OR = { + any_war_ally = { is_ai = no } + any_war_enemy = { is_ai = no } + } + } + # Depending on camp purpose, we want various skills. + AND = { + has_realm_law = camp_purpose_wanderers + OR = { + highest_skill_value >= very_high_skill_rating + prowess >= very_high_skill_rating + } + } + AND = { + has_realm_law = camp_purpose_mercenaries + OR = { + martial >= high_skill_rating + prowess >= high_skill_rating + } + } + AND = { + has_realm_law = camp_purpose_scholars + OR = { + learning >= high_skill_rating + diplomacy >= high_skill_rating + } + } + AND = { + has_realm_law = camp_purpose_explorers + OR = { + diplomacy >= high_skill_rating + stewardship >= high_skill_rating + } + } + AND = { + has_realm_law = camp_purpose_brigands + OR = { + intrigue >= high_skill_rating + prowess >= high_skill_rating + } + } + # Finally, keep anyone who's important to the player. + any_player = { + OR = { + root.dynasty ?= dynasty + is_consort_of = root + has_important_relationship_with_character_trigger = { CHARACTER = root } + any_pinned_character = { this = root } + any_pinned_character = { this = scope:previous_holder } + } + } + } + } + destroy_laamp_effect = { ADVENTURER = root } + } + # Holy Order Trait + else_if = { + limit = { + scope:title = { is_holy_order = yes } + NOT = { has_trait = order_member } + government_has_flag = government_is_holy_order + } + add_trait = order_member + } + + # Apply Created Title opinion to Courtly Vassals (This is present in two places in this on_action) + if = { + limit = { + scope:transfer_type = flag:created + is_alive = yes + } + every_vassal = { + vassal_stance = courtly + if = { + limit = { + scope:title.tier = tier_duchy + } + add_opinion = { + target = root + modifier = courtly_title_creation_opinion + opinion = 10 + } + } + else = { + add_opinion = { + target = root + modifier = courtly_title_creation_opinion + opinion = 30 + } + } + } + } + # Lil Johnny Lackland changes his nickname. + if = { + limit = { + has_nickname = nick_lackland_young + } + give_nickname = nick_lackland_ironic + } + } + ##################### + # KING+ TIER TITLES # + ##################### + else = { + # Newly formed Hegemon of China should spruce up their council + if = { + limit = { scope:title = title:h_china } + save_scope_as = councillor_liege + fill_the_ministry_effect = yes + } + # Hegemonies cannot have Ceremonial Regents + if = { + limit = { + exists = this + any_held_title = { exists = var:administrative_ui_special_title } + scope:title.tier = tier_hegemony + } + tgp_destroy_ceremonial_throne_effect = yes + if = { + limit = { has_trait = former_emperor } + remove_trait = former_emperor + } + } + # Ceremonial Liege + if = { + limit = { + OR = { + exists = scope:title.var:ceremonial_title + top_liege.primary_title.var:administrative_ui_special_title ?= scope:title + } + } + if = { + limit = { + exists = house + exists = scope:previous_holder.house + scope:previous_holder.house != house + } + scope:title = { set_coa = root.house } + } + remove_character_flag = ceremonial_regent_flag + } + if = { + limit = { exists = scope:title.var:ceremonial_title } + add_character_flag = ceremonial_liege_flag + } + # Reset raid remit + if = { + limit = { + this = top_liege + any_noble_family = { } + } + every_noble_family = { + holder = { remove_variable = raid_estate_permission } + } + } + # Special Legitimacy gain for being elected (This is present in two places in this on_action) + if = { + limit = { + scope:title = { + has_order_of_succession = election + } + has_legitimacy = yes + } + save_scope_value_as = { + name = title_tier_minus_2 + value = { + value = scope:title.tier + subtract = 2 + } + } + send_interface_toast = { + type = msg_legitimacy_gain + title = legitimacy_gain_toast + left_icon = root + right_icon = scope:title + add_legitimacy = { + value = { + value = major_legitimacy_gain + multiply = scope:title_tier_minus_2 + } + } + } + } + # Transfer title-bound artifacts with the title it's associated with (This is present in two places in this on_action) + if = { + limit = { + scope:previous_holder ?= { + any_character_artifact = { + has_variable = artifact_succession_title #Is this an artifact that should follow a title? + var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? + var:artifact_succession_title = scope:title #Scope title is the artifact title + } + } + } + scope:previous_holder = { + every_character_artifact = { + limit = { + has_variable = artifact_succession_title #Is this an artifact that should follow a title? + var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? + var:artifact_succession_title = scope:title #Scope title is the artifact title + } + if = { + limit = { + OR = { + scope:transfer_type = flag:conquest + scope:transfer_type = flag:conquest_holy_war + scope:transfer_type = flag:conquest_claim + scope:transfer_type = flag:conquest_populist + scope:transfer_type = flag:abdication + scope:transfer_type = flag:usurped + scope:transfer_type = flag:revoked + scope:transfer_type = flag:faction_demand + } + } + set_owner = { + target = root + history = { + type = conquest + actor = scope:previous_holder + recipient = root + location = scope:previous_holder.location + } + } + } + else = { + set_owner = { + target = root + history = { + type = inherited + recipient = root + } + } + } + } + } + } + # Grandeur in elective realms + if = { + limit = { + exists = var:previous_holder_grandeur_value + has_royal_court = yes + has_dlc_feature = royal_court + } + hidden_effect = { + change_current_court_grandeur = -100 # Reset to 0 + change_current_court_grandeur = var:previous_holder_grandeur_value + remove_variable = previous_holder_grandeur_value + } + } + # Apply Created Title opinion to Courtly Vassals (This is present in two places in this on_action) + if = { + limit = { + scope:transfer_type = flag:created + is_alive = yes + } + every_vassal = { + vassal_stance = courtly + if = { + limit = { + scope:title.tier = tier_duchy + } + add_opinion = { + target = root + modifier = courtly_title_creation_opinion + opinion = 10 + } + } + else = { + add_opinion = { + target = root + modifier = courtly_title_creation_opinion + opinion = 30 + } + } + } + } + # Empire and Hegemony stuff + if = { + limit = { + scope:title = { + tier >= tier_empire + } + } + # Byzantine-only: The Patriarch refuses to crown you as new emperor because you have a criminal trait (e.g. kinslayer) + if = { + limit = { + valid_for_byz_emperor_content_trigger = yes + has_ep3_dlc_trigger = yes + exists = root.faith.religious_head + this != faith.religious_head + faith.religious_head = { + opinion = { + target = root + value <= 0 + } + location = root.location + } + has_any_criminal_trait_in_faith_trigger = { + CHARACTER = root + FAITH = root.faith + } + NOT = { has_character_flag = has_had_ep3_2020 } + } + trigger_event = { + id = ep3_emperor_yearly.2020 + days = 1 + } + } + ### EP3 Admin Emperor Flavor ### + if = { + limit = { + # Not for meritocratic + NOT = { government_has_flag = government_has_merit } + # Admin only + government_allows = administrative + has_ep3_dlc_trigger = yes + # Independent rulers only + this = top_liege + # New title is higher or equal to your primary tier + highest_held_title_tier >= scope:title.tier + # You didn't just create the title + scope:title = { + any_past_holder = { } + # Your predecessor wasn't from your same house - not much to celebrate if you got the title from dad! + previous_holder ?= { + house != root.house + } + } + # Handled separately + tgp_realm_has_ceremonial_liege_trigger = no + } + trigger_event = { + id = ep3_emperor_yearly.2050 + days = 5 + } + } + #Byzantium is reborn! + if = { + limit = { + scope:title = { + this = title:e_byzantium + } + exists = global_var:byz_collapse_counter + } + save_scope_as = byz_emperor + title:e_byzantium = { + every_in_de_jure_hierarchy = { + limit = { + tier <= tier_kingdom + tier >= tier_county + is_title_created = yes + exists = holder + } + if = { + limit = { + holder ?= { + is_alive = yes + NOR = { + is_in_list = byz_return_notify + any_held_title = { + this = title:e_byzantium + } + } + } + } + holder = { + add_to_list = byz_return_notify + } + } + } + } + title:e_latin_empire = { + every_in_de_jure_hierarchy = { + limit = { + tier <= tier_kingdom + tier >= tier_county + is_title_created = yes + exists = holder + } + if = { + limit = { + holder = { + is_alive = yes + NOR = { + is_in_list = byz_return_notify + any_held_title = { + this = title:e_byzantium + } + } + } + } + holder = { + add_to_list = byz_return_notify + } + } + } + } + every_in_list = { + list = byz_return_notify + trigger_event = ep3_frankokratia_events.0130 + } + remove_global_variable = byz_collapse_counter + } + # TGP CHINA + else_if = { + limit = { + scope:title = title:h_china + } + # When conquering China - Change to conquest phase + if = { + limit = { + root.dynasty != scope:previous_holder.dynasty + } + if = { + limit = { + is_valid_celestial_dynasty = no + } + situation:dynastic_cycle = { + situation_top_sub_region = { + change_phase = { phase = situation_dynastic_cycle_phase_instability_conquest } + } + } + } + else_if = { + limit = { + situation:dynastic_cycle ?= { + situation_current_phase = situation_dynastic_cycle_phase_instability_conquest + } + } + situation:dynastic_cycle = { + situation_top_sub_region = { + change_phase = { phase = situation_dynastic_cycle_phase_instability } + } + } + } + } + # When inheriting China - Move towards instability/chaotic phase + if = { + limit = { + root.house != scope:previous_holder.house + current_date_is_start_date_trigger = no # We check this to avoid potentially triggering this immediately on game start + } + situation:dynastic_cycle = { + if = { + limit = { + situation_top_has_catalyst = catalyst_new_dynasty_inherits + } + trigger_situation_catalyst = catalyst_new_dynasty_inherits + } + } + } + # Clear the Strengthen Capital great project cooldown + situation:dynastic_cycle ?= { + if = { + limit = { has_variable = gp_strengthen_capital_cooldown } + remove_variable = gp_strengthen_capital_cooldown + } + } + #setup Grand Secretariat + if = { + limit = { + has_dlc_feature = all_under_heaven + NOT = { has_diarchy_type = grand_secretariat } + } + if = { + limit = { + has_realm_law = grand_chancellor_law + exists = title:h_china.holder.cp:councillor_chancellor + } + try_start_diarchy = grand_secretariat + set_diarch = title:h_china.holder.cp:councillor_chancellor + } + else_if = { + limit = { + has_realm_law = grand_marshal_law + exists = title:h_china.holder.cp:minister_grand_marshal + } + try_start_diarchy = grand_secretariat + set_diarch = title:h_china.holder.cp:minister_grand_marshal + } + else_if = { + limit = { + exists = title:h_china.holder.cp:councillor_spymaster + } + try_start_diarchy = grand_secretariat + set_diarch = title:h_china.holder.cp:councillor_spymaster + } + } + root.house.house_head.domicile ?= { + set_family_accomplishment_effect = { ACCOMPLISHMENT = family_accomplishment_dynasty } + } + } + else_if = { + limit = { + OR = { + scope:title = title:e_minister_chancellor + scope:title = title:e_minister_censor + scope:title = title:e_minister_grand_marshal + scope:title = title:e_minister_of_personnel + scope:title = title:e_minister_of_revenue + scope:title = title:e_minister_of_rites + scope:title = title:e_minister_of_war + scope:title = title:e_minister_of_justice + scope:title = title:e_minister_of_works + } + } + # set up the council holder as dejure liege of the ministry title, as this effect is not called with the same scope as council onactions + scope:title.de_jure_liege.holder = { + save_scope_as = councillor_liege + } + # If we get a minister title, make sure we set things up correctly + switch = { + trigger = scope:title + title:e_minister_chancellor = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_chancellor MINISTER_POSITION = councillor_chancellor } + } + title:e_minister_censor = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_censor MINISTER_POSITION = councillor_spymaster } + } + title:e_minister_grand_marshal = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_grand_marshal MINISTER_POSITION = minister_grand_marshal } + } + title:e_minister_of_personnel = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_of_personnel MINISTER_POSITION = minister_personnel } + } + title:e_minister_of_revenue = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_of_revenue MINISTER_POSITION = councillor_steward } + } + title:e_minister_of_rites = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_of_rites MINISTER_POSITION = councillor_court_chaplain } + } + title:e_minister_of_war = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_of_war MINISTER_POSITION = councillor_marshal } + } + title:e_minister_of_justice = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_of_justice MINISTER_POSITION = minister_justice } + } + title:e_minister_of_works = { + got_minister_position_effect = { MINISTER_TITLE = e_minister_of_works MINISTER_POSITION = minister_works } + } + } + } + # TGP JAPAN + else_if = { + limit = { scope:title = title:e_japan } + # TGP RETIRED EMPEROR + if = { + limit = { + exists = title:e_japan.var:administrative_ui_special_title + has_title = title:e_japan.var:administrative_ui_special_title + } + # Flavourization setup + title:e_japan = { remove_variable = shogun_flag } + remove_character_flag = shogun_flag + if = { # Flavourization setup + limit = { has_global_variable = tenno_restored } + title:e_japan = { set_variable = ceremonial_liege_flag } + add_character_flag = ceremonial_liege_flag + trigger_event = { + id = tgp_japan_general.9100 + days = 1 + } + } + else = { # Event to abdicate and become Joko + trigger_event = { + id = tgp_japan_general.9120 + days = 1 + } + } + } + # TGP SHOGUN + else_if = { + limit = { + has_government = japan_feudal_government + has_global_variable = shogunate_established + } + title:e_japan = { remove_variable = ceremonial_liege_flag } + remove_character_flag = ceremonial_liege_flag + title:e_japan = { set_variable = shogun_flag } + add_character_flag = shogun_flag + } + # TGP KAMPAKU + else = { + title:e_japan = { remove_variable = ceremonial_liege_flag } + remove_character_flag = ceremonial_liege_flag + title:e_japan = { remove_variable = shogun_flag } + remove_character_flag = shogun_flag + } + # Japanese regent laws + if = { + limit = { + tgp_realm_has_ceremonial_liege_trigger = yes + government_is_japanese_trigger = yes + NOR = { + has_global_variable = shogunate_established + has_global_variable = tenno_restored + } + } + if = { + limit = { + government_has_flag = government_is_japan_administrative + NOT = { has_realm_law = japanese_regency_succession_law } + } + add_realm_law_skip_effects = japanese_regency_succession_law + } + else_if = { + limit = { + government_has_flag = government_is_japan_feudal + has_realm_law = japanese_regency_succession_law + } + remove_realm_law = japanese_regency_succession_law + } + } + } + # ROME + else_if = { + limit = { + OR = { + scope:title = title:h_roman_empire + scope:title = title:h_eastern_roman_empire + } + NOT = { has_trait = augustus } + } + trigger_event = roman_restoration.0005 + } + #Mongol empire and GoK should lose other empires + if = { + limit = { + primary_title ?= { + OR = { + this = title:e_mongol_empire + AND = { + exists = global_var:greatest_of_khans_title + this = global_var:greatest_of_khans_title + } + } + } + scope:title = { + NOR = { + this = title:e_mongol_empire + AND = { + exists = global_var:greatest_of_khans_title + this = global_var:greatest_of_khans_title + } + } + } + is_ai = yes + } + destroy_title = scope:title + } + # You just inherited an Emperor title!! + if = { + limit = { + primary_title = scope:title + exists = scope:previous_holder + NOT = { #You don't already have an empire tier title + any_held_title = { + title_tier = empire + this != scope:title + } + } + # That isn't a part of the ministry + NOR = { + scope:title = title:e_minister_chancellor + scope:title = title:e_minister_censor + scope:title = title:e_minister_grand_marshal + scope:title = title:e_minister_of_personnel + scope:title = title:e_minister_of_revenue + scope:title = title:e_minister_of_rites + scope:title = title:e_minister_of_war + scope:title = title:e_minister_of_justice + scope:title = title:e_minister_of_works + } + } + trigger_event = { + id = realm_maintenance.2001 + days = 1 + } + } + if = { + limit = { + is_independent_ruler = yes + tgp_realm_has_ceremonial_liege_trigger = no + government_has_flag = government_is_meritocratic + } + trigger_event = { + id = tgp_korea_decision.9203 + days = 1 + } + } + # TGP CEREMONIAL FLAVOR + scope:previous_holder ?= { + if = { + limit = { is_alive = yes } + remove_character_flag = ceremonial_liege_flag + remove_character_flag = ceremonial_regent_flag + } + } + if = { + limit = { is_alive = yes } + remove_character_flag = ceremonial_liege_flag + remove_character_flag = ceremonial_regent_flag + } + top_liege.primary_title.var:administrative_ui_special_title.holder ?= { + remove_character_flag = ceremonial_liege_flag + remove_character_flag = ceremonial_regent_flag + } + if = { + limit = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + add_character_flag = ceremonial_regent_flag + top_liege.primary_title.var:administrative_ui_special_title.holder ?= { add_character_flag = ceremonial_liege_flag } + } + } + # West Francia becomes France when no longer controlled by a Karling + else_if = { + limit = { + scope:title = { + this = title:k_france + } + NOR = { + dynasty = { this = dynasty:25061 } # Not held by a Karling + any_liege_or_above = { + dynasty = { this = dynasty:25061 } # And does not have a liege that is a Karling + } + has_global_variable = west_francia_renamed + } + } + trigger_event = { + id = title_event.0001 + days = 1 + } + } + # East Francia becomes Germany when no longer controlled by a Karling + else_if = { + limit = { + scope:title = { + this = title:k_east_francia + } + NOR = { + dynasty = { this = dynasty:25061 } # Not held by a Karling + any_liege_or_above = { + dynasty = { this = dynasty:25061 } # And does not have a liege that is a Karling + } + has_global_variable = east_francia_renamed + } + } + trigger_event = { + id = title_event.0002 + days = 1 + } + } + # Hidden management event to determine if we need to axe Asturias &, if we do, what notification events to send out afterwards. + else_if = { + limit = { + scope:title = title:k_castille + title:k_asturias = { + # Leon must be de jure part of Asturias, or else there's no reason to ever stop calling it Asturias. + any_in_de_jure_hierarchy = { this = title:d_leon } + } + } + trigger_event = { + id = title_event.0011 + days = 1 + } + } + # FP2 El Cid Achievement + else_if = { + limit = { + scope:title = title:k_valencia + has_character_flag = fp2_el_cid_blood_relation_legacy + } + set_global_variable = { # DO. NOT. USE. add_achievement_global_variable_effect. IT BREAKS THE ACHIEVEMENT. + name = fp2_el_cid_achievement_unlocked + value = yes + } + } + # TGP CEREMONIAL RULER + # IMPERIAL INHERITANCE + else_if = { + limit = { + exists = scope:title.var:ceremonial_title + } + add_character_flag = ceremonial_liege_flag + trigger_event = { + id = tgp_japan_general.9100 + days = 1 + } + } + # Norway stuff + else_if = { + limit = { + # The title they've acquired is Norway. + scope:title = title:k_norway + } + # Tanglehair becomes Fairhair. + if = { + limit = { + # This character is Harald Fairhair. + exists = character:144000 + this = character:144000 + # Norway has been created by them. + scope:transfer_type = flag:created + # Norway has not been created previously. + NOT = { exists = global_var:norway_created } + } + trigger_event = { + id = fp1_major_decisions.1011 + days = 1 + } + } + # Check Norway's creation status. + if = { + limit = { + scope:transfer_type = flag:created + NOT = { exists = global_var:norway_created } + } + trigger_event = { + id = fp1_major_decisions.1012 + days = 1 + } + } + } + # English Partition Result - Gained Both + else_if = { + limit = { + # Partition must be active. + exists = global_var:partition_active_danelaw + # The gained title must be one of the two partitioned entities. + OR = { + scope:title = title:k_england + scope:title = title:k_danelaw + } + # And you must now hold both titles. + this = title:k_england.holder + this = title:k_danelaw.holder + } + trigger_event = { + id = british_isles.1032 + days = 1 + } + } + # Lil Johnny Lackland changes his nickname. + if = { + limit = { + has_nickname = nick_lackland_young + } + give_nickname = nick_lackland_ironic + } + } + + ############# + # STRUGGLES # + ############# + if = { + limit = { + exists = struggle:persian_struggle + } + #Struggle Catalysts + if = { + limit = { + scope:title.empire ?= title:e_persia + scope:title = { + tier >= tier_county + is_landless_type_title = no + } + NOR = { + scope:transfer_type = flag:created + scope:transfer_type = flag:inheritance + } + } + if = { + limit = { + fp3_character_uninvolved_in_struggle_trigger = yes + scope:previous_holder ?= { + fp3_character_involved_in_struggle_trigger = yes + any_character_struggle = { + phase_has_catalyst = catalyst_interloper_uninvolved_gain_struggle_titles + } + } + } + scope:previous_holder ?= { + every_character_struggle = { + limit = { phase_has_catalyst = catalyst_interloper_uninvolved_gain_struggle_titles } + activate_struggle_catalyst = { + catalyst = catalyst_interloper_uninvolved_gain_struggle_titles + character = root + } + log_debug_variable_for_persian_struggle_effect = { VAR = concession_catalyst_interloper_uninvolved_gain_struggle_titles } + } + } + } + if = { + limit = { + fp3_character_involved_in_struggle_trigger = yes + any_character_struggle = { + phase_has_catalyst = catalyst_gain_struggle_titles_from_interlopers_uninvolved + # Stop catalyst from affecting those who are only just now uninvolved due to losing this title + OR = { + NOT = { is_culture_involved_in_struggle = scope:previous_holder.culture } + NOT = { is_faith_involved_in_struggle = scope:previous_holder.faith } + } + } + scope:previous_holder ?= { + OR = { + fp3_character_uninvolved_in_struggle_trigger = yes + fp3_character_interloper_in_struggle_trigger = yes + } + } + } + every_character_struggle = { + limit = { phase_has_catalyst = catalyst_gain_struggle_titles_from_interlopers_uninvolved } + activate_struggle_catalyst = { + catalyst = catalyst_gain_struggle_titles_from_interlopers_uninvolved + character = root + } + log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_gain_struggle_titles_from_interlopers_uninvolved } + } + } + } + # FP3 Struggle special cases + if = { + limit = { + scope:title = { + OR = { + this = title:d_sunni + this = title:e_arabia + } + } + } + ## Convert detractors to supporters if they inherit either of the titles they're detracting against. + if = { + limit = { + NOT = { has_trait = fp3_struggle_supporter } + } + if = { + limit = { has_trait = fp3_struggle_detractor } + remove_trait = fp3_struggle_detractor + } + add_trait = fp3_struggle_supporter + } + # FP3 Title Transfer Notification + struggle:persian_struggle = { # Wet script + every_involved_ruler = { + send_interface_toast = { + type = event_toast_effect_bad + title = persian_struggle_central_title_transfer.t + left_icon = scope:previous_holder + right_icon = scope:title.holder + + custom_tooltip = persian_struggle_central_title_transfer.desc + } + } + every_interloper_ruler = { + send_interface_toast = { + type = event_toast_effect_bad + title = persian_struggle_central_title_transfer.t + left_icon = scope:previous_holder + right_icon = scope:title.holder + + custom_tooltip = persian_struggle_central_title_transfer.desc + } + } + } + } + } + + ############### + # GOVERNMENTS # + ############### + + # TGP bloc joining + if = { + limit = { + government_is_japanese_trigger = yes + tgp_house_bloc_interaction_valid_trigger = yes + is_house_head = no + NOT = { exists = confederation } + exists = house.house_head.confederation + liege = house.house_head.liege + is_at_war = no + } + save_scope_as = bloc_joiner + house.house_head.confederation = { add_confederation_member = scope:bloc_joiner } + } + # Challenged as house head in Japan + if = { + limit = { + government_is_japanese_trigger = yes + is_house_head = yes + } + trigger_event = { + weeks = { 2 4 } + id = tgp_japan_yearly_events.1210 + } + } + # TGP Catalysts + if = { + limit = { + scope:previous_holder ?= { + has_title = title:h_china + } + OR = { + scope:transfer_type = flag:granted + scope:transfer_type = flag:appointment + } + NOT = { has_appointment_level_for_title = scope:title } + } + situation:dynastic_cycle ?= { + if = { + limit = { situation_top_has_catalyst = catalyst_hegemon_appointing_low_merit_governor } + trigger_situation_catalyst = { + catalyst = catalyst_hegemon_appointing_low_merit_governor + character = scope:previous_holder + } + } + } + } + # If the minister's merit rank is too low, it will affect the dynastic cycle + if = { + limit = { + scope:title = { + OR = { + this = title:e_minister_chancellor + this = title:e_minister_censor + this = title:e_minister_grand_marshal + this = title:e_minister_of_personnel + this = title:e_minister_of_revenue + this = title:e_minister_of_rites + this = title:e_minister_of_war + this = title:e_minister_of_justice + this = title:e_minister_of_works + } + } + NOT = { has_appointment_level_for_title = scope:title } + } + situation:dynastic_cycle ?= { + if = { + limit = { situation_top_has_catalyst = catalyst_hegemon_appointing_low_merit_councillor } + trigger_situation_catalyst = { + catalyst = catalyst_hegemon_appointing_low_merit_councillor + character = root + } + } + } + } + # Admin Stuff + if = { + limit = { + OR = { + government_allows = administrative + government_has_flag = government_is_japan_feudal + } + } + # Note: anything that should be run after creation can go in on_noble_family_title_created + if = { + limit = { + is_house_head = yes + trigger_if = { + limit = { + government_has_flag = government_is_japan_feudal + } + highest_held_title_tier >= tier_county + } + trigger_else_if = { + # To avoid noble family spam, we only create family titles for county tier if that is also the primary governor tier. + limit = { main_administrative_tier = tier_county } + highest_held_title_tier >= tier_county + } + trigger_else = { highest_held_title_tier >= tier_duchy } + liege = { + OR = { + government_allows = administrative + government_has_flag = government_is_japan_feudal + } + } + NOR = { + any_held_title = { is_noble_family_title = yes } + house = { + any_house_member = { + any_held_title = { is_noble_family_title = yes } + } + } + } + } + create_noble_family_effect = { GOVERNMENT_GIVER = this } + domicile ?= { set_up_domicile_estate_effect = yes } + } + # EP3 - Ensure Emperor keeps old realm capital in admin realms & apply unique domicile building bonus if appropriate + if = { + limit = { + top_liege = this + highest_held_title_tier >= tier_empire + } + if = { # Ensure we keep the old realm capital + limit = { + scope:title = { + tier = tier_empire + title_capital_county != root.capital_county + # Constantinople must have been inherited + title_capital_county.holder = root + } + } + set_realm_capital = scope:title.title_capital_county + } + if = { # Get legitimacy from Reception Hall House Bonus + limit = { + house = { has_variable = ep3_legacy_legitimacy_counter } + primary_title = scope:title + } + trigger_event = { + id = ep3_admin_events.0010 + days = 1 + } + } + } + # EP3 - Fire a became governor event + else_if = { + limit = { + top_liege != this + trigger_if = { + limit = { government_allows = merit } + is_governor_or_admin_count = yes + } + trigger_else = { + is_governor = yes + } + any_held_title = { + count < 1 + this != scope:title + tier >= scope:title.tier + is_landless_type_title = no + is_noble_family_title = no + } + } + trigger_event = { + id = ep3_admin_events.0002 + delayed = yes + } + } + # Admin vassals get the Governor trait when they first become a governor + if = { + limit = { + is_governor = yes + NOT = { has_trait = governor } + scope:title = { + tier >= root.main_administrative_tier + } + } + add_trait = governor + } + #Admin imperial succession notification event (it's a big deal) + if = { + limit = { + top_liege = this + highest_held_title_tier >= tier_kingdom + scope:title = root.primary_title + has_ep3_dlc_trigger = yes + #Checks so this event doesn't fire after character creation, although it's not really a problem if it does + trigger_if = { + limit = { + game_start_date = 867.1.1 + } + current_date >= 867.1.4 + } + trigger_if = { + limit = { + game_start_date = 1066.9.15 + } + current_date >= 1066.9.18 + } + trigger_if = { + limit = { + game_start_date = 1178.10.1 + } + current_date >= 1178.10.4 + } + } + save_scope_as = emperor + #Should trigger special event during fourth crusade! + if = { + limit = { + exists = global_var:byz_claimant_champion + global_var:byz_claimant_champion = { + any_owned_story = { + type = frankokratia_story + exists = var:byz_claimant + var:byz_claimant = { + this = root + } + } + } + } + every_vassal_or_below = { + limit = { + is_playable_character = yes + } + trigger_event = ep3_frankokratia_events.0110 + } + } + else = { + if = { + limit = { + exists = root.house + } + #normal triggering + every_vassal_or_below = { + limit = { + is_playable_character = yes + exists = scope:previous_holder + has_government = administrative_government + OR = { + highest_held_title_tier >= main_administrative_tier # All governors + liege = root + } + } + trigger_event = { + id = ep3_governor_yearly.3060 + days = 1 + } + } + } + } + } + #Admin event about rewarding person who helped you get title + if = { + limit = { + has_succession_appointment_investors = scope:title + has_ep3_dlc_trigger = yes + scope:title = { + any_succession_appointment_investors = { + count >= 1 + candidate = root + value >= 20 + NOT = { + house ?= root.house + } + is_alive = yes + is_imprisoned = no + NOR = { + has_relation_rival = root + is_at_war_with = root + } + } + } + } + save_scope_as = new_landed_admin + trigger_event = { + id = ep3_interactions_events.0600 + days = { 5 10 } + } + } + #Notification for house members of title holder + if = { + limit = { + scope:title.tier > tier_barony + primary_title.tier <= scope:title.tier + NOT = { has_character_flag = admin_title_gain_notification_sent } + exists = house + any_player = { + house ?= root.house + top_liege = root.top_liege + government_allows = administrative + this != root + } + } + add_character_flag = { + flag = admin_title_gain_notification_sent + days = 10 + } + save_scope_as = title_gainer + every_player = { + limit = { + house ?= root.house + top_liege = root.top_liege + government_allows = administrative + this != scope:title_gainer + scope:title != title:k_chrysanthemum_throne + } + send_interface_message = { + type = msg_admin_title_gained + title = msg_admin_title_gained_house.tt + desc = msg_admin_title_gained.desc + left_icon = scope:title_gainer + right_icon = scope:title + } + } + } + #Notification for admin investors in new title holder + if = { + limit = { + NOT = { has_character_flag = admin_title_gain_notification_sent } + scope:title = { + tier > tier_barony + any_succession_appointment_investors = { + is_ai = no + candidate = root + trigger_if = { + limit = { exists = root.house } + NOT = { house ?= root.house } + } + } + } + } + add_character_flag = { + flag = admin_title_gain_notification_sent + days = 10 + } + save_scope_as = title_gainer + scope:title = { + every_succession_appointment_investors = { + candidate = root + value > 0 + limit = { + is_ai = no + trigger_if = { + limit = { exists = root.house } + NOT = { house ?= root.house } + } + } + send_interface_message = { + type = msg_admin_title_gained + title = msg_admin_title_gained_investor.tt + desc = msg_admin_title_gained.desc + left_icon = scope:title_gainer + right_icon = scope:title + } + } + every_succession_appointment_investors = { + candidate = root + value < 0 + limit = { + is_ai = no + trigger_if = { + limit = { exists = root.house } + NOT = { house ?= root.house } + } + } + send_interface_message = { + type = msg_admin_title_gained_foe + title = msg_admin_title_gained_foe.tt + desc = msg_admin_title_gained.desc + left_icon = scope:title_gainer + right_icon = scope:title + } + } + } + } + + # Merit based candidate score bonus is removed when successfully getting a new governorship + if = { + limit = { + OR = { + has_variable = merit_civilian_career_score_bonus + has_variable = merit_military_career_score_bonus + } + is_landed = yes + scope:title.tier >= primary_title.tier + } + if = { + limit = { has_variable = merit_civilian_career_score_bonus } + remove_variable = merit_civilian_career_score_bonus + } + else_if = { + limit = { has_variable = merit_military_career_score_bonus } + remove_variable = merit_military_career_score_bonus + } + } + } + + ######## + # MISC # + ######## + + # TGP, bow before liege mandated + if = { + limit = { + culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } + } + if = { # if you are now the top liege, all your direct vassals with the same parameter who have not yet sworn fealty to you must swear fealty + limit = { + this = top_liege + primary_title.tier <= scope:title.tier + } + every_vassal = { + if = { + limit = { + culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_japan_feudal + } + NOT = { var:pledge_loyalty_to_liege_grace ?= liege } + NOT = { owns_story_of_type = story_cycle_pledge_loyalty_to_liege_overdue } + } + create_story = story_cycle_pledge_loyalty_to_liege_overdue + story:story_cycle_pledge_loyalty_to_liege_overdue = { + set_variable = new_liege_variant + } + } + } + } + else_if = { # if you now have a new liege, and they also follow a culture with the Pay Homage requirement, you must swear continued fealty + limit = { + liege.culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_japan_feudal + } + NOT = { var:pledge_loyalty_to_liege_grace ?= liege } + NOT = { owns_story_of_type = story_cycle_pledge_loyalty_to_liege_overdue } + } + create_story = story_cycle_pledge_loyalty_to_liege_overdue + random_owned_story = { + type = story_cycle_pledge_loyalty_to_liege_overdue + set_variable = new_title_variant + } + } + } + + # Did I conquer a place with holy order leases not of my faith? + if = { + limit = { + scope:title = { + any_in_de_jure_hierarchy = { + tier = tier_barony + is_under_holy_order_lease = yes + county.holder = { + any_liege_or_above = { this = root } + } + lessee = { + NAND = { # Only for leases of people who are not of your faith or the holder's faith + faith = root.faith + faith = prev.county.holder.faith + } + } + } + } + } + scope:title = { + every_in_de_jure_hierarchy = { + limit = { + tier = tier_barony + is_under_holy_order_lease = yes + county.holder = { + any_liege_or_above = { this = root } + } + lessee = { + NAND = { # Only for leases of people who are not of your faith or the holder's faith + faith = root.faith + faith = prev.county.holder.faith + } + } + } + revoke_lease = yes + } + } + } + + # Everything that requires a previous_holder + if = { + limit = { + exists = scope:previous_holder + } + # If a player is on their way to pay homage, invalidate. + if = { + limit = { + any_player = { var:homage_liege_scope ?= scope:previous_holder } + } + every_player = { + limit = { + var:homage_liege_scope ?= scope:previous_holder + NOT = { has_character_flag = currently_invalidating_petition_liege_travel } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + trigger_event = pay_homage.0601 + add_character_flag = { + flag = currently_invalidating_petition_liege_travel + days = 1 + } + } + } + # If a player is on their way to bow before liege, invalidate. + else_if = { + limit = { + any_player = { var:pledge_loyalty_to_liege_scope ?= scope:previous_holder } + } + every_player = { + limit = { + var:pledge_loyalty_to_liege_scope ?= scope:previous_holder + NOT = { has_character_flag = currently_invalidating_petition_liege_travel } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + trigger_event = pledge_loyalty_to_liege.0601 + add_character_flag = { + flag = currently_invalidating_petition_liege_travel + days = 1 + } + } + } + + # Feud + if = { + limit = { + scope:previous_holder = { + house_has_feud_relation_with_trigger = { TARGET = root } + house = { + any_house_relation = { + any_relation_house = { + this = root.house + NOT = { this = scope:previous_holder.house } + } + var:house_feud_reason ?= flag:competing_claim + var:house_feud_attacker.house ?= scope:previous_holder.house + var:house_feud_victim.house ?= root.house + var:house_feud_title ?= scope:title + NOT = { exists = var:feud_avenged } + } + } + } + } + scope:previous_holder.house_head = { save_scope_as = house_feud_rival } + trigger_event = bp1_house_feud.7000 + } + } + + # EP3 LAAMP SUPPORTER INVALIDATION + if = { + limit = { + exists = var:adventurer_invasion_supporter + NOT = { government_has_flag = government_is_landless_adventurer } + } + ep3_laamp_supporter_invalidated_effect = yes + } + + # Natural Disaster Recovery project invalidation + great_projects_ensure_unique_disaster_recovery_projects_effect = yes + + ########### + # Nomads/Tribals leaving confederacies + ########### + if = { + limit = { + is_confederation_member = yes + scope:title.tier >= tier_kingdom + government_is_japanese_trigger = no + } + confederation = { + remove_confederation_member = root + } + } + + # Peasants dress like nobles if landed + if = { + limit = { + has_character_flag = peasant_outfit + NOT = { government_has_flag = government_is_herder } + } + remove_character_flag = peasant_outfit + } + + # Petition allowed again + if = { + limit = { has_variable = petition_title_cooldown } + remove_variable = petition_title_cooldown + } + + # Cancel Domicile travels + current_travel_plan ?= { + if = { + limit = { is_travel_with_domicile = yes } + abort_travel_plan = yes + } + } + + # BP3 - Inspector perks cleanup effect + landless_inspector_cleanup_modifier = yes + + # Update flavorful titles (Margrave, Tenno, etc.) + additional_flavor_check_effect = yes + + # Update CoAs + scope:title = { update_dynamic_coa = yes } + + ### MEMORIES - SHOULD STAY AT BOTTOM ### + # Ascended to the throne + if = { + limit = { + OR = { + is_ruler = no + highest_held_title_tier <= scope:title.tier + government_has_flag = government_is_landless_adventurer + government_allows = administrative + } + } + if = { + limit = { exists = scope:title.var:adventurer_flavor_char } + create_character_memory = { + type = became_landless_adventurer_memory + participants = { + flavor_character = scope:title.var:adventurer_flavor_char + } + } + #Only children should get childhood memories + if = { + limit = { is_adult = no } + scope:new_memory = { set_variable = childhood_memory } + } + scope:new_memory = { + save_scope_as = became_landless_adventurer_memory + set_variable = { + name = landless_title + value = scope:title + } + set_variable = { + name = reason + value = scope:transfer_type + } + set_variable = { + name = adventurer_creation_reason + value = scope:title.var:adventurer_creation_reason + } + if = { + limit = { exists = scope:lost_primary_title } + set_variable = { + name = old_primary_title + value = scope:lost_primary_title + } + } + if = { # Error suppression + limit = { exists = var:landless_title } + } + } + } + else = { + # Overwrite if there is a more specific Reason + if = { + limit = { exists = root.var:ascended_throne_reason } + root.var:ascended_throne_reason = { save_scope_as = real_transfer_type } + root = { remove_variable = ascended_throne_reason } + } + else = { + scope:transfer_type = { save_scope_as = real_transfer_type } + } + root = { + add_to_variable_list = { + name = new_titles + target = scope:title + } + trigger_event = { + id = title_event.9900 + delayed = yes + } + } + } + } + + # If we weren't already in a diarchy but should be, put us in one. + if = { + limit = { + scope:title.tier >= tier_county + } + trigger_event = { + id = diarchy.0011 + days = 1 + } + } + #Confederation titles being re-created... get confederation law bb + if = { + limit = { + scope:transfer_type = flag:created + scope:title = { + has_variable = confederation_culture + NOT = { + has_title_law = confederation_elective_succession_law + } + } + } + scope:bloc = { add_confederation_member = scope:bloc_joiner } + } + #Coronation modifier is lost + if = { + limit = { + scope:title = { + tier = tier_county + OR = { + has_county_modifier = major_coronation_approval_unsettled_modifier + has_county_modifier = medium_coronation_approval_unsettled_modifier + has_county_modifier = minor_coronation_approval_unsettled_modifier + has_county_modifier = major_coronation_approval_modifier + has_county_modifier = medium_coronation_approval_modifier + has_county_modifier = minor_coronation_approval_modifier + } + } + NOR = { + scope:transfer_type = flag:inheritance + scope:transfer_type = flag:leased_out + scope:transfer_type = flag:abdication + scope:transfer_type = flag:granted + scope:transfer_type = flag:election + scope:transfer_type = flag:abdication + scope:transfer_type = flag:stepped_down + scope:transfer_type = flag:swear_fealty + scope:transfer_type = flag:created + } + } + #Add negative modifiers if stolen + scope:title = { + switch = { + trigger = has_county_modifier + major_coronation_approval_modifier = { + scope:title = { + remove_county_modifier = major_coronation_approval_modifier + add_county_modifier = { + modifier = major_coronation_approval_malus_modifier + years = 5 + } + } + } + major_coronation_approval_unsettled_modifier = { + scope:title = { + remove_county_modifier = major_coronation_approval_unsettled_modifier + add_county_modifier = { + modifier = major_coronation_approval_malus_unsettled_modifier + years = 5 + } + } + } + medium_coronation_approval_modifier = { + scope:title = { + remove_county_modifier = medium_coronation_approval_modifier + add_county_modifier = { + modifier = medium_coronation_approval_malus_modifier + years = 5 + } + } + } + medium_coronation_approval_unsettled_modifier = { + scope:title = { + remove_county_modifier = medium_coronation_approval_unsettled_modifier + add_county_modifier = { + modifier = medium_coronation_approval_malus_unsettled_modifier + years = 5 + } + } + } + minor_coronation_approval_modifier = { + scope:title = { + remove_county_modifier = minor_coronation_approval_modifier + add_county_modifier = { + modifier = minor_coronation_approval_malus_modifier + years = 5 + } + } + } + minor_coronation_approval_unsettled_modifier = { + scope:title = { + remove_county_modifier = minor_coronation_approval_unsettled_modifier + add_county_modifier = { + modifier = minor_coronation_approval_malus_unsettled_modifier + years = 5 + } + } + } + } + } + } + + # House head goes to independent ruler for Japanese AI + if = { + limit = { + is_house_head = no + is_ai = yes + government_is_japanese_trigger = yes + scope:previous_holder = { + is_ai = yes + player_heir = { is_ai = yes } + } + scope:new_holder = { + is_ai = yes + player_heir = { is_ai = yes } + } + house.house_head = { + is_ai = yes + player_heir = { is_ai = yes } + is_vassal_or_below_of = root + } + is_independent_ruler = yes + } + house = { set_house_head = root } + } + + if = { # If courtiers get lost between governorship assignments, move them home + limit = { + is_ai = no + government_allows = merit + } + if = { + limit = { + is_landed = yes + } + every_courtier = { + limit = { + location != root.capital_province + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + else_if = { + limit = { + exists = domicile.domicile_location + } + every_courtier = { + limit = { + location != root.domicile.domicile_location + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + } + # If you take another realm's dynasty-named title, reset its name + if = { + limit = { + is_independent_ruler = yes + government_has_flag = government_is_celestial + scope:title ?= { + tier >= tier_kingdom + has_custom_title_name = yes + this != root.primary_title + } + } + scope:title = { + reset_title_name = yes + } + } + } + events = { + roman_restoration.0005 #New Roman Emperor gets Augustus trait. (old holder, if still alive, loses it) + roman_restoration.0199 #Restoring the Pentarchy. + delay = { days = 1 } + realm_maintenance.2001 #Big notification about inheriting emperor tier title + british_isles.1032 # Danelaw-England partition calc. + fp1_major_decisions.1011 # Harald Tanglehair becomes Harald Fairhair. + fp1_major_decisions.1012 # If Norway has just been created for the first time, flag that. + title_event.0001 # Rename West Francia to France + title_event.0002 # Rename East Francia to Germany + title_event.0011 # Asturias becomes Leon upon emergence of Castille + # If we weren't already in a diarchy but should be, put us in one. + diarchy.0011 + ep3_emperor_yearly.2020 # EP3: The Patriarch refuses to crown you as new emperor because you have a criminal trait + } +} + +# A title is inherited by a character +# root = the new holder +# scope:title = the title that changes hands +# scope:previous_holder = previous holder. Should be dead +on_title_gain_inheritance = { + events = { + delay = { days = 1 } + # Try to end inherited entrenched regencies automatically — we need to launder this by a day to make sure the AI realises they've inherited a diarchy. + diarchy.0113 + } + effect = { + if = { + limit = { + scope:title = { + OR = { + this = title:e_mongol_empire + AND = { + exists = global_var:greatest_of_khans_title + this = global_var:greatest_of_khans_title + } + } + } + has_character_flag = gain_mongol_succession_dread + } + add_dread = 50 + } + else_if = { + limit = { + OR = { + scope:title = title:h_roman_empire + scope:title = title:h_eastern_roman_empire + } + } + set_variable = uses_custom_caesar_flavourization + } + } +} + +# A title is usurped by a character +# root = the new holder +# scope:title = the title that changes hands +# scope:previous_holder = previous holder. Shouldn't be dead +on_title_gain_usurpation = { + events = { + } + effect = { + # Struggle Catalysts + if = { + limit = { # FP2 + # We are only interested in the title within the Struggle Region + scope:title.empire ?= title:e_spain + # Only for usurpation + scope:transfer_type = flag:usurped + + root = { + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_usurp_title_fp2 + CHAR = root + } + } + } + } + root = { + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_usurp_title_fp2 + CHAR = root + } + } + activate_struggle_catalyst = { + catalyst = catalyst_usurp_title_fp2 + character = root + } + } + } + } + else_if = { + limit = { # FP3 + scope:title.empire ?= title:e_persia + scope:transfer_type = flag:usurped + + root = { + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_usurp_title_fp3 + CHAR = root + } + } + } + } + root = { + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_usurp_title_fp3 + CHAR = root + } + } + activate_struggle_catalyst = { + catalyst = catalyst_usurp_title_fp3 + character = root + } + log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_usurp_title_fp3 } + } + } + } + } +} + +# A title is lost by a character +# root = the old holder +# scope:title = the title that changes hands +# scope:new_holder = new holder. +on_title_lost = { + events = { + british_isles.1033 # Danelaw-England partition calc. + } + + effect = { + #Make sure nobody ever has only the Kingdom of Fashion + if = { + limit = { + scope:title = { tier = tier_kingdom } + has_title = title:k_fashion + NOT = { + any_held_title = { # Only trigger if you don't have any kingdom titles other than Fashion and the kingdom you just lost. Double negative is confusing but it's the only way I could think to script it + title_tier = kingdom + NOT = { this = title:k_fashion } + this != scope:title + } + } + } + destroy_title = title:k_fashion + } + #Earmark landless Scandinavians for adventuring. + if = { + limit = { + #We only want to grab tribal cultures. + culture = { + NOT = { has_cultural_era_or_later = culture_era_early_medieval } + } + #Must have lost their last piece of land. + is_playable_character = no + #If they've ventured far outside Europe, they're unlikely to come back, so we don't #want them. + scope:title = { + tier = tier_county + title_province = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_minor + } + } + } + } + #Norse, Norwegians, & Danes go into the western adventurer list. + if = { + limit = { + OR = { + has_culture = culture:norse + has_culture = culture:norwegian + has_culture = culture:danish + } + } + add_to_global_variable_list = { + name = western_scandinavian_adventurer_list + target = this + } + } + #Norse & Swedes go into the eastern adventurer list. + if = { + limit = { + OR = { + has_culture = culture:norse + has_culture = culture:swedish + } + } + add_to_global_variable_list = { + name = eastern_scandinavian_adventurer_list + target = this + } + } + } + + #To remove concubines if a character becomes unlanded + if = { + limit = { + is_playable_character = no + any_concubine = { } + } + every_concubine = { root = { remove_concubine = prev } } + } + + # Transfer co-monarchies. + if = { + limit = { + OR = { + scope:transfer_type = flag:inheritance + scope:transfer_type = flag:abdication + scope:transfer_type = flag:usurped + scope:transfer_type = flag:election + scope:transfer_type = flag:faction_demand + scope:transfer_type = flag:stepped_down + } + } + save_scope_as = old_holder + trigger_event = { + id = diarchy.0025 + days = 1 + } + } + + #Apply loss of stress to the Rivals + if = { + limit = { + scope:title.tier >= tier_county + scope:title = { is_landless_type_title = no } + OR = { + scope:transfer_type = flag:conquest + scope:transfer_type = flag:conquest_holy_war + scope:transfer_type = flag:conquest_claim + scope:transfer_type = flag:conquest_populist + scope:transfer_type = flag:abdication + scope:transfer_type = flag:usurped + scope:transfer_type = flag:revoked + scope:transfer_type = flag:faction_demand + } + } + root = { + save_scope_as = actor + } + every_relation ={ + type = rival + + send_interface_message = { + type = event_generic_neutral + title = msg_rival_dethroned + left_icon = scope:actor + right_icon = scope:title + + custom_tooltip = msg_rival_dethroned_desc + + stress_impact = { + base = medium_stress_loss + vengeful = medium_stress_loss + } + } + } + } + + # Struggle catalyst + if = { + limit = { + any_character_struggle = { + involvement = involved + phase_has_catalyst = catalyst_revoke_title + } + OR = { + scope:transfer_type = flag:revoked + scope:transfer_type = flag:lease_revoked + } + } + every_character_struggle = { + activate_struggle_catalyst = { + catalyst = catalyst_revoke_title + character = scope:new_holder + } + } + } + + # Memories + # Lost a significant title + if = { + limit = { + scope:title.tier >= highest_held_title_tier + exists = scope:new_holder + } + if = { + limit = { exists = root.var:lost_title_reason } + root.var:lost_title_reason = { save_scope_as = real_transfer_type } + root = { remove_variable = lost_title_reason } + } + else = { + scope:transfer_type = { save_scope_as = real_transfer_type } + } + root = { + add_to_variable_list = { + name = lost_titles + target = scope:title + } + trigger_event = { + id = title_event.9901 + delayed = yes + } + } + } + + # LEGITIMACY LOSS FROM USURPATION + if = { + limit = { + scope:transfer_type ?= flag:usurped + has_legitimacy = yes + NOT = { exists = scope:suppress_legitimacy_loss } + } + # Minus 2, since we want Duchy to be 1, and it's normally 3 + save_scope_value_as = { + name = title_tier_minus_2 + value = { + value = scope:title.tier + subtract = 2 + } + } + send_interface_toast = { + type = msg_legitimacy_loss + title = legitimacy_loss_toast + left_icon = root + right_icon = scope:title + custom_tooltip = legitimacy_loss_usurpation_tt + add_legitimacy = { + value = { + value = miniscule_legitimacy_loss + multiply = scope:title_tier_minus_2 + } + } + } + } + + # EP3 LAAMP SUPPORTER INVALIDATION + ep3_laamp_supporter_invalidated_effect = yes + + # EP3 - Handle admin estates when they end up outside the realm + if = { + limit = { + scope:new_holder = { + any_sub_realm_barony = { + title_province = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + top_liege != scope:new_holder.top_liege + } + } + } + } + } + } + scope:new_holder = { + every_sub_realm_barony = { + limit = { + title_province = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + top_liege != scope:new_holder.top_liege + } + } + } + } + title_province = { + every_province_domicile = { + limit = { + is_domicile_type = estate + owner ?= { + top_liege != scope:new_holder.top_liege + } + } + + # First, let's do some damage to the estate - We randomize the level of damage taken + random_list = { + 40 = { # Damage 1 + trigger = { + num_domicile_buildings <= 6 + } + set_variable = { + name = domicile_damage_count + value = 1 + } + } + 35 = { # Damage 2 + trigger = { + num_domicile_buildings > 2 + } + set_variable = { + name = domicile_damage_count + value = 2 + } + } + 30 = { # Damage 3 + trigger = { + num_domicile_buildings > 4 + } + set_variable = { + name = domicile_damage_count + value = 3 + } + } + 25 = { # Damage 4 + trigger = { + num_domicile_buildings > 6 + } + set_variable = { + name = domicile_damage_count + value = 4 + } + } + 20 = { # Damage 5 + trigger = { + num_domicile_buildings > 8 + } + set_variable = { + name = domicile_damage_count + value = 5 + } + } + 15 = { # Damage 6 + trigger = { + num_domicile_buildings > 10 + } + set_variable = { + name = domicile_damage_count + value = 6 + } + } + } + while = { + count = var:domicile_damage_count + destroy_random_estate_building_variable_effect = yes + destroy_random_estate_building_effect = yes + } + + # Clear the variable + if = { + limit = { has_variable = domicile_damage_count } + remove_variable = domicile_damage_count + } + + # Then we'll move the estate to keep it within the realm's borders + if = { # If you have a capital (i.e. you are a governor) let's move the estate there + limit = { + owner = { + is_landed = yes + exists = capital_province + } + } + move_domicile = owner.capital_province + } + else_if = { # If not, let's move it to a landed house member in the realm, if you have one + limit = { + owner = { + top_liege ?= { save_temporary_scope_as = owner_top_liege } + house ?= { + any_house_member = { + is_governor = yes + top_liege = scope:owner_top_liege + } + } + } + } + owner = { + house = { + random_house_member = { + limit = { + is_governor = yes + exists = capital_province + top_liege = scope:owner_top_liege + } + capital_province = { save_temporary_scope_as = house_member_location } + } + } + } + move_domicile = scope:house_member_location + } + else_if = { # Otherwise move it to the realm capital + limit = { + exists = owner.top_liege.capital_province + } + move_domicile = owner.top_liege.capital_province + } + + # Save the new estate location for msg + domicile_location.barony = { + save_scope_as = new_estate_location + } + + # Finally, let's make sure the owner moves to the new estate location + owner = { + if = { + limit = { + is_alive = yes + is_imprisoned = no + is_travelling = no + NOT = { + exists = involved_activity + } + is_commanding_army = no + } + set_location_to_default = yes + } + + # And notify the owner that all of this just happened + if = { + limit = { is_ai = no } + send_interface_message = { + type = msg_domicile_damaged + title = msg_estate_damaged.title + desc = msg_estate_damaged.desc + right_icon = scope:new_estate_location + } + } + } + } + } + } + } + } + + # Additional Flavor Title + additional_flavor_check_effect = yes + + if = { + limit = { + OR = { + scope:title = title:h_roman_empire + scope:title = title:h_eastern_roman_empire + } + } + remove_variable = uses_custom_caesar_flavourization + } + #Notification for house members of loser + if = { + limit = { + scope:title.tier > tier_barony + trigger_if = { # Prevent msg spam when rulers give away or lose lower tier titles + limit = { + is_landed = yes + } + primary_title.tier <= scope:title.tier + } + is_alive = yes + NOT = { has_character_flag = admin_title_loss_notification_sent } + government_allows = administrative + house ?= { + any_house_member = { + is_ai = no + trigger_if = { + limit = { exists = root.top_liege } + top_liege = root.top_liege + } + government_allows = administrative + this != root + } + } + } + add_character_flag = { + flag = admin_title_loss_notification_sent + days = 10 + } + save_scope_as = title_loser + house = { + every_house_member = { + limit = { + is_ai = no + trigger_if = { + limit = { exists = root.top_liege } + top_liege = root.top_liege + } + government_allows = administrative + this != scope:title_loser + } + send_interface_message = { + type = msg_admin_title_lost + title = msg_admin_title_lost_house.tt + desc = msg_admin_title_lost.desc + left_icon = scope:title_loser + right_icon = scope:title + } + } + } + } + #Notification for admin investors in loser + if = { + limit = { + is_alive = yes + NOT = { has_character_flag = admin_title_loss_notification_sent } + scope:title = { + tier > tier_barony + any_succession_appointment_investors = { + candidate = root + is_ai = no + trigger_if = { + limit = { exists = root.house } + NOT = { house ?= root.house } + } + } + } + } + add_character_flag = { + flag = admin_title_loss_notification_sent + days = 10 + } + save_scope_as = title_loser + scope:title = { + every_succession_appointment_investors = { + candidate = root + value > 0 + limit = { + is_ai = no + trigger_if = { + limit = { exists = root.house } + NOT = { house ?= root.house } + } + } + send_interface_message = { + type = msg_admin_title_lost + title = msg_admin_title_lost_investor.tt + desc = msg_admin_title_lost.desc + left_icon = scope:title_loser + right_icon = scope:title + } + } + every_succession_appointment_investors = { + candidate = root + value < 0 + limit = { + is_ai = no + trigger_if = { + limit = { exists = root.house } + NOT = { house ?= root.house } + } + } + send_interface_message = { + type = msg_admin_title_lost_foe + title = msg_admin_title_lost_foe.tt + desc = msg_admin_title_lost.desc + left_icon = scope:title_loser + right_icon = scope:title + } + } + } + } + + # Lil Johnny Lackland changes his nickname. + if = { + limit = { + has_nickname = nick_lackland_ironic + scope:title.tier >= tier_duchy + } + give_nickname = nick_lackland_old + } + + # BP3 - Inspector perks cleanup effect + landless_inspector_cleanup_modifier = yes + + #End Greatest of Khans story if title was lost + if = { + limit = { + any_owned_story = { + story_type = story_greatest_of_khans + } + global_var:greatest_of_khans_title ?= { + this = scope:title + } + OR = { + NOT = { + exists = scope:new_holder + } + scope:new_holder = { + NOR = { + AND = { + exists = dynasty + dynasty ?= root.dynasty + } + is_grandchild_of = root + is_child_of = root + } + } + } + } + if = { + limit = { + is_alive = yes + } + trigger_event = { + id = mpo_greatest_of_khans.0040 + days = 1 + } + } + else_if = { + limit = { + exists = root.player_heir + exists = root.dynasty + player_heir = { + dynasty ?= story_owner.dynasty + } + } + player_heir ?= { + trigger_event = { + id = mpo_greatest_of_khans.0040 + days = 1 + } + } + } + else = { + every_owned_story = { + limit = { story_type = story_greatest_of_khans } + end_story = yes + } + remove_character_modifier = the_great_khan_modifier + } + } + #Coronation loyalty modifier + if = { + limit = { + scope:title = { + has_variable = coronation_loyal_to_title + var:coronation_loyal_to_title = { + NOT = { + this = scope:new_holder.primary_title + } + } + } + } + scope:title = { + remove_county_modifier = coronation_loyal_to_the_crown_modifier + remove_variable = coronation_loyal_to_title + add_county_modifier = { + modifier = coronation_still_loyal_modifier + years = 5 + } + } + } + + if = { # If courtiers get lost between governorship assignments, move them home + limit = { + is_ai = no + government_allows = merit + } + if = { + limit = { + is_landed = yes + } + every_courtier = { + limit = { + location != root.capital_province + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + else_if = { + limit = { + is_landed = no + exists = domicile.domicile_location + } + every_courtier = { + limit = { + location != root.domicile.domicile_location + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + } + + # Remove manually added Ministers if they're not ministers anymore + if = { + limit = { + NOR = { + primary_title = title:e_minister_chancellor + primary_title = title:e_minister_censor + primary_title = title:e_minister_grand_marshal + primary_title = title:e_minister_of_personnel + primary_title = title:e_minister_of_revenue + primary_title = title:e_minister_of_rites + primary_title = title:e_minister_of_war + primary_title = title:e_minister_of_justice + primary_title = title:e_minister_of_works + } + } + situation:dynastic_cycle = { + remove_manual_participant = prev + } + } + } +} + +# A claim is gained by a character +# root = the claimant +# scope:title = the title that is claimed +# scope:transfer_type = flag:inheritance or none +on_explicit_claim_gain = { + effect = { + if = { + limit = { + title:k_england.holder = root + } + title:k_england = { + update_dynamic_coa = yes + } + } + # Struggle Catalyst + if = { # FP2 + limit = { + NOT = { scope:transfer_type = flag:inheritance } + + root = { + any_character_struggle = { + is_struggle_type = iberian_struggle + involvement = involved + } + } + title:e_spain = { any_in_de_jure_hierarchy = { this = scope:title } } + } + root = { + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_gain_claim_on_title_fp2 + CHAR = root + } + } + activate_struggle_catalyst = { + catalyst = catalyst_gain_claim_on_title_fp2 + character = root + } + } + } + } + else_if = { # FP3 + limit = { + NOT = { scope:transfer_type = flag:inheritance } + + root = { + any_character_struggle = { + is_struggle_type = persian_struggle + involvement = involved + } + } + title:e_persia = { any_in_de_jure_hierarchy = { this = scope:title } } + } + root = { + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_gain_claim_on_title_fp3 + CHAR = root + } + } + activate_struggle_catalyst = { + catalyst = catalyst_gain_claim_on_title_fp3 + character = root + } + log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_gain_claim_on_title_fp3 } + } + } + } + } +} + +# A claim is lost by a character +# root = the claimant +# scope:title = the title that was claimed +on_explicit_claim_lost = { + effect = { + if = { + limit = { + title:k_england.holder = root + } + title:k_england = { + update_dynamic_coa = yes + } + } + } +} + +# A title change makes the character rank up in the landed tiers (eg Duke -> King) +# root = character ranking up +# scope:title = old primary title +on_rank_up = { # Will not fire during history execution or for dying characters + events = { + } + effect = { + if = { # ACH call to coronation reminder + limit = { + coronation_trigger = yes + NOT = { + has_game_rule = coronation_laws_off + } + is_ai = no + primary_title.tier >= tier_kingdom + has_realm_law = uncrowned + NOR = { + has_variable = crowned_king_var + has_variable = crowned_emperor_var + } + NOR = { + has_character_flag = had_coronation_reminder + any_sponsored_inspiration = { has_inspiration_type = smith_inspiration } + } + is_available_adult = yes + } + trigger_event = { + id = ach_yearly_events.1005 + months = 4 + } + } + #ACH new emperors losing their crowned status + else_if = { + limit = { + coronation_trigger = yes + NOR = { + has_game_rule = coronation_laws_no_imperial_uncrowned + has_game_rule = coronation_laws_off + has_character_flag = claimed_the_mandate_of_heaven + } + highest_held_title_tier >= tier_empire + exists = scope:title + scope:title = { + tier >= tier_kingdom + #Just double checking + tier < root.highest_held_title_tier + } + OR = { + has_realm_law = crowned_king + has_realm_law = crowned_emperor + has_variable = crowned_king_var + has_variable = crowned_emperor_var + } + } + if = { + limit = { + has_variable = crowned_emperor_var + } + remove_variable = crowned_emperor_var + } + if = { + limit = { + has_variable = crowned_king_var + } + remove_variable = crowned_king_var + } + add_realm_law_skip_effects = uncrowned + trigger_event = ach_yearly_events.1010 + } + if = { + limit = { is_landed = yes } + add_achievement_flag_effect = { FLAG = achievement_moving_up_in_the_world_flag } + } + if = { + limit = { + is_ai = no + is_landed = yes + highest_held_title_tier = tier_empire + } + add_achievement_global_variable_effect = { + VARIABLE = rags_to_riches_to_rags_to_riches_first_empire + VALUE = yes + } + } + if = { + limit = { + is_ai = no + is_landed = yes + highest_held_title_tier = tier_empire + exists = global_var:rags_to_riches_to_rags_to_riches_adventurer + } + add_achievement_global_variable_effect = { + VARIABLE = finished_rags_to_riches_to_rags_to_riches_achievement + VALUE = yes + } + } + update_embassies_effect = yes + every_ally = { + update_embassies_effect = yes + } + if = { + limit = { top_liege = this } + remove_variable = use_co_ruler_title + } + # Make a note of ranking up for stele purposes. + if = { + limit = { + # DLC check. + has_fp1_dlc_trigger = yes + # Is the culture eligible? + fp1_can_raise_stele_trigger = yes + # Aaaaand, for balance reasons, were they landed already? + exists = scope:title + } + set_variable = { + name = recent_rank_increase + value = root.primary_title + years = 5 + } + } + # Remove any rank-inappropriate modifiers (e.g., baron buffs). + remove_character_modifier = mandate_baronial_troops_trained_modifier + remove_character_modifier = mandate_baronial_troops_half_trained_modifier + + # Additional Flavor Title + additional_flavor_check_effect = yes + + #Admin kings becoming emperors need their MAA transferred to new primary title + if = { + limit = { + is_independent_ruler = yes + government_allows = administrative + scope:title ?= { + any_title_maa_regiment = { + count >= 1 + } + } + } + scope:title = { + transfer_title_maa_ownership = root.primary_title + } + } + + if = { + limit = { + is_independent_ruler = yes + government_has_flag = government_is_celestial + scope:title ?= { + tier >= tier_kingdom + has_custom_title_name = yes + } + primary_title = { + has_custom_title_name = no + } + } + scope:title = { + move_title_name_to = root.primary_title + reset_title_name = yes + } + } + if = { + limit = { + is_independent_ruler = yes + government_has_flag = government_is_celestial + highest_held_title_tier >= tier_kingdom + OR = { + primary_title ?= { + has_custom_title_name = no + } + primary_title.previous_holder.dynasty != root.dynasty + } + trigger_if = { + limit = { + tgp_capital_not_in_chinese_naming_region = yes + } + primary_title ?= title:h_china + } + } + if = { + limit = { + is_ai = no + } + trigger_event = { + id = tgp_dynastic_cycle.9000 + days = 1 # so the player gets to choose first + } + } + else = { + trigger_event = { + id = tgp_dynastic_cycle.9000 + days = 2 + } + } + } + else_if = { # Make sure non-Celestials get to rename/recolor china + limit = { + is_independent_ruler = yes + has_tgp_dlc_trigger = yes + NOT = { government_has_flag = government_is_celestial } + exists = var:claimed_mandate_var + primary_title ?= title:h_china + OR = { + primary_title ?= { + has_custom_title_name = no + } + primary_title.previous_holder.dynasty != root.dynasty + } + } + if = { + limit = { + is_ai = no + } + trigger_event = { + id = tgp_dynastic_cycle.9000 + days = 1 # so the player gets to choose first + } + } + else = { + trigger_event = { + id = tgp_dynastic_cycle.9000 + days = 2 + } + } + } + + # ACH - Remove Coronated laws when titles are passed onto a new character + coronation_reset_realm_law_effect = yes + } +} + +# A title change makes the character rank down in the landed tiers (eg King -> Duke) +# root = character ranking down +# scope:title = old primary title +on_rank_down = { # Will not fire during history execution or for dying characters + events = { + } + effect = { + if = { + limit = { + NOR = { + has_trait = humble + has_trait = content + has_trait = generous + } + } + add_character_flag = { + flag = make_suicide_available + years = 5 + } + set_variable = { + name = rank_demoted + value = yes + } + } + update_embassies_effect = yes + every_ally = { + update_embassies_effect = yes + } + # Inform hostage havers + if = { + limit = { + any_home_court_hostage = { } + } + save_scope_as = home_court + every_home_court_hostage = { + save_scope_as = hostage + warden = { + save_scope_as = warden + trigger_event = { id = bp2_hostage_system.0410 days = 5 } + } + } + } + + # Additional Flavor Title + additional_flavor_check_effect = yes + + # ACH - Remove variables if they are going below certain ranks + coronation_reset_realm_law_variable_effect = yes + + # ACH - if you are below king tier, remove all oaths + if = { + limit = { + highest_held_title_tier < tier_kingdom + } + ach_remove_oaths_on_king_minus_effect = yes + } + } +} + +# A character gains a vassal +# root = character gaining vassal +# scope:vassal = vassal being gained +# scope:old_liege = the previous liege of the vassal. Might be the null character (vassal used to be a non-ruler or independent), so make sure to use "exists" checks where relevant +on_vassal_gained = { + events = { + realm_maintenance.1000 # Notify vassals of new liege + } + effect = { + #Nomadic Confederation members must be independent + if = { + limit = { + scope:vassal = { + is_confederation_member = yes + scope:vassal.confederation = { has_leading_house = no } + } + } + scope:vassal.confederation = { + remove_confederation_member = scope:vassal + } + } + # EP3 LANDLESS CANNOT HAVE VASSALS + if = { + limit = { has_any_landed_title_trigger = no } + save_scope_as = new_liege + if = { + limit = { top_liege != this } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + change_liege = { + liege = scope:new_liege.liege + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + else = { + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal = { + becomes_independent = { change = scope:change } + } + resolve_title_and_vassal_change = scope:change + } + } + + # Additional Flavor Title + scope:vassal = { + additional_flavor_check_effect = yes + } + + # Destroy ceremonial titles of vassalized realms + if = { + limit = { + # The necessary checks are baked into the effect below + scope:vassal = { + highest_held_title_tier >= tier_empire + any_held_title = { + OR = { + exists = var:ceremonial_title + exists = var:administrative_ui_special_title + } + } + } + } + # TGP end the ceremonial liege + tgp_destroy_ceremonial_throne_effect = yes + } + } +} + +# A vassal changes their liege +# root = vassal changing their status +# scope:old_liege = the previous liege of the vassal +# It is also fired for rulers gaining independence, those can be identified by checking current liege +on_vassal_change = { + effect = { + ### If a admin duke-tier character becomes the top-liege's direct vassal, ensure that they have a noble family title + if = { + limit = { + government_allows = administrative + is_house_head = yes + trigger_if = { + # This trigger is intentionally different from the similar effecy in on_title_gain up above. We want all direct vassals of the top liege to have a family title if they can + limit = { government_has_flag = government_has_county_tier_noble_families } + highest_held_title_tier >= tier_county + } + trigger_else = { highest_held_title_tier >= tier_duchy } + liege = { + top_liege = this + government_allows = administrative + } + NOR = { + any_held_title = { is_noble_family_title = yes } + house = { + any_house_member = { + any_held_title = { is_noble_family_title = yes } + } + } + } + } + create_noble_family_effect = { GOVERNMENT_GIVER = this } + domicile ?= { set_up_domicile_estate_effect = yes } + } + ### If an admin ruler becomes independent... + if = { + limit = { + liege = root # I.e. root is independent + government_has_flag = government_is_administrative + NOT = { + government_has_flag = government_is_republic + } + } + # And is not of a high enough rank, change government + if = { + limit = { + NOT = { + government_has_flag = government_is_republic + } + administrative_tier_allows_independence = no + } + admin_change_government_effect = yes + } + # If they can be independent, make sure they have a noble family title + else_if = { + limit = { + NOT = { + any_held_title = { + is_noble_family_title = yes + } + } + } + create_noble_family_effect = { GOVERNMENT_GIVER = this } + domicile ?= { set_up_domicile_estate_effect = yes } + } + } + ### Independent Celestial rulers who become direct vassals of a top liege adopt Military obligations if they have title troops - Everyone else will default to Standard. + if = { + limit = { + government_has_flag = government_is_celestial + scope:old_liege = this # I.e. they were independent + liege != this + liege = top_liege + primary_title = { + any_title_maa_regiment = { count >= 1 } + } + } + vassal_contract_set_obligation_level = { type = celestial_provinces level = 3 } + } + + ### If a minister becomes independent we destroy the ministry title + if = { + limit = { + # independent title + OR = { + liege ?= { tgp_has_access_to_ministry_trigger = no } + this = top_liege + } + + any_held_title = { + # has a ministry title that is not being swapped + OR = { + this = title:e_minister_chancellor + this = title:e_minister_censor + this = title:e_minister_grand_marshal + this = title:e_minister_of_personnel + this = title:e_minister_of_revenue + this = title:e_minister_of_rites + this = title:e_minister_of_war + this = title:e_minister_of_justice + this = title:e_minister_of_works + } + } + } + every_held_title = { + switch = { + trigger = this + title:e_minister_chancellor = { + root = { destroy_title = title:e_minister_chancellor } + } + title:e_minister_censor = { + root = { destroy_title = title:e_minister_censor } + } + title:e_minister_grand_marshal = { + root = { destroy_title = title:e_minister_grand_marshal } + } + title:e_minister_of_personnel = { + root = { destroy_title = title:e_minister_of_personnel } + } + title:e_minister_of_revenue = { + root = { destroy_title = title:e_minister_of_revenue } + } + title:e_minister_of_rites = { + root = { destroy_title = title:e_minister_of_rites } + } + title:e_minister_of_war = { + root = { destroy_title = title:e_minister_of_war } + } + title:e_minister_of_justice = { + root = { destroy_title = title:e_minister_of_justice } + } + title:e_minister_of_works = { + root = { destroy_title = title:e_minister_of_works } + } + } + } + } + + # Additional Flavor Title + additional_flavor_check_effect = yes + + if = { + limit = { + # We have become independent! + NOT = { + scope:old_liege = root + } + liege = root + government_has_flag = government_is_celestial + highest_held_title_tier >= tier_kingdom + primary_title = { + has_custom_title_name = no # sanity check + } + OR = { + tgp_capital_not_in_chinese_naming_region = no + primary_title = title:h_china # failsafe, in case this somehow ends up here + } + } + if = { + limit = { + is_ai = no + } + trigger_event = { + id = tgp_dynastic_cycle.9000 + days = 1 # so the player gets to choose first + } + } + else = { + trigger_event = { + id = tgp_dynastic_cycle.9000 + days = 2 + } + } + } + if = { + limit = { + scope:old_liege = root + NOT = { + liege = root + } + primary_title ?= { + has_custom_title_name = yes + } + } + primary_title = { + reset_title_name = yes + } + } + + # Destroy ceremonial titles of vassalized realms + if = { + limit = { + # The necessary checks are baked into the effect below + highest_held_title_tier >= tier_empire + any_held_title = { + OR = { + exists = var:ceremonial_title + exists = var:administrative_ui_special_title + } + } + } + # TGP end the ceremonial liege + tgp_destroy_ceremonial_throne_effect = yes + if = { + limit = { has_trait = former_emperor } + remove_trait = former_emperor + } + } + + # Bloc + if = { + # Let code trigger this if this is due to succession + limit = { + scope:old_liege ?= { + is_alive = yes + } + } + tgp_liege_change_bloc_management_effect = { VASSAL = root } + } + } +} + +# A baron is found or created for a title, E.G., due to the player using the "Give to Low Noble" action +# No transfer type here; it's always a grant +# root = the baron +# scope:liege = the person who wanted them created +# scope:title = the barony +on_baron_found_or_created_for_title = { + effect = { + add_opinion = { + target = scope:liege + modifier = received_title_barony + } + } +} + +# Called when realm capital changes. It can be manual move, loss in conquest, move after inheritance, +# move when granted a better title, becoming landed for the first time +# root: New realm capital barony +# scope:old_capital - previous capital barony. Can be empty, can be owned by someone else +on_realm_capital_change = { + effect = { + holder ?= { + # Do we need to refresh their vizier's modifiers? + if = { + limit = { has_diarchy_parameter = diarchy_is_vizierate } + diarch = { + # What we're doing here is regenerating loc on the diarchs that might refer to a specific place which they no longer have access to. + ## This is gonna get real gross, folks, so my apologies. + if = { + limit = { has_character_modifier = vizier_extravagance_t1_treasure_modifier } + remove_character_modifier = vizier_extravagance_t1_treasure_modifier + add_character_modifier = { + modifier = vizier_extravagance_t1_treasure_modifier + desc = vizier_extravagance_t1_treasure_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t1_activities_modifier } + remove_character_modifier = vizier_extravagance_t1_activities_modifier + add_character_modifier = { + modifier = vizier_extravagance_t1_activities_modifier + desc = vizier_extravagance_t1_activities_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t1_property_modifier } + remove_character_modifier = vizier_extravagance_t1_property_modifier + add_character_modifier = { + modifier = vizier_extravagance_t1_property_modifier + desc = vizier_extravagance_t1_property_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t1_charity_modifier } + remove_character_modifier = vizier_extravagance_t1_charity_modifier + add_character_modifier = { + modifier = vizier_extravagance_t1_charity_modifier + desc = vizier_extravagance_t1_charity_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t2_treasure_modifier } + remove_character_modifier = vizier_extravagance_t2_treasure_modifier + add_character_modifier = { + modifier = vizier_extravagance_t2_treasure_modifier + desc = vizier_extravagance_t2_treasure_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t2_activities_modifier } + remove_character_modifier = vizier_extravagance_t2_activities_modifier + add_character_modifier = { + modifier = vizier_extravagance_t2_activities_modifier + desc = vizier_extravagance_t2_activities_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t2_property_modifier } + remove_character_modifier = vizier_extravagance_t2_property_modifier + add_character_modifier = { + modifier = vizier_extravagance_t2_property_modifier + desc = vizier_extravagance_t2_property_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t2_charity_modifier } + remove_character_modifier = vizier_extravagance_t2_charity_modifier + add_character_modifier = { + modifier = vizier_extravagance_t2_charity_modifier + desc = vizier_extravagance_t2_charity_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t3_treasure_modifier } + remove_character_modifier = vizier_extravagance_t3_treasure_modifier + add_character_modifier = { + modifier = vizier_extravagance_t3_treasure_modifier + desc = vizier_extravagance_t3_treasure_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t3_activities_modifier } + remove_character_modifier = vizier_extravagance_t3_activities_modifier + add_character_modifier = { + modifier = vizier_extravagance_t3_activities_modifier + desc = vizier_extravagance_t3_activities_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t3_property_modifier } + remove_character_modifier = vizier_extravagance_t3_property_modifier + add_character_modifier = { + modifier = vizier_extravagance_t3_property_modifier + desc = vizier_extravagance_t3_property_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t3_charity_modifier } + remove_character_modifier = vizier_extravagance_t3_charity_modifier + add_character_modifier = { + modifier = vizier_extravagance_t3_charity_modifier + desc = vizier_extravagance_t3_charity_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t4_treasure_modifier } + remove_character_modifier = vizier_extravagance_t4_treasure_modifier + add_character_modifier = { + modifier = vizier_extravagance_t4_treasure_modifier + desc = vizier_extravagance_t4_treasure_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t4_activities_modifier } + remove_character_modifier = vizier_extravagance_t4_activities_modifier + add_character_modifier = { + modifier = vizier_extravagance_t4_activities_modifier + desc = vizier_extravagance_t4_activities_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t4_property_modifier } + remove_character_modifier = vizier_extravagance_t4_property_modifier + add_character_modifier = { + modifier = vizier_extravagance_t4_property_modifier + desc = vizier_extravagance_t4_property_modifier_custom_desc.on_action + } + } + if = { + limit = { has_character_modifier = vizier_extravagance_t4_charity_modifier } + remove_character_modifier = vizier_extravagance_t4_charity_modifier + add_character_modifier = { + modifier = vizier_extravagance_t4_charity_modifier + desc = vizier_extravagance_t4_charity_modifier_custom_desc.on_action + } + } + } + } + } + } +} + +# Primary Title has changed +# root = character +# scope:previous_title = previous primary title held by character +# Not called if new primary title is the same as the previous primary title +on_primary_title_change = { +} diff --git a/N3OW/common/on_action/yearly_on_actions.txt b/N3OW/common/on_action/yearly_on_actions.txt new file mode 100644 index 00000000..c7e62b68 --- /dev/null +++ b/N3OW/common/on_action/yearly_on_actions.txt @@ -0,0 +1,3477 @@ +# Called every Jan 1st +# Root does not exist +yearly_global_pulse = { + effect = { + # Historical character spawner + if = { + limit = { + NOT = { + has_game_rule = no_historical_characters + } + } + spawn_historical_characters_effect = yes + } + # Visigothic culture split + ## Deprecated; to reenable, remove always = no line & decomment the trigger_event section. + if = { + limit = { + always = no + current_date <= 920.1.1 # No need to check this in later starts + NOT = { has_global_variable = visigothic_culture_split } + current_date >= 850.1.1 + } + random = { + chance = 0 # No chance the first year of play if starting in 867 + modifier = { + add = 10 + current_date >= 868.1.1 + } + modifier = { + add = 10 # 20% chance + current_date >= 875.1.1 + } + modifier = { + add = 10 # 30% chance + current_date >= 890.1.1 + } + set_global_variable = { + name = visigothic_culture_split + value = yes + } + #trigger_event = { + #id = global_culture.0001 + #days = { 60 300 } + #} + } + } + # Norse culture split. + if = { + limit = { + current_date < 990.1.1 + NOT = { has_global_variable = norse_culture_split } + current_date >= 950.1.1 + } + random = { + chance = 10 + modifier = { + add = 20 # 30% chance + current_date >= 960.1.1 + } + modifier = { + add = 30 # 60% chance + current_date >= 970.1.1 + } + modifier = { + add = 40 # 100% chance + current_date >= 980.1.1 + } + set_global_variable = { + name = norse_culture_split + value = yes + } + trigger_event = { + id = global_culture.0011 + days = { 60 300 } + } + } + } + # Anglo-Saxon -> Scottish Culture Shift + if = { + limit = { + current_date <= 1066.1.1 # No need to check this in later starts + NOT = { has_global_variable = scottish_culture_creation } + current_date >= 867.1.1 + } + random = { + chance = 0 # No chance the first year of play if starting in 867 + modifier = { + add = 2 # 2% chance per year + current_date >= 900.1.1 + } + modifier = { + add = 8 # 10% chance per year + current_date >= 950.1.1 + } + modifier = { + add = 15 # 25% chance per year + current_date >= 1000.1.1 + } + set_global_variable = { + name = scottish_culture_creation + value = yes + } + trigger_event = { + id = global_culture.0031 + days = { 60 300 } + } + } + } + # Mongol Invasion + if = { limit = { has_game_rule = never_mongol_invasion } } + else_if = { + limit = { + has_game_rule = random_mongol_invasion + NOT = { has_global_variable = mongols_have_appeared } + #Greatest of khans hasn't come along + NOT = { has_global_variable = greatest_of_khans_title } + #Someone's not currently trying to be greatest of khans + NOT = { has_global_variable = mpo_gok_war_ongoing } + #Temujin dying prevents Mongol invasion for at least 50 years + NOT = { + has_global_variable = temujin_failed + } + } + random = { + chance = temujin_appearance_base_chance + modifier = { + factor = 0.25 + current_date < 1180.1.1 + } + modifier = { + add = 3 + current_date > 1200.1.1 + } + modifier = { + add = 5 + current_date > 1220.1.1 + } + modifier = { + add = 5 + current_date > 1235.1.1 + } + set_global_variable = { + name = mongols_have_appeared + value = yes + } + debug_log = "Attempting to spawn mongol invasion within 240 days" + trigger_event = { + id = mongol_invasion.0001 + days = { 2 240 } + } + } + } + else = { + if = { + limit = { + current_date > 1180.1.1 + current_date < 1250.1.1 + NOT = { has_global_variable = mongols_have_appeared } + #Greatest of khans hasn't come along + NOT = { has_global_variable = greatest_of_khans_title } + #Someone's not currently trying to be greatest of khans + NOT = { has_global_variable = mpo_gok_war_ongoing } + trigger_if = { + limit = { + game_start_date = 1178.10.1 + } + years_from_game_start >= 20 + } + #Temujin dying prevents Mongol invasion for at least 50 years + NOT = { + has_global_variable = temujin_failed + } + } + debug_log = "Checking for chance of spawning mongols under historical settings" + random = { + chance = temujin_appearance_base_chance + modifier = { + add = 9 + current_date > 1200.1.1 + } + modifier = { + add = 10 + current_date > 1220.1.1 + } + modifier = { + add = 20 + current_date > 1235.1.1 + } + modifier = { + add = 30 + exists = character:125501 # Temüjin + character:125501 = { + is_physically_able_ai_adult = yes + } + } + set_global_variable = { + name = mongols_have_appeared + value = yes + } + debug_log = "Attempting to spawn mongol invasion within 240 days" + trigger_event = { + id = mongol_invasion.0001 + days = { 2 240 } + } + } + } + } + # Almohad Invasion + if = { + limit = { + current_date >= 1110.1.1 + current_date < 1150.1.1 + NOT = { has_global_variable = spawned_almohads } + } + random = { + chance = almohad_appearance_base_chance + modifier = { + add = 3 + current_date >= 1130.1.1 + } + modifier = { + add = 3 + current_date >= 1140.1.1 + } + debug_log = "Attempting to spawn Almohads within 240 days" + trigger_event = { + id = almohad.0001 + days = { 2 240 } + } + } + } + # Jomsvikings form autonomously. + if = { + limit = { + # Do we have the correct flavour pack? + has_fp1_dlc_trigger = yes + # Must be within the 10th century. + current_date >= 900.1.1 + current_date < 1000.1.1 + # The Jomsvikings cannot have already formed for any reason & by any method. + fp1_jomsvikings_have_not_existed_trigger = yes + # Must be a valid target somewhere in the appropriate region. + any_county_in_region = { + region = dlc_fp1_region_non_scandinavian_southern_baltic + holder = { fp1_ruler_eligible_for_jomsviking_coup = yes } + } + } + random = { + # Low initial chance, to give the player time. + chance = 5 + # Add 5% every decade for the first half of the century. + modifier = { + add = 5 + current_date >= 910.1.1 + } + modifier = { + add = 5 + current_date >= 920.1.1 + } + modifier = { + add = 5 + current_date >= 930.1.1 + } + modifier = { + add = 5 + current_date >= 940.1.1 + } + modifier = { + add = 5 + current_date >= 950.1.1 + } + # And then add another 25% solid chance for the whole of the latter half of the century. + modifier = { + add = 25 + current_date >= 960.1.1 + } + # Fire the event. + trigger_event = { + id = fp1_jomsvikings.1011 + days = { 30 300 } + } + } + } + # A wandering French monk appears. + if = { + limit = { + # Do we have the correct flavour pack? + has_fp2_dlc_trigger = yes + # Must be before the monk would likely die. + current_date <= 880.1.1 + # The monk hasn't already tried to turn up somewhere. + NOT = { + is_target_in_global_variable_list = { + name = unavailable_unique_events + target = flag:lyonese_monk_event + } + } + } + # If there's a player in this region, we wait for one to become eligible. + if = { + limit = { + any_player = { + capital_province = { geographical_region = dlc_fp2_lyonese_monk_region } + } + } + if = { + limit = { + OR = { + any_player = { + capital_province = { geographical_region = dlc_fp2_lyonese_monk_region } + fp2_lyonese_monk_0002_valid_character_configuration_trigger = yes + } + current_date = 880.1.1 + } + } + # Fire the event. + trigger_event = { + id = fp2_lyonese_monk.0002 + days = { 30 90 } + } + } + } + # Otherwise, we roll randomly per year immediately. + else_if = { + limit = { + any_county_in_region = { + region = dlc_fp2_lyonese_monk_region + holder = { fp2_lyonese_monk_0002_valid_court_trigger = yes } + } + } + random = { + # Low initial chance, to give the player time. + chance = 5 + # Slowly ramp up the chance till *someone* is selected, assuming we have any valid candidates. + modifier = { + add = 20 + current_date >= 870.1.1 + } + modifier = { + add = 25 + current_date >= 873.1.1 + } + modifier = { + add = 25 + current_date >= 876.1.1 + } + modifier = { + add = 25 + current_date = 880.1.1 + } + # Fire the event. + trigger_event = { + id = fp2_lyonese_monk.0002 + days = { 30 90 } + } + } + } + } + + # Rabbinicism becomes Monogamous + if = { + limit = { + # Rabbi Gershom bans polygamy sometime in the 11th century + current_date > "1000.01.01" + # Make sure this hasn't happened already + faith:rabbinism = { + has_doctrine = doctrine_polygamy + NOT = { + has_variable = rabbinicism_accepted_monogamy + has_variable = rabbinicism_rejected_monogamy + } + } + } + religion:judaism_religion = { + every_faith = { + limit = { + has_doctrine = doctrine_polygamy + has_doctrine = temple_authority_rabbinic_doctrine + } + if = { + limit = { + exists = religious_head + } + if = { + limit = { + religious_head = { top_liege != this } + religious_head.top_liege.faith = this + } + religious_head.top_liege = { trigger_event = jewish_events.0001 } + } + else_if = { + limit = { + religious_head = { top_liege != this } + religious_head.liege.faith = this + } + religious_head.liege = { trigger_event = jewish_events.0001 } + } + else = { + religious_head = { trigger_event = jewish_events.0001 } + } + } + else_if = { + limit = { + any_player = { # Checking players is more performant than checking faith characters and limiting it to players + faith = prev + } + } + random_player = { + limit = { faith = prev } + trigger_event = jewish_events.0001 + } + } + else = { + random_faith_character = { + trigger_event = jewish_events.0001 + } + } + } + } + } + + # The Rise of the Seljuk + if = { limit = { has_game_rule = never_seljuk_invasion } } + else_if = { # Random Seljuk Invasion + limit = { + has_game_rule = random_seljuk_invasion + NOR = { + exists = global_var:seljuk_invasion_happened + exists = struggle:persian_struggle # We don't allow it during the struggle (not that it can happen in 930) + } + } + random = { + chance = fp3_seljuk_chance_of_appearance + modifier = { + add = 5 + current_date > 965.1.1 + } + modifier = { + add = 5 + current_date > 985.1.1 + } + modifier = { + add = 5 + current_date > 1005.1.1 + } + modifier = { + factor = 0.25 + OR = { + culture:turkish = { culture_number_of_counties = 0 } + faith:ashari = { has_followers_trigger = no } + } + } + set_global_variable = { + name = seljuk_invasion_happened + value = yes + } + debug_log = "Attempting to spawn seljuk invasion within 240 days" + trigger_event = { + id = fp3_story_cycle_seljuks_invasion_events.0001 + days = { 2 240 } + } + } + } + else_if = { # Historical Seljuk Invasion + limit = { + current_date < 1066.1.1 + current_date >= 945.1.1 + NOR = { + exists = global_var:seljuk_invasion_happened + exists = struggle:persian_struggle # We don't allow it during the struggle (not that it can happen in 930) + } + } + random = { + chance = fp3_seljuk_chance_of_appearance + modifier = { + add = 5 + current_date > 965.1.1 + } + modifier = { + add = 5 + current_date > 985.1.1 + } + modifier = { + add = 5 + current_date > 1005.1.1 + } + modifier = { + factor = 0.25 + OR = { + culture:turkish = { culture_number_of_counties = 0 } + faith:ashari = { has_followers_trigger = no } + } + } + set_global_variable = { + name = seljuk_invasion_happened + value = yes + } + debug_log = "Attempting to spawn seljuk invasion within 240 days" + trigger_event = { + id = fp3_story_cycle_seljuks_invasion_events.0001 + days = { 2 240 } + } + } + } + + # Zanj Rebellion + if = { + limit = { + current_date = 868.1.2 + NOT = { exists = global_var:zanj_rebellion_happened } + } + debug_log = "Zanj Rebellion Story Cycle Started" + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0001 + days = { 100 5000 } + } + set_global_variable = { + name = zanj_rebellion_happened + value = yes + } + } + #Grant latin emperor a de jure kingdom after 100 years, if they've failed to grab any de jure lands yet + if = { + limit = { + exists = global_var:byz_collapse_counter + current_year >= global_var:byz_collapse_counter + exists = title:e_latin_empire.holder + title:e_latin_empire.holder = { + is_alive = yes + primary_title = title:e_latin_empire + capital_county.kingdom = { + empire = title:e_byzantium + any_de_jure_county = { + percent >= 0.5 + holder.top_liege = { + this = title:e_latin_empire.holder + } + } + } + } + NOT = { + title:e_latin_empire = { + any_in_de_jure_hierarchy = { + tier <= tier_kingdom + } + } + } + } + title:e_latin_empire.holder = { + trigger_event = ep3_frankokratia_events.0140 + } + } + #Greek anarchy CB becomes unavailable when things are settled + if = { + limit = { + exists = global_var:byz_collapse_counter + current_year >= global_var:byz_collapse_counter + OR = { + NOT = { + exists = title:e_latin_empire.holder + } + title:e_latin_empire.holder ?= { + NOT = { + any_realm_county = { + OR = { + empire = title:e_latin_empire + empire = title:e_byzantium + } + } + } + } + title:e_latin_empire.holder ?= { + any_held_title = { + this = title:e_byzantium + } + } + } + } + remove_global_variable = byz_collapse_counter + + #Send notification out to everyone in de jure latin empire + if = { + limit = { + title:e_latin_empire = { + any_in_de_jure_hierarchy = { + holder ?= { + is_ai = no + } + } + } + } + title:e_latin_empire = { + every_in_de_jure_hierarchy = { + limit = { + holder ?= { + is_ai = no + } + } + if = { + limit = { + holder ?= { + NOT = { is_in_list = latin_byz_notify } + } + } + holder = { + add_to_list = latin_byz_notify + } + } + } + } + } + if = { + limit = { + title:e_byzantium = { + any_in_de_jure_hierarchy = { + holder ?= { + is_ai = no + } + } + } + } + title:e_byzantium = { + every_in_de_jure_hierarchy = { + limit = { + holder ?= { + is_ai = no + } + } + if = { + limit = { + holder = { + NOT = { is_in_list = latin_byz_notify } + } + } + holder = { + add_to_list = latin_byz_notify + } + } + } + } + } + title:e_latin_empire.holder = { + if = { + limit = { + is_ai = no + NOT = { is_in_list = latin_byz_notify } + } + add_to_list = latin_byz_notify + } + trigger_event = ep3_frankokratia_events.0081 + } + title:e_byzantium.holder = { + if = { + limit = { + is_ai = no + NOT = { is_in_list = latin_byz_notify } + } + add_to_list = latin_byz_notify + } + } + title:e_byzantium = { + save_scope_as = byzantium + } + if = { + limit = { + any_in_list = { + list = latin_byz_notify + count > 0 + } + } + every_in_list = { + list = latin_byz_notify + send_interface_message = { + type = msg_frankokratia_anarchy_end + title = msg_greek_anarchy_cb_loss.t + desc = msg_greek_anarchy_cb_loss.desc + right_icon = scope:byzantium + custom_tooltip = lose_greek_anarchy_cb_tt + } + } + } + } + # TGP House Relations tracking + every_active_dynasty = { + every_dynasty_house = { + every_house_relation = { + if = { + limit = { + has_variable = house_relation_duration_years + } + change_variable = { + name = house_relation_duration_years + add = 1 + } + } + else = { + set_variable = { + name = house_relation_duration_years + value = 1 + } + } + } + } + } + if = { + limit = { + title:h_china.holder ?= { + can_have_tributaries_trigger = yes + any_tributary = { + count < 20 # hol' up with this if China already has 20 tributaries or more + } + } + } + random_county_in_region = { + region = tgp_china_tributary_region + limit = { + holder.top_overlord = { + is_ai = yes + is_independent_ruler = yes + any_county_in_region = { + region = tgp_china_tributary_region + this = prev.primary_title + } + NOR = { + any_owned_story = { + OR = { + story_type = story_mongol_invasion + story_type = story_greatest_of_khans + } + } + mpo_has_gok_mongol_empire_trigger = yes + has_trait = conqueror + has_trait = greatest_of_khans + is_gurkhan = yes + } + } + } + holder.top_overlord = { + set_variable = { + name = wants_to_become_tributary_of_china + years = 10 # if they haven't completed a tribute mission within 10 years we stop trying + } + } + } + } + } + + on_actions = { + inspiration_maintenance_global_pulse + natural_disaster_maintenance_global_pulse + } +} + +# Called from code once a year for "playable" (count+) characters. +# Root is the character +yearly_playable_pulse = { + effect = { + ai_budget_manipulation_effect = yes + + #Mandala + if = { + limit = { + government_has_flag = government_is_mandala + primary_title.tier >= tier_county + has_mandala_aspect_trigger = yes + house.house_head ?= root + is_adult = yes + is_at_war = no + } + ai_chance_to_become_mandala_godking_effect = yes + # Mandala Contracts + if = { + limit = { + trigger_if = { + limit = { is_ai = yes } + is_available = yes + } + trigger_else = { always = yes } + } + if = { # Spawn up to three rituals + limit = { + trigger_if = { + limit = { exists = var:available_mandala_rituals } + var:available_mandala_rituals < mandala_max_available_rituals_value + } + trigger_else = { always = yes } + } + random = { + chance = { + value = 75 + if = { + limit = { + is_ai = no + capital_province = { + NOT = { + has_building_with_flag = mandala_capital_building + } + } + } + add = 25 + } + if = { + limit = { is_at_war = yes } + add = -50 + } + if = { + limit = { is_travelling = yes } + add = -50 + } + if = { + limit = { + is_ai = yes + OR = { + is_tributary = yes + top_liege != this + } + } + add = -50 + } + } + spawn_mandala_realm_task_contract_effect = yes + } + } + else_if = { + limit = { + is_travelling = no + is_at_war = no + is_ai = no + } + send_interface_message = { + type = msg_mandala_bad + title = mandala_followers_doubting + add_piety = { + value = mandala_contract_piety + multiply = -2.5 + } + add_piety_experience = { + value = mandala_contract_piety + multiply = -2.5 + } + add_legitimacy = { + value = mandala_contract_legitimacy + multiply = -2.5 + } + } + } + } + + } + # Mercenary cultrad + else_if = { + limit = { + government_has_flag = government_is_mercenary + culture = { + has_cultural_parameter = mercenary_courtiers_gain_extra_skills + } + } + knight_increase_prowess_chance_effect = yes + every_courtier = { + limit = { + is_knight = yes + } + knight_increase_prowess_chance_effect = yes + } + } + # Independent rulers + if = { + limit = { + this = top_liege + } + # Treasury update for governments with a treasury + if = { + limit = { + has_treasury = yes + } + trigger_event = tgp_china_ministry.0100 + } + } + # Assign or level up court type trait for courtiers in a royal court + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + assign_court_type_traits_to_courtiers_effect = yes + } + # Yurt domicile bonuses distribution + if = { + limit = { + government_has_flag = government_is_nomadic + exists = domicile + } + #Dynasty of Many Khans + mpo_yearly_dynasty_of_many_khans_effect = yes + + #Yearly yurt rewards + domicile ?= { + if = { + limit = { + OR = { + has_domicile_building_or_higher = family_yurt_01 + has_domicile_building_or_higher = mystical_yurt_01 + has_domicile_building_or_higher = court_yurt_01 + } + } + mpo_yearly_yurt_rewards_effect = yes + } + } + } + + # Yearly house head opinion update: to change into only one log maybe? + if = { + limit = { + government_has_flag = government_is_clan + exists = house + is_house_head = yes + } + save_scope_as = unity_target + if = { + limit = { + OR = { + has_character_flag = steer_unity_towards_harmonious_passive_gain + has_character_flag = steer_unity_towards_antagonistic_passive_loss + } + } + house = { + add_unity_value = { + value = { + if = { + limit = { root = { has_character_flag = steer_unity_towards_harmonious_passive_gain } } + add = medium_unity_gain + } + else = { + add = medium_unity_loss + } + } + character = root + desc = clan_unity_steer_direction_passive_change.desc + } + } + } + else = { + house = { + set_variable = { + name = house_opinion_unity_impact + value = 0 + } + every_house_member = { + limit = { + is_house_head = no + is_adult = yes + } + if = { + limit = { + opinion = { + target = scope:unity_target + value >= low_positive_opinion + } + } + prev = { + change_variable = { + name = house_opinion_unity_impact + add = miniscule_unity_value + } + } + if = { + limit = { + opinion = { + target = scope:unity_target + value >= high_positive_opinion + } + } + prev = { + change_variable = { + name = house_opinion_unity_impact + add = minor_unity_value + } + } + + } + } + else = { + prev = { + change_variable = { + name = house_opinion_unity_impact + subtract = miniscule_unity_value + } + } + + if = { + limit = { + opinion = { + target = scope:unity_target + value <= high_negative_opinion + } + } + prev = { + change_variable = { + name = house_opinion_unity_impact + subtract = minor_unity_value + } + } + } + } + } + if = { + limit = { var:house_opinion_unity_impact != 0 } + add_unity_value = { + value = { + if = { + limit = { var:house_opinion_unity_impact > 0 } + add = minor_unity_gain + } + else = { + add = minor_unity_loss + } + } + character = root + desc = clan_unity_generic_average_yearly_opinion_house_head.desc + } + } + } + } + } + + # ADMINISTRATIVE GOVERNMENT + # Governor contract generation + if = { + limit = { + is_governor = yes + trigger_if = { + limit = { is_ai = yes } + is_available = yes + } + NOT = { has_government = celestial_government } + } + random = { + chance = { + value = 70 + if = { + limit = { has_character_flag = admin_governance_frequency_cooldown } + subtract = 50 + } + } + spawn_governance_contract_effect = yes + } + } + + # CELESTIAL GOVERNMENT + if = { + limit = { + government_has_flag = government_is_celestial + } + + # Governor contract generation + if = { + limit = { + trigger_if = { + limit = { is_ai = no } + is_governor_or_admin_count = yes + } + trigger_else = { # The AI only gets contracts if available and of higher tiers + is_governor = yes + is_available = yes + } + } + random = { + chance = { + value = 75 + if = { + limit = { has_character_flag = admin_governance_frequency_cooldown } + subtract = 40 + } + } + spawn_celestial_governance_contract_effect = yes + } + } + + # Yearly check to see if the hegemon is above the limit for any administration types + if = { + limit = { + is_independent_ruler = yes + OR = { + any_vassal = { + count > celestial_province_protectorate_max_value + vassal_contract_has_flag = celestial_province_protectorate + } + any_vassal = { + count > celestial_province_metropolitan_max_value + vassal_contract_has_flag = celestial_province_metropolitan + } + } + } + + # If true, this will cost legitimacy + send_interface_message = { + type = msg_legitimacy_loss + title = celestial_province_above_limit_title + + left_icon = root + + add_legitimacy = minor_legitimacy_loss + } + } + if = { + limit = { + highest_held_title_tier >= tier_empire + is_independent_ruler = yes + allowed_concubines = yes + is_ai = yes + number_of_concubines < tgp_ai_concubine_soft_cap + } + create_character = { + template = tgp_concubine_template + location = root.location + save_scope_as = new_concubine + } + make_concubine = scope:new_concubine + } + } + + if = { # Is Admin + limit = { + government_has_flag = government_is_administrative + is_landed = yes + } + # Failsafe to ensure we don't get independent admin rulers of too low a rank (i.e. below king) + # Failsafe to ensure we don't have a noble family holding land without other titles - Give any held land to liege + else_if = { + limit = { + # They are a Vassal + is_independent_ruler = no + # They have a Noble Family Title + any_held_title = { + is_noble_family_title = yes + save_temporary_scope_as = nf_title_temp + } + # And no other high tier Titles + trigger_if = { + limit = { has_government = japan_administrative_government } + NOT = { + any_held_title = { + tier >= tier_county + is_noble_family_title = no + is_landless_type_title = no + } + } + } + trigger_else = { + NOT = { + any_held_title = { + tier >= tier_duchy + is_noble_family_title = no + is_landless_type_title = no + } + } + } + } + create_title_and_vassal_change = { + type = stepped_down + save_scope_as = change + add_claim_on_loss = no + } + every_held_title = { + limit = { + is_landless_type_title = no + is_noble_family_title = no + } + add_to_list = revoked_titles + } + every_in_list = { + list = revoked_titles + change_title_holder_include_vassals = { + holder = root.liege + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + + if = { + limit = { + has_character_flag = tournament_ai_override + } + ai_attempt_to_host_activity = activity_tournament + } + else_if = { + limit = { + has_character_flag = feast_ai_override + } + ai_attempt_to_host_activity = activity_feast + } + else_if = { + limit = { + has_character_flag = examinations_ai_override + } + ai_attempt_to_host_activity = activity_imperial_examination + } + + # Scalable Modifiers which needs to be reapplied + hidden_effect = { + if = { + limit = { + has_character_modifier = church_investment_modifier + } + remove_character_modifier = church_investment_modifier + add_character_modifier = church_investment_modifier + } + } + if = { + limit = { + has_perk = learn_on_the_job_perk + has_government = landless_adventurer_government + } + every_courtier = { + limit = { + is_physically_able_adult = yes + NOT = { exists = inspiration } + } + random = { + chance = { + value = 0 + add = { + value = book_inspiration_average_skill_value + if = { + limit = { + has_trait = lazy + } + multiply = 0.5 + } + if = { + limit = { + root = { + any_courtier = { + exists = inspiration + } + } + } + multiply = 0.5 + } + } + } + create_inspiration = book_inspiration + save_scope_as = inspired_follower + root = { + send_interface_message = { + type = send_interface_message_good + title = adventurers_gather_inspiration_option.title + left_icon = scope:inspired_follower + scope:inspired_follower = { + custom_tooltip = { + text = adventurers_gather_inspiration_option.effect + } + } + } + } + } + } + } + # AI Adventurer contract logic setup + if = { + limit = { + ep3_adventurer_ai_logic_valid_trigger = yes + NOT = { owns_story_of_type = story_adventurer_ai } + } + create_story = { type = story_adventurer_ai } + } + if = { # If a player adventurer manages to glitch in place, save them by moving them to the domicile location + limit = { + is_ai = no + has_government = landless_adventurer_government + location != domicile.domicile_location + is_imprisoned = no + is_travelling = no + NOT = { + exists = involved_activity + } + num_taken_task_contracts <= 0 + is_commanding_army = no + } + set_location_to_default = yes + } + if = { # If courtiers get lost between governorship assignments, move them home + limit = { + government_allows = merit + } + if = { + limit = { + is_landed = yes + } + every_courtier = { + limit = { + location != root.capital_province + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + else_if = { + limit = { + exists = domicile.domicile_location + } + every_courtier = { + limit = { + location != root.domicile.domicile_location + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + } + if = { + limit = { + NOT = { + top_liege ?= { + is_confederation_member = yes + } + } + has_character_modifier = mpo_confederation_member_modifier + } + remove_character_modifier = mpo_confederation_member_modifier + } + # Stray player Herders get turned into Nomads + if = { + limit = { + is_ai = no + government_has_flag = government_is_herder + } + every_held_title = { + limit = { + tier = tier_county + title_province = { + has_holding_type = herder_holding + } + } + title_province = { + set_holding_type = nomad_holding + } + } + change_government = nomad_government + } + + ###################### + # Various safeguarding against realm setups with landless participants + ###################### + if = { + limit = { + is_landed = no + } + + save_scope_as = scoped_ruler + + ###################### + # Fix Adventurers that end up with a Liege or Noble Family title + ###################### + + if = { + limit = { + government_has_flag = government_is_landless_adventurer + } + if = { + limit = { + this != top_liege + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + scope:scoped_ruler = { + becomes_independent = { change = scope:change } + } + resolve_title_and_vassal_change = scope:change + } + if = { + limit = { + any_held_title = { + is_noble_family_title = yes + } + } + every_held_title = { + limit = { + is_noble_family_title = yes + } + scope:scoped_ruler = { + destroy_title = prev + } + } + } + } + + ###################### + # Repair realms with Landless participants having vassals + ###################### + + if = { + limit = { + any_sub_realm_county = { + is_landless_type_title = no + } + } + + ###################### + # Landless Lieges with Landed Vassals should take a County from a Vassal + ###################### + + if = { + limit = { # Make sure we repair realms in the right order + OR = { + this = top_liege + liege ?= { + is_landed = yes + } + } + } + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + } + random_sub_realm_county = { + limit = { + is_landless_type_title = no + } + weight = { + modifier = { + add = 100 + this = scope:scoped_ruler.primary_title.title_capital_county + } + modifier = { + add = -100 + holder = { + is_ai = no + } + } + } + change_title_holder = { + holder = scope:scoped_ruler + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + ###################### + # Landless vassals with Landed vassals should take something and become landed + ###################### + + every_vassal = { + limit = { + is_landed = no + any_sub_realm_county = { + is_landless_type_title = no + } + } + save_scope_as = vassal_ruler + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + } + random_sub_realm_county = { + limit = { + is_landless_type_title = no + } + weight = { + modifier = { + add = 100 + this = scope:vassal_ruler.primary_title.title_capital_county + } + modifier = { + add = -100 + holder = { + is_ai = no + } + } + } + change_title_holder = { + holder = scope:vassal_ruler + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + } + + ###################### + # Destroy the AI's landless nomad vassals, as they'll just bloat the game for no gain + ###################### + + else_if = { + limit = { + is_ai = yes + top_liege != this + government_has_flag = government_is_nomadic + is_landed = no + liege = { is_ai = yes } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + scope:scoped_ruler = { + destroy_title = prev + } + } + } + # Players become independent so they can migrate + else_if = { + limit = { + is_ai = no + top_liege != this + government_has_flag = government_is_nomadic + is_landed = no + liege = { is_ai = yes } + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + becomes_independent = { change = scope:change } + resolve_title_and_vassal_change = scope:change + } + + ###################### + # AI's with a Nomadic Camp title that somehow end up with the wrong government and landless should be purged + ###################### + + if = { + limit = { + NOT = { government_has_flag = government_is_nomadic } + any_held_title = { + is_nomad_title = yes + } + } + save_scope_as = scoped_ruler + if = { + limit = { + is_ai = yes + } + every_held_title = { + limit = { + is_nomad_title = yes + } + scope:scoped_ruler = { + destroy_title = prev + } + } + } + # Players are saved + else_if = { + limit = { + is_ai = no + } + change_government = nomad_government + } + } + + ###################### + # Landless nomads outside any migration area? Cleanup. + ###################### + + if = { + limit = { + is_ai = yes + top_liege = this + NOT = { + any_character_situation = { + any_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:scoped_ruler + } + } + } + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + scope:scoped_ruler = { + destroy_title = prev + } + } + } + } + + # ACH AI vibe checks + if = { + limit = { + has_realm_law = uncrowned + is_ai = yes + } + # Why are you like this, get rid of the crowned variables + if = { + limit = { + has_variable = crowned_king_var + } + remove_variable = crowned_king_var + } + else_if = { + limit = { + has_variable = crowned_emperor_var + } + remove_variable = crowned_emperor_var + } + #Try removing them from their army to make them available + if = { + limit = { + is_in_army = yes + martial <= medium_skill_rating + location ?= { + any_army_in_location = { + is_army_in_combat = no + } + } + NOR = { + any_war_enemy = { + is_ai = no + } + any_war_ally = { + is_ai = no + } + } + } + location = { + random_army_in_location = { + limit = { + army_commander = root + } + remove_commander = yes + } + } + } + #Do you need an artifact? + if = { + limit = { + can_host_activity = activity_coronation + coronation_has_proper_artifact_trigger = no + } + random = { + chance = coronation_artifact_ai_instant_creation_chance + coronation_create_artifact_yearly_effect = yes + } + } + + #If you need to be anointed... + #First step is being un-excommunicated + if = { + limit = { + highest_held_title_tier >= tier_empire + has_trait = excommunicated + faith = { + has_doctrine = doctrine_spiritual_head + has_doctrine = doctrine_imperial_anointment + } + custom_tooltip = { + text = anointment_request_already_supported + NOT = { + is_target_in_variable_list = { + name = supported_anointments + target = scope:actor + } + } + } + is_character_interaction_valid = { + recipient = faith.religious_head + interaction = declaration_of_repentance_interaction + } + } + run_interaction = { + interaction = declaration_of_repentance_interaction + actor = this + recipient = faith.religious_head + execute_threshold = maybe + } + } + #Next step is getting approval + else_if = { + limit = { + exists = faith.religious_head + is_character_interaction_valid = { + recipient = faith.religious_head + interaction = coronation_anointment_request + } + faith = { + has_doctrine = doctrine_spiritual_head + has_doctrine = doctrine_imperial_anointment + } + } + run_interaction = { + interaction = coronation_anointment_request + actor = this + recipient = faith.religious_head + execute_threshold = maybe + } + } + #Next step is hosting the dang coronation + else = { + ai_attempt_to_host_activity = activity_coronation + debug_log = "AI attempted to host a coronation" + debug_log_scopes = yes + } + } + } + events = { + court_maintenance.0012 # Dynasty banner improves with renown + court_maintenance.0013 # Remove duplicate dynasty banners + } + on_actions = { + ai_character_pulse + delay = { days = 75 } + + pagan_conversion_pulse + } +} + +# Called from code once every three years for "playable" (count+) characters. +# Root is the character +three_year_playable_pulse = { + events = { + adultery.0001 #Suspected spouse/soulmate of cheating (increased chance when there is a lover, but can also trigger otherwise) + } + random_events = { + 800 = 0 + 200 = global_culture.3011 + 600 = global_culture.3012 + } + effect = { + if = { # Nomadic herd starves if you're landless + limit = { + is_landed = no + government_has_flag = government_is_nomadic + exists = domicile + is_migrating = no + is_at_war = no + } + if = { + limit = { + domicile.herd > 500 + } + change_current_weight = -25 + every_courtier = { + change_current_weight = -25 + } + send_interface_toast = { + type = event_toast_effect_bad + title = herd_starvation_title + left_icon = root + custom_tooltip = herd_starvation_custom_tooltip + domicile ?= { + change_herd = { + value = root.domicile.herd + divide = 3 + min = 500 + if = { + limit = { + root = { is_ai = yes } + } + min = 1000 + } + multiply = -1 + } + } + } + } + clean_up_ai_nomad_effect = yes + } + if = { # Various nomadic safeguards + limit = { + is_landed = yes + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + + save_scope_as = scoped_ruler + + ###################### + # Nomadic titles that end up with non-nomadic holders are destroyed + ###################### + if = { + limit = { + any_held_title = { + is_nomad_title = yes + } + } + every_held_title = { + limit = { + is_nomad_title = yes + } + scope:scoped_ruler = { + destroy_title = prev + } + } + } + + ###################### + # Anyone who *only* holds Nomadic lands should become Nomadic + ###################### + + if = { + limit = { + highest_held_title_tier >= tier_county + capital_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + NOT = { + any_held_title = { + tier = tier_county + is_landless_type_title = no + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + every_held_title = { + limit = { + tier = tier_county + title_province = { + has_holding_type = herder_holding + } + } + title_province = { + set_holding_type = nomad_holding + } + } + change_government = nomad_government + + # We don't want overly-funky nomad camps to spring up, so set an appropriate culture/faith + if = { + limit = { + domicile.domicile_culture != capital_county.culture + } + domicile = { + set_domicile_culture = scope:scoped_ruler.capital_county.culture + } + } + if = { + limit = { + domicile.domicile_faith != capital_county.faith + } + domicile = { + set_domicile_faith = scope:scoped_ruler.capital_county.faith + } + } + } + } + else_if = { + limit = { + government_has_flag = government_is_nomadic + is_ruler = yes + } + + save_scope_as = scoped_ruler + + ###################### + # If you end up losing your Nomadic Capital, get a new one + ###################### + + if = { + limit = { + NOT = { + any_held_title = { + is_nomad_title = yes + } + } + } + create_nomad_title = { + name = nomad_title_name + holder = scope:scoped_ruler + government = nomad_government + save_scope_as = new_nomad_title + } + domicile ?= { + add_domicile_building = yurt_main_02 + add_domicile_building = yurt_main_03 + add_random_yurt_external_building_effect = yes + add_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + upgrade_random_yurt_external_building_effect = yes + } + } + + ###################### + # If your nomadic capital domicile somehow gets lost, move it to your capital province + ###################### + + if = { + limit = { + is_at_war = no + exists = domicile + domicile.domicile_location != capital_province + } + domicile = { move_domicile = scope:scoped_ruler.capital_province } + } + } + if = { # Inspirations for courtiers of Advancement Movement rulers + limit = { + has_dlc_feature = all_under_heaven + top_participant_group:dynastic_cycle ?= { + participant_group_type = advancement_movement + } + any_courtier_or_guest = { + is_physically_able_adult = yes + ep1_is_valid_character_for_inspiration_trigger = yes + save_temporary_scope_as = inspired_courtier + } + } + grant_inspiration_to_character_no_court_artifacts_effect = { + CHARACTER = scope:inspired_courtier + } + send_interface_toast = { + type = msg_court_inspiration + left_icon = scope:inspired_courtier + title = courtier_inspired_message + desc = courtier_inspired_effect + } + } + } +} + +# Called from code once every five years for "playable" (count+) characters. +# Root is the character +five_year_playable_pulse = { + effect = { + ai_chance_to_become_conqueror_effect = yes + # Special Holy Seeds drops + if = { + limit = { + has_dlc_feature = legends + piety_level >= very_high_piety_level + NOT = { has_variable = saintly_deed_var } + NOR = { + has_game_rule = historical_legends_only + has_personal_legend_seed = holy + } + } + random = { + chance = 10 + send_interface_toast = { + title = holy_seed_toast_traits + left_icon = root + set_variable = saintly_deed_var + create_legend_seed = { + type = holy + quality = famed + chronicle = saintly_life + properties = { + religion = root.religion + } + } + } + } + } + chance_for_random_nickname_effect = yes + ai_chance_to_switch_to_travel_focus_effect = yes + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + every_courtier = { + limit = { + is_available_ai = yes + age > 6 + NOT = { + knows_court_language_of = host + } + } + random = { + chance = { + value = -4 + add = learning + if = { + limit = { + is_adult = no + } + add = 4 + } + if = { + limit = { + host = { + employs_court_position = court_tutor_court_position + } + } + add = 2 + } + if = { + limit = { + host = { + employs_court_position = court_guru_court_position + } + } + add = 2 + } + if = { + limit = { + host = { + has_court_type = court_diplomatic + } + } + add = 2 + } + if = { + limit = { + host = { + has_court_type = court_scholarly + } + } + add = 4 + } + } + learn_court_language_of = host + } + } + if = { + limit = { + employs_court_position = court_poet_court_position + } + every_court_position_holder = { + type = court_poet_court_position + limit = { + is_physically_able_adult = yes + ep1_is_valid_character_for_inspiration_trigger = yes + } + random = { + chance = { + value = 5 + add = { + value = this.aptitude:court_poet_court_position + multiply = 5 + if = { + limit = { + has_trait = lazy + } + multiply = 0.5 + } + } + } + grant_inspiration_to_character_effect = { CHARACTER = this } + save_scope_as = inspired_poet + root = { + send_interface_toast = { + type = msg_court_inspiration + left_icon = scope:inspired_poet + title = poet_inspired_message + desc = poet_inspired_effect + } + } + } + } + } + if = { + limit = { + employs_court_position = court_artificer_court_position + } + every_court_position_holder = { + type = court_artificer_court_position + limit = { + is_physically_able_adult = yes + ep1_is_valid_character_for_inspiration_trigger = yes + NOT = { has_character_flag = regular_inspiration_block } + } + random = { + chance = { + value = 5 + add = { + value = this.aptitude:court_artificer_court_position + multiply = 5 + if = { + limit = { + has_trait = lazy + } + multiply = 0.5 + } + } + } + grant_inspiration_to_character_effect = { CHARACTER = this } + save_scope_as = artificer + root = { + send_interface_toast = { + type = msg_court_inspiration + left_icon = scope:artificer + title = poet_inspired_message + desc = court_artificer_inspired_effect + } + } + } + } + } + } + if = { + limit = { + cp:councillor_court_chaplain ?= { + is_theocratic_lessee = yes + NOT = { + knows_language_of_culture = root.culture + } + } + } + cp:councillor_court_chaplain = { + random_list = { + 10 = { + modifier = { + add = learning + } + learn_language_of_culture = root.culture + } + 5 = { + trigger = { + can_start_scheme = { type = learn_language target_character = root } + } + start_scheme = { + type = learn_language + target_character = root + } + } + } + } + } + + } + events = { + courtier_guest_management.3001 # Courtiers and guests getting relationships & secrets + game_rule.1 # De Jure Requirement Game Rule + game_rule.4 # Empire Obscurity Game Rule + culture_tradition_events.3000 # Bear Sightings + } + on_actions = { + delay = { days = { 45 75 } } + culture_hybridization_emergence_events + delay = { days = { 45 75 } } + culture_divergence_emergence_events + } +} + +# Called from code once a quarter for "playable" (count+) characters. +# Root is the character +# scope:quarter is which quarter it's for, from 1 to 4. Note that scope:quarter = 1 isn't necessarily in Q1 by calendar time +quarterly_playable_pulse = { + on_actions = { + realm_maintenance_quarterly_pulse + + # Event pools + stewardship_lifestyle_progress_pulse + intrigue_lifestyle_progress_pulse + diplomacy_lifestyle_progress_pulse + martial_lifestyle_progress_pulse + learning_lifestyle_progress_pulse + wanderer_lifestyle_progress_pulse + + # Relation pulses are spread out across the four quarterly pulses a year + lover_quarterly_pulse + friendship_quarterly_pulse + rival_quarterly_pulse + mentor_student_quarterly_pulse + + # EP1 maintenance pulses + inspiration_maintenance_quarterly_pulse + + # MPO + mpo_tributary_check_pulse + } + random_on_action = { + chance_to_happen = 75 + chance_of_no_event = { # Fewer events for the AI + value = 0 + if = { + limit = { + is_ai = yes + } + add = 95 + } + } + 100 = ep3_yearly_events_laamps + } +} + +# Called from code once a year for all "playable" characters, at a random point that year (individually for each character). Different time from the random_yearly_everyone_pulse (coincides by random 1 time out of 365) +# Root is the character +random_yearly_playable_pulse = { + trigger = { + basic_is_valid_for_yearly_events_trigger = yes + } + random_on_action = { + chance_of_no_event = { + value = 0 + if = { + limit = { + is_ai = yes + highest_held_title_tier >= tier_kingdom + } + add = 30 # No need to waste performance here + } + else_if = { + limit = { + is_ai = yes + highest_held_title_tier >= tier_duchy + } + add = 70 # No need to waste performance here + } + else_if = { + limit = { + is_ai = yes + } + add = 95 # AI counts aren't particularly important + } + } + 6 = on_yearly_events + 5 = fp1_yearly_events + 4 = fp2_yearly_events + 4 = fp3_yearly_events + 2 = bp1_yearly_events + 6 = ep3_yearly_events_byzantium + 6 = ep3_yearly_events_admin + 6 = tgp_japan_yearly_events + 6 = tgp_china_yearly_events + 6 = tgp_mandala_yearly_events + 6 = ongoing_house_feud_events + 10 = mpo_yearly_events_nomads + } + effect = { + # Special Holy Seeds drops + if = { + limit = { + has_dlc_feature = legends + OR = { + has_trait = theologian + has_trait = sayyid + } + NOR = { + has_game_rule = historical_legends_only + has_personal_legend_seed = holy + } + } + random = { + chance = 15 + send_interface_toast = { + type = msg_legend_seed_created + title = holy_seed_toast_traits + left_icon = root + create_legend_seed = { + type = holy + quality = famed + chronicle = saintly_life + properties = { + religion = root.religion + } + } + } + } + } + # Commander Trait Leveling for AI + if = { + limit = { + is_ai = yes + OR = { + has_commander_trait_trigger = yes + any_knight = { + has_commander_trait_trigger = yes + } + } + } + commander_trait_lvling_ai_effect = yes + every_knight = { + limit = { + is_ai = yes + has_commander_trait_trigger = yes + } + commander_trait_lvling_ai_effect = yes + } + } + if = { + limit = { has_tgp_dlc_trigger = yes } + develop_celestial_tributaries = yes + } + # Fallback for AI budgeting (primarily handled in `tgp_china_ministry.0100`) + if = { + limit = { + is_ai = yes + is_independent_ruler = yes + has_treasury = yes + OR = { + # In big treasury debt + treasury <= -200 + # We're due a budget + treasury_years_since_budget_enact_date > 3 + # We have a lot of new budget capacity + character_treasury_new_budget_capacity > { + value = character_treasury_budget_capacity + multiply = 2.0 + } + } + can_afford_enact_treasury_budget_costs = yes + } + enact_treasury_budgets = yes + } + } + on_actions = { + delay = { days = { 45 75 } } + on_yearly_common_events + delay = { days = { 50 80 } } + on_yearly_invisible_events + delay = { days = { 85 165 } } + bishop_ongoing + delay = { days = { 166 185 } } + wet_nurse_pulse + delay = { days = { 51 180 } } + childhood_ongoing + delay = { days = { 51 180 } } + hunt_sighting_on_action + delay = { days = { 181 240 } } + bp2_child_pulse + delay = { days = { 181 240 } } + bp2_parent_guardian_hostage_taker_pulse + delay = { days = { 241 290 } } + bp2_adult_followups + delay = { days = { 291 310 } } + court_scholar_ongoing + delay = { days = { 25 44 } } + clan_events_on_action + ep3_akolouthos_on_action + delay = { days = { 25 44 } } + mpo_migration_contract + delay = { days = { 1 180 } } + mpo_migration_contract + delay = { days = { 181 360 } } + mpo_de_jure_shift + delay = { days = { 1 30 } } + # on_yearly_tutorial_events # TODO[Ruler Objectives]: Make generally available once ready for it + } +} + +# Called from code once a year for all characters, at a random point that year (individually for each character) +# Root is the character +random_yearly_everyone_pulse = { + on_actions = { + yearly_health_pulse + stress_pulse + prison_maintenance_pulse + house_feud_ai_scheme_pulse + } + random_on_action = { + chance_of_no_event = { + value = 95 + } + 1 = assign_trait_events + } + events = { + holy_order.0206 #To increment the years passed since loan + marriage_interaction.0007 #One of the betrothed became part of clergy that doesn't allow marriage + tgp_silk_road_events.0100 #Culture adopts controlled Silk Road market innovation + } + random_events = { + 500 = 0 + 100 = holy_order.0202 #Holy order demands payment + } +} + +# Called from code once every five years for all characters. +# Root is the character +five_year_everyone_pulse = { + effect = { + # Herders may become Seasoned Pastoralists + root = { + if = { + limit = { + government_has_flag = government_is_herder + NOT = { has_trait = lifestyle_seasoned_pastor } + age >= 30 + } + random = { + chance = 20 + add_trait = lifestyle_seasoned_pastor + } + } + + if = { # Non-lowborn Barons should marry and produce a family + limit = { + primary_title.tier ?= tier_barony + is_adult = yes + is_married = no + is_lowborn = no + NOT = { + government_has_flag = government_is_republic + } + can_marry_trigger = yes + } + if = { + limit = { + exists = location + any_pool_character = { + province = root.location + can_have_children_with = { CHARACTER = root } + is_physically_able_adult = yes + age <= 40 + is_married = no + can_marry_trigger = yes + is_concubine = no + is_claimant = no + } + } + random_pool_character = { + province = root.location + limit = { + can_have_children_with = { CHARACTER = root } + is_physically_able_adult = yes + age <= 40 + is_married = no + can_marry_trigger = yes + is_concubine = no + is_claimant = no + } + save_temporary_scope_as = spouse + } + } + else = { + create_character = { + location = root.location + template = mediocre_spouse + save_temporary_scope_as = spouse + } + } + + if = { + limit = { + is_female = yes + scope:spouse = { + is_lowborn = yes + } + } + marry_matrilineal = scope:spouse + } + else = { + marry = scope:spouse + } + } + + } + + + if = { # Long term gold is pointless for Barons - add it to short term instead + limit = { + is_ai = yes + highest_held_title_tier = tier_barony + gold > 0 + long_term_gold > 0 + } + move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_short_term } + } + + # FP2 - Checks to start El Cid's Travels + if = { + limit = { # Am I El Cid? + has_fp2_dlc_trigger = yes + has_ep3_dlc_trigger = no + this = character:107590 + NOT = { has_character_flag = has_already_begun_travelling } # Separate first check, for performance + + NOT = { # Start date employer is either dead or gone + OR = { + top_liege = character:107500 + liege = character:107500 + employer = character:107500 + } + } + is_available_healthy_ai_adult = yes # Am I ready to go on an adventure? + } + trigger_event = fp2_struggle.2045 + } + #young nobodies getting castrated + if = { + limit = { + ep3_ai_castration_target_trigger = yes + } + trigger_event = ep3_yearly.3000 + } + } + on_actions = { + disease_outbreak_pulse # moved from health_on_actions.txt + } + events = { + murder_scheme_maintenance.1 # Murder schemes for the AI, including unlanded characters + } +} + +# Called from code once every 3 years for pool characters +# root = the character +three_year_pool_pulse = { + trigger = { + is_pool_character = yes # Can cease to be in the pool between it queuing and executing + } + events = { + courtier_guest_management.2001 #"Develops" the character and gives those without location a location + } + random_events = { + chance_to_happen = 25 + chance_of_no_event = { # throttle wanderer Adventurers because they're simply less interesting + if = { + limit = { + has_global_variable_list = laamps_tally + global_variable_list_size = { + name = laamps_tally + value > seventyfive_percent_of_max_desired_laamps_value + } + } + value = 100 + } + } + 100 = courtier_guest_management.4001 # Wanderer becomes an adventurer + } +} + +#Only triggered if you actually have prisoners +prison_maintenance_pulse = { + trigger = { + any_prisoner = { } + } + on_actions = { + #Set up quarterly pulses + delay = { days = 45 } + quarterly_prison_maintenance_pulse + delay = { days = 135 } + quarterly_prison_maintenance_pulse + delay = { days = 225 } + quarterly_prison_maintenance_pulse + delay = { days = 315 } + quarterly_prison_maintenance_pulse + } +} + + +#Pulse for various AI stuff +ai_character_pulse = { + trigger = { + is_ai = yes + } + random_events = { + chance_to_happen = 25 + 500 = 0 + 100 = learn_commander_trait.0001 + 100 = holy_order.0100 #Give pilgrim trait to holy order members + } +} + +culture_hybridization_emergence_events = { + random_events = { + 95 = 0 + 5 = culture_emergence_events.0001 # Create a hybrid culture with your capital culture + } +} + +culture_divergence_emergence_events = { + random_events = { + 199 = 0 + 1 = culture_emergence_events.0002 # Create a divergent culture + } +} + +on_yearly_common_events = { + random_events = { + chance_to_happen = 50 + 1000 = 0 + 300 = lover.0003 #Too many lovers - break up with one? + 90 = language_events.0001 #Too many known languages - forget one? + 10 = language_events.0010 #Owl version of Too many known languages - forget one? + 200 = parent.0001 #parent_meddling_value_effect decreases over time + 200 = childhood.2010 # Convince ward they owe you + 50 = relation_upgrade.3000 # Vengeful character gains a rival, also for Cultural Tradition more rivals + #Adultery events + 50 = adultery.2001 #Is the father suspicious of child or not? + 10 = adultery.3001 #Mother tells child the secret about them + 10 = culture_tradition_events.2000 # Vassal Gain Loyal Trait + 10 = culture_tradition_events.2001 # Vassal Gain Disloyal Trait + 100 = culture_tradition_events.2100 # Storytelling cultural tradition + } +} + +# Accolades yearly events +three_year_playable_pulse = { + events = { + ep2_accolade_events.0100 #Huntsmaster gives you or heir Hunter trait event + ep2_accolade_events.0200 #Blademaster gives you or heir Blademaster trait event + ep2_accolade_events.0300 #Master of Revels gives you or heir Reveler trait event + ach_maintenance_events.0002 # ACH Oath synergy culture rewards + } +} + +on_yearly_invisible_events = { + random_events = { + chance_to_happen = 5 + 150 = 0 + 100 = secrets.1004 #Courtier learns another courtier's minor secret + 50 = secrets.1005 #A Courtier learns another courtier's major secret + } +} + +on_yearly_events = { + random_events = { + chance_to_happen = 25 + 200 = 0 + + 50 = yearly.0001 #Skill Tutoring + 100 = yearly.0002 #Indiscreet Councillor + 10 = yearly.0003 #Forbidden Love + 25 = yearly.0011 #Comet Sighted! + + 75 = yearly.1001 #Someone else's spouse makes a move at you + 50 = yearly.1010 #Person you care about is abducted by rival + 15 = yearly.1020 #High-up ruler wants you to deal with pesky enemy + 100 = yearly.1030 #Someone you have hooked offers up other character's secret + 50 = yearly.1040 #Courtier is hiding a letter - surprise or secret? + 100 = yearly.1050 #Heir fancies themselves a duelist + 100 = yearly.1060 #The oldest joke in the book + 100 = yearly.1070 #Someone is your potential soulmate + 100 = yearly.1080 #You are being paranoid + 100 = yearly.1090 #Foreign guests + + 80 = yearly.3001 #Dedication to Loyalty + 100 = yearly.3011 #An Impression Twice Made + 100 = yearly.3021 #On Their Deathbed + 100 = yearly.3031 #Getting Ahead + 50 = yearly.3040 #A Good FaithPracticioner + 100 = yearly.3041 #Chafing Under Secular Laws + 100 = yearly.3051 #By Right + 50 = yearly.3061 #Cagots + 5 = yearly.3071 #A terrible nightmare + 5 = party_baron.0001 # Start the Party Baron story cycle + + 100 = yearly.4001 #A powerful vassal has angered neighboring ruler + 100 = yearly.4011 #Heir is spending a lot of time with one of your powerful vassals + 10 = yearly.4021 #Mamaaaa, just killed a child + 10 = yearly.4031 #Who keeps leaving dead bodies all around the castle?! + 20 = yearly.4051 #Get a gift from a neighboring ruler (triggered here so you can't know for sure if someone has a scheme towards you) + + 100 = yearly.5001 #Catching Lover and Spouse fighting. + 100 = yearly.5010 #Vassal shows compassion to stressed/sick ruler, incurs in the jealousy of another vassal + 100 = yearly.5020 #Councilor offers to teach heir + 100 = yearly.5030 #Powerful Vassal offers to reveal secret of other Powerful Vassal to liege. + 100 = yearly.5040 #Two unimportant courtiers caught talking about powerful vassal. + 100 = yearly.5050 #Spouse feels slighted by courtier. + + 10 = stress_trait_coping_decisions.2002 #Your stuff got stolen by a person in a brothel! + + 100 = yearly.7001 #Faction attempts a coup or kidnapping + + 10 = yearly.7010 #Opportunity to participate in a football game + + 10 = yearly.7050 #Foggy Hill + + 200 = major_decisions.2011 #Gain a scholar character if you have a University in your sub-realm + + #'Nice' events (positive effects) + 100 = yearly.8000 # Vassal offers liege a gift + 100 = yearly.8100 # The peasantry of a Domain province gives you a gift + 100 = yearly.8200 # Your realm priest offers you part of a large donation + 100 = yearly.8300 # A group of vassals collectively wish to contribute to your war effort + 20 = yearly.8400 # Discover a guest's Deviant secret (Strong Hook), and get the potential to send them to a rival's court + 300 = yearly.8500 # Your Head of Faith sends you a gift if you're fighting heathens + + #Ai value events + 100 = trait_specific_ongoing.2010 # Positive zeal: which god/saint is talking to me? + 100 = witch.4001 # Negative zeal: annoying clergy + + # Stress Events + 100 = stress_trait_ongoing.0501 # A relaxing evening with some hashish cakes. + 100 = stress_trait_ongoing.0506 # Self-medicating pain away with hashish. + 100 = stress_trait_ongoing.0511 # An elderly person laments the follies of hashish-consuming youth. + 100 = stress_trait_ongoing.0516 # You zone out whilst eating hashish in an important meeting. + 100 = stress_trait_ongoing.1501 # Rake fantasizes about courtier. + 100 = stress_trait_ongoing.4501 # Comfort Eater runs out of favorite food. + 100 = stress_trait_ongoing.4502 # Cannibal needs to satisfy their craving! + 100 = stress_trait_ongoing.5001 # Inappetetic has a important character prepare a feast for them. + + #Elephant events for India + 300 = yearly.9020 # A Mighty Elephant + + # Tribal events + 100 = tribal.1101 #Holmgang with a rival + 100 = tribal.1201 #Horse Racing + 100 = tribal.1301 #Crocodile Encounter + 100 = tribal.1303 #Irrigate Oasis + + #Clan events + 150 = clan.1001 #Powerful vassal requests marriage + 150 = clan.1011 #A vassal asks for a perk + 150 = clan.1101 #Vassal Resents Nepotism + 100 = clan.1201 #Culture seeks Representation + + #Muslim-specific events (mostly about Islamic centers of learning) + 200 = yearly.4061 #A wise man visits your court + 200 = yearly.4071 #You're very educated! + 200 = yearly.4081 #Sponsor the translation of a book from Greek + 200 = yearly.4091 #Your ward and you visit scholars + + # Saharan regional flavour events. + ## Marginally bumped some weightings for regional effect. + 500 = yearly_saharan.0001 # An organised faith's merchants try to convert a pagan county in your domain. + 500 = yearly_saharan.0021 # Desert nomads wish to move to one of your non-nomadic Saharan counties. + 300 = yearly_saharan.0031 # Local slave raids intensify (aggressor). + 300 = yearly_saharan.0032 # Local slave raids intensify (defender). + + # Persion regional flavor events + 400 = yearly_persian.1001 # Nowruz, or Persian New Year + 400 = yearly_persian.1101 # Shu'ubiyya, or Persian Nationalism (From the foreign side) + + # Varangian Guard + 400 = varangian.0001 # A Courtier wants to join the Varangian Guard + + #Pet story cycles + 20 = pet_animal.5001 # Rival has cat... + 20 = pet_animal.5002 # Rival has dog... + + #Holy Order + 100 = holy_order.2001 # Child wishes to join Holy Order + 100 = holy_order.2002 # Sibling wants to join a Holy Order + 200 = holy_order.2003 # Holy Order suggests you send them a child + 1000 = holy_order.2004 # Child returns to pick up the mantle + 100 = holy_order.2005 # A - Possibly Undesirable - Child Returns Home + 1000 = fp1_jomsvikings.0011 # FP1 - Jomsvikings terrorise their neighbours + + #Relationship Upgrade Events + 75 = relation_upgrade.0001 + 75 = relation_upgrade.1001 + 75 = relation_upgrade.2001 + 75 = relation_upgrade.2101 + + #lunatic + 100 = trait_specific_ongoing.1001 # You're developing 'glass delusion' + 100 = trait_specific_ongoing.1003 # Collecting animals + 100 = trait_specific_ongoing.1005 # Talk to dead people + 100 = trait_specific_ongoing.1007 # A lunatic dreams of glass (enables the lunatic_building_decision decision) + 50 = trait_specific_ongoing.1008 # You kill a friend :( + 100 = trait_specific_ongoing.1009 # Grandiose delusions + 100 = trait_specific_ongoing.1010 # You love your warhorse + 100 = trait_specific_ongoing.1011 # Force your court to be naked + 20 = trait_specific_ongoing.1012 # Ravings + 100 = trait_specific_ongoing.1015 # Paranoid delusions + #possessed + 100 = trait_specific_ongoing.2001 # Witchy or divine visions? + 100 = trait_specific_ongoing.2009 # Which god/saint is talking to me? + 100 = trait_specific_ongoing.2015 # Court physician wants to treat you + 100 = trait_specific_ongoing.2025 # Seizure surrounded by people + #depressed + 100 = trait_specific_ongoing.3001 # You bond with a fellow depressed character + 100 = trait_specific_ongoing.3002 # Your court physician tries to treat you + 100 = trait_specific_ongoing.3009 # You're exhausted + 100 = trait_specific_ongoing.3015 # Someone calls you lazy + #cannibal + 100 = trait_specific_ongoing.5001 # Private conversation with a vassal or courtier + 100 = trait_specific_ongoing.5003 # Eat someone from the staff + 100 = trait_specific_ongoing.5004 # Eat an old lady + 100 = trait_specific_ongoing.5005 # Eat a courtier + #deviant + 100 = trait_specific_ongoing.6001 # Convert a lover to the freaky side of things + 100 = trait_specific_ongoing.6002 # You walk in on your deviant liege + #drunkard + #100 = trait_specific_ongoing.7001 + #incestuous + #100 = trait_specific_ongoing.8001 + #Witch + 100 = witch.4000 #Annoying clergy + 100 = witch.4010 #Personal witch ritual + 100 = witch.4020 #Pray with potential friends + 25 = witch.4030 #Rare book + + # Friend Events + 10 = friendship.0003 #Friend might become Lover + 100 = friendship.1001 #Send Friend a gift + 500 = friendship.1006 # Receive wartime support from Friend + 100 = friendship.1008 #Send a good courtier to your Friend + 100 = friendship.2001 #Confess a secret to your Friend + 30 = friendship.2004 #Confess a Major secret to your Friend + 100 = friendship.2007 #Try to improve a character's impression of your Friend + 25 = friendship.3001 #Get along with your spouse's friend + 25 = friendship.3003 #You hate your spouse's friend + 100 = friendship.3006 #A Friend gets you a favor hook on one of your Councillors + 300 = friendship.3007 # Hanging out with your Friend reduces Stress + + # Rival Events + 200 = rivalry.2001 #Hinder the progress of rival's Befriend scheme + 100 = rivalry.1001 #Rival adds stress + 100 = rivalry.1010 #Spiteful Acts ( my rival's aggravating behavior has gone on long enough) + 100 = rivalry.1030 #Meddling in Marriage + 100 = rivalry.3001 #Rival insults you + 100 = rivalry.3002 #You like the Rival of a Friend less + 100 = rivalry.3004 #Decrease opinion of rival because of opposing personality trait + + # Vassal Events + 100 = vassal.1001 # Religious liege wants you to build temple + 100 = vassal.1101 # Religious vassal wants you to build temple + 100 = vassal.2001 # Vassal wants liege to educate their child + 100 = vassal.2101 # No feast in a while, vassal requests it + 200 = vassal.2201 # You lend money from a vassal + 400 = vassal.2205 # Vassal reminds you of the money you owe them + 100 = vassal.2301 # Highly skilled vassal progresses development in province + 100 = vassal.2401 # Vassal wants gold, offers territory/better Vassal Contract + 100 = vassal.2451 # Vassal wants better contract, offers territory/gold + 100 = vassal.2501 # Peaceful vassal complains about ongoing war + 100 = vassal.2601 # Warmongering vassal complains about peace + 100 = vassal.2701 # Ask vassal to teach you CT + 100 = vassal.2801 # Liege complains abut no province improvement + 100 = vassal.2901 # Vassal requesting land they have claim on + 100 = vassal.3001 # You have no heir, ask a vassal for help + 100 = vassal.5010 # Zealous vassal wants liege to fight religious enemies + 100 = vassal.5050 # Vassal wants liege to fight war over his claim + + # Spouse Events + 75 = spouse.0001 #Increase opinion of spouse because of common personality + 75 = spouse.0003 #Increase opinion of spouse because of common lifestyle or education + 75 = spouse.0005 #Decrease opinion of spouse because of opposite personality + 75 = spouse.0007 #Increase opinion of spouse because of common friend + 75 = spouse.1001 #Increase opinion of an ambivalent spouse + 75 = spouse.1003 #Decrease opinion of an ambivalent spouse + 75 = spouse.2001 #Lose stress thanks to a loving spouse + 75 = spouse.2002 #An opportunity to speak highly of your spouse! + 75 = spouse.2012 #Share a secret with spouse + 75 = spouse.2014 #You suspect a plot against your spouse + 75 = spouse.3001 #Spouse adds stress + 75 = spouse.3002 #Spread rumours about your spouse + 75 = spouse.3012 #Pretend there is a plot against your spouse + 100 = intrigue_scheme_ongoing.5021 #Spouse/parent is plotting against someone! + + # Parent Events + 75 = parent.1001 #Parent aids with Martial + 75 = parent.1002 #Parent aids with Diplomacy + 75 = parent.1003 #Parent aids with Intrigue + 75 = parent.1004 #Parent aids with Stewardship + 75 = parent.1005 #Parent aids with Learning + 50 = parent.1006 #Parent helps administrate one of your counties + 75 = parent.1007 #Parent helps with courtier opinion + 50 = parent.1009 #Parent gives you a new courtier + 75 = parent.1010 #Parent gives stress_loss + + # Secret Events + 100 = secrets.1001 #Randomly learn a courtier's secrets + 100 = secrets.1002 #Courtier randomly learns one of court owner's minor secrets + 50 = secrets.1003 #Courtier randomly learns one of court owner's major secrets + 300 = secrets.1011 #A Friend discovers your secret lover + 100 = secrets.1100 #Discover a sibling's Bastard secret + 200 = secrets.2001 #A Just or Compassionate relation does not like your murder secret + 150 = secrets.3001 #A close relation disrupts a Scheme against you + #Blackmail events + 100 = blackmail.1001 #Blackmailing a vassal causes Dread with the others + 100 = blackmail.1002 #Gain Stress from being under Blackmail + + # Lover Events + 50 = lover.1001 #A Lover shares someone's secret with you + 50 = lover.1002 #A Lover aids a diplomatic scheme + 100 = lover.3203 #Go to your spouse or your lover + 100 = lover.3206 #You're forced to wage war against your lover + 50 = lover.1003 #Lover helps you lose stress + 50 = lover.1004 #Travel somewhere with your lover + 200 = lover.1006 #Liege lover granting council position + 200 = lover.1007 #Liege lover granting better contract + 200 = lover.1008 #Liege lover granting county modifier + 100 = lover.2001 #Having a secret lover causes stress + 100 = lover.2002 #High stress damages your relationship to your Lover + 100 = lover.2004 #Question exclusive partner about spouse + 20 = lover.3002 #Start Love Letter chain + 50 = lover.0300 #Ask lover to be exclusive + 50 = lover.3201 #Leave lover_object_of_importance for lover to find + 100 = lover.3204 #Your lover is far far away + 100 = lover.3207 #Write letter to beloved! + 100 = lover.3211 # Send lover a painting + 100 = lover.3215 #Send a troubadour to lover's court + 100 = lover.3219 # Send a personal object to lover + 100 = lover.7001 #Chance that a good friend becomes a potential lover + 100 = lover.7003 #Chance that a rival becomes a potential lover + 50 = lover.7005 #Chance that a close family member becomes a potential lover + + #TGP Elder/Disciple events + 100 = chinese_students.001 #Rivalry between two students + 100 = chinese_students.010 #Disciple writes a scroll + 100 = chinese_students.020 #Disciple performs divination + 100 = chinese_students.030 #Disciple displays talent or requests improvement + + #FP1 Events (These ones do not explicitly need you to be norse, but should be more likely if you are - present in both this and fp1_yearly_events) + 200 = fp1_yearly.2100 # Two lovers duel for your love + 200 = fp1_yearly.0521 # Blood on the Snow - your child wishes to snowball fight. + 200 = fp1_yearly.0531 # [Dynasty] on Ice - your child wants to learn how to ice skate. + 200 = fp1_yearly.0591 # Raised Voices at the Thing - two of your counties are fighting at a regional thing. + 200 = fp1_yearly.0601 # The Hardest Part of Ruling - you're incredibly bored in a protracted thing session. + 200 = fp1_yearly.0651 # Leviathan - you spot a whale whilst sailing. + 200 = fp1_yearly.0661 # A Novel Challenge - a knight challenges you to skiing. + 200 = fp1_yearly.0671 # A Slippery Slope - your child wants to go sledding. + 200 = fp1_yearly.0071 # In the Deep Places of the World - locals in your Scandi capital report a troll. + 15 = fp1_yearly.2000 # A Child wants to run away to marry their beloved + + #EP1 Flavor Events + 50 = ep1_flavor.0001 # A neighbouring court has a secret child + 100 = ep1_flavor.0011 # Diplomats from nearby realms have trashed your favourite hall. + 100 = ep1_flavor.0021 # You compete with another realm that shares your court language for grandeur. + 100 = ep1_flavor.0031 # Several fresh young scholars are newly arrived at court & need guidance. + 100 = ep1_flavor.1000 # A visiting eunuch offers their services + 100 = ep1_flavor.1200 # A learned eunuch wishes to sell various tips & tricks + 25 = ep1_flavor.2000 # Invest in sports for your men-at-arms + 25 = ep1_flavor.2010 # Too many plots at court, which one is real?! + 25 = ep1_flavor.2020 # Two men-at-arms don't like each other + 25 = ep1_flavor.2030 # Rule on a dispute between two provincial characters + 100 = ep1_flavor.2041 # A trader offers an exotic weapon from a faraway land + 25 = ep1_flavor.2060 # Local merchant outed by local policeman + 25 = ep1_flavor.2070 # Interfere in a debate with a gifted visting scholar + 100 = language_events.0002 # Vassal who speak the language lauds your efforts + + #Flavor Events + 200 = yearly.9100 # Trouble in the Garden + 200 = yearly.9110 # The Flower Thief + 200 = yearly.9120 # The Seed Merchant + + #Artifact Modifiers + 50 = artifact.4000 # Cursed Rumors + 80 = artifact.4002 # A Dark Fame + 100 = artifact.4010 # A Killing Weapon of Fame + 100 = artifact.4020 # A Renowned Armor + 100 = artifact.4030 # The Crown of Our People + 80 = artifact.4040 # The Eye of the Expert + 100 = artifact.4050 # Anger Burst + 50 = artifact.4060 # The Blessed Sword of God + 100 = artifact.4070 # A Relic Desecrated + 100 = artifact.4080 # A Master Dueler's Weapon + 100 = artifact.4090 # A Relic and Weapon Combined + + #EP1 Courtly Events + 100 = court_yearly.1000 # Growing Debauchery + 100 = court_yearly.2001 # Competitive Cronying + 100 = court_yearly.6040 # Scrounger Life + 100 = court_yearly.1020 # Long Arm of the Law + 100 = court_yearly.5001 # Lonely Days + 100 = court_yearly.5010 # The Haunting + 100 = court_yearly.5020 # Pillow Talk + 100 = court_yearly.6030 # The Ballad of the Garlic King + 100 = court_yearly.7100 # Exotic Animal at Court + 100 = court_yearly.7200 # Loud and Proud + 100 = court_yearly.7030 # Foreign Merchants wish to establish a merchant quarter + 100 = court_yearly.7040 # Courtier on a pillar + 100 = court_yearly.4350 # Your caravans are attacked by rampaging Christian nobles! + 100 = court_yearly.4355 # one of our nobles attacked a trading caravan! + 100 = court_yearly.4800 # Spread Your Wings + 100 = court_yearly.0101 # Random Criminal Appears + 100 = court_yearly.0102 # Executioner feels lonely + 100 = court_yearly.0103 # Executioner selling items from prisoners + 100 = court_yearly.0104 # An Unhealthy Obsession + 100 = court_yearly.0106 # Dark Theatres for Dark Deeds + 100 = court_yearly.0110 # A Lecture on Lustfulness + 100 = court_yearly.8100 # Questionable Concoction + 100 = court_yearly.8120 # Novel Perspectives + + #Culture Events + ## Mendicant Mystics + 100 = culture_tradition_events.0101 # A mendicant mystic offers to teach your court's children for coin. + 100 = culture_tradition_events.0111 # A mendicant mystic seeks to teach you a lesson about HighGodName. + 100 = culture_tradition_events.0121 # A mendicant wishes to join your court. + 100 = culture_tradition_events.0131 # A mendicant is repulsed by your sins, and invokes the wrath of HighGodName against you. + 100 = culture_tradition_events.0141 # A mendicant of your culture, but not your faith, offers tutelage if you'll convert. + + #Trait Events + 100 = trait_specific.8501 # Someone mocks your lisp + + # FP2 - Fate of Iberia Events + 180 = fp2_yearly.2020 # Horchata colonialism event + 160 = fp2_yearly.8000 # Burning the Vineyards + 180 = fp2_yearly.8001 # Assembling the Cortes + 180 = fp2_yearly.8002 # A Dietary Dilemma + 180 = fp2_yearly.8003 # Flight of Fancy + 180 = fp2_yearly.8004 # Translation School + 180 = fp2_yearly.8005 # Under the Stone Pine + 180 = fp2_yearly.8006 # Saqaliba Settlers + 180 = fp2_struggle.1002 # Xenophilic Advancment + 160 = fp2_struggle.1050 # Dreams of Destruction + 150 = fp2_struggle.2000 # Disorderly Market + 140 = fp2_struggle.2008 # Misdeeds of the Councillor + 300 = fp2_struggle.2013 # The Secret to Freedom + 130 = fp2_struggle.2015 # Letter on the Back + 180 = fp2_yearly.2025 # Suffering from Success + 150 = fp2_yearly.4001 # You fancy a little siesta + 150 = fp2_yearly.4002 # A county is increasingly religiously intertwined + 150 = fp2_yearly.4003 # The road to Santiago is under threat from bandits + 150 = fp2_yearly.4007 # Finding a shell on the road to Santiago + 150 = fp2_yearly.4008 # Folk stories around the fireside + 300 = fp2_yearly.4009 # Visiting the Malato Tree + 150 = fp2_yearly.4010 # Finding a Verraco + 300 = fp2_yearly.3000 # Neighboring Muslims are growing rice, adopt the practice yourself? + 150 = fp2_yearly.3001 # Choosing your epitaph + 150 = fp2_yearly.3002 # And They Were Roommates + 150 = fp2_yearly.3003 # A Flavorful Evening + 180 = fp2_struggle.2003 # Band of Lost Birds + + #BP1 - Bontent Pack One Events + 100 = bp1_yearly.1000 # Best friend introduces you to a new hobby + 200 = bp1_yearly.1010 # A friend offers to mediate with your HoF who has excommunicated you + 500 = bp1_yearly.1020 # A friend visits you on your dying bed + 500 = bp1_yearly.1021 # You visit a friend on their dying bed + 500 = bp1_yearly.1030 # A rival visits you on your dying bed + 500 = bp1_yearly.1031 # You visit a rival on their dying bed + 100 = bp1_yearly.1040 # You make a new friend at the bathhouse + 50 = bp1_yearly.1050 # You make a new rival at the bathhouse + 100 = bp1_yearly.1060 # React to a superstitious friend + 150 = bp1_yearly.1061 # Make someone superstitious - hidden + 100 = bp1_yearly.1070 # Rival is superstitious - take advantage? + 100 = bp1_yearly.1080 # Married off relative writes home + 400 = bp1_yearly.1082 # Married off relative writes home to share a secret + 100 = bp1_yearly.2000 # Spoil your partner(s), learn a secret/hook followup + 400 = bp1_yearly.2010 # Two of your spouses/concubines are lovers! + 100 = bp1_yearly.2020 # A consort attempts to influence you into changing your heir + 100 = bp1_yearly.2030 # Mopey consort wants some guidance + 100 = bp1_yearly.2040 # Consort is upset with other consort + 100 = bp1_yearly.2050 # Friendly consorts wants to start a study circle + 200 = bp1_yearly.2060 # Friendly consorts want to tutor other consort's child + 100 = bp1_yearly.2070 # Childless older soulmate spouse ponders your relationship + 500 = bp1_yearly.3001 # Friend spots you some cash + 500 = bp1_yearly.3002 # You spot your friend some cash + 100 = bp1_yearly.3007 # Spouse's family member wants you to sponsor their inspiration + 100 = bp1_yearly.3100 # Your vassal/friend/family member offers you a skilled courtier + 20 = bp1_yearly.3101 # Friend offers to sell you a county you have a claim on + 100 = bp1_yearly.3201 #Fake feast invite from rival/nemesis + 100 = bp1_yearly.3300 # Remembering a pilgrimage + 200 = bp1_yearly.3301 # Remembering a pilgrimage w/ a friend + 100 = bp1_yearly.4000 # Reflect over a family memory + 100 = bp1_yearly.4010 # Spouse demands their child gets a better guardian + 100 = bp1_yearly.4020 # Friend writes poetry about a war memory + 250 = bp1_yearly.4030 # Rival nestles their way into marrying one of your vassals, turns them disloyal + 10 = bp1_yearly.4040 # Kindly grandmother won't stop feeding you snacks; suffer the consequences of overeating, or break her heart? + 50 = bp1_yearly.5301 # Your friend is concerned about your physique + 150 = bp1_yearly.5100 # Chadsplaining to a plain courtier + 150 = bp1_yearly.5701 # Your Friend's Spouse Is Keeping Them Away From You + 100 = bp1_yearly.5702 # You ask a friend for help with skill + 200 = bp1_yearly.5703 # Your lover/rival threatens you in bed + 100 = bp1_yearly.5704 # Your rival seems strangely... attractive? + 200 = bp1_yearly.5705 # Your friend tries to talk you out of a bad relationship + 100 = bp1_yearly.5706 # You sleep with your rival's offspring + 400 = bp1_yearly.5707 # Your rival catches you sleeping with their offspring + 200 = bp1_yearly.5708 #You empathise with a friend's faith + 100 = bp1_yearly.5709 #Tempers flare between you and your rival + 100 = bp1_yearly.5713 #Your lover asks for money + 100 = bp1_yearly.5715 #You and a friend argue about pronunciation + 100 = bp1_yearly.5716 #Your zealous wife burns books + 100 = bp1_yearly.5717 #Your rival and your friend get into a drunken brawl + 100 = bp1_yearly.5719 #Your disloyal vassal is trying to embezzle + 100 = bp1_yearly.5720 #You and your rival armwrestle + 200 = bp1_yearly.5722 #Your nemesis launches your pet out of a catapult + 100 = bp1_yearly.5725 #You search for Khutulun + 100 = bp1_yearly.5728 #Rival steals and burns one of your artifacts + 10 = bp1_yearly.5740 #Scrambling for Answers + 80 = bp1_yearly.5800 #You make a perfume + 125 = bp1_yearly.6000 #Attacked by Rival's Child / Family Feud + 100 = bp1_yearly.7000 #Go on a picnic + 100 = bp1_yearly.7001 #Go fishing + 10 = bp1_yearly.7002 #Throw chamberpot at rival + 25 = bp1_yearly.7003 #Orgy Tapestry + 100 = bp1_yearly.7004 #Friend offers to talk about bad memory + 100 = bp1_yearly.7010 #Loyalty test + 100 = bp1_yearly.7050 #Memory of a war + 100 = bp1_yearly.7051 #Memory of Battle + 100 = bp1_yearly.7052 #Telling a story of a memory + 100 = bp1_yearly.7053 #A memory of revenge + 100 = bp1_yearly.7054 #Forgetting a memory + 100 = bp1_yearly.7055 #Recording a memory + 100 = bp1_yearly.7056 #Intimidating someone + 150 = bp1_yearly.7057 #Yearning + 100 = bp1_yearly.7058 #Friend eats all your food + 100 = bp1_yearly.8000 #Claimant moving towards rivalry + 200 = bp1_yearly.8010 #Best friend offers you a negotiated alliance + 100 = bp1_yearly.8020 #Rival of your rival offers friendship + 100 = bp1_yearly.8040 #Friend with conflicting personality falls out with you + 25 = bp1_yearly.8100 #Sycophant/favoritism chain start + 100 = bp1_yearly.9001 #Bully/guardian destroys your favourite toy + 100 = bp1_yearly.9005 #You get revenge for your destroyed toy + 100 = bp1_yearly.9006 #Becoming friends over a common sin + 10 = bp1_yearly.9007 #You find a peasant who looks exactly like you + 50 = bp1_yearly.9016 #Uppity second-in-line wants the throne + 50 = bp1_yearly.9017 #Uppity child is insecure about culture + 200 = bp1_yearly.9018 #Illegitimate child feels excluded + 100 = bp1_yearly.9019 #Spouse proposes a gay threesome + 200 = bp1_yearly.9020 #Spouse wants to do something kinky + 100 = bp1_yearly.9021 #Rival spouse is good in the bedroom + 100 = bp1_yearly.9022 #Friend holds an intervention + 200 = bp1_yearly.9023 #You realise you don't speak the same language + 100 = bp1_yearly.9024 #A friend visits you while you're sick + 150 = bp1_yearly.9025 #You realise you hate your friend + 100 = bp1_yearly.9026 #You're haunted by an old friend who convinces you to make ammends before you die + 100 = bp1_yearly.9034 # You find a terrifying bog witch + 100 = bp1_yearly.9037 # You find a bog corpse + 100 = bp1_yearly.9040 # The ghost of your dead lover wants to have sex again + 100 = bp1_yearly.9042 # Your chaplain finds a dessert that looks like HealthGodName + 100 = bp1_yearly.9043 # Your chaplain admits to being a deviant and a cannibal who eats babies + 10 = bp1_yearly.9046 # Your child poops themselves during their baptism + 100 = bp1_yearly.9047 # Lover wants you to wear their hair + 100 = bp1_yearly.9048 # Nemesis wants to end your rivalry by wrestling + 100 = bp1_yearly.9050 # You and a friend share war stories + 20 = bp1_yearly.7100 # Excreta incident, gain Nemesis + + # Family Feud + 250 = bp1_house_feud.0001 # Consider starting feud against own rival's house + 250 = bp1_house_feud.0002 # Consider starting feud against house family member rivals + 250 = bp1_house_feud.0003 # Consider starting feud against house who killed close family + 250 = bp1_house_feud.0006 # Consider starting feud against house with competing claims + 250 = bp1_house_feud.0007 # Consider starting feud against house who imprisoned you a while + 250 = bp1_house_feud.0008 # Consider starting feud against house who imprisoned family a while + 250 = bp1_house_feud.0012 # Consider starting feud against house who cuckolded you + + # FP3 - Frontier Events + 250 = fp3_yearly.8000 # Ghazi Gone Bad + 250 = fp3_yearly.8001 # Frontier Fortress Benefactor + 250 = fp3_yearly.8002 # Faith at the Frontier + 350 = fp3_yearly.8003 # Exotic Espand + 350 = fp3_yearly.8004 # The Frontier Beckons + 350 = fp3_yearly.8009 # Caliphal Concerns + 250 = fp3_yearly.8010 # Abode of War + 250 = fp3_yearly.8014 # Secrets of the Teapot + 250 = fp3_yearly.8016 # Forgotten Stones & Hyrcanian Havoc + 500 = fp3_yearly.8018 # Heavenly Horses + 100 = fp3_yearly.8888 #A Grazing Grievance (start of the Nomads Story Cycle) + + # FP3 - Heritage Events + 250 = fp3_yearly.8019 # Refuge of Light + 250 = fp3_yearly.8020 # The Lady of the Land + 350 = fp3_yearly.8021 # An Acidic Accident + 500 = fp3_yearly.8024 # The Return to the Sky + 350 = fp3_yearly.8027 # Nine-Hundred Ninety Chapters of Gold + 250 = fp3_yearly.8033 # Frozen Delights + 550 = fp3_yearly.8034 # The Hephthalite Hoard + 250 = fp3_yearly.8035 # The Heart and the Creator + 250 = fp3_yearly.8036 # The City of the Mouthless + 500 = fp3_yearly.8037 # A Cure for Acedia (the Melancholia Chain) + 300 = fp3_scholarship.1000 # Request Indian mathematician courtiers + 200 = fp3_scholarship.8500 + 200 = fp3_scholarship.8600 + + #FP3 - Extra Yearly Events + 150 = fp3_yearly.8045 #The Mysterious Bundle (the Buzina Chain) + 500 = false_conversion.2000 # A Moment of Weakness + + # FP3 - Zoroastrian Events + 200 = fp3_yearly.8050 #The Fate of the Dead + 200 = fp3_yearly.8051 # The Purest Fire + + # Guardianship Events + 200 = childhood.2400 # Ward approaches guardian with theological doubts + + # Hunt + 50 = hunt.2000 # Dog salesman + 50 = hunt.2001 # Falcon salesman + + # Pilgrimage / Hajj + 50 = pilgrimage.0500 # Promise your dying religious relative to go on a Pilgrimage + 50 = hajj.0500 # Promise your dying Hajjaj relative to go on the Hajj + + #BP2 - Bontent Pack Two Events + 50 = pet_rock.0001 #You find a neat-looking rock + 10 = destiny_child.0001 #Destiny Child Story Cycle + + 100 = bp2_yearly_extra.0001 #My favorite councilor + + 200 = bp2_yearly.0601 # Ruling Rightly - Regent tries to teach you about state. + 100 = bp2_yearly.0611 # PrimaryTitle's Second Capital - Far away regent never seems to visit. + 200 = bp2_yearly.0621 # AuntUncle RegentFirstName - Nearby regents visits often. + 200 = bp2_yearly.0631 # Courtier-regent turns you against a rival for the regency. + 100 = bp2_yearly.0641 # Regent offers special present in exchange for your agreement on some documents. + 100 = bp2_yearly.0651 # Regent makes time for your interests, be they play or poetry. + 200 = bp2_yearly.0661 # Regent quarrels with your family about access to you. + + 100 = bp2_yearly.1000 # Parent/Guardian: Your child/ward walks in on you performing your stress trait + 100 = bp2_yearly.1005 # Child: You notice your parent/guardian performing a stress trait + 100 = bp2_yearly.1010 # Parent/Guardian: Your child gives you a hug + 100 = bp2_yearly.1015 # Parent/Guardian: Your child/ward found a pouch of gold while exploring + 100 = bp2_yearly.1020 # Parent/Guardian: Your child/ward has found a secret in court + 100 = bp2_yearly.1030 # Parent: Your child does not have the same educational orientation as you. Change? + 100 = bp2_yearly.1035 # Parent/Guardian: Your child/ward has a rock collection + 100 = bp2_yearly.1040 # Parent/Guardian: Your child/ward has a text about martial arts + 100 = bp2_yearly.1045 # Parent/Guardian: There is a brawl among some children + + 100 = bp2_yearly.2000 # You (a kid) learn about your house founder and can gain one of their traits (or the opposite) + 100 = bp2_yearly.2001 # You (a kid) learn about an ancestor and can gain one of their traits (or the opposite) + 100 = bp2_yearly.2100 # Build something with another child + # The following are upweighted for non-ai characters because we don't want the ai to start getting these traits at an inordinate rate + 10 = bp2_yearly.2110 # Gain Humble or Arrogant + 10 = bp2_yearly.2120 # Gain Temperate or Gluttonous + 10 = bp2_yearly.2130 # Gain Generous or Greedy + 10 = bp2_yearly.2140 # Gain Honest or Deceitful + 10 = bp2_yearly.2150 # Gain Loyal or Disloyal + 10 = bp2_yearly.2160 # Gain Compassionate or Sadistic + + 100 = bp2_yearly.3000 # Child bored of lesson + + 150 = bp2_yearly.5000 # You have a chance to imprison the young prince/ss + 300 = bp2_yearly.5009 # You promise? + 100 = bp2_yearly.5050 # You learn a language off a guest or courtier + 150 = bp2_yearly.5051 # Child interacts with baby sibling + 300 = bp2_yearly.5052 # Child spends time with their grandparent + 300 = bp2_yearly.5053 # Host's child gets jealous of ward + 300 = bp2_yearly.5054 # Hostage and child are becoming friends + 100 = bp2_yearly.6000 # a same-culture ward or hostage doesn't know how to behave like one of you + 100 = bp2_yearly.6010 # a ward or hostage is sad and wants their family to send monies + 100 = bp2_yearly.6020 # hostage might reveal a family secret to you + 100 = bp2_yearly.6130 # hostage and a family member are becoming friends + 100 = bp2_yearly.6140 # hostage and a family member are becoming rivals + 100 = bp2_yearly.6150 # hostage is reticent to keep taking their place next to you during court appearances + 100 = bp2_yearly.6160 # your kid and your hostage snuck out of the palace to see your capital + 150 = bp2_yearly.6170 # your family mad that you sent a hostage to an uncivilized court + + 100 = bp2_yearly.7000 # Wet nurse has a disease and can pass it down to a child + 100 = bp2_yearly.7001 # Spouse is jealous about wet nurse + 100 = bp2_yearly.7002 # Court Chaplain informs You that your marraige is incestuous, due to you having same wet nurse as your spouse + 10 = bp2_yearly.7003 # Wet Nurse informs you about first words of your child + 10 = bp2_yearly.7004 # Wet Nurse informs you about first steps of your child + 10 = bp2_yearly.7005 # Wet Nurse informs you about first fallen teeth of your child + 10 = bp2_yearly.7006 # Wet Nurse informs you about first independent dress up of your child + 500 = bp2_yearly.7029 # You, a tribal ruler after completing Rites of Passage, can enourage or not next child doing the rites + 500 = bp2_yearly.7014 # Child and Wet Nurse connect over same faith/culture + + 100 = bp2_yearly.8000 # Your hostage learns your court language! + 100 = bp2_yearly.8010 # A kid makes fun of your stupid accent + 100 = bp2_yearly.8020 # Childhood event, play with toys :D + 400 = bp2_yearly.8071 # 8070 follow-up - higher weight because it requires specific childhood event + 100 = bp2_yearly.8100 # You develop feelings for another kid, is this a crush? + 400 = bp2_yearly.8110 # Sacred childbirth, people want to pamper you + 200 = bp2_yearly.8120 # Sacred childbirth, offer to take care of your pregnant spouse + 50 = pet_rock.0001 #You find a neat-looking rock + 10 = destiny_child.0001 #Destiny Child Story Cycle + 25 = bp2_yearly.2010 # Imaginary Friend Story Cycle Start + + 100 = bp2_yearly_extra.0001 #My favorite councilor + + #FP3 - Clan Events + 250 = fp3_clan.8000 # Usury against Unity, by Ola Jentzsch + 250 = fp3_clan.8001 # Clan Quarrel, by Ola Jentzsch + 250 = fp3_clan.8002 # Bonds of Faith, by Ola Jentzsch + 250 = fp3_clan.8003 # The Power of a Name, by Ola Jentzsch + 250 = fp3_clan.8004 # Bonds of Fear, by Ola Jentzsch + 250 = fp3_clan.8005 # A Proper Position, by Ola Jentzsch + 250 = fp3_clan.8006 # Small Spies, by Ola Jentzsch + 250 = fp3_clan.8008 # Bleeding them Dry, by Ola Jentzsch + 250 = fp3_clan.8009 # Popular with the People, by Ola Jentzsch + 250 = fp3_clan.8010 # Competent Qadis / More Magistrates, by Ola Jentzsch + 250 = fp3_clan.8011 # A Proper Paymaster, by Ola Jentzsch + 250 = fp3_clan.8012 # Auspicious Avarice, by Ola Jentzsch + 240 = fp3_clan.8013 # The Burden of Tax Farming, by Ola Jentzsch + 250 = fp3_clan.8015 # Scandalous Scion, by Ola Jentzsch + 250 = fp3_clan.8016 # Hammam Havoc, by Ola Jentzsch + 250 = fp3_clan.8017 # A Questionable Position, by Ola Jentzsch + 175 = fp3_clan.3000 # Ravaged Tulips, by Hugo Cortell + + # FP3 - Eren Events + 250 = fp3_yearly.2000 # Daylight Censors + 250 = fp3_yearly.2001 # Public Intoxication + 100 = fp3_yearly.2011 # Maunds of Wheat no royal court + 250 = fp3_yearly.2020 # Set the Scale, Vassal Version + 250 = fp3_yearly.2021 # Set the Scale, Liege Version + 500 = fp3_yearly.2040 # Commander of the Faithful + + # EP3 - Byzantine Events + 500 = ep3_emperor_yearly.2010 # Courtiers grumble about you sending an imperial prince/princess to marry abroad among barbarians + 250 = ep3_emperor_yearly.2140 # Plunder imperial graves if in debt + 250 = ep3_emperor_yearly.2150 # Stylite saint: is he for real or just faking it? + 250 = ep3_emperor_yearly.2160 # Pressure from bordering nomads + 250 = ep3_emperor_yearly.2170 # Use or disband the tunnels from a low-control county? + 200 = ep3_emperor_yearly.2190 # Landowner (estate owner) has been hoarding grain + 250 = ep3_emperor_yearly.2200 # Governor can embezzle taxes + 250 = ep3_emperor_yearly.2210 # Landless vassal present a prophecy to increase succession score + 200 = ep3_emperor_yearly.2220 # Monks complain about roaming shepherds + 250 = ep3_emperor_yearly.2230 # Riots against foreign merchants + 250 = ep3_emperor_yearly.2240 # Annoying "scholar" keeps quoting the Classics out of place + 250 = ep3_emperor_yearly.2320 # HoF helps you change state faith + 250 = ep3_emperor_yearly.8000 # Shortage of people in imperial capital + 250 = ep3_emperor_yearly.8010 # Fake imperial letter of introduction + 250 = ep3_emperor_yearly.8020 # Selling purple rights + 25 = ep3_emperor_yearly.8030 # Porphyrios strikes back - rare + 150 = ep3_emperor_yearly.8040 # Embrace Iconoclasm + 250 = ep3_emperor_yearly.8050 # Northern raider ransom + 250 = ep3_emperor_yearly.8060 # Border governor defects + + # EP3 - Governor Events + 250 = ep3_governor_yearly.8010 # Governor wants to swap a favor with you + 250 = ep3_governor_yearly.8020 # Extort an estate in your province + 250 = ep3_governor_yearly.8030 # Estate brings unexpected local benefits + 250 = ep3_governor_yearly.8040 # Estate is taking too much of your time + 500 = ep3_governor_yearly.8050 # Offer liege help in war targeting your province + 250 = ep3_governor_yearly.8060 # Embezzle from provincial treasury + 50 = ep3_governor_yearly.8070 # Overwhelmed by provincial bureaucracy + 250 = ep3_governor_yearly.8080 # Local magistrate accused of corruption + 250 = ep3_governor_yearly.8090 # Family that governed your province is jealous + 250 = ep3_governor_yearly.8100 # Neighboring governor wants your province + 250 = ep3_governor_yearly.8110 # Two neighboring governors falling out + 250 = ep3_governor_yearly.8120 # Support disaster victims in your governorship + 250 = ep3_governor_yearly.8130 # Raise arbitrary taxes on your province + 250 = ep3_governor_yearly.8140 # Stand up to an estate in your province + 250 = ep3_governor_yearly.8150 # Response to rebels in your province + 250 = ep3_governor_yearly.8160 # Minority access to governor bureaucracy + 250 = ep3_governor_yearly.8170 # Prepare defense against nearby raiders + + # EP3 - Laamp Events + 250 = ep3_laamps.0050 # Close family members wants to become an adventurer + + # EP3 - Powerfam events + 250 = ep3_powerful_families.8000 + 250 = ep3_powerful_families.8010 + 250 = ep3_powerful_families.8030 + 250 = ep3_powerful_families.8040 + 250 = ep3_powerful_families.8060 + 250 = ep3_powerful_families.8070 + + # EP3 - Landless Admin Events + 250 = ep3_landless_admin.1000 # This guy could be a cool councillor + 250 = ep3_landless_admin.1010 # You have upgraded your estate a bunch, locals are impressed + 250 = ep3_landless_admin.1020 # Upgrade a building in your estate + 250 = ep3_landless_admin.1030 # You get offered a hook on your liege + 250 = ep3_landless_admin.1040 # Lie about a rival candidate + 250 = ep3_landless_admin.1050 # There's something in your basement + + # EP3 - Eparch events + 500 = ep3_eparch_event.0001 + 500 = ep3_eparch_event.0005 + 500 = ep3_eparch_event.0010 + 500 = ep3_eparch_event.0015 + 500 = ep3_eparch_event.0020 + + # MPO - Nomadic Rulers Events + 100 = nomad_events.0001 # Starts the Achmach Fanakiti event chain + 250 = mpo_nomad_events.1030 # You choose a sport for your son to tryhard + 200 = mpo_nomad_events.1020 # Your kin wants to break off from your tribe + 250 = court_astrologer_events.0002 # Your Astrologer suggest a better place to migrate to + 250 = nomad_events.0100 # Two vassals have a herd dispute + 250 = nomad_events.0120 # You take an evening ride with someone + 250 = nomad_events.0130 # A merchant offers you some herd + 150 = nomad_events.0140 # A foreign merchant passes by your capital and asks to stay + 250 = nomad_events.0150 # You share a drink with a courtier + 300 = nomad_events.0160 # Your spouse tells you they admire you + 300 = nomad_events.0170 # Your spouse is scared of your high dread + 250 = nomad_events.0180 # Random courtier laughs at your child low prowess + 250 = nomad_events.0190 # Reminisce of a past memory + 250 = nomad_events.0200 # Someone tells you of a dream they had + 250 = nomad_events.0220 # Spouse scolds you for your low Prowess + 250 = nomad_events.0230 # Spouse is feeling homesick + 250 = nomad_events.0240 # Neighbouring Nomad's herd shows up in your capital + 100 = nomad_events.0250 # Enthusiastic priest asks you to convert + 150 = nomad_events.0260 # Distant priest arrives at your court + 150 = mpo_nomad_events.1050 # A neighboring herder is salty at you + 300 = mpo_nomad_events.1060 # You trade with non-nomad neighbors + 100 = mpo_nomad_events.1070 #You wake up after having ridden off alone + 200 = mpo_nomad_events.1080 #Neighbor is intruding on your land hunting a criminal + 200 = mpo_nomad_events.1100 #You adapt your herds to the local terrain + 200 = mpo_nomad_events.1110 #Your capital is by a place you can fish + 250 = mpo_events_tova.0025 # You are invited to a knucklebone shooting game + 250 = mpo_events_tova.0030 # No astrologer? Someone comes to you with a vision + 250 = mpo_events_tova.0035 # Anda comes to you with marital concerns + 250 = mpo_events_tova.0045 # A Treasured Friend + 250 = nomad_events_oltner.0001 # Hunt sighting in your lands + 250 = nomad_events_oltner.0002 # Bird sighting in your lands + 250 = nomad_events_oltner.0003 # Dangerous Hunt sighting in your lands + 150 = nomad_events_oltner.0004 # Zud - Dangerous animals eat your herd + 250 = nomad_events_oltner.0005 # Good season! Animals aplenty. + 250 = nomad_events_oltner.0006 # You are offered a skilled Master of the Chase from a tributary + 250 = nomad_events_oltner.0007 # You are offered a falcon from a tributary + 50 = mpo_bb_events.0001 # blood brother comes by for a wrestling match + 100 = mpo_events_anna.0001 #Train Them Young - teach a child how to ride a horse + 250 = mpo_events_anna.0005 #Stories from the Past - choose a story to be told + 250 = mpo_events_anna.0010 #Whistle Like an Arrow - being taught how to whistle as a child + 250 = mpo_events_ariana.0001 # Nest Sighting + 50 = mpo_events_ariana.0010 # Your Heir wants to convert to a different faith + 250 = mpo_events_ariana.0020 # A spouse is suspicious of a councillor + 250 = mpo_events_ariana.0050 # A family member risks being branded + 150 = mpo_events_ariana.0060 # A child in your family spots an eagles nest with treasure + 250 = mpo_events_ariana.0080 # Someone tells you about a magical tree + 150 = pet_animal.3050 # Your rival has an eagle + 250 = mpo_events_ariana.0090 # Your child wants to be a herder + 250 = mpo_events_ariana.0100 # A non-martial gender family member is very skilled + 150 = mpo_events_ariana.0110 # Your court astrologer wants you to move your capital + + # MPO - Season Specific Events + 500 = mpo_nomads_season_events.0001 # Herders robbed during drought + 500 = mpo_nomads_season_events.0005 # A hungry neighbour asks for herd + 500 = mpo_nomads_season_events.0010 # A well-to-do neighbor offers herd + 500 = mpo_nomads_season_events.0015 # Two Kurultai members fight over food + 200 = nomad_events.0110 # A snow wolf attacks a child (weighted up during white zud/cold zud) + 500 = nomad_events.0210 # Spouse/Child is worried about low herd + 200 = mpo_nomad_events.1120 #It's winter. wolves are hungry for your herd (weighted up during white zud/cold zud) + + # MPO - Settled Rulers Events + 500 = mpo_flavor_events_settled.0010 # Horse Lord at your door + + # TGP - Movement Events + 200 = tgp_movement_events.0001 # Marshal urges you to prepare for Expansion + 200 = tgp_movement_events.0010 # Try to convince an undecided ruler to join your movement + 200 = tgp_movement_events.0020 # Another Advancement member wants to focus on innovations + 200 = tgp_movement_events.0030 # Movement member sends you a letter asking for support + 200 = tgp_movement_events.0040 # Hegemon sends envoy thanking you for being Pro-Song + 200 = tgp_movement_events.0050 # Elder takes interest in you + 200 = tgp_movement_events.0060 # Antagonize another movement + 200 = tgp_movement_events.0070 # Councillor of your highest skill helps you study + 200 = tgp_movement_events.0080 # Family member asks you to focus on your family + 200 = tgp_movement_events.0090 # Movement member wants to make amends + 200 = tgp_movement_events.0100 # Ask a Movement Leader to abandon their Movement + 200 = tgp_movement_events.0110 # Movement member sends you some books + # tgp_movement_events.0120 # Feast event - Movement member teaches you Confucianism + 200 = tgp_movement_events.0130 # Movement member teaches you the language of the capital + 200 = tgp_movement_events.0140 # Disciple brings you a gift + 200 = tgp_movement_events.0150 # Shinto visitor at court + 200 = tgp_movement_events.0160 # Promise Movement leader to not scheme against each other + + # TGP - Dynastic Cycle Events + 200 = tgp_dynastic_cycle_events.0001 # Tilt the scales towards Advancement + 200 = tgp_dynastic_cycle_events.0010 # Disciple has a mental breakdown in Instability + 200 = tgp_dynastic_cycle_events.0020 # Rowdy peasants steal food during Instability + 200 = tgp_dynastic_cycle_events.0030 # In this time of Expansion you should become a Military Governor + 200 = tgp_dynastic_cycle_events.0040 # Steward is interested in the Silk Road + 200 = tgp_dynastic_cycle_events.0050 # Debate the Favoured Movement and get ahead of them + + # TGP - Confucianism Events + 250 = tgp_china_yearly.0001 # Charitable Acts + 250 = tgp_china_yearly.0005 # Child mourns the loss of a father + 250 = tgp_china_yearly.0010 # Hack poet peddles "lucky" poems + 250 = tgp_china_yearly.0015 # Settle merchant dispute + 250 = tgp_china_yearly.0020 # County has unpaid back-taxes + + # TGP- Mandala Events + 100 = tgp_east_asia_mandala_events.9000 #Freak accident makes you seem inclined to divinity + 100 = devaraja.0002 + 100 = devaraja.0003 + 100 = devaraja.0004 + 100 = devaraja.0005 + 100 = devaraja.0006 + 100 = devaraja.0007 + 100 = devaraja.0008 + # Missionary no longer + 250 = devaraja.0009 + 250 = devaraja.0010 + + # ACH - yearly councillor events + 25 = ach_yearly_events.1001 + 25 = ach_yearly_events.1002 + 25 = ach_yearly_events.1003 + 25 = ach_yearly_events.1004 + + # TGP - Ceremonial Liege Events + 100 = tgp_ceremonial_liege_events.0001 # A councillor sends out documents with both seals (Liege/Regent) + 75 = tgp_ceremonial_liege_events.0010 # You are extremely stressed, a spouse mentions giving power to the regent (Liege) + 100 = tgp_ceremonial_liege_events.0020 # The liege/regent is in an activity which you were not invited to (Liege/Regent) + 50 = tgp_ceremonial_liege_events.0030 # A scholar writes about you two and the liege is clearly favored (Liege/Regent) + 75 = tgp_ceremonial_liege_events.0040 # Someone is questioning why you are even ruled over by your vassal at all (Regent) + } +} + +on_yearly_tutorial_events = { + trigger = { + always = no # TODO[Ruler Objectives]: Make generally available once ready for it + is_ai = no + has_global_variable = tutorial_completed + } + random_events = { + chance_to_happen = 100 + 1 = tutorial.1001 + } +} diff --git a/N3OW/common/script_values/02_religion_values.txt b/N3OW/common/script_values/02_religion_values.txt new file mode 100644 index 00000000..00a25201 --- /dev/null +++ b/N3OW/common/script_values/02_religion_values.txt @@ -0,0 +1,4679 @@ +#Needs to be loaded after +# * medium_gold_value (01_dynamic_values) + +#Religious war CB levels +faith_fully_accepted_level = 0 +faith_astray_level = 1 +faith_hostile_level = 2 +faith_evil_level = 3 + +faith_hostility_prevents_marriage_level = faith_evil_level + +religious_cb_enabled_hostility_level = faith_hostile_level +religious_cb_evil_hostility_level = faith_evil_level + +religious_cb_ally_prestige_kingdom = 500 +religious_cb_ally_prestige_duchy = 200 +religious_cb_ally_prestige_county = 100 + +religious_cb_piety_gain_evil_foe = 200 +religious_cb_piety_gain_empire = 200 +religious_cb_piety_loss_empire = -200 +religious_cb_piety_gain_kingdom = 150 +religious_cb_piety_loss_kingdom = -150 +religious_cb_piety_gain_duchy = 100 +religious_cb_piety_loss_duchy = -100 +religious_cb_piety_gain_county = 50 +religious_cb_piety_loss_county = -50 +religious_cb_piety_white_peace = -50 + +excommunication_cb_piety_change_multiplier = 4 +excommunication_cb_piety_white_peace = -50 + +religious_cb_piety_discount_against_hof_humsac = 0.5 +hof_humsacd_fervour_gain = major_fervor_value + +faith_doctrine_cost_low = 200 +faith_doctrine_cost_mid = 400 +faith_doctrine_cost_high = 600 +faith_doctrine_cost_massive = 1000 + +faith_tenet_cost_discount_scholar_official_tradition = 0 +faith_tenet_cost_low = 500 +faith_tenet_cost_mid = 1000 +faith_tenet_cost_high = 1500 +faith_tenet_cost_massive = 2000 + +faith_unchanged_doctrine_cost_mult = 0.5 +faith_changed_doctrine_cost_mult_two_step = 1.50 +faith_changed_doctrine_cost_mult_three_step = 2.25 +faith_changed_doctrine_cost_mult_four_step = 3.50 + +faith_tenet_discount_mountain_background_value = 0.75 + +hostility_multiplier_pluralism = 0.5 +hostility_multiplier_righteous = 1 +hostility_multiplier_fundamentalist = 2 +hostility_multiplier_reduction_adaptive = -0.25 + +heretical_defector_fervor_gain = 15 # How much fervor Old Faith gains when a ruler splits off to a New Heresy + +regional_heresy_factor = { + if = { + limit = { has_game_rule = default_regional_heresy } + value = 5 + } + else_if = { + limit = { has_game_rule = strict_regional_heresy } + value = 200 + } + else = { + value = 1 + } +} + +meditation_duration = 185 # In days + +local_shrine_duration = 14 + +faction_county_opinion_astray = { + value = county_opinion + multiply = -1.0 +} +faction_county_opinion_hostile = { + value = county_opinion + multiply = -2.5 +} +faction_county_opinion_evil = { + value = county_opinion + multiply = -5.0 +} + +head_of_faith_selection_weight = { + value = 1 + + # Strong weight for preferred gender + if = { + limit = { + faith = { has_doctrine = doctrine_gender_male_dominated } + is_male = yes + } + add = 50 + } + else_if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } + is_female = yes + } + add = 50 + } + + # Bonus for holding land, especially if it is a holy site. + if = { + limit = { + any_sub_realm_barony = { + is_holy_site_of = root.faith + } + } + add = 40 + } + add = { + value = highest_held_title_tier + multiply = 20 + } + + # Bonus for piousness/learnedness + add = { + value = num_virtuous_traits + multiply = 30 + } + add = { + value = num_sinful_traits + multiply = -30 + } + add = { + value = piety_level + multiply = 10 + } + add = { + value = learning + multiply = 2 + } + add = { + value = diplomacy + multiply = 1 + } +} +################ +# Demand Conversion chance calculation +################ + +#Calculated in scope:recipient +demand_conversion_learning_difference = { + add = scope:actor.learning + subtract = learning + multiply = 5 +} + +demand_conversion_fervor_difference = { + add = scope:actor.faith.fervor + subtract = faith.fervor +} + +demand_conversion_tenet_impact = { + value = 0 + if = { + limit = { + faith = { + has_doctrine_parameter = sanctioned_false_conversion + NOT = { has_doctrine_parameter = unattractive_for_character_conversions } + } + } + add = -20 + } + if = { + limit = { + faith = { has_doctrine_parameter = tenet_adaptive_conversion_resistance } + } + add = -20 + } + if = { + limit = { + faith = { has_doctrine_parameter = unattractive_for_character_conversions } + } + add = 20 + } +} + +demand_conversion_likelihood_calculation = { + #Five times actor's-recipient's learning + add = demand_conversion_learning_difference + + #Calculate each faith's fervor + add = demand_conversion_fervor_difference + + #Calculate various Doctrines and Tenets + add = demand_conversion_tenet_impact + + if = { + limit = { + opinion = { + target = scope:actor + value < medium_negative_opinion + } + } + add = -50 + } + else_if = { + limit = { + opinion = { + target = scope:actor + value < neutral_opinion + } + } + add = -25 + } + else_if = { + limit = { + opinion = { + target = scope:actor + value >= medium_positive_opinion + } + } + add = 50 + } + else_if = { + limit = { + opinion = { + target = scope:actor + value > neutral_opinion + } + } + add = 25 + } + + if = { + limit = { + scope:actor = { has_trait = savior } + } + add = 30 + } + if = { + limit = { + scope:actor = { has_trait = divine_blood } + } + add = 15 + } + + if = { + limit = { + has_trait = zealous + } + add = -50 + } + if = { + limit = { + has_trait = cynical + } + add = 30 + } + + if = { + limit = { + has_trait = heresiarch + } + add = -100 + } + + #Add value if refusing is a Crime + if = { + limit = { + scope:actor = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + } + add = 50 + } + + + + if = { + limit = { + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + } + add = 10 + } + if = { + limit = { + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + } + add = 20 + } + + max = 100 +} + +demand_conversion_bribe_size = { + value = medium_gold_value +} + +demand_conversion_piety_cost = { + value = medium_piety_value +} + + +#Religious Legal Pronouncement requirements +religious_legal_pronouncement_target_value = -20 + +religious_legal_pronouncement_sinful_value = { + value = 0 + add = scope:recipient.num_sinful_traits + multiply = 6 +} + +religious_legal_pronouncement_virtuous_value = { + value = 0 + add = scope:recipient.num_virtuous_traits + multiply = 5 +} + +religious_legal_pronouncement_requirements = { + value = religious_legal_pronouncement_target_value + add = religious_legal_pronouncement_sinful_value + subtract = religious_legal_pronouncement_virtuous_value + add = scope:actor.learning +} + +religious_legal_pronouncement_learning_requirement = { + value = 0 + subtract = religious_legal_pronouncement_sinful_value + add = religious_legal_pronouncement_virtuous_value + subtract = religious_legal_pronouncement_target_value + min = 1 +} + +claim_piety_value = { + value = { + add = minor_piety_value + multiply = 2 + if = { + limit = { + scope:target = { + tier = tier_duchy + } + } + multiply = 2 + } + if = { + limit = { + scope:target = { + tier = tier_kingdom + } + } + multiply = 4 + } + if = { + limit = { + scope:target = { + tier = tier_empire + } + } + multiply = 8 + } + add = { + value = scope:actor.sub_realm_size + multiply = 10 + } + # Landless adventurers can't get cheap access to legitimists without putting in some leg-work. + if = { + limit = { + scope:actor = { has_government = landless_adventurer_government } + } + multiply = 10 + } + } +} + +#GHW Targeting Multipliers +#Up the base size of kingdoms with an existing same-faith ruler a bit: +ghw_target_existing_same_faith_ruler = 20 +#Prioritise reclaiming lands that are core rather than just new large kingdoms: +ghw_target_heartlands = 150 +ghw_target_frontier = 25 +ghw_target_fringe = 15 +ghw_target_stretch = 10 +#Always buff any kingdom containing an uncontrolled holy site: +ghw_target_has_holy_site = 6 +#Targets that should always be priorities if not controlled: +ghw_target_jerusalem = 200 +ghw_target_key_religious_holding = 100 +ghw_target_religious_vengeance = 150 +#Distance modifiers stack: +ghw_target_distance_01_reduction = 0.8 +ghw_target_distance_02_reduction = 0.1 +ghw_target_distance_03_reduction = 0.01 +ghw_target_distance_01_threshold = 722500 +ghw_target_distance_02_threshold = 1445000 +ghw_target_distance_03_threshold = 2167500 + +# Referenced by code when building list of ghw targets +# Logic reworked by Ewan Cowhig Croft +great_holy_war_target_kingdom_weight = { + # WEIGHTING PROCESS + # 1. Check how many individual counties within a de jure kingdom have a top-liege with an eligible faith for GHWing. Boost the count a little for kingdoms with existing same-faith monarchs. + # 2. Modify the count by region location & relative importance to the Faith (is this kingdom in the heartlands of the faith, or one of an increasing gradiant of frontier regions?). + # 3. Modify the count by region distance from the HoF's capital, or a fallback holy site. + # 4. Weight up kingdoms containing holy sites directly. + # 5. Weight up special priority targets (e.g., Jerusalem, Mecca) directly. + + ### 1 ### + # Is the target kingdom a viable GHW target? + every_in_de_jure_hierarchy = { + # Check individual counties within the potential target de jure kingdom. + continue = { tier > tier_county } + # For every county with a GHWable liege... + limit = { + tier = tier_county + scope:the_faith = { + is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.top_liege.faith } + } + } + # ... Add 1 to the weighting. + add = 1 + } + # Weight up the kingdom if it either has an existing same-faith holder, or at least a same-faith claimant. + if = { + limit = { + OR = { + AND = { + exists = holder + holder.faith = scope:the_faith + } + any_claimant = { + exists = this + faith = scope:the_faith + is_available_adult = yes + } + } + } + add = ghw_target_existing_same_faith_ruler + } + + ### 2 ### + ### Abrahamics & Zoroastrians + # Documentation = { + # Avoid adding lots of reckless GHW stretch goals, as it'll mess up the targeting if every religion has a dozen apiece. + + # Below is an organised, prioritised list of the different target regions for each religion. Update it as you make changes. + # Christianity + # ghw_region_northern_italy # heartlands + # ghw_region_thessalonika # heartlands + # ghw_region_ethiopia # heartlands + # ghw_region_france # heartlands + # ghw_region_germany # heartlands + # ghw_region_greece # heartlands + # ghw_region_england # heartlands + # ghw_region_caucasus # heartlands + # ghw_region_anatolia # frontier + # ghw_region_near_east # frontier + # ghw_region_mediterranean # frontier + # ghw_region_balkans # frontier + # ghw_region_holy_land # frontier + # ghw_region_iberia # frontier + # ghw_region_celtic # fringe + # ghw_region_germanic # fringe + # ghw_region_central_european # fringe + # ghw_region_baltic # stretch + + # Islam + # ghw_region_holy_land # heartlands + # ghw_region_arabia # heartlands + # ghw_region_near_east # heartlands + # ghw_region_egypt # heartlands + # ghw_region_persia # heartlands + # ghw_region_north_africa # heartlands + # ghw_region_sicily # frontier + # ghw_region_iberia # frontier + # ghw_region_anatolia # frontier + # ghw_region_afghanistan # frontier + # ghw_region_the_sahel # fringe + # ghw_region_mediterranean # fringe + # ghw_region_western_india # fringe + # ghw_region_southern_france # fringe + + # Yazidism + # ghw_region_kurdistan # heartlands + # ghw_region_southern_middle_east # frontier + # ghw_region_eastern_middle_east # frontier + # ghw_region_caucasus # frontier + # ghw_region_caspian_steppe # fringe + # ghw_region_arabia # fringe + # ghw_region_holy_land # fringe + + # Judaism + # ghw_region_holy_land # heartlands + # ghw_region_arabia # frontier + # ghw_region_near_east # frontier + # ghw_region_egypt # frontier + # ghw_region_anatolia # fringe + # ghw_region_persia # fringe + # ghw_region_ethiopia # fringe + + # Zoroastrianism/Dualism + # ghw_region_persia # heartlands + # ghw_region_afghanistan # frontier + # ghw_region_near_east # frontier + # ghw_region_arabia # fringe + # ghw_region_holy_land # fringe + # ghw_region_anatolia # fringe + # ghw_region_mongolia # fringe + # ghw_region_western_india # fringe + + # Norse Paganism + # ghw_region_scandinavia # heartlands + # ghw_region_britannia # frontier + # ghw_region_saxony # frontier + # ghw_region_russia # frontier + # ghw_region_baltic # fringe + # ghw_region_poland # fringe + # ghw_region_thessalonika # stretch + + # Baltic Paganism + # ghw_region_baltic # heartlands + # ghw_region_poland # frontier + # ghw_region_russia # frontier + # ghw_region_scandinavia # fringe + # ghw_region_steppe # fringe + # ghw_region_hungary # fringe + + # Slavic Paganism + # ghw_region_wendish_lands # heartlands + # ghw_region_balkans # heartlands + # ghw_region_russia # heartlands + # ghw_region_hungary # frontier + # ghw_region_steppe # frontier + # ghw_region_mainland_greece # fringe + # ghw_region_germany # fringe + # ghw_region_italy # stretch + + # Finnish Paganism + # ghw_region_finland_&_estonia # heartlands + # ghw_region_northern_russia # heartlands + # ghw_region_steppe # heartlands + # ghw_region_scandinavia # frontier + # ghw_region_baltic # frontier + # ghw_region_southern_russia # frontier + # ghw_region_siberia # frontier + # ghw_region_transoxiana # fringe + # ghw_region_mongolia # fringe + + # Tengri Paganism + # ghw_region_mongolia # heartlands + # ghw_region_siberia # heartlands + # ghw_region_steppe # heartlands + # ghw_region_russia # frontier + # ghw_region_transoxiana # frontier + # ghw_region_hungary # frontier + # ghw_region_tibet # fringe + # ghw_region_wendish_lands # fringe + + # Magyar Paganism + # ghw_region_hungary # heartlands + # ghw_region_balkans # frontier + # ghw_region_crimea # frontier + # ghw_region_poland_bohemia_bavaria # frontier + # ghw_region_southern_russia # frontier + # ghw_region_mainland_greece # fringe + # ghw_region_baltic # fringe + + # Bon Paganism, Qiangicism, Donyipoloism, & Mundhumism + # ghw_region_tibet # heartlands + # ghw_region_northern_india # frontier + # ghw_region_khotan # frontier + # ghw_region_mongolia # fringe + # ghw_region_transoxiana # fringe + # ghw_region_southern_india # stretch + + # Mande Paganism & Senegambian Paganism + # ghw_region_the_sahel # heartlands + # ghw_region_subsahelian_africa # frontier + # ghw_region_north_african_interior # frontier + # ghw_region_western_sahara # frontier + # ghw_region_north_africa # fringe + + # Hausan Paganism + # ghw_region_north_african_interior # heartlands + # ghw_region_the_sahel # frontier + # ghw_region_subsahelian_africa # frontier + # ghw_region_ethiopia # frontier + # ghw_region_eastern_sahara # frontier + # ghw_region_horn_of_africa # fringe + # ghw_region_egypt_et_al # fringe + # ghw_region_north_africa # fringe + + # Akan Paganism & Yoruba Paganism + # ghw_region_subsahelian_africa # heartlands + # ghw_region_the_sahel # frontier + # ghw_region_north_african_interior # frontier + # ghw_region_western_sahara # frontier + # ghw_region_north_africa # fringe + + # Kushite Paganism + # ghw_region_egypt_et_al # heartlands + # ghw_region_north_african_interior # frontier + # ghw_region_ethiopia # frontier + # ghw_region_horn_of_africa # frontier + # ghw_region_the_sahel # fringe + # ghw_region_subsahelian_africa # fringe + # ghw_region_eastern_sahara # fringe + # ghw_region_north_africa # fringe + # ghw_region_holy_land # stretch + # ghw_region_arabia # stretch + + # Waaqi Paganism + # ghw_region_horn_of_africa # heartlands + # ghw_region_ethiopia # frontier + # ghw_region_egypt_et_al # frontier + # ghw_region_arabia # frontier + # ghw_region_north_african_interior # fringe + # ghw_region_holy_land # fringe + + # Zunist Paganism + # ghw_region_afghanistan # heartlands + # ghw_region_western_india # frontier + # ghw_region_persia # frontier + # ghw_region_transoxiana # frontier + # ghw_region_caucasus # fringe + # ghw_region_holy_land # fringe + # ghw_region_near_east # fringe + # ghw_region_southwestern_india # fringe + # ghw_region_egypt # stretch + + # Hellenic Paganism + # ghw_region_mainland_greece # heartlands + # ghw_region_italy # heartlands + # ghw_region_anatolia # frontier + # ghw_region_balkans # frontier + # ghw_region_near_east # frontier + # ghw_region_holy_land # fringe + # ghw_region_egypt # fringe + # ghw_region_north_africa # fringe + # ghw_region_southern_france # fringe + + # Hinduism + # Hinduism prioritises the Sacred River above the rest of the sub-continent. + # ghw_region_the_ganges # heartlands + # ghw_region_non_ganges_india # frontier + # ghw_region_tibet # fringe + # ghw_region_afghanistan # fringe + # ghw_region_persia # fringe + + # Jainism + # How did you even *manage* to get a game that needs this? + # ghw_region_gujarat_&_rajputana # heartlands + # ghw_region_non_gujarat_or_rajputana_india # frontier + # ghw_region_tibet # fringe + # ghw_region_afghanistan # fringe + # ghw_region_persia # fringe + + # Buddhism Theravada + # ghw_region_lanka_&_bengal # heartlands + # ghw_region_middle_india # frontier + # ghw_region_western_india # fringe + + # Buddhism Mahayana & Vajrayana + # ghw_region_tibet # heartlands + # ghw_region_mongolia # heartlands + # ghw_region_khotan # frontier + # ghw_region_siberia # frontier + # ghw_region_transoxiana # fringe + # ghw_region_afghanistan # fringe + + # Taoism + # ghw_region_mongolia # heartlands + # ghw_region_siberia # frontier + # ghw_region_tibet # frontier + # ghw_region_north_eastern_india # fringe + # } + + # Christian heartlands + if = { + limit = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + OR = { + AND = { + # Catholic sphere. + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_northern_italy + geographical_region = ghw_region_france + geographical_region = ghw_region_germany + geographical_region = ghw_region_england + } + } + } + AND = { + # Orthodox sphere. + scope:the_faith = { not_non_orthodox_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_thessalonika + geographical_region = ghw_region_greece + } + } + } + AND = { + # Coptic sphere. + scope:the_faith = { not_non_coptic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_ethiopia } + } + AND = { + # Armenian sphere. + scope:the_faith = { not_non_armenian_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_caucasus } + } + } + } + add = ghw_target_heartlands + } + # Christian frontier + else_if = { + limit = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + OR = { + AND = { + # Shared Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_anatolia } + } + AND = { + # Shared Catholic/Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_near_east + geographical_region = ghw_region_egypt + } + } + } + AND = { + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mediterranean + geographical_region = ghw_region_balkans + } + } + } + AND = { + # Shared Catholic/Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_holy_land } + } + AND = { + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_iberia } + } + } + } + add = ghw_target_frontier + } + # Christian fringe + else_if = { + limit = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + OR = { + AND = { + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_celtic + geographical_region = ghw_region_germanic + geographical_region = ghw_region_finland_&_estonia + } + } + } + AND = { + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_central_european } + } + } + } + add = ghw_target_fringe + } + # Christian stretch goal + else_if = { + limit = { + AND = { + scope:the_faith = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + not_non_catholic_standard_christian_faith_trigger = yes + } + title_capital_county.title_province = { geographical_region = ghw_region_baltic } + } + } + add = ghw_target_stretch + } + # Muslim heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:islam_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_arabia + geographical_region = ghw_region_near_east + geographical_region = ghw_region_egypt + geographical_region = ghw_region_persia + geographical_region = ghw_region_north_africa + } + } + } + add = ghw_target_heartlands + } + # Muslim frontier + else_if = { + limit = { + scope:the_faith.religion = religion:islam_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_sicily + geographical_region = ghw_region_iberia + geographical_region = ghw_region_anatolia + geographical_region = ghw_region_afghanistan + } + } + } + add = ghw_target_frontier + } + # Muslim fringe + else_if = { + limit = { + scope:the_faith.religion = religion:islam_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_mediterranean + geographical_region = ghw_region_western_india + geographical_region = ghw_region_southern_france + } + } + } + add = ghw_target_fringe + } + # Yazidi heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:yazidi_religion + title_capital_county.title_province = { geographical_region = ghw_region_kurdistan } + } + add = ghw_target_heartlands + } + # Yazidi frontier + else_if = { + limit = { + scope:the_faith.religion = religion:yazidi_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_southern_middle_east + geographical_region = ghw_region_eastern_middle_east + geographical_region = ghw_region_caucasus + } + } + } + add = ghw_target_frontier + } + # Yazidi fringe + else_if = { + limit = { + scope:the_faith.religion = religion:yazidi_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_caspian_steppe + geographical_region = ghw_region_arabia + geographical_region = ghw_region_holy_land + } + } + } + add = ghw_target_fringe + } + # Jewish heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:judaism_religion + title_capital_county.title_province = { geographical_region = ghw_region_holy_land } + } + add = ghw_target_heartlands + } + # Jewish frontier + else_if = { + limit = { + scope:the_faith.religion = religion:judaism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_arabia + geographical_region = ghw_region_near_east + geographical_region = ghw_region_egypt + } + } + } + add = ghw_target_frontier + } + # Jewish fringe + else_if = { + limit = { + scope:the_faith.religion = religion:judaism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_anatolia + geographical_region = ghw_region_persia + geographical_region = ghw_region_ethiopia + } + } + } + add = ghw_target_fringe + } + # Zoroastrian/Dualist heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_persia } + } + add = ghw_target_heartlands + } + # Zoroastrian/Dualist frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_afghanistan + geographical_region = ghw_region_near_east + } + } + } + add = ghw_target_frontier + } + # Zoroastrian/Dualist fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_arabia + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_anatolia + geographical_region = ghw_region_mongolia + geographical_region = ghw_region_western_india + } + } + } + add = ghw_target_fringe + } + + ### Pagans + # Norse heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:germanic_religion + title_capital_county.title_province = { geographical_region = ghw_region_scandinavia } + } + add = ghw_target_heartlands + } + # Norse frontier + else_if = { + limit = { + scope:the_faith.religion = religion:germanic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_britannia + geographical_region = ghw_region_saxony + geographical_region = ghw_region_russia + } + } + } + add = ghw_target_frontier + } + # Norse fringe + else_if = { + limit = { + scope:the_faith.religion = religion:germanic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_baltic + geographical_region = ghw_region_poland + } + } + } + add = ghw_target_fringe + } + # Norse stretch goal + else_if = { + limit = { + scope:the_faith.religion = religion:germanic_religion + title_capital_county.title_province = { geographical_region = ghw_region_thessalonika } + } + add = ghw_target_stretch + } + # Baltic heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:baltic_religion + title_capital_county.title_province = { geographical_region = ghw_region_baltic } + } + add = ghw_target_heartlands + } + # Baltic frontier + else_if = { + limit = { + scope:the_faith.religion = religion:baltic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_poland + geographical_region = ghw_region_russia + } + } + } + add = ghw_target_frontier + } + # Baltic fringe + else_if = { + limit = { + scope:the_faith.religion = religion:baltic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_scandinavia + geographical_region = ghw_region_steppe + geographical_region = ghw_region_hungary + } + } + } + add = ghw_target_fringe + } + # Slavic heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:slavic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_wendish_lands + geographical_region = ghw_region_balkans + geographical_region = ghw_region_russia + } + } + } + add = ghw_target_heartlands + } + # Slavic frontier + else_if = { + limit = { + scope:the_faith.religion = religion:slavic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_hungary + geographical_region = ghw_region_steppe + } + } + } + add = ghw_target_frontier + } + # Slavic fringe + else_if = { + limit = { + scope:the_faith.religion = religion:slavic_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mainland_greece + geographical_region = ghw_region_germany + } + } + } + add = ghw_target_fringe + } + # Slavic stretch goal + else_if = { + limit = { + scope:the_faith.religion = religion:slavic_religion + title_capital_county.title_province = { geographical_region = ghw_region_italy } + } + add = ghw_target_stretch + } + # Finnish & Siberian heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_finland_&_estonia + geographical_region = ghw_region_northern_russia + geographical_region = ghw_region_steppe + } + } + } + add = ghw_target_heartlands + } + # Finnish & Siberian frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_scandinavia + geographical_region = ghw_region_baltic + geographical_region = ghw_region_southern_russia + geographical_region = ghw_region_siberia + } + } + } + add = ghw_target_frontier + } + # Finnish & Siberian fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_transoxiana + geographical_region = ghw_region_mongolia + } + } + } + add = ghw_target_fringe + } + # Tengri heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:tengrism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mongolia + geographical_region = ghw_region_siberia + geographical_region = ghw_region_steppe + } + } + } + add = ghw_target_heartlands + } + # Tengri frontier + else_if = { + limit = { + scope:the_faith.religion = religion:tengrism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_russia + geographical_region = ghw_region_transoxiana + geographical_region = ghw_region_hungary + } + } + } + add = ghw_target_frontier + } + # Tengri fringe + else_if = { + limit = { + scope:the_faith.religion = religion:tengrism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_tibet + geographical_region = ghw_region_wendish_lands + } + } + } + add = ghw_target_fringe + } + # Magyar heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:magyar_religion + title_capital_county.title_province = { geographical_region = ghw_region_hungary } + } + add = ghw_target_heartlands + } + # Magyar frontier + else_if = { + limit = { + scope:the_faith.religion = religion:magyar_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_balkans + geographical_region = ghw_region_crimea + geographical_region = ghw_region_poland_bohemia_bavaria + geographical_region = ghw_region_southern_russia + } + } + } + add = ghw_target_frontier + } + # Magyar fringe + else_if = { + limit = { + scope:the_faith.religion = religion:magyar_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mainland_greece + geographical_region = ghw_region_baltic + } + } + } + add = ghw_target_fringe + } + # Bon/Qiangicism/Donyipoloism/Mundhumism heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_tibet } + } + add = ghw_target_heartlands + } + # Bon/Qiangicism/Donyipoloism/Mundhumism frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_northern_india + geographical_region = ghw_region_khotan + } + } + } + add = ghw_target_frontier + } + # Bon/Qiangicism/Donyipoloism/Mundhumism fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mongolia + geographical_region = ghw_region_transoxiana + } + } + } + add = ghw_target_fringe + } + # Bon/Qiangicism/Donyipoloism/Mundhumism stretch goal + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_southern_india } + } + add = ghw_target_stretch + } + # Mande Paganism & Senegambian Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:west_african_roog_religion + this = religion:west_african_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_the_sahel } + } + add = ghw_target_heartlands + } + # Mande Paganism & Senegambian Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:west_african_roog_religion + this = religion:west_african_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_subsahelian_africa + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_western_sahara + } + } + } + add = ghw_target_frontier + } + # Mande Paganism & Senegambian Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:west_african_roog_religion + this = religion:west_african_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_north_africa } + } + add = ghw_target_fringe + } + # Hausan Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:west_african_bori_religion + title_capital_county.title_province = { geographical_region = ghw_region_north_african_interior } + } + add = ghw_target_heartlands + } + # Hausan Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = religion:west_african_bori_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_subsahelian_africa + geographical_region = ghw_region_ethiopia + geographical_region = ghw_region_eastern_sahara + } + } + } + add = ghw_target_frontier + } + # Hausan Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = religion:west_african_bori_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_horn_of_africa + geographical_region = ghw_region_egypt_et_al + geographical_region = ghw_region_north_africa + } + } + } + add = ghw_target_fringe + } + # Akan Paganism & Yoruba Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:akom_religion + this = religion:west_african_orisha_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_subsahelian_africa } + } + add = ghw_target_heartlands + } + # Akan Paganism & Yoruba Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:akom_religion + this = religion:west_african_orisha_religion + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_western_sahara + } + } + } + add = ghw_target_frontier + } + # Akan Paganism & Yoruba Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:akom_religion + this = religion:west_african_orisha_religion + } + } + title_capital_county.title_province = { geographical_region = ghw_region_north_africa } + } + add = ghw_target_fringe + } + # Kushite Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:kushitism_religion + title_capital_county.title_province = { geographical_region = ghw_region_egypt_et_al } + } + add = ghw_target_heartlands + } + # Kushite Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = religion:kushitism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_ethiopia + geographical_region = ghw_region_ethiopia + geographical_region = ghw_region_horn_of_africa + } + } + } + add = ghw_target_frontier + } + # Kushite Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = religion:kushitism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_subsahelian_africa + geographical_region = ghw_region_north_africa + geographical_region = ghw_region_north_africa + } + } + } + add = ghw_target_fringe + } + # Kushite Paganism stretch goals + else_if = { + limit = { + scope:the_faith.religion = religion:kushitism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_arabia + } + } + } + add = ghw_target_stretch + } + # Waaqi Paganism heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:waaqism_religion + title_capital_county.title_province = { geographical_region = ghw_region_horn_of_africa } + } + add = ghw_target_heartlands + } + # Waaqi Paganism frontier + else_if = { + limit = { + scope:the_faith.religion = religion:waaqism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_ethiopia + geographical_region = ghw_region_egypt_et_al + geographical_region = ghw_region_arabia + } + } + } + add = ghw_target_frontier + } + # Waaqi Paganism fringe + else_if = { + limit = { + scope:the_faith.religion = religion:waaqism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_holy_land + } + } + } + add = ghw_target_fringe + } + # Zunist heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:zunism_religion + title_capital_county.title_province = { geographical_region = ghw_region_afghanistan } + } + add = ghw_target_heartlands + } + # Zunist frontier + else_if = { + limit = { + scope:the_faith.religion = religion:zunism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_western_india + geographical_region = ghw_region_persia + geographical_region = ghw_region_transoxiana + } + } + } + add = ghw_target_frontier + } + # Zunist fringe + else_if = { + limit = { + scope:the_faith.religion = religion:zunism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_caucasus + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_near_east + geographical_region = ghw_region_southwestern_india + } + } + } + add = ghw_target_fringe + } + # Zunist stretch goal + else_if = { + limit = { + scope:the_faith.religion = religion:zunism_religion + title_capital_county.title_province = { geographical_region = ghw_region_egypt } + } + add = ghw_target_stretch + } + # Hellenic heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:hellenism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mainland_greece + geographical_region = ghw_region_italy + } + } + } + add = ghw_target_heartlands + } + # Hellenic frontier + else_if = { + limit = { + scope:the_faith.religion = religion:hellenism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_anatolia + geographical_region = ghw_region_balkans + geographical_region = ghw_region_near_east + } + } + } + add = ghw_target_frontier + } + # Hellenic fringe + else_if = { + limit = { + scope:the_faith.religion = religion:hellenism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_holy_land + geographical_region = ghw_region_egypt + geographical_region = ghw_region_north_africa + geographical_region = ghw_region_southern_france + } + } + } + add = ghw_target_fringe + } + + ### Eastern + # Hindu heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:hinduism_religion + title_capital_county.title_province = { geographical_region = ghw_region_the_ganges } + } + add = ghw_target_heartlands + } + # Hindu frontier + else_if = { + limit = { + scope:the_faith.religion = religion:hinduism_religion + title_capital_county.title_province = { geographical_region = ghw_region_non_ganges_india } + } + add = ghw_target_frontier + } + # Hindu fringe + else_if = { + limit = { + scope:the_faith.religion = religion:hinduism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_tibet + geographical_region = ghw_region_afghanistan + geographical_region = ghw_region_persia + } + } + } + add = ghw_target_fringe + } + # Jain heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:jainism_religion + title_capital_county.title_province = { geographical_region = ghw_region_gujarat_&_rajputana } + } + add = ghw_target_heartlands + } + # Jain frontier + else_if = { + limit = { + scope:the_faith.religion = religion:jainism_religion + title_capital_county.title_province = { geographical_region = ghw_region_non_gujarat_or_rajputana_india } + } + add = ghw_target_frontier + } + # Jain fringe + else_if = { + limit = { + scope:the_faith.religion = religion:jainism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_tibet + geographical_region = ghw_region_afghanistan + geographical_region = ghw_region_persia + } + } + } + add = ghw_target_fringe + } + # Theravada Buddhist heartlands + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOR = { + this = faith:mahayana + this = faith:vajrayana + } + } + title_capital_county.title_province = { geographical_region = ghw_region_lanka_&_bengal } + } + add = ghw_target_heartlands + } + # Theravada Buddhist frontier + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOR = { + this = faith:mahayana + this = faith:vajrayana + } + } + title_capital_county.title_province = { geographical_region = ghw_region_middle_india } + } + add = ghw_target_frontier + } + # Theravada Buddhist fringe + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOR = { + this = faith:mahayana + this = faith:vajrayana + } + } + title_capital_county.title_province = { geographical_region = ghw_region_western_india } + } + add = ghw_target_fringe + } + # Mahayana & Vajrayana Buddhist heartlands + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOT = { this = faith:theravada } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_tibet + geographical_region = ghw_region_mongolia + } + } + } + add = ghw_target_heartlands + } + # Mahayana & Vajrayana Buddhist frontier + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOT = { this = faith:theravada } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_khotan + geographical_region = ghw_region_siberia + } + } + } + add = ghw_target_frontier + } + # Mahayana & Vajrayana Buddhist fringe + else_if = { + limit = { + scope:the_faith = { + religion = religion:buddhism_religion + NOT = { this = faith:theravada } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_transoxiana + geographical_region = ghw_region_afghanistan + } + } + } + add = ghw_target_fringe + } + # Taoist heartlands + else_if = { + limit = { + scope:the_faith.religion = religion:taoism_religion + title_capital_county.title_province = { geographical_region = ghw_region_mongolia } + } + add = ghw_target_heartlands + } + # Taoist frontier + else_if = { + limit = { + scope:the_faith.religion = religion:taoism_religion + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_siberia + geographical_region = ghw_region_tibet + } + } + } + add = ghw_target_frontier + } + # Taoist fringe + else_if = { + limit = { + scope:the_faith.religion = religion:taoism_religion + title_capital_county.title_province = { geographical_region = ghw_region_north_eastern_india } + } + add = ghw_target_fringe + } + + ### 3 ### + # Factor in the potential target's distance from the faith. + # Distance: Rome to Jerusalem-ish + # If the HoF is landed, use them. + if = { + limit = { + exists = scope:the_faith.religious_head.capital_county + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = scope:the_faith.religious_head.capital_county + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Otherwise, use a preset fallback holy site. + else = { + # Christianity + if = { + limit = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Islam + else_if = { + limit = { scope:the_faith.religion = religion:islam_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mecca + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Judaism + else_if = { + limit = { scope:the_faith.religion = religion:judaism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_jerusalem + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Zoroastrianism & Dualism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_baduspan + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Asatru Paganism + else_if = { + limit = { scope:the_faith.religion = religion:germanic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_upland + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Vidilist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:baltic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_braslau + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Slovianskan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:slavic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kiev + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Ukonusko & Turumic Paganism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kakisalmi + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Tengri Paganism + else_if = { + limit = { scope:the_faith.religion = religion:tengrism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_qayaliq + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Taltosist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:magyar_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_visegrad + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Bon/Qiangicism/Donyipoloism/Mundhumism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_khotan + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Mande Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_awkar + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Senegambian Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_roog_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kasa + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Hausan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_bori_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_daura + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Akan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:akom_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kumasi + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Yoruba Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_orisha_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_owu + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Kushite Paganism + else_if = { + limit = { scope:the_faith.religion = religion:kushitism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_aswan + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Waaqi Paganism + else_if = { + limit = { scope:the_faith.religion = religion:waaqism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mogadishu + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Zunist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:zunism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kabul + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Hellenic Paganism + else_if = { + limit = { scope:the_faith.religion = religion:hellenism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Hinduism + else_if = { + limit = { scope:the_faith.religion = religion:hinduism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mathura + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Jainism + else_if = { + limit = { scope:the_faith.religion = religion:jainism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_somnath + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Buddhism + else_if = { + limit = { scope:the_faith.religion = religion:buddhism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_gaya + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + # Taoism + else_if = { + limit = { scope:the_faith.religion = religion:taoism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_langshan + value >= ghw_target_distance_01_threshold + } + } + } + multiply = ghw_target_distance_01_reduction + } + } + } + # Distance: Rome to Afghanistan-ish + # If the HoF is landed, use them. + if = { + limit = { + scope:the_faith.religious_head = { is_playable_character = yes } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = scope:the_faith.religious_head.capital_county + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Otherwise, use a preset fallback holy site. + else = { + # Christianity + if = { + limit = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Islam + else_if = { + limit = { scope:the_faith.religion = religion:islam_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mecca + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Judaism + else_if = { + limit = { scope:the_faith.religion = religion:judaism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_jerusalem + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Zoroastrianism & Dualism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_baduspan + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Asatru Paganism + else_if = { + limit = { scope:the_faith.religion = religion:germanic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_upland + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Vidilist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:baltic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_braslau + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Slovianskan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:slavic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kiev + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Ukonusko & Turumic Paganism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kakisalmi + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Tengri Paganism + else_if = { + limit = { scope:the_faith.religion = religion:tengrism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_qayaliq + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Taltosist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:magyar_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_visegrad + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Bon/Qiangicism/Donyipoloism/Mundhumism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_khotan + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Mande Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_awkar + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Senegambian Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_roog_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kasa + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Hausan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_bori_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_daura + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Akan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:akom_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kumasi + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Yoruba Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_orisha_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_owu + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Kushite Paganism + else_if = { + limit = { scope:the_faith.religion = religion:kushitism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_aswan + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Waaqi Paganism + else_if = { + limit = { scope:the_faith.religion = religion:waaqism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mogadishu + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Zunist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:zunism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kabul + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Hellenic Paganism + else_if = { + limit = { scope:the_faith.religion = religion:hellenism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Hinduism + else_if = { + limit = { scope:the_faith.religion = religion:hinduism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mathura + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Jainism + else_if = { + limit = { scope:the_faith.religion = religion:jainism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_somnath + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Buddhism + else_if = { + limit = { scope:the_faith.religion = religion:buddhism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_gaya + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + # Taoism + else_if = { + limit = { scope:the_faith.religion = religion:taoism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_langshan + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + } + } + # Distance: Rome to Bengal-ish + # If the HoF is landed, use them. + if = { + limit = { + scope:the_faith.religious_head = { is_playable_character = yes } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = scope:the_faith.religious_head.capital_county + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Otherwise, use a preset fallback holy site. + else = { + # Christianity + if = { + limit = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Islam + else_if = { + limit = { scope:the_faith.religion = religion:islam_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mecca + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Judaism + else_if = { + limit = { scope:the_faith.religion = religion:judaism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_jerusalem + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Zoroastrianism & Dualism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:zoroastrianism_religion + this = religion:dualism_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_baduspan + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Asatru Paganism + else_if = { + limit = { scope:the_faith.religion = religion:germanic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_upland + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Vidilist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:baltic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_braslau + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Slovianskan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:slavic_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kiev + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Ukonusko & Turumic Paganism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:finno_ugric_religion + this = religion:siberian_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kakisalmi + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Tengri Paganism + else_if = { + limit = { scope:the_faith.religion = religion:tengrism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_qayaliq + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Taltosist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:magyar_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_visegrad + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Bon/Qiangicism/Donyipoloism/Mundhumism + else_if = { + limit = { + scope:the_faith.religion = { + OR = { + this = religion:bon_religion + this = religion:tani_religion + this = religion:mundhum_religion + this = religion:qiangic_religion + } + } + } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_khotan + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Mande Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_awkar + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Senegambian Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_roog_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kasa + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Hausan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_bori_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_daura + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Akan Paganism + else_if = { + limit = { scope:the_faith.religion = religion:akom_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kumasi + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Yoruba Paganism + else_if = { + limit = { scope:the_faith.religion = religion:west_african_orisha_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_owu + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Kushite Paganism + else_if = { + limit = { scope:the_faith.religion = religion:kushitism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_aswan + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Waaqi Paganism + else_if = { + limit = { scope:the_faith.religion = religion:waaqism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mogadishu + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Zunist Paganism + else_if = { + limit = { scope:the_faith.religion = religion:zunism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_kabul + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Hellenic Paganism + else_if = { + limit = { scope:the_faith.religion = religion:hellenism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_roma + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Hinduism + else_if = { + limit = { scope:the_faith.religion = religion:hinduism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_mathura + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Jainism + else_if = { + limit = { scope:the_faith.religion = religion:jainism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_somnath + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Buddhism + else_if = { + limit = { scope:the_faith.religion = religion:buddhism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_gaya + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + # Taoism + else_if = { + limit = { scope:the_faith.religion = religion:taoism_religion } + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_langshan + value >= ghw_target_distance_03_threshold + } + } + } + multiply = ghw_target_distance_03_reduction + } + } + } + + # Weigh down certain areas slightly + if = { + limit = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + geographical_region = ghw_region_north_africa + } + } + multiply = 0.7 + } + else_if = { + limit = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_western_sahara + geographical_region = ghw_region_eastern_sahara + geographical_region = ghw_region_the_sahel + geographical_region = ghw_region_north_african_interior + geographical_region = ghw_region_subsahelian_africa + geographical_region = world_steppe + geographical_region = world_asia_north_east + } + } + } + multiply = 0.001 + } + + ### 4 ### + # Always weight-up kingdoms containing holy sites. + if = { + limit = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + multiply = ghw_target_has_holy_site + } + + ### 5 ### + # Christian & Jewish preference for Jerusalem + if = { + limit = { + # Belongs to a Christian or Jewish religion. + OR = { + OR = { + scope:the_faith.religion = religion:eastern_orthodox_religion + scope:the_faith.religion = religion:catholic_religion + scope:the_faith.religion = religion:protestant_religion + } + scope:the_faith.religion = religion:judaism_religion + } + # Not a non-Catholic standard Christian faith. + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + # Definitely actually considers Jerusalem holy. + title:c_jerusalem = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + # There's a GHWable kingdom in the area. + title_capital_county.title_province = { geographical_region = ghw_region_jerusalem } + } + add = ghw_target_jerusalem + } + # Muslim preference for Mecca & Medina + if = { + limit = { + # Belongs to an Islamic religion. + scope:the_faith.religion = religion:islam_religion + # Not the Qarmatians. Since they weren't exactly fans of the Holy Cities. + NOT = { scope:the_faith = faith:qarmatian } + # Definitely actually considers at least Mecca or Medina holy. + OR = { + title:c_mecca = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + title:c_medina = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + } + # There's a GHWable kingdom in the area. + title_capital_county.title_province = { geographical_region = ghw_region_arabia } + } + add = ghw_target_key_religious_holding + } + # A defender in the region HumSac'd your HoF + if = { + limit = { + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + tier = tier_county + holder = { + AND = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:the_faith + } + } + scope:the_faith = { + is_hostile_enough_for_holy_war_trigger = { FAITH = top_liege.faith } + } + } + } + } + multiply = ghw_target_religious_vengeance + } +} + +great_holy_war_pledge_amount = { + value = root.yearly_character_income + min = 10 +} + +# Referenced in code; don't delete this. When determining GHW participation score, the character's score from the war is multiplied by this. ROOT is the character +ghw_score_mult = { + value = 1 + if = { + limit = { + this = faith.religious_head + faith = { has_doctrine = doctrine_spiritual_head } # Temporal heads get credit + } + value = 0 + } +} + +# Referenced in code; don't delete this. When determining GHW participation score, the character's score percentage is capped at this. ROOT is the character +ghw_max_score_percentage = { + value = 20 +} + +# Referenced in code; don't delete this. Used by the GHW screen to show the player how much of the pot they'll get when the war starts. Should be used where you hand it out: divide_war_chest = { fraction = ghw_war_start_handout_percentage } +ghw_war_start_handout_percentage = { + value = 0.2 +} + +# Referenced in code; don't delete this +# When a holy war is declared, everyone of the defender's faith that passes can_defensively_join_holy_war will be scored using this +# Scores above 0 will join +# Scope is the potential joiner +# scope:attacker is the attacker +# scope:defender is the defender +holy_war_defensive_join_value = { + add = { + desc = "BASE_VALUE" + value = -50 + format = "BASE_VALUE_FORMAT" + } + add = { + desc = "zealous_personality" + value = ai_zeal + } + + add = { + desc = "bold_personality" + value = ai_boldness + divide = 2 + } + + add = { # More fervent faiths are likelier to defend themselves en masse + desc = "high_fervor" + value = faith.fervor + divide = 5 # Max 20 + if = { + limit = { + ai_zeal < 0 + } + divide = 2 # Max 10 if not zealous + } + } + + if = { + limit = { + has_relation_rival = scope:attacker + } + add = { + desc = "you_are_rivals" + value = 200 + } + } + + if = { + limit = { + OR = { + has_relation_friend = scope:defender + has_relation_lover = scope:defender + } + } + add = { + desc = "friends_with_defender" + value = 200 + } + } + + # Less Likely if you dislike the target + if = { + limit = { + opinion = { target = scope:defender value <= -15 } + ai_zeal < 50 + } + add = { + desc = "dislikes_defender" + value = -25 + } + } + + # Much Less Likely if you really dislike the target + if = { + limit = { + opinion = { target = scope:defender value <= -50 } + ai_zeal < 50 + } + add = { + desc = "strongly_dislikes_defender" + value = -50 + } + } +} + +# Root = faith +faith_conversion_fervor_mult = { + value = define:NReligion|MAX_FERVOR + subtract = fervor + multiply = define:NReligion|FAITH_CREATION_FERVOR_DISCOUNT_PER_MISSING_FERVOR + max = define:NReligion|FAITH_CREATION_FERVOR_DISCOUNT_MAX + divide = define:NReligion|MAX_FERVOR +} + +# Modify (multiply) the doctrine cost when creating a faith. +# The returned value is interpreted as a multiplicative modifier (e.g. 0.5 means +50% cost). +# scope:character = the creation character +# scope:old_faith = the faith the character is converting from +faith_creation_cost_mult = { + subtract = { + value = scope:old_faith.faith_conversion_fervor_mult + desc = "faith_creation_cost_fervor_impact" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + } +} + +# Modify (multiply) the doctrine cost when converting to a faith. +# The returned value is interpreted as a multiplicative modifier (e.g. 0.5 means +50% cost). +# scope:character = the converting character +# scope:new_faith = the faith the character is converting to +# There should be no subtract equal or higher than 1 +faith_conversion_cost_mult = { + + #Adding 1 to apply properly the following multipliers + add = { + value = 1 + } + + # Try to always be cheaper than creating a new faith + if = { + limit = { + scope:character.learning > 0 + } + multiply = { + value = 1 + subtract = { + desc = "learning_modifier" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = scope:character.learning + divide = 100 + } + } + } + if = { + limit = { + always = yes + } + multiply = { + value = 1 + add = { + value = scope:new_faith.faith_conversion_fervor_mult + subtract = scope:character.faith.faith_conversion_fervor_mult + desc = "faith_conversion_cost_fervor_difference" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + } + } + } + # Try to always be cheaper than creating a new faith + if = { + limit = { + scope:new_faith.religion = scope:character.faith.religion + } + multiply = { + value = 1 + subtract = { + desc = "faith_conversion_cost_existing_faith" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + # Try to always be cheaper than creating a new faith + else = { + multiply = { + value = 1 + subtract = { + desc = "faith_conversion_cost_existing_faith" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.35 + } + } + } + # Pluralistic faiths have it easier converting to each other + if = { + limit = { + scope:new_faith = { has_doctrine = doctrine_pluralism_pluralistic } + scope:character.faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + multiply = { + value = 1 + subtract = { + desc = "faith_conversion_cost_pluralists" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + # Pluralistic faiths have it easier converting + else_if = { + limit = { + scope:character.faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + multiply = { + value = 1 + subtract = { + desc = "faith_conversion_cost_pluralist" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.15 + } + } + } + + ############################################################### + # Converting TO an unreformed faith often has steep penalties # + ############################################################### + if = { + limit = { + scope:new_faith = { + has_doctrine_parameter = unreformed + } + } + + # Massive penalty if your current faith is reformed. + if = { + limit = { + scope:character = { + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + } + multiply = { + value = 1 + add = { + desc = "faith_conversion_cost_reformed_converting_to_unreformed" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 5 + } + } + + } + + # Minor stacking penalties depending on (non-tribal) government form. + if = { + limit = { + scope:character = { + government_has_flag = government_is_clan + } + } + multiply = { + value = 1 + add = { + desc = "faith_conversion_cost_clan_converting_to_unreformed" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + else_if = { + limit = { + scope:character = { + government_has_flag = government_is_feudal + } + } + multiply = { + value = 1 + add = { + desc = "faith_conversion_cost_feudal_converting_to_unreformed" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + else_if = { + limit = { + scope:character = { + government_has_flag = government_is_republic + } + } + multiply = { + value = 1 + add = { + desc = "faith_conversion_cost_republic_converting_to_unreformed" + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.75 + } + } + } + } + + ################################## + # Dead Religion/Faith penalty(s) # + ################################## + #More expensive to convert to a dead religion + if = { + limit = { + scope:new_faith = { + religion = { + any_faith = { + count = all + has_followers_trigger = no + } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_dead_religion + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 5 + } + } + } + + ####################################### + # Switching religion/family penalties # + ####################################### + # More expensive if you convert to a faith outside of your religion's family + if = { + limit = { + scope:new_faith = { has_doctrine = special_doctrine_immaterial_harmony } + scope:character.faith = { has_doctrine = special_doctrine_immaterial_harmony } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_immaterial_harmony + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = -0.5 + } + } + } + else_if = { + limit = { + OR = { + AND = { + scope:new_faith.religion = { is_in_family = rf_abrahamic } + NOT = { + scope:character.faith.religion = { is_in_family = rf_abrahamic } + } + } + AND = { + scope:new_faith.religion = { is_in_family = rf_eastern } + NOT = { + scope:character.faith.religion = { is_in_family = rf_eastern } + } + } + AND = { + scope:new_faith.religion = { is_in_family = rf_pagan } + NOT = { + scope:character.faith.religion = { is_in_family = rf_pagan } + } + } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_other_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 2 + } + } + } + + # Unreformed Faiths have an easier way converting to Organized faiths + if = { + limit = { + scope:new_faith = { + NOT = { has_doctrine_parameter = unreformed } + } + scope:character.faith = { has_doctrine_parameter = unreformed } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_unreformed_to_organized + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + + if = { + limit = { + scope:character = { + any_courtier = { + has_character_flag = suzerains_missionary + faith = scope:new_faith + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_suzerains_missionary + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.1 + } + } + } + + # More expensive to convert to something inside your religion family that's not the same religion + if = { + limit = { + scope:new_faith.religion = { is_in_family = rf_abrahamic } + scope:character.faith.religion = { + is_in_family = rf_abrahamic + this != scope:new_faith.religion + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_inside_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 1 + } + } + } + else_if = { + limit = { + scope:new_faith.religion = { is_in_family = rf_eastern } + scope:character.faith.religion = { + is_in_family = rf_eastern + this != scope:new_faith.religion + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_inside_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 1 + } + } + } + if = { + limit = { + scope:new_faith.religion = { is_in_family = rf_pagan } + scope:character.faith.religion = { + is_in_family = rf_pagan + this != scope:new_faith.religion + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_inside_religion_family + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 1 + } + } + } + + ####################################### + # Misc penalties # + ####################################### + # More expensive to convert to a faith who's HoF you HumSac'D/to a faith on good terms with one who's HoF you HumSac'd, unless they're chill with HumSac. + if = { + limit = { + scope:character = { + has_variable_list = humsacd_hofs + any_in_list = { + variable = humsacd_hofs + faith_hostility_level = { + target = scope:new_faith + value <= faith_astray_level + } + } + } + # Exemptions for people who already practice HumSac: they're likely not happy, but it's not the ultimate taboo for them. + scope:new_faith = { + NOT = { has_doctrine_parameter = human_sacrifice_active } + } + } + multiply = { + value = 1 + add = { + desc = faith_conversion_cost_sacrificed_hof + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 5 + } + } + } + + ######################## + # Conversion Discounts # + ######################## + # Cheaper if you are targeted by the new Faith in a defensive Holy War + if = { + limit = { + scope:character = { + any_character_war = { + using_holy_war_cb_trigger = yes + is_defender = scope:character + } + } + } + if = { # Even cheaper if unreformed + limit = { + scope:new_faith = { + NOT = { has_doctrine_parameter = unreformed } + } + scope:character = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_unreformed_holy_war + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + else = { # But still a sizable discount otherwise. + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_holy_war + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + } + # Cheaper if your spouse is of the faith + if = { + limit = { + scope:character = { + any_spouse = { + faith = scope:new_faith + } + } + } + if = { # Even cheaper if unreformed + limit = { + scope:new_faith = { + NOT = { has_doctrine_parameter = unreformed } + } + scope:character = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_unreformed_spouse + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + else = { # But still a sizable discount otherwise. + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_spouse + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + } + # Does a concubine have the right religion? + else_if = { + limit = { + scope:character = { + any_concubine = { + faith = scope:new_faith + } + } + } + if = { # Even cheaper if unreformed + limit = { + scope:new_faith = { + NOT = { has_doctrine_parameter = unreformed } + } + scope:character = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_unreformed_concubine + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + else = { # But still a sizable discount otherwise. + + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_concubine + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + } + # Cheaper if the religion is present near/in your borders + if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_abrahamic } + } + scope:character = { + faith = { + religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + liege ?= { + faith = scope:new_faith + } + + liege ?= { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_eastern } + } + scope:character = { + faith = { + religion = { + NOT = { is_in_family = rf_eastern } + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + liege ?= { + faith = scope:new_faith + } + + liege ?= { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_pagan } + } + scope:character = { + faith = { + religion = { + NOT = { is_in_family = rf_pagan } + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + liege ?= { + faith = scope:new_faith + } + + liege ?= { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.9 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_abrahamic } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_abrahamic + this != scope:new_faith.religion + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + liege ?= { + faith = scope:new_faith + } + + liege ?= { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.8 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_eastern } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_eastern + this != scope:new_faith.religion + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + liege ?= { + faith = scope:new_faith + } + + liege ?= { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.8 + } + } + } + # Cheaper if the religion is present near/in your borders + else_if = { + limit = { + scope:new_faith = { + religion = { is_in_family = rf_pagan } + } + scope:character = { + faith = { + religion = { + is_in_family = rf_pagan + this != scope:new_faith.religion + } + } + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + liege ?= { + faith = scope:new_faith + } + + liege ?= { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.8 + } + } + } + else_if = { + limit = { + scope:character = { + OR = { + any_neighboring_top_liege_realm_owner = { + faith = scope:new_faith + } + any_vassal = { + faith = scope:new_faith + } + any_realm_province = { + faith = scope:new_faith + } + liege ?= { + faith = scope:new_faith + } + + liege ?= { + any_vassal = { + faith = scope:new_faith + } + } + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_present + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + # Cheaper if you're an interloper in a struggle converting to an involved faith. + if = { + limit = { + scope:character = { + any_character_struggle = { + involvement = interloper + has_struggle_phase_parameter = cheaper_to_convert_to_struggle_faith + is_faith_involved_in_struggle = scope:new_faith + } + } + } + multiply = { + value = 1 + subtract = { + desc = struggle_parameter_cheaper_to_convert_to_struggle_faith + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + + ################################################ + # Conversion Discount from Confucian Education + ################################################ + + if = { + limit = { + scope:new_faith.religion = religion:confucianism_religion + scope:character = { + has_trait = confucian_education + has_trait_xp = { + trait = confucian_education + value >= 20 #Confused Confucian + } + } + } + if = { + limit = { + scope:character = { + has_trait_xp = { + trait = confucian_education + value >= 80 #Moral Paragon + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_confucian_education + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.7 + } + } + } + else_if = { + limit = { + scope:character = { + has_trait_xp = { + trait = confucian_education + value >= 60 #Virtuous Ethicist + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_confucian_education + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + else_if = { + limit = { + scope:character = { + has_trait_xp = { + trait = confucian_education + value >= 40 #Studious Classicist + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_confucian_education + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + else = { + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_confucian_education + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.1 + } + } + } + } + + ######################################## + # Conversion Discounts from Traditions # + ######################################## + # scope:new_faith.religion = scope:character.faith.religion + + # Pacifism Tenet + if = { + limit = { + AND = { + scope:character= { + culture = { + has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith + } + } + scope:new_faith = { + has_doctrine = tenet_pacifism + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_tradition + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + + #################################### + # Conversion Discounts from Events # + #################################### + if = { + limit = { + scope:character = { + exists = var:discounted_faith_to_convert_to_var + } + scope:character.var:discounted_faith_to_convert_to_var = scope:new_faith + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_event + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + if = { + limit = { + scope:character = { + has_character_modifier = mpo_islam_conversion_modifier + } + scope:new_faith = { religion = religion:islam_religion } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_mpo_islam_event + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + if = { + limit = { + scope:character = { + has_variable = japan_1010_discount + } + scope:new_faith = var:japan_1010_discount + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_tgp_japan_1010_event + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + if = { + limit = { + scope:character = { + has_character_flag = tgp_japan_1040_discount + } + scope:new_faith.religion = religion:shintoism_religion + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_tgp_japan_1040_event + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + + # Removing 1 to offset the value and present it as expected by the code + subtract = { + value = 1 + } + +} + +reincarnation_chance = 4 + +holy_sites_to_create_temporal_head_of_faith = 1 +holy_sites_to_create_spiritual_head_of_faith = 1 + +faith_military_strength = { + every_ruler = { + limit = { + faith = prev + is_at_war = no + } + add = max_military_strength + } +} + +syncretic_mutual_opinion_bonus_value = 30 + +ask_to_take_vows_piety_cost = { + value = { + add = medium_piety_value + if = { + limit = { exists = scope:actor } + if = { + limit = { + OR = { + is_child_of = scope:actor + "scope:actor.primary_title.place_in_line_of_succession(scope:recipient)" <= 3 + } + } + add = major_piety_value + } + } + else_if = { + limit = { is_close_family_of = scope:actor } + add = medium_piety_value + } + } +} + +# Simplified target kingdom weight for crusade specifically used to send help to Byzantium (ask_western_help_decision) + +great_holy_war_target_kingdom_weight_simplified = { + # Is the target kingdom a viable GHW target? + every_in_de_jure_hierarchy = { + # Check individual counties within the potential target de jure kingdom. + continue = { tier > tier_county } + # For every county with a GHWable liege... + limit = { + tier = tier_county + scope:the_faith = { + is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.top_liege.faith } + } + } + add = 0.5 + } + # Weight up the kingdom if it either has an existing same-faith holder, or at least a same-faith claimant. + if = { + limit = { + OR = { + AND = { + exists = holder + holder.faith = scope:the_faith + } + any_claimant = { + exists = this + faith = scope:the_faith + is_available_adult = yes + } + } + } + add = ghw_target_existing_same_faith_ruler + } + # Christian heartlands + if = { + limit = { + OR = { + AND = { + # Catholic sphere. + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_northern_italy + geographical_region = ghw_region_france + geographical_region = ghw_region_germany + geographical_region = ghw_region_england + } + } + } + AND = { + # Orthodox sphere. + scope:the_faith = { not_non_orthodox_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_thessalonika + geographical_region = ghw_region_greece + } + } + } + AND = { + # Coptic sphere. + scope:the_faith = { not_non_coptic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_ethiopia } + } + AND = { + # Armenian sphere. + scope:the_faith = { not_non_armenian_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_caucasus } + } + } + } + add = ghw_target_heartlands + } + # Christian frontier + else_if = { + limit = { + OR = { + AND = { + # Shared Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_anatolia } + } + AND = { + # Shared Catholic/Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_near_east + geographical_region = ghw_region_egypt + } + } + } + AND = { + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_mediterranean + geographical_region = ghw_region_balkans + } + } + } + AND = { + # Shared Catholic/Orthodox/Armenian sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + not_non_armenian_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_holy_land } + } + AND = { + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { geographical_region = ghw_region_iberia } + } + } + } + add = ghw_target_frontier + } + # Christian fringe + else_if = { + limit = { + OR = { + AND = { + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + title_capital_county.title_province = { + OR = { + geographical_region = ghw_region_celtic + geographical_region = ghw_region_germanic + geographical_region = ghw_region_finland_&_estonia + } + } + } + AND = { + # Shared Catholic/Orthodox sphere. + scope:the_faith = { + OR = { + # Bit cack-handed to check it like this, but keeps things hygienic. + not_non_catholic_standard_christian_faith_trigger = yes + not_non_orthodox_standard_christian_faith_trigger = yes + } + } + title_capital_county.title_province = { geographical_region = ghw_region_central_european } + } + } + } + add = ghw_target_fringe + } + # Christian stretch goal + else_if = { + limit = { + AND = { + scope:the_faith = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + not_non_catholic_standard_christian_faith_trigger = yes + } + title_capital_county.title_province = { geographical_region = ghw_region_baltic } + } + } + add = ghw_target_stretch + } + # Prio to kingdoms that border Byzantium + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_byzantion + value <= ghw_target_distance_01_threshold + } + } + } + multiply = 1.3 + } + if = { + limit = { + any_title_to_title_neighboring_and_across_water_empire = { + this = title:e_byzantium + } + } + multiply = 2 + } + #Weight down farthest kingdoms + if = { + limit = { + title_capital_county = { + squared_distance = { + target = title:c_byzantion + value >= ghw_target_distance_02_threshold + } + } + } + multiply = ghw_target_distance_02_reduction + } + # Always weight-up kingdoms containing holy sites. + if = { + limit = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + multiply = ghw_target_has_holy_site + } + # Christian preference for Jerusalem + if = { + limit = { + # Not a non-Catholic standard Christian faith. + scope:the_faith = { not_non_catholic_standard_christian_faith_trigger = yes } + # Definitely actually considers Jerusalem holy. + title:c_jerusalem = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + # There's a GHWable kingdom in the area. + title_capital_county.title_province = { geographical_region = ghw_region_jerusalem } + } + add = ghw_target_jerusalem + } + # A defender in the region HumSac'd your HoF + if = { + limit = { + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + tier = tier_county + holder = { + AND = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:the_faith + } + } + scope:the_faith = { + is_hostile_enough_for_holy_war_trigger = { FAITH = top_liege.faith } + } + } + } + } + multiply = ghw_target_religious_vengeance + } +} + +holy_site_reform_tracker_value = { + value = 0 + faith = { + every_holy_site = { + limit = { + county = { + save_temporary_scope_as = current_holy_site + OR = { + is_holy_site_controlled_by = root + root.confederation ?= { + is_house_based = no # any_confederation_member is not performant for house blocs + any_confederation_member = { + scope:current_holy_site = { + is_holy_site_controlled_by = prev + } + } + } + } + holder.faith = root.faith + } + } + add = 1 + } + } +} diff --git a/N3OW/common/script_values/04_ep2_wedding_values.txt b/N3OW/common/script_values/04_ep2_wedding_values.txt new file mode 100644 index 00000000..74081f05 --- /dev/null +++ b/N3OW/common/script_values/04_ep2_wedding_values.txt @@ -0,0 +1,1240 @@ +impress_intent_vassalization_acceptance_value = { # values synced with offer_vassalization_interaction + value = -50 + #Perks + if = { + limit = { + has_perk = true_ruler_perk + } + add = true_ruler_value + } + # Education 5 boost + if = { + limit = { + has_trait_with_flag = offer_vassalisation_25 + } + add = 25 + } + #Events + if = { + limit = { + has_character_modifier = event_bonus_to_vassal_accept + } + add = 20 + } + # Struggles + if = { + limit = { + scope:impress_check = { + has_opinion_modifier = { + modifier = scheme_sway_and_compelled_to_submit_opinion + target = prev + } + } + } + add = 20 + } + #Rekindler of Iran + if = { + limit = { + dynasty ?= { has_dynasty_modifier = fp3_rekindler_of_iran_modifier } + scope:impress_check = { + culture = { has_cultural_pillar = heritage_iranian } + } + } + add = 20 + } + #Obedience + if = { + limit = { + scope:impress_check = { + is_obedient_to = prev + } + } + add = 20 + } + + #Cultural Acceptance + if = { + limit = { + NOT = { has_same_culture_as = scope:impress_check } + culture = { + cultural_acceptance = { target = scope:impress_check.culture value <= 90 } + } + } + add = offer_vassalage_acceptance_value + } + #Has no Available Vassal Limit + if = { + limit = { vassal_limit_available < 1 } + add = -1000 + } + + #Different faith, no pluralism. + if = { + limit = { + scope:impress_check = { + NOR = { #Of two different faiths AND the potential vassal's faith is not pluralistic. + faith = root.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + } + add = { + value = -40 + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = -40 + } + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = -40 + } + } + } + #Different faith, pluralism. + if = { + limit = { + scope:impress_check = { + faith != root.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + NOT = { + root.faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -20 + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = -20 + } + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = -20 + } + } + } + #Different faith, both have pluralism. + if = { + limit = { + scope:impress_check = { + faith != root.faith + root.faith = { has_doctrine = doctrine_pluralism_pluralistic } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -10 + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = -10 + } + if = { + limit = { + scope:impress_check.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = -10 + } + } + } + #I am a King! Or Emperor + if = { + limit = { + scope:impress_check = { highest_held_title_tier = tier_kingdom } + } + add = { + value = -50 + if = { + limit = { + scope:impress_check = { + OR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + } + } + } + add = -50 + } + if = { + limit = { + scope:impress_check.sub_realm_size >= 5 + } + add = -50 + } + if = { + limit = { + scope:impress_check.sub_realm_size >= 10 + } + add = -100 + } + if = { + limit = { + scope:impress_check.highest_held_title_tier = tier_empire + } + multiply = 1.5 + } + } + } + #We just fought against each other. + if = { + limit = { + scope:impress_check = { + any_truce_holder = { + this = root + } + } + } + add = -50 + } + #I fought an independence war against you. + if = { + limit = { + scope:impress_check = { + exists = var:independence_war_former_liege + var:independence_war_former_liege = root + } + } + add = -200 + } + # I am Tribal and you are not + if = { + limit = { + scope:impress_check = { + government_has_flag = government_is_tribal + } + root = { + NOT = { government_has_flag = government_is_tribal } + } + } + add = -20 + } + # You are Tribal and I am not + if = { + limit = { + root = { + government_has_flag = government_is_tribal + } + scope:impress_check = { + NOT = { government_has_flag = government_is_tribal } + } + } + add = -20 + } + # I am Nomadic and you are Nomadic + if = { + limit = { + scope:impress_check = { government_has_flag = government_is_nomadic } + government_has_flag = government_is_nomadic + } + add = -50 + } + # I am Nomadic and you are not + if = { + limit = { + scope:impress_check = { government_has_flag = government_is_nomadic } + NOT = { government_has_flag = government_is_nomadic } + } + add = -75 + } + # You are Nomadic and I am not + if = { + limit = { + government_has_flag = government_is_nomadic + scope:impress_check = { government_has_flag = government_is_nomadic } + } + add = -75 + } + #Isolationist tradition + if = { + limit = { + root.culture != scope:impress_check.culture + scope:impress_check.culture = { + has_cultural_tradition = tradition_isolationist + } + } + add = -20 + } + #Bankrupt + if = { + limit = { + root.gold <= -1 + } + add = -100 + } + #Wide difference in rank + if = { + limit = { + root = { + tier_difference = { + target = scope:impress_check + value > 1 + } + } + } + add = 10 + } + # Is a Hegemon + if = { + limit = { + highest_held_title_tier = tier_hegemony + } + add = 10 + } + # Allied + if = { + limit = { + scope:impress_check = { + is_allied_to = root + } + } + add = 20 + } + # Is the Rightful Liege of recipient + if = { + limit = { + is_rightful_liege_of = scope:impress_check + } + add = 20 + } + #Is not the Rightful Liege of recipient + else = { + add = -20 + } + # Encircled + if = { + limit = { + scope:impress_check = { + NOT = { + any_neighboring_top_liege_realm_owner = { + this != root + } + } + NOT = { + any_realm_county = { + is_coastal_county = yes + } + } + } + } + add = 20 + } + #Distant Realm — Overseas Connection + if = { + limit = { + root = { + character_is_realm_neighbor = scope:impress_check + NOT = { #Ibiza should want to be a vassal of Mallorca, etc. + character_is_land_realm_neighbor = scope:impress_check + is_rightful_liege_of = scope:impress_check + } + } + } + add = -100 + } + #Distant Realm - No Connection + if = { + limit = { + NOT = { + character_is_realm_neighbor = scope:impress_check + } + scope:impress_check.capital_province = { + squared_distance = { target = prev.capital_province value < 200000 } + } + } + add = -250 + } + if = { #Remote Realm. + limit = { + NOT = { + character_is_realm_neighbor = scope:impress_check + } + scope:impress_check.capital_province = { squared_distance = { target = prev.capital_province value >= 200000 } } + } + add = -500 + } + #Military Strength + add = { + value = 1 + subtract = { + value = scope:impress_check.max_military_strength # Intended for recipient to use max, to avoid having vassalizations become too easy for weakened realms + divide = { value = current_military_strength min = 1 } + } + multiply = 20 + ceiling = yes + } + #Vassal Opinion + if = { + limit = { + number_of_powerful_vassals >= 1 + } + add = { + value = 0 + every_powerful_vassal = { + if = { + limit = { + save_temporary_opinion_value_as = { + name = vassal_opinion + target = prev + } + } + add = scope:vassal_opinion + } + } + + if = { + limit = { + number_of_powerful_vassals > 0 + } + divide = number_of_powerful_vassals + } + else = { + divide = 5 + } + + divide = 5 + } + } + + #MINOR + #Friend modifier. + if = { + limit = { + scope:impress_check = { + has_relation_friend = root + NOT = { has_relation_best_friend = root } + } + } + add = 10 + } + #Best Friend modifier. + if = { + limit = { + scope:impress_check = { + has_relation_best_friend = root + } + } + add = 20 + } + #Lover modifier. + if = { + limit = { + scope:impress_check = { + has_relation_lover = root + NOT = { has_relation_soulmate = root } + } + } + add = 10 + } + #Soulmate modifier. + if = { + limit = { + scope:impress_check = { + has_relation_soulmate = root + } + } + add = 20 + } + #Rivalry modifier. + if = { + limit = { + scope:impress_check = { + has_relation_rival = root + NOT = { has_relation_nemesis = root } + } + } + add = -100 + } + #Nemesis modifier. + if = { + limit = { + scope:impress_check = { + has_relation_nemesis = root + } + } + add = -1000 + } + #Same Dynasty modifier. + if = { + limit = { + scope:impress_check = { + dynasty = root.dynasty + } + } + add = 5 + } + # Same language + if = { + limit = { + root = { + knows_language_of_culture = scope:impress_check.culture + } + } + add = 5 + } + # Iberian Struggle, less likely for outsiders to vassalize inside + if = { + limit = { + root = { + NOT = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + scope:impress_check = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + add = -35 + } + #Ageism modifier vs kids. + if = { + limit = { + root = { + age < 12 + } + scope:impress_check = { + age > 16 + } + } + add = -5 + } + #Illegitimacy modifier. + if = { + limit = { + OR = { + AND = { + root = { + has_trait = bastard + } + scope:impress_check = { + faith = { NOT = { has_doctrine = doctrine_bastardry_none } } + } + } + has_trait = denounced + has_trait = disinherited + } + } + add = -10 + } + #Claimant modifier. + if = { + limit = { + root.primary_title = { + scope:impress_check = { + has_claim_on = prev + } + } + } + add = -20 + } + # Ambitious + if = { + limit = { + scope:impress_check = { + has_trait = ambitious + } + } + add = -20 + } + # Paranoid + if = { + limit = { + scope:impress_check = { + has_trait = paranoid + } + } + add = -20 + } + # Arrogant + if = { + limit = { + scope:impress_check = { + has_trait = arrogant + } + } + add = -20 + } + # Fickle + if = { + limit = { + scope:impress_check = { + has_trait = fickle + } + } + add = -10 + } + # Stubborn + if = { + limit = { + scope:impress_check = { + has_trait = stubborn + } + } + add = -10 + } + # Trusting + if = { + limit = { + scope:impress_check = { + has_trait = trusting + } + } + add = 5 + } + # Content + if = { + limit = { + scope:impress_check = { + has_trait = content + } + } + add = 5 + } + # OPINION INFLUENCE + if = { + limit = { + scope:impress_check = { + has_dread_level_towards = { + target = root + level = 1 + } + } + } + add = { + value = 10 + if = { + limit = { + root = { + exists = root.dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + } + multiply = 2 + } + } + } + if = { + limit = { + scope:impress_check = { + has_dread_level_towards = { + target = prev + level = 2 + } + } + } + add = { + value = 20 + if = { + limit = { + exists = dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 + } + } + multiply = 2 + } + } + } + + if = { # DIPLOMATIC COURT GRANDEUR BONUS + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + has_court_type = court_diplomatic + court_grandeur_current_level >= 1 + } + add = { + value = court_grandeur_current + if = { + limit = { # Reduce the bonus if you are below your expected level + court_grandeur_current_level < court_grandeur_minimum_expected_level + } + multiply = 0.15 + } + else = { + multiply = 0.3 + } + } + } + + # INSPECTION BONUSES + if = { + limit = { + scope:impress_check = { + has_variable_list = lesser_inspection_bonus + is_target_in_variable_list = { + name = lesser_inspection_bonus + target = prev + } + } + } + add = 5 + } + if = { + limit = { + scope:impress_check = { + has_variable_list = inspection_bonus + is_target_in_variable_list = { + name = inspection_bonus + target = prev + } + } + } + add = 10 + } + if = { + limit = { + scope:impress_check = { + has_variable_list = inspection_reward + is_target_in_variable_list = { + name = inspection_reward + target = prev + } + } + } + add = 10 + } + if = { + limit = { + has_character_modifier = inspection_reward_focused_vassal_acceptance + } + add = 10 + } + + # LOW LEGITIMACY + if = { + limit = { + has_legitimacy_flag = reduced_vassalization_acceptance + } + add = -25 + } + if = { + limit = { + has_legitimacy_flag = very_reduced_vassalization_acceptance + } + add = -50 + } + if = { + limit = { + has_legitimacy_flag = massively_reduced_vassalization_acceptance + } + add = -75 + } + # HIGH LEGITIMACY + if = { + limit = { + has_legitimacy_flag = increased_vassalization_acceptance + } + add = 25 + } + if = { + limit = { + has_legitimacy_flag = very_increased_vassalization_acceptance + } + add = 50 + } + if = { + limit = { + has_legitimacy_flag = extra_increased_vassalization_acceptance + } + add = 75 + } + + #HISTORICALLY ADMIN PEOPLES WANT TO BE ADMIN + if = { + limit = { + government_has_flag = government_is_administrative + scope:impress_check = { + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:han + any_parent_culture_or_above = { + this = culture:han + } + } + } + } + } + + add = 30 + } + + # AI-only weights, keep the pope from vassalizing too fast + if = { + limit = { + exists = faith:catholic.religious_head + faith:catholic.religious_head = root + root = { is_ai = yes } + } + add = -50 + } + + if = { + limit = { + scope:actor = { + has_variable = severed_head_vassalization + var:severed_head_vassalization = { + this = scope:impress_check + } + } + } + add = 200 + desc = COWED_BY_SEVERED_HEAD_MODIFIER + } + + #Mandala Tributaries should not want to be vassals + if = { + limit = { + government_has_flag = government_is_mandala + scope:impress_check = { is_tributary_of = scope:actor } + } + add = -35 + } + + if = { + limit = { + government_has_flag = government_is_mandala + scope:impress_check = { government_has_flag = government_is_mandala } + } + + add = -25 + } + + #Your Radiance + if = { + limit = { + has_unruined_mandala_capital_trigger = yes + } + add = mandala_radiance_value + } +} + +base_wedding_cost = { + # Base cost + value = 25 + if = { + limit = { + highest_held_title_tier >= tier_duchy + } + add = 25 + } + if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + add = 75 + } + if = { + limit = { + highest_held_title_tier >= tier_empire + } + add = 75 + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } +} + +#This is only to be used in the arrange marriage interaction window +ui_avg_wedding_cost = { + value = 0 + # Base Cost + add = { + value = root.base_wedding_cost + desc = WEDDING_BASE_COST + # Scale by Era + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + # OPTIONS + add = { # Entertainment + add = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Divide by the total number of option levels so we get an average option cost + divide = 3 + # Scale option costs by era + multiply = activity_cost_scale_by_era + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + add = { # Food + value = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Scale option costs by era + multiply = activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + add = { # Decoration + value = { # Calculate the average of the three option costs + value = 0 + add = 40 # Bad Option Cost + add = 120 # Normal Option Cost + add = 360 # Good Option Cost + # Scale option costs by era + multiply = activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } +} + +base_bloody_wedding_cost = { + # Base cost + value = base_wedding_cost + multiply = 2.5 + subtract = base_wedding_cost +} + +real_wedding_cost_actor_scope = { + value = { + add = { + value = scope:actor.base_wedding_cost + desc = WEDDING_BASE_COST + } + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + # If there's a host already, scope into them. + if = { + limit = { exists = scope:actor } + # Dynasty Legacies. + if = { + limit = { + scope:actor.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + } + # Some people get one free. + if = { + limit = { + scope:actor = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + } + multiply = 0 + } + } + } +} + +ai_wedding_promise_gold_actor = { + # Base Cost + add = { + value = scope:actor.real_wedding_cost_actor_scope + } + + # OPTIONS + add = { # Entertainment + value = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Scale option costs by era + multiply = scope:actor.activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + } + add = { # Food + value = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Scale option costs by era + multiply = scope:actor.activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + } + add = { # Decoration + value = { # Calculate the average of the three option costs + value = 0 + add = 40 # Bad Option Cost + add = 120 # Normal Option Cost + add = 360 # Good Option Cost + # Scale option costs by era + multiply = scope:actor.activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + } + + if = { + limit = { exists = scope:actor } + # Dynasty Legacies. + if = { + limit = { + scope:actor.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + } + # Some people get one free. + if = { + limit = { + scope:actor = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + } + multiply = 0 + } + } +} + +real_wedding_cost_root_scope = { + value = { + add = { + value = base_wedding_cost + desc = WEDDING_BASE_COST + } + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + # If there's a host already, scope into them. + if = { + limit = { exists = this } + # Dynasty Legacies. + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + } + # Some people get one free. + if = { + limit = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + multiply = 0 + } + } + } +} + +real_wedding_cost_root_scope_plus_50 = { + value = { + add = { + value = base_wedding_cost + desc = WEDDING_BASE_COST + } + add = 50 + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + # If there's a host already, scope into them. + if = { + limit = { exists = this } + # Dynasty Legacies. + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + } + # Some people get one free. + if = { + limit = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + multiply = 0 + } + } + } +} + +marriage_recieve_proposal_cooldown = { + value = 0 + if = { + limit = { + is_ai = yes + scope:recipient ?= { is_ai = no } + } + add = 0.5 + } +} + +came_to_my_wedding_opinion_value_low = { + # Keep synced with came_to_my_wedding_opinion uses + value = 5 +} + +came_to_my_wedding_opinion_value_medium = { + # Keep synced with came_to_my_wedding_opinion uses + value = 10 +} + +came_to_my_wedding_opinion_value_high = { + # Keep synced with came_to_my_wedding_opinion uses + value = 15 +} + +number_of_current_and_former_spouses = { + value = 0 + every_spouse = { + add = 1 + } + every_former_spouse = { + add = 1 + } + every_memory = { + memory_type = spouse_died + add = 1 + } +} + +wedding_ceremony_phase_duration = { + value = 2 + if = { + limit = { has_multiple_players = yes } + add = 2 + } +} + +dolt_stewardship_adjusted_difficulty_value = { + value = 24 + subtract = scope:dolt.stewardship +} + +break_betrothal_prestige_cost = { + value = 1 + every_close_family_member = { + limit = { + court_owner = scope:attacker + is_betrothed = yes + betrothed = { + court_owner = scope:defender + is_close_family_of = scope:defender + } + } + add = 1 + } +} diff --git a/N3OW/common/scripted_triggers/00_diarchy_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_diarchy_scripted_triggers.txt new file mode 100644 index 00000000..6a385b11 --- /dev/null +++ b/N3OW/common/scripted_triggers/00_diarchy_scripted_triggers.txt @@ -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 + } +} diff --git a/N3OW/common/scripted_triggers/00_elective_triggers.txt b/N3OW/common/scripted_triggers/00_elective_triggers.txt new file mode 100644 index 00000000..2a57a888 --- /dev/null +++ b/N3OW/common/scripted_triggers/00_elective_triggers.txt @@ -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 + } +} diff --git a/N3OW/common/scripted_triggers/00_laamp_triggers.txt b/N3OW/common/scripted_triggers/00_laamp_triggers.txt new file mode 100644 index 00000000..896a9962 --- /dev/null +++ b/N3OW/common/scripted_triggers/00_laamp_triggers.txt @@ -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 = { } + } +} diff --git a/N3OW/common/scripted_triggers/03_fp2_scripted_triggers.txt b/N3OW/common/scripted_triggers/03_fp2_scripted_triggers.txt new file mode 100644 index 00000000..246be199 --- /dev/null +++ b/N3OW/common/scripted_triggers/03_fp2_scripted_triggers.txt @@ -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 } + } +} diff --git a/N3OW/common/scripted_triggers/07_frankokratia_triggers.txt b/N3OW/common/scripted_triggers/07_frankokratia_triggers.txt new file mode 100644 index 00000000..4a0078c7 --- /dev/null +++ b/N3OW/common/scripted_triggers/07_frankokratia_triggers.txt @@ -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 + } +}