diff --git a/common/on_action/yearly_on_actions.txt b/common/on_action/yearly_on_actions.txt index cde6b779..b4ef78a9 100644 --- a/common/on_action/yearly_on_actions.txt +++ b/common/on_action/yearly_on_actions.txt @@ -2663,6 +2663,7 @@ three_year_pool_pulse = { } } 100 = courtier_guest_management.4001 # Wanderer becomes an adventurer + 100 = courtier_guest_management.4002 } } diff --git a/common/scripted_character_templates/00_pool_repopulation_character_templates.txt b/common/scripted_character_templates/00_pool_repopulation_character_templates.txt index 82b7a37f..52e03595 100644 --- a/common/scripted_character_templates/00_pool_repopulation_character_templates.txt +++ b/common/scripted_character_templates/00_pool_repopulation_character_templates.txt @@ -876,9 +876,6 @@ pool_repopulate_local_flavor = { geographical_region = world_europe geographical_region = world_asia_minor } - NOT = { - geographical_region = world_europe_west_iberia - } } } } @@ -887,38 +884,17 @@ pool_repopulate_local_flavor = { root.faith = { religion = { is_in_family = rf_pagan } } } } - culture:sephardi = { + culture:NEOW_sephardi = { trigger = { root.capital_province = { - geographical_region = world_europe_west_iberia + geographical_region = world_europe } } } - culture:radhanite = { + culture:sharoni = { trigger = { root.capital_province = { - OR = { - geographical_region = world_steppe - geographical_region = world_india - } - } - } - } - culture:kochinim = { - trigger = { - root.capital_province = { - geographical_region = world_india - } - } - } - culture:bavlim = { - trigger = { - root.capital_province = { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - geographical_region = world_africa_north - } + geographical_region = world_europe } } } @@ -1169,6 +1145,7 @@ pool_repopulate_local_flavor = { lifestyle_hunter = {} } dynasty = none + after_creation = { random_list = { @@ -1199,58 +1176,7 @@ pool_repopulate_local_flavor = { culture = { has_cultural_pillar = heritage_israelite } } add_character_flag = ai_will_not_convert - random_list = { - 10 = { - set_character_faith = faith:rabbinism - } - 2 = { - trigger = { - root.capital_province.faith = { - religion_tag = christianity_religion - } - root.capital_province = { - geographical_region = world_europe_west_iberia - } - } - set_character_faith = faith:conversos - } - 40 = { - trigger = { - has_trait = lifestyle_mystic - } - set_character_faith = faith:merkabah - } - 20 = { - trigger = { - root.capital_province = { - OR = { - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - } - } - } - set_character_faith = faith:samaritan - } - 20 = { - trigger = { - root.capital_province = { - OR = { - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - } - } - } - set_character_faith = faith:karaism - } - 90 = { - trigger = { - root.capital_province = { - geographical_region = world_india - } - } - set_character_faith = faith:malabarism - } - } + set_character_faith = faith:congregationist if = { limit = { NOT = { @@ -1260,22 +1186,6 @@ pool_repopulate_local_flavor = { learn_language_of_culture = root.capital_province.culture } } - else_if = { - limit = { - culture = culture:greek - } - random_list = { - 10 = { - set_character_faith = faith:iconoclast - } - 10 = { - set_character_faith = faith:paulician - } - 10 = { - set_character_faith = faith:bogomilist - } - } - } else_if = { limit = { OR = { diff --git a/common/scripted_effects/07_dlc_ep3_scripted_effects.txt b/common/scripted_effects/07_dlc_ep3_scripted_effects.txt index 78be9a92..d7a18bcc 100644 --- a/common/scripted_effects/07_dlc_ep3_scripted_effects.txt +++ b/common/scripted_effects/07_dlc_ep3_scripted_effects.txt @@ -599,6 +599,7 @@ create_landless_minority_title_effect = { name = minority_creation_reason value = scope:minority_creation_reason } + set_title_name = minority_name set_variable = { name = minority_flavor_char value = scope:minority_flavor_char diff --git a/events/courtier_guest_management_events/courtier_guest_management_events.txt b/events/courtier_guest_management_events/courtier_guest_management_events.txt index c9b9b0b3..23f9f090 100644 --- a/events/courtier_guest_management_events/courtier_guest_management_events.txt +++ b/events/courtier_guest_management_events/courtier_guest_management_events.txt @@ -1387,3 +1387,67 @@ courtier_guest_management.4001 = { } } } + +courtier_guest_management.4002 = { + hidden = yes + trigger = { + has_ep3_dlc_trigger = yes + is_pool_character = yes # Can cease to be in the pool between it queuing and executing + ai_can_valid_to_create_laamp_trigger = yes + is_valid_for_laampdom = yes + OR = { + has_character_flag = easteregg + has_trait = historical_character + culture = { has_cultural_tradition = tradition_diasporic } + AND = { + is_lowborn = no + culture = { has_cultural_tradition = tradition_diasporic } + } + any_claim = { tier >= tier_kingdom } + } + pool_character_is_pruneable_trigger = no # Avoid having uninteresting characters become Adventurers + is_ai = yes + NOT = { + any_heir_title = { } + } + } + + immediate = { + random = { + chance = 0 + modifier = { add = ep3_laamp_chance_score_value } + #Counteract bonus in above value somewhat + modifier = { + culture = { has_cultural_tradition = tradition_diasporic } + add = 75 + } + modifier = { + has_trait = historical_character + add = 150 + } + create_landless_minority_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = root + } + if = { # Debug AI tracking + limit = { debug_only = yes } + if = { + limit = { exists = global_var:ai_wanderer_laamp_count } + change_global_variable = { + name = ai_wanderer_laamp_count + add = 1 + } + } + else = { + set_global_variable = { + name = ai_wanderer_laamp_count + value = 1 + } + } + debug_log = "AI became adventurer due to cultural tradition" + debug_log_scopes = yes + } + } + } +} +