Vocum Sineratio: Dona Eis Relions

I've a question...

Gee, whatever could it be...?

Do trade network need to have a 2 way trade route possibility to be established? Or even only a one way trade route possibility does the job? And if it does, it does for both sides?

Nuts. I knew that was coming.

I guess an extra dose of clarification is in order, based on the vocabulary that you are using. The game is actually testing membership of PlotGroups, which are collections of trade network connected plots. PlotGroups are NOT shared between players on opposing teams (I'm not sure if they are shared by teammates - my believe is that (a) they must be and (b) the effort required to check is not justified). Instead, these structures define groups of tiles that are trade network connected for a particular player.

So in this sense, the trade networks are bi-directional: if ( from the point of view of player 1 ), Plot A is trade network connected to Plot B, then A & B are part of the same PlotGroup, and therefore checks to see if B is connected to A will return true.

Where things have the potential to get interesting is the fact that the connection between B & C depends on whose PlotGroups you look at. In other words, there are circumstances where player 1 may view A and B as part of the same plot group, where player 2 does not. Then what?

In the case of CvCity::doReligion, the code logic goes to CvCity::isConnectedTo(City*), which in turn goes to CvPlot(City*), which checks to see if the cities are connected from the PlotGroups of the owner of city A, and from the PlotGroups of the owner of city B. This check is a logical OR operation - so it is reasonably valid to say that the two directions are equivalent.


This is why I was surprised at the notion in the other discussion that the connection might be unidirectional - the developers would have had to deliberately bypass CvCity::isConnectedTo, but in doing so they don't appear to have created a CvCity::isHalfwayConnectedTo. Now, that's your work, not mine, so I'm not particularly motivated to code dive to see what other definitions of connected might be in play. My responsibility there ended when I warned you that you might be full of it.

The usual disclaimer, that the game DLL may not actually match the SDK, is still in effect. Also, I point out that I leave the bread crumbs so that doubters can catch me when I've misread the source.
 
VoU i've one question :
you say
A random seed is added to the city's population, which then has two negative factors applied to it - an 8x bias against the city with the Palace, and a smaller bias scaled with the number of religions already present in the city.
therefore I just dont understand how the screenshot with one six-time-holy city was possible ? was it done with worldbuilder ?
 
That's easy, just dont found any cities before you got divinde right. Guaranteed all Religions in the Capital.
Might have unpleasant side-effects for the overall game success tho...
Also, the Bias aganst number of religions is smaller than that from palace. So if you only have your capital and a second city, chances are good, all new religions will go to the second city. But that's not 100% sure.
 
Trade routes, and more generally open borders, aren't relevant. The key point is the existence of a trade NETWORK between the two cities. You can't shut down the trade network by closing your borders, or jumping to mercantilism, or any tricks like that.

How is it then, that a religion can spread to a civ that I haven't met yet. If I don't now of their existence how can I have a trade network with them. (I once met a civ this way by having my state religion, that I founded, spread to one of their cities)
 
How is it then, that a religion can spread to a civ that I haven't met yet. If I don't now of their existence how can I have a trade network with them. (I once met a civ this way by having my state religion, that I founded, spread to one of their cities)

Meeting a civ is based on encountering either its culture or its units, not on whether or not any of your cities are part of the same plot group as any of their cities. These are two entirely distinct game mechanics.

In other words, in exactly the same way that you can meet another civ without having your cities connected, you can also have your cities connected without having met the other civ.

Note that trade ROUTES are different - there you have to have an open border agreement, and to have that agreement you must have met the other leader.


Maybe I should revise the original article to describe the conditions in terms of plot groups, which are less likely to be confused with trade routes.
 
Maybe I should revise the original article to describe the conditions in terms of plot groups, which are less likely to be confused with trade routes.
I just read it for the first time and it's quite clear. To really seal the deal you could include a sentence which says "if city A has copper and city B can build axemen because of that, the cities are in the same plot group. If city B still cannot build axemen, then they are not in the same plot group."
 
In response to the note about Judaism having a slight advantage over the other religions, I submit some evidence that this is true:

Hebes.JPG

That's my holy city now too! It was bringing in 330 gpt by the end of the game.
 
I have a question regarding using missionaries to spread religion. My apologies if this thread is the wrong place to ask this, but since it relates to the mechanics of spreading religions, I thought it fit with the topic of this article.

Specifically, I was wondering if the chance of a missionary successfully spreading his religion to a city is calculated independently for each attempt. That is, if I use a missionary to spread a religion to one of my cities, and that attempt fails, will all subsequent attempts fail? Or will those attempts occur at reduced odds?

Edit: I loaded a saved game and determined that if an initial missionary fails to spread a religion to a particular city, a subsequent one can still succeed. But, I am still curious if anyone knows if these outcomes are determined independently.
 
When I have specific questions that need volunteer participation, I'll drop them in here.

20070814: Would anybody care to verify that Monasteries continue to get wonder generated effects (bonus gold, research, hammers) even after the discovery of Scientific Method makes them "obsolete"?

The extra Science from Sankore, the extra cash from Spiral Minaret and the extra hammers from Apostolic Palace do not continue after Scientific Method. You do continue to get culture from your Monastery, so you might very well get extra culture from wonders that add culture to religious buildings (Sistine Chapel, etc). I'll have to check, but I think the "extra" culture does stay (just like culture for obsolete Wonders)

I do find it interesting that the culture from buildings doubles after 1000 years and the "bonus" culture is doubled as well... even if the "bonus" itself is far less than 1000 years old. For example, if I build a Temple in 2000 BC and I build the Sistine Chapel in 100 AD, I'll immediately have 14 culture: 2 x 2 :culture: + 2 x 5 bonus :culture:.
 
I have a question regarding using missionaries to spread religion. My apologies if this thread is the wrong place to ask this, but since it relates to the mechanics of spreading religions, I thought it fit with the topic of this article.

Specifically, I was wondering if the chance of a missionary successfully spreading his religion to a city is calculated independently for each attempt. That is, if I use a missionary to spread a religion to one of my cities, and that attempt fails, will all subsequent attempts fail? Or will those attempts occur at reduced odds?

Edit: I loaded a saved game and determined that if an initial missionary fails to spread a religion to a particular city, a subsequent one can still succeed. But, I am still curious if anyone knows if these outcomes are determined independently.

Yes, they are determined independently.

If you have "new random seed on reload" checked in options and you put 3-4 missionaries in a city with multiple existing religions, you'll be able to see it happen. Also, if you do not have "new random seed" checked, you'll be able to see something interesting as well. I'll explain with an example.

I start a game with "new random seed on reload" not checked. During the game, I put 3 missionaries in a city that has 3 existing religions. When I try to spread the religion, I get...
first: fail
second: fail
third: success!

If I reload the game from just before the missionary attempts, I'll see the exact same fail/fail/success sequence that I saw the first time. If I reload a dozen times, I'll continue to see the same fail/fail/success sequence.

Now, if I reload one more time and I initiate a combat somewhere on the map before trying to spread the religion, I'll see completely different and new results for my missionaries. Maybe the first one will succeed, maybe the second will. Maybe none of them will. Who knows? Combats generate lots of random numbers, so it "uses up" the numbers that would have gone to the missionaries. Please note that this does not "defeat" the no-new-random-seed process entirely because repeating the exact sequence of activities will result in the exact same outcome. You're just working around the process by "using up" the random numbers from the pregenerated list if you have a particular need for a "good" number from the list.

Also, I'm not advocating that people do this. If you want to do something like this, you're better off just checking "new random seed on reload" instead of using this "workaround". I'm just putting this here to show that Civ IV does, indeed, calculate each of these missionary events independently.
 
I recall seeing something very early in Civ IV that said later religions (Christianity to some extent, but especially Taoism and Islam) spread more quickly from the holy city/shrine to make up for their late game status (and to keep Buddhism/Hinduism/Judaism from dominating every game by "using up" the free spread on each city before Taoism/Islam are even founded).

Anybody else remember this? Did I just imagine it or was it perhaps just something that was removed in a later update or even perhaps killed in Warlords or BtS?
 
Yes, they are determined independently.

If you have "new random seed on reload" checked in options and you put 3-4 missionaries in a city with multiple existing religions, you'll be able to see it happen. Also, if you do not have "new random seed" checked, you'll be able to see something interesting as well.

Thanks popejubal, for that detailed reply. I'm still a Noble player, and I'm not that familiar with the mechanics of the game engine. Your explanation was very enlightening, and explains some of my observations about how the RNG works in Civ4. If I may ask one other question, where is the "new random seed on reload box" located? I didn't see it in the options menu.
 
These religions are almost interchangeable - the strategic resource which accelerates the construction of a Cathedral is the only difference in the game mechanics.

There is also one event that will not occur if your state religion is Abrahamic (Christianity/Judaism/Islam).

Spoiler :
Event77
Ancient Olympics
Prereq: POLYTHEISM AND State Religion is NOT Judaism OR Christianity OR Islam
Obsolete: MACHINERY or FEUDALISM or MUSIC or PHILOSOPHY or CIVIL_SERVICE or THEOLOGY
Active/Weight: 75/400
Result:
1.Nothing
2.pay 20 gold AND gain +1 attitude with all neighboring AIs
 
so the spread of religion is only affected by distance to holy city and connection to trade network?

What else encourages / inhibits religion spread -
Does state religion increase the chance it will spread or decrease it?
If you have more trade does it increase the chance of religions to spread - does Currency and harbors increase the chance of religion spread?
Do many temples of the religion matter or is it solely the Wonder shrine in the holy city?
 
Does state religion increase the chance it will spread or decrease it?

No effect.

If you have more trade does it increase the chance of religions to spread - does Currency and harbors increase the chance of religion spread?

No effect - again, it's not trade routes, it's trade network connected.

Do many temples of the religion matter or is it solely the Wonder shrine in the holy city?

Only the Shrine. This is easily moddable, by changing the properties for buildings in the appropriate XML file.
 
The first factor is plot distance, expressed as a percentage of the maximum possible plot distance on the map.
Two different distance terms are used in CIV. Step distance treats diagonals as one unit of distance. Plot distance treats them as roughly 1.5. When you watch a city expand its cultural borders, you are seeing it expand using plot distance
Am I right to suppose that on larger maps, the probability of spontaneous spread will be significantly higher than on smaller ones (е.g. Standard vs Huge) for the cities equally distanced from the holy city?

I think, it's worth adding some formulas in the article to calculate probabilities.
For example formula used by the game to assign the holy city.

(10 + POPULATION + RAND(1,10)) / (RELIGIONS_PRESENT + 1)

The code is pretty straight forward. Once it is decided that a certain player founds the religion the game assigns a value to every city of the player as follows:
the city gets an initial value of 10
the city gets +1 for each population point
the city gets a random +0 to +10
This value is divided by number of religions the city already has +1
IF this city is the capital the value is divided by 8
The city with the highest value wins. Ties as always are broken by the oldest city winning (since the game only lists one "Best Value" and only changes it afterwards if another value is higher).

copied from ori's post

As for spreading, I found God-Emperor's post

From what the guy is writing
The sum of the value for being the holy city plus any buildings that have an effect is multiplied by the spread factor for the religion (from the religion's XML) and then modified by distance. In the distance calculation the value is scaled to distance proportional to the map size, by dividing it by this result of this calculation: the RELIGION_SPREAD_DISTANCE_DIVISOR (set to 100 in BtS) times the actual distance then divided by a number that is 5 less than the maximum possible distance on the map. After that, the resulting number (if bigger than 0) is the chance out of X that it will spread, where X is the RELIGION_SPREAD_RAND value in the XML (set to 1000 in BtS).
I can deduce the following:

Chance=(HoCi+Shr)*religion spread factor/mapDistance
HoCi=1
Shr=1
religion spread factor - any ideas?
mapDistance=100*actual plot Distance/(maxDistance-5)
What will be maxDistance values for the different map sizes? I guess it will be half of the map diagonal.
I didn't actually get the next step
After that, the resulting number (if bigger than 0) is the chance out of X that it will spread, where X is the RELIGION_SPREAD_RAND value in the XML (set to 1000 in BtS).
 
Am I right to suppose that on larger maps, the probability of spontaneous spread will be significantly higher than on smaller ones (е.g. Standard vs Huge) for the cities equally distanced from the holy city?

Depends on what you consider significant, but yes. The difference between regular huge and standard maps should be a factor of about 1.5 times the chance for a city the same distance from the holy city due.

religion spread factor - any ideas?

That is the value from the XML. In CIV4ReligionInfo.xml each religion has a value for this specified via the iSpreadFactor tag. In unmodded BtS they are all 100.

mapDistance=100*actual plot Distance/(maxDistance-5)
What will be maxDistance values for the different map sizes? I guess it will be half of the map diagonal.
I didn't actually get the next step

Assuming a map with east-west wrap then maxDistance should be half the diagonal. I don't remember which distance type it uses, so if it is using the one where diagonals are counted as 1 just like the other directions then it should (for E-W wrap maps) be just half the width if it is greater than or equal to the height. If the map does not wrap then it is the full diagonal distance (or just longer of the two dimensions if it is using the diagonals=non-diagonals distance type).

The last step is the random factor. Once you have the chance, that is the chance out of X for the religion to spread. In regular BtS the value of X is 1000. So if the calculated Chance is 7, then it has a 7 out of 1000 chance to spread.
 
Top Bottom