We-the-People-civ4col-mod / Mod

This is the repository where the mod resides.
90 stars 37 forks source link

smallfry: "Culture vs Tile Expansion is inconsistent " #18

Open abmpicoli opened 6 years ago

abmpicoli commented 6 years ago

From smallfry :

Btw. this is the same game my still unanswered culture questions were about. I attach another savegame which shows the situation in Jan 1671. That is just after the unrest period for the last Swedish city I conquered (Fort Christina, later renamed Göteborg) has ended. Over the next turn I built Taverns, Markets, Newspapers, everything that produces culture in Minquas, FC and Nya Stockholm quickly. Although I am now, almost 20 years = 40 turns later, producing lots of culture - much more than the remaining Swedish cities in the vicinity - and although some of those Swedish plots are adjacent to not one but even two of my cities but 4-5 plots away from the nearest Swedish town I have gained just the two northernmost plots adjacent to Minquas (the more southern of which just a couple of turns ago). Furthermore I had temporarily gained control over the jungle plot southwest of FC not adjacent to any of my towns (the one which in 1671 shows 0% Russian and 99% Swedish but belongs to Russia!) but lost that again after a few rounds. I even lost control permanently up to now over the sea plot adjacent to it, which I already owned in 1671! The percentages shown mot of these cases don't reflect these changes at all (with the exception of the two northern plots).

Add this to the information by devolution in a different thread that the combat odds shown previous to a combat are wrong and I am asking myself which info the game gives me is actually accurate.

https://forums.civfanatics.com/threads/religion-and-revolution-bugs-and-todos.449958/page-120#post-15021942

abmpicoli commented 6 years ago

I have personally faced with a similar issue... I had a city with already a 2 tile radius, almost 3. at the moment my spanish neighbor expanded, it has stolen all my tiles: which seems inconsistent to me, since I have more culture than it.

devolution79 commented 6 years ago

I've noticed that the culture growth logic is quite different from BTS. The latter has a very respected AI mod called K-Mod that I'm quite fond of and it contains a revamped culture system where there is less free plot culture and more focus on the current culture production. We could consider "borrowing" this culture system (and also gain some bug fixes while we're at it)

For reference the culture stuff is here: void CvCity::doCulture() (I also recommend having a look at the BTS and K-Mod versions)

abmpicoli commented 6 years ago

I would like to add more evidence. In debug mode, by holding shift it is possible to see each players culture at a single plot: Check this sample image Baranov have just expanded to radius 2. His culture is 8. My culture is 148. However expansion happened for him, and he took my tile. Notice that the plot have indian culture as well...

My suspicion is that when expansion sees a plot with indian culture , they don't check any other culture on the plot, and take the tile anyway.

Nightinggale commented 6 years ago

Looks like the culprit is CIVIC_MANIFEST_DESTINY. If a player has this civic active, it can ignore native culture when claiming land. What I think happened here is:

Note that the last step is possible because it only compared against the player with the highest culture. The fact that there is more English culture is ignored because it's not the highest.

This happens because the order of players is always (unless set otherwise in custom games)