Specific question on culture - SDK and Python

Spiffor

Chieftain
Joined
Jul 26, 2002
Messages
75
Location
Stuttgart is a city of 565
Hi!

I have been toying with the idea of modding culture for quite a while. But I have trouble understanding a few things:

I'm interested in Nationality (such as "90% Romans - 10% Chinese"). And I don't understand:

1. How exactly the cultural influence is calculated. For example, if you have a tight competition with a neighbour for controling a tile, you'll see something like "Roman 50%" when pointing on it. In Debug mode, you'll see something like "Roman culture: 60 - Chinese culture: 60". These figures from the debug mode are absolute, no percentage.
Does anybody know how these figures are calculated, and on which python class I should work to change them the way I like?

2. When the computer calculates the nationalities in a city, it only takes into account your culture in that city, while the rival culture comes only from neighbouring cities.
In other words, if I use the console to make Moscow worth of 10,000 Malian culture points (with Moscow being as Russian as ever), then Moscow will remain 100% Russian nonetheless. I'd like to change that, but I have no idea what I should tweak to have the desired affect: that the foreign culture within this city counts against the "cultural influence".

Thanks in advance :)
 
My understanding (which is mearly from reading forums and in-game exp, not based on looking at the code which I could do but dont have the time for).

Every plot acumulates culture and unless you have a mod that can remove culture it never decresses. Cities are actualy reporting the culture of the Plot they sit on as their culture value. Each turn a city full cultural output is added to its plot and a "fountain" effect is added in its cultural Radius, I say fountain because most of the culture lands nearby and less far away so for example if your City produces 35 culture a turn the city plot incresses by 35 each turn but a plot 2 spaces away at the edge of your radius get something like 7 culture. This Culture Fountain is independent of ownerships, all plots get sprayed regardless of the owner and multiple Cities can sprinkle on the same plot.

When the Cultural Radius of one City grows to encompace another cities plot it starts raining culture on it as well, if the culture in question is forign it starts to change the Cities ratio which can result in culture flipping.
 
Thanks for the answer :goodjob: It will seriously help me understand how culture functions in Civ4, and it should help for my attempt at modding :)

(Well, up to me to lookf or clues in the code :o )
 
Impaler[WrG] said:
My understanding (which is mearly from reading forums and in-game exp, not based on looking at the code which I could do but dont have the time for).

Every plot acumulates culture and unless you have a mod that can remove culture it never decresses. Cities are actualy reporting the culture of the Plot they sit on as their culture value. Each turn a city full cultural output is added to its plot and a "fountain" effect is added in its cultural Radius, I say fountain because most of the culture lands nearby and less far away so for example if your City produces 35 culture a turn the city plot incresses by 35 each turn but a plot 2 spaces away at the edge of your radius get something like 7 culture. This Culture Fountain is independent of ownerships, all plots get sprayed regardless of the owner and multiple Cities can sprinkle on the same plot.

When the Cultural Radius of one City grows to encompace another cities plot it starts raining culture on it as well, if the culture in question is forign it starts to change the Cities ratio which can result in culture flipping.

I must say Impaler, you have a very nice and clean way, with nice metaphors to describe such a thing. Very well said!:goodjob:

What I am trying to say, is just that I couldnt have done it better, without making it completely un-understanderable!
 
If anybody's interested: I've made some tests about the fountain effect, and a plot's culture has a value radically different to the city's culture it is attached to. A plot's culture (PC) is calculated like follows:

When you found a city, the city-plot starts with 2 PC on its own, and the neighbouring plots have 1 (I'll refer to these plots as the "nine-plots" from now on, as the game won't reat these plots differently anymore).
To rise, this cultural value requires that your city produces culture (or that a nearby city "sprinkles" its culture to these squares). If your city doesn't produce any culture, these plots remain at 2 or 1 PC.

Once your city produces culture, the plots acquire PC every turn.

When your city's culture is less than 10, each of the nine-plots get your City's Culture Per Turn (CCPT) + 1.
For example, when you found your first city (with the palace worth 2 CCPT), you have the following (turns 1, 2, 3 and 4) :

1.1.1 | 4.4.4 | 7.7.7 | 10.10.10
1.2.1 | 4.5.4 | 7.8.7 | 10.11.10
1.1.1 | 4.4.4 | 7.7.7 | 10.10.10

The nine-plots' culture increased by 3 per turn, because the city produces 2 CCPT.

Once the city has more than 10 culture, however, the nine-plots' PC increases dramatically, as they gain CCPT+21 each turn. The outer rim of the "fat cross" are the plots that get the old CCPT+1.
Once the city reaches the next culture threshold, the culture on the nine-plots will increase by CCPT+41, the outer rim of the fat cross sees its culture increase by CCPT+21, and the remote parts your cultural area only increase by CCPT+1.
The next culture threshold means that the nine-plots will get CCPT+61, the fat cross CCPT+41 etc.

As you see, the bonuses can get really dramatic. In the early game, the plots around a "cultural" city can get much, much more PC from the bonus than from the actual CCPT. Since the bonus isn't proportional to the CCPT, the nine-plots can get a great many PC every turn.
As a result, when there is a cultural competiton with the neighbour for the control of a plot, the age of the city (if the city has long produced culture, even moderately so) plays a dramatic role.
 
Now, about my mod, I have tried to use CyPlot.changeCulture to modifiy the culture of the relevant plots, but I am wholly unable to select the plot I want using the python console in the game.

If I want to affect a specific plot in the game, to I have to use a function that uses "BeginPlot" and "EndPlot"?

Thanks in advance :)
 
Back
Top Bottom