View Full Version : Holistic Culture - A more natural cultural model


Mylon
Jan 06, 2006, 02:13 PM
=== Holistic Culture 0.32 ===

This mod is the cultural model from my mod, Mylon Mod, as of about version 0.32 of that mod. The only other change of this Mod is that the cultural levels all follow the same formula despite game speed: 50 - 250 - 1250 - 6250 - 32150 - 156250. This is an unfortunate limitation due to the inability to call the culture needed for each level in Python. Without the other cultural changes of my mod, a cultural victory will probably be nearly impossible, however since there is one more cultural level the net effect should not be too different.

Feel free to incorporate this into your own mod (with credit given, of course), or play as a standalone mod.

This is how the cultural model is intended to work currently (there may be bugs, as this isn't a finished release).

Brief version:
Culture spreads organically. As a city converts and the nationality of the city is mixed, the culture generated by the city is also mixed. This means border cities will spread culture to inner cities and those inner cities will eventually spread culture further into a civilization. It is important for inner cities to produce culture now because they are what keep the border cities more pure and able to better extert influence on contested land.
Culture also spreads by means of trade. Trade routes listed on a city (taken as export trades) are cities that are influenced by the selected city and given culture, again based on the nationality of the trade city. Trade is a means of spreading culture far and wide.
Also, citizens produce culture naturally. This presents that culture comes not from buildings, but from people. The buildings are really there to facilitate culture and spread it better, but it still ultimately comes from people.
Religions spread culture at an incredible rate. Each religion generates culture for the owner of the holy city. Religion is one way of spreading culture.
This also means that captured cities will generally not start at 0 culture.

Detailed version:
Culture is generated at to Culture Rate * ( 0.3 + 0.7 * Nationality% ) (So it generates at a rate of at least 30%) for the city owner and Culture Rate * ( 0.7 - 0.3 * (1 - Nationality%)^2 ) (so it caps at 70%) for everyone else.
Trade spreads culture at the rate of trade value * 2 * Culturerate / 100. A city generating 50 culture and trading 10 commerce per turn will export 10 culture per turn to the city it's trading with. This is split by nationality like above.
Each citizen adds +2 to the base culture rate.
Buildings that only generate culture for their original builder (most notably wonders) have their culture value subtracted from the calculations where culture is split according to nationality and instead their culture is added to the city directly for their owner. This should include even when the city is under foreign control.
Religions generate 3 culture per turn for the owner of the holy city. This number is multiplied as appropriate with any modifier the city may have.
Culture is assigned by the normal method (which cannot be stopped without the SDK, it seems), subtracted, and then reassigned according to this code. Also, the code manually reverses culture assignment to plots (which determines city nationality and plot ownership) and reassigns it according to the formula: [CultureRateOfSpecificNationality * (0.70 ^ ( Plot distance from city ) ) ^ ( 0.8 ^ (Culture Level - Plot Distance from city) ) + 1]. The old method was [CultureRate + 20 * (Culture Level - Plot Distance from city) + 1]. The radius for each civilization's culture in a city is tracked separately. The old method gives a bonus to the inner plots of a city with a wide influence, but this kind of bonus would override the maximum and minimums set forth in earlier formulas. In other words, a recently captured city of only 5% nationality would only further slip under enemy control because of the radius bonuses using the old formula.

To do:
The UI needs to be updated to reflect these changes. The amount of culture generated per turn is not correctly reported to the player.
A civilization's ability to control territory and flip cities only extends to the reach of it's own cities. As much as one may have a cultural dominance over a remote city, the city will not flip. This needs to be changed.
Add more means of spreading culture abroad. Possibly by making trade more valuable culturally through adjusting the formula, adding buildings that amplify the trade culture affect, or some other means.
Change the formulas until a nice balance is reached. Ideally, a player should be able to achieve a "cultural victory" by converting enough cities across the globe to achieve a domination victory. This would totally eliminate the need for the arbitrary cultural victory and instead give it a more meaningful feel and a less "all or nothing" approach.
Maybe change some features of how culture is tabulated or include means of spending culture. One bothersome aspect of the game is that with how culture is accumulated, the amount of culture generated needs to be increasingly inflated for civilizations to have any chance of converting an old culturally established city. This might be able to work if buildings had a multiplicative modifier effect instead of an additive modifier effect. (That is, two cathedrals would yield a 125% bonus instead of a 100% bonus, a third would yield a 237.5% bonus instead of a 150% bonus) Other ideas include making plot culture entirely based on current culture rate (and not have it accumulate), which would support the rapid spread of radical ideas but trivialize old influences.

Exavier
Jan 06, 2006, 02:16 PM
hehe thank you mylon :P
I been waiting for this... it it works right I may have it added before my next update next saturday :P

Fachy
Jan 06, 2006, 02:38 PM
I'm not sure I get this right.. does that mean you can own the land tiles surrounding a city 2 civs away by just exporting resources & religion to it?

Exavier
Jan 06, 2006, 02:40 PM
I dought this is considered a standalone mod (unless you made it into one). to see what it does download and play Mylon Mod as all this is is the scripts that create the modified culture effects. It mixes nationality up a bit :)

