[BUG] Gold Calculation Bug

maglock

Coatlann Tamer
Joined
Oct 2, 2008
Messages
127
Location
Australia
The gold amount in not being calculated properly. I have attached a screenshot showing the problem.

Spoiler :



As you can see, the 30 gold from religion (in this case Tithe income from number of cities) is not being added to the total. So my gold amount is only growing by 4 NOT 34 as the NET amount shows.

Note that this is during a Golden Age. If you forward a few turns, my income will dry up when the Golden Age expires, and then suddenly it starts calculating the correct amount again.

So its possible that it is being reset when the treasury gold stored hits 0 (or because the Golden Age ended?).

Note also that the display amount in the mouseover is ALWAYS wrong and does not include my religion income.

So
- Net income incorrect (possibly only during Golden Ages)
- Display amount in mouseover is always incorrect and doesn't add Religion income from the Tithe founder belief
- At some point a few turns in the future, gold in treasury hits 0 and the NET amount is corrected and starts being added again BUT the mouseover amount stays incorrect

So lots of bugs there to fix.

Attached save.
Using mods :

Civ V Unofficial Patch v2.5.2 (GK) (v 1)
G&K Enhanced Mod (v1.13.4) (v 1)
 

Attachments

  • GoldCalculationBug.jpg
    GoldCalculationBug.jpg
    337.3 KB · Views: 698
  • WTF.Civ5Save
    1.4 MB · Views: 51
I'm currently in a game as Arabia on turn 236. My current amount of Gold is 299 with an expected +1062 GPT with most of my cities producing Wealth. The next turn, my total gold was only 325. If I have my cities produce buildings or units instead, I'm in a deficit and I lose gold.

Before:
Spoiler :


After:
Spoiler :


Here is what my Economic Adviser page had to say on turn 237:
Spoiler :


I had around 4k in reserves before this bug whittled my treasury down to zero, which I only noticed when the game notified me that it had disbanded one of my units because I was running a deficit. [Edit:] The version is 2.5.2. Expenses seems to be calculated the same between what the toolbar and adviser screen says. The problem appears to be in Income. Trade Routes & City Income appear to be correct, but the game is not counting income from Open Borders, Luxury Resources (Arab trait?), or Policies. [Edit2:] I have verified that it has nothing to do with Economics, Banking, or Guilds. I suspect it may have began when I selected the Wealth social trait. I'll update later. [Edit3:] The opener Wealth social trait was not the problem. I think The National Treasury wonder may be the culprit, or one of the other Wealth social traits. [Edit4:] After choosing the Wealth opener, and building the National Treasury, but before hitting a Golden Age, my GPT was correct. Once I hit the GA, it went wonky. Note in my original images, I'm not currently in a GA. In my prior saves, I'll invest my next social policy into something not commerce-related, and see if it reverts after the GA. [Edit5:] It did not revert after the GA, it was broken from that point forward.
 
Some logs from two different games:

Spoiler :
[7762.015] Initializing Lua 5.1.4
[7833.593] InstalledPanel: Refreshing Mods
[7833.593] InstalledPanel: GetModBrowserListings()
[7833.609] InstalledPanel: Refreshing Mods
[7833.609] InstalledPanel: GetModBrowserListings()
[7833.625] InstalledPanel: Refreshing Mods
[7833.625] InstalledPanel: GetModBrowserListings()
[7836.125] InstalledPanel: Refreshing Mods
[7836.125] InstalledPanel: GetModBrowserListings()
[7836.234] InstalledPanel: Refreshing Mods
[7836.234] InstalledPanel: GetModBrowserListings()
[7838.265] InstalledPanel: Refreshing Mods
[7838.265] InstalledPanel: GetModBrowserListings()
[7838.765] InstalledPanel: Refreshing Mods
[7838.765] InstalledPanel: GetModBrowserListings()
[7839.765] InstalledPanel: Refreshing Mods
[7839.765] InstalledPanel: GetModBrowserListings()
[7843.593] InstalledPanel: Refreshing Mods
[7843.593] InstalledPanel: GetModBrowserListings()
[7846.593] InstalledPanel: Refreshing Mods
[7846.593] InstalledPanel: GetModBrowserListings()
[7857.906] InstalledPanel: Refreshing Mods
[7857.906] InstalledPanel: GetModBrowserListings()
[7864.890] InstalledPanel: Refreshing Mods
[7864.890] InstalledPanel: GetModBrowserListings()
[8070.421] InstalledPanel: Refreshing Mods
[8070.421] InstalledPanel: GetModBrowserListings()
[8129.937] LoadScreen: INFO Turn 198 21 ms loading TurnAcquired
[8130.843] LoadScreen: INFO Turn 198 6 ms loading Yields
[8146.093] LoadScreen: INFO Turn 198 15251 ms loading PlotYields
[8210.718] ImprovedEvents: 2 ms loading CustomNotification.lua
[8210.765] GEA_Events: 3 ms loading CustomNotification.lua
[8210.765] NotificationPanel: 123 ms loading NotificationPanel.lua
[8211.765] InfoCorner: This is InfoCorner from the 'UI - Map Pins' mod
[8212.437] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion\Tutorial\lua\TutorialInclude_Expansion1.lua
[8217.437] ChoosePantheonPopup: -248
[8217.437] ChoosePantheonPopup: 963
[8217.437] ChoosePantheonPopup: 715
[8218.890] MapPins: 8 ms loading MapPins.lua
[8219.015] OptionsScreen: 28 ms loading OptionsScreen.lua
[8219.250] YL_EventRegistration: 19 ms loading CustomNotification.lua
[8219.312] CiVUP_Events: 3 ms loading CustomNotification.lua
[8221.328] AT_Init: 1359 ms loading Game.Fields
[8221.515] OppPopup: 92 ms loading Opp_Events.lua
[8221.515] OppPopup: 152 ms loading OppPopup.lua
[8221.593] GEAI_Events: WARN Turn 198 0.007 seconds loading EverAtWarWithHuman
[8222.562] Demographics: Dequeuing demographics
[8222.562] Demographics: Dequeuing demographics
[8254.625] GET_Events: UpdatePlotYields Start
[8456.281] MT_Initialize: INFO Turn 198 AIPurchase Catherine 679 available (1000 threshold, 250 minimum)
[8456.296] MT_Initialize: INFO Turn 198 AIPurchase Attila 934 available (1000 threshold, 250 minimum)
[8456.296] MT_Initialize: INFO Turn 198 AIPurchase Theodora 638 available (1000 threshold, 250 minimum)
[8456.296] MT_Initialize: INFO Turn 198 AIPurchase Washington 106 available (1000 threshold, 250 minimum)
[8456.296] MT_Initialize: INFO Turn 198 AIPurchase Elizabeth 434 available (1000 threshold, 250 minimum)
[8456.296] MT_Initialize: INFO Turn 198 AIPurchase Gandhi 135 available (1000 threshold, 250 minimum)
[8456.312] MT_Initialize: INFO Turn 198 AIPurchase Gustavus Adolphus 164 available (1000 threshold, 250 minimum)
[8456.312] MT_Initialize: INFO Turn 198 AIPurchase Askia 88 available (1000 threshold, 250 minimum)
[8456.312] MT_Initialize: INFO Turn 198 AIPurchase Augustus Caesar 943 available (1000 threshold, 250 minimum)
[8569.750] MT_Initialize: INFO Turn 199 AIPurchase Attila 150/958 spent for EXOTIC_CAMP_ANIMALS_1
[8570.468] MT_Initialize: INFO Turn 199 AIPurchase Theodora 150/677 spent for PASTURE_FENCING_1
[8573.421] MT_Initialize: INFO Turn 199 AIPurchase Askia 0/7 spent for BARRACKS_RECRUITMENT_3
[8579.796] TurnProcessing: Hiding TurnProcessing


