Culture Mechanics Disassembled

I was intrigued by this metric that Civ4 employs, so just for my own interest I looked at it a bit more closely. Some of you might be interested.

Spoiler :


If it weren't for the rounding due to forcing points onto the board's tiles, the points of equal distance (from origin) would give the following contours.



Note whenever we use the usual metric we're used to, we get circles as curves of equal distance instead of octagons (note the octagons are not regular). This Civ4 metric is used for other things in Civ4 like bomber/fighter range and calculating city distance costs. In general it is used for any notion of distance except for unit movement where stepDistance is used (as VoiceOfUnreason pointed out).

I wondered why it was exactly that the designers decided to use such an uncommon metric, but I thought it might be because the Euclidean metric gives a very large 2-tile radius, or perhaps because it covers slightly fewer tiles for each radius. The Euclidean (usual) metric in the following comparison is d((x1,x2),(y1,y2)) = floor(sqrt( (x1-x2)^2 + (y1-y2)^2 ) ). For each cell, the number inside is a measure of the distance from the cell with 0 in it (the origin).



Also, note the Civ4 metric

d((x1,x2),(y1,y2)) = floor( max(|x1-y1|,|x2-y2|) + 1/2 * min(|x1-y1|,|x2-y2|) ) (from earlier)

has an equivalent expression

| |x1-x2|-|y1-y2| | + floor( 1.5 * min(|x1-y1|,|x2-y2|) )

which I happen to prefer.
 
pieceofmind, I think your charts show exactly why civ used this metric.
euclidean metric gives you a square for distance 2!

Exactly, and that wouldn't remain true to the previous incarnations of civ!

Also, I think they would have liked to have well-defined metric like this rather than fudge the shape of the radius for 2-radius cities. This meant they'd have at their disposal a more universal metric for other distance-dependent functions such as bomber range etc.

I wonder whether this metric was around before Civ4 though? Does anyone know? As far as I know each previous civ has had distance dependent things, especially corruption effects, so I wonder if this is what was used.

Also, while for a 2 tile radius, the square shape is technically closer to the "true" (and I use that word loosely because I realise how loose it is in this context ;) ) circle, the civ4 metric 2-circle just "looks" more circle-like. And even for larger radii, the civ4 radii seem to look better than the Euclidean.

Another thing I forgot to mention to mention earlier which depends on stepDistance and not the metric: Minimum city proximities.
 
I wondered why it was exactly that the designers decided to use such an uncommon metric

One reason is that the developers of all versions of Civ have studiously avoided using any floating-point computation, to avoid inconsistencies between platforms (once upon a time, different computers would give different results for the same floating-point computation). You can question whether this is a good idea (they have certainly introduced quite a few bugs and exploits through relying only on integer arithmetic), but, nevertheless, it is a reason. You could certainly compute Euclidean distance in integer arithmetic if you had to, but this is easier and simpler. I'm not sure how far back this formula dates---I think at least to Civ2.
 
I was intrigued by this metric that Civ4 employs, so just for my own interest I looked at it a bit more closely. Some of you might be interested.

Thanks all, that's some really great info! Glad I wrote out my "daft" questions now. :D

Also, the formula, and your chart, proves that my diagrams do indeed look correct. I just think showing it visually is really helpful in understanding it.

It does create the weird effect in Civ that units don't move on diagonals in the same way as other distances, like culture, are calculated.

Maybe it would be better if they really revised this and went with hex's or something rather than a grid in future.
 
I can't recall ever having heard of a different metric in distance calculations in Civ (starting from civ 1, but then back then I was less interested in knowing the exact game mechanics). And I'm quite sure it was also used as metric in Master of Magic (at least for unit movement).

BTW, very interesting guide on culture flipping, thanks.

