Losing gold despite black

Gr1pp717

Chieftain
Joined
Apr 26, 2013
Messages
3
I noticed that my gold was bleeding out despite showing +71. No war, no real reason for this to be happening that I could see.

Further, I noticed this on my third play-through with the mod. After installing the mod I instantly sucked at the game. Gave up on the first two when I got 2 era's behind in science (despite being science focused with most of the science related wonders) fairly early on, even... figured it was me, and tried for a third round when I noticed the gold issue. So I turned the mod off and proceeded to stomp the AI yet again.. :confused:

So I suspect that there are deeper problems with the math. Is this a known issue with a fix, or?

This is on OSX 10.6 steam, G&K.

edit: I don't have a save file for that run. If needed, I can try to replicate (the gold thing happened a bit late in the game, though). Maybe renaissance or industrial. And I'm not sure what all I had built by then. Would that help?
 
Post a lua.log in the bug reports forum (save game wouldn't be an issue). It's been an on-going issue and hard to track down, more severe with the beta version's UI being all over the place for several yields. You wouldn't need to recreate a new game, just post logging information from any saves with similar effects involved. More reports might help nail down a source.

I haven't seen it reliably in my own games, but it has come up now and again, typically in the renaissance era (although I could usually see that my gold had suddenly and unexpectedly went negative).

The mod is intended to be harder than vanilla, roughly an added level of difficulty from the default, by making the AI's decision making a little smarter. But this is pretty variable still (I don't find it much harder, and there are changes in the beta that make it absurdly easy at the moment). Obviously if you have encountered a serious glitch on your economy, it's going to be a lot harder.
 
All my lua.log file has is:

[647432.091] Initializing Lua 5.1.4

The only issues I notice in the other logs appear unrelated:

[647464.706] In table Language_en_US...
[647464.706] Tag (TXT_KEYMODDING_SHOWDLCMODS) does not start with 'TXT_KEY_'

[647455.493] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[647463.292] Validating Foreign Key Constraints...
[647463.293] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes


[647464.077] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[647464.079] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders

I have loaded other mods (city limits and mega buildings reduced) once. So those messages may have came from them.

Is there anything I should do to increase logging for future issues?
 
this has been an issue in the past.

question: are you loosing random amounts of gold like -30 one turn -10 the next or is it a steady loss?
 
Doesn't sound like you have logging enabled. Most of those other things are routine issues in the vanilla game.

Agree with Dread, it's also an important question to determine if it's intermittent or consistent. One is probably a glitch of some kind (still very serious and annoying), and one would be a bug somewhere in the gold calculations (and obviously the UI too).

Also possible there's a mod conflict involved but it's been a consistent enough bug of its own, I doubt it.
 
Logging enabled. I'll keep playing with only the enhancement and patch running, and post back if I notice this again. Thanks.

edit: forgot - I didn't note whether it was consistent or not. It was pretty late when I noticed and simply closed the game in frustration once I confirmed that it was, in fact, declining..
 