Spoiler :

[8880.125] LoadScreen: INFO Turn 249 18 ms loading TurnAcquired
[8880.890] LoadScreen: INFO Turn 249 5 ms loading Yields
[8894.984] LoadScreen: INFO Turn 249 14095 ms loading PlotYields
[8953.171] ImprovedEvents: 2 ms loading CustomNotification.lua
[8953.203] GEA_Events: 3 ms loading CustomNotification.lua
[8953.203] NotificationPanel: 71 ms loading NotificationPanel.lua
[8953.453] InfoCorner: This is InfoCorner from the 'UI - Map Pins' mod
[8953.562] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion\Tutorial\lua\TutorialInclude_Expansion1.lua
[8956.968] ChoosePantheonPopup: -248
[8956.968] ChoosePantheonPopup: 963
[8956.968] ChoosePantheonPopup: 715
[8957.000] EspionageOverview: Refreshing Agents
[8957.031] EspionageOverview: Refreshing My Cities
[8957.109] EspionageOverview: Refreshing their Cities
[8958.468] MapPins: 4 ms loading MapPins.lua
[8958.531] OptionsScreen: 25 ms loading OptionsScreen.lua
[8958.625] YL_EventRegistration: 18 ms loading CustomNotification.lua
[8958.671] CiVUP_Events: 3 ms loading CustomNotification.lua
[8960.640] AT_Init: 1289 ms loading Game.Fields
[8960.796] OppPopup: 106 ms loading Opp_Events.lua
[8960.796] OppPopup: 156 ms loading OppPopup.lua
[8960.890] GEAI_Events: WARN Turn 249 0.007 seconds loading EverAtWarWithHuman
[8961.656] Demographics: Dequeuing demographics
[8961.656] Demographics: Dequeuing demographics
[8994.656] GET_Events: UpdatePlotYields Start
[9271.937] MT_Initialize: INFO Turn 249 AIPurchase Genghis Khan 2851 available (2000 threshold, 500 minimum)
[9271.953] MT_Initialize: INFO Turn 249 AIPurchase Genghis Khan 230/2851 spent for FLAVOR_TILE_IMPROVEMENT UNIT_WORKER
[9271.953] MT_Initialize: INFO Turn 249 AIPurchase Genghis Khan 230/2621 spent for FLAVOR_TILE_IMPROVEMENT UNIT_WORKER
[9271.968] MT_Initialize: INFO Turn 249 AIPurchase Genghis Khan 290/2391 spent for FLAVOR_SCIENCE BUILDING_LIBRARY
[9271.968] Runtime Error: [string "C:\Users\carvalhoj\Documents\My Games\Sid M..."]:261: attempt to index field 'PROMOTION_RECON_1' (a nil value)
[9362.531] UnitFlagManager: WARN Turn 249 Flag not found for OnNewUnitRefresh: Player[15] Unit[3309588]
[9423.078] MT_Initialize: INFO Turn 250

============= Game Info =============

Map: Assets\Maps\Terra.lua
Leader: LEADER_HARUN_AL_RASHID
Difficulty: HANDICAP_PRINCE
Size: WORLDSIZE_LARGE
Speed: 100%
Animations: true
Players: 0
Cities: 0
Units: 0
Plots: 10240
Start turn: 249
End turn: 250


==== Average Processing per Turn ====

