Skip to content

Commit 18af079

Browse files
authored
Use the Terra Indomita province mappings for the I:R Antiquitas mod (#2367)
1 parent c1844ab commit 18af079

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

ImperatorToCK3.sln.DotSettings

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
<s:Boolean x:Key="/Default/Environment/Filtering/ExcludeCoverageFilters/=Fronter_003B_002A_003B_002A_003B_002A/@EntryIndexRemoved">True</s:Boolean>
2020
<s:Boolean x:Key="/Default/UserDictionary/Words/=adjacencies/@EntryIndexedValue">True</s:Boolean>
2121
<s:Boolean x:Key="/Default/UserDictionary/Words/=Adnanite/@EntryIndexedValue">True</s:Boolean>
22+
<s:Boolean x:Key="/Default/UserDictionary/Words/=aegyptian/@EntryIndexedValue">True</s:Boolean>
2223
<s:Boolean x:Key="/Default/UserDictionary/Words/=Alexandros/@EntryIndexedValue">True</s:Boolean>
2324
<s:Boolean x:Key="/Default/UserDictionary/Words/=angeBy/@EntryIndexedValue">True</s:Boolean>
2425
<s:Boolean x:Key="/Default/UserDictionary/Words/=Antigonid/@EntryIndexedValue">True</s:Boolean>
26+
<s:Boolean x:Key="/Default/UserDictionary/Words/=antiquitas/@EntryIndexedValue">True</s:Boolean>
2527
<s:Boolean x:Key="/Default/UserDictionary/Words/=apulia/@EntryIndexedValue">True</s:Boolean>
2628
<s:Boolean x:Key="/Default/UserDictionary/Words/=aquitane/@EntryIndexedValue">True</s:Boolean>
2729
<s:Boolean x:Key="/Default/UserDictionary/Words/=arberian/@EntryIndexedValue">True</s:Boolean>
@@ -42,6 +44,7 @@
4244
<s:Boolean x:Key="/Default/UserDictionary/Words/=configurables/@EntryIndexedValue">True</s:Boolean>
4345
<s:Boolean x:Key="/Default/UserDictionary/Words/=Cornelli/@EntryIndexedValue">True</s:Boolean>
4446
<s:Boolean x:Key="/Default/UserDictionary/Words/=cuman/@EntryIndexedValue">True</s:Boolean>
47+
<s:Boolean x:Key="/Default/UserDictionary/Words/=cyrenaican/@EntryIndexedValue">True</s:Boolean>
4548
<s:Boolean x:Key="/Default/UserDictionary/Words/=datacontext/@EntryIndexedValue">True</s:Boolean>
4649
<s:Boolean x:Key="/Default/UserDictionary/Words/=Defs/@EntryIndexedValue">True</s:Boolean>
4750
<s:Boolean x:Key="/Default/UserDictionary/Words/=diadochi/@EntryIndexedValue">True</s:Boolean>
@@ -66,10 +69,13 @@
6669
<s:Boolean x:Key="/Default/UserDictionary/Words/=IMPERATOR/@EntryIndexedValue">True</s:Boolean>
6770
<s:Boolean x:Key="/Default/UserDictionary/Words/=IMPTOCK/@EntryIndexedValue">True</s:Boolean>
6871
<s:Boolean x:Key="/Default/UserDictionary/Words/=Incontinentia/@EntryIndexedValue">True</s:Boolean>
72+
<s:Boolean x:Key="/Default/UserDictionary/Words/=indomita/@EntryIndexedValue">True</s:Boolean>
6973
<s:Boolean x:Key="/Default/UserDictionary/Words/=instabuild/@EntryIndexedValue">True</s:Boolean>
7074
<s:Boolean x:Key="/Default/UserDictionary/Words/=Invicta/@EntryIndexedValue">True</s:Boolean>
75+
<s:Boolean x:Key="/Default/UserDictionary/Words/=invictus/@EntryIndexedValue">True</s:Boolean>
7176
<s:Boolean x:Key="/Default/UserDictionary/Words/=IRTOCK/@EntryIndexedValue">True</s:Boolean>
7277
<s:Boolean x:Key="/Default/UserDictionary/Words/=italia/@EntryIndexedValue">True</s:Boolean>
78+
<s:Boolean x:Key="/Default/UserDictionary/Words/=italiotian/@EntryIndexedValue">True</s:Boolean>
7379
<s:Boolean x:Key="/Default/UserDictionary/Words/=Jailor/@EntryIndexedValue">True</s:Boolean>
7480
<s:Boolean x:Key="/Default/UserDictionary/Words/=jailors/@EntryIndexedValue">True</s:Boolean>
7581
<s:Boolean x:Key="/Default/UserDictionary/Words/=Jure/@EntryIndexedValue">True</s:Boolean>
@@ -98,6 +104,7 @@
98104
<s:Boolean x:Key="/Default/UserDictionary/Words/=Petair/@EntryIndexedValue">True</s:Boolean>
99105
<s:Boolean x:Key="/Default/UserDictionary/Words/=Phrygian/@EntryIndexedValue">True</s:Boolean>
100106
<s:Boolean x:Key="/Default/UserDictionary/Words/=Playset/@EntryIndexedValue">True</s:Boolean>
107+
<s:Boolean x:Key="/Default/UserDictionary/Words/=pontic/@EntryIndexedValue">True</s:Boolean>
101108
<s:Boolean x:Key="/Default/UserDictionary/Words/=pontifex/@EntryIndexedValue">True</s:Boolean>
102109
<s:Boolean x:Key="/Default/UserDictionary/Words/=Provs/@EntryIndexedValue">True</s:Boolean>
103110
<s:Boolean x:Key="/Default/UserDictionary/Words/=Qahtanite/@EntryIndexedValue">True</s:Boolean>
@@ -115,6 +122,7 @@
115122
<s:Boolean x:Key="/Default/UserDictionary/Words/=shudra/@EntryIndexedValue">True</s:Boolean>
116123
<s:Boolean x:Key="/Default/UserDictionary/Words/=simp/@EntryIndexedValue">True</s:Boolean>
117124
<s:Boolean x:Key="/Default/UserDictionary/Words/=slovien/@EntryIndexedValue">True</s:Boolean>
125+
<s:Boolean x:Key="/Default/UserDictionary/Words/=syracusan/@EntryIndexedValue">True</s:Boolean>
118126
<s:Boolean x:Key="/Default/UserDictionary/Words/=tengri/@EntryIndexedValue">True</s:Boolean>
119127
<s:Boolean x:Key="/Default/UserDictionary/Words/=toogle/@EntryIndexedValue">True</s:Boolean>
120128
<s:Boolean x:Key="/Default/UserDictionary/Words/=Travellers/@EntryIndexedValue">True</s:Boolean>

ImperatorToCK3/CK3/World.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public World(Imperator.World impWorld, Configuration config, Thread? irCoaExtrac
117117
ColorFactory ck3ColorFactory = new();
118118
// Now that we have the mod filesystem, we can initialize the localization database.
119119
Parallel.Invoke(
120-
() => LoadCorrectProvinceMappingsFile(impWorld), // Depends on loaded mods.
120+
() => LoadCorrectProvinceMappingsFile(impWorld, config), // Depends on loaded mods.
121121
() => {
122122
LocDB.LoadLocFromModFS(ModFS, config.GetActiveCK3ModFlags());
123123
Logger.IncrementProgress();
@@ -425,14 +425,15 @@ private void ImportImperatorWars(Imperator.World irWorld, Date ck3BookmarkDate)
425425
Logger.IncrementProgress();
426426
}
427427

428-
private void LoadCorrectProvinceMappingsFile(Imperator.World imperatorWorld) {
428+
private void LoadCorrectProvinceMappingsFile(Imperator.World irWorld, Configuration config) {
429429
string mappingsToUse;
430430

431-
bool irHasTI = imperatorWorld.Countries.Any(c => c.Variables.Contains("unification_points"));
432-
bool ck3HasAEP = LoadedMods.Any(m => m.Name == "Asia Expansion Project");
433-
if (irHasTI && ck3HasAEP) {
431+
// Terra Indomita mappings should be used if either TI or Antiquitas is detected.
432+
bool irHasTI = irWorld.Countries.Any(c => c.Variables.Contains("unification_points")) || irWorld.UsableMods.Any(m => m.Name == "Antiquitas");
433+
434+
if (irHasTI && config.AsiaExpansionProjectEnabled) {
434435
mappingsToUse = "terra_indomita_to_aep";
435-
} else if (imperatorWorld.GlobalFlags.Contains("is_playing_invictus")) {
436+
} else if (irWorld.GlobalFlags.Contains("is_playing_invictus")) {
436437
mappingsToUse = "imperator_invictus";
437438
} else {
438439
mappingsToUse = "imperator_vanilla";

ImperatorToCK3/Data_Files/configurables/culture_map.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ link = { ck3=somali
114114
## Meroitic
115115
# TFE
116116
link = { ck3=meroitic ir=meroitic ir=alutan }
117+
link = { ck3=meroitic ck3=cushite } # Cushitic is from I:R Antiquitas mod.
117118
# vanilla CK3
118119
link = { ck3=nubian ir=meroitic }
120+
link = { ck3=nubian ir=cushite }
119121
# Invictus mod
120122
link = { ck3=nubian ir=nubian ir=lower_nubian ir=napatan ir=moyan ir=alutan }
121123

@@ -428,7 +430,8 @@ link = { ck3 = german @ir_all_germanic_cultures }
428430

429431

430432
## Hellenic
431-
@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"
433+
@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)
434+
@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"
432435
# TFE
433436
link = { ck3 = pontic ir = greco_pontic }
434437
link = { ck3 = syrian ir=macedonian ir=hellenistic ir=syracusan ir=thracian @ir_greek_cultures @culture_splitting_region_N }

ImperatorToCK3/Imperator/World.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ internal partial class World {
6666
private GenesDB genesDB = new();
6767
public InventionsDB InventionsDB { get; } = new();
6868
public ColorFactory ColorFactory { get; } = new();
69+
70+
public IReadOnlyList<Mod> UsableMods { get; private set; } = Array.Empty<Mod>();
6971

7072
private enum SaveType { Invalid, Plaintext, CompressedEncoded }
7173
private SaveType saveType = SaveType.Invalid;
@@ -335,6 +337,7 @@ private void ParseSave(Configuration config, ConverterVersion converterVersion,
335337
// Let's locate, verify and potentially update those mods immediately.
336338
ModLoader modLoader = new();
337339
modLoader.LoadMods(config.ImperatorDocPath, incomingMods);
340+
UsableMods = new Mods(modLoader.UsableMods);
338341
ModFS = new ModFilesystem(imperatorRoot, modLoader.UsableMods);
339342

340343
// Now that we have the list of mods used, we can load data from Imperator mod filesystem

0 commit comments

Comments
 (0)