I encountered this bug last week playing the latest releases of GEM/UP around turn 40-50. Gold read ~+10, but declined every turn - one possibility I thought of was that the free starting gold stopped being applied. I think the gold problem began around the time when CS meeting popups stopped appearing (no idea if that's related of course). Alas, I didn't have logging enabled either.
 
I had the same thing occurring from around mid-game, and am pretty sure the difference was approximately the starting gold. Didn't notice anything relating to the city states at the time.
 
Post a lua.log in the bug reports forum (save game wouldn't be an issue). It's been an on-going issue and hard to track down, more severe with the beta version's UI being all over the place for several yields. You wouldn't need to recreate a new game, just post logging information from any saves with similar effects involved. More reports might help nail down a source.

To clarify, just grab a lua log on a turn during which we observe the miscalculation? Does it matter that we're not actually receiving an error message, just an observation?

[Edit:] Here's a Lua log for the bug in one of my games:

http://forums.civfanatics.com/attachment.php?attachmentid=349467&d=1367248577
 
On a turn where we observe the miscalculation, or set of them, yes. Many errors or bugs in the game itself aren't showing up as an error message or bugged text anyway (the city defences HP bug wasn't showing up until modders put in a city HP listed on the interface). Observations of problems are still potentially a problem.

There may not actually be anything in the lua or any other logs, but there might be something different which can show what is triggering it (an opportunity? a tech? policy? diplomatic contacts?). A whole bunch of people posting them and any noted circumstances would be helpful.
 
Im having this gold bug, it started after I got rewarded some gold from a ruin after about 30 turns, I started losing 2 per turn even though it says +16, its now got to 0 and staying there.
 
Hi guys, same problem here.

I tried disabling and deleting all MODs including CivUP+GEM, then deleted the cache and ModUserData folders and reinstalled CivUP and GEM (only) from Steam Workshop again and it seemed to help at first.

Unfortunately I started to notice occasional gold income glithes in the late industrial era / early modern era again recently :mad: Unlike before, they only lasted a turn or two, occured about 3 times shortly one after another and now I have had about 30 turns with correct income, however I am afraid it means the problem is still there and I was just lucky the glitches occured so late in my current game.

There are 2 things puzzling me:
1) Is everyone playing CivUP+GEM experiencing this problem or is there only few of us? I think if everyone was having the same problem, there would have been more bug reports.
2) Why did the problem occur now? If I am right, Thal updated the Steam version on 02 March, so it seems it took a month (maglock created this thread on 07 April), until people started having problems. I recall MODs disappeared form the list in the game after a Steam client update some time in April. I cannot remember well, but I think I had to unsubscribe and resubscribe to the MODs (or maybe even reinstall the Steam client???) or something like that. Could it be somehow related?

I am afraid this nut will be hard to crack as the glitch seems to appear at completely "random" times - it happened around turn 40 to me once, then in Classical era in the next game, always without any obvious reason or anything significant happening in the game.
 
@vyyt

1) I am having a similar problem, yes. I suspect it is fairly widespread, but because it tends to be random, people may not notice it until later in the game.
2) It's been ongoing. I don't think the March official patch or Thal's upload of the correct version made it active so much as encouraged some more play by Civ5 players with the fixes involved.
3) It is not just gold, but also science and faith generation that end up disappearing for a few random turns. I don't think GP generation, food/growth, production have been affected. I have not checked yet on culture accumulation for policies, but border expanding seems to be working correctly.
 
1) I am having a similar problem, yes. I suspect it is fairly widespread, but because it tends to be random, people may not notice it until later in the game.

You may be right, if the income (or anything else) is only slightly wrong, people may not notice. Now I notice every time the glitch appears, because I became so paranoid that I calculate in my head to what amount the treasury should increase between turns :D

However the problem sometimes gets so serious that I think it is impossible not to notice - e.g. in one of my previous games I was supposed to be getting something like +600 gold / turn, but I was getting something like +100 gold only and the amount was getting lower and lower with every turn and in the end it got negative - so negative that I went bankrupt in a while - while I was still supposed to be making some +600 or so a turn. I even tried disbanding all my units and selling all my buildings - it had some effect, but the income was still completely wrong. And a similar thing happened in my following 2 games. Only timing and amounts were different - it actualy happend very early in the game once, then it happened later.

2) It's been ongoing. I don't think the March official patch or Thal's upload of the correct version made it active so much as encouraged some more play by Civ5 players with the fixes involved.

I am just trying to think out of the box a bit here - maybe it is not caused by something in the MOD ... ? As you say above, it seems to be completely random. Some of us thought the culprit was the National Treasury or some glitch in revenue from the Open Borders or something with the Wealth policies. I suspected a combination of colliding MODs or a collision with remnants of an old version of CivUP / GEM, but it seems we all have been wrong.

3) It is not just gold, but also science and faith generation that end up disappearing for a few random turns. I don't think GP generation, food/growth, production have been affected. I have not checked yet on culture accumulation for policies, but border expanding seems to be working correctly.

Oh, I see, I did not know about the other stuff, thanks for pointing it out! I have noticed there was something wrong with Faith generation for a while in my last game - it happened simultaneously with the gold glitch once, but I thought it was because maybe something in my relationship with a religious CS had changed, so I did not pay much attention to it. I have never noticed anything wrong with science or culture though - will pay attention to these as well now.
 