VanillaStuff seconds
Total 0.000 seconds

ModTurnStart seconds
Turn 0.000
Players 0.000
Policies 0.000
Cities 0.000
Units 0.000
Plots 0.000
Total 0.000

ModTurnEnd seconds
Turn 0.023
Players 0.000
Policies 0.000
Cities 0.000
Units 0.000
Plots 0.000
Total 0.000


========== City Yield Rates ==========

Food Prod Gold Sci Cul AI Pop Player City
12 86 60 47 17 0 11 Harun al-Rashid Average
10 32 19 30 5 0 10 Genghis Khan Average
8 27 28 37 5 1 9 Elizabeth Average
13 29 38 28 34 0 11 Kamehameha Average
2 27 17 32 4 0 7 Hiawatha Average
7 57 35 105 10 4 26 Theodora Average
12 41 39 56 38 1 11 Gandhi Average
16 72 38 56 40 0 15 Pachacuti Average
7 26 55 41 20 1 6 Alexander Average
10 25 17 34 5 0 9 Washington Average
6 60 20 29 12 0 9 Montezuma Average
10 14 74 28 8 1 10 Gustavus Adolphus Average
6 55 37 32 6 0 10 Dido Average
3 14 15 10 3 0 4 Manila Average
0 23 24 20 3 0 8 Milan Average
5 52 36 27 3 0 11 Jerusalem Average
2 35 28 24 3 0 8 Kuala Lumpur Average
6 16 12 18 3 0 8 Sidon Average
4 24 10 10 3 0 5 Antwerp Average
3 21 27 19 3 0 9 Venice Average
11 18 26 26 3 0 14 Yerevan Average
3 34 33 20 3 0 9 Cahokia Average
5 64 28 27 3 0 11 Almaty Average
6 48 30 25 3 0 12 Wittenberg Average
4 58 54 30 3 0 11 Genoa Average
6 32 16 22 3 0 9 Marrakech Average
6 47 30 24 3 0 9 Hong Kong Average

