Possible 6.2 Bugs

Playing 6.3, my capital is stuck on 12 citizens, ready to build a 13th on the next turn with plenty of excess food. My other cities are growing normally.

After a restart, the capital was at 12 with stagnation, and the other cities were only growing moderately - with 4 Maritimes allies.

Switching out 4 specialists, I shifted the counter to a build in 1 turn. I got it, but then it became more or less stuck again, only occasionally advancing one, no matter how much food I add by switching specialists. Again, all of this is with 4 maritimes and 4 cities, 3 between 10 and 13, and one at 6.

I reloaded this game on turn 45, and had no problems for a while. However, once I began adding specialists and Maritimes (no Landed Elite yet), the pop began to grow erratically again. To be clear, what I am noticing is seemingly slow growth despite Maritimes, with the pop countdown not dropping every turn. Am I correct in thinking that, given no negative growth change like switching workers or losing a Maritime, the pop countdown should drop by one every turn in every city?
 
I reloaded this game on turn 45, and had no problems for a while. However, once I began adding specialists and Maritimes (no Landed Elite yet), the pop began to grow erratically again. To be clear, what I am noticing is seemingly slow growth despite Maritimes, with the pop countdown not dropping every turn. Am I correct in thinking that, given no negative growth change like switching workers or losing a Maritime, the pop countdown should drop by one every turn in every city?

I am seeing something weird with food as well in 6.3. (I did clear my cache before this game started.) I noticed this because Civwillard was telling me something different from what the city banner was telling me. It looks like Civwillard was right because it said my city was starving and the food total was indeed going down turn after turn. Screenshots below...

Spoiler :

The city screen says I am growing in 6:
dAVcP.jpg

But at the same time, Civwillard says starving in 15:
83Bmf.jpg

Here are my mod versions:
SpPaz.jpg

 
Is the amount on the city view food tooltip calculated correctly?

Also, is it giving the correct amount of food from maritimes:

  1. Set CiVUP_General.lua logger level to LOG_DEBUG
  2. Load the tuner.
  3. Load a game where the problem happens.
  4. End the turn.
  5. Look for "GiveMinorCivAllianceRewards" in the output. See how much food goes to each city.
 
Is the amount on the city view food tooltip calculated correctly?

Also, is it giving the correct amount of food from maritimes:

  1. Set CiVUP_General.lua logger level to LOG_DEBUG
  2. Load the tuner.
  3. Load a game where the problem happens.
  4. End the turn.
  5. Look for "GiveMinorCivAllianceRewards" in the output. See how much food goes to each city.

In the game cited above, Babylon is size 10. It is producing 14 food. I have 2 Maritime allies, providing for 4 cities total. The tooltip says +8.67. Is that correct? My sense is that the tooltips have been correct, but the pop doesn't grow.

Playing a new game with Babylon on a different PC just upgraded to 6.3 with a cleared cache, Babylon grew to the same point - the 9/10/100 range - and then began to stutter in growth, for example staying on the same number of turns for various turns. When I put it on stagnation so as to get something out of the lack of growth, it began to drop on size - from 11 to 7.

I'll upload FireTuner and post my results later.
 
Playing a new game with Babylon on a different PC just upgraded to 6.3 with a cleared cache, Babylon grew to the same point - the 9/10/100 range - and then began to stutter in growth, for example staying on the same number of turns for various turns. When I put it on stagnation so as to get something out of the lack of growth, it began to drop on size - from 11 to 7.

I'll upload FireTuner and post my results later.

Very interesting: on the above game (not my PC, etc) I opened FireTuner and changed the setting from ERROR to DEBUG. When I opened the save, everything read differently - babylon now said it was set to lose pop (and it was). When I adjusted it to grow, it (and the next largest city) all grew appropriately - that is, the "wait" number decreased one each turn.

Tomorrow I will play more extensively, as the error may pop up at some later point - but is it possible that just making the FireTuner change fixed the problem?
 
Is the amount on the city view food tooltip calculated correctly?

Also, is it giving the correct amount of food from maritimes:

  1. Set CiVUP_General.lua logger level to LOG_DEBUG
  2. Load the tuner.
  3. Load a game where the problem happens.
  4. End the turn.
  5. Look for "GiveMinorCivAllianceRewards" in the output. See how much food goes to each city.

Going back to my first game, where the same problem occurred, I checked FireTuner. If I'm reading it correctly, civs that are getting Maritime food have the cities listed with a number next to them after the GiveMinorCivAlllianceRewards line. For example, China has one at +7.2, three at +3.6, and two at 1.8. On a lower line, China says it has 112 +1.2, 46 , 91, 53 (+0.6), 8, 24 (+0.3). On a third line, the numbers are similar. I don't know which one applies to food. But Babylon has nothing listed after its line, implying that I am getting no benefit from my Maritimes. For that matter, the only other civ with similar numbers under rewards was the iroquois, but India also has one Maritime alliance.
 
In the game cited above, Babylon is size 10. It is producing 14 food. I have 2 Maritime allies, providing for 4 cities total. The tooltip says +8.67. Is that correct? My sense is that the tooltips have been correct, but the pop doesn't grow.

What I mean is not the base food display, the tooltip when you hover over it. It breaks down the maritime weight of the city, total food the empire receives, food modifiers and so on. In my test game these values appear correct on the tooltip, and the city receives the proper amount of maritime food each turn. I haven't seen what might cause erroneous behavior, which is why it's hard to figure out where the bug might be.

