From a5700e12245501493f683f4db0c4f7d666d2fb51 Mon Sep 17 00:00:00 2001 From: IhateTrains Date: Sat, 28 Sep 2024 13:02:46 +0100 Subject: [PATCH] Fixes for CK3 1.13 compatibility (#2236) #patch --- ImperatorToCK3/CK3/Titles/Title.cs | 2 + .../20_germanic_religious_decisions.txt | 4 +- .../dynasty_houses_to_preserve.txt | 3 +- .../configurables/removable_file_blocks.txt | 702 +++++++++++++++++- 4 files changed, 708 insertions(+), 3 deletions(-) diff --git a/ImperatorToCK3/CK3/Titles/Title.cs b/ImperatorToCK3/CK3/Titles/Title.cs index fe677d370..2786cf952 100644 --- a/ImperatorToCK3/CK3/Titles/Title.cs +++ b/ImperatorToCK3/CK3/Titles/Title.cs @@ -1033,6 +1033,7 @@ public IDictionary GetDeFactoVassalsAndBelow(Date date, string ra [commonItems.Serialization.NonSerialized] public string Id { get; } // e.g. d_latium [commonItems.Serialization.NonSerialized] public TitleRank Rank { get; private set; } = TitleRank.duchy; [SerializedName("landless")] public bool Landless { get; private set; } = false; + [SerializedName("require_landless")] public bool? RequireLandless { get; private set; } [SerializedName("definite_form")] public bool HasDefiniteForm { get; private set; } = false; //This line keeps the Seleucids Seleucid and not "[Dynasty]s" @@ -1103,6 +1104,7 @@ private void RegisterKeys(Parser parser) { parser.RegisterKeyword("definite_form", reader => HasDefiniteForm = reader.GetBool()); parser.RegisterKeyword("ruler_uses_title_name", reader => RulerUsesTitleName = reader.GetBool()); parser.RegisterKeyword("landless", reader => Landless = reader.GetBool()); + parser.RegisterKeyword("require_landless", reader => RequireLandless = reader.GetBool()); parser.RegisterKeyword("color", reader => { try { Color1 = colorFactory.GetColor(reader); diff --git a/ImperatorToCK3/Data_Files/blankMod/output/common/decisions/20_germanic_religious_decisions.txt b/ImperatorToCK3/Data_Files/blankMod/output/common/decisions/20_germanic_religious_decisions.txt index 9fd3c7a44..f9dd91747 100644 --- a/ImperatorToCK3/Data_Files/blankMod/output/common/decisions/20_germanic_religious_decisions.txt +++ b/ImperatorToCK3/Data_Files/blankMod/output/common/decisions/20_germanic_religious_decisions.txt @@ -2,7 +2,9 @@ # Raise an Irminsul raise_irminsul_decision = { - picture = "gfx/interface/illustrations/decisions/decision_personal_religious.dds" + picture = { + reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds" + } desc = raise_irminsul_decision_desc selection_tooltip = raise_irminsul_decision_tooltip diff --git a/ImperatorToCK3/Data_Files/configurables/dynasty_houses_to_preserve.txt b/ImperatorToCK3/Data_Files/configurables/dynasty_houses_to_preserve.txt index cbceebead..63ce16258 100644 --- a/ImperatorToCK3/Data_Files/configurables/dynasty_houses_to_preserve.txt +++ b/ImperatorToCK3/Data_Files/configurables/dynasty_houses_to_preserve.txt @@ -10,4 +10,5 @@ house_uriankhai # referenced in common\scripted_character_templates\00_mongol_te house_harmaytan # referenced in common\scripted_character_templates\04_fp3_character_templates.txt house_tusi # referenced in common\scripted_character_templates\04_fp3_character_templates.txt house_tumert # referenced in common\scripted_effects\00_almohad_invasion_effects.txt -house_almohad # referenced in common\scripted_effects\00_almohad_invasion_effects.txt \ No newline at end of file +house_almohad # referenced in common\scripted_effects\00_almohad_invasion_effects.txt +house_prum # referenced in common\scripted_effects\00_historical_characters_scripted_effects.txt \ No newline at end of file diff --git a/ImperatorToCK3/Data_Files/configurables/removable_file_blocks.txt b/ImperatorToCK3/Data_Files/configurables/removable_file_blocks.txt index 871d0a5f7..ff265e345 100644 --- a/ImperatorToCK3/Data_Files/configurables/removable_file_blocks.txt +++ b/ImperatorToCK3/Data_Files/configurables/removable_file_blocks.txt @@ -92,6 +92,52 @@ set_primary_title_to = title:k_bavaria } } + + { + # EP3, Hasan story cycle stuff + if = { + limit = { + root = character:3096 + } + save_scope_as = ismaili_caliph + character:41702 ?= { + trigger_event = { + id = hasan_sabbah.1030 + days = 1 + } + } + } + if = { + limit = { + character:41702 ?= { + any_owned_story = { + story_type = story_hasan + var:ultimate_foe ?= root + } + } + } + character:41702 = { + random_owned_story = { + limit = { story_type = story_hasan } + if = { + limit = { + scope:killer = character:41702 + } + hasan_sabbah_end_war = { + HASAN = character:41702 + SELJUK = root + } + } + else = { + set_variable = { + name = ultimate_foe + value = root.player_heir + } + } + } + } + } + } } "common/on_action/game_start.txt" = { @@ -176,6 +222,69 @@ character:90107 = { give_nickname = nick_the_german_post_mortem } } } + { + ### 1178 - SIBYLLA ### + if = { + limit = { + exists = character:223522 + current_date >= 1178.1.1 + AND = { + character:223541 = { + is_ai = yes + is_alive = yes + } + } + } + character:223522 = { + trigger_event = { + id = bookmark.0300 + days = { 21 28 } + } + } + } + } + { + if = { + limit = { + game_start_date >= 1178.10.1 + } + character:st_amand_1 = { + save_scope_as = leader + } + character:223523 = { + save_scope_as = founder + } + title:b_saida = { + save_scope_as = barony + } + create_holy_order_neutral_effect = { + LEADER = scope:leader + CAPITAL = scope:barony + NEW_HO_SCOPE = new_holy_order + FOUNDER = scope:founder + } + } + if = { + limit = { + game_start_date >= 1178.10.1 + } + character:231000 = { + save_scope_as = leader + } + character:223523 = { + save_scope_as = founder + } + title:b_hebron = { + save_scope_as = barony + } + create_holy_order_neutral_effect = { + LEADER = scope:leader + CAPITAL = scope:barony + NEW_HO_SCOPE = new_holy_order + FOUNDER = scope:founder + } + } + } { # UNITY CONFIG ## 867. @@ -1862,6 +1971,94 @@ create_artifact_wall_sword_attila_effect = { } } +"common\scripted_effects\00_ep1_artifact_creation_effects.txt" = { + { + 10 = { #Crown of Justinian + trigger = { + NOT = { + any_artifact = { has_variable = crown_of_justinian } + } + $LOCATION$ ?= { + OR = { + geographical_region = custom_eastern_roman_empire + culture = { has_cultural_pillar = heritage_byzantine } + } + } + } + create_artifact_pedestal_justinian_effect = { OWNER = root } + } + } + + { + 10 = { #Attila's Sword + trigger = { + NOT = { + any_artifact = { has_variable = sword_attila } + } + $LOCATION$ ?= { + OR = { + geographical_region = custom_south_slavia + geographical_region = custom_carpathia + geographical_region = ghw_region_crimea + geographical_region = custom_bavaria + } + } + } + create_artifact_wall_sword_attila_effect = { OWNER = root } + } + } + + { + 10 = { #Throne of Scone + trigger = { + NOT = { + any_artifact = { has_variable = throne_scone } + } + $LOCATION$ ?= { geographical_region = world_europe_west_britannia } + } + create_artifact_throne_scone_effect = { OWNER = root } + } + } + + { + 10 = { #Throne of Charlemagne - Recreate if lost + trigger = { + NOT = { + any_artifact = { has_variable = charlamagne_throne } + } + $LOCATION$ ?= { + OR = { + geographical_region = custom_carolingian_francia + geographical_region = custom_carolingian_germany + geographical_region = custom_lotharingia + geographical_region = custom_northern_italy + } + } + } + create_artifact_throne_charlemagne_effect = { OWNER = root } + } + } + + { + 10 = { #Head of St Edmund + trigger = { + NOT = { + any_artifact = { + has_variable = edmund_head + } + } + $LOCATION$ ?= { + OR = { + geographical_region = world_europe_west_britannia + geographical_region = world_europe_north + } + } + } + create_artifact_edmund_head_effect = { OWNER = root } + } + } +} + "common\scripted_effects\01_dlc_fp3_scripted_effects.txt" = { { set_coa = house:house_seljuk @@ -4119,4 +4316,507 @@ fp3_decision.0011 = { } } } -} \ No newline at end of file +} + +"common\decisions\dlc_decisions\ep_3\06_ep3_hasan_story_cycle_decisions.txt" = { + # Hassan Sabbah, the founder of Assasins + { +############################################# +# Do some basic missionary work # +# by James Beaumont # +############################################# + +hasan_evangelize_the_faith = { + picture = { + reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_secret_faith.dds" + } + sort_order = 500 + ai_check_interval = 120 + + desc = hasan_evangelize_the_faith_desc + selection_tooltip = hasan_evangelize_the_faith_tooltip + decision_group_type = adventurer + + cooldown = { months = 1 } + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + is_landed = no + any_owned_story = { + story_type = story_hasan + } + } + + is_valid = { + domicile.domicile_location.county ?= { + OR = { + hasan_evangelize_province_trigger = yes + custom_tooltip = { + text = or_a_neigbouring_county_tt + save_temporary_scope_as = county_check + any_neighboring_county = { + hasan_evangelize_province_trigger = yes + holder.top_liege = scope:county_check.holder.top_liege + } + } + } + } + } + + is_valid_showing_failures_only = { + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + } + + cost = { piety = 250 } + + effect = { + domicile.domicile_location.county ?= { + if = { + limit = { hasan_evangelize_province_trigger = yes } + save_scope_as = location + } + else = { + save_temporary_scope_as = county_check + random_neighboring_county = { + limit = { + hasan_evangelize_province_trigger = yes + holder.top_liege = scope:county_check.holder.top_liege + } + save_scope_as = location + } + } + } + trigger_event = hasan_sabbah.1010 + } + + ai_potential = { this = character:41702 } + + ai_will_do = { + base = 200 + } +} +############################################# +# Do some RADICAL missionary work πŸ•ΆπŸ€™ # +# by James Beaumont # +############################################# + +hasan_agitate_the_populace = { + picture = { + reference = "gfx/interface/illustrations/decisions/fp3/antagonistic.dds" + } + sort_order = 500 + ai_check_interval = 120 + + desc = hasan_agitate_the_populace_desc + selection_tooltip = hasan_agitate_the_populace_tooltip + decision_group_type = adventurer + + cooldown = { months = 1 } + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + is_landed = no + any_owned_story = { + story_type = story_hasan + } + hasan_camp_in_foes_realm_trigger = yes + } + + is_valid = { + OR = { + domicile.domicile_location.county = { + NOT = { faith = root.faith } + NOT = { has_county_modifier = ep3_agitated_populace } + NOT = { has_county_modifier = tougher_to_convert } + } + custom_tooltip = { + text = or_a_neigbouring_county_tt + domicile.domicile_location.county = { + save_temporary_scope_as = county_check + any_neighboring_county = { + NOT = { faith = root.faith } + NOT = { has_county_modifier = ep3_agitated_populace } + NOT = { has_county_modifier = tougher_to_convert } + holder.top_liege = scope:county_check.holder.top_liege + } + } + } + } + } + + is_valid_showing_failures_only = { + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + } + + cost = { prestige = 250 } + + effect = { + if = { + limit = { + domicile.domicile_location.county = { + NOT = { faith = root.faith } + NOT = { has_county_modifier = ep3_agitated_populace } + NOT = { has_county_modifier = tougher_to_convert } + } + } + domicile.domicile_location.county = { save_scope_as = location } + } + else = { + domicile.domicile_location.county = { + save_temporary_scope_as = county_check + random_neighboring_county = { + limit = { + NOT = { faith = root.faith } + NOT = { has_county_modifier = ep3_agitated_populace } + NOT = { has_county_modifier = tougher_to_convert } + holder.top_liege = scope:county_check.holder.top_liege + } + save_scope_as = location + } + } + } + trigger_event = hasan_sabbah.1040 + } + + ai_potential = { this = character:41702 } + + ai_will_do = { + base = 200 + } +} +############################################# +# Become death, destroyer of Seljuks # +# by James Beaumont # +############################################# +hasan_ignite_the_flames = { + picture = { + reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_strength.dds" + } + sort_order = 500 + ai_check_interval = 120 + + desc = hasan_ignite_the_flames_desc + selection_tooltip = hasan_ignite_the_flames_tooltip + decision_group_type = adventurer + + cooldown = { months = 1 } + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + any_owned_story = { + story_type = story_hasan + } + hasan_camp_in_foes_realm_trigger = yes + } + + is_valid = { + is_at_war = no + custom_tooltip = { + text = at_least_5_counties_are_nizari + domicile.domicile_location.county.holder.top_liege = { + any_sub_realm_county = { + count >= 5 + faith = root.faith + } + } + } + } + + is_valid_showing_failures_only = { + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + } + + cost = { + prestige = 250 + } + + effect = { + random_owned_story = { + limit = { + story_type = story_hasan + } + var:ultimate_foe = { save_scope_as = ultimate_foe } + } + hasan_sabbah_ignite_decision_effect = yes + } + + ai_potential = { this = character:41702 } + + ai_will_do = { + base = 200 + } +} + +############################################# +# Found the Assassins # +# by James Beaumont # +############################################# +hasan_found_the_assassins = { + picture = { + reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_sunder.dds" + } + sort_order = 500 + ai_check_interval = 120 + + desc = hasan_found_the_assassins_desc + selection_tooltip = hasan_found_the_assassins_tooltip + decision_group_type = adventurer + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + any_owned_story = { + story_type = story_hasan + NOT = { exists = var:assassins } + } + is_landed = no + faith = faith:nizari + NOT = { + has_character_flag = founded_assassins_already + } + hasan_camp_in_foes_realm_trigger = yes + domicile.domicile_location.barony = { is_leased_out = no } + } + + is_valid = { + domicile.domicile_location.county.faith = root.faith + custom_tooltip = { + text = is_mountainous_desc + domicile.domicile_location = { is_mountainous_trigger = yes } + } + domicile.domicile_location = { + is_county_capital = no + } + } + + is_valid_showing_failures_only = { + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + } + + cost = { piety = 1500 } + + effect = { + domicile.domicile_location = { save_scope_as = location } + if = { + limit = { + scope:location = { + has_holding = no + } + } + if = { + limit = { + scope:location.county.holder = { + government_has_flag = government_is_tribal + } + } + scope:location = { + set_holding_type = church_holding + } + } + else = { + scope:location = { + set_holding_type = castle_holding + } + } + } + create_character = { + template = holy_order_leader_character + location = scope:location + save_scope_as = leader + } + hidden_effect = { + create_title_and_vassal_change = { + type = leased_out + save_scope_as = change + add_claim_on_loss = no + } + scope:location.barony = { + change_title_holder_include_vassals = { + holder = scope:location.barony.holder.top_liege + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + create_holy_order = { + leader = scope:leader + capital = scope:location.barony + save_scope_as = new_holy_order + } + scope:new_holy_order ?= { + title = { set_title_name = holy_order_hashshashin } + } + create_holy_order_effect = yes + random_owned_story = { + limit = { story_type = story_hasan } + set_variable = { + name = assassins + value = scope:new_holy_order + } + } + add_character_flag = founded_assassins_already + scope:location = { + if = { + limit = { + has_special_building = no + } + add_special_building = assassin_castle_01 + } + else_if = { + limit = { + has_building_or_higher = alamut_castle_01 + } + hidden_effect = { + remove_building = alamut_castle_01 + } + add_special_building = alamut_castle_02 + } + } + add_intrigue_skill = 2 + give_nickname = nick_old_man_of_the_mountain + } + + ai_potential = { this = character:41702 } + + ai_will_do = { + base = 200 + } +} + +############################################# +# Expand the Assassins # +# by James Beaumont # +############################################# +hasan_expand_the_assassins = { + picture = { + reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_foundation.dds" + } + sort_order = 500 + ai_check_interval = 120 + + desc = hasan_expand_the_assassins_desc + selection_tooltip = hasan_expand_the_assassins_tooltip + decision_group_type = adventurer + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + any_owned_story = { + story_type = story_hasan + has_variable = assassins + } + is_landed = no + faith = faith:nizari + hasan_camp_in_foes_realm_trigger = yes + domicile.domicile_location.barony = { is_leased_out = no } + } + + is_valid = { + domicile.domicile_location.county.faith = root.faith + custom_tooltip = { + text = is_mountainous_desc + domicile.domicile_location = { is_mountainous_trigger = yes } + } + } + + is_valid_showing_failures_only = { + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + domicile.domicile_location = { is_county_capital = no } + } + + cost = { piety = 250 } + + effect = { + random_owned_story = { + limit = { + story_type = story_hasan + } + var:assassins = { save_scope_as = assassins } + } + show_as_tooltip = { + domicile.domicile_location.barony = { lease_out_to = scope:assassins } + } + hidden_effect = { + if = { + limit = { NOT = { domicile.domicile_location.barony.holder = root } } + create_title_and_vassal_change = { + type = leased_out + save_scope_as = change + add_claim_on_loss = no + } + domicile.domicile_location.barony = { + change_title_holder_include_vassals = { + holder = domicile.domicile_location.barony.holder.top_liege + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + domicile.domicile_location.barony = { lease_out_to = scope:assassins } + } + } + } + + ai_potential = { this = character:41702 } + + ai_will_do = { + base = 200 + } +} + } +} + +"common\casus_belli_types\00_event_war.txt" = { + { + #Hereward the Wake departs for the Fenlands + character:90028 = { save_scope_as = hereward } + + if = { + limit = { + exists = scope:hereward + } + + scope:hereward = { + trigger_event = { + id = ep3_laamps.6000 + days = { 1 2 } + } + } + } + + #Eadgar becomes a LAAMP + character:112 = { save_scope_as = eadgar } + + if = { + limit = { + exists = scope:eadgar + } + + scope:eadgar = { + trigger_event = { + id = ep3_laamps.7000 + days = { 1 2 } + } + } + } + } +} + +"common\decisions\dlc_decisions\ep_3\06_ep3_laamp_decisions.txt" = { + { + #Stahp it, John de Courcy + this = character:214000 + } +}