Game's code - faithless Pop growth makes cities forever harder to convert?

4eeee

Chieftain
Joined
Apr 23, 2021
Messages
43
Hello. I've been looking through game's source files for Brand New World trying to figure out the precise way religious pressure works in cities and I wanted to confirm one thing that seemed odd.

Relevant code is in CvReligionClasses.cpp. DoPopulationChange() method is responsible for what happens when a city's population grows:
Spoiler CvCityReligions::DoPopulationChange() :
Code:
void CvCityReligions::DoPopulationChange(int iChange)
{
    ReligionTypes eMajorityReligion = GetReligiousMajority();

    // Only add pressure if the population went up; if starving, leave pressure alone (but recompute followers)
    if(iChange > 0)
    {
        AddReligiousPressure(FOLLOWER_CHANGE_POP_CHANGE, eMajorityReligion, iChange * GC.getRELIGION_ATHEISM_PRESSURE_PER_POP());
    }
    else if (iChange < 0)
    {
        RecomputeFollowers(FOLLOWER_CHANGE_POP_CHANGE, eMajorityReligion);
    }
}
What caught my curiousity is that it always adds pressure to majority religion when city grows, and non-believer/NO_RELIGION pressure is not excluded from this as far as I can tell. Not only that, but non-believer pressure is the only type of pressure that can't ever be erased in any way.

As far as I can tell, the conclusion is that the longer a city grows with no majority pantheon/religion, the harder it will be to convert no matter what. Even if you use a prophet, unlike pressure from other religions which gets wiped out regardless of it's amount, the unbelievers are here to stay. On the flip side, if a city had majority religion from the time it had 1 pop, it will be extremely easy to flip it back and forth using Prophets or Inquisitors.

Am I correct in understanding that non-believers get rooted in the city forever, but a city that was extremely faithful to one religion can effortlessly be flipped to another with just a prophet? And that cities that grew large away from religions are a pain in the ass to convert? It just seems so strange that convincing people who never knew religion is harder than those who were converted a gazillion times, hm

Another interesting implication is that if a city has e.g. 50/50 split between two religions, the new pop will add a burst of non-believer pressure (GetReligiousMajority() returns NO_RELIGION if everything failed to achieve majority). So the new pops push back conversion progress AND again make city forever harder to convert.
Spoiler CvCityReligions::GetReligiousMajority() :

Code:
ReligionTypes CvCityReligions::GetReligiousMajority()
{
    int iTotalFollowers = 0;
    int iMostFollowerPressure = 0;
    int iMostFollowers = -1;
    ReligionTypes eMostFollowers = NO_RELIGION;
    ReligionInCityList::iterator religionIt;

    for(religionIt = m_ReligionStatus.begin(); religionIt != m_ReligionStatus.end(); ++religionIt)
    {
        iTotalFollowers += religionIt->m_iFollowers;

        if(religionIt->m_iFollowers > iMostFollowers || religionIt->m_iFollowers == iMostFollowers && religionIt->m_iPressure > iMostFollowerPressure)
        {
            iMostFollowers = religionIt->m_iFollowers;
            iMostFollowerPressure = religionIt->m_iPressure;
            eMostFollowers = religionIt->m_eReligion;
        }
    }

    if ((iMostFollowers * 2) >= iTotalFollowers)
    {
        return eMostFollowers;
    }
    else
    {
        return NO_RELIGION;
    }
}
 
Yes, I think that is correct, with the possible exception of the last part about a 50/50 split - I think this can still result in a majority religion, although that might be only in the mod I usually play.
 
Top Bottom