Having the Shia islam religion in the game

I actually unironically like the idea of having Shia as a graphical variant in some regions.
 
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.

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?

I guess they would both benefit from slavery.
Same holy city.
Shi'ism should be able to spread in civs with different state religions if Sunni is already present and Shi'ism was historically present (Iran, Levant, Turkey, Afghanistan, Pakistan, India, Indonesia, Egypt)
Perhaps a war between two Muslim Civs triggers the Schism to represent the political/dynastic origins? Or if that's unreasonable considering how few Muslim civs just a Muslim civ capturing an already Muslim city?
Tech requirement: Could be theology, or maybe Doctrine (enables theocracy)?
Not sure what you mean by building requirement...
Temples, Monasteries, Cathedrals would be the same, Shrine could be the Tomb of Imam Ali Mosque, the first Imam of Shia Islam and the most important holy site in Shia Islam that is not shared with Sunni Islam.
 
Catholicism and Buddhism requires the building of a building of another specific religion in addition to the tech requirement in order to be founded
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.
 
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. :)

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).

My proposal (not fully fleshed out yet) is that Shia is founded as soon as Sunni Islam spreads to maybe seven or more cities. This means it is founded almost immediately after the Arab spawn. And I would have it hardcoded to have the holy city always located in Mesopotamia. In the 600 AD start, this means Baghdad; in the 3000 BC start, this would usually be Babylon but might be another city if the Babylonians/Persians/whoever founded another city in Mesopotamia as well. None of those are quite right, but it does represent the major Shia holy sites in Najaf and Karbala (both located just south of Baghdad), which are both hugely important to Shia for their historical significance for the Shia struggle against the Sunni and as pilgrimage sites. Shia would, however, be limited to just a few cities as a secondary religion until medieval Egypt spawns (as the Fatimids in the Tunisia/Libya area at war with the Sunni Arabs), at which point they spread it into Egypt by conquest. Then it most likely fades away after a while until the Iranians spawn. Like the Christian branches, it causes religious unhappiness in your cities to have both, there are diplomatic penalties for the followers of both religions, and the religious URVs both relate to minimizing the influence of the other, among other factors (for example, the Sunni URV would then require 40% of the world to be Sunni, instead of Muslim generally). Either could spread into new cities, so civilizations like the Turks, Ottomans and Mongols who otherwise would be neutral between both will have incentives to pick sides one way or another. The Shia URV would probably include converting a certain number of civilizations to Shia and allowing no Sunni civilizations and possibly a culture or technology related goal (such as Shia civilizations being the most technologically advanced and culturally developed).
 
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).
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.
 
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?
 
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?

I suppose it has to be founded in a Sunni city, so if there are no Sunni cities in Mesopotamia, it would be founded elsewhere, using the usual holy city generator. Just like Protestantism is always founded in Frankfurt if founded by the Germans but uses the normal holy city generator if founded by anyone else and Orthodoxy is founded in the Levant if the founder controls the Levant but otherwise uses the normal holy city generator. This is not a real issue.
 
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?
 
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?

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?
 
It isn't though?
 
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?
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.
 
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.
I'm pretty sure I founded Protestantism in Polynesia once.
 
It isn't though?

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.
 
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.
What if Frankfurt doesn't exist? Or what if Frankfurt is the capital?
 
I propose a change in the mechanics of religion of the game, So there would be the great religions (Protestantism, Islam ...) that would have URV, Shrines built with great prophets, normal foundation methods, schism events, and everything.
There would also be the subdivisions of these main religions that would be Sunni Islam, Theravada Buddhism, Anglican Protestantism, that subdivision could only be at the aesthetic and nomenclature level (without affecting the requirements of URV) adjusting the location on the map (I think it would be easier to implement), OR, you can add components with benefit / loss in diplomacy with other subdivisions of the same religious group and also individually with other subdivisions of other religions, adding specific missionaries from each subdivision, the temples, monasteries and cathedrals should be the same for all subdivisions, spread a subdivision with the missionary unit replace a subdivision of the same religion, the passive spread of one subdivision does not delete the other, among others ... (which would be more difficult to implement)
Some specific religions-related wonders can have their production cost increased by X percent, and then add a modifier (similar to what happens with resources) to decrease production cost by X (or X + __) percent with the appropriate religious subdivision, thus helping the historical construction of some wonders. Wonders must only require the larger religion, not a specific subdivision in order to be built.
Temples, monasteries and cathedrals in a subdivision should be converted and not destroyed in the case of using the Inquisitor unit, in addition to the exchange of subdivisions and temporary unhappiness in the city.
Subdivisions should have a negative impact on religious unity stability, with civics as tolerance / secularism denying that impact and technologies such as Civil Rights decreasing regardless of civics. This would be interesting to represent the multi-religiosity of places like the USA and serve as a justification for the player to maintain civic tolerance. In addition to aesthetically representing the USA as a place with many different Protestant religions and not a single homogeneous Protestant religion, I personally even use clergy in the USA because it is more useful than tolerance and this does not seem historically accurate beyond what strengthens the already strong ones USA.

another point that we should discuss would be to create specifics for each religion as Islam does not gain health from pigs, cows generate extra happiness in hyduism, ... Religions seem very generic (although I understand if no changes are made for ethical reasons)

Subdivision of Islam into Sunnis, Shias and Ibadists (in Oman, Zanzibar and East Africa coast);

Subdivision of Buddhism in Theravada, Mahayana and Vajrayana (in their historical areas according to wikipedia);

Subdivision of Hinduism in Shaktism, Vaishnavism and Shaivism;

Subdivision of Protestantism in (Adventism, Anabaptism, Anglicanism (in England), Baptists, Calvinism, Lutheranism, Methodism, Pentecostalism) of those maybe only use 2 or 3;

Sikhism / Jainism / Xintoism IMO should not be added because they are present in regions that already have many religions and would not add much to the gaming experience, if they were added it would be more appropriate for them to be subdivisions of some of the major religions.

Catholicism is already very good with the schism systems already established.

eastern orthodoxy, Confucianism, Taoism, Zoroastrianism, Judaism I don't think there should be major changes with these IMO.

Traditional African religions (Yorubá, voodoo, Candomblé, Umbanda, Macumba among others) should be added as the area of Africa has become very large and very likely new Civs will be added there.
 
Last edited:
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.
That is the case, since the base game.
 
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.
 
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.

This is not true. In the vanilla game, the capital has a x1/8 modifier, making is much less likely to be selected if you have multiple cities. In DoC, this value is x3/5. Still a penalty, but less harsh.

Looking at the code, I cannot find what could cause Frankfurt from becoming the holy city all the time. City population does influence the value, but I don't think that it is enough to ofset the capital penalty for Frankfurt. Cities in the same region as your capital, which ofcourse includes Frankfurt, do get a x5 bonus, but other German cities should get this as well.

EDIT:
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;
            }
        }
    }
 
Last edited:
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;
            }
        }
    }
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.
 
Top Bottom