Food Prod Gold Sci Cul AI Pop Player City
19 275 310 103 42 0 22 Harun al-Rashid Mecca
35 200 176 198 79 0 30 Harun al-Rashid Medina
16 141 104 73 26 0 17 Harun al-Rashid Damascus
16 170 82 92 26 0 20 Harun al-Rashid Baghdad
8 128 100 111 28 0 15 Harun al-Rashid Najran
9 129 97 75 26 0 13 Harun al-Rashid Kufah
23 180 62 135 26 0 20 Harun al-Rashid Persepolis
15 115 117 72 31 0 14 Harun al-Rashid Pasargadae
2 34 33 10 8 0 7 Harun al-Rashid Susa
31 26 40 77 11 0 14 Harun al-Rashid Basra
7 165 147 68 21 0 18 Harun al-Rashid Athens
15 55 30 16 11 0 12 Harun al-Rashid Khurasan
16 78 41 14 11 0 12 Harun al-Rashid Anjar
12 28 10 8 2 0 8 Harun al-Rashid Fustat
4 31 7 7 11 0 5 Harun al-Rashid Aden
11 34 7 11 7 0 6 Harun al-Rashid Yamama
2 104 42 31 11 0 11 Harun al-Rashid Harar
12 25 2 4 5 0 4 Harun al-Rashid Muscat
11 28 0 4 7 0 4 Harun al-Rashid Mansura
3 54 22 5 1 0 7 Harun al-Rashid Corinth
6 34 5 7 6 0 4 Harun al-Rashid Argos
4 6 1 1 2 0 1 Harun al-Rashid Bukhara
7 11 3 2 2 0 2 Harun al-Rashid Fez
5 6 2 1 2 0 1 Harun al-Rashid Shiraz
17 66 65 125 10 6 19 Genghis Khan Karakorum
16 24 22 28 6 0 16 Genghis Khan Beshbalik
7 37 14 26 6 0 14 Genghis Khan Turfan
6 27 36 25 6 0 12 Genghis Khan Tyre
4 34 18 39 5 0 8 Genghis Khan Lalibela
3 8 13 11 2 0 6 Genghis Khan Hsia
7 40 18 35 2 0 8 Genghis Khan Old Sarai
9 66 17 22 6 0 11 Genghis Khan New Sarai
35 62 19 36 5 0 16 Genghis Khan Warsaw
10 6 14 19 5 0 8 Genghis Khan Samarqand
13 40 14 23 5 0 11 Genghis Khan Tabriz
9 13 19 17 5 0 7 Genghis Khan Tiflis
4 6 7 16 5 0 4 Genghis Khan Otrar
10 18 11 47 5 0 9 Genghis Khan Sanchu
5 32 0 6 5 0 5 Genghis Khan Kazan
10 29 8 10 5 0 6 Genghis Khan Almarikh
25 93 128 122 10 6 20 Elizabeth London
14 23 42 46 7 0 17 Elizabeth York
9 18 18 37 10 0 8 Elizabeth Vitcos
1 19 3 26 5 0 3 Elizabeth Nottingham
1 14 1 6 2 0 3 Elizabeth Hastings
4 7 5 5 1 0 8 Elizabeth Gondar
3 12 2 14 2 0 2 Elizabeth Canterbury
26 53 158 83 47 2 19 Kamehameha Honolulu
12 48 20 35 86 0 16 Kamehameha Samoa
4 25 13 7 19 0 5 Kamehameha Tlaxcala
23 21 29 30 25 0 15 Kamehameha Tonga
5 24 9 7 19 0 5 Kamehameha Nuku Hiva
9 4 2 5 8 0 3 Kamehameha Raiatea
13 73 88 94 4 2 14 Hiawatha Onondaga
-6 37 32 63 8 0 14 Hiawatha Osininka
1 14 9 29 5 0 4 Hiawatha Grand River
2 22 21 49 5 0 15 Hiawatha Akwesasme
2 53 14 42 4 0 7 Hiawatha Buffalo Creek
1 28 7 36 8 0 4 Hiawatha Brantford
1 20 11 16 2 0 3 Hiawatha Genesse River
0 31 7 28 2 0 5 Hiawatha Canandaigua Lake
2 9 6 16 4 0 4 Hiawatha Lake Simcoe
2 15 3 6 4 0 4 Hiawatha Salamanca
4 13 7 7 1 0 3 Hiawatha Gowanda
1 9 2 3 1 0 1 Hiawatha Cuba
7 57 35 105 10 4 26 Theodora Constantinople
24 84 80 151 74 2 22 Gandhi Delhi
9 26 37 14 32 0 9 Gandhi Vijayanagara
4 12 0 1 9 0 1 Gandhi Pataliputra
21 149 116 117 67 2 19 Pachacuti Cusco
1 84 19 46 47 0 14 Pachacuti Tiwanaku
33 73 12 43 44 0 18 Pachacuti Machu
16 77 8 42 47 0 13 Pachacuti Corihuayrachina
20 35 52 47 15 0 14 Pachacuti Huamanga
19 38 40 41 29 0 16 Pachacuti Vilcas
5 50 19 59 33 0 8 Pachacuti Vilcabamba
4 8 1 12 11 0 1 Alexander Knossos
10 57 160 97 31 4 14 Alexander Troyes
6 14 5 13 17 0 2 Alexander Mycenae
22 65 102 138 5 2 19 Washington Washington
13 28 47 59 5 0 18 Washington New York
22 65 30 80 6 0 15 Washington Boston
9 29 19 52 5 0 11 Washington Philadelphia
7 27 26 55 8 0 14 Washington Atlanta
23 15 16 27 5 0 9 Washington Seattle
7 26 16 46 8 0 12 Washington Chicago
16 26 7 39 5 0 13 Washington San Francisco
2 35 13 36 5 0 7 Washington Los Angeles
12 12 11 34 5 0 10 Washington Houston
9 20 5 33 5 0 9 Washington Portland
7 36 5 9 8 0 5 Washington St. Louis
1 12 8 0 5 0 6 Washington Montreal
6 20 6 5 5 0 3 Washington Miami
4 17 9 13 6 0 5 Washington Buffalo
10 9 2 5 5 0 3 Washington Detroit
6 12 2 4 3 0 2 Washington Baltimore
4 14 3 9 6 0 2 Washington New Orleans
6 9 0 2 2 0 2 Washington Denver
10 154 62 67 20 4 14 Montezuma Tenochtitlan
14 96 50 42 35 0 11 Montezuma Teotihuacan
20 63 30 114 39 0 24 Montezuma Tlatelolco
4 109 12 15 11 0 5 Montezuma Texcoco
3 169 10 45 12 0 9 Montezuma Mumbai
3 165 12 36 26 0 12 Montezuma Adwa
4 16 11 12 4 0 10 Montezuma Calixtlahuaca
8 35 51 6 3 0 15 Montezuma Addis Ababa
4 4 21 31 6 0 7 Montezuma Xochicalco
6 49 15 38 6 0 8 Montezuma Tlacopan
0 13 10 3 5 0 7 Montezuma Ollantaytambo
7 6 9 10 4 0 4 Montezuma Atzcapotzalco
4 14 3 4 1 0 2 Montezuma Tzintzuntzen
6 4 0 1 1 0 1 Montezuma Malinalco
3 6 1 3 1 0 1 Montezuma Tula
14 24 185 68 8 2 20 Gustavus Adolphus Stockholm
6 9 34 8 6 0 6 Gustavus Adolphus Helsinki
11 8 3 7 9 0 5 Gustavus Adolphus Birka
6 126 110 79 15 4 18 Dido Carthage
10 52 122 71 4 0 20 Dido Utique
14 35 70 50 5 0 17 Dido Hippo Regius
3 55 20 22 11 0 9 Dido Lyon
2 49 80 29 9 0 10 Dido Orleans
12 112 19 31 5 0 12 Dido Sparta
6 63 24 47 10 0 11 Dido Marseille
6 16 54 44 2 0 9 Dido Gades
3 6 1 5 1 0 1 Dido Karalis
2 52 18 24 5 0 6 Dido Saguntum
3 69 5 22 3 0 6 Dido Carthago Nova
5 14 44 23 4 0 9 Dido Panormus
10 11 8 13 2 0 9 Dido Lilybaeum
5 138 16 26 11 0 8 Dido Paris
4 10 28 23 7 0 5 Dido Hadrumetum
8 121 10 28 3 0 12 Dido Sigtuna
7 13 1 6 1 0 2 Dido Zama Regia
3 14 15 10 3 0 4 Manila Manila
0 23 24 20 3 0 8 Milan Milan
5 52 36 27 3 0 11 Jerusalem Jerusalem
2 35 28 24 3 0 8 Kuala Lumpur Kuala Lumpur
6 16 12 18 3 0 8 Sidon Sidon
4 24 10 10 3 0 5 Antwerp Antwerp
3 21 27 19 3 0 9 Venice Venice
11 18 26 26 3 0 14 Yerevan Yerevan
3 34 33 20 3 0 9 Cahokia Cahokia
5 64 28 27 3 0 11 Almaty Almaty
6 48 30 25 3 0 12 Wittenberg Wittenberg
4 58 54 30 3 0 11 Genoa Genoa
6 32 16 22 3 0 9 Marrakech Marrakech
6 47 30 24 3 0 9 Hong Kong Hong Kong
[9428.046] MT_Initialize: INFO Turn 250 AIPurchase Washington 0/87 spent for PASTURE_FENCING_3
[9430.187] TurnProcessing: Hiding TurnProcessing
 