One question though about the cultural borders and ocean. I've noticed the cultural borders of a city never extends to the squares which are outside any fat cross of a square on the island the city is located on (so at most two squares into the sea). What does this mean for the culture added to those squares (I'd suppose the squares outside the cultural borders still get nothing, but while those inside get the amount they'd get from the distance to the city (given its cultural level, regardless to the distance to the actual cultural borders) but this is just a guess).
 
I've noticed the cultural borders of a city never extends to the squares which are outside any fat cross of a square on the island the city is located on (so at most two squares into the sea).

I don't think that's true. What is true is that ocean squares that aren't within the fat cross of any land space, can never fall into anyone's cultural boundaries. But, if there are ocean squares within your cultural radius that are not within two spaces of your landmass, but that are within two spaces of some other landmass, then your cultural boundaries can include them.
 
Consider this picture: Bryansk is (as can be seen in the lower left corner) at culture size 4, while its cultural boundaries still do not envelop the square just outside its fat cross NE, while it is a grassland square (on a different island). Thus my previous impression.

Note that this is in Vanilla Civ4 (1.61) with the HOF-mod.
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    190.6 KB · Views: 397
I was intrigued by this metric that Civ4 employs, so just for my own interest I looked at it a bit more closely. Some of you might be interested.

thank you very much for this research. I actually found that most information provide in this article: http://www.civfanatics.com/civ4/strategy/city_upkeep.php is largly doesn't apply to Warlords patch 2.08. The distance cost part of a city upkeep (and completely ignoring the Civic upkeep here, it is listed in the separate line on the Finance adviser screen and has nothing to do with the City maintenance) is something aroung 0.205 * distance_from the capital, where the distance is calculated as it is explained in your post, and the city number cost part of a city upkeep is just around 0.14 * number_of_cities capped at miximum of 5 per city.
 
I recently got BTS and noted that now the cultural boundaries do encompass squares which are more than two squares away from your island, but less than two squares away from some other island as DaviddesJ suggested. So I guess it is a version thing.
 
Post Deleted
 
There is another cultural borders restriction that I believe has not yet been mentioned. It is that you cannot extend your cultural borders greater than the fat cross across continents.
This, I believe explains the situation Celebithil mentions
Can anyone confirm/deny this?
Check out the screenshots below
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    194 KB · Views: 285
  • Civ4ScreenShot0001.JPG
    Civ4ScreenShot0001.JPG
    186.5 KB · Views: 309
But, if there are ocean squares within your cultural radius that are not within two spaces of your landmass, but that are within two spaces of some other landmass, then your cultural boundaries can include them.

