diff --git a/ImperatorToCK3.UnitTests/CommonUtils/HistoryTests.cs b/ImperatorToCK3.UnitTests/CommonUtils/HistoryTests.cs index cd1af0505..8cd34ded7 100644 --- a/ImperatorToCK3.UnitTests/CommonUtils/HistoryTests.cs +++ b/ImperatorToCK3.UnitTests/CommonUtils/HistoryTests.cs @@ -1,6 +1,7 @@ using commonItems; using commonItems.Collections; using commonItems.Serialization; +using FluentAssertions; using ImperatorToCK3.CommonUtils; using System; using System.Collections.Generic; @@ -201,6 +202,39 @@ public void ContainerFieldValueCanBeAdded() { ); } + [Fact] + public void ConditionalOperatorIsSupported() { + var reader = new BufferedReader( + @"= { + domicile ?= { move_domicile = root.top_liege.capital_province } + culture ?= roman + insert ?= item1 + 750.1.2 = { + domicile ?= { move_domicile = root.capital_province } + culture ?= greek + remove ?= item1 + insert ?= item2 + } + }" + ); + + var provHistoryFactory = new HistoryFactory.HistoryFactoryBuilder() + .WithLiteralField("domicile", "domicile") + .WithSimpleField("culture", "culture", null) + .WithDiffField("diff_field", "insert", "remove") + .Build(); + + var provHistory = provHistoryFactory.GetHistory(reader); + + Assert.Equal("{ move_domicile = root.top_liege.capital_province }", provHistory.GetFieldValue("domicile", new Date(1, 1, 1))?.ToString()); + Assert.Equal("roman", provHistory.GetFieldValue("culture", new Date(1, 1, 1))!.ToString()); + provHistory.GetFieldValueAsCollection("diff_field", new Date(1, 1, 1)).Should().BeEquivalentTo(["item1"]); + + Assert.Equal("{ move_domicile = root.capital_province }", provHistory.GetFieldValue("domicile", new Date(750, 1, 2))?.ToString()); + Assert.Equal("greek", provHistory.GetFieldValue("culture", new Date(750, 1, 2))!.ToString()); + provHistory.GetFieldValueAsCollection("diff_field", new Date(750, 1, 2)).Should().BeEquivalentTo(["item2"]); + } + [Fact] public void HistoryCanBeSerialized() { var fields = new IdObjectCollection { diff --git a/ImperatorToCK3/CK3/Characters/Character.cs b/ImperatorToCK3/CK3/Characters/Character.cs index 045ef40d0..b225d300c 100644 --- a/ImperatorToCK3/CK3/Characters/Character.cs +++ b/ImperatorToCK3/CK3/Characters/Character.cs @@ -215,6 +215,7 @@ public string? DeathReason { .WithLiteralField("spawn_army", "spawn_army") .WithLiteralField("if", "if") .WithSimpleField("sexuality", "sexuality", null) + .WithLiteralField("domicile", "domicile") .Build(); public History History { get; } = historyFactory.GetHistory(); diff --git a/ImperatorToCK3/CK3/Characters/CharacterCollection.cs b/ImperatorToCK3/CK3/Characters/CharacterCollection.cs index c497441bd..5299c7991 100644 --- a/ImperatorToCK3/CK3/Characters/CharacterCollection.cs +++ b/ImperatorToCK3/CK3/Characters/CharacterCollection.cs @@ -479,7 +479,7 @@ public void PurgeUnneededCharacters(Title.LandedTitles titles, DynastyCollection Logger.Info("Purging unneeded characters..."); // Characters from CK3 that hold titles at the bookmark date should be kept. - var currentTitleHolderIds = titles.GetHolderIds(ck3BookmarkDate); + var currentTitleHolderIds = titles.GetHolderIdsForAllTitlesExceptNobleFamilyTitles(ck3BookmarkDate); var landedCharacters = this .Where(character => currentTitleHolderIds.Contains(character.Id)) .ToArray(); @@ -564,7 +564,7 @@ public void PurgeUnneededCharacters(Title.LandedTitles titles, DynastyCollection public void RemoveEmployerIdFromLandedCharacters(Title.LandedTitles titles, Date conversionDate) { Logger.Info("Removing employer id from landed characters..."); - var landedCharacterIds = titles.GetHolderIds(conversionDate); + var landedCharacterIds = titles.GetHolderIdsForAllTitlesExceptNobleFamilyTitles(conversionDate); foreach (var character in this.Where(character => landedCharacterIds.Contains(character.Id))) { character.History.Fields["employer"].RemoveAllEntries(); } diff --git a/ImperatorToCK3/CK3/Titles/LandedTitles.cs b/ImperatorToCK3/CK3/Titles/LandedTitles.cs index 9ff71f92d..6bb66af54 100644 --- a/ImperatorToCK3/CK3/Titles/LandedTitles.cs +++ b/ImperatorToCK3/CK3/Titles/LandedTitles.cs @@ -250,8 +250,10 @@ public override void Remove(string name) { return baronies.FirstOrDefault(b => provinceId == b?.ProvinceId, defaultValue: null); } - public ImmutableHashSet GetHolderIds(Date date) { - return this.Select(t => t.GetHolderId(date)).ToImmutableHashSet(); + public ImmutableHashSet GetHolderIdsForAllTitlesExceptNobleFamilyTitles(Date date) { + return this + .Where(t => t.NobleFamily != true) + .Select(t => t.GetHolderId(date)).ToImmutableHashSet(); } public ImmutableHashSet GetAllHolderIds() { return this.SelectMany(t => t.GetAllHolderIds()).ToImmutableHashSet(); diff --git a/ImperatorToCK3/CK3/Titles/Title.cs b/ImperatorToCK3/CK3/Titles/Title.cs index 401ba903e..990a42045 100644 --- a/ImperatorToCK3/CK3/Titles/Title.cs +++ b/ImperatorToCK3/CK3/Titles/Title.cs @@ -1020,6 +1020,7 @@ public IDictionary GetDeFactoVassalsAndBelow(Date date, string ra [SerializedName("destroy_if_invalid_heir")] public bool? DestroyIfInvalidHeir { get; set; } [SerializedName("destroy_on_succession")] public bool? DestroyOnSuccession { get; set; } [SerializedName("no_automatic_claims")] public bool? NoAutomaticClaims { get; set; } + [SerializedName("noble_family")] public bool? NobleFamily { get; set; } [SerializedName("always_follows_primary_heir")] public bool? AlwaysFollowsPrimaryHeir { get; set; } [SerializedName("de_jure_drift_disabled")] public bool? DeJureDriftDisabled { get; set; } [SerializedName("can_be_named_after_dynasty")] public bool? CanBeNamedAfterDynasty { get; set; } @@ -1104,6 +1105,7 @@ private void RegisterKeys(Parser parser) { parser.RegisterKeyword("destroy_if_invalid_heir", reader => DestroyIfInvalidHeir = reader.GetBool()); parser.RegisterKeyword("destroy_on_succession", reader => DestroyOnSuccession = reader.GetBool()); parser.RegisterKeyword("no_automatic_claims", reader => NoAutomaticClaims = reader.GetBool()); + parser.RegisterKeyword("noble_family", reader => NobleFamily = reader.GetBool()); parser.RegisterKeyword("always_follows_primary_heir", reader => AlwaysFollowsPrimaryHeir = reader.GetBool()); parser.RegisterKeyword("de_jure_drift_disabled", reader => DeJureDriftDisabled = reader.GetBool()); parser.RegisterKeyword("can_be_named_after_dynasty", reader => CanBeNamedAfterDynasty = reader.GetBool()); diff --git a/ImperatorToCK3/CommonUtils/DiffHistoryField.cs b/ImperatorToCK3/CommonUtils/DiffHistoryField.cs index 2aba2126f..acbf5c196 100644 --- a/ImperatorToCK3/CommonUtils/DiffHistoryField.cs +++ b/ImperatorToCK3/CommonUtils/DiffHistoryField.cs @@ -79,13 +79,23 @@ public void AddEntryToHistory(Date? date, string keyword, object value) { public void RegisterKeywords(Parser parser, Date date) { foreach (var keyword in insertKeywords) { parser.RegisterKeyword(keyword, reader => { - var value = HistoryFactory.GetValue(reader.GetString()); + var valueStr = reader.GetString(); + // If valueStr is the question sign from the "?=" operator, get another string. + if (valueStr == "?") { + valueStr = reader.GetString(); + } + var value = HistoryFactory.GetValue(valueStr); AddEntryToHistory(date, keyword, value); }); } foreach (var keyword in removeKeywords) { parser.RegisterKeyword(keyword, reader => { - var value = HistoryFactory.GetValue(reader.GetString()); + var valueStr = reader.GetString(); + // If valueStr is the question sign from the "?=" operator, get another string. + if (valueStr == "?") { + valueStr = reader.GetString(); + } + var value = HistoryFactory.GetValue(valueStr); AddEntryToHistory(date, keyword, value); }); } diff --git a/ImperatorToCK3/CommonUtils/HistoryFactory.cs b/ImperatorToCK3/CommonUtils/HistoryFactory.cs index a5f5c5fc1..deb67fd46 100644 --- a/ImperatorToCK3/CommonUtils/HistoryFactory.cs +++ b/ImperatorToCK3/CommonUtils/HistoryFactory.cs @@ -60,6 +60,10 @@ private Parser GetParser(History history) { parser.RegisterKeyword(setter, reader => { // If the value is set outside of dated blocks, override the initial value. var itemStr = reader.GetStringOfItem().ToString(); + // If itemStr is the question sign from the "?=" operator, get another string. + if (itemStr == "?") { + itemStr = reader.GetStringOfItem().ToString(); + } var value = GetValue(itemStr); history.Fields[def.FieldName].InitialEntries.Add( @@ -72,11 +76,14 @@ private Parser GetParser(History history) { foreach (var setter in def.Setters) { parser.RegisterKeyword(setter, reader => { // If the value is set outside of dated blocks, override the initial value. - var itemStr = reader.GetStringOfItem().ToString(); - var value = GetValue(itemStr); + var itemStr = reader.GetStringOfItem(); + // If itemStr is the question sign from the "?=" operator, get another string. + if (itemStr.ToString() == "?") { + itemStr = reader.GetStringOfItem(); + } history.Fields[def.FieldName].InitialEntries.Add( - new KeyValuePair(setter, value) + new KeyValuePair(setter, itemStr) ); }); } @@ -84,16 +91,26 @@ private Parser GetParser(History history) { foreach (var def in this.diffFieldDefs) { foreach (var inserterKeyword in def.Inserters) { parser.RegisterKeyword(inserterKeyword, reader => { + var valueStr = reader.GetString(); + // If valueStr is the question sign from the "?=" operator, get another string. + if (valueStr == "?") { + valueStr = reader.GetString(); + } var diffField = history.Fields[def.FieldName]; - var valueToInsert = GetValue(reader.GetString()); + var valueToInsert = GetValue(valueStr); diffField.InitialEntries.Add(new KeyValuePair(inserterKeyword, valueToInsert)); }); } foreach (var removerKeyword in def.Removers) { parser.RegisterKeyword(removerKeyword, reader => { + var valueStr = reader.GetString(); + // If valueStr is the question sign from the "?=" operator, get another string. + if (valueStr == "?") { + valueStr = reader.GetString(); + } var diffField = history.Fields[def.FieldName]; - var valueToRemove = GetValue(reader.GetString()); + var valueToRemove = GetValue(valueStr); diffField.InitialEntries.Add(new KeyValuePair(removerKeyword, valueToRemove)); }); } diff --git a/ImperatorToCK3/CommonUtils/LiteralHistoryField.cs b/ImperatorToCK3/CommonUtils/LiteralHistoryField.cs index eb23350d4..71887ed66 100644 --- a/ImperatorToCK3/CommonUtils/LiteralHistoryField.cs +++ b/ImperatorToCK3/CommonUtils/LiteralHistoryField.cs @@ -104,7 +104,11 @@ public void RegexReplaceAllEntries(Regex regex, string replacement) { public void RegisterKeywords(Parser parser, Date date) { foreach (var setter in setterKeywords) { parser.RegisterKeyword(setter, reader => { - var itemStr = reader.GetStringOfItem().ToString(); + var itemStr = reader.GetStringOfItem(); + // If itemStr is the question sign from the "?=" operator, get another string. + if (itemStr.ToString() == "?") { + itemStr = reader.GetStringOfItem(); + } AddEntryToHistory(date, setter, itemStr); }); } diff --git a/ImperatorToCK3/CommonUtils/SimpleHistoryField.cs b/ImperatorToCK3/CommonUtils/SimpleHistoryField.cs index 26c1ecf62..e760fc65b 100644 --- a/ImperatorToCK3/CommonUtils/SimpleHistoryField.cs +++ b/ImperatorToCK3/CommonUtils/SimpleHistoryField.cs @@ -63,6 +63,10 @@ public void RegisterKeywords(Parser parser, Date date) { foreach (var setter in setterKeywords) { parser.RegisterKeyword(setter, reader => { var itemStr = reader.GetStringOfItem().ToString(); + // If itemStr is the question sign from the "?=" operator, get another string. + if (itemStr == "?") { + itemStr = reader.GetStringOfItem().ToString(); + } var value = HistoryFactory.GetValue(itemStr); AddEntryToHistory(date, setter, value); }); diff --git a/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/00_divinity_custom_loc.txt b/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/00_divinity_custom_loc.txt index 7b14fa929..4265f9a8e 100644 --- a/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/00_divinity_custom_loc.txt +++ b/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/00_divinity_custom_loc.txt @@ -1,4 +1,4 @@ -# ImperatorToCK3: Last updated CK3 patch 1.11.0.1 +# ImperatorToCK3: Last updated CK3 patch 1.13.0 ToleranceValue = { type = character @@ -53,6 +53,59 @@ ToleranceValue = { } } +ToleranceValueConcept = { + type = character + + text = { + localization_key = FAITH_HOSTILITY_RIGHTEOUS + + trigger = { + faith = { + faith_hostility_level = { + target = scope:second.faith + value = faith_fully_accepted_level + } + } + } + } + text = { + localization_key = FAITH_HOSTILITY_ASTRAY + + trigger = { + faith = { + faith_hostility_level = { + target = scope:second.faith + value = faith_astray_level + } + } + } + } + text = { + localization_key = FAITH_HOSTILITY_HOSTILE + + trigger = { + faith = { + faith_hostility_level = { + target = scope:second.faith + value = faith_hostile_level + } + } + } + } + text = { + localization_key = FAITH_HOSTILITY_EVIL + + trigger = { + faith = { + faith_hostility_level = { + target = scope:second.faith + value = faith_evil_level + } + } + } + } +} + MyPriestTitle = { type = character @@ -83,6 +136,24 @@ MyPriestTitle = { } } +PriestTitle = { + type = character + + text = { + trigger = { is_female = no } + localization_key = male_priest_title + } + text = { + trigger = { is_female = yes } + localization_key = female_priest_title + } + text = { + trigger = { always = no } + localization_key = neuter_priest_title + fallback = yes + } +} + # For use when refering to a priest of unspecified gender, or the concept of priests in general. DefaultPriestTitle = { type = character @@ -599,7 +670,7 @@ GetActualBishopTitle = { } text = { trigger = { - is_landed = yes + is_playable_character = yes } localization_key = ruler_title_name } diff --git a/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/00_regional_custom_localization.txt b/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/00_regional_custom_localization.txt index a55bd1c82..15f1f05a1 100644 --- a/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/00_regional_custom_localization.txt +++ b/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/00_regional_custom_localization.txt @@ -1,4 +1,4 @@ -# Last updated: CK3 patch 1.12.1 +# Last updated: CK3 patch 1.13.0 MountedWarriorTerm = { type = character @@ -87,6 +87,13 @@ LevyMenWomen = { FortifiedBuilding = { #Castle, Fort, Kasbah etc. type = character + text = { + trigger = { + government_has_flag = government_is_landless_adventurer + } + localization_key = encampment + } + text = { trigger = { culture = { has_cultural_pillar = language_arabic } @@ -123,15 +130,24 @@ FortifiedBuilding = { #Castle, Fort, Kasbah etc. ResidenceBuilding = { #Castle, Palace, etc. type = character + text = { + trigger = { + government_has_flag = government_is_landless_adventurer + } + localization_key = tent + } + text = { trigger = { government_has_flag = government_is_republic + is_landless_adventurer = no } localization_key = mansion } text = { trigger = { + is_landless_adventurer = no OR = { government_has_flag = government_is_theocracy is_theocratic_lessee = yes @@ -142,13 +158,26 @@ ResidenceBuilding = { #Castle, Palace, etc. text = { trigger = { + any_held_title = { is_noble_family_title = yes } + } + localization_key = estate + } + + text = { + trigger = { + is_landless_adventurer = no NOR = { government_has_flag = government_is_republic government_has_flag = government_is_theocracy + any_held_title = { is_noble_family_title = yes } is_theocratic_lessee = yes } } localization_key = castle + } + + text = { + localization_key = residence fallback = yes } } @@ -156,15 +185,24 @@ ResidenceBuilding = { #Castle, Palace, etc. ResidenceBuildingPlural = { #Castles, Palaces, etc. type = character + text = { + trigger = { + government_has_flag = government_is_landless_adventurer + } + localization_key = camp_plural + } + text = { trigger = { government_has_flag = government_is_republic + is_landless_adventurer = no } localization_key = mansions } text = { trigger = { + is_landless_adventurer = no OR = { government_has_flag = government_is_theocracy is_theocratic_lessee = yes @@ -175,13 +213,26 @@ ResidenceBuildingPlural = { #Castles, Palaces, etc. text = { trigger = { + any_held_title = { is_noble_family_title = yes } + } + localization_key = estate_plural + } + + text = { + trigger = { + is_landless_adventurer = no NOR = { government_has_flag = government_is_republic government_has_flag = government_is_theocracy + any_held_title = { is_noble_family_title = yes } is_theocratic_lessee = yes } } localization_key = castles + } + + text = { + localization_key = residences fallback = yes } } @@ -292,6 +343,62 @@ IndefiniteBodyOfWater = { #Lake, River, Oasis, etc. } } +# As above, but excluding rivers'n'seas. +IndefiniteBodyOfWater_Static = { + type = character + random_valid = yes + + text = { + trigger = { + location = { terrain = oasis } + } + localization_key = body_of_water_an_oasis + } + text = { + trigger = { + location = { + OR = { + terrain = farmlands + terrain = jungle + terrain = wetlands + } + } + } + localization_key = body_of_water_a_large_pond + } + text = { + trigger = { + location = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + } + localization_key = body_of_water_a_lagoon + } + text = { + trigger = { + location = { + OR = { + terrain = plains + terrain = hills + terrain = forest + terrain = taiga + terrain = steppe + } + } + } + localization_key = body_of_water_a_lake + } + text = { + trigger = { always = no } + # For the areas with no good source of water. + fallback = yes + localization_key = body_of_water_a_watering_hole + } +} + RandomExampleName = { type = character @@ -376,6 +483,82 @@ TerrainTypeCountyScope = { } } +TerrainTypeCountyScopePlural = { + type = landed_title + + text = { + trigger = { title_province = { terrain = plains } } + localization_key = terrain_plains + } + + text = { + trigger = { title_province = { terrain = farmlands } } + localization_key = terrain_farmlands + } + + text = { + trigger = { title_province = { terrain = hills } } + localization_key = terrain_hills + } + + text = { + trigger = { + title_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + localization_key = terrain_mountains + } + + text = { + trigger = { title_province = { terrain = desert } } + localization_key = terrain_deserts + } + + text = { + trigger = { title_province = { terrain = oasis } } + localization_key = terrain_oases + } + + text = { + trigger = { title_province = { terrain = jungle } } + localization_key = terrain_jungles + } + + text = { + trigger = { title_province = { terrain = forest } } + localization_key = terrain_forests + } + + text = { + trigger = { title_province = { terrain = taiga } } + localization_key = terrain_taigas + } + + text = { + trigger = { title_province = { terrain = wetlands } } + localization_key = terrain_wetlands + } + + text = { + trigger = { title_province = { terrain = steppe } } + localization_key = terrain_steppes + } + + text = { + trigger = { title_province = { terrain = floodplains } } + localization_key = terrain_floodplains + } + + text = { + trigger = { title_province = { terrain = drylands } } + localization_key = terrain_drylands + } +} + TerrainType = { type = character @@ -749,84 +932,177 @@ VenomousCreature = { text = { localization_key = venomous_creature_rare_spider trigger = { - scope:venomous_creature = flag:rare_spider #Very rare, as spiders poisonous enough to kill a man would need to come from VERY far + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:rare_spider #Very rare, as spiders poisonous enough to kill a man would need to come from VERY far + } + trigger_else = { always = yes } } } text = { - localization_key = venomous_creature_deathstalker + localization_key = venomous_creature_red_scorpion trigger = { - scope:venomous_creature = flag:deathstalker #North Africa or Middle East + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:red_scorpion #India, Nepal + } + trigger_else = { + location = { geographical_region = world_india } + } } } text = { - localization_key = venomous_creature_red_scorpion + localization_key = venomous_creature_deathstalker trigger = { - scope:venomous_creature = flag:red_scorpion #India, Nepal + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:deathstalker #North Africa or Middle East + } + trigger_else = { + location = { + OR = { + geographical_region = world_africa_north + geographical_region = world_middle_east_jerusalem + geographical_region = world_middle_east_persia + } + } + } } } text = { localization_key = venomous_creature_fat_tail trigger = { - scope:venomous_creature = flag:fat_tail #Arabia, Middle East, Egypt + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:fat_tail #Arabia, Middle East, Egypt + } + trigger_else = { + location = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_north_east + } + } + } } } text = { localization_key = venomous_creature_viper trigger = { - scope:venomous_creature = flag:viper #Fallback - Everywhere + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:viper #Fallback - Everywhere + } + trigger_else = { always = yes } } } text = { localization_key = venomous_creature_mamba trigger = { - scope:venomous_creature = flag:mamba #Sub-saharan Africa + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:mamba #Sub-saharan Africa + } + trigger_else = { + location = { geographical_region = world_africa_west } + } } } text = { localization_key = venomous_creature_boomslang trigger = { - scope:venomous_creature = flag:boomslang #Sub-saharan Africa + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:boomslang #Sub-saharan Africa + } + trigger_else = { + location = { geographical_region = world_africa_west } + } } } text = { localization_key = venomous_creature_king_cobra trigger = { - scope:venomous_creature = flag:king_cobra #South-east Asia + India + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:king_cobra #South-east Asia + India + } + trigger_else = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_burma + } + } + } } } text = { localization_key = venomous_creature_daboia trigger = { - scope:venomous_creature = flag:daboia #India + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:daboia #India + } + trigger_else = { + location = { geographical_region = world_india } + } } } text = { localization_key = venomous_creature_saw_scale trigger = { - scope:venomous_creature = flag:saw_scale #North Africa, Middle East, Pakistan, India + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:saw_scale #North Africa, Middle East, Pakistan, India + } + trigger_else = { + location = { + OR = { + geographical_region = world_africa_north + geographical_region = world_middle_east + geographical_region = world_india + } + } + } } } text = { localization_key = venomous_creature_krait trigger = { - scope:venomous_creature = flag:krait #North Africa, Middle East, Pakistan, India + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:krait #North Africa, Middle East, Pakistan, India + } + trigger_else = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_burma + } + } + } } } text = { localization_key = venomous_creature_beaked_mammal trigger = { - scope:venomous_creature = flag:beaked_mammal #Australia + trigger_if = { + limit = { exists = scope:venomous_creature } + scope:venomous_creature = flag:beaked_mammal #Australia + } + trigger_else = { always = no } } } @@ -1041,70 +1317,204 @@ RandomReligiousTextName = { text = { trigger = { - scope:religious_book_title = flag:golden_legend + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:golden_legend + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith.religion = religion:christianity_religion + } + #The book is of my religion + trigger_else = { faith.religion = religion:christianity_religion } } localization_key = random_religious_text_golden_legend } text = { trigger = { - scope:religious_book_title = flag:city_of_god + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:city_of_god + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith.religion = religion:christianity_religion + } + #The book is of my religion + trigger_else = { faith.religion = religion:christianity_religion } } localization_key = random_religious_text_city_of_god } text = { trigger = { - scope:religious_book_title = flag:summa_theologica + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:summa_theologica + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith.religion = religion:christianity_religion + NOT = { location.faith = faith:orthodox } + } + #The book is of my religion + trigger_else = { + faith.religion = religion:christianity_religion + NOT = { faith = faith:orthodox } + } } localization_key = random_religious_text_summa_theologica } text = { trigger = { - scope:religious_book_title = flag:sic_et_non + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:sic_et_non + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith.religion = religion:christianity_religion + NOT = { location.faith = faith:orthodox } + } + #The book is of my religion + trigger_else = { + faith.religion = religion:christianity_religion + NOT = { faith = faith:orthodox } + } } localization_key = random_religious_text_sic_et_non } text = { trigger = { - scope:religious_book_title = flag:the_small_book_on_theism + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:chrysostomos + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith = faith:orthodox + } + #The book is of my religion + trigger_else = { faith = faith:orthodox } } - localization_key = random_religious_text_the_small_book_on_theism + localization_key = random_religious_text_chrysostomos } text = { trigger = { - scope:religious_book_title = flag:modern_philosophy + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:symeon_menologion + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith = faith:orthodox + } + #The book is of my religion + trigger_else = { faith = faith:orthodox } } - localization_key = random_religious_text_modern_philosophy + localization_key = random_religious_text_symeon_menologion } text = { trigger = { - scope:religious_book_title = flag:stories_from_holy_book + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:god_and_christ + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith = faith:orthodox + } + #The book is of my religion + trigger_else = { faith = faith:orthodox } } - localization_key = random_religious_text_stories_from_holy_book + localization_key = random_religious_text_god_and_christ } -} - - -RandomEntertainmentTextName = { - type = character text = { trigger = { - scope:entertainment_book_title = flag:beowulf + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:the_small_book_on_theism + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith.religion = religion:islam_religion + } + #The book is of my religion + trigger_else = { faith.religion = religion:islam_religion } } - localization_key = random_entertainment_text_beowulf + localization_key = random_religious_text_the_small_book_on_theism } text = { trigger = { - scope:entertainment_book_title = flag:niebelungenlied + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:modern_philosophy + } + #We're a LAAMP visiting somewhere + trigger_else_if = { + limit = { exists = scope:visiting_location } + location.faith.religion = religion:islam_religion + } + #The book is of my religion + trigger_else = { faith.religion = religion:islam_religion } } - localization_key = random_entertainment_text_niebelungenlied + localization_key = random_religious_text_modern_philosophy + } + + text = { + trigger = { + #Original implementation + trigger_if = { + limit = { exists = scope:religious_book_title } + scope:religious_book_title = flag:stories_from_holy_book + } + trigger_else = { always = yes } + } + localization_key = random_religious_text_stories_from_holy_book + } + +} + + +RandomEntertainmentTextName = { + type = character + + text = { + trigger = { + scope:entertainment_book_title = flag:beowulf + } + localization_key = random_entertainment_text_beowulf + } + + text = { + trigger = { + scope:entertainment_book_title = flag:niebelungenlied + } + localization_key = random_entertainment_text_niebelungenlied } text = { @@ -1149,6 +1559,20 @@ RandomEntertainmentTextName = { localization_key = random_entertainment_text_digenes_akrites } + text = { + trigger = { + scope:entertainment_book_title = flag:epigrams + } + localization_key = random_entertainment_text_epigrams + } + + text = { + trigger = { + scope:entertainment_book_title = flag:philogelos + } + localization_key = random_entertainment_text_philogelos + } + text = { trigger = { scope:entertainment_book_title = flag:riddle_poems @@ -1209,6 +1633,18 @@ RandomInformativeTextName = { } localization_key = random_informative_text_almagest } + text = { + trigger = { + scope:informative_book_title = flag:anekdota + } + localization_key = random_informative_text_anekdota + } + text = { + trigger = { + scope:informative_book_title = flag:chronographia + } + localization_key = random_informative_text_chronographia + } } @@ -2396,7 +2832,12 @@ RegionalFarmAnimal = { #Goat text = { trigger = { - var:local_farm_animal = flag:goat + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:goat + } + trigger_else = { always = yes } + } localization_key = regional_farm_animal_goat } @@ -2404,7 +2845,11 @@ RegionalFarmAnimal = { #Chicken text = { trigger = { - var:local_farm_animal = flag:chicken + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:chicken + } + trigger_else = { always = yes } } localization_key = regional_farm_animal_chicken } @@ -2412,7 +2857,11 @@ RegionalFarmAnimal = { #Cow text = { trigger = { - var:local_farm_animal = flag:cow + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:cow + } + trigger_else = { always = yes } } localization_key = regional_farm_animal_cow } @@ -2420,7 +2869,11 @@ RegionalFarmAnimal = { #Sheep text = { trigger = { - var:local_farm_animal = flag:sheep + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:sheep + } + trigger_else = { always = yes } } localization_key = regional_farm_animal_sheep } @@ -2428,7 +2881,18 @@ RegionalFarmAnimal = { #Pig text = { trigger = { - var:local_farm_animal = flag:pig + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:pig + } + trigger_else = { + location.faith = { + NOR = { + religion_tag = islam_religion + religion_tag = judaism_religion + } + } + } } localization_key = regional_farm_animal_pig } @@ -2436,10 +2900,61 @@ RegionalFarmAnimal = { #Yak text = { trigger = { - var:local_farm_animal = flag:yak + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:yak + } + trigger_else = { + location = { + OR = { + geographical_region = world_tibet + geographical_region = ghw_region_mongolia + } + } + } + } localization_key = regional_farm_animal_yak } + + #Camel + text = { + trigger = { + #No need to disturb the original implementation + trigger_if = { + limit = { + NOT = { exists = var:local_farm_animal } + } + location = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_north + } + } + } + trigger_else = { always = no } + + } + localization_key = regional_farm_animal_camel + } + + #Horse + text = { + trigger = { + #No need to disturb the original implementation + trigger_if = { + limit = { + NOT = { exists = var:local_farm_animal } + } + always = yes + } + trigger_else = { + always = no + } + + } + localization_key = regional_farm_animal_horse + } } RegionalFarmAnimalPlural = { @@ -2449,7 +2964,12 @@ RegionalFarmAnimalPlural = { #Goat text = { trigger = { - var:local_farm_animal = flag:goat + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:goat + } + trigger_else = { always = yes } + } localization_key = regional_farm_animal_goat_plural } @@ -2457,7 +2977,11 @@ RegionalFarmAnimalPlural = { #Chicken text = { trigger = { - var:local_farm_animal = flag:chicken + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:chicken + } + trigger_else = { always = no } # ... "herd of chickens" ain't a thing. } localization_key = regional_farm_animal_chicken_plural } @@ -2465,7 +2989,11 @@ RegionalFarmAnimalPlural = { #Cow text = { trigger = { - var:local_farm_animal = flag:cow + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:cow + } + trigger_else = { always = yes } } localization_key = regional_farm_animal_cow_plural } @@ -2473,7 +3001,11 @@ RegionalFarmAnimalPlural = { #Sheep text = { trigger = { - var:local_farm_animal = flag:sheep + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:sheep + } + trigger_else = { always = yes } } localization_key = regional_farm_animal_sheep_plural } @@ -2481,7 +3013,18 @@ RegionalFarmAnimalPlural = { #Pig text = { trigger = { - var:local_farm_animal = flag:pig + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:pig + } + trigger_else = { + location.faith = { + NOR = { + religion_tag = islam_religion + religion_tag = judaism_religion + } + } + } } localization_key = regional_farm_animal_pig_plural } @@ -2489,12 +3032,156 @@ RegionalFarmAnimalPlural = { #Yaks text = { trigger = { - var:local_farm_animal = flag:yak + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:yak + } + trigger_else = { + location = { + OR = { + geographical_region = world_tibet + geographical_region = ghw_region_mongolia + } + } + } + } localization_key = regional_farm_animal_yak_plural } } +SoundingRegionalFarmAnimal = { + type = character + random_valid = yes + + #Goat + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:goat + } + trigger_else = { always = yes } + + } + localization_key = regional_farm_animal_bleating_goat + } + + #Chicken + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:chicken + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_clucking_chicken + } + + #Cow + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:cow + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_bellowing_cow + } + + #Sheep + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:sheep + } + trigger_else = { always = yes } + } + localization_key = regional_farm_animal_bleating_sheep + } + + #Pig + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:pig + } + trigger_else = { + location.faith = { + NOR = { + religion_tag = islam_religion + religion_tag = judaism_religion + } + } + } + } + localization_key = regional_farm_animal_snorting_pig + } + + #Yak + text = { + trigger = { + trigger_if = { + limit = { exists = var:local_farm_animal } + var:local_farm_animal = flag:yak + } + trigger_else = { + location = { + OR = { + geographical_region = world_tibet + geographical_region = ghw_region_mongolia + } + } + } + + } + localization_key = regional_farm_animal_grunting_yak + } + + #Camel + text = { + trigger = { + #No need to disturb the original implementation + trigger_if = { + limit = { + NOT = { exists = var:local_farm_animal } + } + location = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_north + } + } + } + trigger_else = { always = no } + + } + localization_key = regional_farm_animal_grunting_camel + } + + #Horse + text = { + trigger = { + #No need to disturb the original implementation + trigger_if = { + limit = { + NOT = { exists = var:local_farm_animal } + } + always = yes + } + trigger_else = { + always = no + } + + } + localization_key = regional_farm_animal_whinnying_horse + } +} + RegionalArtilleryType = { type = character @@ -2540,7 +3227,14 @@ RegionalShipType = { localization_key = regional_ship_galley } text = { - trigger = { culture = { has_cultural_pillar = heritage_byzantine } } + trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + } + } + } localization_key = regional_ship_dromon } text = { @@ -2559,3 +3253,145 @@ RegionalShipPlural = { parent = RegionalShipType suffix = "_plural" } + +RegionalPoxAnimal = { + type = character + random_valid = yes + + #Goat + text = { + localization_key = regional_farm_animal_goat + } + + #Chicken + text = { + localization_key = regional_farm_animal_chicken + } + + #Cow + text = { + localization_key = regional_farm_animal_cow + } + + #Sheep + text = { + localization_key = regional_farm_animal_sheep + } + + #Pig + text = { + trigger = { + faith = { + NOR = { + religion_tag = islam_religion + religion_tag = judaism_religion + } + } + } + localization_key = regional_farm_animal_pig + } + + #Yak + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_tibet + geographical_region = ghw_region_mongolia + } + } + } + localization_key = regional_farm_animal_yak + } + + #Monkey + text = { + trigger = { + capital_province = { + OR = { + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_africa + geographical_region = world_burma + } + } + } + localization_key = animal_monkey + } +} + +WritingInstrument = { + type = character + random_valid = yes + + text = { # Quills, European + trigger = { + trigger_if = { + limit = { + exists = capital_province + } + capital_province = { + geographical_region = world_europe + } + } + trigger_else_if = { + limit = { + exists = liege_or_court_owner.capital_province + } + liege_or_court_owner.capital_province = { + geographical_region = world_europe + } + } + trigger_else_if = { + limit = { exists = location } + location = { geographical_region = world_europe } + } + trigger_else = { + always = no + } + } + localization_key = quill + } + + text = { # Pens, non-European. Made from bamboo, reeds, whatever. Just a bit of wood sharpened to a point and dipped in ink. + localization_key = pen + fallback = yes + } +} + +GetKnightErrantAnimal = { + type = character + + text = { + trigger = { + location = { + geographical_region = world_europe + } + } + localization_key = GetKnightErrantAnimal_swan + } + text = { + trigger = { + location = { + OR = { + geographical_region = world_india + geographical_region = world_burma + geographical_region = ghw_region_caucasus + } + } + } + localization_key = GetKnightErrantAnimal_tiger + } + text = { + trigger = { + location = { + geographical_region = world_africa + } + } + localization_key = GetKnightErrantAnimal_lion + } + text = { # Basically everywhere + localization_key = GetKnightErrantAnimal_hart + fallback = yes + } +} diff --git a/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/99_fr_custom_loc.txt b/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/99_fr_custom_loc.txt index 25fc15c59..fb8789ada 100644 --- a/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/99_fr_custom_loc.txt +++ b/ImperatorToCK3/Data_Files/blankMod/output/common/customizable_localization/99_fr_custom_loc.txt @@ -1,4 +1,4 @@ -# Last updated: CK3 patch 1.9.2 +# Last updated: CK3 patch 1.13.0 #################################### # FRENCH CUSTOM LOCALISATION # # By Xavier Zimmermann # @@ -123,6 +123,8 @@ # FR_de_BG_GameType pour BG_GameType # FR_CouncilPosition_Le pour CouncilPosition # FR_GetRandomWonContest_Le pour GetRandomWonContest +# FR_GetRealmOrDomicileConcept_FR_Le pour GetRealmOrDomicileConcept +# FR_GetCourtOwnerConcept_FR_Du pour GetCourtOwnerConcept # FR_FaithGenderedAdj - GetFaith.GetAdjective\GetFaith.GetAdherentName (scope: character) # FR_Scheme_FullAction - GetActionName - SCHEME_FULL_ACTION_NAME @@ -852,6 +854,18 @@ FR_de_BG_GameType = { suffix = _FR_De } +FR_au_BG_GameType_Generic = { + log_loc_errors = no + parent = BG_GameType_Generic + suffix = _FR_Au +} + +FR_de_BG_GameType_Generic = { + log_loc_errors = no + parent = BG_GameType_Generic + suffix = _FR_De +} + FR_CouncilPosition_Le = { log_loc_errors = no parent = CouncilPosition @@ -888,12 +902,23 @@ FR_GetRandomRegionalWildDaytimeBird_Plural = { suffix = _FR_Plural } +FR_GetRealmOrDomicileConcept_FR_Le = { + log_loc_errors = no + parent = GetRealmOrDomicileConcept + suffix = _FR_Le +} + +FR_GetCourtOwnerConcept_FR_Du = { + log_loc_errors = no + parent = GetCourtOwnerConcept + suffix = _FR_Du +} + ############################################# ############################################# FR_FaithGenderedAdj = { type = character log_loc_errors = no - text = { trigger = { trigger_if = { @@ -2122,84 +2147,91 @@ FR_Scheme_FullAction = { log_loc_errors = no text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = abduct } localization_key = CustomLoc_FR_Scheme_FullAction_abduct_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = befriend } localization_key = CustomLoc_FR_Scheme_FullAction_befriend_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = claim_throne } localization_key = CustomLoc_FR_Scheme_FullAction_claim_throne_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = convert_to_witchcraft } localization_key = CustomLoc_FR_Scheme_FullAction_convert_to_witchcraft_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = courting } localization_key = CustomLoc_FR_Scheme_FullAction_courting_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = elope } localization_key = CustomLoc_FR_Scheme_FullAction_elope_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = fabricate_hook } localization_key = CustomLoc_FR_Scheme_FullAction_fabricate_hook_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = learn_language } localization_key = CustomLoc_FR_Scheme_FullAction_learn_language_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = murder } localization_key = CustomLoc_FR_Scheme_FullAction_murder_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } + scheme_type = overthrow_regent + } + localization_key = CustomLoc_FR_Scheme_FullAction_overthrow_regent_you + } + text = { + trigger = { + scheme_target_character = { is_local_player = yes } scheme_type = seduce } localization_key = CustomLoc_FR_Scheme_FullAction_seduce_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = steal_back_artifact } localization_key = CustomLoc_FR_Scheme_FullAction_steal_back_artifact_you } text = { trigger = { - scheme_target = { is_local_player = yes } + scheme_target_character = { is_local_player = yes } scheme_type = sway } localization_key = CustomLoc_FR_Scheme_FullAction_sway_you @@ -2258,6 +2290,12 @@ FR_Scheme_FullAction = { } localization_key = CustomLoc_FR_Scheme_FullAction_murder } + text = { + trigger = { + scheme_type = overthrow_regent + } + localization_key = CustomLoc_FR_Scheme_FullAction_overthrow_regent + } text = { trigger = { scheme_type = seduce @@ -3334,3 +3372,93 @@ FR_Le_GetVersusRound = { parent = GetVersusRound suffix = _FR_Le } + +FR_ResidenceBuilding_OnA = { + log_loc_errors = no + parent = ResidenceBuilding + suffix = _FR_On +} + +FR_ResidenceBuilding_Le = { + log_loc_errors = no + parent = ResidenceBuilding + suffix = _FR_Le +} + +FR_ResidenceBuilding_Du = { + log_loc_errors = no + parent = ResidenceBuilding + suffix = _FR_Du +} + +FR_ResidenceBuilding_Au = { + log_loc_errors = no + parent = ResidenceBuilding + suffix = _FR_Au +} + +FR_GetCourt_Le = { + log_loc_errors = no + parent = GetCourt + suffix = _FR_Le +} + +FR_GetCourt_Du = { + log_loc_errors = no + parent = GetCourt + suffix = _FR_Du +} + +FR_GetCourt_Au = { + log_loc_errors = no + parent = GetCourt + suffix = _FR_Au +} + +FR_GetCourt_OnA = { + log_loc_errors = no + parent = GetCourt + suffix = _FR_On +} + +FR_GetCourtConcept_Le = { + log_loc_errors = no + parent = GetCourtConcept + suffix = _FR_Le +} + +FR_GetCourtConcept_Au = { + log_loc_errors = no + parent = GetCourtConcept + suffix = _FR_Au +} + +FR_GetCourtyard_Le = { + log_loc_errors = no + parent = GetCourtyard + suffix = _FR_Le +} + +FR_GetDoor_Le = { + log_loc_errors = no + parent = GetDoor + suffix = _FR_Le +} + +FR_GetAdventureNamePrefixes_Pl = { + log_loc_errors = no + parent = GetAdventureNamePrefixes + suffix = _FR_Pl +} + +FR_GetAdventureNameSuffix_Du = { + log_loc_errors = no + parent = GetAdventureNameSuffix + suffix = _FR_Du +} + +FR_GetCourtTypeConcept_Au = { + log_loc_errors = no + parent = GetCourtTypeConcept + suffix = _FR_Au +} diff --git a/ImperatorToCK3/Data_Files/blankMod/output/common/governments/IRToCK3_governments.liquid b/ImperatorToCK3/Data_Files/blankMod/output/common/governments/IRToCK3_governments.liquid index 6ad016e05..e08326653 100644 --- a/ImperatorToCK3/Data_Files/blankMod/output/common/governments/IRToCK3_governments.liquid +++ b/ImperatorToCK3/Data_Files/blankMod/output/common/governments/IRToCK3_governments.liquid @@ -1,15 +1,18 @@ eremitic_government = { - create_cadet_branches = no - religious = yes - rulers_should_have_dynasty = no - council = yes + government_rules = { + create_cadet_branches = no + religious = yes + rulers_should_have_dynasty = no + council = yes + court_generate_spouses = no + royal_court = no + } + primary_holding = church_holding valid_holdings = { church_holding } required_county_holdings = { church_holding } preferred_religions = { christianity_religion } - court_generate_spouses = no court_generate_commanders = no - royal_court = no supply_limit_mult_for_others = 0 affected_by_development = no diff --git a/ImperatorToCK3/Data_Files/configurables/converter_cultures.txt b/ImperatorToCK3/Data_Files/configurables/converter_cultures.txt index 2285af362..bb1032255 100644 --- a/ImperatorToCK3/Data_Files/configurables/converter_cultures.txt +++ b/ImperatorToCK3/Data_Files/configurables/converter_cultures.txt @@ -743,60 +743,6 @@ italiote = { ethos = ethos_communal } -armenian = { # override of vanilla culture - color = armenian - - ethos = ethos_stoic - heritage = heritage_caucasian # IRToCK3: moved from heritage_byzantine - language = language_armenian - martial_custom = martial_custom_male_only - traditions = { - tradition_zealous_people - tradition_fervent_temple_builders - tradition_highland_warriors - tradition_hill_dwellers - tradition_roman_legacy - } - - name_list = name_list_armenian - - coa_gfx = { byzantine_group_coa_gfx western_coa_gfx } - building_gfx = { mediterranean_building_gfx } - clothing_gfx = { byzantine_clothing_gfx } - unit_gfx = { eastern_unit_gfx } - - ethnicities = { - 10 = mediterranean_byzantine - } -} - -georgian = { # override of vanilla culture - color = georgian - - ethos = ethos_communal - heritage = heritage_caucasian # IRToCK3: moved from heritage_byzantine - language = language_georgian - martial_custom = martial_custom_male_only - traditions = { - tradition_hereditary_hierarchy - #tradition_esteemed_hospitality - tradition_metal_craftsmanship - tradition_castle_keepers - tradition_caucasian_wolves - } - - name_list = name_list_georgian - - coa_gfx = { byzantine_group_coa_gfx western_coa_gfx } - building_gfx = { mediterranean_building_gfx } - clothing_gfx = { byzantine_clothing_gfx } - unit_gfx = { eastern_unit_gfx } - - ethnicities = { - 10 = mediterranean_byzantine - } -} - pemis = { INVALIDATED_BY = { tfe = { pemis } @@ -1627,10 +1573,13 @@ elamite = { # https://en.wikipedia.org/wiki/Elam } alan = { # override of vanilla culture - color = { 0.7 0.5 0.7 } + color = { 0.1 0.3 0.7 } + # created = 100.1.1 # IRToCK3: disabled the creation date + + # history_loc_override = scythian_heritage_loc # IRToCK3: disabled the creation date ethos = ethos_communal - heritage = heritage_iranian # IRToCK3: moved from heritage_byzantine + heritage = heritage_iranian language = language_scythian martial_custom = martial_custom_male_only traditions = { @@ -1642,13 +1591,15 @@ alan = { # override of vanilla culture name_list = name_list_alan - coa_gfx = { byzantine_group_coa_gfx western_coa_gfx } + coa_gfx = { oghuz_coa_gfx turkic_group_coa_gfx steppe_coa_gfx } building_gfx = { mediterranean_building_gfx } - clothing_gfx = { byzantine_clothing_gfx } - unit_gfx = { eastern_unit_gfx } + clothing_gfx = { iranian_clothing_gfx mena_clothing_gfx } + unit_gfx = { iranian_unit_gfx } ethnicities = { - 10 = mediterranean_byzantine + 4 = mediterranean_byzantine + 7 = mediterranean + 4 = arab } } diff --git a/ImperatorToCK3/Data_Files/configurables/government_map.txt b/ImperatorToCK3/Data_Files/configurables/government_map.txt index b453aae93..c3944d7cf 100644 --- a/ImperatorToCK3/Data_Files/configurables/government_map.txt +++ b/ImperatorToCK3/Data_Files/configurables/government_map.txt @@ -33,6 +33,10 @@ link = { ck3 = republic_government link = { ck3 = theocracy_government ir = theocratic_republic } +link = { ck3 = administrative_government + ir = imperium + ir = imperial_cult +} link = { ck3 = feudal_government ir = dictatorship ir = despotic_monarchy @@ -40,8 +44,6 @@ link = { ck3 = feudal_government ir = stratocratic_monarchy ir = theocratic_monarchy ir = plutocratic_monarchy - ir = imperium - ir = imperial_cult } link = { ck3 = tribal_government ir = tribal_chiefdom diff --git a/ImperatorToCK3/Data_Files/configurables/localization/base/english/CONVERTER_governments_l_english.yml b/ImperatorToCK3/Data_Files/configurables/localization/base/english/CONVERTER_governments_l_english.yml index 6cd4c2aba..e72198a9d 100644 --- a/ImperatorToCK3/Data_Files/configurables/localization/base/english/CONVERTER_governments_l_english.yml +++ b/ImperatorToCK3/Data_Files/configurables/localization/base/english/CONVERTER_governments_l_english.yml @@ -1,5 +1,6 @@ l_english: eremitic_government: "Eremitic" + eremitic_government_with_icon: "@government_type_theocracy! $eremitic_government$" eremitic_government_adjective: "Eremitic" eremitic_government_realm: "Hermitage" eremitic_government_desc: "A hermit, also known as an eremite or solitary, is a person who lives in seclusion. Eremitism plays a role in a variety of religions." diff --git a/ImperatorToCK3/Data_Files/configurables/removable_file_blocks.txt b/ImperatorToCK3/Data_Files/configurables/removable_file_blocks.txt index 70f74310c..74555ce80 100644 --- a/ImperatorToCK3/Data_Files/configurables/removable_file_blocks.txt +++ b/ImperatorToCK3/Data_Files/configurables/removable_file_blocks.txt @@ -21,6 +21,8 @@ # FP2 - Checks to start El Cid's Travels if = { limit = { # Am I El Cid? + has_fp2_dlc_trigger = yes + has_ep3_dlc_trigger = no this = character:107590 NOT = { has_character_flag = has_already_begun_travelling } # Separate first check, for performance @@ -104,10 +106,10 @@ if = { limit = { is_alive = yes - is_landed = yes + is_playable_character = yes } + trigger_event = bookmark.0200 } - trigger_event = bookmark.0200 } } { @@ -117,7 +119,7 @@ if = { limit = { is_alive = yes - is_landed = yes + is_playable_character = yes } trigger_event = { id = bookmark.0001 @@ -132,7 +134,7 @@ if = { limit = { is_alive = yes - is_landed = yes + is_playable_character = yes } trigger_event = { id = bookmark.0002 @@ -147,7 +149,7 @@ if = { limit = { is_alive = yes - is_landed = yes + is_playable_character = yes AND = { character:251180 = { is_ai = yes } character:251181 = { @@ -354,6 +356,15 @@ value = character:3050 } } + ## Constantine X & Michael Doukas. + character:1732 = { + if = { + limit = { has_ep3_dlc_trigger = yes } + start_diarchy = co_emperorship + set_diarch = character:1736 + set_designated_heir = character:1736 + } + } # Plus remove all the generated opinions. ## King Philippe of France & Duke Boudewijn of Flanders remove_generated_diarch_consequences_effect = { @@ -401,6 +412,60 @@ LIEGE = character:3040 } } + if = { + limit = { game_start_date = 1178.10.1 } + # Set up some diarchs. + ## The future Richard I of England managing Aquitaine in place of his mother (who is under house arrest) + character:205730 = { designate_diarch = character:204510 } + ## Jahan Pahlavan Muhammad as regent for Togrul + character:144056 = { designate_diarch = character:144052 } + ## Manuel Komnenos and Alexios Komnenos + character:215530 = { + if = { + limit = { has_ep3_dlc_trigger = yes } + start_diarchy = junior_emperorship + set_diarch = character:215531 + set_designated_heir = character:215531 + } + } + ## Henry II of England and the Young King + character:204500 = { + designate_diarch = character:204508 + start_diarchy = co_monarchy + set_designated_heir = character:204508 + } + ## Teresa of Portugal for Afonso the Conqueror + character:209503 = { + start_diarchy = regency + set_diarch = character:209510 + } + # Plus remove all the generated opinions. + ## Richard I and Eleanor of Aquitaine + remove_generated_diarch_consequences_effect = { + NEW_DIARCH = character:204510 + LIEGE = character:205730 + } + ## Muhammad Jahan Pahlavan and Togrul + remove_generated_diarch_consequences_effect = { + NEW_DIARCH = character:144052 + LIEGE = character:144056 + } + ## Manuel Komnenos and Alexios + remove_generated_diarch_consequences_effect = { + NEW_DIARCH = character:215531 + LIEGE = character:215530 + } + ## Henry II and Young Henry + remove_generated_diarch_consequences_effect = { + NEW_DIARCH = character:204508 + LIEGE = character:204500 + } + ## Teresa and Afonso + remove_generated_diarch_consequences_effect = { + NEW_DIARCH = character:209510 + LIEGE = character:209503 + } + } } { ## Fatimid Caliphate - basically stuck in the back-end of an entrenched regencies from game start. @@ -410,7 +475,6 @@ } } { - ### STRUGGLES ### if = { limit = { current_date = 867.1.1 } @@ -428,8 +492,8 @@ struggle:persian_struggle = { # Use the object explorer to debug this data (yes, the time has come to learn how to use it) # Struggle on_start - fp3_remove_vassal_contract_cooldown_for_tension_effect = yes # todo_cd_hci check if this is something we even want in the struggle anymore - + fp3_remove_vassal_contract_cooldown_for_tension_effect = yes + # Flag some titles as un-dissolutionable within the struggle. title:e_arabia = { set_variable = struggle_block_dissolution_faction } title:d_sunni = { set_variable = struggle_block_dissolution_faction } @@ -440,12 +504,12 @@ # achievements { ### ACHIEVEMENT TRACKING FOR STARTING CHARACTERS - if = { + if = { limit = { has_multiple_players = no } every_player = { # Base Title if = { - limit = { + limit = { exists = character:7757 this = character:7757 } @@ -453,9 +517,9 @@ VARIABLE = started_give_a_dog_a_bone_achievement VALUE = yes } - } + } if = { - limit = { + limit = { exists = character:1128 this = character:1128 } @@ -617,7 +681,7 @@ } } if = { - limit = { + limit = { exists = character:159137 this = character:159137 } @@ -627,7 +691,7 @@ } } if = { - limit = { + limit = { exists = character:109607 this = character:109607 } @@ -637,7 +701,7 @@ } } if = { - limit = { + limit = { exists = character:6878 this = character:6878 } @@ -804,8 +868,9 @@ ##12 Turkish Eagle if = { limit = { - has_title = title:c_samosata - this.house = house:house_seljuk # Seljuk + NOT = { this = character:3040 } # Not Alp Arslan + house = house:house_seljuk # Seljuk + game_start_date < 1067.1.1 # 1066 only, and no Seljuks in 867 } add_achievement_global_variable_effect = { VARIABLE = started_turkish_eagle_achievement @@ -981,7 +1046,7 @@ limit = { num_virtuous_traits >= 3 } - add_achievement_flag_effect = { FLAG = rd_character_blocked_paragon_of_virtue_achievement_flag } + add_achievement_flag_effect = { FLAG = rd_character_blocked_paragon_of_virtue_achievement_flag } } if = { limit = { @@ -990,20 +1055,20 @@ is_alive = yes } } - add_achievement_flag_effect = { FLAG = rd_character_blocked_the_succession_is_safe_achievement_flag } + add_achievement_flag_effect = { FLAG = rd_character_blocked_the_succession_is_safe_achievement_flag } } if = { limit = { any_child = { has_trait = inbred - } + } } add_achievement_flag_effect = { FLAG = rd_character_blocked_keeping_it_in_the_family_achievement_flag } } if = { limit = { highest_held_title_tier >= tier_empire - should_be_naked_trigger = yes + should_be_naked_trigger = yes } add_achievement_flag_effect = { FLAG = rd_character_blocked_the_emperors_new_clothes_achievement_flag } } @@ -2195,6 +2260,7 @@ bookmark.1069 = { trigger = { character:528 ?= { is_alive = yes + is_councillor_of = root } character:john_monk ?= { is_alive = yes @@ -2475,12 +2541,12 @@ bookmark.1066 = { NOT = { any_scheme = { scheme_type = murder - scheme_target = scope:hunchback + scheme_target_character = scope:hunchback } } } start_scheme = { - target = scope:hunchback + target_character = scope:hunchback type = murder } } @@ -2489,7 +2555,7 @@ bookmark.1066 = { random_scheme = { limit = { scheme_type = murder - scheme_target = scope:hunchback + scheme_target_character = scope:hunchback } add_scheme_modifier = { type = massive_extra_success_chance_modifier @@ -2652,13 +2718,6 @@ game_rule.1011 = { } } } - - { - AND = { - exists = character:7757 - this = character:7757 #Matilda Canossa, her bookmark start is about overcoming the issue of no heir - } - } } "gfx\portraits\portrait_animations\animations.txt" = { @@ -2689,59 +2748,62 @@ game_rule.1011 = { { modifier = { add = 5000 - this = character:7757 + OR = { + this = character:7757 + this = character:41702 + } } } } "gfx\portraits\portrait_modifiers\02_all_developer_characters.txt" = { { - modifier = { - add = 999 + modifier = { + add = 999 exists = this exists = character:73857 this = character:73857 - } + } } { - modifier = { - add = 999 - exists = this - exists = character:70292 - this = character:70292 - } + modifier = { + add = 999 + exists = this + exists = character:70292 + this = character:70292 + } } { - modifier = { - add = 999 - exists = this - exists = character:163157 #Ismail Samani - this = character:163157 #Ismail Samani - } + modifier = { + add = 999 + exists = this + exists = character:163157 #Ismail Samani + this = character:163157 #Ismail Samani + } } { - modifier = { - add = 999 - exists = this - exists = character:1230316 #Suri of Mandesh - this = character:1230316 #Suri of Mandesh - } + modifier = { + add = 999 + exists = this + exists = character:1230316 #Suri of Mandesh + this = character:1230316 #Suri of Mandesh + } } { - modifier = { - add = 999 - exists = this - exists = character:73759 - this = character:73759 - } + modifier = { + add = 999 + exists = this + exists = character:73759 + this = character:73759 + } } { - modifier = { - add = 999 - exists = this - exists = character:73783 - this = character:73783 - } + modifier = { + add = 999 + exists = this + exists = character:73783 + this = character:73783 + } } } @@ -3217,7 +3279,7 @@ scripted_effect scandi_adventurers_grab_famous_character_effect = { is_ai = yes # Hasn't got anything dynastic of note going on. is_ruler = no - any_heir_to_title = { count = 0 } + any_heir_title = { count = 0 } # And is free and clear to go. is_imprisoned = no OR = { @@ -3292,7 +3354,7 @@ fp1_scandinavian_adventurers.0012 = { exists = character:242 exists = character:163119 } - + } immediate = { @@ -3613,7 +3675,7 @@ fp3_yearly.8020 = { save_scope_as = pious_woman } } - else = { + else_if = { limit = { any_courtier_or_guest = { fp3_bibi_shahrbanu_devotee_trigger = yes @@ -3814,9 +3876,10 @@ fp3_yearly.8020 = { "common\decisions\dlc_decisions\fp_3\fp3_islamic_decisions.txt" = { { avenge_the_battle_of_nahrawan_decision = { - - picture = "gfx/interface/illustrations/decisions/fp3/fp3_decision_supremacy.dds" - major = yes + picture = { + reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_supremacy.dds" + } + decision_group_type = major ai_check_interval = 120 sort_order = 30 diff --git a/ImperatorToCK3/Data_Files/configurables/trait_map.txt b/ImperatorToCK3/Data_Files/configurables/trait_map.txt index 908a813dc..91d53ca09 100644 --- a/ImperatorToCK3/Data_Files/configurables/trait_map.txt +++ b/ImperatorToCK3/Data_Files/configurables/trait_map.txt @@ -69,7 +69,7 @@ link = { ck3 = cancer ir = cancer } link = { ck3 = gout_ridden ir = gout } link = { ck3 = physique_bad_2 ir = frail } link = { ck3 = maimed ir = maimed } -link = { ck3 = eunuch ir = castrated } +link = { ck3 = eunuch_1 ir = castrated } link = { ck3 = leper ir = leper } link = { ck3 = pneumonic ir = pneumonia } link = { ck3 = beauty_bad_2 ir = ugly } diff --git a/ImperatorToCK3/Data_Files/configurables/version.txt b/ImperatorToCK3/Data_Files/configurables/version.txt index b6853bdb6..bae3d4e6a 100644 --- a/ImperatorToCK3/Data_Files/configurables/version.txt +++ b/ImperatorToCK3/Data_Files/configurables/version.txt @@ -1,9 +1,9 @@ # Version info -name = "Domitian" +name = "Nerva" source = "Imperator" minSource = "2.0" maxSource = "2.0" target = "CK3" -minTarget = "1.12" -maxTarget = "1.12" +minTarget = "1.13" +maxTarget = "1.13" diff --git a/ImperatorToCK3/Data_Files/converter_globals/ReadMe.txt b/ImperatorToCK3/Data_Files/converter_globals/ReadMe.txt index 092b441da..e722dca77 100644 --- a/ImperatorToCK3/Data_Files/converter_globals/ReadMe.txt +++ b/ImperatorToCK3/Data_Files/converter_globals/ReadMe.txt @@ -10,7 +10,7 @@ GitHub project: https://github.com/ParadoxGameConverters/ImperatorToCK3 REQUIREMENTS ---- Imperator: Rome - version 2.0 -Crusader Kings III - version 1.12 +Crusader Kings III - version 1.13 ----- INSTRUCTIONS diff --git a/ImperatorToCK3/Mappers/Trait/TraitMapper.cs b/ImperatorToCK3/Mappers/Trait/TraitMapper.cs index e35629fdf..e10516a36 100644 --- a/ImperatorToCK3/Mappers/Trait/TraitMapper.cs +++ b/ImperatorToCK3/Mappers/Trait/TraitMapper.cs @@ -9,6 +9,8 @@ namespace ImperatorToCK3.Mappers.Trait; public class TraitMapper { protected IDictionary ImperatorToCK3TraitMap = new Dictionary(); protected IdObjectCollection CK3Traits = []; + + // TODO: add a method for logging all unmapped I:R traits public TraitMapper() { } public TraitMapper(string mappingsPath, ModFilesystem ck3ModFS) { diff --git a/ImperatorToCK3/Resources/images/LatestReleaseBanner.png b/ImperatorToCK3/Resources/images/LatestReleaseBanner.png index e03c30151..c211df95f 100644 Binary files a/ImperatorToCK3/Resources/images/LatestReleaseBanner.png and b/ImperatorToCK3/Resources/images/LatestReleaseBanner.png differ diff --git a/ImperatorToCK3/Resources/images/LatestReleaseBanner.xcf b/ImperatorToCK3/Resources/images/LatestReleaseBanner.xcf index 1d83295a7..f06d462ee 100644 Binary files a/ImperatorToCK3/Resources/images/LatestReleaseBanner.xcf and b/ImperatorToCK3/Resources/images/LatestReleaseBanner.xcf differ