RED DIAMOND
Jan 06, 2006, 05:30 PM
I would use it BUT it uses the same script files as the Inquistor mod and I'm not going to lose that one.:mad:

Mylon
Jan 06, 2006, 07:01 PM
I would use it BUT it uses the same script files as the Inquistor mod and I'm not going to lose that one.:mad:

What is it about Mylon Mod that keeps you from using it as a whole?

RED DIAMOND
Jan 06, 2006, 08:15 PM
What is it about Mylon Mod that keeps you from using it as a whole?


Well you would have to admit there are ALOT of changes to the gameplay basics along with the units etc.. I don't like vanilla but I don't like radical changes until I have a little more seat time with some of the minor changes I've made. I have included quite a few things, but I don't want to change too much too soon is all. Cheers.

korn469
Jan 07, 2006, 10:11 AM
Mylon could you describe in more detail exact how your cultural model works?

Mylon
Jan 08, 2006, 11:59 PM
I updated the post with some details on how it works. I'll take a break and read the Galactic Civilization influence model tomorrow for ideas.

Zuul
Jan 09, 2006, 04:57 AM
How does this work on tiles that are not in your culture border (but where before), compared to the CulturalDecay Mod?

Mylon
Jan 09, 2006, 08:07 AM
There is no decay in this mod. Tiles that were under a civilization's control but are no longer are not treated specially. A captured city will forever bear some nationality of the original nation (indeed, most cities should bear a significant amount of foreign culture), but that is the point of this mod. Any foreign nationality of a specific nation will dissapear if that nation is defeated as normal, though.

I'm not too fond of the idea of cultural decay, because that means ancient influences don't have a chance of "sticking." I'm tempted to add something like temporary culture and permanent culture. Temporary culture fades very quickly (like internet fads and such) but permanent culture is, well, permanent. A very small amount of temporary culture becomes permanent culture. Both temporary and permanent culture together determine ownership of cities and tiles. That, and turning down the culture rate will cause the effect to fade. This way culturally old cities will not be quite as impossible to convert.

talchas
Jan 10, 2006, 02:32 PM
Neat, but there is a small problem - it currently does nothing. I don't know if it was intentional or not, but you need to add a CvEventInterface.py to load your CvCustomEventManager. The copy I've uploaded both fixes this and displays the new change in culture. Note that it only displays the owner's culture and culture rate currently. You could either change the current culture bar at line 462 of my CvCustomMainInterface.py to have more layers, one for each player, or add a new bar.

Darkhour
Jan 18, 2006, 06:34 PM
Just wondering Mylon if you have updated this standalone mod? Cheers

Bhruic
Jan 19, 2006, 01:28 AM
The only other change of this Mod is that the cultural levels all follow the same formula despite game speed: 50 - 250 - 1250 - 6250 - 32150 - 156250. This is an unfortunate limitation due to the inability to call the culture needed for each level in Python.

There's no problem getting the cultural levels. If you check out CulturalDecay, or, specifically, the 'getRadius' function, you'll see how I used it.

The function you want to use, if you don't want to bother looking at my example, is:
CvCultureLevelInfo.getSpeedThreshold(int)

Where the (int) is the game speed (which can be via gc.getGame().getGameSpeedType()).

Bh

Mylon
Jan 19, 2006, 10:23 AM
There's no problem getting the cultural levels. If you check out CulturalDecay, or, specifically, the 'getRadius' function, you'll see how I used it.

The function you want to use, if you don't want to bother looking at my example, is:
CvCultureLevelInfo.getSpeedThreshold(int)

Where the (int) is the game speed (which can be via gc.getGame().getGameSpeedType()).

Bh

Ooo... More functions. May I ask what you're using for reference? My API reference ( http://civilization4.net/files/modding/PythonAPI/ ) doesn't have any useful functions for CvCultureLevelInfo.

