City gold/culture/research, value overflows

justinbn1

Chieftain
Joined
Jan 20, 2007
Messages
18
Hello everyone,

I'm in the Transcendent Era after having conquered all other civs, and settling a large part of the solar system. My most developed Earth cities (playing on a Space map, v43) are specialist powerhouses due to trade, Negotiator III and my absolute love of Big McDowell's and Great Farmers.

I've however noticed that some of my cities (especially my capital) seems to be reaching the value limit for gold, culture and/or research, causing overflow of the value (i.e. above about 200k/turn/city, it goes negative). Furthermore, I need to spread out my commerce investment a bit (I usually put it all into research) due to overflow of my total research at about the 20 mil/turn mark.

Is there any way around this, or is this simply a limitation of Civ IV?
 
Its limitation of game, also this shouldn't happen at all unless you changed game to let build space buildings on Earth.
 
Its limitation of game, also this shouldn't happen at all unless you changed game to let build space buildings on Earth.
I did not do that. The high output seems to be a consequence of the really high pop of my Earth cities (due to Big McDowells and me just planting wheat/potatoes like EVERYWHERE I could), which blows up trade value, and then me picking trade route value-focused civics and traits.
 
To put it into perspective, here is what I get from a non-capital city of mine. Which DOES make me realize that the trade tooltip doesn't quite match the trade overview values, by a factor of about 2x. Hmm... Edit: this excess corresponds exactly to my civics+traits bonuses to trade routes.
 

Attachments

  • Sans titre 7.png
    Sans titre 7.png
    4.1 MB · Views: 80
  • Sans titre 6.png
    Sans titre 6.png
    4.3 MB · Views: 81
Last edited:
Noooooo, not a NERF!!!

y u hate my build 😭

