How does religion spread?

FreeTerminus

Warlord
Joined
May 27, 2006
Messages
101
I was playing a multiplayer game...I had founded Judaism and Hinduism. My state religion was Hinduism, and I was happily spreading it around...
Suddenly Judaism starts spreading *everywhere*. I do absolutely nothing to spread it, but soon enough most civilizations (There are 4 holdouts of Buddhism) are Jewish. As time progresses, 2 of those convert to Judaism (including India, founder of Buddhism).
Why did it spread so quickly without my interference? What determines how religion spreads?
 
There are two methods of religion spread:

The first is through the trade network. Any city with a trade connection to the holy city of a religion, and does not already have a religion, can have that religion spread to it. There is a greater chance of this if the religious shrine of that religion has been built. Once a city has a religion it can never get another by natural spread through the trade network. As far as I know there is no difference in the rate at which the religions spread, and it is not affected by a civ's state religion, so it must just have been an odd run of luck that Judaism spread and Hinduism didn't.

The second is by missionaries. These can be used to manually spread religions, and to get multiple religions in a city. They cannot be used in a civ running theocracy unless they are missionaries of that civ's state religion (by the way, theocracy does not stop spread of non state religion through the trade network). The chance of a missionary successfully spreading a religion in a city decreases with the number of religions already present. More than 3 or 4 religions ppresent will result in an extremely high number of failures.
 
One thing to add to the previous post:

You CAN spread non-state religion in YOUR OWN country if you are running Theocracy. You just cannot spread non-state religion in OTHER countries who are running it. (and THEY cannot spread it to YOU)
 
If Isabella gets a hold of a religion, she will spread it like crazy.
 
if you want I can attach the SDK code which details how it is spread, but i doupt that you want me to ;)
 
MrCynical said:
Once a city has a religion it can never get another by natural spread through the trade network.

Not true, I have had buddhism spread to three/four religion cities from other continents in the past (late game though). No missionaries involved. I think such spreading may only occur after Sci Method when monestaries become obsolete.
 
Not true, I have had buddhism spread to three/four religion cities from other continents in the past (late game though). No missionaries involved. I think such spreading may only occur after Sci Method when monestaries become obsolete.

Nope. This is just you not noticing a foreign missionary. Trade network spread of religion can only occur to cities with no pre existing religion, no exceptions.
 
MrCynical is right.
 
MrCynical said:
Nope. This is just you not noticing a foreign missionary. Trade network spread of religion can only occur to cities with no pre existing religion, no exceptions.

Not possible, I didn't have open borders with any AIs, and no wars. Maybe it was a glitch (it was only Buddhism appearing, seemeingly at random).
 
Thats it, you've made me fetch the code.
Spoiler :

Code:
void CvCity::doReligion()
{
	CvCity* pLoopCity;
	int iRandThreshold;
	int iSpread;
	int iLoop;
	int iI, iJ;

	CyCity* pyCity = new CyCity(this);
	CyArgsList argsList;
	argsList.add(gDLL->getPythonIFace()->makePythonObject(pyCity));	// pass in city class
	long lResult=0;
	gDLL->getPythonIFace()->callFunction(PYGameModule, "doReligion", argsList.makeFunctionArgs(), &lResult);
	delete pyCity;	// python fxn must not hold on to this pointer 
	if (lResult == 1)
	{
		return;
	}

	[b]if (getReligionCount() == 0)[/b]
	{
		for (iI = 0; iI < GC.getNumReligionInfos(); iI++)
		{
			if (!isHasReligion((ReligionTypes)iI))
			{
				if ((iI == GET_PLAYER(getOwnerINLINE()).getStateReligion()) || !(GET_PLAYER(getOwnerINLINE()).isNoNonStateReligionSpread()))
				{
					iRandThreshold = 0;

					for (iJ = 0; iJ < MAX_PLAYERS; iJ++)
					{
						if (GET_PLAYER((PlayerTypes)iJ).isAlive())
						{
							for (pLoopCity = GET_PLAYER((PlayerTypes)iJ).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER((PlayerTypes)iJ).nextCity(&iLoop))
							{
								if (pLoopCity->isConnectedTo(this))
								{
									iSpread = pLoopCity->getReligionInfluence((ReligionTypes)iI);

									iSpread *= GC.getReligionInfo((ReligionTypes)iI).getSpreadFactor();

									if (iSpread > 0)
									{
										iSpread /= max(1, (((GC.getDefineINT("RELIGION_SPREAD_DISTANCE_DIVISOR") * plotDistance(getX_INLINE(), getY_INLINE(), pLoopCity->getX_INLINE(), pLoopCity->getY_INLINE())) / GC.getMapINLINE().maxPlotDistance()) - 5));

										//iSpread /= (getReligionCount() + 1);

										iRandThreshold = max(iRandThreshold, iSpread);
									}
								}
							}
						}
					}

					if (GC.getGameINLINE().getSorenRandNum(GC.getDefineINT("RELIGION_SPREAD_RAND"), "Religion Spread") < iRandThreshold)
					{
						setHasReligion(((ReligionTypes)iI), true, true);
						break;
					}
				}
			}
		}
	}
}


Look at the line in bold. It says that a religion will only spread to a city if it has no religions.
 
Cool, no worries. Probably a glitch, or my oversight.
 
Top Bottom