Skip to content

Commit

Permalink
Prov mapping tweaks and hotfix for uncolonised land having vanilla CK…
Browse files Browse the repository at this point in the history
…3 rulers (#247) #patch

* East Africa impassable mapping

* fix for uncolonized lands having vanilla holders

* mappings fix

* Update province_mappings.txt

* Add mapping to prevent muslims around China

* Update irtock3.mod

* remove blank line
  • Loading branch information
IhateTrains authored Jul 25, 2021
1 parent 7303cf1 commit 77a07d4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3/Resources/workshop/mod/irtock3.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version="1.2.2"
version="2.0"
tags={
"Ironman Compatible"
"Total Conversions"
Expand Down
15 changes: 11 additions & 4 deletions ImperatorToCK3/Source/CK3/CK3World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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());
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3/Source/CK3/Province/CK3Province.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void Province::initializeFromImperator(const shared_ptr<Imperator::Province>& 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
}

Expand Down

0 comments on commit 77a07d4

Please sign in to comment.