Current v1.13 Development Discussion

Status
Not open for further replies.
Hmm. Judging by that screenshot it looks like your rules for culture expansion may not work as intended. The desert tiles 1E and 1NE of the city (no river, no resources) are filled in before the flood plains tile 1S of the city which should presumably have a lower tile cost than the desert tiles. Also does the entire first ring fill in before the second ring starts?
 
Wait, so with how many tiles does a city start? Not the whole small ring? Is it a small cross then?
 
These new culture mechanics reduce the efficacy of attempting to culture flip cities? The third ring limitation meaning it's harder to impose the culture of one city upon another (at any great distance of course)? I ask because of a specific issue I have just encountered on my first Canada attempt, literally the turn of my spawn the French captured the city of St. Johns, which I did not then flip when I flipped Sydney and Toronto, leaving me in a position where culture flipping or congresses are my only possibility for procuring the city while adhering to the rules of the UHV. I started this save literally minutes before this latest commit so the culture mechanics are still old style in my current game, even still I have 80 years to culture flip the city, or pray for helpful congress decisions, else I will fail; these new culture mechanics would ensure that congresses are the only realistic option in the above scenario. Admittedly I have no idea how common a scenario this is, and I am not suggesting the mechanic is a bad thing because of one civ-specific issue, in fact I rather like the idea of these new changes. The situation in my current save really just made me wonder about culture flipping and it's viability now.

On the subject of Canada, however, I wonder whether anyone has had issues with America when it comes to settling the great white north, on the turn I flipped Toronto I noticed an American settler already in Canadian territory before I could possibly have had any time to move my settlers to block them off. At this point I opened the WB, and saw that two more settlers were already on their way into Canadian territory even further west, I'm not sure how I could have avoided this a mere 2 turns after spawn. Also it seems as though the Railroad UHV is actually checking just for roads, I already have the Atlantic portion checked, even though my workers cannot build railroads yet.

(Sorry for the waffle Leoreth)
 
These new culture mechanics reduce the efficacy of attempting to culture flip cities? The third ring limitation meaning it's harder to impose the culture of one city upon another (at any great distance of course)? I ask because of a specific issue I have just encountered on my first Canada attempt, literally the turn of my spawn the French captured the city of St. Johns, which I did not then flip when I flipped Sydney and Toronto, leaving me in a position where culture flipping or congresses are my only possibility for procuring the city while adhering to the rules of the UHV. I started this save literally minutes before this latest commit so the culture mechanics are still old style in my current game, even still I have 80 years to culture flip the city, or pray for helpful congress decisions, else I will fail; these new culture mechanics would ensure that congresses are the only realistic option in the above scenario. Admittedly I have no idea how common a scenario this is, and I am not suggesting the mechanic is a bad thing because of one civ-specific issue, in fact I rather like the idea of these new changes. The situation in my current save really just made me wonder about culture flipping and it's viability now.

On the subject of Canada, however, I wonder whether anyone has had issues with America when it comes to settling the great white north, on the turn I flipped Toronto I noticed an American settler already in Canadian territory before I could possibly have had any time to move my settlers to block them off. At this point I opened the WB, and saw that two more settlers were already on their way into Canadian territory even further west, I'm not sure how I could have avoided this a mere 2 turns after spawn. Also it seems as though the Railroad UHV is actually checking just for roads, I already have the Atlantic portion checked, even though my workers cannot build railroads yet.

I suppose it would be wise to change the American settler map now that Canada is in the game.

Anyway I'm pretty sure Newfoundland not being in Canada's flip zone is by design. In IRL history what's now the Canadian province of Newfoundland and Labrador was a British colony until it was peacefully ceded to Canada in 1949. Canada's UHV is very diplomacy-oriented so I think that congresses are the intended way of getting Saint John.

As for the railroad, your starting capital Montreal is an Atlantic port and Canada starts with Railroad discovered. You can't build railroads because you don't start with any access to coal. You have to get that coal in Alberta/BC hooked up ASAP to get the railroad done in time.
 
