Fixed borders idea: uneven spreading of culture

Try "Urbane" instead of "Sophisticated", Pharmer. It might be just the word you're looking for.

Other than that, I really like your changes so far and second the idea of prioritising spread to resource tiles :)
 
@Arakhor Perfect. Just the right amount of pompousness.

@Afforess Can you make this mod a game parameter?
 
@Afforess Where can I find the text definitions for the culture levels?
 
A few suggestions for 'Sophisticated' alternative:
-Cosmopolitan
-Exceptional
-Prominent
-Superior
-Urbane (like Arakhor suggested)
-Vast
 
@Afforess it seems that the game interprets everything after the CULTURELEVEL_ keyword as the name of the culture level. So I guess saying something like CULTURELEVEL_MINIMAL is sufficient for the game to call that culture level minimal. Odd, but I guess that's the way it is.
 
@Afforess it seems that the game interprets everything after the CULTURELEVEL_ keyword as the name of the culture level. So I guess saying something like CULTURELEVEL_MINIMAL is sufficient for the game to call that culture level minimal. Odd, but I guess that's the way it is.

That's not how it works at all. This line controls the name:
Code:
<Description>TXT_KEY_CULTURELEVEL_NONE</Description>

You could call your culture levels "HSDFIYS" in the XML, and the game wouldn't care.
 
@Afforess Then where is the TXT_KEY_CULTURELEVEL a reference to? That, in some sense, is my original question. My description names are things like "TXT_KEY_CULTURELEVEL_MINIMAL"
 
@Afforess Then where is the TXT_KEY_CULTURELEVEL a reference to? That, in some sense, is my original question. My description names are things like "TXT_KEY_CULTURELEVEL_MINIMAL"

A text entry in the Text XML folder. I suspect that they are being loaded from the BTS or Vanilla Civ4 Text Folders.

For your purposes, just create a new text file with your new entries (use something as an example). It's fairly simple.
 
It took me most of Saturday, but I think I've got a working and playable version of the terrain-dependent border system that uses the caching mechanism. I had to blow away most of Afforess's changes in support of the disabling feature, so I'll probably have to SVN checkout your stuff in order to rectify everything.

The most annoying part of integrating the caching mechanism was making occupation system work. Evidently, the occupation plot radius had a non-obvious call to the cultureDistance function. I've replaced that call with a call to plotDistance, which means that occupation may get a bit weird in the modern game since you may or may not appear to occupy a larger swath of the map than you should be able to.

Still todo
-- making rivers decrease culture spread; right now, it's terrain only
-- fixing the necessary text files ("city X's culture level has increased" as opposed to "borders have expanded")

Screenies follow.
 

Attachments

  • Civ4ScreenShot0005.JPG
    Civ4ScreenShot0005.JPG
    260.8 KB · Views: 143
  • Civ4ScreenShot0006.JPG
    Civ4ScreenShot0006.JPG
    269.9 KB · Views: 128
  • Civ4ScreenShot0007.JPG
    Civ4ScreenShot0007.JPG
    310.2 KB · Views: 143
This looks great! Why would rivers decrease culture spread though? Mountains, yes, but why rivers? They're a terrific way to travel and spread ideas.
 
This looks great! Why would rivers decrease culture spread though? Mountains, yes, but why rivers? They're a terrific way to travel and spread ideas.

But they are very difficult to cross without a ford, ferry or bridge. So culture would spread down and up stream faster than across. Unless the city is built on both sides of the river.

@phunny_pharmer something you said in answer to an earlier query of mine suggested chopping of forest outside your cultural boundaries as a way of improving the chances of getting that plot with a resource on it. This sounds like a player cheat since the AI goes not know to work outside their boundaries but if they did it would reintroduce the problem of the AI chopping all the forest which it was doing in the past to its detriment.

Now that you have the algorithm working on the base have you put any thought into culture spreading based on visible resources, and routes (cart paths, roads, etc.)?

My basic design logic would be something like:-
Code:
If the city is about to expand culturally
   identify all the plots which are next to the boarder and get chance of expansion from "terrain array" - probably what is done already
   for each plot modify the chance based on
       resource => big increase in chance
       worked resource => very big increase (player cheat?)
       fort => increased chance
       route => small increase in chance
   with the improvements being additive.

Note: I am deliberatly not writing pseudo code because I don't know your implementation. ;)
 
as for woods i think you might reconsider your cultural spread system a bit: if you claim a new plot when city reaches a new cultural level should not only depend on the plot to claimed but maybe too on the plot form which the culture spread. so culture would spread slower FROM tiles with woods. however mountains, hills & oceans should remain the same.

so an example if u have a city with no cultural expansion that is completely surrounded by woods within cultural borders an grassland ouside borders should not move form when reaching first cultural level. in the contrary case if the city surrounded by grassland within its borders and woods are all outside the border, they will expand to the first wood tile on expansion (except if some of these woods are on hills or beyond a river). but they will not expand further unless you cut down the forests at your borders.

cottages or towns could fasten up cultural expansion on the contrary case to woods with the same mechanics.
 
:bump:

Seem the author is gone for the long time.

So, Afforess, will you go ahead and figure out how to get AI to understand the necessity of chopping or whatever to help culture spread? Or will you prefer to wait a more while for the author to figure this out?

Not using this feature until my automated workers understand the necessity of chopping or whatever to help spread my culture.
 
I'll give him a few more weeks (some of us have lives...unlike me :p), but if he is a no-show still, I'll re-design it a bit, and yes, hopefully improve the AI with it.
 
my suggestion on how terrain features influence culture spread would resolve the problem without any AI changes... just to keep it mind.

and one other think for the creator should he return: flood plains count as desert... so culture has a big problem to spread on such tiles... while oceans still spread as coast in AND... hmm though your last screen shots indicate that you changed that...
 
I like the idea but I don't use the feature. There should be no restrictions on gaining culture spread to the 2nd ring, which contains city-workable tiles. It's too problematic to not gain needed tiles. Beyond the 2nd ring though is far gain for even spread. I'd use the feature if the 2nd spread as normal.
 
Hey -- sorry all, I have been busy.

@Afforess, I've attached what I've got to this thread; if you could take over from here, that would be awesome.

What still needs to be done
-- soft code / XML tags for the weights on various terrain and feature types (yes, you set up the groundwork for this, but I didn't quite understand how to get them integrated; spent some time trying to get this working and finally gave up)
-- some debugging with the rivers blocking culture spread; it seems to work sometimes, and then other times it just doesn't
-- consider tweaking the amount of culture a city puts down on a tile, as it's very difficult to hold a captured culture-level-established (or greater) city when revolutions are enabled

Anyway, the core algorithm is there, and the remaining tweaks should be relatively straightforward. I'm leaving this in the community's more than capable hands. I've had a bit of fun playtesting, but really haven't had a chance to program this in the last couple of weeks. The AI seems to do reasonably well with it, though it really should learn to use fixed borders to grab resources in its BFC before culture expands sufficiently.

Anyway, code attached. Anyone is free to use it with whatever mod they want; just give me a quick shoutout in the acknowledgments section :D
 

Attachments

AND THUS THE FORCE OF AWESOME MODDER IS UNLEASHED!

:lol: Anyway, thanks, man. Your ideas for spreading culture according to terrain was an awesome one and I really wanted to play this but had to wait until Afforess, since you are retiring from doing this, code it better :D. Anyway, good job on coding and ssetting the groundwork :D.
 
Back
Top Bottom