diff --git a/ImperatorToCK3.sln.DotSettings b/ImperatorToCK3.sln.DotSettings index 99f432bd5..61cf83cab 100644 --- a/ImperatorToCK3.sln.DotSettings +++ b/ImperatorToCK3.sln.DotSettings @@ -19,9 +19,11 @@ True True True + True True True True + True True True True @@ -42,6 +44,7 @@ True True True + True True True True @@ -66,10 +69,13 @@ True True True + True True True + True True True + True True True True @@ -98,6 +104,7 @@ True True True + True True True True @@ -115,6 +122,7 @@ True True True + True True True True diff --git a/ImperatorToCK3/CK3/World.cs b/ImperatorToCK3/CK3/World.cs index 883b91c1a..7d21ea6dd 100644 --- a/ImperatorToCK3/CK3/World.cs +++ b/ImperatorToCK3/CK3/World.cs @@ -117,7 +117,7 @@ public World(Imperator.World impWorld, Configuration config, Thread? irCoaExtrac ColorFactory ck3ColorFactory = new(); // Now that we have the mod filesystem, we can initialize the localization database. Parallel.Invoke( - () => LoadCorrectProvinceMappingsFile(impWorld), // Depends on loaded mods. + () => LoadCorrectProvinceMappingsFile(impWorld, config), // Depends on loaded mods. () => { LocDB.LoadLocFromModFS(ModFS, config.GetActiveCK3ModFlags()); Logger.IncrementProgress(); @@ -425,14 +425,15 @@ private void ImportImperatorWars(Imperator.World irWorld, Date ck3BookmarkDate) Logger.IncrementProgress(); } - private void LoadCorrectProvinceMappingsFile(Imperator.World imperatorWorld) { + private void LoadCorrectProvinceMappingsFile(Imperator.World irWorld, Configuration config) { string mappingsToUse; - bool irHasTI = imperatorWorld.Countries.Any(c => c.Variables.Contains("unification_points")); - bool ck3HasAEP = LoadedMods.Any(m => m.Name == "Asia Expansion Project"); - if (irHasTI && ck3HasAEP) { + // Terra Indomita mappings should be used if either TI or Antiquitas is detected. + bool irHasTI = irWorld.Countries.Any(c => c.Variables.Contains("unification_points")) || irWorld.UsableMods.Any(m => m.Name == "Antiquitas"); + + if (irHasTI && config.AsiaExpansionProjectEnabled) { mappingsToUse = "terra_indomita_to_aep"; - } else if (imperatorWorld.GlobalFlags.Contains("is_playing_invictus")) { + } else if (irWorld.GlobalFlags.Contains("is_playing_invictus")) { mappingsToUse = "imperator_invictus"; } else { mappingsToUse = "imperator_vanilla"; diff --git a/ImperatorToCK3/Data_Files/configurables/culture_map.txt b/ImperatorToCK3/Data_Files/configurables/culture_map.txt index 2a01ff057..672ff8c3c 100644 --- a/ImperatorToCK3/Data_Files/configurables/culture_map.txt +++ b/ImperatorToCK3/Data_Files/configurables/culture_map.txt @@ -114,8 +114,10 @@ link = { ck3=somali ## Meroitic # TFE link = { ck3=meroitic ir=meroitic ir=alutan } +link = { ck3=meroitic ck3=cushite } # Cushitic is from I:R Antiquitas mod. # vanilla CK3 link = { ck3=nubian ir=meroitic } +link = { ck3=nubian ir=cushite } # Invictus mod link = { ck3=nubian ir=nubian ir=lower_nubian ir=napatan ir=moyan ir=alutan } @@ -428,7 +430,8 @@ link = { ck3 = german @ir_all_germanic_cultures } ## Hellenic -@ir_greek_cultures = "ir=greek ir=athenian ir=peloponnesian ir=massalian ir=cyrenaican ir=bosporan ir=thessalian ir=cypriot ir=bithynian ir=ionian ir=troan ir=aeolian ir=greco_pontic ir=aegean ir=aetolian ir=euboean ir=boeotian ir=epirote ir=arcadian ir=argolian ir=parthinian ir=cretan ir=achaean ir=enetoian" +@ir_antiquitas_greek_cultures="ir=doric ir=north_western_doric ir=attican ir=western_ionic ir=eastern_ionic ir=eteocretan ir=elean ir=kerkyran" # # Antiquitas (https://steamcommunity.com/sharedfiles/filedetails/?id=2992438857) +@ir_greek_cultures = "ir=greek ir=athenian ir=peloponnesian ir=massalian ir=cyrenaican ir=bosporan ir=thessalian ir=cypriot ir=bithynian ir=ionian ir=troan ir=aeolian ir=greco_pontic ir=aegean ir=aetolian ir=euboean ir=boeotian ir=epirote ir=arcadian ir=argolian ir=parthinian ir=cretan ir=achaean ir=enetoian @ir_antiquitas_greek_cultures" # TFE link = { ck3 = pontic ir = greco_pontic } link = { ck3 = syrian ir=macedonian ir=hellenistic ir=syracusan ir=thracian @ir_greek_cultures @culture_splitting_region_N } diff --git a/ImperatorToCK3/Imperator/World.cs b/ImperatorToCK3/Imperator/World.cs index e53b10e67..eb411b026 100644 --- a/ImperatorToCK3/Imperator/World.cs +++ b/ImperatorToCK3/Imperator/World.cs @@ -66,6 +66,8 @@ internal partial class World { private GenesDB genesDB = new(); public InventionsDB InventionsDB { get; } = new(); public ColorFactory ColorFactory { get; } = new(); + + public IReadOnlyList UsableMods { get; private set; } = Array.Empty(); private enum SaveType { Invalid, Plaintext, CompressedEncoded } private SaveType saveType = SaveType.Invalid; @@ -335,6 +337,7 @@ private void ParseSave(Configuration config, ConverterVersion converterVersion, // Let's locate, verify and potentially update those mods immediately. ModLoader modLoader = new(); modLoader.LoadMods(config.ImperatorDocPath, incomingMods); + UsableMods = new Mods(modLoader.UsableMods); ModFS = new ModFilesystem(imperatorRoot, modLoader.UsableMods); // Now that we have the list of mods used, we can load data from Imperator mod filesystem