(Here's my latest save)
 

Attachments

  • Justinv43 August 25, AD-2086.CivBeyondSwordSave
    7.1 MB · Views: 14
One 'easy', fix, IMO, would be to make the civics/traits trade route bonuses additive to the rest of the trade bonuses, rather than multiplicative (as noted previously).
 
Trade needs nerf then, upload save
How about a VERY GLOBAL FIX?
When a certain value reaches its *EXE* limit, make the programming manually set it as the Max Working Value.
Basically:
If (value > EXE limit) then (value == EXE limit).
For ALL such values ever getting reported as "overflowing".
Like, seriously, why not?
 
"No nation was ever ruined by trade" indeed. Though, this looks like a rather specific and carefully created situation, a build indeed, I wouldn't go about nerfing trade over one outlier. Also the extra food by the corporation might be the actual underlying cause of all this, just what size are those cities?
 
Extreme builds will expose where we need to be able to extend overflows in a way that permanently fixes overflows imo. That said, it may well be that there's some overamping going on and perhaps additive % mods to trade rather than layered % mod after % mod in trade IS something that needs to be reworked a bit. Quite possible that trade is setup to be too powerful in general with a little manipulation. Trade calcs are not as well reviewed as some other elements in the game.

Nobody hates your build but if it breaks the game we have to consider when it does, how it does, and whether some nerfing is in order or programming to correct overflow barrier margins are a better way to address it. At the moment, modders seem to be pretty sucked into our lives more than focused on outlying spots where players go to serious extremes and find they can break things by doing so, particularly in the very late stages of the game. We have so many big fish to fry...
 
@Thunderbrd
So is it practically hard or not, to enact some form of a universal check for "if (value > max) then (value == max)"?
Because that should outright fix ALL overflows at once, by simply telling them to have a ceiling value.
May be not the most "everyone's-strategy-friendly" method, but it looks like a quick fix that at least outright fixes the problem which is much worse anyways.
 
@Thunderbrd
So is it practically hard or not, to enact some form of a universal check for "if (value > max) then (value == max)"?
Because that should outright fix ALL overflows at once, by simply telling them to have a ceiling value.
May be not the most "everyone's-strategy-friendly" method, but it looks like a quick fix that at least outright fixes the problem which is much worse anyways.
Often such a check is implemented but it can break things nearly as bad down the line. It can throw off the baseline of the calculation so that hitting an overflow limited calculation just then pushes the zero point back. For example, if I say today that I have calculated my income to over 232 billion which is the limited to say 200 million, then I lose a billion from my income, I'm now at -800 million income rather than being in the positive at all. Extreme example but it's often how such a limiter works to mess up the math nearly as bad as the overflow does. Plus, every calculation is its own logic stream so there's no deuce ex machina solution here. When solving for overflows, every instance must be considered for the best approach to resolution.
 
Well, the best counter-question would be:
Why not make ALL (applicable) variables DOUBLEs by default?
That way, you still can overflow, but that'd be outright ridiculous and only achievable via extreme cheating with Cheat Engine or similar stuff, not via weird in-game strategies.
But if ALL are "big enough", NONE would ever overflow.
So, really, why not do THAT?
Sure, it'd take some time to convert ALL the code - but it's a one-time thing, AND it's as simple as changing a variable type alone, nothing more.
And that would fix ALL overflows ANYWHERE and EVERYWHERE.
 
Why not make ALL (applicable) variables DOUBLEs by default?
Because that allocates a tremendous amount of memory, much of which is likely never to be necessary to allocate. Once allocated, it is spent from our very limited pool of memory resources that can never be expanded on with the current program architecture (without starting to build out a new program from scratch which is sometimes what frustrated programmers start to do for a few days then give up on as fast as the frustration fades.)

AND, I'm not convinced that really SOLVES overflow, only enhances the limit until it does. At some of the places we scale, this may not be anywhere near enough to be an honest solution.
 
One stupid method might be to make a separate (culture/gold/etc) function that dynamically swaps to holding the var in log scale e.g. 90526 means 10^90526/10000 aka ~1,128,755,813

It will mean loss in fine detail when values get v high (10^9.0527 is 1,129,015,749 so clearly there is a tradeoff between max digits and accuracy) and having to find every place that culture/whatever values get added, subtracted, checked, etc and replacing it with this func, but would solve (almost) arbitrarily high values.

Lots of work for questionable return, at this stage. Better solutions exist too I am sure.
 
Because that allocates a tremendous amount of memory, much of which is likely never to be necessary to allocate. Once allocated, it is spent from our very limited pool of memory resources that can never be expanded on with the current program architecture (without starting to build out a new program from scratch which is sometimes what frustrated programmers start to do for a few days then give up on as fast as the frustration fades.)

AND, I'm not convinced that really SOLVES overflow, only enhances the limit until it does. At some of the places we scale, this may not be anywhere near enough to be an honest solution.
I did say "applicable", not "all": basically, anything that has been REPORTED to overflow.
It's not that big of a number, so I don't see too much of a problem to address such issues when they are reported.
Or so I'd think, lol.
 
Probably easier here to nerf overall trade routes sources and cap it to 15/20 or so in any case. Priority to trade oriented civics over random +1 from buildings and techs.
 
Probably easier here to nerf overall trade routes sources and cap it to 15/20 or so in any case. Priority to trade oriented civics over random +1 from buildings and techs.
There already is a max trade routes and you can grow it through obtaining some very limited selections of traits making it a very special power. It might be better to somehow slow how the calculation gets so high just a bit.
 
I always end up with a ridiculous amount of money/Gold at the End of a Space Game--Mastery Victory
 

Attachments

  • OlyOsk November 17, AD-1967.CivBeyondSwordSave
    8.4 MB · Views: 14
I always end up with a ridiculous amount of money/Gold at the End of a Space Game--Mastery Victory
You won't once the unit review is completed... leave some room for the adjustments to come there and gold will definitely become a greater challenge in the game. It will be a wait still but it's comin someday
 
Top Bottom