Lua uploaded for the second log file (turn 249).
 

Attachments

  • Lua turn 249.txt
    20.2 KB · Views: 95
Looks like the gross/net is way off from the summary.

I've noticed that there might be a problem with the commerce tree's gold bonus before calculating strangely, perhaps that's where we should start checking as it seems to be about the right timing.
 
Looks like the gross/net is way off from the summary.

I've noticed that there might be a problem with the commerce tree's gold bonus before calculating strangely, perhaps that's where we should start checking as it seems to be about the right timing.

I think that it's the National Treasury. My income was fine until I completed production of the nat'l wonder. Lua enclosed.

[Edit:] Save enclosed. Mods being used:

1) Civ V Unofficial Patch ver. 2.52
2) G&K Enhanced Mod ver. 1.13.4
3) Increased Tile Yields Mod ver. 3
4) No road or railroad maintenance ver. 1
5) Units - Starting Scout ver. 1

I have had the bug pop up with only the Unofficial Patch and Enhanced mod being run. [Edit2:] Well, crap. I advanced without completing the National Treasury (It's still in my queue), and 1-2 turns later the bug still happened. No new policies were adopted. I completed researching 'Steel'.
 

Attachments

  • Lua Turn 204.txt
    45 KB · Views: 46
  • without nat'l treasury, 201 AD.Civ5Save
    1.7 MB · Views: 69
Okay, so I re-played from turn 190 and did not take the Commerce policy in this play through. The bug still showed up at turn 199/200. My Golden Age (started by happiness) had just ended. I kept track of my Gold throughout the GA and it was fine. It wasn't until after the GA that it went wonky. Lua log:

Spoiler :
[271079.375] Initializing Lua 5.1.4
[271169.578] InstalledPanel: Refreshing Mods
[271169.578] InstalledPanel: GetModBrowserListings()
[271169.625] InstalledPanel: Refreshing Mods
[271169.625] InstalledPanel: GetModBrowserListings()
[271169.656] InstalledPanel: Refreshing Mods
[271169.656] InstalledPanel: GetModBrowserListings()
[271241.296] LoadScreen: INFO Turn 199 11 ms loading TurnAcquired
[271241.828] LoadScreen: INFO Turn 199 4 ms loading Yields
[271251.406] LoadScreen: INFO Turn 199 9589 ms loading PlotYields
[271314.062] ImprovedEvents: 3 ms loading CustomNotification.lua
[271314.125] GEA_Events: 3 ms loading CustomNotification.lua
[271314.125] NotificationPanel: 141 ms loading NotificationPanel.lua
[271315.218] InfoCorner: This is InfoCorner from the 'UI - Map Pins' mod
[271315.984] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion\Tutorial\lua\TutorialInclude_Expansion1.lua
[271321.796] ChoosePantheonPopup: -248
[271321.796] ChoosePantheonPopup: 963
[271321.796] ChoosePantheonPopup: 715
[271324.062] MapPins: 4 ms loading MapPins.lua
[271324.234] OptionsScreen: 39 ms loading OptionsScreen.lua
[271324.625] YL_EventRegistration: 32 ms loading CustomNotification.lua
[271324.718] CiVUP_Events: 3 ms loading CustomNotification.lua
[271326.468] AT_Init: 1325 ms loading Game.Fields
[271326.593] OppPopup: 59 ms loading Opp_Events.lua
[271326.593] OppPopup: 101 ms loading OppPopup.lua
[271326.656] GEAI_Events: WARN Turn 199 0.007 seconds loading EverAtWarWithHuman
[271327.796] Demographics: Dequeuing demographics
[271327.796] Demographics: Dequeuing demographics
[271357.046] GET_Events: UpdatePlotYields Start
[271372.000] MT_Initialize: INFO Turn 200

============= Game Info =============

Map: Assets\Maps\Terra.lua
Leader: LEADER_HARUN_AL_RASHID
Difficulty: HANDICAP_PRINCE
Size: WORLDSIZE_STANDARD
Speed: 100%
Animations: true
Players: 0
Cities: 0
Units: 0
Plots: 6656
Start turn: 199
End turn: 200


==== Average Processing per Turn ====

VanillaStuff seconds
Total 0.000 seconds

ModTurnStart seconds
Turn 0.000
Players 0.000
Policies 0.000
Cities 0.000
Units 0.000
Plots 0.000
Total 0.000

ModTurnEnd seconds
Turn 0.000
Players 0.000
Policies 0.000
Cities 0.000
Units 0.000
Plots 0.000
Total 0.000


========== City Yield Rates ==========

Food Prod Gold Sci Cul AI Pop Player City
6 33 24 18 15 0 8 Harun al-Rashid Average
8 33 20 20 20 0 9 Gustavus Adolphus Average
3 29 12 12 12 0 5 Napoleon Average
12 24 20 33 24 0 13 Gandhi Average
10 31 28 40 30 0 12 Ramkhamhaeng Average
2 22 23 26 26 1 6 Maria Theresa Average
9 47 51 58 22 1 13 Washington Average
4 26 40 19 16 1 6 Alexander Average
2 26 21 13 3 0 6 Colombo Average
5 26 21 16 3 0 6 Warsaw Average
1 26 23 22 3 0 7 Singapore Average
5 14 17 16 3 0 7 Brussels Average
2 36 16 20 3 0 7 Wittenberg Average
5 21 30 23 3 0 11 Lhasa Average
-2 25 10 19 3 0 8 Zanzibar Average
6 20 18 19 6 0 8 Hanoi Average
3 14 8 11 3 0 7 Tyre Average
3 20 26 19 3 0 8 Sidon Average
5 33 46 23 3 0 11 Zurich Average
6 27 20 19 3 0 9 Valletta Average
1 20 33 24 3 0 10 Florence Average
4 40 23 19 3 0 10 Quebec City Average

Food Prod Gold Sci Cul AI Pop Player City
3 56 46 36 19 0 16 Harun al-Rashid Mecca
6 64 56 40 21 0 11 Harun al-Rashid Medina
10 17 3 9 15 0 2 Harun al-Rashid Damascus
4 31 20 22 18 0 8 Harun al-Rashid Baghdad
4 68 56 22 19 0 9 Harun al-Rashid Najran
9 29 38 21 15 0 11 Harun al-Rashid Kufah
-1 28 10 16 15 0 6 Harun al-Rashid Basra
6 26 30 22 13 0 10 Harun al-Rashid Vijayanagara
14 25 17 28 17 0 10 Harun al-Rashid Khurasan
2 26 13 13 11 0 6 Harun al-Rashid Anjar
0 13 5 8 11 0 3 Harun al-Rashid Fustat
1 24 11 14 13 0 6 Harun al-Rashid Aden
0 22 8 14 19 0 6 Harun al-Rashid Yamama
24 12 11 6 11 0 6 Harun al-Rashid Muscat
8 49 36 6 9 0 12 Harun al-Rashid Vienna
12 108 62 60 48 2 18 Gustavus Adolphus Stockholm
6 27 23 23 21 0 9 Gustavus Adolphus Sigtuna
10 43 27 24 27 0 12 Gustavus Adolphus Helsinki
5 26 16 19 18 0 9 Gustavus Adolphus Birka
11 17 16 23 19 0 11 Gustavus Adolphus Uppsala
2 37 23 23 19 0 7 Gustavus Adolphus Turku
12 5 9 8 11 0 8 Gustavus Adolphus Linköping
10 9 4 4 8 0 4 Gustavus Adolphus Lund
7 20 0 0 5 0 3 Gustavus Adolphus Lahore
2 90 74 51 34 4 16 Napoleon Paris
7 33 23 17 23 0 7 Napoleon Orleans
4 59 27 19 21 0 8 Napoleon Lyon
2 42 2 20 16 0 9 Napoleon Troyes
3 42 24 21 14 0 7 Napoleon Tours
4 35 8 18 11 0 6 Napoleon Marseille
4 51 27 16 13 0 6 Napoleon Salzburg
4 43 11 16 16 0 6 Napoleon Chartres
3 6 0 3 10 0 1 Napoleon Nice
3 14 14 8 11 0 5 Napoleon Avignon
4 17 11 3 5 0 6 Napoleon Marrakech
4 27 14 17 15 0 7 Napoleon Rouen
1 17 3 2 12 0 2 Napoleon Grenoble
8 56 17 24 9 0 10 Napoleon Venice
0 16 2 3 11 0 2 Napoleon Dijon
3 6 5 5 7 0 3 Napoleon Amiens
3 38 11 16 9 0 4 Napoleon Cherbourg
1 18 3 4 12 0 3 Napoleon Poitiers
1 10 2 4 6 0 2 Napoleon Toulouse
2 30 4 9 11 0 4 Napoleon Bayonne
3 7 2 4 11 0 2 Napoleon Strasbourg
3 21 11 15 9 0 5 Napoleon Brest
2 14 0 1 6 0 1 Napoleon Bordeaux
3 9 3 2 9 0 2 Napoleon Rennes
8 14 1 2 9 0 2 Napoleon Saint-Etienne
5 38 72 116 57 2 24 Gandhi Delhi
26 56 26 96 50 0 27 Gandhi Mumbai
12 20 17 15 16 0 14 Gandhi Pataliputra
20 7 12 13 12 0 13 Gandhi Varanasi
7 8 10 8 17 0 8 Gandhi Agra
5 44 12 29 37 0 10 Gandhi Calcutta
19 18 8 14 8 0 8 Gandhi Bangalore
7 10 4 5 9 0 5 Gandhi Hyderabad
4 11 17 4 9 0 4 Gandhi Madurai
31 39 124 123 107 2 22 Ramkhamhaeng Sukhothai
8 104 18 42 63 0 14 Ramkhamhaeng Si Satchanalai
6 22 24 28 20 0 11 Ramkhamhaeng Muang Saluang
11 25 4 69 14 0 15 Ramkhamhaeng Lampang
10 22 35 37 19 0 15 Ramkhamhaeng Phitsanulok
6 21 27 20 8 0 7 Ramkhamhaeng Kamphaeng Phet
8 10 10 16 13 0 9 Ramkhamhaeng Nakhon Chum
2 23 6 20 15 0 7 Ramkhamhaeng Vientiane
9 12 6 6 14 0 4 Ramkhamhaeng Nakhon Si Thammarat
4 10 5 13 24 0 6 Maria Theresa Linz
1 33 40 40 28 2 6 Maria Theresa Graz
9 71 56 96 42 2 16 Washington Washington
14 54 87 44 17 0 15 Washington New York
5 15 9 34 6 0 7 Washington Boston
5 65 112 47 29 4 10 Alexander Athens
2 8 5 7 12 0 5 Alexander Sparta
4 7 4 4 7 0 2 Alexander Corinth
2 26 21 13 3 0 6 Colombo Colombo
5 26 21 16 3 0 6 Warsaw Warsaw
1 26 23 22 3 0 7 Singapore Singapore
5 14 17 16 3 0 7 Brussels Brussels
2 36 16 20 3 0 7 Wittenberg Wittenberg
5 21 30 23 3 0 11 Lhasa Lhasa
-2 25 10 19 3 0 8 Zanzibar Zanzibar
6 20 18 19 6 0 8 Hanoi Hanoi
3 14 8 11 3 0 7 Tyre Tyre
3 20 26 19 3 0 8 Sidon Sidon
5 33 46 23 3 0 11 Zurich Zurich
6 27 20 19 3 0 9 Valletta Valletta
1 20 33 24 3 0 10 Florence Florence
4 40 23 19 3 0 10 Quebec City Quebec City
[271568.468] MT_Initialize: INFO Turn 200 AIPurchase Gustavus Adolphus 1756 available (1000 threshold, 250 minimum)
[271568.484] MT_Initialize: INFO Turn 200 AIPurchase Gustavus Adolphus 240/1756 spent for FLAVOR_TILE_IMPROVEMENT UNIT_WORKER
[271568.484] MT_Initialize: INFO Turn 200 AIPurchase Gustavus Adolphus 130/1516 spent for FLAVOR_SCIENCE BUILDING_MENTORS_HALL
[271568.484] Runtime Error: [string "C:\Users\user\Documents\My Games\Sid M..."]:261: attempt to index field 'PROMOTION_RECON_1' (a nil value)
[271610.953] MT_Initialize: WARN Turn 201 Citystate Trigger Brussels
[271610.953] MT_Initialize: INFO Turn 201 AIPurchase Gandhi 0/321 spent for DIPLOMATIC_INCIDENT_3
[271613.390] MT_Initialize: INFO Turn 201 AIPurchase Alexander 0/101 spent for MONUMENT_CONTROVERSY_3
[271614.515] TurnProcessing: Hiding TurnProcessing


After this turn, I started a new GA by burning a Great General, and the calculation was still wrong.
 
My own notes, did a couple test games in 2.52/1.134
I've noticed the bug doesn't seem to be consistently off. It comes and goes. Most turns it seems to be correct, others not.
It seemed to be related to Golden Ages, either exiting or during, so far at least, but I don't think this was a 100% correlation. It was not persistent throughout a golden age for example.

When it was off, it seemed to be roughly the amount of religion income I was generating (tithes). Also: when it was off, faith generation per turn and possibly science and culture per turn were not added that turn (or two).

It seemed to correct after disbanding a unit and gold going positive again.

I did not experience a bug after building the National Treasury.

I have not taken Commerce tree, yet. Update: no obvious change occurred upon taking the commerce tree either. There were occasionally glitches after taking policies within the tree, but they were not timed exactly (such as the cheaper roads/bonus trade policy or extra gold on tiles policies). They may likely have been unrelated as they appeared as the same sporadic forms as prior glitches.

Related notes: Gold income total in the UI when mouse-over doesn't sum in religion in 2.52 (but the per turn top bar version does correctly). In between turns, both the research overlay and the mouseover for "total gold" are incorrect. The research UI top bar remained accurate. I am pretty sure some of those issues were addressed in the 2.6 beta, but it's been a while since I've used it.

Unrelated note: AI religion focus and generation in 2.52 was/is absurdly high. I had Lalibela and Stonehenge and shrine/temples everywhere and a bigger empire and a couple of religious CS friend/ally, and still lagged behind the Spanish (and Mongols!?) in faith generation. I also only managed to get a religion via liberty tree finisher. Something was clearly amiss there that was fixed in 2.6
 
to me it seems it just doesn't calculate the open borders income. i have about 900 total income and 600 expenses. the game shows +300 correctly but i only get about +30 after each turn.

then i saw that i have 270 income from open borders, this clearly doesn't calculate. (all numbers approx)
 
to me it seems it just doesn't calculate the open borders income. i have about 900 total income and 600 expenses. the game shows +300 correctly but i only get about +30 after each turn.

then i saw that i have 270 income from open borders, this clearly doesn't calculate. (all numbers approx)

Sorry Zonder, this does not seem to be the case - or at least not always. Once it happened to me very early on in the game - I was definentely not having open borders with anyone. I remember I was getting around +16 gold / turn and then suddenly I was losing some 3 gold / turn (although the top bar was still showing +16 / turn). Nothing significant happened at that time.
 
I discussed this on another post:

I think I have found what the issue is. It is a simply miscalculation. In CIVUP the modders changed the way civ calculates and updates how much gold you are going to get, but not really. What I mean by that is it updates the tool tip. In my games it shows me earning close to 1000+ gold, but I only get about 50 or so. The issue is, CIVUP calculates this:

CityIncome + TradeIncome + GoldFromPlayers + Openborders + GoldFromReasources + a couple of other things.

So what happens is you think you are getting way more because it calculates many of the numbers twice. The OpenBorders and GoldFromReasources are already calculated in the CityIncome. Also I think this line:

local iGoldPerTurn = activePlayer:GetYieldRate(YieldTypes.YIELD_GOLD)

May still be messing things up, because even after I changed the Lua in the Top Panel file in CIVUP it still showed me getting +988, which interestingly enough is the total income my empire generates. I have not found a way to correct this though, but maybe one of the modders can see this.

Now all that said, this does not break the game, you still earn gold like you should, it is just hard to gauge how your empire is doing just based off a glace at the top bar. Players can click on your gold to bring up a window that shows you where you earn all your gold and where it is all going. Those numbers are accurate, so if you go off those you will be okay. It is just annoying that it does not work the way it should.


Also with GoldFromReligion, that should be contained within your CityIncome. The number that is shows is really only for show for those who are interested in knowing.
 
So what happens is you think you are getting way more because it calculates many of the numbers twice. The OpenBorders and GoldFromReasources are already calculated in the CityIncome.

Are you sure? Because my GoldFromResources is greater than CityIncome in my screenshots above in post #2. 947.2 (GFR) Vs. 850.56 (CI). Adding in OpenBorders makes it higher: 1060.2 Vs. 850.56. It doesn't make sense to me that CityIncome would be lower than those numbers if they were included.

That being said, the top panel LUA is almost exactly right for the first 180 or so turns of my games, but then goes wonky after a GA. If it was simply a problem of calculating the numbers twice in the LUA it would a constant problem from the beginning of the game. When I'm on turn 170 and the LUA tells me that I'll be receiving +1080 gold, the next turn I will receive exactly 1080 gold. After a GA in that turn time frame, the calculation is wrong and I receive significantly less than what the LUA says.

[Edit:] I took this example of the LUA being correct from my saved game up in post #6, only ten turns earlier when the bug was not showing up. Turn 192: 2,334 in treasury, +465 income for an expected total of 2,799 in next turn’s Treasury:

Spoiler :


Turn 193: 2,796 in the treasury, +466 income for an expected total of 3,262:

Spoiler :


Turn 194: 3,260 in the treasury, +463 income:

Spoiler :

We can see that the income listed in the LUA is correctly being added to the treasury each turn. Note that this was during a Golden Age, after which the bug arose at turn 201.
 
I don't see how gold from religion should be contained within city income, as it would depend on what kind of religion gold generating belief you are using. Tithing is global (as it comes from foreign sources as well), as is the one-shot gold per conversion of cities. Pantheon beliefs would be local but that's it, and as far as I can tell, those aren't included in "from religion" calculations.

The next problem is that so far as I can tell it comes up randomly as incorrect but for many turns, it will "correctly" add the amounts that it lists into a surplus or deficit. This would suggest that the problem isn't double counting sources (there are places where the game is double-counting like faith or culture from CS, and sometimes food I think too from CS) but something that occurs only occasionally throughout the game.

It is sounding more like the problem is Golden Age bonus yield calculations throwing things off.
 
Okay, for religion I forgot that there are beliefs that add gold based on the number of cities of followers, so that is my bad, lol.

But on the Golden Ages issue, is it a stacking bug? Does each golden age make it worse and worse? I have never noticed it until I was really late in the game when it said I should be getting over 1000 gold and it only gives me 50 or so.

Also, the only file I could find so far that involves golden age calculations is the Top Panel file in the CIVUP files. Has anyone else found anything different before I begin messing around with it and breakin things, lol.
 
There's a couple points to note.

1) The bug is more extensive than gold not accumulating correctly. It seems to also apply to science, faith, culture, and happiness per turn not adding up correctly either. At least the bug I've noticed when gold isn't adding up correctly. In the case of science, some marginal quantity is added instead. I haven't been able to figure out what that figure is based on. In faith, it will continue to add CS boosts (I think), but that's it. Culture looks the same. Happiness not adding up correctly can impact production and growth negatively but otherwise those yields seem to be doing what they are supposed to, more or less. It's a fairly extensive and damaging bug beyond just income management.