1) It's very likely to appear obvious later in the game when the accumulation of science/faith/gold is in the several hundreds to thousands per turn and much less likely to appear obviously when the accumulations are much smaller. Many games can effectively be won before the industrial age and either abandoned or finished, so people may not notice that some amount of faith or gold per turn disappeared on them.

2) I'm pretty sure it is caused by the mod somewhere, as I don't think people notice it when playing vanilla. But in looking at the code for the UI (I'm not a programming expert, but I play one on TV, so to speak), I haven't seen anything jumping out that might cause it.

The most frequent combination of things I've seen in my last tests is a golden age and a random turn or three where nothing is added correctly during. It's possible this is a conflict with the yield modifiers that golden ages provide in GEM with the other yield modifiers that other things have in GEM (bonus to net gold, bonus to science, bonus to global faith)? But I'm not sure how to test that or re-write the lua to make it obvious this is a causal agent or importantly THE causal agent in order to fix it. It could be just one of several causes. :(

3) Faith I noticed because I was moving my inquisitor to provide for the extra missionary move from Djenne and then didn't get my automatic missionary for a turn or two. My own faith generation was far more significant than any CS change (150-300+ per turn, depending on the game-timeframe). Science has hung for 2-3 turns at 1 turn, and likely hangs along the way thus slowing down the tech rate.

I definitely notice that in between turns sometimes it says something absurdly slow (like 4-5 times what the topbar is saying), with a much lower per turn science rate "applied", but this doesn't always result in a miscalculated total science when the next turn starts either. I don't know if all these things happen at once, happen independently, or not. It's hard to keep track of what every global per turn rate should be at once and I was testing for gold mostly when I noticed faith and science were being quirky too sometimes. Gold has been the least problematic yield in these games, resulting in a couple of garrisoned comp bow-xbows disbanded earlier in the game is all so far. Extra turns in the game where no science advancement occurs are probably worse than gold being off once in a while in my view (though both are bad).

I'm trying to look for gaps in culture, production, and food and GPs now as I progress, but so far I haven't noticed any obvious problems with the cities per turn yields. It seems to be limited to global yields or their global modifiers (speaking of which, Sistine still wasn't working). I'm also looking at the happiness counter but it seems to be working correctly too, including during golden ages incrementing toward the next one.
 
National treasury not built.
Something I notice, is that it is not even adding up correctly. Says I should be making 41 gp/trn but actually should be making 48 gp/trn...

I also noticed it hardly ever errs up... it is almost always erroring down.
 
I've noticed it err up, usually when it says I've should have negative income, but that's not common no. (it's been all over the place in the later stages of the game to be honest, but usually accurate or close to expected unless there's a glitch turn or series of them).

It definitely appears to correlate with a turn where the in-between turn science/faith/happiness is way off now (where it would suddenly say 30 turns to tech or something bizarre in the science overlay but stays at 10 for the topbar). Happiness also doesn't sum correctly upon closer observation when this happens.

I still have no idea what causes it but it still seems more common in a golden age. Possibly it's more noticeable still when a GA is involved with the higher yields.

For science, faith, happiness, culture, and gold, there's an intermittent glitch on per turn amounts. Gold is most noticed because units can be disbanded. Science is probably the most severe as it can put several turns of research to waste while it sorts out. Faith and culture only matter if one is pursuing these. For all of the non-gold, it still adds a small quantity per turn. Say several hundred science, at the stage in the game where several thousand per turn can be normal, couple dozen faith (when several hundred is quite possible) and several hundred culture (again, thousands), plus a smaller quantity of happiness than is predicted (which seemed variable). I haven't been able to figure out how it is basing these quantities, nor what quantity it uses or discards for gold.

Nothing seemed to be afflicting production, with the possible exception that if the game calculated a random negative happiness value, this could impact city growth and production.
 
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.
 
It does not make sense. I also encounter this problem, and sometimes I get exactly the amount of gold I suppose to, but usually not. The same with the faith and culture. I understand, that gold income can vary from turn to turn, but culture and faith? And these differences are really big: i.e. sometimes I get 110 faith, and sometimes 50. It can't be only tip miscalculation.

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:

No, it is not true. I calculated sum of every city income, which comes only from tiles and city bonuses. It is exactly the same as shown in CityIncome.
 
Back
Top Bottom