I'll look through the code again to see if I can spot any errors, though I've checked through it all three times so far. It's just been very difficult to track down. If you could figure out what consistently causes the problem in your games that would help a lot.
 
What I mean is not the base food display, the tooltip when you hover over it. It breaks down the maritime weight of the city, total food the empire receives, food modifiers and so on. In my test game these values appear correct on the tooltip, and the city receives the proper amount of maritime food each turn.

Thal, you cannot forget that I am a moron when it comes to this stuff. I checked the city display tooltip - hey, what a neat feature! - and confirmed what I posted above with regard to my Fire Tuner findings: I am getting no food from Maritimes, despite four such alliances.

This was on turn 195. I then went back to a save on turn 45, when I had no MCS relationships. I befriended a Maritime, and the tooltip registered it correctly - an increase of 4 for my only city. So the problem is simply that at some point the game quits giving me credit for Maritimes.

Let me know if this is helpful, and what other information I can try to provide you.
 
I ran with firetuner as suggested. At the end of a turn, the only mention of my civ (China) with GiveMinorCivAllianceRewards was this:

\Documents\My Games\Sid Meier's Civilization 5\MODS\Unofficial Patch and Thals Balance (v 63)\CiVUP - Civ V Unofficial Patch\Core\CiVUP - Event Registration: INFO GiveMinorCivAllianceRewards(Wu Zetian)

Here I have 10 food worked, 1 maritime CS friended. The tooltip says 10 food from terrain + 2 from maritime CS. So 4 surplus food with 5/44 food currently stored = 10 turns until new citizen.
Spoiler :
AhkZ5.jpg


And here Civwillard says I have 20 turns until new citizen. That works out to 5/44 stored with 2 surplus food. So the maritime food is missing?
Spoiler :
Mg8Ek.jpg
 
@gruven
We're unable to alter the default game functions. I had to create new functions for determining food and turns until growth, and redirect all the UI elements to these new duplicate functions. CivWillard could automatically work with this mod if it checks to see if my modified functions exist, and use those instead of the default ones, though I'm not sure the mod creator is still active anymore.

The problems and hassle are basically just because we don't have access to the c++ part of the game (yet... if ever).
 
...So the problem is simply that at some point the game quits giving me credit for Maritimes.

Let me know if this is helpful, and what other information I can try to provide you.

Thal, is there something else you need here, or is knowing that the game quits crediting me for Maritime contributions enough? This has occurred to me on different PCs, both playing with Babylon on 6.3 with cleared caches.
 
At this point I think what would help most is to be able to duplicate your circumstances. Could you zip a copy of your mods folder and the savegame? I can load it up and add in some debug output to try and track down where the issue's occuring.
 
At this point I think what would help most is to be able to duplicate your circumstances. Could you zip a copy of your mods folder and the savegame? I can load it up and add in some debug output to try and track down where the issue's occuring.

Attached is the Mods folder and the auto-save of the turn I described (no food from 4 MCS). I have other, similar games available, as well as the earlier save I mentioned before the problem started happening.

These games were all played with 6.3, Info Addict and Alpaca's Custom Notifications.

Let me know if you need anything else, or if there's a problem with what I did send. And thanks!
 
Re: the above, while not getting credit for Maritimes is the main problem, I'm not sure it explains the pop growth counter holding on the same number for multiple turns, unless the setting was thrown off by the original error.
 
I think I found the problem.

My old method for food was:

  1. Calculate maritime food each city receives
  2. Give that food to each city at the end of each turn
New method is:

  1. Replaced every function calculating yield with new, better ones. It calculates Base yield, uses that to determine Surplus, uses that for Total.
  2. Maritime food is included in the base yield calculation.
  3. I figure out (modFoodPerTurn - vanillaFoodPerTurn) for each city and correct any inconsistency up or down.
The problem was #2 from the old method was still in place and using #2 from the new method, so it thought there was no maritime food to give, because it was already figured in. All parts of the old method should now be completely replaced with the new one.

It should be fixed in 6.8. If you still encounter the problem, please upload your mods folder and a savegame again.
 
I think I found the problem.

My old method for food was:

  1. Calculate maritime food each city receives
  2. Give that food to each city at the end of each turn
New method is:

  1. Replaced every function calculating yield with new, better ones. It calculates Base yield, uses that to determine Surplus, uses that for Total.
  2. Maritime food is included in the base yield calculation.
  3. I figure out (modFoodPerTurn - vanillaFoodPerTurn) for each city and correct any inconsistency up or down.
The problem was #2 from the old method was still in place and using #2 from the new method, so it thought there was no maritime food to give, because it was already figured in. All parts of the old method should now be completely replaced with the new one.

It should be fixed in 6.8. If you still encounter the problem, please upload your mods folder and a savegame again.

That's great news, Thal. I should be able to start a game tonight and test it.

Out of curiosity, would the bug have made the pop growth counter freeze at times, then start again? Once the problem started, I noticed that eventually one city would tick down one, but then another would hold at x turns to grow.

(Again, I'm assuming that barring some change in citizen apportionment and Maritime relationships, every city not stagnating should be one turn closer to growth, every turn. Is this correct?)
 
The problems were bugs in separate parts of the code, but both related to that new method / old method issue. I used your savegame to track the problem down.
 
Back
Top Bottom