Can you choose the founding city of a religion?

petermarkab

Chieftain
Joined
May 7, 2003
Messages
54
I've found that by pop rushing in certain cities, or by spreading another religion to all but one of my cities, I can influence where the holy city of religion X is founded.

But has anyone delved deeper and discovered the mechanics of holy city foundation?

I've attached my save game (BtS 3.17 i think, with an unofficial patch - Bhruic?). There's a Great Prophet in Canterbury which you can use to pop Theology, but I want the Holy City to be in Canterbury, and can't get it!!!

For info: Emperor level, map is large, tectonics 60% ocean, 18 civs

Thanks for your help

Peter
 

Attachments

I'm pretty sure the mechanics are random, and there's no way to force a holy city to be founded in a certain city. (other than having only one city of course :p ) However there are definitely ways to increase the odds of certain cities, having no religion present or the city being small and new seems to increase the odds.

I'm sure there are some complex calculations somewhere but just like you can lose a 95% odds battle or pop an artist with 5%, sometimes the RNG won't agree with you.
 
Joshua covers the basics -- there's randomness involved but to increase your chances you want your target city to have much higher pop and fewer already-present religions than your other cities; you also will almost never get a religion in your capital so long as there are other cities to choose from. I'm sure the details of the mechanics are posted somewhere around here; try some of the religion-related strategy articles. Of course if you understand C++ just look at CvPlayer::foundReligion() in the SDK as shown in the spoiler below.
Spoiler :
Code:
	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;
			}
		}
	}
 
It won't work in MP, but for SP, save the turn before you found it and keep reloading until it's in the city you want. Should work.
 
It won't work in MP, but for SP, save the turn before you found it and keep reloading until it's in the city you want. Should work.

Alternatively, go into world builder, remove the holy city from its current spot and place it on the city of your choice. :rolleyes:

Or while you're there maybe you should just make every city in your empire the holy city, and then place shrines on each! :p Would that even work...?
 
Alternatively, go into world builder, remove the holy city from its current spot and place it on the city of your choice. :rolleyes:

Or while you're there maybe you should just make every city in your empire the holy city, and then place shrines on each! :p Would that even work...?

Just tried it with WB. The holy cities toggle, so you can only have one holy city per religion, but you can relocate it like you thought.
 
i dont get why people hate people who use WB, as someone who has experiance with table top games, being able to reach into the core mechanics and change things a bit doesn't make me a cheater, if you don't like a rule in the book, throw it out.
 
Here's some observation of the code posted by Dresden.

I can't say what "bStarting" variable represent, so I just say "Something"

It starts with a loop to go through all the cities.

If not "something" or the city is not holy city (either one of the two conditions is true, or both is true) then do this

Give 10 to iValue, then add the city population to it. For example, let's say the population is 6, so iValue now is 16.

generate a random number, which I have no idea what's the range is. Let's just assume, for practical and example purpose, the RNG give me 5. Add that to iValue, and it now is 21.

Get the number of religion exists in the city. If the city has 2 existing religion anymore, then iValue is divided by 3 (2+1). Now iValue is 21 / 3 = 7.

Is it a capital city? If yes, then iValue is divided by 8 again, which will be 7 / 8 = 0.875.

No idea what does "std::max" do, since I have no access to the SDK/code.

After that, it compares to iBestValue, whatever that value is. If iValue is bigger, it sets the City as HolyCity.

If it's not a last city, go back to the loop and start with next city.

From programming pov, if that's all what determine the best city for holy city, if ALL your cities passed the test, then the last city will always be your holy city no matter what. The reason is, even after it get a city with iValue bigger the iBestValue, it still goes through the rest of the city. If another city has iValue bigger than iBestValue, then it will overwrite pBestCity with the latest city the loop is checking.

So, for a city that has no religion and not a capital definitely will get better chance.
 
Or to simplify, if all your cities pass that bStarting/holy city check (presumably on the bStarting check...), then your next holy city if the city with the highest of the following value:
(10 + pop + RNG) / (1 + #religions in city) / (8 if capital, else 1)

Basically, in order of importance:
1. Capital or not -> basically, if you have another city, your capital will almost never be a holy city
2. number of religions. If you take the RNG=0, a city of size 1 with no religion has the same chance of founding a holy city as a city of size 12 (!) with one religion. A city of size 2 with one religion in it has the same chance as a city of size 8 with 2 religions in it.


As for the WB point, it is a form of cheating, since it's usually adding things in after the fact. The "better" cheat is to make a mod of what you wanted, and run with that. It all depends what you're cheating on. If you're playing a one city challenge and go to WB to add Iron to the 3rd ring, I would say that's just a minor cheat. Or if you transform a mountain into a hill to prevent you from getting at something just on the other side of the isthmus, that's one thing. However, if you add yourself 3 fish resources, iron, gold, silver, marble, and stone in your BFC, that's another story. But if you want that edge, go ahead. Nobody's going to knock down your door and yell at you for doing that. It's the difference between playing with the game the RNG handed you, and molding it. I'm sure some people object to people who use any map other than "fractal", since you "know" what the map will be (ie. on an islands map, rush to the Great Lighthouse. On a pangaea, maybe not as critical).
 
Back
Top Bottom