diff --git a/common/scripted_triggers/00_ai_value_triggers.txt b/common/scripted_triggers/00_ai_value_triggers.txt index a310a0372..bd9319d86 100644 --- a/common/scripted_triggers/00_ai_value_triggers.txt +++ b/common/scripted_triggers/00_ai_value_triggers.txt @@ -29,11 +29,11 @@ ai_has_pious_builder_personality = { } #Or our Devaraja decrees it AND = { + overlord ?= { has_realm_law_flag = subjects_appear_more_pious } OR = { is_tributary = yes is_independent_ruler = no } - overlord ?= { has_realm_law_flag = subjects_appear_more_pious } } #Weight the AI according to their Aspect house ?= { has_house_aspiration_parameter = aspect_of_serenity } @@ -53,25 +53,6 @@ ai_has_pious_builder_personality = { ai_has_warlike_personality = { OR = { - vassal_contract_has_flag = admin_ai_is_warlike # Admin vassals with the "Frontier" administration consider it their job to expand - house ?= { # The unity decision "Organize House Members for War" forces AI house members to adopt this stance - has_house_modifier = unity_house_organized_for_war_modifier - } - AND = { # They are Detractors during the FP3 Struggle in the Unrest Phase - any_character_struggle = { - trigger_if = { - limit = { is_struggle_type = persian_struggle } - is_struggle_phase = struggle_persia_phase_unrest - } - trigger_else = { always = no } - } - has_trait = fp3_struggle_detractor - } - AND = { # Nomads are not 'unpredictable', they are Warlike instead - government_has_flag = government_is_nomadic - ai_has_cautious_personality = no - economical_ai_guts_trigger = no - } AND = { ai_boldness > 0 ai_greed >= 0 @@ -117,11 +98,11 @@ ai_has_warlike_personality = { has_variable = imperial_expedition_charged #Or our Devaraja decrees it AND = { + overlord ?= { has_realm_law_flag = subjects_appear_more_warlike } OR = { is_tributary = yes is_independent_ruler = no } - overlord ?= { has_realm_law_flag = subjects_appear_more_warlike } } #Weight the AI according to their Aspect house ?= { has_house_aspiration_parameter = aspect_of_destruction } @@ -170,6 +151,7 @@ ai_has_cautious_personality = { } } AND = { # They are Detractors during the FP3 Struggle in the Unrest Phase + has_trait = fp3_struggle_detractor any_character_struggle = { trigger_if = { limit = { is_struggle_type = persian_struggle } @@ -177,7 +159,6 @@ ai_has_cautious_personality = { } trigger_else = { always = no } } - has_trait = fp3_struggle_detractor } vassal_contract_has_flag = admin_ai_is_warlike vassal_contract_has_flag = admin_ai_is_builder @@ -199,11 +180,11 @@ ai_has_economical_boom_personality = { } #Or our Devaraja decrees it AND = { + overlord ?= { has_realm_law_flag = subjects_appear_more_economical } OR = { is_tributary = yes is_independent_ruler = no } - overlord ?= { has_realm_law_flag = subjects_appear_more_economical } } #Weight the AI according to their Aspect house ?= { has_house_aspiration_parameter = aspect_of_creation } @@ -270,7 +251,7 @@ economical_ai_guts_trigger = { } ai_wants_low_unity = { - government_has_flag = government_is_clan + government_has_flag = government_uses_house_unity # To actively decrease Unity, the AI needs the following personality OR = { AND = { @@ -288,7 +269,7 @@ ai_wants_low_unity = { } ai_wants_high_unity = { - government_has_flag = government_is_clan + government_has_flag = government_uses_house_unity # We'll make sure that the AI only wants to actively increase Unity if they have a matching personality OR = { AND = { @@ -333,6 +314,7 @@ ai_should_get_conqueror_bonuses = { } ai_should_get_extreme_conqueror_bonuses = { + is_alive = yes has_variable = conqueror has_character_modifier = ai_extreme_conqueror_modifier } @@ -346,21 +328,23 @@ ai_should_focus_on_building_in_their_capital = { exists = culture OR = { capital_county.title_province.free_building_slots > 0 - AND = { - culture = { has_innovation = innovation_ledger } - capital_county.title_province.combined_building_level <= 4 - } - AND = { - culture = { has_innovation = innovation_baliffs } - capital_county.title_province.combined_building_level <= 6 - } - AND = { - culture = { has_innovation = innovation_guilds } - capital_county.title_province.combined_building_level <= 9 - } - AND = { - culture = { has_innovation = innovation_cranes } + # We check the most advanced innovation first, as it allows the most building levels + trigger_if = { + limit = { culture = { has_innovation = innovation_cranes } } capital_county.title_province.combined_building_level <= 12 } + trigger_else_if = { + limit = { culture = { has_innovation = innovation_guilds } } + capital_county.title_province.combined_building_level <= 9 + } + trigger_else_if = { + limit = { culture = { has_innovation = innovation_baliffs } } + capital_county.title_province.combined_building_level <= 6 + } + trigger_else_if = { + limit = { culture = { has_innovation = innovation_ledger } } + capital_county.title_province.combined_building_level <= 4 + } + trigger_else = { always = no } } } diff --git a/common/scripted_triggers/00_available_for_events_triggers.txt b/common/scripted_triggers/00_available_for_events_triggers.txt index 17d2f648e..bed69e84f 100644 --- a/common/scripted_triggers/00_available_for_events_triggers.txt +++ b/common/scripted_triggers/00_available_for_events_triggers.txt @@ -141,6 +141,10 @@ is_available = { text = busy_in_mandala_succession NOT = { has_variable = busy_in_mandala_succession } } + custom_tooltip = { + text = busy_managing_trade_opportunity + NOT = { has_variable = partner_contract } + } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -268,6 +272,15 @@ is_available_ai = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } + # Variable set on Mandala succession + custom_tooltip = { + text = busy_in_mandala_succession + NOT = { has_variable = busy_in_mandala_succession } + } + custom_tooltip = { + text = busy_managing_trade_opportunity + NOT = { has_variable = partner_contract } + } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -888,6 +901,11 @@ is_landless_nomad = { has_domicile = yes } +# Checks if a character is a herder +is_herder = { + government_has_flag = government_is_herder +} + # This trigger checks if a character is a landless adventurer is_landless_adventurer = { OR = { @@ -896,33 +914,30 @@ is_landless_adventurer = { } } -# This trigger checks if a character is a governor in an admin realm (implying they are landed) -is_governor = { +# This trigger checks if a character is a landless merchant +is_landless_merchant = { custom_description = { - text = is_governor + text = is_merchant subject = this - government_has_mechanic = administrative - is_landed = yes - top_liege != this - OR = { - highest_held_title_tier >= main_administrative_tier - highest_held_title_tier >= min_title_maa_tier - } - tgp_is_ceremonial_liege_trigger = no - } - NOT = { - government_has_flag = government_is_feudal + government_has_flag = government_is_merchant + is_landed = no + has_domicile = yes } } + +# This trigger checks if a character is a landless republican +is_landless_republican = { + government_has_flag = government_is_republic + is_landed = no + has_domicile = yes +} + is_governor_or_admin_count = { government_has_mechanic = administrative is_landed = yes top_liege != this highest_held_title_tier >= tier_county - tgp_is_ceremonial_liege_trigger = no - NOT = { - government_has_flag = government_is_feudal - } + is_ceremonial_liege = no } is_governor_or_landless_admin = { @@ -937,10 +952,26 @@ is_governor_or_landless_admin = { is_landless_administrative = { government_has_mechanic = administrative is_landed = no + has_domicile = yes + is_house_head = yes +} + +# Checks if a character is a landless house_head within a republic realm +is_landless_republic = { + government_has_flag = government_is_republic + is_landed = no is_house_head = yes has_domicile = yes } +is_republic_ruler_or_landless_republic = { + government_has_flag = government_is_republic + OR = { + is_landed = yes + is_landless_republic = yes + } +} + # Checks if a character is a landless house_head within a feudal realm is_landless_soryo = { government_has_flag = government_is_japan_feudal @@ -960,8 +991,6 @@ is_landed_or_landless_administrative = { is_landed_or_landless_administrative_or_theocratic = { OR = { is_landed = yes - is_landless_administrative = yes - tgp_is_any_minister = yes # ministers should receive admin events and activity even if they are not house head AND = { is_ruler = yes OR = { @@ -969,6 +998,9 @@ is_landed_or_landless_administrative_or_theocratic = { government_has_flag = government_is_feudal } } + is_landless_administrative = yes + is_landless_republic = yes + tgp_is_any_minister = yes # ministers should receive admin events and activity even if they are not house head } } @@ -991,7 +1023,6 @@ is_playable_character = { highest_held_title_tier > tier_barony } tgp_is_any_minister = yes # To keep ministers playable, regardless of having a noble family title or not - has_variable = laamp_transition } } diff --git a/common/scripted_triggers/00_building_requirement_triggers.txt b/common/scripted_triggers/00_building_requirement_triggers.txt index 1c52b2bac..315d10b2f 100644 --- a/common/scripted_triggers/00_building_requirement_triggers.txt +++ b/common/scripted_triggers/00_building_requirement_triggers.txt @@ -4,11 +4,7 @@ building_requirement_tribal = { scope:holder ?= { - OR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_nomadic - government_has_flag = government_is_wanua - } + government_has_flag = government_is_tribal } } @@ -18,6 +14,14 @@ building_requirement_wanua = { } } +building_requirement_non_tribal = { + NOT = { + scope:holder ?= { + government_has_flag = government_is_tribal + } + } +} + building_requirement_tribal_holding_in_county = { NOT = { county = { @@ -129,41 +133,6 @@ building_requirement_castle_city_church = { } } -building_requirement_castle_city_church_temple_citadel_tribe = { - trigger_if = { - limit = { has_holding_type = castle_holding } - has_building_or_higher = castle_$LEVEL$ - } - trigger_else_if = { - limit = { has_holding_type = city_holding } - has_building_or_higher = city_$LEVEL$ - } - trigger_else_if = { - limit = { has_holding_type = church_holding } - has_building_or_higher = temple_$LEVEL$ - } - trigger_else_if = { - limit = { has_holding_type = temple_citadel_holding } - has_building_or_higher = temple_citadel_$LEVEL$ - } - trigger_else_if = { - limit = { has_holding_type = tribal_holding } - trigger_if = { - limit = { - $LEVEL$ > 1 - } - has_building_or_higher = tribe_02 - } - trigger_else = { has_building_or_higher = tribe_01 } - } - trigger_else = { - custom_description = { - text = "building_requirement_castle_city_church_tribe_failed" - always = no - } - } -} - ###################################################################### # Special ###################################################################### @@ -191,167 +160,6 @@ building_university_requirement = { # Terrain ###################################################################### -building_common_tradeport_requirement_terrain = { - OR = { - is_coastal = yes - is_riverside_province = yes - } -} - -building_pastures_requirement_terrain = { - OR = { - terrain = farmlands - terrain = plains - terrain = steppe - terrain = desert - terrain = drylands - terrain = oasis - terrain = mountains - terrain = desert_mountains - terrain = hills - terrain = tells - terrain = floodplains - AND = { - terrain = jungle - NOT = { geographical_region = world_innovation_elephants } - } - } -} - -building_hunting_grounds_requirement_terrain = { - OR = { - terrain = plains - terrain = drylands - terrain = steppe - terrain = hills - terrain = tells - terrain = taiga - terrain = forest - terrain = jungle - terrain = wetlands - } -} - -building_orchards_requirement_terrain = { - OR = { - terrain = floodplains - terrain = oasis - has_building_or_higher = qanats_05 - culture = { - has_cultural_parameter = vegetarian_fruit_orchard_allowed - } - } -} - -building_farm_estates_requirement_terrain = { - OR = { - terrain = farmlands - AND = { - OR = { - terrain = hills - terrain = jungle - } - county.culture = { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle } - } - } -} - -building_tell_mines_requirement_terrain = { - terrain = tells -} -building_military_camps_requirement_terrain = { - #OR = { # All Terrains - # terrain = farmlands - # terrain = plains - # terrain = drylands - # terrain = desert - # terrain = oasis - # terrain = floodplains - # terrain = steppe - # terrain = mountains - # terrain = desert_mountains - # terrain = wetlands - # terrain = forest - # terrain = taiga - # terrain = jungle - # terrain = hills - #} -} - -building_regimental_grounds_requirement_terrain = { - OR = { - terrain = floodplains - terrain = farmlands - } -} - -building_ramparts_requirement_terrain = { - OR = { - terrain = taiga - terrain = forest - terrain = jungle - } -} - -building_curtain_walls_requirement_terrain = { - OR = { - terrain = farmlands - terrain = plains - terrain = wetlands - terrain = floodplains - } -} - -building_watchtowers_requirement_terrain = { - OR = { - terrain = desert - terrain = drylands - terrain = oasis - terrain = steppe - } -} - -building_paddy_fields_requirement_terrain = { - custom_tooltip = { - text = building_paddy_fields_requirement_terrain_tt - OR = { - terrain = terraced_hills - AND = { - terrain = floodplains - OR = { - geographical_region = graphical_east_asia - geographical_region = custom_viet_lands - } - } - AND = { - terrain = wetlands - county.culture = { has_cultural_parameter = champa_rice_wet_land_paddies } - } - AND = { - OR = { - terrain = hills - terrain = jungle - } - county.culture = { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle } - } - } - } -} - -building_potato_fields_requirement_terrain = { - custom_tooltip = { - text = building_potato_fields_requirement_terrain_tt - OR = { - terrain = farmlands - terrain = hills - terrain = tells - terrain = plains - terrain = steppe - terrain = mountains - } - } -} - building_cereal_fields_requirement_terrain = { OR = { terrain = farmlands @@ -370,239 +178,9 @@ building_cereal_fields_requirement_terrain = { has_county_modifier = dodekapolis_modifier } } - - has_building_or_higher = qanats_05 } } -building_outposts_requirement_terrain = { - OR = { - terrain = wetlands - terrain = taiga - terrain = forest - terrain = jungle - } -} - -building_barracks_requirement_terrain = { - #OR = { - # terrain = farmlands - # terrain = plains - # terrain = drylands - # terrain = floodplains # new - # terrain = hills - # terrain = mountains - # terrain = forest - # terrain = taiga - # terrain = jungle - # terrain = wetlands - # terrain = steppe - #} -} - -building_camel_farms_requirement_terrain = { - geographical_region = world_innovation_camels # new - OR = { - terrain = desert - terrain = desert_mountains - terrain = oasis - terrain = floodplains - terrain = drylands # new - } -} - -building_stables_requirement_terrain = { - # All terrains -} - -building_smiths_requirement_terrain = { - # All terrains -} - -building_workshops_requirement_terrain = { - # All terrains -} - -building_logging_camps_requirement_terrain = { - OR = { - terrain = taiga - terrain = forest - terrain = jungle - } -} - -building_peat_quarries_requirement_terrain = { - terrain = wetlands -} - -building_hill_farms_requirement_terrain = { - OR = { - terrain = hills - terrain = tells - terrain = terraced_hills - } -} - -building_elephant_pens_requirement_terrain = { - terrain = jungle - OR = { - geographical_region = world_innovation_elephants - culture = { has_cultural_parameter = elephant_pens_building_bonuses } - } -} - -building_horse_pastures_requirement_terrain = { - OR = { - terrain = steppe - geographical_region = world_steppe_east - culture = { has_cultural_parameter = unlock_horse_pastures_building } - } -} - -building_plantations_requirement_terrain = { - OR = { - terrain = drylands - terrain = desert - terrain = oasis - } -} - -building_quarries_requirement_terrain = { - OR = { - terrain = mountains - terrain = desert_mountains - culture = { has_cultural_parameter = can_build_quarries_everywhere } - } -} - -building_warrior_lodges_requirement_terrain = { - OR = { - AND = { - OR = { - terrain = mountains - terrain = desert_mountains - terrain = hills - terrain = tells - } - NOT = { geographical_region = world_horse_buildings_in_hills_and_mountains } - } - culture = { has_cultural_parameter = warrior_lodges_lift_restrictions } - } -} - -building_hillside_grazing_requirement_terrain = { - OR = { - terrain = mountains - terrain = desert_mountains - terrain = hills - terrain = tells - } - geographical_region = world_horse_buildings_in_hills_and_mountains -} - -building_wind_furnace_requirement_terrain = { - geographical_region = world_india - OR = { - is_coastal = yes - AND = { - scope:holder.top_liege = { - any_realm_county = { - any_county_province = { - has_building_or_higher = konasamudram_mines_01 - } - } - } - duchy = { - any_de_jure_county = { - any_county_province = { - has_building_or_higher = konasamudram_mines_01 - } - } - } - } - - } - - scope:holder.culture = { has_innovation = innovation_wootz_steel } -} - -building_hill_forts_requirement_terrain = { - OR = { - terrain = mountains - terrain = desert_mountains - terrain = hills - terrain = tells - terrain = terraced_hills - } -} - -building_windmills_requirement_terrain = { - county ?= { - any_county_province = { - OR = { - terrain = farmlands - terrain = plains - terrain = hills - terrain = tells - is_coastal = yes - } - } - } -} - -building_watermills_requirement_terrain = { - county ?= { - any_county_province = { - OR = { - terrain = mountains - terrain = wetlands - terrain = forest - terrain = taiga - terrain = jungle - terrain = terraced_hills - is_riverside_province = yes - } - } - } -} - -building_caravanserai_requirement_terrain = { - county ?= { - any_county_province = { - OR = { - terrain = drylands - terrain = desert - terrain = oasis - terrain = floodplains - terrain = steppe - terrain = desert_mountains - AND = { - geographical_region = world_europe_west_iberia - has_global_variable = fp2_struggle_conciliation_ending - } - } - } - } -} - -building_qanats_requirement_terrain = { - county ?= { - culture = { has_cultural_parameter = unlocks_qanat_building } - county_has_province_with_terrain = { - terrain = hills - terrain = tells - terrain = mountains - terrain = desert_mountains - terrain = desert - terrain = drylands - } - } -} - -building_hospices_requirement_terrain = { - -} - has_any_special_mine_trigger = { has_building_with_flag = special_mine #OR = { @@ -638,6 +216,21 @@ has_any_special_mine_trigger = { #} } +# County scope. Pearl banks where fisheries can build Pearl Fisheries. +pearl_fishing_banks_county_trigger = { + has_county_modifier = pearl_fishing_banks_modifier +} + +# County scope. Walrus grounds where fish and furs districts can build Walrus Hunting Camps. +walrus_ivory_county_trigger = { + has_county_modifier = walrus_ivory_modifier +} + +# County scope. Naphta springs where resource districts can build Naphta Pits. +naphta_county_trigger = { + has_county_modifier = naphta_modifier +} + ###################################################################### # Baronies that cannot have a holding (intended for Sahara) ###################################################################### @@ -707,7 +300,6 @@ has_any_building_of_level_trigger = { has_building = orchards_$BUILDING_LEVEL$ has_building = farm_estates_$BUILDING_LEVEL$ has_building = regimental_grounds_$BUILDING_LEVEL$ - has_building = monastic_schools_$BUILDING_LEVEL$ } } @@ -765,87 +357,13 @@ has_lesser_building_trigger = { trigger_else = { always = no } # Must already be highest tier possible } -# can this building be added? -add_random_building_trigger = { - building_$BUILDING$_requirement_terrain = yes # terrain fits building type - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = $BUILDING$_01 - NOT = { - has_lesser_building_trigger = { COMPARE = $BUILDING$ } - } - } - trigger_else = { - NOT = { has_building_or_higher = $BUILDING$_01 } - } -} - -# Innovation and holding level triggers for most economic buildings -generic_economic_building_innovation_trigger = { - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_crop_rotation } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_manorialism } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_guilds } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_cranes } - } -} - -# Innovation and holding level triggers for most fortification buildings -generic_fortification_building_innovations_trigger = { - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_motte } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_battlements } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_hoardings } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_machicolations } - } -} - -# Innovation and holding level triggers for most recruitment buildings -generic_recruitment_building_innovations_trigger = { - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_barracks } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_burhs } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_castle_baileys } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_royal_armory } +###################################################################### +# Mint unlock trigger. Province scope. +###################################################################### +mint_building_unlock_early_medieval_trigger = { + custom_description = { + text = mint_building_unlock_early_medieval_trigger_desc + culture = { has_innovation = innovation_currency_02 } } } @@ -971,62 +489,12 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin } } -building_monastic_schools_holding_level_requirement_trigger = { - trigger_if = { - limit = { scope:holder.rite = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } - OR = { - has_building_or_higher = castle_$LEVEL$ - has_building_or_higher = city_$LEVEL$ - has_building_or_higher = temple_$LEVEL$ - has_building_or_higher = temple_citadel_$LEVEL$ - } - } - trigger_else = { - has_building_or_higher = temple_$LEVEL$ - } -} - -building_murex_farm_requirement_terrain = { - is_county_capital = yes +building_murex_fisheries_requirement_trigger = { is_coastal = yes geographical_region = mediteranean_coast - NOR = { - this.barony = title:b_salmydessus - this.barony = title:b_chelai - } } -building_waterworks_requirement_terrain = { - is_county_capital = yes - NOR = { - terrain = mountains - terrain = desert_mountains - } - scope:holder.culture = { has_cultural_parameter = unlocks_waterworks_buildings } -} - -building_spice_plantation_requirement_terrain = { - is_county_capital = yes - - # cloves, nutmeg: present on Muluku Islands - # cinnamomum verum: India, Sri Lanka, Bangladesh and Myanmar - # cinnamomum malabathrum: Eastern Himalayas & Western Ghats - OR = { - geographical_region = world_asia_southeast_mainland - geographical_region = world_asia_borneo - geographical_region = world_asia_sulawesi_maluku - geographical_region = world_asia_indonesia - geographical_region = world_india - } - OR = { - terrain = jungle - terrain = farmlands - terrain = terraced_hills - terrain = plains - } -} - -building_examination_hall_requirement_terrain = { +building_examination_hall_requirement = { is_county_capital = yes scope:holder = { @@ -1034,97 +502,249 @@ building_examination_hall_requirement_terrain = { } } -building_breweries_requirement = { - trigger_if = { - limit = { - has_building_or_higher = temple_$NUMBER$ +building_manor_tower_requirement = { + OR = { + has_holding_type = castle_holding + is_county_capital = yes + } +} + +# Keeps the Governance Quarter slot free for the Construct Great Barracks great project +building_requirement_no_great_barracks_project = { + custom_tooltip = { + text = great_project_type_construct_great_barracks_reserves_slot + NOT = { + any_great_project_in_province = { + great_project_type = construct_great_barracks + OR = { + great_project_construction_phase_is = planned + great_project_construction_phase_is = in_progress + } + } } + } +} + +# Gunpowder buildings; either innovation unlocks them +building_gunpowder_trigger = { + culture = { OR = { - religion = religion:catholic_religion - rite = { rite_has_parameter = allows_brewery } + has_innovation = innovation_gunpowder + has_innovation = innovation_fire_medicine } } - trigger_else = { - building_requirement_castle_city_church = { LEVEL = $NUMBER$ } - culture = { has_cultural_parameter = allows_brewery } - } } -#building_powder_magazine_requirement = { -# scope:build_owner.culture = { -# OR = { -# has_innovation = innovation_gunpowder -# has_innovation = innovation_fire_medicine -# } -# } -#} - -building_leclerc_dyeworks_requirement_terrain = { - is_county_capital = yes - OR = { - this.barony = title:b_paris - this.barony = title:b_toulouse - this.barony = title:b_bordeaux - this.barony = title:b_saumur - this.barony = title:b_marseille - this.barony = title:b_lyon - this.barony = title:b_roanne - } -} - -building_doggerland_ivory_deposits_requirement_terrain = { - OR = { - this.barony = title:b_favrsted - this.barony = title:b_fljot - this.barony = title:b_akranes - this.barony = title:b_melar - this.barony = title:b_hestr - this.barony = title:b_storo - this.barony = title:b_flekkevinger - this.barony = title:b_ydreoer - this.barony = title:b_lileo - } -} - -building_vineyards_requirement = { - AND = { - exists = root.culture +###################################################################### +# Duchy capital building trigger +###################################################################### +can_have_duchy_capital_building_trigger = { + county.holder = { trigger_if = { - limit = { exists = root.culture } - root.culture ?= { has_cultural_parameter = allows_vineyards } + limit = { + government_has_flag = government_is_republic + } + capital_county = prev.county + highest_held_title_tier >= tier_duchy } - OR = { - terrain = farmlands - terrain = plains - terrain = hills + trigger_else = { + has_title = prev.duchy } } } -building_communal_settlement_requirement = { - OR = { - AND = { - exists = scope:holder.faith - trigger_if = { - limit = { exists = scope:holder.faith } - scope:holder.faith ?= { has_doctrine_parameter = allows_communal_settlement } - } - } +building_requirement_meat_allowed = { + NOT = { culture = { has_cultural_parameter = vegetarianism_no_meat_buildings } } + NOT = { rite = { rite_has_parameter = meat_forbidden } } +} - AND = { - exists = root.faith - trigger_if = { - limit = { exists = root.faith } - root.faith ?= { has_doctrine_parameter = allows_communal_settlement } - } - } - - AND = { - exists = root.culture - trigger_if = { - limit = { exists = root.culture } - root.culture ?= { has_cultural_parameter = allows_communal_settlement } - } - } +building_requirement_winter_region = { + NOR = { + terrain = desert + terrain = oasis + terrain = drylands + terrain = desert_mountains } -} \ No newline at end of file + OR = { + geographical_region = world_europe_north + geographical_region = world_europe_west + geographical_region = world_europe_east + geographical_region = world_steppe + geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_sakhalin_hokkaido + geographical_region = world_asia_korea + geographical_region = world_asia_north_east + } +} + +building_requirement_pasta_region = { + OR = { + geographical_region = world_africa_north + geographical_region = world_europe_south_italy + } +} + +###################################################################### +# Per-domain building unlock triggers. Province scope, no era fallback. +###################################################################### + +building_farmed_tribal_trigger = { + culture = { has_innovation = innovation_crop_rotation } +} +building_farmed_early_medieval_trigger = { + culture = { has_innovation = innovation_heavy_plow } +} +building_farmed_high_medieval_trigger = { + culture = { has_innovation = innovation_windmills } +} +building_farmed_late_medieval_trigger = { + culture = { has_innovation = innovation_putting_out_system } +} + +building_artisanal_early_medieval_trigger = { + culture = { has_innovation = innovation_craft_ordinances } +} +building_artisanal_high_medieval_trigger = { + culture = { has_innovation = innovation_windmills } +} +building_artisanal_late_medieval_trigger = { + culture = { has_innovation = innovation_putting_out_system } +} + +# Forest goods resource districts +building_forest_early_medieval_trigger = { + culture = { has_innovation = innovation_coppicing } +} +building_forest_high_medieval_trigger = { + culture = { has_innovation = innovation_windmills } +} +building_forest_late_medieval_trigger = { + culture = { has_innovation = innovation_putting_out_system } +} + +# Mineral resource districts +building_mineral_early_medieval_trigger = { + culture = { has_innovation = innovation_prospecting } +} +building_mineral_high_medieval_trigger = { + culture = { has_innovation = innovation_windmills } +} +building_mineral_late_medieval_trigger = { + culture = { has_innovation = innovation_deep_mining } +} + +# Maritime: the Fishery resource district and the Port district +building_maritime_early_medieval_trigger = { + culture = { has_innovation = innovation_armilary_sphere } +} +building_maritime_high_medieval_trigger = { + culture = { has_innovation = innovation_merchant_law } +} +building_maritime_late_medieval_trigger = { + culture = { has_innovation = innovation_pilot_books } +} + +building_rural_early_medieval_trigger = { + culture = { has_innovation = innovation_manorialism } +} +building_rural_high_medieval_trigger = { + culture = { has_innovation = innovation_land_grants } +} +building_rural_late_medieval_trigger = { + culture = { has_innovation = innovation_agronomy } +} + +building_communal_early_medieval_trigger = { + culture = { has_innovation = innovation_prosperity_02 } +} +building_urban_high_medieval_trigger = { + culture = { has_innovation = innovation_prosperity_03 } +} +building_masonry_late_medieval_trigger = { + culture = { has_innovation = innovation_bricks } +} + +building_commerce_early_medieval_trigger = { + culture = { has_innovation = innovation_currency_02 } +} +building_commerce_high_medieval_trigger = { + culture = { has_innovation = innovation_merchant_law } +} +building_commerce_late_medieval_trigger = { + culture = { has_innovation = innovation_currency_04 } +} + +building_administrative_early_medieval_trigger = { + culture = { has_innovation = innovation_baliffs } +} +building_administrative_high_medieval_trigger = { + culture = { has_innovation = innovation_divine_right } +} +building_administrative_late_medieval_trigger = { + culture = { has_innovation = innovation_court_officials } +} + +building_religious_early_medieval_trigger = { + culture = { has_innovation = innovation_monasticism } +} +building_stonework_high_medieval_trigger = { + culture = { has_innovation = innovation_vaulting } +} + +# Fortification districts and castle holdings +building_fortification_tribal_trigger = { + culture = { has_innovation = innovation_motte } +} +building_fortification_early_medieval_trigger = { + culture = { has_innovation = innovation_battlements } +} +building_fortification_high_medieval_trigger = { + culture = { has_innovation = innovation_hoardings } +} +building_fortification_late_medieval_trigger = { + culture = { has_innovation = innovation_machicolations } +} + +# Recruitment: military districts and knights +building_recruitment_tribal_trigger = { + culture = { has_innovation = innovation_barracks } +} +building_recruitment_early_medieval_trigger = { + culture = { has_innovation = innovation_house_soldiers } +} +building_recruitment_late_medieval_trigger = { + culture = { has_innovation = innovation_standing_armies } +} + +building_courtly_tribal_trigger = { + culture = { has_innovation = innovation_plenary_assemblies } +} +building_courtly_early_medieval_trigger = { + culture = { has_innovation = innovation_royal_prerogative } +} +building_courtly_late_medieval_trigger = { + culture = { has_innovation = innovation_ermine_cloaks } +} + +# Settlement primaries +building_settlement_tribal_trigger = { + culture = { has_innovation = innovation_city_planning } +} + +# Holding district primaries, unlocked by culture era instead of innovation +building_holding_early_medieval_trigger = { + culture = { has_cultural_era_or_later = culture_era_early_medieval } +} +building_holding_high_medieval_trigger = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } +} +building_holding_late_medieval_trigger = { + culture = { has_cultural_era_or_later = culture_era_late_medieval } +} + +# Historical special buildings, for the first tier of anything not already standing in 867 +building_monument_tribal_trigger = { + culture = { has_innovation = innovation_prosperity_01 } +} diff --git a/common/scripted_triggers/00_clothing_triggers.txt b/common/scripted_triggers/00_clothing_triggers.txt index 7a5061e8d..a9659ac48 100644 --- a/common/scripted_triggers/00_clothing_triggers.txt +++ b/common/scripted_triggers/00_clothing_triggers.txt @@ -5,29 +5,15 @@ # Character must have a valid reasion to be naked. OR = { has_character_modifier = diplomacy_majesty_4090_no_raiment_modifier # Lunatic event where character goes naked instead of buying new clothes. - has_character_modifier = natural_primitivism_court_naturism_modifier has_character_flag = is_naked # Special flag used in certain events. - rite = { rite_has_parameter = naked_adherents_active } - culture = { has_cultural_parameter = naked_culture_active } - trigger_if = { - limit = { - rite = { rite_has_parameter = naked_priests_active } - } - OR = { - government_has_flag = government_is_theocracy - has_council_position = councillor_court_chaplain - has_trait = devoted - has_trait = zealous - ai_zeal >= 50 - } - } } } natural_primitivism_supports_naturism_trigger = { exists = this OR = { - should_be_naked_trigger = yes + has_character_modifier = diplomacy_majesty_4090_no_raiment_modifier + has_character_flag = is_naked rite = { rite_has_parameter = naked_adherents_active } rite = { rite_has_parameter = naked_priests_active } culture = { has_cultural_parameter = naked_culture_active } @@ -286,7 +272,6 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and exists = this trigger_if = { limit = { exists = involved_activity } - involved_activity = { NOR = { has_activity_type = activity_hunt has_activity_type = activity_pilgrimage @@ -452,6 +437,7 @@ portrait_wear_no_crown_trigger = { # Rulers should be coronated to wear a crown NOT = { coronation_proper_artifact_regalia_trigger = yes } } } + has_character_flag = sold_crown_charmod # No crowns for characters who sold theirs has_character_modifier = vow_of_poverty_modifier # Or for characters with an active Vow of Poverty @@ -563,6 +549,24 @@ asian_variants = { } } +# East and Southeast Asian wardrobes have no curly or afro hair styles of their own +portrait_east_asian_hair_fallback_trigger = { + OR = { + portrait_chinese_clothing_trigger = yes + portrait_japanese_clothing_trigger = yes + portrait_southeast_asian_clothing_trigger = yes + } + NOT = { portrait_papuan_clothing_trigger = yes } +} + +# Diasporic characters in a landless court dress like the culture where the court's domicile is located +# Without a domicile they keep their own fashion +portrait_dresses_like_domicile_locals_trigger = { + $CULTURE_SCOPE$ ?= { has_cultural_parameter = dresses_like_domicile_locals } + court_owner ?= { is_landless_ruler = yes } + exists = court_owner.domicile.domicile_location.culture +} + portrait_shared_clothing_contents_trigger = { trigger_if = { limit = { exists = top_liege.var:adopted_cultural_style } @@ -574,6 +578,12 @@ portrait_shared_clothing_contents_trigger = { has_variable = years_as_varangian is_landed = no } + trigger_else_if = { + limit = { + portrait_dresses_like_domicile_locals_trigger = { CULTURE_SCOPE = $CULTURE_SCOPE$ } + } + court_owner.domicile.domicile_location.culture = { has_clothing_gfx = $CULTURE_FLAG$_clothing_gfx } + } trigger_else = { $CULTURE_SCOPE$ ?= { has_clothing_gfx = $CULTURE_FLAG$_clothing_gfx } } @@ -1515,81 +1525,125 @@ portrait_ainu_clothing_spouse_trigger = { portrait_khitan_clothing_trigger = { #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = scope:culture - CULTURE_FLAG = khitan - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = scope:culture + # CULTURE_FLAG = khitan + #} + always = no } portrait_khitan_clothing_spouse_trigger = { #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = culture - CULTURE_FLAG = khitan - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = khitan + #} + always = no } portrait_dali_clothing_trigger = { #DALI DYNASTY #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = scope:culture - CULTURE_FLAG = dali - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = scope:culture + # CULTURE_FLAG = dali + #} + always = no } portrait_dali_clothing_spouse_trigger = { #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = culture - CULTURE_FLAG = dali - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = dali + #} + always = no } -portrait_uyghur_clothing_trigger = { #UYGHR DYNASTY +portrait_uyghur_clothing_trigger = { #UYGHUR DYNASTY #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = culture - CULTURE_FLAG = uyghur - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = uyghur + #} + always = no } portrait_uyghur_clothing_spouse_trigger = { #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = culture - CULTURE_FLAG = uyghur - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = uyghur + #} + always = no } portrait_tangut_clothing_trigger = { #TANGUT DYNASTY #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = culture - CULTURE_FLAG = tangut - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = tangut + #} + always = no } portrait_tangut_clothing_spouse_trigger = { #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = culture - CULTURE_FLAG = tangut - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = tangut + #} + always = no } portrait_jurchen_clothing_trigger = { #TANGUT DYNASTY #has_cp9_dlc_trigger = yes - portrait_shared_clothing_contents_trigger = { - CULTURE_SCOPE = culture - CULTURE_FLAG = jurchen - } + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = jurchen + #} + always = no } portrait_jurchen_clothing_spouse_trigger = { #has_cp9_dlc_trigger = yes + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = jurchen + #} + always = no +} + +portrait_sogdian_clothing_trigger = { #TANGUT DYNASTY + #has_cp9_dlc_trigger = yes + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = sogdian + #} + always = no +} + +portrait_sogdian_clothing_spouse_trigger = { + #has_cp9_dlc_trigger = yes + #portrait_shared_clothing_contents_trigger = { + # CULTURE_SCOPE = culture + # CULTURE_FLAG = sogdian + #} + always = no +} + +### GDP ### + +portrait_italian_clothing_trigger = { portrait_shared_clothing_contents_trigger = { CULTURE_SCOPE = culture - CULTURE_FLAG = jurchen + CULTURE_FLAG = italian + } +} + +portrait_italian_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = italian } } @@ -1778,6 +1832,10 @@ portrait_commoner_trigger = { has_realm_law = camp_purpose_scholars } government_has_flag = government_is_herder + AND = { # Merchants + government_has_flag = government_is_merchant + company_size_large_or_huge_trigger = no + } } NOR = { portrait_high_nobles_trigger = { @@ -1796,27 +1854,35 @@ portrait_commoner_trigger = { trigger_if = { limit = { exists = this } # To check if this is an actual character NOR = { - primary_spouse ?= { # You have a spouse that is higher than baron, unless Legitimists + primary_spouse ?= { # You have a spouse that is higher than baron, unless Legitimists or large Merchant AND = { highest_held_title_tier > tier_barony - NAND = { + NAND = { # Adventurers government_has_flag = government_is_landless_adventurer has_realm_law = camp_purpose_legitimists } + NAND = { # Merchants + government_has_flag = government_is_merchant + company_size_large_or_huge_trigger = no + } } } - AND = { # You cannot be the courtier of a Legitimist Adventurer + AND = { is_ruler = no - government_has_flag = government_is_landless_adventurer - liege ?= { - has_realm_law = camp_purpose_legitimists + OR = { + AND = { # You cannot be the courtier of a Legitimist Adventurer + government_has_flag = government_is_landless_adventurer + liege ?= { has_realm_law = camp_purpose_legitimists } + } + AND = { # You cannot be the courtier of a larger Merchant company + government_has_flag = government_is_merchant + liege ?= { company_size_large_or_huge_trigger = yes } + } } } has_no_particular_noble_roots_trigger = no # You cannot have noble roots AND = { # Members of Council - liege ?= { - highest_held_title_tier >= tier_duchy - } + liege ?= { highest_held_title_tier >= tier_duchy } OR = { has_council_position = councillor_chancellor has_council_position = councillor_steward @@ -1851,6 +1917,10 @@ portrait_commoner_no_mayors_trigger = { has_realm_law = camp_purpose_scholars } government_has_flag = government_is_herder + AND = { # Merchants + government_has_flag = government_is_merchant + company_size_large_or_huge_trigger = no + } } trigger_if = { limit = { exists = this } # To check if this is an actual character @@ -1859,10 +1929,14 @@ portrait_commoner_no_mayors_trigger = { primary_spouse ?= { AND = { highest_held_title_tier > tier_county - NAND = { + NAND = { # Adventurers government_has_flag = government_is_landless_adventurer has_realm_law = camp_purpose_legitimists } + NAND = { # Merchants + government_has_flag = government_is_merchant + company_size_large_or_huge_trigger = yes + } } } } @@ -1872,7 +1946,7 @@ portrait_commoner_no_mayors_trigger = { has_dlc_feature = royal_court } court_owner = { - amenity_level = { target = court_fashion value < 4 } + amenity_level = { target = court_fashion value < 4 } } } } @@ -1897,9 +1971,13 @@ portrait_low_nobles_trigger = { NOT = { government_has_flag = government_is_japan_feudal } # Japanese bushi class always wear low/war nobility clothing } } - trigger_if = { + trigger_if = { # Adventurers limit = { government_has_flag = government_is_landless_adventurer } - has_realm_law = camp_purpose_legitimists + has_realm_law = camp_purpose_legitimists # Legitimists wear + } + trigger_if = { # Merchants + limit = { government_has_flag = government_is_merchant } + company_size_large_or_huge_trigger = yes } } } @@ -1920,9 +1998,7 @@ portrait_low_nobles_trigger = { portrait_$CULTURE_INPUT$_clothing_trigger = yes } AND = { # Members of Council - liege ?= { - highest_held_title_tier >= tier_duchy - } + liege ?= { highest_held_title_tier >= tier_duchy } OR = { has_council_position = councillor_chancellor has_council_position = councillor_steward @@ -1931,9 +2007,7 @@ portrait_low_nobles_trigger = { } AND = { # Courtiers highest_held_title_tier < tier_county - court_owner ?= { - highest_held_title_tier > tier_duchy - } + court_owner ?= { highest_held_title_tier > tier_duchy } portrait_$CULTURE_INPUT$_clothing_trigger = yes } portrait_mayor_trigger = { # Mayors @@ -1951,9 +2025,17 @@ portrait_low_nobles_trigger = { } portrait_$CULTURE_INPUT$_clothing_trigger = yes } + AND = { # Merchants + government_has_flag = government_is_merchant + OR = { + company_size_large_or_huge_trigger = yes + liege ?= { company_size_large_or_huge_trigger = yes } + } + portrait_$CULTURE_INPUT$_clothing_trigger = yes + } AND = { is_ruler = yes - highest_held_title_tier <= tier_county + highest_held_title_tier < tier_duchy # Japanese bushi class always wear low/war nobility clothing trigger_if = { limit = { government_has_flag = government_is_japan_feudal } @@ -1961,6 +2043,7 @@ portrait_low_nobles_trigger = { } NOR = { government_has_flag = government_is_herder + government_has_flag = government_is_merchant # handled above AND = { government_has_flag = government_is_republic primary_title.tier > tier_barony @@ -1982,7 +2065,7 @@ portrait_low_nobles_trigger = { OR = { highest_held_title_tier = tier_county government_has_flag = government_is_mercenary - AND = { + AND = { # Adventurers government_has_flag = government_is_landless_adventurer NOT = { has_realm_law = camp_purpose_legitimists } } @@ -2001,6 +2084,10 @@ portrait_low_nobles_trigger = { is_ruler = yes government_has_flag = government_is_theocracy } + AND = { # Merchants + government_has_flag = government_is_merchant + company_size_large_or_huge_trigger = no + } } portrait_$CULTURE_INPUT$_clothing_spouse_trigger = yes } @@ -2058,6 +2145,10 @@ portrait_high_nobles_trigger = { government_has_flag = government_is_landless_adventurer liege ?= { has_realm_law = camp_purpose_legitimists } } + AND = { # Merchants + government_has_flag = government_is_merchant + exists = liege.primary_title.var:merchant_company_creditor_capstone_unlocked + } } NOR = { # Blocked for mercenaries and adventurers government_has_flag = government_is_mercenary @@ -2515,6 +2606,10 @@ portrait_imperial_trigger = { scope:highest_held_title_tier >= tier_empire portrait_$CULTURE_INPUT$_clothing_trigger = yes } + trigger_if = { + limit = { is_alive = no } + tgp_primary_title_is_ministry = no + } } portrait_imperial_clothing_trigger = { @@ -2672,6 +2767,17 @@ portrait_war_nobles_helmet_trigger = { OR = { has_character_flag = need_military_outfit portrait_wear_helmet_trigger = yes + AND = { # For lower ranking characters like mercenary captains etc. + OR = { + portrait_commoner_armor_trigger = { + CULTURE_INPUT = $CULTURE_INPUT$ + } + portrait_low_nobles_armor_trigger = { + CULTURE_INPUT = $CULTURE_INPUT$ + } + } + portrait_wear_armor_trigger = yes + } } portrait_$CULTURE_INPUT$_clothing_trigger = yes NOR = { @@ -2903,6 +3009,7 @@ portrait_sickness_trigger = { } NOT = { has_dead_character_flag = ignore_sickness_clothes } portrait_ep2_wedding_clothes_trigger = no + NOT = { exists = involved_activity } } @@ -2925,6 +3032,57 @@ portrait_mayor_headgear_trigger = { portrait_$CULTURE_INPUT$_clothing_trigger = yes } +portrait_gdp_county_republican_trigger = { + exists = this + highest_held_title_tier >= tier_county + government_has_flag = government_is_republic + portrait_$CULTURE_INPUT$_clothing_trigger = yes + portrait_doge_trigger = no +} + +portrait_gdp_barony_republican_trigger = { + exists = this + highest_held_title_tier <= tier_barony + OR = { + government_has_flag = government_is_republic + liege ?= { government_has_flag = government_is_republic } + } + portrait_$CULTURE_INPUT$_clothing_trigger = yes + portrait_doge_trigger = no +} + +portrait_doge_trigger = { + trigger_if = { + limit = { exists = this } + government_has_flag = government_is_republic + primary_title.tier >= tier_duchy + } + portrait_italian_clothing_trigger = yes +} + +portrait_gdp_wealthy_merchant_trigger = { + exists = this + highest_held_title_tier >= tier_county + government_has_flag = government_is_merchant + company_size_large_or_huge_trigger = yes + portrait_$CULTURE_INPUT$_clothing_trigger = yes +} + +portrait_gdp_merchant_trigger = { + exists = this + highest_held_title_tier <= tier_county + portrait_merchant_or_merchant_courtier_trigger = yes + company_size_large_or_huge_trigger = no + portrait_$CULTURE_INPUT$_clothing_trigger = yes +} + +portrait_merchant_or_merchant_courtier_trigger = { + OR = { + government_has_flag = government_is_merchant + liege ?= { government_has_flag = government_is_merchant } + } +} + portrait_jester_trigger = { OR = { has_court_position = court_jester_court_position @@ -3625,6 +3783,27 @@ portrait_ep2_mena_travel_cloak_trigger = { } } +portrait_travelling_not_at_activity_trigger = { + is_travelling = yes + NOT = { + involved_activity ?= { activity_location = root.location } + } +} + +portrait_hunting_or_travelling_trigger = { + OR = { + involved_activity ?= { has_activity_type = activity_hunt } + AND = { + portrait_travelling_not_at_activity_trigger = yes + NOT = { + current_travel_plan ?= { + travel_plan_activity ?= { has_activity_type = activity_pilgrimage } + } + } + } + } +} + portrait_ep2_hajj_clothes_trigger = { age > 4 # Must be traveling on a pilgrimage diff --git a/common/scripted_triggers/00_coa_triggers.txt b/common/scripted_triggers/00_coa_triggers.txt index f73bf43d3..a69c9221b 100644 --- a/common/scripted_triggers/00_coa_triggers.txt +++ b/common/scripted_triggers/00_coa_triggers.txt @@ -63,7 +63,7 @@ coa_byzantine_trigger = { coa_castilian_trigger = { OR = { - scope:culture ?= { has_coa_gfx = castilian_coa_gfx } + scope:culture = { has_coa_gfx = castilian_coa_gfx } scope:title ?= { any_this_title_or_de_jure_above = { this = title:k_castille diff --git a/common/scripted_triggers/00_councillor_triggers.txt b/common/scripted_triggers/00_councillor_triggers.txt index 9b3203e7b..ccfdc8452 100644 --- a/common/scripted_triggers/00_councillor_triggers.txt +++ b/common/scripted_triggers/00_councillor_triggers.txt @@ -17,34 +17,36 @@ can_be_councillor_basics_trigger = { imprisoned = no } is_at_war_with_liege = no - trigger_if = { - limit = { has_variable = block_hire_councillor } - NOT = { var:block_hire_councillor = liege } - } + NOT = { var:block_hire_councillor ?= liege } custom_tooltip = { text = not_travel_option_character NOT = { has_character_flag = travel_option_added_character } } + trigger_if = { + limit = { + NOT = { scope:spouse_councillor_check ?= this } + } + is_trader = no + } } can_be_councillor_gender_trigger = { OR = { is_ruler = yes has_variable = can_be_councillor_override - AND = { - is_female = yes - $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } - } - AND = { - is_female = yes - $COURT_OWNER$ = { - has_personal_tenet_flag = tenet_hyperdulia_women_can_be_councillors - } - } AND = { is_male = yes $COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } } } + AND = { + is_female = yes + OR = { + $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } + $COURT_OWNER$ = { + has_personal_tenet_flag = tenet_hyperdulia_women_can_be_councillors + } + } + } } } @@ -129,7 +131,6 @@ can_be_spymaster_trigger = { } can_be_court_chaplain_trigger = { - save_temporary_scope_as = court_chaplain_check can_be_councillor_basics_trigger = yes $COURT_OWNER$ ?= { NOT = { government_has_flag = government_is_nomadic } @@ -141,6 +142,7 @@ can_be_court_chaplain_trigger = { liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } + save_temporary_scope_as = court_chaplain_check $COURT_OWNER$.rite = { rite_has_allowed_gender_for_clergy = scope:court_chaplain_check } faith = $COURT_OWNER$.faith rite = { rite_has_allowed_gender_for_clergy = scope:court_chaplain_check } @@ -211,10 +213,10 @@ court_chaplain_endorse_override_trigger = { can_be_spouse_councillor_trigger = { save_temporary_scope_as = spouse_councillor_check - can_be_councillor_basics_trigger = yes #NOT = { # We allow spouses to both be regents and do their spouse job # this = liege.diarch #} + # Ahead of the basics, since it rules out nearly every candidate in a council search trigger_if = { limit = { is_ruler = yes } liege ?= $COUNCIL_OWNER$ @@ -223,12 +225,13 @@ can_be_spouse_councillor_trigger = { trigger_else = { $COUNCIL_OWNER$ ?= { primary_spouse = scope:spouse_councillor_check } } + can_be_councillor_basics_trigger = yes } can_be_vizier_councillor_trigger = { - can_be_councillor_basics_trigger = yes save_temporary_scope_as = confidant + # Ahead of the basics, since it rules out nearly every candidate in a council search $COUNCIL_OWNER$ = { OR = { scope:confidant = diarch @@ -237,6 +240,7 @@ can_be_vizier_councillor_trigger = { } } } + can_be_councillor_basics_trigger = yes } can_be_kurultai_trigger = { @@ -269,6 +273,12 @@ can_be_kurultai_trigger = { is_female = yes $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } } + AND = { + is_female = yes + $COURT_OWNER$ = { + has_personal_tenet_flag = tenet_hyperdulia_women_can_be_councillors + } + } AND = { is_male = yes $COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } } @@ -381,6 +391,7 @@ councillor_loyalty_trigger = { councillor_spouse_can_fire = { always = no } councillor_spouse_can_reassign = { always = no } councillor_spouse_valid_position = { + government_allows = council AND = { NOT = { has_diarchy_type = vizierate @@ -395,7 +406,6 @@ councillor_spouse_valid_position = { } } } - NOT = { government_has_flag = government_is_landless_adventurer } # Celestial hegemons have access to the ministry instead, so no spouse tgp_has_access_to_ministry_trigger = no } @@ -1008,6 +1018,7 @@ marshal_task_1003_county_trigger = { } steward_task_county_corruption_county_trigger = { + can_worsen_county_corruption_trigger = yes holder = { OR = { is_ai = yes @@ -1016,6 +1027,11 @@ steward_task_county_corruption_county_trigger = { } } +council_task_not_started_in_county_trigger = { + exists = scope:county + NOT = { scope:councillor.councillor_task_target ?= scope:county.title_province } +} + # expect scope:councillor_liege, scope:councillor task_conversion_valid_county_trigger = { is_landless_type_title = no @@ -1179,7 +1195,7 @@ task_conversion_valid_county_trigger = { vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } } scope:councillor_liege = { ai_zeal >= 100 } - scope:county_check = { county_opinion <= -25 } + scope:county_check = { popular_opinion <= -25 } scope:county_check = { # Always convert holy sites any_county_province = { barony = { @@ -1201,7 +1217,7 @@ task_conversion_valid_county_trigger = { vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } } scope:councillor_liege = { ai_zeal >= 0 } - scope:county_check = { county_opinion <= -10 } + scope:county_check = { popular_opinion <= -10 } scope:county_check = { # Always convert holy sites any_county_province = { barony = { @@ -1218,7 +1234,7 @@ task_conversion_valid_county_trigger = { vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } } scope:councillor_liege = { ai_zeal >= 25 } - scope:county_check = { county_opinion <= -15 } + scope:county_check = { popular_opinion <= -15 } scope:county_check = { # Always convert holy sites any_county_province = { barony = { @@ -1229,6 +1245,34 @@ task_conversion_valid_county_trigger = { } } } + # Ash'ari in Spain tend to not convert Muwhalladi often + trigger_if = { + limit = { + scope:councillor_liege = { + faith = faith:sunni + capital_province ?= { geographical_region = world_europe_west_iberia } + scope:county_check.rite = rite:maliki + } + scope:county_check = { + title_province = { geographical_region = world_europe_west_iberia } + } + } + OR = { + scope:councillor_liege = { + has_character_flag = vassal_directive_convert_faith + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + scope:councillor_liege = { ai_zeal >= 50 } + scope:county_check = { popular_opinion <= -20 } + scope:county_check = { # Always convert holy sites + any_county_province = { + barony = { + is_holy_site_of = scope:councillor_liege.faith + } + } + } + } + } # If a ruler has Jizya tax, they'll only convert the same *religious family* when ai_zeal is really high, they're converting unreformed pagans, counties in a kingdom with a Holy Site, or others of the same religion trigger_if = { limit = { @@ -1302,6 +1346,22 @@ councillor_liege_has_customs_legacy_perk = { scope:councillor_liege.dynasty ?= { has_dynasty_perk = ep1_culture_legacy_2 } } +councillor_liege_duchy_capital_has_building_trigger = { + scope:councillor_liege ?= { + highest_held_title_tier >= tier_duchy # Quick check first, as holding the duchy below needs this anyway + capital_county.duchy ?= { + holder = scope:councillor_liege + title_capital_county.title_province ?= { + has_building_or_higher = $BUILDING$ + } + } + } +} + +councillor_liege_has_reckoning_school = { + councillor_liege_duchy_capital_has_building_trigger = { BUILDING = reckoning_school_03 } +} + councillor_liege_has_family_business_bonus = { scope:councillor_liege.culture ?= { has_cultural_parameter = close_family_better_councillors } scope:councillor ?= { diff --git a/common/scripted_triggers/00_courtier_guest_management_triggers.txt b/common/scripted_triggers/00_courtier_guest_management_triggers.txt index fc709673f..a49bb6e8d 100644 --- a/common/scripted_triggers/00_courtier_guest_management_triggers.txt +++ b/common/scripted_triggers/00_courtier_guest_management_triggers.txt @@ -80,16 +80,16 @@ courtier_allowed_to_leave_trigger = { has_character_flag = blocked_from_leaving is_councillor_of = scope:liege is_consort_of = scope:liege + is_knight_of = scope:liege + has_any_court_position = yes + has_relation_lover = scope:liege + is_tax_collector_of = scope:liege scope:liege = { player_heir_position = { target = scope:leaving_courtier value <= 2 #Not 1st, 2nd or 3rd player heir (0,1,2) } } - has_any_court_position = yes - has_relation_lover = scope:liege - is_knight_of = scope:liege - is_tax_collector_of = scope:liege any_relation = { type = ward OR = { @@ -240,7 +240,12 @@ courtier_allowed_to_leave_trigger = { # Courtiers with sponsored inspirations won't leave on their own. inspiration ?= { exists = inspiration_sponsor } - scope:liege = { government_has_flag = government_is_landless_adventurer } + scope:liege = { + OR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } + } is_obedient_to = scope:liege AND = { @@ -400,35 +405,41 @@ can_recruit_character_to_court_trigger = { OR = { is_councillor_of = scope:recruitee.host is_knight_of = scope:recruitee.host - any_relation = { - type = ward + custom_description = { + text = can_recruit_character_to_court_employed_by_host + subject = scope:recruitee OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host + any_relation = { + type = ward + OR = { + this = scope:recruitee.host + is_close_family_of = scope:recruitee.host + } + } + any_relation = { + type = guardian + OR = { + this = scope:recruitee.host + is_close_family_of = scope:recruitee.host + } + } + any_relation = { + type = mentor + OR = { + this = scope:recruitee.host + is_close_family_of = scope:recruitee.host + } + } + any_relation = { + type = student + OR = { + this = scope:recruitee.host + is_close_family_of = scope:recruitee.host + } + } + any_court_position_employer = { this = scope:recruitee.host } } } - any_relation = { - type = guardian - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = mentor - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = student - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_court_position_employer = { this = scope:recruitee.host } } } trigger_if = { @@ -640,9 +651,9 @@ useful_courtier_or_guest_claim_trigger = { } neighboring_useful_courtier_or_guest_claim_trigger = { - courtier_or_guest_claim_trigger = { RULER = $RULER$ } tier < $RULER$.highest_held_title_tier exists = $RULER$.capital_province + courtier_or_guest_claim_trigger = { RULER = $RULER$ } holder = { any_sub_realm_county = { is_neighbor_to_realm = $RULER$ @@ -666,17 +677,17 @@ has_useful_potential_spouse_claim_trigger = { } guest_knight_candidate_trigger = { - can_be_knight_trigger = { ARMY_OWNER = $HOST$ } + prowess > medium_skill_rating age < 60 age >= 25 - prowess > medium_skill_rating + can_be_knight_trigger = { ARMY_OWNER = $HOST$ } } guest_commander_candidate_trigger = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $HOST$ } + martial > medium_skill_rating age < 60 age >= 25 - martial > medium_skill_rating + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $HOST$ } } guest_vassal_candidate_good_traits_trigger = { @@ -785,6 +796,8 @@ pool_character_is_pruneable_trigger = { has_trait = adventurer has_trait = historical_character has_character_flag = ai_will_not_convert + has_character_flag = easteregg + has_variable = merchant_var is_married = yes any_claim = { } any_child = { is_adult = no } @@ -796,14 +809,10 @@ pool_character_is_pruneable_trigger = { type = friend is_ruler = yes } - any_close_or_extended_family_member = { is_ruler = yes } - #Belongs to a dynasty with more than 1 member any_relation = { type = rival is_ai = no } - has_character_flag = easteregg - has_variable = merchant_var } trigger_if = { limit = { @@ -816,6 +825,7 @@ pool_character_is_pruneable_trigger = { intrigue >= high_skill_rating learning >= high_skill_rating prowess >= high_skill_rating + #Belongs to a dynasty with more than 1 member dynasty ?= { any_dynasty_member = { this != scope:pool_prune_check } } any_relation = { type = rival @@ -829,6 +839,7 @@ pool_character_is_pruneable_trigger = { } } } + NOT = { any_close_or_extended_family_member = { is_ruler = yes } } } diff --git a/common/scripted_triggers/00_diarchy_scripted_triggers.txt b/common/scripted_triggers/00_diarchy_scripted_triggers.txt index aa8496ea1..56836bff2 100644 --- a/common/scripted_triggers/00_diarchy_scripted_triggers.txt +++ b/common/scripted_triggers/00_diarchy_scripted_triggers.txt @@ -99,7 +99,7 @@ is_diarch_valid_trigger = { } } } - tgp_is_ceremonial_liege_trigger = no + is_ceremonial_liege = no } # This is hooked up to the is_diarch_able rule, referenced by Code. @@ -128,23 +128,25 @@ is_diarch_able_trigger = { # 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. + # AI assumed diarchs stay out, as the player might be planning around them + ## Assumed-diarch players can choose for themselves whether to go to events + ## Once a diarchy exists, is_diarchy_successor is the next in line rather than the current one AND = { is_ai = yes + liege ?= { has_active_diarchy = no } is_diarchy_successor = yes } } + liege ?= { + NOR = { + is_landless_adventurer = yes + has_diarchy_type = grand_secretariat + } + } } diarch_has_situational_loyalty_trigger = { @@ -175,20 +177,29 @@ basic_eligible_for_diarchy_trigger = { highest_held_title_tier >= tier_county is_landed_or_landless_administrative_or_theocratic = yes has_active_diarchy = no - NOT = { government_has_flag = government_is_landless_adventurer } # Laamps don't use diarchs + NOR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } # Laamps and merchants don't use diarchs +} + +entrenched_regency_for_personal_reasons_trigger = { + OR = { + AND = { + is_adult = no + NOT = { + liege ?= { has_diarchy_parameter = diarchy_type_is_junior_emperorship } + } + } + is_incapable = yes + } } 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 + entrenched_regency_for_personal_reasons_trigger = yes has_character_modifier = isolating_modifier } } @@ -449,6 +460,7 @@ valid_junior_emperor_candidate_trigger = { government_has_flag = government_is_republic government_has_flag = government_is_theocracy government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } @@ -484,6 +496,7 @@ valid_co_emperor_candidate_trigger = { government_has_flag = government_is_republic government_has_flag = government_is_theocracy government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } @@ -526,6 +539,7 @@ valid_co_monarch_candidate_trigger = { government_has_flag = government_is_republic government_has_flag = government_is_theocracy government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } diff --git a/common/scripted_triggers/00_elective_triggers.txt b/common/scripted_triggers/00_elective_triggers.txt index d31e1bf74..652f70c3a 100644 --- a/common/scripted_triggers/00_elective_triggers.txt +++ b/common/scripted_triggers/00_elective_triggers.txt @@ -16,6 +16,7 @@ has_unelectable_trait_trigger = { OR = { has_trait = disinherited + has_trait = adopted_no_inheritance has_trait = gallivanter is_eunuch_trigger = yes has_trait = crusader_king #Avoid realm merging after Crusade. @@ -34,6 +35,7 @@ has_unelectable_government_trigger = { government_has_flag = government_is_theocracy government_has_flag = government_is_mercenary government_has_flag = government_is_holy_order + government_has_flag = government_is_merchant } } @@ -67,6 +69,7 @@ this_is_diplomatic_society_trigger = { government_has_flag = government_is_feudal government_has_flag = government_is_republic government_has_flag = government_is_theocracy + government_has_flag = government_is_merchant } OR = { rite = { rite_has_tenet = tenet_communal_identity } diff --git a/common/scripted_triggers/00_government_triggers.txt b/common/scripted_triggers/00_government_triggers.txt index e37af3802..8aa6f6666 100644 --- a/common/scripted_triggers/00_government_triggers.txt +++ b/common/scripted_triggers/00_government_triggers.txt @@ -1,5 +1,5 @@  -should_apply_tribal_development_penalty_trigger = { +should_apply_tribal_prosperity_penalty_trigger = { government_has_flag = government_is_tribal NOR = { any_liege_or_above = { @@ -38,15 +38,14 @@ should_apply_tribal_development_penalty_trigger = { } faith_qualifies_for_west_african_pagan_feudalisation_trigger = { - always = no faith = { # Unreformed West African Pagans are our targets. OR = { -# religion = religion:akom_religion -# religion = religion:west_african_religion -# religion = religion:west_african_bori_religion -# religion = religion:west_african_orisha_religion -# religion = religion:west_african_roog_religion + religion = religion:akom_religion + religion = religion:west_african_religion + religion = religion:west_african_bori_religion + religion = religion:west_african_orisha_religion + religion = religion:west_african_roog_religion } custom_tooltip = { text = faith_qualifies_for_west_african_pagan_feudalisation_trigger.tt diff --git a/common/scripted_triggers/00_laamp_triggers.txt b/common/scripted_triggers/00_laamp_triggers.txt index a43367a90..204b1ae30 100644 --- a/common/scripted_triggers/00_laamp_triggers.txt +++ b/common/scripted_triggers/00_laamp_triggers.txt @@ -118,7 +118,7 @@ is_valid_for_laampdom = { custom_tooltip = { text = tgp_japan_imperial_branch_decision_imperial_heir_trigger NOT = { - top_liege.primary_title.var:administrative_ui_special_title = { + ceremonial_liege_title = { place_in_line_of_succession = { target = scope:potential_laamp_temp value <= 4 @@ -246,13 +246,13 @@ ep3_negotiate_settlement_valid_county_trigger = { } ep3_adventurer_invasion_allowed_for_character_trigger = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_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 + has_playable_adventurer_dlc_trigger = yes is_at_war = no } @@ -564,7 +564,7 @@ laamp_base_0011_valid_potential_rival_trigger = { # 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 + county_control < county_control_baseline } laamp_base_2001_valid_mayor_trigger = { diff --git a/common/scripted_triggers/00_law_triggers.txt b/common/scripted_triggers/00_law_triggers.txt index ff0ebd56e..3af77c4ce 100644 --- a/common/scripted_triggers/00_law_triggers.txt +++ b/common/scripted_triggers/00_law_triggers.txt @@ -224,10 +224,39 @@ realm_uses_treasury_laws_trigger = { government_allows = treasury } +realm_uses_salary_treasury_laws_trigger = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + gdp_is_assembly_head_trigger = yes + } + trigger_else = { + is_independent_ruler = yes + } + realm_uses_treasury_laws_trigger = yes +} + +realm_uses_military_treasury_laws_trigger = { + is_independent_ruler = yes + realm_uses_treasury_laws_trigger = yes + NOT = { + government_has_flag = government_is_republic + } +} + realm_law_use_japanese_bureaucracy = { government_has_flag = government_uses_japanese_bureaucracy } +realm_law_use_company_purpose = { + government_has_flag = government_is_merchant +} + +use_governor_appointment_law_trigger = { + is_independent_ruler = no +} + can_have_confederate_partition_succession_law_trigger = { OR = { government_has_flag = government_is_feudal @@ -271,7 +300,7 @@ can_keep_partition_succession_law_trigger = { can_have_partition_succession_law_trigger = { culture = { - has_innovation = innovation_gavelkind + has_innovation = innovation_hereditary_rule } custom_description = { text = succession_laws_must_have_organised_government_tooltip @@ -650,9 +679,12 @@ can_keep_acclamation_succession_law_trigger = { has_ep3_dlc_trigger = yes trigger_if = { limit = { - has_realm_law = acclamation_succession_law + has_realm_law = acclamation_succession_law + } + OR = { + can_have_acclamation_succession_law_trigger = yes + has_title = title:e_byzantium } - can_have_acclamation_succession_law_trigger = yes } } diff --git a/common/scripted_triggers/00_legal_triggers.txt b/common/scripted_triggers/00_legal_triggers.txt index 5d81ba2b4..19ec14f4b 100644 --- a/common/scripted_triggers/00_legal_triggers.txt +++ b/common/scripted_triggers/00_legal_triggers.txt @@ -1,17 +1,22 @@  ### Legal trigger list -opposes_succession_law_change_trigger = { +opposes_law_change_trigger = { is_imprisoned = no - opinion = { - target = liege - value < 0 - } - custom_description = { - text = law_change_approval_is_cowed - has_dread_level_towards = { + trigger_if = { + limit = { + exists = liege + } + opinion = { target = liege - level < 2 + value < 0 + } + custom_description = { + text = law_change_approval_is_cowed + has_dread_level_towards = { + target = liege + level < 2 + } } } } @@ -48,15 +53,6 @@ can_change_succession_laws_realm_flag_trigger = { can_change_succession_law_trigger = { can_change_succession_laws_realm_flag_trigger = yes - custom_description = { - text = "no_powerful_vassal_with_negative_opinion" - NOT = { - any_vassal = { - is_powerful_vassal = yes - opposes_succession_law_change_trigger = yes - } - } - } } can_change_single_heir_dynasty_house_succession_law_trigger = { @@ -65,12 +61,12 @@ can_change_single_heir_dynasty_house_succession_law_trigger = { culture = { OR = { this = culture:czech - this = culture:NEOW_slovak + this = culture:slovien any_parent_culture_or_above = { this = culture:czech } any_parent_culture_or_above = { - this = culture:NEOW_slovak + this = culture:slovien } } } @@ -85,15 +81,6 @@ can_change_single_heir_dynasty_house_succession_law_trigger = { trigger_else = { can_change_succession_laws_realm_flag_trigger = yes } - custom_description = { - text = "no_powerful_vassal_with_negative_opinion" - NOT = { - any_vassal = { - is_powerful_vassal = yes - opposes_succession_law_change_trigger = yes - } - } - } } can_change_to_equal_succession_law_trigger = { @@ -109,17 +96,9 @@ can_change_to_equal_succession_law_trigger = { trigger_else = { can_change_succession_laws_realm_flag_trigger = yes } - custom_description = { - text = "no_powerful_vassal_with_negative_opinion" - NOT = { - any_vassal = { - is_powerful_vassal = yes - opposes_succession_law_change_trigger = yes - } - } - } } +#TODO_GDP: This trigger doesn't seem to generate accurate custom descs when the law is unavailable can_change_partition_succession_law_trigger = { custom_description = { text = "has_law_allowing_partition_succession_law_change" @@ -128,15 +107,6 @@ can_change_partition_succession_law_trigger = { has_realm_law_flag = can_change_succession_laws } } - custom_description = { - text = "no_powerful_vassal_with_negative_opinion" - NOT = { - any_vassal = { - is_powerful_vassal = yes - opposes_succession_law_change_trigger = yes - } - } - } } @@ -152,6 +122,17 @@ can_designate_heir_trigger = { # Admin always has access to this limit = { government_has_mechanic = administrative } } + trigger_else_if = { + # Republics also has access to this + limit = { government_has_flag = government_is_republic } + + custom_description = { + text = "has_republic_allowing_designate_heir" + any_held_title = { + is_noble_family_title = yes + } + } + } trigger_else_if = { # Feudal and clan can get this by increasing crown authority limit = { has_realm_law_in_group = crown_authority } diff --git a/common/scripted_triggers/00_major_decision_triggers.txt b/common/scripted_triggers/00_major_decision_triggers.txt index 5b009a5ee..c29058a8b 100644 --- a/common/scripted_triggers/00_major_decision_triggers.txt +++ b/common/scripted_triggers/00_major_decision_triggers.txt @@ -247,4 +247,3 @@ launch_hungarian_migration_misplaced_count_suitable_liege_trigger = { hre_valid_prince_elector_trigger = { always = no } -# \ No newline at end of file diff --git a/common/scripted_triggers/00_military_triggers.txt b/common/scripted_triggers/00_military_triggers.txt index 9d8cef75b..8630477e0 100644 --- a/common/scripted_triggers/00_military_triggers.txt +++ b/common/scripted_triggers/00_military_triggers.txt @@ -15,6 +15,7 @@ military_strength_greater_than_ratio_trigger = { } valid_for_maa_trigger = { + NOT = { government_has_flag = government_is_merchant } OR = { AND = { has_government = landless_adventurer_government @@ -22,6 +23,13 @@ valid_for_maa_trigger = { location.county.culture ?= { has_cultural_parameter = $PARAMETER$ } } culture = { has_cultural_parameter = $PARAMETER$ } + AND = { + government_has_flag = government_is_republic + any_owned_trade_post_district = { + district_province.county.culture = { has_cultural_parameter = $PARAMETER$ } + has_building_with_flag = trade_post_unlock_cultural_maa + } + } } } diff --git a/common/scripted_triggers/00_religious_triggers.txt b/common/scripted_triggers/00_religious_triggers.txt index 6f308a262..e632f97d2 100644 --- a/common/scripted_triggers/00_religious_triggers.txt +++ b/common/scripted_triggers/00_religious_triggers.txt @@ -66,6 +66,9 @@ is_christian_trigger = { not_non_catholic_standard_christian_faith_trigger = { NOR = { this = faith:orthodox + this = faith:miaphysitism + this = faith:armenian_apostolic + this = faith:iconoclast } } @@ -117,13 +120,13 @@ can_be_combatant_based_on_gender_trigger = { } trigger_if = { limit = { - $ARMY_OWNER$.culture = { has_cultural_parameter = martial_custom_male_only_combatant } + $ARMY_OWNER$.culture ?= { has_cultural_parameter = martial_custom_male_only_combatant } } is_male = yes } trigger_else_if = { limit = { - $ARMY_OWNER$.culture = { has_cultural_parameter = martial_custom_female_only_combatant } + $ARMY_OWNER$.culture ?= { has_cultural_parameter = martial_custom_female_only_combatant } } is_female = yes } @@ -1097,7 +1100,7 @@ barony_is_valid_for_monastic_lease_trigger = { county = { any_county_province = { has_holding = no - has_ongoing_construction = no + has_ongoing_holding_construction = no } holder = $CHARACTER$ } @@ -1105,7 +1108,12 @@ barony_is_valid_for_monastic_lease_trigger = { county_is_valid_for_monastic_lease_trigger = { any_county_province = { has_holding = no - has_ongoing_construction = no + NOR = { + has_construction_with_flag = castle + has_construction_with_flag = city + has_construction_with_flag = temple + has_construction_with_flag = temple_citadel + } } holder = $CHARACTER$ } @@ -1205,7 +1213,7 @@ valid_demand_conversion_conditions_trigger = { } custom_tooltip = { text = valid_demand_conversion_conditions_trigger.tt.domicile_requires_shrine - domicile = { has_domicile_parameter = camp_enable_conversion } + domicile ?= { has_domicile_parameter = camp_enable_conversion } } } custom_tooltip = { @@ -1549,8 +1557,6 @@ can_create_spiritual_head_of_faith_title_trigger = { # this = Person trying to create the title can_create_head_of_faith_title_trigger = { $FAITH$ = { - NOT = { exists = religious_head } - NOT = { has_doctrine_parameter = block_from_create_hof_parameter } trigger_if = { limit = { has_doctrine_parameter = spiritual_head_of_faith @@ -2455,71 +2461,71 @@ character_considered_morally_dubious_trigger = { #SHUNNED TRAITS AND = { + has_trait = sodomite trait_is_shunned_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:sodomite GENDER_CHARACTER = scope:judged } - has_trait = sodomite } AND = { + has_trait = deviant trait_is_shunned_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:deviant GENDER_CHARACTER = scope:judged } - has_trait = deviant } AND = { + has_trait = adulterer trait_is_shunned_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:adulterer GENDER_CHARACTER = scope:judged } - has_trait = adulterer } AND = { + OR = { + has_trait = fornicator + has_trait = rakish + } trait_is_shunned_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:fornicator GENDER_CHARACTER = scope:judged } - OR = { - has_trait = fornicator - has_trait = rakish - } } AND = { + has_trait = witch trait_is_shunned_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:witch GENDER_CHARACTER = scope:judged } - has_trait = witch } AND = { + has_trait = kinslayer_1 trait_is_shunned_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:kinslayer_1 GENDER_CHARACTER = scope:judged } - has_trait = kinslayer_1 } AND = { + has_trait = kinslayer_2 trait_is_shunned_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:kinslayer_2 GENDER_CHARACTER = scope:judged } - has_trait = kinslayer_2 } AND = { + has_trait = kinslayer_3 trait_is_shunned_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:kinslayer_3 GENDER_CHARACTER = scope:judged } - has_trait = kinslayer_3 } #Generally questionable traits (virtue read from judge rite $RITE$) @@ -2604,71 +2610,71 @@ character_considered_wicked_trigger = { #CRIMINAL TRAITS AND = { + has_trait = sodomite trait_is_criminal_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:sodomite GENDER_CHARACTER = scope:judged } - has_trait = sodomite } AND = { + has_trait = deviant trait_is_criminal_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:deviant GENDER_CHARACTER = scope:judged } - has_trait = deviant } AND = { + has_trait = adulterer trait_is_criminal_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:adulterer GENDER_CHARACTER = scope:judged } - has_trait = adulterer } AND = { + OR = { + has_trait = fornicator + has_trait = rakish + } trait_is_criminal_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:fornicator GENDER_CHARACTER = scope:judged } - OR = { - has_trait = fornicator - has_trait = rakish - } } AND = { + has_trait = witch trait_is_criminal_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:witch GENDER_CHARACTER = scope:judged } - has_trait = witch } AND = { + has_trait = kinslayer_1 trait_is_criminal_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:kinslayer_1 GENDER_CHARACTER = scope:judged } - has_trait = kinslayer_1 } AND = { + has_trait = kinslayer_2 trait_is_criminal_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:kinslayer_2 GENDER_CHARACTER = scope:judged } - has_trait = kinslayer_2 } AND = { + has_trait = kinslayer_3 trait_is_criminal_in_rite_trigger = { RITE = $RITE$ TRAIT = trait:kinslayer_3 GENDER_CHARACTER = scope:judged } - has_trait = kinslayer_3 } AND = { diff --git a/common/scripted_triggers/00_succession_triggers.txt b/common/scripted_triggers/00_succession_triggers.txt index 894ea3292..2c19561f0 100644 --- a/common/scripted_triggers/00_succession_triggers.txt +++ b/common/scripted_triggers/00_succession_triggers.txt @@ -27,7 +27,6 @@ historical_succession_access_single_heir_succession_law_trigger = { limit = { government_has_mechanic = administrative } OR = { tgp_japan_single_heir_succession_override_trigger = yes - tgp_britain_single_heir_succession_override_trigger = yes tgp_korea_single_heir_succession_override_trigger = yes has_title = title:e_hindustan has_title = title:h_china @@ -84,7 +83,7 @@ can_have_meritocratic_regency_succession_law_trigger = { NOT = { government_allows = obedience } # Stop Khanates OR = { # Ceremonial Monarch title always pairs with law - exists = primary_title.var:administrative_ui_special_title + exists = ceremonial_liege_title # Jipjeong Jeong Jung-bu AND = { game_start_date = 1178.10.1 @@ -93,3 +92,42 @@ can_have_meritocratic_regency_succession_law_trigger = { } } } + +successor_is_a_landless_patrician_trigger = { + gdp_is_patrician_trigger = yes + is_landed = no +} + +successor_is_not_a_traditional_feudal_esque_ruler_trigger = { + trigger_if = { + limit = { is_alive = no } + OR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + government_has_flag = government_is_republic + } + } + trigger_else_if = { + limit = { is_ruler = yes } + OR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + AND = { + OR = { + any_held_title = { is_noble_family_title = yes } + government_has_mechanic = administrative + } + is_independent_ruler = no + } + tgp_is_ceremonial_regent_trigger = yes + } + } + trigger_else = { + liege ?= { + OR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } + } + } +} diff --git a/common/scripted_triggers/00_war_and_peace_triggers.txt b/common/scripted_triggers/00_war_and_peace_triggers.txt index e6ecfc0ef..c07be372d 100644 --- a/common/scripted_triggers/00_war_and_peace_triggers.txt +++ b/common/scripted_triggers/00_war_and_peace_triggers.txt @@ -170,7 +170,7 @@ can_potentially_call_ally_trigger = { $JOINER$ = { trigger_if = { limit = { - NOT = { + NOR = { # Diarchs can join against other vassals. this ?= $WARRIOR$.diarch # Confederation members can join the confederation leader's defensive wars @@ -181,7 +181,6 @@ can_potentially_call_ally_trigger = { } } } - } NOT = { target_is_liege_or_above = $WARRIOR$ @@ -305,6 +304,16 @@ allows_declaring_war_against_target_trigger = { } } } + trigger_if = { + limit = { + has_realm_law = japanese_bureaucracy_3 + this != top_liege + } + custom_tooltip = { + text = non_admin_vassal_japanese_bureaucracy_3 + government_has_mechanic = administrative + } + } scope:defender_check = { custom_tooltip = { text = is_a_herder_recipient_tt @@ -320,6 +329,33 @@ allows_declaring_war_against_target_trigger = { } } } + trigger_if = { + limit = { + gdp_is_protected_city_war_target_trigger = { TARGET = scope:defender_check } + NOT = { has_strong_usable_hook = liege } + } + trigger_if = { + limit = { NOT = { exists = scope:recipient } } + scope:defender_check = { + save_temporary_scope_as = recipient + } + } + scope:defender_check = { + trigger_if = { + limit = { vassal_contract_has_flag = free_city_obligation } + custom_tooltip = { + text = declare_war_target_is_free_city_tt + always = no + } + } + trigger_else = { + custom_tooltip = { + text = declare_war_target_is_chartered_city_tt + always = no + } + } + } + } trigger_if = { limit = { liege != this } trigger_if = { @@ -370,6 +406,10 @@ allows_declaring_war_against_target_trigger = { has_realm_law_flag = admin_vassal_wars_permission_only } } + custom_tooltip = { + text = admin_all_vassal_wars_banned + admin_governor_allows_declaring_war_trigger = yes + } custom_tooltip = { text = admin_vassal_wars_permission_only_desc has_variable = admin_permission_to_declare_war @@ -450,6 +490,70 @@ allows_declaring_war_against_target_trigger = { } } } + # Republican rulers must seek approval if the law demands it + trigger_if = { + limit = { + has_realm_law_flag = republic_war_approval_required + highest_liege_matching_rule:uses_assembly != scope:defender_check # Approval is not needed against the republic's ruler + } + custom_tooltip = { + text = must_have_assembly_approval_declare_war_desc + has_variable = has_assembly_approval_declare_war + } + } + #You're under Peace Privilege; no wars allowed against the opposite side + custom_tooltip = { + text = not_attack_gg_during_repose_tt + trigger_if = { + limit = { + situation:guelph_ghibelline ?= { situation_current_phase = repose } + OR = { + is_guelph_trigger = yes + is_ghibelline_trigger = yes + } + } + NOR = { + AND = { + is_guelph_trigger = yes + scope:recipient = { is_ghibelline_trigger = yes } + } + AND = { + is_ghibelline_trigger = yes + scope:recipient = { is_guelph_trigger = yes } + } + } + } + } + + #The Guelphs won the GG Situation; no HRE wars against theocratic vassals + custom_tooltip = { + text = guelph_victory_hre_no_theocracy_cb_tt + trigger_if = { + limit = { exists = var:gg_ended_in_guelph_victory_no_hre_wars_on_theocratic_vassals } + NOT = { + this = title:e_hre.holder + scope:defender_check = { + is_vassal_of = title:e_hre.holder + government_has_flag = government_is_ecclesiastical + } + } + } + } + #... nor against rulers in Northern Italy + custom_tooltip = { + text = guelph_victory_hre_no_cb_tt + trigger_if = { + limit = { exists = var:gg_hre_no_cb_northern_italy } + NOT = { + this = title:e_hre.holder + scope:defender_check = { + primary_title = { + title_province = { geographical_region = gdp_guelph_ghibelline_northern_italy_region } + } + } + } + } + } } war_declarer_needs_hook_on_liege = { @@ -502,7 +606,7 @@ can_be_warrior_trigger = { imprisoned = no incapable = no } - tgp_is_ceremonial_liege_trigger = no + is_ceremonial_liege = no OR = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ } AND = { @@ -604,6 +708,7 @@ can_be_knight_trigger = { } this != liege.diarch } + is_trader = no # Traders are away running a trade route # knight permissions for players trigger_if = { limit = { @@ -748,10 +853,10 @@ using_de_jure_cb_trigger = { using_cb = individual_county_de_jure_cb using_cb = individual_duchy_de_jure_cb using_cb = imperial_reconquest_cb -# using_cb = dismantle_holy_pretender_cb -# using_cb = dismantle_byz_pretender_cb -# using_cb = norman_conquest_cb -# using_cb = norwegian_invasion_cb + using_cb = dismantle_holy_pretender_cb + using_cb = dismantle_byz_pretender_cb + using_cb = norman_conquest_cb + using_cb = norwegian_invasion_cb } } @@ -841,6 +946,17 @@ special_invasion_cb_seize_land_in_region_trigger = { } } +# keep player's land if they are vassal. +special_invasion_cb_seize_land_trigger = { + holder ?= { + top_liege ?= scope:defender + trigger_if = { + limit = { is_ai = no } + this = top_liege + } + } +} + can_join_war_liege_vassal_check_trigger = { custom_description = { text = "basic_ally_can_join_because_liege_or_vassals" @@ -1014,7 +1130,7 @@ can_use_viking_invasion_cbs_dlc_trigger = { any_sub_realm_county = { is_coastal_county = yes } trigger_if = { limit = { is_ai = yes } - prestige >= 75 + prestige >= minor_prestige_value OR = { top_liege = this primary_title.tier >= tier_kingdom @@ -1090,7 +1206,7 @@ prisoners_of_war_trigger = { any_prisoner = { OR = { this = scope:war.primary_attacker - scope:war.primary_attacker.primary_title = { + scope:war.primary_attacker.primary_title ?= { place_in_line_of_succession = { target = prev value <= 3 @@ -1104,7 +1220,7 @@ prisoners_of_war_trigger = { any_prisoner = { OR = { this = scope:war.primary_defender - scope:war.primary_defender.primary_title = { + scope:war.primary_defender.primary_title ?= { place_in_line_of_succession = { target = prev value <= 3 @@ -1141,6 +1257,56 @@ religious_war_vassals_constraints = { } } +religious_war_faith_hostility_trigger = { + scope:attacker = { + faith = { + faith_hostility_level = { + target = scope:defender.faith + value >= religious_cb_enabled_hostility_level + } + } + top_liege != scope:defender.top_liege + } +} + +religious_war_struggle_check_trigger = { + # Filter for struggles + trigger_if = { + limit = { + scope:defender = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_wars_in_region_cannot_be_declared + } + } + } + exists = scope:target + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target = { + NOT = { + any_county_struggle = { + has_struggle_phase_parameter = holy_wars_in_region_cannot_be_declared + } + } + } + } + trigger_else = { # For Duchy and Kingdom Holy War + scope:target = { + any_in_de_facto_hierarchy = { # We only consider county within the realm of the target's holder + tier = tier_county + NOT = { + any_county_struggle = { + has_struggle_phase_parameter = holy_wars_in_region_cannot_be_declared + } + } + } + } + } + } + are_holy_wars_disabled_by_struggle_conciliation_trigger = no # Disabled against other involved faiths in FP2 Conciliation ending +} + herders_and_tributary_constraints = { trigger_if = { limit = { exists = scope:defender } @@ -1151,7 +1317,7 @@ herders_and_tributary_constraints = { text = is_a_herder_defender_tt # herders can't fight government_has_flag = government_is_herder } - is_tributary_of_suzerain_or_above = scope:attacker # can't fight your tributaries or your tributaries' tributaries + is_tributary_of_suzerain_or_above = scope:attacker # can't fight your tributaries or your tributaries' tributaries } # You cannot attack your Confederation buddies tributaries trigger_if = { @@ -1166,7 +1332,7 @@ herders_and_tributary_constraints = { } scope:attacker = { # Tributaries cannot attack their Suzerain or Suzerain's Confederation buddies NOR = { - is_tributary_of_suzerain_or_above = scope:defender # can't attack your own suzerain + is_tributary_of_suzerain_or_above = scope:defender # can't attack your own suzerain trigger_if = { limit = { exists = suzerain @@ -1199,11 +1365,7 @@ feudal_clan_tribal_conquest_constraints = { AND = { tier = tier_county title_province = { - OR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } + holding_is_tribal = yes } } AND = { @@ -1211,11 +1373,7 @@ feudal_clan_tribal_conquest_constraints = { any_in_de_jure_hierarchy = { tier = tier_county title_province = { - OR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } + holding_is_tribal = yes } } } @@ -1224,23 +1382,279 @@ feudal_clan_tribal_conquest_constraints = { NOR = { government_has_flag = government_is_tribal government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer } - short_term_gold < 200 + short_term_treasury_or_gold < 200 OR = { AND = { government_has_mechanic = administrative - short_term_gold < 700 + short_term_treasury_or_gold < 700 this != top_liege } any_sub_realm_county = { title_province = { - OR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding + holding_is_tribal = yes + } + } + } + } +} + +war_should_invalidate_defender_lost_target_titles_trigger = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier >= tier_county + holder ?= { + target_is_same_character_or_above = scope:defender + } + } + } + } +} + +war_should_invalidate_defender_lost_target_lands_trigger = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder ?= { + target_is_same_character_or_above = scope:defender + } + } + } + } +} + +religious_war_should_invalidate_faith_change_trigger = { + scope:war = { + OR = { + has_variable = invalidate_defender_faith_change + has_variable = invalidate_attacker_faith_change + } + } +} + +# To prevent the AI wasting strong CBs on scattered counties +ai_aggressive_cb_constraints = { + trigger_if = { + limit = { + scope:attacker = { + is_ai = yes + } + } + scope:target ?= { + trigger_if = { + limit = { tier = tier_duchy } + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + count >= 2 + tier = tier_county + holder ?= { + target_is_same_character_or_above = scope:defender + } + } + } + # kingdom + trigger_else_if = { + limit = { tier = tier_kingdom } + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + count >= 5 + tier = tier_county + holder ?= { + target_is_same_character_or_above = scope:defender + } + } + } + # in case used in a dynamic level CB + trigger_else_if = { + limit = { tier = tier_county } + always = yes + } + # empire+ + trigger_else = { + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + count >= 16 + tier = tier_county + holder ?= { + target_is_same_character_or_above = scope:defender } } } } } } + +ai_naval_expansion_cb_constraints = { + trigger_if = { + limit = { + scope:attacker = { + is_ai = yes + } + } + scope:attacker = { + OR = { + has_trait = ambitious + ai_boldness >= very_high_positive_ai_value + } + } + } +} + +# Cooldown is set in on_declaration of expansion_cb and duchy_expansion_cb +ai_land_expansion_cb_constraints = { + trigger_if = { + limit = { + scope:attacker = { + is_ai = yes + is_governor = yes + } + } + scope:attacker = { + NOT = { has_variable = ai_land_expansion_cb_cooldown } + } + } +} + +civil_war_is_local_player_in_faction_trigger = { + scope:attacker = { + OR = { + joined_faction ?= { + any_faction_member = { is_local_player = yes } + } + AND = { + is_local_player = yes + has_character_flag = should_become_independent + } + } + } +} + +has_required_prestige_level_to_declare_war = { + trigger_if = { + limit = { + government_has_flag = government_uses_house_unity + house ?= { + has_house_unity_stage = antagonistic + } + culture = { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + prestige_level >= { + value = $LEVEL$ + subtract = 2 + min = 0 + } + } + trigger_else_if = { + limit = { + OR = { + AND = { + government_has_flag = government_uses_house_unity + house ?= { + has_house_unity_stage = antagonistic + } + } + culture = { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + } + prestige_level >= { + value = $LEVEL$ + subtract = 1 + min = 0 + } + } + trigger_else = { + prestige_level >= $LEVEL$ + } +} + +# NOTICE: should use in allowed_against_character_display_regardless since used defender. +has_required_piety_level_to_declare_war = { + trigger_if = { + limit = { + scope:defender ?= { + is_alive = yes + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:attacker.faith + } + } + } + trigger_if = { + limit = { + OR = { + culture = { + has_cultural_parameter = cb_lower_piety_level_requirement + } + # Iberian Struggle Hostility Reward + house ?= { + OR = { + has_house_modifier = fp2_struggle_hostility_house_faith_modifier + has_house_modifier = fp2_struggle_hostility_house_combined_modifier + } + } + } + } + piety_level >= { + value = $LEVEL$ + subtract = 2 + min = 0 + } + } + trigger_else = { + piety_level >= { + value = $LEVEL$ + subtract = 1 + min = 0 + } + } + } + trigger_else = { + trigger_if = { + limit = { + OR = { + culture = { + has_cultural_parameter = cb_lower_piety_level_requirement + } + # Iberian Struggle Hostility Reward + house ?= { + OR = { + has_house_modifier = fp2_struggle_hostility_house_faith_modifier + has_house_modifier = fp2_struggle_hostility_house_combined_modifier + } + } + } + } + piety_level >= { + value = $LEVEL$ + subtract = 1 + min = 0 + } + } + trigger_else = { + piety_level >= $LEVEL$ + } + } +} + +has_mandala_invasion_cb_trigger = { + house ?= { has_house_head_parameter = has_mandala_invasion_cb } + is_house_head = yes +} + +depose_war_victory_trigger = { + OR = { + NOT = { exists = scope:attacker.var:initial_target } + scope:defender = scope:attacker.var:initial_target + scope:defender.primary_title.tier <= scope:attacker.var:target_tier + } +} diff --git a/common/scripted_triggers/00_weather_triggers.txt b/common/scripted_triggers/00_weather_triggers.txt index dcfb960e5..316d46e97 100644 --- a/common/scripted_triggers/00_weather_triggers.txt +++ b/common/scripted_triggers/00_weather_triggers.txt @@ -23,11 +23,11 @@ culture_uses_frequent_winter_transportation_trigger = { } location_has_harsh_winter_trigger = { - location = { has_province_modifier = winter_harsh_modifier } + location ?= { has_province_modifier = winter_harsh_modifier } } location_has_normal_or_worse_winter_trigger = { - location = { + location ?= { # Characters in limbo have no location OR = { has_province_modifier = winter_normal_modifier has_province_modifier = winter_harsh_modifier @@ -42,6 +42,12 @@ location_has_winter_trigger = { } has_winter_trigger = { + NOR = { + terrain = desert + terrain = oasis + terrain = drylands + terrain = desert_mountains + } OR = { has_province_modifier = winter_mild_modifier has_province_modifier = winter_normal_modifier @@ -108,6 +114,17 @@ tropical_seasons_region_trigger = { geographical_region = world_india_deccan geographical_region = world_asia_china geographical_region = world_asia_southeast + geographical_region = world_india_rajastan + geographical_region = world_india_bengal + } +} + +arid_region_trigger = { + OR = { + geographical_region = world_middle_east_persia + geographical_region = world_middle_east_arabia + geographical_region = world_middle_east_jerusalem + geographical_region = custom_sahara_proper } } diff --git a/common/scripted_triggers/02_ep1_scripted_triggers.txt b/common/scripted_triggers/02_ep1_scripted_triggers.txt index 988b6da8b..a72b999c2 100644 --- a/common/scripted_triggers/02_ep1_scripted_triggers.txt +++ b/common/scripted_triggers/02_ep1_scripted_triggers.txt @@ -307,7 +307,7 @@ target_of_powerful_faction_trigger = { } province_has_no_holding_trigger = { # province has no holding - has_ongoing_construction = no + has_ongoing_holding_construction = no has_holding = no } diff --git a/common/scripted_triggers/03_fp2_scripted_triggers.txt b/common/scripted_triggers/03_fp2_scripted_triggers.txt index b8c61305b..31ffa142e 100644 --- a/common/scripted_triggers/03_fp2_scripted_triggers.txt +++ b/common/scripted_triggers/03_fp2_scripted_triggers.txt @@ -27,6 +27,10 @@ eligible_for_fp2_dynasty_legacies_trigger = { dynasty.dynast = { OR = { game_rule_unrestricted_dynasty_legacies_trigger = yes + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } culture = { has_cultural_pillar = heritage_iberian } @@ -358,12 +362,12 @@ fp2_struggle_conciliation_special_cultural_rules_trigger = { 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 + variable = fp2_struggle_ending_culture_list + this = scope:attacker.culture } any_in_global_list = { - variable = fp2_struggle_ending_faith_list - this = scope:defender.faith + variable = fp2_struggle_ending_culture_list + this = scope:defender.culture } } @@ -651,7 +655,10 @@ fp2_purchase_truce_interaction_soft_requirements_trigger = { # involvement = involved # has_struggle_phase_parameter = unlocks_truce_purchasing_interaction # } - has_perk = defensive_negotiations_perk + AND = { + has_perk = defensive_negotiations_perk + NOT = { government_has_flag = government_is_merchant } + } culture = { has_cultural_parameter = unlocks_purchase_truce } has_personal_tenet_flag = tenet_peace_of_god_personal_truce } diff --git a/common/scripted_triggers/07_ep3_triggers.txt b/common/scripted_triggers/07_ep3_triggers.txt index 8b48b2be9..a17e903a5 100644 --- a/common/scripted_triggers/07_ep3_triggers.txt +++ b/common/scripted_triggers/07_ep3_triggers.txt @@ -161,7 +161,7 @@ restore_greece_decision_county_trigger = { holder.top_liege = root has_county_modifier = backwater_county_modifier } - development_level >= 50 + prosperity_level >= 50 } } @@ -318,7 +318,7 @@ governor_contract_invalidated_message_trigger = { task_contract_employer ?= { NOT = { root.task_contract_taker ?= this } OR = { - is_incapable = yes + is_available_quick = { incapable = yes } is_imprisoned = yes is_alive = no } @@ -346,7 +346,7 @@ chariot_race_0201_negative_crowd_reaction_trigger = { scope:activity.var:emperor_speech_topic = flag:discredit_claimant_fail AND = { scope:host.capital_county = { - county_opinion <= -30 + popular_opinion <= -30 } NOT = { scope:activity.var:emperor_speech_topic = flag:appease_populace } } @@ -1179,9 +1179,46 @@ has_any_gallowsbait_xp_trigger = { } } -ep3_restored_rome_hard_mode_trigger = { always = no } -is_eastern_roman_emperor_primary_title_trigger = { always = no } -show_byzantion_throne_room_background = { always = no } +notorious_gallowsbait_xp_trigger = { + OR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 40 + } + } +} + +ep3_restored_rome_hard_mode_trigger = { + OR = { + this = title:h_roman_empire.holder + this = title:h_eastern_roman_empire.holder + } + any_owned_story = { + type = ep3_story_cycle_restoring_rome + has_variable = roman_empire_hard_mode + } +} rite_is_interesting_heresy_to_state_rite_trigger = { faith.religion = root.top_liege.primary_title.state_rite.faith.religion @@ -1564,8 +1601,15 @@ hasan_evangelize_province_trigger = { # Faith is different from Hasan's custom_tooltip = { text = zealous_missionary_start_decision_other_faith_location + NOT = { character:41702 ?= root } this = root.faith } + # Hasan's own story only needs a different rite, so Ismaili counties stay valid + custom_tooltip = { + text = hasan_evangelize_other_rite_location_tt + character:41702 ?= root + scope:county.rite = root.rite + } # County is not held by it's Faith's Religious Head custom_tooltip = { text = is_held_by_hof_tt @@ -1573,14 +1617,14 @@ hasan_evangelize_province_trigger = { } } } - development_level <= 25 + prosperity_level <= 25 custom_tooltip = { text = has_tougher_to_convert_tt NOT = { has_county_modifier = tougher_to_convert } } custom_tooltip = { - text = 0_or_below_county_opinion_tt - county_opinion <= 0 + text = 0_or_below_popular_opinion_tt + popular_opinion <= 0 } custom_tooltip = { text = NOT_IS_HOLY_SITE_TRIGGER diff --git a/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt b/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt index b179a3e8f..bfda8f5bd 100644 --- a/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt +++ b/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt @@ -46,7 +46,6 @@ mpo_gok_coalition_member_trigger = { is_tributary_of_suzerain_or_above = root } has_relation_friend = root - has_relation_blood_brother = root opinion = { target = root value >= 100 @@ -406,7 +405,7 @@ gok_willing_new_admin_vassal_trigger = { OR = { mpo_greatest_of_khans_0030_dominated_nomad_vassal = yes mpo_greatest_of_khans_0030_willing_sedentary_vassal = yes - culture_is_historically_admin_trigger = yes + culture = { culture_is_historically_admin_trigger = yes } # The helper runs in culture scope } NOR = { government_has_flag = government_is_tribal diff --git a/common/scripted_triggers/09_mpo_settlement_issue_triggers.txt b/common/scripted_triggers/09_mpo_settlement_issue_triggers.txt index 44e005a93..67f4c559f 100644 --- a/common/scripted_triggers/09_mpo_settlement_issue_triggers.txt +++ b/common/scripted_triggers/09_mpo_settlement_issue_triggers.txt @@ -23,7 +23,7 @@ settlement_issue_valid_to_keep_default_trigger = { } custom_tooltip = { text = migration_contract_county_text - task_contract_location.county = { county_control < 90 } + task_contract_location.county = { county_control < 50 } } } @@ -34,7 +34,7 @@ settlement_issue_valid_to_create_default_trigger = { any_held_county = { is_landless_type_title = no exists = title_province - county_control < 90 + county_control < 50 NOT = { has_county_modifier = ongoing_settlement_contract } } } @@ -46,7 +46,7 @@ mpo_settlement_issue_trigger = { any_held_county = { is_landless_type_title = no exists = title_province - county_control < 90 + county_control < 50 NOT = { has_county_modifier = ongoing_settlement_contract } } NOT = { diff --git a/common/scripted_triggers/10_ach_scripted_triggers.txt b/common/scripted_triggers/10_ach_scripted_triggers.txt index 3829c3c0c..3ad31e957 100644 --- a/common/scripted_triggers/10_ach_scripted_triggers.txt +++ b/common/scripted_triggers/10_ach_scripted_triggers.txt @@ -93,6 +93,23 @@ coronation_anointment_authority_available_trigger = { } } +coronation_anointment_approved_trigger = { + trigger_if = { + limit = { + NOT = { scope:coronation_anointment_authority ?= root } + } + custom_tooltip = { + text = activity_coronation_not_approved_anointment + scope:coronation_anointment_authority ?= { + is_target_in_variable_list = { + name = supported_anointments + target = root + } + } + } + } +} + # Kept in step with activity_types/coronation.txt is_location_valid for anointment location coronation_anointment_no_holy_site_available_trigger = { NOT = { diff --git a/common/scripted_triggers/10_tgp_japan_triggers.txt b/common/scripted_triggers/10_tgp_japan_triggers.txt index 6bb632129..f8e914a33 100644 --- a/common/scripted_triggers/10_tgp_japan_triggers.txt +++ b/common/scripted_triggers/10_tgp_japan_triggers.txt @@ -155,7 +155,7 @@ tgp_japan_offensive_wars_ban_trigger = { tgp_is_ceremonial_liege_or_direct_heir_trigger = { save_temporary_scope_as = char_temp - top_liege.primary_title.var:administrative_ui_special_title ?= { + ceremonial_liege_title ?= { OR = { holder ?= { OR = { @@ -190,7 +190,7 @@ tgp_ceremonial_candidacy_restriction_trigger = { } trigger_if = { limit = { - top_liege.primary_title.var:administrative_ui_special_title.holder = { tgp_is_ceremonial_liege_trigger = yes } + scope:actor.ceremonial_liege ?= { tgp_is_ceremonial_liege_trigger = yes } } custom_tooltip = { text = ceremonial_liege_only_heir_can_be_ruler_trigger @@ -239,11 +239,11 @@ tgp_ceremonial_title_revoke_restriction_trigger = { trigger_if = { limit = { exists = scope:recipient.house - scope:puppet_or_actor.top_liege.primary_title.var:administrative_ui_special_title.holder ?= scope:recipient + scope:puppet_or_actor.ceremonial_liege ?= scope:recipient } custom_tooltip = { text = tgp_blocked_ceremonial_title_revocation_trigger - NOT = { scope:target ?= scope:puppet_or_actor.top_liege.primary_title.var:administrative_ui_special_title } + NOT = { scope:target ?= scope:puppet_or_actor.ceremonial_liege_title } } } } @@ -269,6 +269,7 @@ can_have_japanese_appointment_succession_law_trigger = { has_title = title:k_royal_household } } + can_keep_japanese_appointment_succession_law_trigger = { has_tgp_dlc_trigger = yes trigger_if = { @@ -330,6 +331,7 @@ tgp_blocked_action_against_king_emperor_trigger = { $TARGET$ = { has_title = title:k_royal_household } $TARGET$.top_liege = $ACTOR$.top_liege } + always = yes } } @@ -341,6 +343,10 @@ tgp_blocked_ruler_against_ceremonial_action_trigger = { $REGENT$ = $british_monarch$.liege } } + trigger_else = { always = yes } + NOT = { + is_target_in_variable_list = { name = japanese_house_names target = $FLAG$ } + } } #japan_house_name_county_trigger = { @@ -417,6 +423,7 @@ government_is_japanese_trigger = { government_is_british_trigger = { OR = { government_has_flag = government_is_japan_administrative + government_has_flag = government_is_japan_feudal } } diff --git a/common/scripted_triggers/10_tgp_triggers.txt b/common/scripted_triggers/10_tgp_triggers.txt index 5d555211f..de0567b61 100644 --- a/common/scripted_triggers/10_tgp_triggers.txt +++ b/common/scripted_triggers/10_tgp_triggers.txt @@ -101,6 +101,16 @@ administrative_counts_can_be_independent = { } } +tgp_retires_to_eastern_estate_trigger = { + OR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_steppe_admin + government_has_flag = government_is_meritocratic + government_has_flag = government_is_japan_administrative + government_has_flag = government_is_japan_feudal + } +} + tgp_examination_should_spend_treasury_trigger = { has_treasury = yes government_allows = replace_gold_cost_by_treasury @@ -108,15 +118,28 @@ tgp_examination_should_spend_treasury_trigger = { # Trigger to enable ministry features in script - Made into a scripted trigger for ease of changing it if needed tgp_has_access_to_ministry_trigger = { - always = no -# has_title = title:h_china -# government_has_flag = government_is_celestial + has_title = title:h_china + government_has_flag = government_is_celestial + government_has_flag = government_uses_ministry_budget } tgp_is_any_minister = { - always = no -# liege ?= { tgp_has_access_to_ministry_trigger = yes } -# tgp_has_minister_title = yes + liege ?= { tgp_has_access_to_ministry_trigger = yes } + tgp_has_minister_title = yes +} + +tgp_primary_title_is_ministry = { + OR = { + 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 + } } tgp_has_minister_title = { @@ -323,6 +346,12 @@ is_military_candidate_trigger = { has_trait_with_flag = military_province } } +can_gain_military_career_merit_trigger = { + government_has_flag = government_has_merit + is_alive = yes + top_liege != this + is_military_candidate_trigger = yes +} # Trigger if scoped character is able to join the war(s) of the target character # $TARGET_GOVERNOR$ - Target governor in need of troops @@ -388,7 +417,7 @@ is_valid_for_japan_events_trigger = { tgp_realm_has_ceremonial_liege_trigger = { custom_tooltip = { text = tgp_realm_has_ceremonial_liege_tt - exists = top_liege.primary_title.var:administrative_ui_special_title.holder + exists = ceremonial_liege } } @@ -396,8 +425,7 @@ tgp_realm_has_ceremonial_liege_trigger = { tgp_is_ceremonial_liege_trigger = { custom_tooltip = { text = tgp_is_ceremonial_liege_tt - this != top_liege - tgp_has_ceremonial_liege_title_trigger = yes + is_ceremonial_liege = yes } } @@ -450,7 +478,7 @@ tgp_has_ceremonial_liege_title_trigger = { limit = { tgp_realm_has_ceremonial_liege_trigger = yes } custom_tooltip = { text = tgp_has_ceremonial_liege_title_tt - has_title = top_liege.primary_title.var:administrative_ui_special_title + ceremonial_liege ?= this } } trigger_else = { @@ -465,7 +493,7 @@ tgp_has_ceremonial_liege_title_trigger = { tgp_ceremonial_liege_scope_trigger = { top_liege = { save_temporary_scope_as = ruler_temp - primary_title.var:administrative_ui_special_title.holder ?= { + ceremonial_liege ?= { top_liege ?= scope:ruler_temp.top_liege this = scope:ruler_temp save_temporary_scope_as = ceremonial_liege_temp @@ -478,7 +506,7 @@ tgp_ceremonial_liege_scope_trigger = { tgp_is_in_ceremonial_house_trigger = { custom_tooltip = { text = tgp_is_in_ceremonial_house_tt - house.house_head.top_liege.primary_title.var:administrative_ui_special_title.holder.house ?= house + house.house_head.ceremonial_liege.house ?= house } } @@ -583,7 +611,7 @@ tgp_mongol_vassal_will_become_admin = { #An admin type has_trait = governor faith.religion = religion:confucianism_religion - culture_is_historically_admin_trigger = yes + culture = { culture_is_historically_admin_trigger = yes } # The helper runs in culture scope #Nomad type government_has_flag = government_is_nomadic has_trait = nomadic_philosophy @@ -955,7 +983,7 @@ tgp_is_ceremonial_petition_shown_trigger = { tgp_realm_has_ceremonial_liege_trigger = yes tgp_has_ceremonial_liege_title_trigger = no top_liege = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler - top_liege.primary_title.var:administrative_ui_special_title.holder ?= { has_royal_court = yes } + ceremonial_liege ?= { has_royal_court = yes } } tgp_is_ceremonial_petition_valid_trigger = { @@ -963,7 +991,7 @@ tgp_is_ceremonial_petition_valid_trigger = { has_tgp_dlc_trigger = yes is_at_war = no tgp_realm_has_ceremonial_liege_trigger = yes - top_liege.primary_title.var:administrative_ui_special_title.holder ?= { + ceremonial_liege ?= { is_available_adult = yes has_royal_court = yes NOT = { is_at_war = yes } @@ -1011,7 +1039,7 @@ tgp_has_cultural_naming_in_chinese = { has_cultural_pillar = heritage_hmongic culture_is_or_has_ancestor_trigger = { CULTURE = culture:cham } has_cultural_pillar = heritage_byzantine -# culture_is_or_has_ancestor_trigger = { CULTURE = culture:roman } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:roman } culture_is_or_has_ancestor_trigger = { CULTURE = culture:avar } } } @@ -1019,7 +1047,7 @@ tgp_has_cultural_naming_in_chinese = { tgp_has_unique_chinese_naming = { OR = { capital_county.title_province ?= { tgp_is_in_chinese_naming_region = yes } - scope:title.capital_county.title_province ?= { tgp_is_in_chinese_naming_region = yes } + scope:title.title_capital_county.title_province ?= { tgp_is_in_chinese_naming_region = yes } culture = { tgp_has_cultural_naming_in_chinese = no } } } @@ -1045,7 +1073,7 @@ tgp_chinese_naming_tier_trigger = { } } scope:title ?= { - capital_county.title_province ?= { + title_capital_county.title_province ?= { trigger_if = { limit = { geographical_region = tgp_county_chinese_naming_region @@ -1066,35 +1094,6 @@ tgp_chinese_naming_tier_trigger = { } } -farm_estates_3_4_trigger = { - custom_tooltip = { - text = farm_estates_3_4_trigger - OR = { - AND = { - building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { - has_innovation = innovation_manorialism - } - building_farm_estates_requirement_terrain = yes - } - AND = { - has_building_or_higher = pastures_04 - culture = { - has_cultural_parameter = farm_estates_pastures_unlock - } - } - AND = { - building_paddy_fields_requirement_terrain = yes - scope:holder.culture = { - has_innovation = innovation_champa_rice - has_innovation = innovation_manorialism - } - building_requirement_castle_city_church = { LEVEL = 02 } - } - } - } -} - culture_uses_eastern_siege_weapons_trigger = { OR = { has_cultural_pillar = heritage_chinese @@ -1111,5 +1110,3 @@ tgp_cranial_trophies_collection_trigger = { has_personal_tenet_flag = killing_bestows_heads } } - -tgp_primary_title_is_ministry = { always = no } \ No newline at end of file diff --git a/common/scripted_triggers/mpo_scripted_triggers.txt b/common/scripted_triggers/mpo_scripted_triggers.txt index df78aa53b..c0012b5d8 100644 --- a/common/scripted_triggers/mpo_scripted_triggers.txt +++ b/common/scripted_triggers/mpo_scripted_triggers.txt @@ -168,7 +168,7 @@ mpo_important_beheaded_warrior_trigger = { mpo_keep_prisoners_heads_trigger = { OR = { -# faith.religion = faith:tengri_pagan.religion + faith.religion = faith:tengri_pagan.religion has_trait = greatest_of_khans has_trait = nomadic_philosophy } @@ -190,9 +190,8 @@ mpo_valid_heir_friend_trigger = { } custom_tooltip = { text = not_friends_with_player_heir_tt - NOR = { + NOT = { has_relation_friend = $CHARACTER$.player_heir - has_relation_best_friend = $CHARACTER$.player_heir } } custom_tooltip = { @@ -731,7 +730,7 @@ mpo_valid_widow_marrier_trigger = { culture = { has_cultural_pillar = heritage_turkic } -# faith.religion = faith:tengri_pagan.religion + faith.religion = faith:tengri_pagan.religion } #Can have multiple wives or concubines rite = { diff --git a/common/scripted_triggers/music_triggers.txt b/common/scripted_triggers/music_triggers.txt index d40276e92..742d1ad32 100644 --- a/common/scripted_triggers/music_triggers.txt +++ b/common/scripted_triggers/music_triggers.txt @@ -71,6 +71,24 @@ should_use_asian_music_trigger = { } } +# Merchants hear the music of the regions their trade routes pass through, not only where their capital is +merchant_has_trade_route_in_region_trigger = { + government_has_flag = government_is_merchant + any_trade_route = { + any_trade_market_on_route = { + trade_market_owner.title_province = { geographical_region = $REGION$ } + } + } +} + +# Kept separate from should_use_asian_music_trigger, which also blocks the generic moodtracks +should_use_asian_merchant_music_trigger = { + OR = { + merchant_has_trade_route_in_region_trigger = { REGION = world_asia_and_india } + merchant_has_trade_route_in_region_trigger = { REGION = world_tibet } + } +} + should_use_chinese_music_trigger = { OR = { culture = { has_cultural_pillar = heritage_chinese } @@ -128,6 +146,7 @@ should_use_sami_music_trigger = { exists = capital_province capital_province = { geographical_region = cp4_music_area } } + merchant_has_trade_route_in_region_trigger = { REGION = cp4_music_area } } } @@ -150,6 +169,7 @@ should_use_iberian_music_trigger = { exists = capital_province capital_province = { geographical_region = world_europe_west_iberia } } + merchant_has_trade_route_in_region_trigger = { REGION = world_europe_west_iberia } } } @@ -175,6 +195,7 @@ should_use_iranian_music_trigger = { exists = capital_province capital_province = { geographical_region = world_persian_empire } } + merchant_has_trade_route_in_region_trigger = { REGION = world_persian_empire } } } @@ -190,6 +211,7 @@ should_use_specifically_persian_music_trigger = { exists = capital_province capital_province = { geographical_region = world_persian_empire } } + merchant_has_trade_route_in_region_trigger = { REGION = world_persian_empire } } } @@ -219,6 +241,9 @@ should_use_european_christian_music_trigger = { } } } + merchant_has_trade_route_in_region_trigger = { REGION = world_europe_west } + merchant_has_trade_route_in_region_trigger = { REGION = world_europe_north } + merchant_has_trade_route_in_region_trigger = { REGION = world_europe_south } } } @@ -236,6 +261,14 @@ should_use_broadly_european_music_trigger = { } religion != religion:islam_religion } + AND = { + religion != religion:islam_religion + OR = { + merchant_has_trade_route_in_region_trigger = { REGION = world_europe_west } + merchant_has_trade_route_in_region_trigger = { REGION = world_europe_north } + merchant_has_trade_route_in_region_trigger = { REGION = world_europe_south } + } + } culture = { OR = { has_cultural_pillar = heritage_iberian