Thanks for the reference.

Bhruic
Jan 19, 2006, 11:44 AM
I checked the exported functions from CvGameCore.dll. Most (although not all) of those functions are exposed in python, so it's a more complete list than the API reference.

Bh

Zuul
Jan 19, 2006, 02:03 PM
Welcome back Bhruic :-). Missed your new mods you used to make.

Anyway, would be cool if one could make the city radious expand less at a time, so you first only get the horisontal and vertical tile (creating a +) and then the next step those around it. And after that en extra up and down and left and rigfht tile, and as the 4th time you get the full 20 tiles around the city.

Mylon
Jan 19, 2006, 03:38 PM
I checked the exported functions from CvGameCore.dll. Most (although not all) of those functions are exposed in python, so it's a more complete list than the API reference.

Bh

Mind educating me on how to do this, please? I'm not quite as an advanced modder as my works may lead you to believe. I'm just bloody persistant to make up for what I don't know. :)

Zuul
Jan 20, 2006, 03:49 AM
I checked the exported functions from CvGameCore.dll. Most (although not all) of those functions are exposed in python, so it's a more complete list than the API reference.

Bh

Could you release that list? :-)

Colonel Kraken
Jan 20, 2006, 07:05 AM
I'm very intrigued by this and will be watching. Subscribed . . .

talchas
Jan 20, 2006, 03:11 PM
Heres a list of most of the exported functions from Dependency Walker.

CanuckErrant
Jan 24, 2006, 11:08 AM
Another bug: It doesn't allow you to raze captured enemy cities.

Mylon
Jan 24, 2006, 11:26 AM
Another bug: It doesn't allow you to raze captured enemy cities.

I think that's because enemy cities will have some of your culture and the game assumes you owned the city at one point and are recapturing it.

CanuckErrant
Jan 25, 2006, 09:14 PM
I think that's because enemy cities will have some of your culture and the game assumes you owned the city at one point and are recapturing it.

Any way to fix that? I'm tired of not being able to raze the cities I conquer.

(Cities I conquer because they're blocking my perfect city placement scheme... heh.)

Mylon
Jan 26, 2006, 10:04 AM
Combine it with the destruction mod? That would be my suggestion. My "minimods" (Holistic Culture, Inquisitor Mod) aren't really meant to be standalone mods. They're provided for easy incorporation into other mods that wish to use them.

Commander Bello
Jan 29, 2006, 06:41 PM
Hello Mylon!
Currently testing your mod as part of Exavier's Composite Mod, and I have to admit that I am unhappy with the incredible expansion of the cultural borders.

Although playing on a modded 60*48 gigantic map, this makes the game turn into a settler sprawl and race for the sweet spots.

Would there be a description of where you changed the expansion rates? Any hint much appriciated.

Mylon
Jan 30, 2006, 12:53 PM
Hello Mylon!
Currently testing your mod as part of Exavier's Composite Mod, and I have to admit that I am unhappy with the incredible expansion of the cultural borders.

Although playing on a modded 60*48 gigantic map, this makes the game turn into a settler sprawl and race for the sweet spots.

Would there be a description of where you changed the expansion rates? Any hint much appriciated.

Cities as a whole generate more culture. I changed the culture levels to require more culture because of this. ( 50, 250, 1250, 6250, 32150, 156250 ). Maybe you didn't use the CultureLevelInfo.xml file included?

RED DIAMOND
Jan 30, 2006, 02:04 PM
Combine it with the destruction mod? That would be my suggestion. My "minimods" (Holistic Culture, Inquisitor Mod) aren't really meant to be standalone mods. They're provided for easy incorporation into other mods that wish to use them.

What's the easiest way to integrate the .py files. Cut and paste does not seem to work?

Commander Bello
Jan 30, 2006, 03:39 PM
Cities as a whole generate more culture. I changed the culture levels to require more culture because of this. ( 50, 250, 1250, 6250, 32150, 156250 ). Maybe you didn't use the CultureLevelInfo.xml file included?
At least I didn't exclude it intentionally.
Yet, all new founded cities come up with the message "the culture of xxx has increased" and at the next turn, the cultural radius has spread to 3! :(

Asatruer
Feb 02, 2006, 11:32 AM
Is there a .33 update for this standalone?
I noticed Mylon Mod is up to .33 and there is a slight change to culture spread so was wondering if that will be release for this standalone.