I have a screenshot from BTS proving this false. I just used worldbuilder and made a city with the maximum culture. I believe that from the screenshot below it quite clear that cultural borders from a single city may only extend out 2 squares form the cities landmass regardless of culture strength (however i am unsure if you can use a secondary city on another landmass to allow the culture to overflow (mainly used in plot culture battles)
 

Attachments

  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    119.1 KB · Views: 363
Does anyone know how this was changed with BtS? In all games I played I was very disappointed by the culture bomb, so it seems it has changed.

Culture bomb have been weakend alot, it is mentioned somewhere, but i can't recall exactly where. It was in some patch somewhere.

Culture can't extend more than 2 tiles into the water, which is why you see that phenomen.
 
This was a great thread that taught me alot, so I thought I'd just raise it from the dead to disassemble some more. :)

Let me first quote the two most messages (or parts of messages) that I'm referring to - I'm adding spoilers so that this post doesn't look so horrible.

Spoiler :
You are probably wondering now where all these cultural values are coming from. The city culture is pretty easy, since the city screen clearly shows what all the sources of culture are. All the various temples, libraries, specialists, culture from the cultural slider, and culture from production are added up and then multiplied by the bonuses given by cathedrals, wonders, civics, and so on. This value, sometimes called CPT(Culture Per Turn), is added to the city's culture each and every turn. If this gives the city enough culture to increase it's cultural level and radius, these will also be increased.
The city's CPT is also added to the plot culture of every plot within the city's cultural radius, regardless of ownership or presence or absence of other cities. However, there's an added factor based on the city's cultural radius. If the distance between the plot and the city is less than the cultural radius, then 20 times the difference is added to the plot culture as well. Note that the square that the city is on counts as being 1 space away and that this 20 value is not scaled with regards to game mode. It is always 20 per turn, period.
To make sure that that's clear, let me describe it another way. Think of the city's potential cultural area as a series of rings. The first ring consists of the city and the 8 surrounding squares. The second ring contains the other 12 squares of the city's production area, and so on. When the city's cultural level is 1, only the first ring gets the points from the city's CPT. When the city's cultural level reaches 2, both first and second ring get the base CPT and the first ring also gets and additional 20 points a turn, even if the city isn't generating any culture at that time. When the city reaches it's third cultural expansion, The inner 9 squares get an extra 40 points, the next ring gets 20 points and so on. At the highest level of culture, the inner ring gets a whopping 100 extra points of plot culture per turn.
When you found a city, you also get some plot culture to allow you to control the surrounding area, specifically 2 points on the city square and 1 point in the surrounding 8 squares. This is why newly founded cities are so easy to culturally overwhelm. All you need is a few turns of an obelisk and you've got a majority of culture in your neighbor's city.

Spoiler :
Also thanks from me for this post, it's really helped me out to understand things. Really excellent info.

In trying to explain this to other people (during complex peace negotiations regarding my borders with a Spiritual culture bomb crazy neighbour ;) ) I drew out these diagrams and found them helpful in explaining it, so I thought I would post them here in case others found them handy.

This is WIP and if anyone can confirm if these are correct or point out any mistakes, that would be marvellous. :goodjob:

What's weird about it is the way it draws in the diagonals between the fat cross cultural expansions, which are easy to work out. It’s not a simple tile radius from the city at all, even at level 2, because if it was, culture would expand in a perfect square around the city. This means cities have more cultural influence on their N/S/E/W spokes than on the splits between these directions.

This is also where I am kind of guessing how it draws in the culture bonuses, based on what I've seen in the game. I'm definitely not 100% sure of this though, especially on the bigger culture sizes.


# = city site
c = tile receiving base CPT
2 = tile receiving base CPT + 20
4 = tile receiving base CPT + 40
6 = tile receiving base CPT + 60
8 = tile receiving base CPT + 80
0 = tile receiving base CPT + 100


A basic city starts like this.

Level 1 Culture: 1-9 points

Code:
ccc
c#c
ccc


Level 2 Culture: 10-99 points

Code:
 ccc
c222c
c2#2c
c222c
 ccc


Level 3 Culture: 100-499 points

Code:
  ccc
 c222c
c24442c
c24#42c
c24442c
 c222c
  ccc


Level 4 Culture: 500-4999 points
(Note the diagonal looks especially odd & 'jagged' at this level and higher)

Code:
   ccc
 cc222cc
 c24442c
c2466642c
c246#642c
c2466642c
 c24442c
 cc222cc
   ccc


Level 5 Culture: 5000-49,999 points

Code:
    ccc
  cc222cc
 c2244422c
 c2466642c
c246888642c
c2468#8642c
c246888642c
 c2466642c
 c2244422c
  cc222cc
    ccc

Level 6 'Legendary' Culture: 50,000+ points

Code:
     ccc
   cc222cc
  c2244422c
 c244666442c
 c246888642c
c24680008642c
c24680#08642c
c24680008642c
 c246888642c
 c244666442c
  c2244422c
   cc222cc
     ccc

I just had a little world builder session to test these explanations.
And here comes my huge refinement of Remy's diagrams:


# = city site (probably receiving CPT + 1, not tested yet)
c = tile receiving base CPT + 1
2 = tile receiving base CPT + 21
4 = tile receiving base CPT + 41
6 = tile receiving base CPT + 61
8 = tile receiving base CPT + 81
0 = tile receiving base CPT + 101



