[SDK COMP]Slower expanding culture borders

Chalid

Black Dragon
Joined
Nov 24, 2005
Messages
1,742
Location
Munich, Germany
Okay that is a very simple modification that reduces the number of tiles gained by each Culture expansion.

Its only one line of code to change so i will not attach a file. (Especially as i have some other Changes in this file as well). If someone has a "clean" CvCity.cpp and could post the modified one i would be grateful.

Modified is in CvCity.cpp the function cultureDistance.
The modified Code of the function:
Code:
int CvCity::cultureDistance(int iDX, int iDY)
{

/*Begin Chalid SlowCulture*/
    return max(1, abs(iDX)+abs(iDY)+max(abs(iDX),abs(iDY))-1);
/*Old Code
	return max(1, plotDistance(0, 0, iDX, iDY));
*/
/*End Chalid SlowCulture*/
}

And the effect:
 

Attachments

  • slow_culture.jpg
    slow_culture.jpg
    82.7 KB · Views: 511
Oh wow, This looks promising. :D

The other code that Strand had posted in another topic had a secondary effect that cause the AI to build their cities every 3rd plot.

Does this code have any other effects? Cause if not I will certainly add this to my mod. :D
 
It should not.

The cultureDistance is only called, well, for calculating the distace that culture ranges ;). Its called on capturing a city (force plots to not have an owner) and when calculating the culture of plots surrounding a city.

Can you point me to Strands modification? I seem to have missed that one.
 
Wow, all of a sudden people are making the culture do what I have been begging for! Yippee!

Strand's post is in the main C&C.
 
Sure thing. ;)

http://forums.civfanatics.com/showthread.php?t=169725

I'm going to go test it now and see how it works.

If it does I'll create a patch for my mod which will include this change and a few other things that I missed.

I'll give you credit of course Chalid. ;)
 
Ah ok had read only the first part of that thread.
Yeap the routines Strand has proposed to change is called on a lot of different places, and could very well screw up the AI behavior. As you see it is also called from the original CultureDistance, so it would have effect on the culture as intended.
I had first thought to modify the plotDistance, but i felt doing it directly would be much more failsave. So those negative effects of Strands proposal should not occure in this version.
 
Chalid - If I can convince Padmewan to implement this into our mod will you code it up for us? I don't think either of us have gotten into the SDK. And I doubt I ever will.
 
Ok I have thoroughly tested this and it works perfectly without any side effects. (at least that I've noticed)

As per Chalid's request here is the exact code:


CvCity.cpp
Old code:
Code:
int CvCity::cultureDistance(int iDX, int iDY)
{
	return max(1, plotDistance(0, 0, iDX, iDY));

}


New Code:
Code:
int CvCity::cultureDistance(int iDX, int iDY)
{
	return max(1, abs(iDX)+abs(iDY)+max(abs(iDX),abs(iDY))-1);

}

I hope this helps. ;)
 
Very cool Chalid, very cool.
 
Very nice Chalid. One question though is that the limit the borders will expand in picture 6? I myself don't care for the overpowering cultural borders in vanilla civ.

I can host an updated CvGameCoreDLL.dll if you want,for those who would like to use it. Anyways I'm trying it out now,much appreciated.:goodjob:
 
Picture 6 is the for the 5th expansion. If your mod allows more culture expansions they will grow farther. As rule of thumb you can say that you need twice the cultural expansions with this mod to get the same cultural borders as in vanilla.
 
casey1966 said:
Very nice Chalid. One question though is that the limit the borders will expand in picture 6? I myself don't care for the overpowering cultural borders in vanilla civ.

I can host an updated CvGameCoreDLL.dll if you want,for those who would like to use it. Anyways I'm trying it out now,much appreciated.:goodjob:

casey1966, actually, I am about to release a small mod comp that does this and more, it actually combines this mod, rogerbacons borders over ocean plots, etc. It should be out within the next couple of days. Care to test it out? Chalid how about you?

EDIT: Chalid, btw great find on your part.
 
Thanks The Lopez. I actually searched for something else but thought this one would come handy.

About testing i have not the time.. you know the FfH 2 - beta release is not to far off and we want to squeze in more graphics.
 
TheLopez said:
casey1966, actually, I am about to release a small mod comp that does this and more, it actually combines this mod, rogerbacons borders over ocean plots, etc. It should be out within the next couple of days. Care to test it out? Chalid how about you?


Sure I'll test it out,sounds good. Just send it to cas70@cox.net,I have more than enough time. If it's too large to send through email send me a download link or something.See ya....
 
Not sure how much time you got for this Chalid but I tested this mod out and I actually liked the slower expanding borders (wasn't sure if I will :)). It's nice to have some time to explore the land without bumping up into other civs' borders. It also helps with the civs' land rush (which I hate with fiery passion :D) as it gives me more room to put my own cities. Having said that I do think it's expanding too slow, especially in the late game.

I think that the culture milestones should be rebalanced in this mod to essentially put culture expansion somewhere between the rate of it in vanilla and in this mod. However, even more than that I'm wondering if its possible to modify rate of border expansion based on eras. Because to me, it really does feel very appropriate that in the early stages the expansion is as slow as it is in this mod, but once you get to the renaissance or the industrial age, it just doesn't fit that it takes a city so long to get the fat cross. (It's not even so much about culture expansion, but rather about getting that fat cross faster. I mean since at that point technology is more sophisticated it would be appropriate if the people were able to use more land faster).

It could be as simple as switching between this mods expansion rate to vanilla expansion rate when you get to certain era. Or it could be something more gradual and subtle.

Anyway, just an idea. Good mod :thumbsup:
 
Rabbit said:
It could be as simple as switching between this mods expansion rate to vanilla expansion rate when you get to certain era. Or it could be something more gradual and subtle.

WR, if you use the cultural influences mod I did add a configurable value to turn the slower expanding culture borders on and off. It would be a trivial excercise to turn it off after a certain point using python in the cultural influences mod, you would just need to call gc.getGame().slowCultureBorders(false) to turn off the feature.
 
Well TBH, I found the slower border growth isn't so bad in the later stages. At least it isn't in my mod that has 10 cultural levels.

Basically, it is slow in the early stages of a game, however, later on once that city has built all the buildings it can, the borders actually do grow quite quickly.

I suppose part of the problem of this apparent slow growth being too slow later on, is that most are using this mod with only the 5 standard levels. Unless I am wrong and it comes with 10. :p
 
Back
Top Bottom