Ya I realised that I needed to hook up the coal ASAP for the UHV, just thought it was strange that it checked the Atlantic portion before my settlers could even build railroads, I just assumed there would need to be an actual railroad into Montreal before the goal would check, when I saw that wasn't the case I thought it might just be checking for the roads, thanks for clearing that up.

I can understand not flipping Saint John, I do feel as though relying on useful congress decisions to obtain it could become prohibitively frustrating though, especially when contending with increasingly annoying turn times (though I realise this isn't a problem for everyone, only those of us who insist on playing on toasters or laptops as the case may be). I've only experienced 1 congress in the time I have been playing to which I wasn't even invited, though it was only 5 or so turns after spawning so that's understandable.
 
On the subject of Canada, however, I wonder whether anyone has had issues with America when it comes to settling the great white north, on the turn I flipped Toronto I noticed an American settler already in Canadian territory before I could possibly have had any time to move my settlers to block them off. At this point I opened the WB, and saw that two more settlers were already on their way into Canadian territory even further west, I'm not sure how I could have avoided this a mere 2 turns after spawn. Also it seems as though the Railroad UHV is actually checking just for roads, I already have the Atlantic portion checked, even though my workers cannot build railroads yet.

Montreal is your capital, it on the coast and has railroad on its tile, so no problems there.

American activity can be a problem. I recommend 600 AD starts. 1700 AD always have stronger USA who is pushing North without even finishing with California. My latest Canada start has American city SE of Montreal tile and no Toronto (and no crash). Brits settled "flipable" Canada as far as Manitoba, and no Settlers in the site. In those cases do not hesitate to declare on US and kill Settlers.
 
New commit:
- New culture rules
- instead of culture expansion when a city reaches a new culture level, the covered tiles gradually expand as a city gets more culture
- city culture can only extend up to the third ring
- more culture required to cover the entire second ring
- properties of the plot influence how much culture it takes to cover it (more for desert, peaks ..., less for tiles with bonuses or river connections, making for more geographically appropriate borders)
- tiles get covered in order of their culture costs (cheapest first)
- Oasis yields reverted to BtS settings (+3 food, +2 commerce)
- capes and marshes to block human Vikings in Newfoundland now properly appear
- Indian settlers are cheaper now

CAUTION: this commit breaks savegame compatibility.

Note: I'm not done implementing this. Especially the interface needs to be adapted to the new rules, including:
- the BUG notification for culture expansion needs to appear when a new tile is about to be covered
- culture required for the next tile should be displayed in the city screen somehow (current plan: the culture level bar is replaced until all tiles are covered)
- if possible, if the next covered plot is in the BFC, display it in the city screen

What about tiles covered by other civs?
 
Hmm. Judging by that screenshot it looks like your rules for culture expansion may not work as intended. The desert tiles 1E and 1NE of the city (no river, no resources) are filled in before the flood plains tile 1S of the city which should presumably have a lower tile cost than the desert tiles. Also does the entire first ring fill in before the second ring starts?
Yeah, there are still some oddities which I will investigate soon.

The first ring doesn't necessarily fill before the second ring starts, it depends on the tile costs (I lied a bit when I said tiles are covered in order of cost, because there are additional factors that influence their ordering, among that distance from capital). In practice the rings will fill in order unless a tile is particularly costly (and useless), such as peaks and empty deserts.

Wait, so with how many tiles does a city start? Not the whole small ring? Is it a small cross then?
All the tiles that cost 0 culture. Tiles in the first ring have reduced costs so that applies to most of them, but if they are very costly (see above), it might take some culture to cover them. The usual situation is that you start with the first ring, though.

These new culture mechanics reduce the efficacy of attempting to culture flip cities? The third ring limitation meaning it's harder to impose the culture of one city upon another (at any great distance of course)?
Good question. The only thing I modified is which tiles can be covered by your culture. The range at which your culture can be applied still depends on your culture level. That means a level 4 (influential I think) can still apply its culture four tiles away, which makes flips at that distance possible.

On the subject of Canada, however, I wonder whether anyone has had issues with America when it comes to settling the great white north, on the turn I flipped Toronto I noticed an American settler already in Canadian territory before I could possibly have had any time to move my settlers to block them off. At this point I opened the WB, and saw that two more settlers were already on their way into Canadian territory even further west, I'm not sure how I could have avoided this a mere 2 turns after spawn.
I agree. In general I think America should provide some competition in settling Canada, but they shouldn't be able to start before you even spawn. I can delay them though, something similar is already done to prevent Germany from settling Poland's core.

Also it seems as though the Railroad UHV is actually checking just for roads, I already have the Atlantic portion checked, even though my workers cannot build railroads yet.
Your cities always count as having the best route type you can build, even if you lack the resource.

I can understand not flipping Saint John, I do feel as though relying on useful congress decisions to obtain it could become prohibitively frustrating though, especially when contending with increasingly annoying turn times (though I realise this isn't a problem for everyone, only those of us who insist on playing on toasters or laptops as the case may be). I've only experienced 1 congress in the time I have been playing to which I wasn't even invited, though it was only 5 or so turns after spawning so that's understandable.
If you have already invested some culture, you can also use the UN, or outright diplomacy.

can you tell me in what files the culture changes are located?

thanks
Okay, multiple places.

There are new methods CvCity::calculateCultureCost(CvPlot*) and CvPlot::calculateCultureCost(). Their costs depend on a new variable "iCultureCost" in TerrainInfo.xml and FeatureInfo.xml (+ schema of course) and some constants in GlobalDefines.xml (so you also need to update the corresponding info classes).

Every city stores an array of 37 plots now (all plots in its first three rings). They are indexed 0 ... 36, I call these "local indices" (as you may know, the base game already does the same with the 21 plots in the BFC). The array is sorted according to the culture costs of its plots. The related methods in CvCity are:

getCulturePlot(int i): returns the global plot ID (for CvMap::getPlotByIndex()) for local index i
getCultureCost(int i): returns pre-calculated cost for the plot with local index i
getNextCoveredPlot(): returns the local ID of the next plot that will be covered (so that "for (int i = 0; i < getNextCoveredPlot(), i++) getCulturePlot(i)" will give you all currently covered plots)

updateCultureCosts(): recalculates the costs for all local indices and sorts the array
updateCoveredPlots(): recalculates next covered plot

setNextCoveredPlot(): sets the new value for the next covered plot, if it changed, the corresponded tiles are covered/uncovered

I also had to uncomment some code in setCultureLevel() that previously did the job of setNextCoveredPlot(). kill() had to be updated to set the next covered plot to 0 before the city is removed. CvPlayer::acquireCity() had to be rewritten so that the same thing as in setNextCoveredPlot() is performed there. updateCoveredPlots() had to be inserted all over the code where updateCultureLevel() is called as well.

There is also some stuff in CvGlobals and CvGameCoreUtils that makes the conversion from local to global indices easier, but that's it I think.

How many tiles does a city start with?
As stated above, it does depend on the surrounding terrain, but the usual situation is still the first ring.

What about tiles covered by other civs?
How do you mean? The new rules only affect what can possibly be covered by your culture. Of course you still need the majority of its culture to actually control it.
 
Does this have effect on cultural levels? I mean, is there a difference to get a legendary culture in your city? (And therefore, does it have effect on the Zoroastrian URV?)
 
Early colonial cities could have really high tile costs, falling with time or technology. Higher costs for Europeans in Africa/Asia than America/Australia. Begin with ports and factories, end with inland colonies.

I must say I'm not sure why deserts are so expensive - they're easy to claim as one's territory because there are so few settled people to object, though they are hard to assert effective control over, even nowadays.
 
No, the culture levels still exist. They have become less relevant now, but I plan to do something else with them in the future. The amount of culture required stays the same.

To summarize, this is what culture levels are still relevant for:
- range at which culture can be applied to tiles, even if you cannot control them
- amount of culture that is applied to a tile
- UHV and URV goals that require a particular culture level
- Cultural victory
 
Early colonial cities could have really high tile costs, falling with time or technology. Higher costs for Europeans in Africa/Asia than America/Australia. Begin with ports and factories, end with inland colonies.
Good point! I already have plans to increase costs for ahistorical tiles, but haven't considered technological modifiers for colonies yet. I'll think about it.

I must say I'm not sure why deserts are so expensive - they're easy to claim as one's territory because there are so few settled people to object, though they are hard to assert effective control over, even nowadays.
It's mostly to have nice looking borders that follow rivers through deserts but leave empty desert tiles unclaimed. I think I have sufficiently balanced the other factors so that interesting desert tiles (flood plains, oases, bonuses) will be claimed quickly enough.
 
To summarize, this is what culture levels are still relevant for:
- range at which culture can be applied to tiles, even if you cannot control them
- amount of culture that is applied to a tile
- UHV and URV goals that require a particular culture level
- Cultural victory
A fifth point I didn't intentionally implement but decided to leave in because changing it isn't worth the effort:
- you still need to reach the second culture level to gain access to tiles in the second ring and so forth
 
New rules doesn't work for independents yet?
Culture of tiny independent Faro stolen few my tiles near Santiago and Valencia (with 98% of independent culture).
Spoiler :
attachment.php

Btw, almost 500 culture in Santiago.
And by some reasons, that mine in hill/plain 2S1W from Valencia few turns before was covered with my culture, but now it's nobody's.
 

Attachments

  • Civ4ScreenShot0151.JPG
    Civ4ScreenShot0151.JPG
    296.7 KB · Views: 344
First ring should be protected, at least from the independents. Actually independent culture should have minimun influence because that's what they should be, individual cities, not some Empire of Independents who at times tops the scoreboard.
 
How do you mean? The new rules only affect what can possibly be covered by your culture. Of course you still need the majority of its culture to actually control it.

Yes, how does tiles flip from other civs to your civ?
 
For Canada, shouldn't all cities in Canada (minus Newfoundland and Labrador of course) flip to them soon after spawn? It's my understanding that Canada was given control of all of those areas by 1871, so instead of worrying about how many cities America spams into Canada by their spawn they should all just flip. I think it makes sense too since Canada spawns so late they are at a huge disadvantage compared to the other civs.

If the above is implemented, another way to address the issue may be to encourage more British settlement of Canada, as in most of my games I hardly every see them expand past Toronto. Then when Canada spawns all those cities could flip, and as long as you as Canada don't OB with America your territory should be safe from foreign settlement.

But I agree that America should probably be prevented from settling in that area before the Canadian spawn. In fact, America should be encouraged to settle areas more historical for them, such as the West Coast, Alaska, and Hawaii.
 
New rules doesn't work for independents yet?
Culture of tiny independent Faro stolen few my tiles near Santiago and Valencia (with 98% of independent culture).
Spoiler :
attachment.php

Btw, almost 500 culture in Santiago.
And by some reasons, that mine in hill/plain 2S1W from Valencia few turns before was covered with my culture, but now it's nobody's.
Can you look up how much culture Faro has?

First ring should be protected, at least from the independents. Actually independent culture should have minimun influence because that's what they should be, individual cities, not some Empire of Independents who at times tops the scoreboard.
Depends. If it's a highly cultured city then I don't see why it shouldn't get the territory that comes from it.

Yes, how does tiles flip from other civs to your civ?
The same as before. Assuming you can cover it, as soon as you have the majority of culture on the tile (stuff like special rules in core notwithstanding).
 
Status
Not open for further replies.
Back
Top Bottom