A basic city starts like this.

Level 1 Culture: 1-9 points

Code:
ccc
c#c
ccc

Level 2 Culture: 10-99 points

Code:
 ccc
c222c
c2#2c
c222c
 ccc

Spoiler for the higher culture levels.
Spoiler :

Level 3 Culture: 100-499 points

Code:
  ccc
 c222c
c24442c
c24#42c
c24442c
 c222c
  ccc


Level 4 Culture: 500-4999 points
(Note the diagonal looks especially odd & 'jagged' at this level and higher)

Code:
   ccc
 cc222cc
 c24442c
c2466642c
c246#642c
c2466642c
 c24442c
 cc222cc
   ccc


Level 5 Culture: 5000-49,999 points

Code:
    ccc
  cc222cc
 c2244422c
 c2466642c
c246888642c
c2468#8642c
c246888642c
 c2466642c
 c2244422c
  cc222cc
    ccc

Level 6 'Legendary' Culture: 50,000+ points

Code:
     ccc
   cc222cc
  c2244422c
 c244666442c
 c246888642c
c24680008642c
c24680#08642c
c24680008642c
 c246888642c
 c244666442c
  c2244422c
   cc222cc
     ccc

Yep, the hole difference is 1 CPT. :D
But it's a secret CPT :eek: - all tiles within your cities' cultural radii receive it at the beginning of each turn, for free!

Spoiler with a few pictures from my world builder session that gave this result.
Spoiler :
Orleans and York were both founded on turn 0 and received a monument, York also got a library, a jewish temple and the jewish religion. The contested tile (which's culture is shown in the bottom left corner of each screenshot) is the plain 1E of Orleans.
On turn 0, it receives 1 french culture because the city is founded. The monument doesn't give any culture yet, because it didn't exist when the turn started.

Turn 1, the french tile culture is 3 - 1 from the founding of the city, one from the monument, and the 1 secret CPT. (You can't see this yet because the tiles is not yet contested - there is no English culture yet -, but you will believe me in a few turns.)

Turn 2
Civ4ScreenShot0008.JPG
The French tile culture is 5, the English tile culture is 6, resulting in English control of the tile at 45-54% culture (the game always brings these percentages down to a round number).

Civ4ScreenShot0009.JPG
7-11 -> 36-63%
Civ4ScreenShot0010.JPG
9-18 -> 33-66%
Civ4ScreenShot0011.JPG

Well, if you're interested, do the rest of the math for yourself... :p
(If you really do, remember: from turn 25 on, all buildings are 1000 years old, so they give twice their usual CPT.)

Small BUG mod side note:
Spoiler :
"Your population:2 plus growth: 1 (75%), will exceed the domination limit: 3 (75%)" - That is, of course, a misscalculation. My population + growth would be 75% of the world's population only if the overall global population didn't change despite my population growth. But it does, so my 2+1 citizens only make up 3/5 = 60% of the world's population. No domination for me... ;)

Civ4ScreenShot0014.JPG
Civ4ScreenShot0015.JPG
Civ4ScreenShot0016.JPG
Civ4ScreenShot0018.JPG


Open questions:
(Find the answer to any of these and you might become as famous and popular as me, the discoverer of the secret tile CPT! :old: ;))

Does the city tile receive only the culture that the city actually produces, or does it get the same amount as the adjacent tiles (CPT+1 for non-expanded borders)?
(I suspect the latter.)

Does the city tile of a newly founded city really get +2 culture, as claimed by DerangedDuck, or only +1?
(I suspect the latter.)

Do tiles within the cultural radius of more than one city receive more than one secret CPT?
(I suspect they do.)
 
I like to imagine a city as a node where culture is generated and sprayed up into the air like a fountain, and deposits itself into the terrain itself. Good metaphor.
 
Top Bottom