diff --git a/ImperatorToCK3/Data_Files/configurables/province_mappings.txt b/ImperatorToCK3/Data_Files/configurables/province_mappings.txt index 4d49c90d0..6e591c022 100644 --- a/ImperatorToCK3/Data_Files/configurables/province_mappings.txt +++ b/ImperatorToCK3/Data_Files/configurables/province_mappings.txt @@ -2827,8 +2827,10 @@ link = { imp = 7543 ck3 = 8326 } # Kebranitia -> HAYQ link = { imp = 7542 ck3 = 8344 } # Rhammanitai -> AWSSA link = { imp = 7541 ck3 = 8398 ck3 = 8399 ck3 = 8391 ck3 = 8393 ck3 = 8392 ck3 = 8394 ck3 = 8407 ck3 = 8410 } # Sakchenia -> ABASA, GHOUBET, ABBE, ADAL, SITTI, WEST_ADAL, HARAR, JEBEL_AHMAR - link = { imp = 7526 imp = 7529 imp = 7520 imp = 7521 ck3 = 8431 ck3 = 8400 } # MANY-TO-MANY: Aromata, Yehta, Anchitaia, Aualites -> GARDAFUUL, ZAILA + link = { imp = 7520 imp = 7521 ck3 = 8400 } # Anchitaia, Aualites -> ZAILA + link = { imp = 7526 imp = 7529 ck3 = 8431 } # Aromata, Yehta -> GARDAFUUL link = { imp = 7530 ck3 = 1369 ck3 = 1310 } # Dioscoridus -> Socotra, Qualnsiyah + link = { imp = 5942 ck3 = 8441 ck3 = 8513 ck3 = 8509 ck3 = 8511 ck3 = 8512 ck3 = 8510 ck3 = 8466 ck3 = 8472 ck3 = 8471 ck3 = 8420 ck3 = 8500 ck3 = 8499 ck3 = 8501 ck3 = 8423 ck3 = 8422 ck3 = 8421 ck3 = 8408 ck3 = 8416 ck3 = 8411 ck3 = 8417 ck3 = 8413 ck3 = 8412 ck3 = 8444 ck3 = 8409 ck3 = 8354 ck3 = 8414 ck3 = 8384 ck3 = 8395 ck3 = 8397 ck3 = 8396 ck3 = 8419 ck3 = 8418 ck3 = 8383 ck3 = 8382 ck3 = 8492 ck3 = 8493 ck3 = 8490 ck3 = 8494 ck3 = 8445 ck3 = 8368 ck3 = 8357 ck3 = 8385 ck3 = 8415 ck3 = 8355 ck3 = 8356 ck3 = 8374 ck3 = 8364 ck3 = 8389 ck3 = 8433 ck3 = 8362 ck3 = 8369 ck3 = 8370 ck3 = 8365 ck3 = 8388 ck3 = 8387 ck3 = 8363 ck3 = 8373 } # -> OGADEN_DESERT, MUDUG-NORTH, BARBACADLE, HOBYO-NORTH, NUDUG-SOUTH, GALKAYO, HOBYO, DHUSAMAREB, EL_BUUR, FAFAN, FAFAN-SOUTH, GODE, HANAN, GIDAYA-EAST, GIDAYA-NORTH, GIDAYA, HARGAYA, HARGAYA-SOUTH, HARGAYA-WEST, SHABELLE, ARUSI-SOUTH, ARUSI-NORTH, AHMAR_MOUNTAINS, GABAL_SOUTH, KARAYU, DAWARO, BOKE, BATE, GABAL, GENDEBELO, BALI, BALI-EAST, DUMALI, BALI-WEST, GANALE, AUDO, GESTRO, MIDDLE-SHEBELLE, MENDEBO, KAMBATA, MUNESA, GEBERGE, DAWARO-WEST, SHARKA, HADYA, GANZ, WAJ, GIBE_INNARYA, GOMMA, INNARYA, JIBAT, DAMOT-WEST, BIZAMO, BOSHA, GAMBO, GURAGE, JANJERO link = { comment = "# Egypt" } link = { imp = 577 imp = 575 imp = 578 ck3 = 6080 } # Omboi, Eileithyiopolis, Dunqash -> ZARNIKH link = { imp = 576 imp = 573 ck3 = 6079 ck3 = 6078 } # MANY-TO-MANY: Apollinopolis Megale, Pathyris -> UDFU, ARMANT @@ -3853,6 +3855,7 @@ link = { imp = 7353 ck3 = 808 } # Bengmara -> Tinsukia link = { imp = 7355 ck3 = 809 } # Donga -> Ghuguha_Dol link = { imp = 5654 ck3 = 9163 ck3 = 9162 } # Kongyul -> Yingkiong, Tuting + link = { imp = 5965 ck3 = 9420 ck3 = 9419 } # -> Yadzi, Kuozhou link = { imp = 5652 ck3 = 9277 } # Pulong -> Zhamog link = { imp = 5650 ck3 = 9172 } # Dodong -> Medog link = { imp = 5631 ck3 = 9145 ck3 = 9140 } # Mon Bumtang -> Bumthang, Punakha diff --git a/ImperatorToCK3/Resources/workshop/mod/irtock3.mod b/ImperatorToCK3/Resources/workshop/mod/irtock3.mod index f359f11ed..21e5bf07e 100644 --- a/ImperatorToCK3/Resources/workshop/mod/irtock3.mod +++ b/ImperatorToCK3/Resources/workshop/mod/irtock3.mod @@ -1,4 +1,4 @@ -version="1.2.2" +version="2.0" tags={ "Ironman Compatible" "Total Conversions" diff --git a/ImperatorToCK3/Source/CK3/CK3World.cpp b/ImperatorToCK3/Source/CK3/CK3World.cpp index 294a2252c..037e20cda 100644 --- a/ImperatorToCK3/Source/CK3/CK3World.cpp +++ b/ImperatorToCK3/Source/CK3/CK3World.cpp @@ -292,12 +292,15 @@ void CK3::World::overWriteCountiesHistory() { Log(LogLevel::Info) << "Overwriting counties' history"; for (const auto& title : getTitles() | std::views::values) { if (title->getRank()==TitleRank::county && title->capitalBaronyProvince > 0) { // title is a county and its capital province has a valid ID (0 is not a valid province in CK3) - if (!provinces.contains(title->capitalBaronyProvince)) + if (!provinces.contains(title->capitalBaronyProvince)) { Log(LogLevel::Warning) << "Capital barony province not found " << title->capitalBaronyProvince; + } else { - const auto& impProvince = provinces.find(title->capitalBaronyProvince)->second->getImperatorProvince(); + const auto& ck3CapitalBaronyProvince = provinces.find(title->capitalBaronyProvince)->second; + const auto& impProvince = ck3CapitalBaronyProvince->getImperatorProvince(); if (impProvince) { - if (const auto& impCountry = impProvince->getOwner().second; impCountry) { + const auto& impCountry = impProvince->getOwner().second; + if (impCountry && impCountry->getCountryType() != Imperator::countryTypeEnum::rebels) { auto impMonarch = impCountry->getMonarch(); if (impMonarch) { const auto& holderItr = characters.find("imperator" + std::to_string(*impMonarch)); @@ -307,11 +310,15 @@ void CK3::World::overWriteCountiesHistory() { title->setDeFactoLiege(nullptr); countyHoldersCache.emplace(title->getHolderID()); } + } else { // e.g. uncolonised Imperator province + title->setHolder(nullptr); + title->setDeFactoLiege(nullptr); } } else { // county is probably outside of Imperator map - if (!title->getHolderID().empty() && title->getHolderID() != "0") + if (!title->getHolderID().empty() && title->getHolderID() != "0") { countyHoldersCache.emplace(title->getHolderID()); + } } } } diff --git a/ImperatorToCK3/Source/CK3/Province/CK3Province.cpp b/ImperatorToCK3/Source/CK3/Province/CK3Province.cpp index 337cb98d5..a5245a34b 100644 --- a/ImperatorToCK3/Source/CK3/Province/CK3Province.cpp +++ b/ImperatorToCK3/Source/CK3/Province/CK3Province.cpp @@ -28,7 +28,7 @@ void Province::initializeFromImperator(const shared_ptr& im // If we're initializing this from Imperator provinces, then having an owner or being a wasteland/sea is not a given - // there are uncolonized provinces in Imperator, also uninhabitables have culture and religion. - if (const auto& impOwnerCountry = impProvince->getOwner().second) { + if (const auto& impOwnerCountry = impProvince->getOwner().second; impOwnerCountry) { ownerTitle = impOwnerCountry->getCK3Title(); // linking to our holder's title }