2) It so far in testing seems to be intermittent, but tends to be more noticeable or common surrounding a golden age, either during or maybe right after. Typically when the bug occurs, it happens "in between turns" and I notice immediately that my turns on science in the science overlay display are way off from the top bar display, which may persist for a period of a few turns and then will return to normal. To me the science rate being slowed down and offset by the glitch was far more significant than managing my gold was. I suspect there's an issue with how the golden age calculations for bonus yields are interacting with other bonus yield effects, or just the golden age bonuses themselves aren't working right. Or this mechanic is interacting with something else. It does look like it could be a stacking issue when looking over how the gold bonus yield is done.

I don't know if it becomes cumulative or not but it would seemed to be happening for one or two turns earlier and sometimes three or four later. It's possible that earlier glitching though just isn't as noticeable as the income, science and faith accumulations are far smaller and that the problem is just as acute throughout but very, very obvious when one expects to get 1k gold or 10k science or 300 faith per turn and doesn't.

You seem to have a little better handle wading through the lua than I do, but there are also the regular golden age bonuses in the xml too.
 
But on the Golden Ages issue, is it a stacking bug? Does each golden age make it worse and worse? I have never noticed it until I was really late in the game when it said I should be getting over 1000 gold and it only gives me 50 or so.

It's an on or off type of thing for me. Say I go through 3-4 GAs before turn 200. The LUA is consistently accurate before, during, and after each GA. Then in the late medieval period (between turns 180-210 for me) I get a GA, after which the calculation is suddenly wrong for the remainder of the game. It's correct through the entirety of that last GA, and the Wealth policy is not taken, and National Treasury is not built.

I considered that maybe the LUA was just listing GA values while I was not in a GA, but those numbers didn't match, either. [Edit:] Well, I didn't do any empirical testing, just based off what I happened to notice, so maybe that's not true. That would explain why culture/faith/science were also off. [Edit2:] Nope, the difference is much greater than just 20%. Using my first post as an example, even if I subtract all income other than what comes from cities and take off 20% for a supposed GA, I should still have 442 Gold, but only get 26.
 
Top Bottom