Imperator Knoedel
Simperator Knoedel
I actually unironically like the idea of having Shia as a graphical variant in some regions.
I think a graphical variant based explicitly on region (all Iranian cities would display Shia instead of Sunni) would be pointlessly deterministic. But I don't necessarily think that Sunni/Shia need to be significantly different to both exist on the map and I think they should both be able to exist in any given city where they exist in significant numbers in history.I actually unironically like the idea of having Shia as a graphical variant in some regions.
Let me introduce some questions:
Islam grants +2 Stability with Slavery, will Shia and Sunni both have this?
Will Sunni and Shia have the same holy city?
Will Shia be unable to be spread in civilizations with a different state religion like Zoroastrianism, Taoism, Judaism, Hinduism, Buddhism, and Confucianism?
Will there be any unique mechanics a la the Reformation/Schism/Papacy?
Will it require Theology too? Will it be the first religion to share a tech requirement with another?
Will there be a building requirement like Catholicism and Orthodox Cathedrals or Buddhism with Hindu Temples?
What will be the Temples, Monestaries, Cathedrals, and Shrines of each religion be?
Catholicism and Buddhism requires the building of a building of another specific religion in addition to the tech requirement in order to be foundedNot sure what you mean by building requirement....
Well, if there was it would be Grand Mosque or Madrassa because Mosque spreads automatically to captured cities for Arabia so wouldn't be much of a requirement. Don't know that it's necessary though.Catholicism and Buddhism requires the building of a building of another specific religion in addition to the tech requirement in order to be founded
That seems like a quite difficult task.. I think the Shia holy site should stay in Mecca since it was just as important as for the Sunnis, Historical area's should be the around the Maghreb and Egypt and perhaps core area in Persia maybe? It was just a thought exercise I do hope in the future when the new update and the new map comes out it can be implemented as well.
Yeah, you might be right about that. Realistically, Protestantism doesn't have a single "holy city" but many holy sites and cities outside Jerusalem. Yet we do represent a separate holy city for Protestantism in game. Perhaps could do the same for Shi'ism. With the "Imam Ali Mosque" as the probable shrine that would make Baghdad the likely Holy City if we're hard-coding for Mesopotamia. Having the Holy City outside of Iranian core but within reach would be good for generating interesting conflict. Between Sunni Arabia/Ottomons and Shia Iran.My inclination would be to have a different holy city for Shia as compared to Sunni. Unlike Sunni, Shia tends to have a lot of holy sites elsewhere (mainly because Shia rulers have almost never held control over Mecca).
Islam (Sunni) can be founded by other civs than Arabia though; what happens if for some reason the player decides to found Islam as India and then quickly spread the religion? Would that also lead to Shia being founded in Mesopotamia, even when there is no Sunni present nearby?
Why make an extra mechanism to railroad it into Mesopotamia in the first place? Isn't that the role of the Religion's Core Zone?
The only requirements for Protestantism is for Academia to be discovered by a nation which controls a city in Protestantism's Core or Historical territory. Unless I'm missing some relevant code, it doesn't seem to even require you to be a Catholic Civilization, though I'm sure I'm missing something so don't quote me on that. I've seen it get founded multiple times in Italy and France.Literally every religion in the game is railroaded to one degree or another, most of them a lot more than I proposing for Shia, whatever you call the mechanism for doing so. Do you have a response on why Protestantism gets railroaded to Frankfurt?
I'm pretty sure I founded Protestantism in Polynesia once.The only requirements for Protestantism is for Academia to be discovered by a nation which controls a city in Protestantism's Core or Historical territory. Unless I'm missing some relevant code, it doesn't seem to even require you to be a Catholic Civilization, though I'm sure I'm missing something so don't quote me on that. I've seen it get founded multiple times in Italy and France.
It's not that Protestantism is railroaded towards Frankfurt, but rather that Holy Rome's tech modifier and tech preferences are such that they'll often reach Academy before other European Nations.
Also, there's a massive difference between using the game's systems to organically influence the game to tend towards a given state, and hardcoding that state to always happen or rigging the game's systems to organically force that state to occur every single game. When Polynesia always wins their UHV, it's no longer interesting when they do so accidentally.
It isn't though?
What if Frankfurt doesn't exist? Or what if Frankfurt is the capital?Maybe I'm missing something, but, if the Germans found Protestantism, it is *always* founded in Frankfurt. Interestingly, there seems to be a strong preference in the holy city code to avoid capital cities generally (e.g., religions like Confucianism or Buddhism that don't do not ever get founded in the capital city of their founding civilization unless it's the only city belonging to the founding civilization), so this must be built into the code somewhere, even if it's very subtle.
Obviously if someone who isn't Germany founds Protestantism, it just uses the ordinary code.
That is the case, since the base game.Interestingly, there seems to be a strong preference in the holy city code to avoid capital cities generally (e.g., religions like Confucianism or Buddhism that don't do not ever get founded in the capital city of their founding civilization unless it's the only city belonging to the founding civilization), so this must be built into the code somewhere, even if it's very subtle.
What if Frankfurt doesn't exist? Or what if Frankfurt is the capital?
That is the case, since the base game.
That's what I'm saying: Protestantism, if founded by the Germans, is founded in Frankfurt even when Frankfurt is the capital, even though the default holy city mechanic prevents religions from being founded in the capital. So there is something in the DOC code overriding the base game here.
I'm not sure what happens if the Germans found Protestantism but Frankfurt doesn't exist or isn't controlled by the Germans. Presumably the default mechanics would take over?
Anyway, I don't feel that strongly about forcing the Shia holy city into Mesopotamia, but you really can't pretend things like the Jewish, Hindu, Zoroastrian, (Sunni) Muslim and, to a lesser extent, Orthodox holy cities being more or less always founded in one pre-determined location (unless defied by a determined human player) don't exist so I don't see why it's such an issue for the Shia holy city to be essentially predetermined in the same way.
for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
{
if (pLoopCity->plot()->getSpreadFactor(eReligion) >= REGION_SPREAD_HISTORICAL || eReligion == PROTESTANTISM)
{
iValue = 10;
iValue += pLoopCity->getPopulation();
iValue += GC.getGameINLINE().getSorenRandNum(GC.getDefineINT("FOUND_RELIGION_CITY_RAND"), "Found Religion");
if (eReligion != BUDDHISM && eReligion != TAOISM)
{
iValue /= (pLoopCity->getReligionCount() + 1);
}
if (pLoopCity->isHolyCity())
{
iValue /= 10;
}
if (pLoopCity->isCapital())
{
//Rhye - start
//iValue /= 8;
iValue *= 3;
iValue /= 5;
}
if ((pLoopCity->getX() == 60 && pLoopCity->getY() == 44) || (pLoopCity->getX() == 73 && pLoopCity->getY() == 38)) //Rome or Jerusalem
{
if (eReligion == CATHOLICISM || eReligion == ORTHODOXY || eReligion == ISLAM)
iValue *= 2;
//iValue /= 3;
}
if (pLoopCity->getX() == 59 && pLoopCity->getY() == 47) //Milan
{
iValue /= 2;
}
if (pLoopCity->getX() == 71 && pLoopCity->getY() == 43) //Gordium
{
iValue /= 8;
}
if (pLoopCity->getX() == 94 && pLoopCity->getY() == 40) // Pataliputra
{
if (eReligion == HINDUISM || eReligion == BUDDHISM)
{
iValue *= 4;
}
}
if (pLoopCity->getX() == 72 && pLoopCity->getY() == 29 && pLoopCity->getCivilizationType() == ETHIOPIA) //Aksum
{
if (eReligion == ORTHODOXY)
{
iValue *= 4;
}
}
if (eReligion == ZOROASTRIANISM && pLoopCity->getX() == 82 && pLoopCity->getY() == 39) //Parsa
{
iValue *= 8;
}
if (eReligion == ORTHODOXY)
{
if (pLoopCity->isHasReligion(JUDAISM)) iValue *= 2;
if (pLoopCity->isHolyCity(JUDAISM)) iValue *= 2;
}
if (eReligion == (ReligionTypes)PROTESTANTISM)
{
int iRegion = pLoopCity->getRegionID();
if (iRegion != REGION_BRITAIN || iRegion != REGION_IBERIA || iRegion != REGION_ITALY || iRegion != REGION_BALKANS || iRegion != REGION_EUROPE || iRegion != REGION_SCANDINAVIA || iRegion != REGION_RUSSIA)
{
iValue = 5;
}
int iCapitalRegion = getCapitalCity()->getRegionID();
if (iRegion == iCapitalRegion)
{
iValue *= 3;
}
}
iValue = std::max(1, iValue);
if (iValue > iBestValue)
{
iBestValue = iValue;
pBestCity = pLoopCity;
}
}
}
Logically, this does not make any difference, and "weird memory behaviour" isn't happening because of that. You get a minor memory optimisation out of not allocating a variable every time, you get a minor computational optimisation out of not querying the capital region every time, but both are so miniscule that they are not worth the increased code complexity, in my opinion (this goes in general for the "declare all variables at the beginning of the method" pattern the Civ4 source loves so much). On top of that, it's very likely the compiler will already make those optimisations for you, regardless of what the source looks like, although I am not nearly as well informed enough on C++ to say for sure.Could it be that the declaration of int iRegion = pLoopCity->getRegionID(); and int iCapitalRegion = getCapitalCity()->getRegionID(); is in the for-loop, leading to strange memory behaviour? So moving the declaration of these variables outside of the loop, while keeping the assignment of the value still inside the loop, would fix it? (The assignment of the iCapitalRegion value could also be outside of the loop, as that doesn't change in the loop) Or is this irrelevant in C++?
Spoiler :Code:for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop)) { if (pLoopCity->plot()->getSpreadFactor(eReligion) >= REGION_SPREAD_HISTORICAL || eReligion == PROTESTANTISM) { iValue = 10; iValue += pLoopCity->getPopulation(); iValue += GC.getGameINLINE().getSorenRandNum(GC.getDefineINT("FOUND_RELIGION_CITY_RAND"), "Found Religion"); if (eReligion != BUDDHISM && eReligion != TAOISM) { iValue /= (pLoopCity->getReligionCount() + 1); } if (pLoopCity->isHolyCity()) { iValue /= 10; } if (pLoopCity->isCapital()) { //Rhye - start //iValue /= 8; iValue *= 3; iValue /= 5; } if ((pLoopCity->getX() == 60 && pLoopCity->getY() == 44) || (pLoopCity->getX() == 73 && pLoopCity->getY() == 38)) //Rome or Jerusalem { if (eReligion == CATHOLICISM || eReligion == ORTHODOXY || eReligion == ISLAM) iValue *= 2; //iValue /= 3; } if (pLoopCity->getX() == 59 && pLoopCity->getY() == 47) //Milan { iValue /= 2; } if (pLoopCity->getX() == 71 && pLoopCity->getY() == 43) //Gordium { iValue /= 8; } if (pLoopCity->getX() == 94 && pLoopCity->getY() == 40) // Pataliputra { if (eReligion == HINDUISM || eReligion == BUDDHISM) { iValue *= 4; } } if (pLoopCity->getX() == 72 && pLoopCity->getY() == 29 && pLoopCity->getCivilizationType() == ETHIOPIA) //Aksum { if (eReligion == ORTHODOXY) { iValue *= 4; } } if (eReligion == ZOROASTRIANISM && pLoopCity->getX() == 82 && pLoopCity->getY() == 39) //Parsa { iValue *= 8; } if (eReligion == ORTHODOXY) { if (pLoopCity->isHasReligion(JUDAISM)) iValue *= 2; if (pLoopCity->isHolyCity(JUDAISM)) iValue *= 2; } if (eReligion == (ReligionTypes)PROTESTANTISM) { int iRegion = pLoopCity->getRegionID(); if (iRegion != REGION_BRITAIN || iRegion != REGION_IBERIA || iRegion != REGION_ITALY || iRegion != REGION_BALKANS || iRegion != REGION_EUROPE || iRegion != REGION_SCANDINAVIA || iRegion != REGION_RUSSIA) { iValue = 5; } int iCapitalRegion = getCapitalCity()->getRegionID(); if (iRegion == iCapitalRegion) { iValue *= 3; } } iValue = std::max(1, iValue); if (iValue > iBestValue) { iBestValue = iValue; pBestCity = pLoopCity; } } }