What determines Holy City?

Repair guys get their knowledge from the codebase. Some people may find it sad that religion founding is in no way tied to their beliefs. Be assured that, RNG aside, the computer has no part in this descision, it is the code that controls it.

In contrast to real-life religions the holy city founding in civ can be proved. if you want to take a look at the code yourself feel free to do so, i prefer to trust in oris statement - as i suspect that he sometimes eats code for breakfast.
 
Repair guys get their knowledge from the codebase. Some people may find it sad that religion founding is in no way tied to their beliefs. Be assured that, RNG aside, the computer has no part in this descision, it is the code that controls it.

In contrast to real-life religions the holy city founding in civ can be proved. if you want to take a look at the code yourself feel free to do so, i prefer to trust in oris statement - as i suspect that he sometimes eats code for breakfast.

Or he just reworded verge's post which was linked earlier in this thread.

I don't find it "sad" :rolleyes: , its just I find it very odd that once I have the great library, and stacks of great sages in there (Sidar), that it is very rare for a holy city to be founded in any other city, regardless of whether the city is a capital or not.

I always play sidar, have played at least a dozen games, and almost always build the great library as part of my strategy. It may all be coincidence indeed, or somebody may be missing something. Even if the code has been looked at, they may be missing something in the code somewhere else.

And really, until you look at the code yourself, you are doing nothing more than trying to sound authoritative on the back of someone else, and have added nothing to the conversation.
 
:hmm: how about the foundreligion code in CvPlayer.cpp:

Code:
iBestValue = 0;
	pBestCity = NULL;

	for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
	{
		if (!bStarting || !(pLoopCity->isHolyCity()))
		{
			iValue = 10;
			iValue += pLoopCity->getPopulation();
			iValue += GC.getGameINLINE().getSorenRandNum(GC.getDefineINT("FOUND_RELIGION_CITY_RAND"), "Found Religion");

			iValue /= (pLoopCity->getReligionCount() + 1);

			if (pLoopCity->isCapital())
			{
				iValue /= 8;
			}

			iValue = std::max(1, iValue);

			if (iValue > iBestValue)
			{
				iBestValue = iValue;
				pBestCity = pLoopCity;
			}
		}
	}
I did post this a few times over the years - this code did not change with patches in the core game, and this really is all there is - I listed the english language version in my earlier post - now as for ffh, lets see:

Code:
iBestValue = 0;
	pBestCity = NULL;

	for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
	{
		if (!bStarting || !(pLoopCity->isHolyCity()))
		{
			iValue = 10;
			iValue += pLoopCity->getPopulation();
			iValue += GC.getGameINLINE().getSorenRandNum(GC.getDefineINT("FOUND_RELIGION_CITY_RAND"), "Found Religion");

			iValue /= (pLoopCity->getReligionCount() + 1);

			if (pLoopCity->isCapital())
			{
				iValue /= 8;
			}

//FfH: Added by Kael 11/18/2007
			if (pLoopCity->isSettlement())
			{
				iValue /= 8;
			}
//FfH: End Add

			iValue = std::max(1, iValue);

			if (iValue > iBestValue)
			{
				iBestValue = iValue;
				pBestCity = pLoopCity;
			}
		}
	}

the only difference is that settlements are as unlikely to found a religion as the capital is - there certainly is no bias whatsoever with regards to wonders - the game moves through cities by ID - which is determined by founding order and scores each the first one as "best" - once it gets to another city with a higher score that becomes "best" and so on until all cities are looped through - then the city currently regarded as "best" wins. This is the cause of the tie breaking by founding date.
 
Top Bottom